generated-configure.sh revision 2198:2784b477f3bd
160107Sobrien#!/bin/bash
216877Ssos#
316877Ssos# ##########################################################
416877Ssos# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
516877Ssos# ##########################################################
616877Ssos#
716877Ssos#! /bin/sh
816877Ssos# Guess values for system-dependent variables and create Makefiles.
916877Ssos# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
1016877Ssos#
1116877Ssos# Report bugs to <build-dev@openjdk.java.net>.
1216877Ssos#
1316877Ssos#
1416877Ssos# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
1516877Ssos#
1616877Ssos#
1716877Ssos# This configure script is free software; the Free Software Foundation
1816877Ssos# gives unlimited permission to copy, distribute and modify it.
1916877Ssos## -------------------- ##
2016877Ssos## M4sh Initialization. ##
2116877Ssos## -------------------- ##
2216877Ssos
2316877Ssos# Be more Bourne compatible
2416877SsosDUALCASE=1; export DUALCASE # for MKS sh
2516877Ssosif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
2616877Ssos  emulate sh
2716877Ssos  NULLCMD=:
2816877Ssos  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
2916877Ssos  # is contrary to our usage.  Disable this feature.
3016877Ssos  alias -g '${1+"$@"}'='"$@"'
3116877Ssos  setopt NO_GLOB_SUBST
3216877Ssoselse
3316877Ssos  case `(set -o) 2>/dev/null` in #(
3416877Ssos  *posix*) :
3516877Ssos    set -o posix ;; #(
3616877Ssos  *) :
3716877Ssos     ;;
3816877Ssosesac
3916877Ssosfi
4016877Ssos
4116877Ssos
4216877Ssosas_nl='
4316877Ssos'
4416877Ssosexport as_nl
4516877Ssos# Printing a long string crashes Solaris 7 /usr/bin/printf.
4616877Ssosas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4716877Ssosas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
4816877Ssosas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
4916877Ssos# Prefer a ksh shell builtin over an external printf program on Solaris,
5016877Ssos# but without wasting forks for bash or zsh.
5116877Ssosif test -z "$BASH_VERSION$ZSH_VERSION" \
5216877Ssos    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
5316877Ssos  as_echo='print -r --'
5416877Ssos  as_echo_n='print -rn --'
5516877Ssoselif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
5616877Ssos  as_echo='printf %s\n'
5716877Ssos  as_echo_n='printf %s'
5816877Ssoselse
5938140Syokota  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
6016877Ssos    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
6116877Ssos    as_echo_n='/usr/ucb/echo -n'
6216877Ssos  else
6332822Syokota    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
6416877Ssos    as_echo_n_body='eval
6516877Ssos      arg=$1;
6616877Ssos      case $arg in #(
6716877Ssos      *"$as_nl"*)
6816877Ssos	expr "X$arg" : "X\\(.*\\)$as_nl";
6916877Ssos	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
7016877Ssos      esac;
7116877Ssos      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
7216877Ssos    '
7316877Ssos    export as_echo_n_body
7416877Ssos    as_echo_n='sh -c $as_echo_n_body as_echo'
7516877Ssos  fi
7616877Ssos  export as_echo_body
7716877Ssos  as_echo='sh -c $as_echo_body as_echo'
7816877Ssosfi
7916877Ssos
8016877Ssos# The user is always right.
8116877Ssosif test "${PATH_SEPARATOR+set}" != set; then
8216877Ssos  PATH_SEPARATOR=:
8316877Ssos  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
8416877Ssos    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
8516877Ssos      PATH_SEPARATOR=';'
8616877Ssos  }
8716877Ssosfi
8816877Ssos
8916877Ssos
9016877Ssos# IFS
9116877Ssos# We need space, tab and new line, in precisely that order.  Quoting is
9216877Ssos# there to prevent editors from complaining about space-tab.
9316877Ssos# (If _AS_PATH_WALK were called with IFS unset, it would disable word
9416877Ssos# splitting by setting IFS to empty value.)
9518194SsosIFS=" ""	$as_nl"
9616877Ssos
9716877Ssos# Find who we are.  Look in the path if we contain no directory separator.
9874119Sacheas_myself=
9916877Ssoscase $0 in #((
10016877Ssos  *[\\/]* ) as_myself=$0 ;;
10116877Ssos  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10216877Ssosfor as_dir in $PATH
10316877Ssosdo
10416877Ssos  IFS=$as_save_IFS
10516877Ssos  test -z "$as_dir" && as_dir=.
10616877Ssos    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
10716877Ssos  done
10874119SacheIFS=$as_save_IFS
10916877Ssos
11043334Syokota     ;;
11143334Syokotaesac
11243334Syokota# We did not find ourselves, most probably we were run as `sh COMMAND'
11343334Syokota# in which case we are not to be found in the path.
11443334Syokotaif test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657STLPORT_LIB
658LIBZIP_CAN_USE_MMAP
659LIBDL
660LIBM
661USE_EXTERNAL_LCMS
662LCMS_LIBS
663LCMS_CFLAGS
664USE_EXTERNAL_LIBZ
665USE_EXTERNAL_LIBPNG
666PNG_LIBS
667PNG_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670LLVM_LIBS
671LLVM_LDFLAGS
672LLVM_CFLAGS
673LLVM_CONFIG
674LIBFFI_LIBS
675LIBFFI_CFLAGS
676ALSA_LIBS
677ALSA_CFLAGS
678FREETYPE_BUNDLE_LIB_PATH
679FREETYPE_LIBS
680FREETYPE_CFLAGS
681CUPS_CFLAGS
682X_EXTRA_LIBS
683X_LIBS
684X_PRE_LIBS
685X_CFLAGS
686XMKMF
687MSVCP_DLL
688MSVCR_DLL
689LIBCXX
690STATIC_CXX_SETTING
691FIXPATH_DETACH_FLAG
692FIXPATH
693BUILD_GTEST
694VALID_JVM_FEATURES
695JVM_FEATURES_custom
696JVM_FEATURES_zeroshark
697JVM_FEATURES_zero
698JVM_FEATURES_minimal
699JVM_FEATURES_core
700JVM_FEATURES_client
701JVM_FEATURES_server
702INCLUDE_DTRACE
703GCOV_ENABLED
704STRIP_POLICY
705DEBUG_BINARIES
706ZIP_EXTERNAL_DEBUG_SYMBOLS
707COPY_DEBUG_SYMBOLS
708COMPILE_WITH_DEBUG_SYMBOLS
709CFLAGS_WARNINGS_ARE_ERRORS
710BUILD_CC_DISABLE_WARNING_PREFIX
711DISABLE_WARNING_PREFIX
712HOTSPOT_SET_WARNINGS_AS_ERRORS
713WARNINGS_AS_ERRORS
714COMPILER_SUPPORTS_TARGET_BITS_FLAG
715ZERO_ARCHFLAG
716LDFLAGS_TESTEXE
717LDFLAGS_TESTLIB
718CXXFLAGS_TESTEXE
719CXXFLAGS_TESTLIB
720CFLAGS_TESTEXE
721CFLAGS_TESTLIB
722OPENJDK_BUILD_JVM_LIBS
723OPENJDK_BUILD_JVM_ASFLAGS
724OPENJDK_BUILD_JVM_LDFLAGS
725OPENJDK_BUILD_JVM_CFLAGS
726OPENJDK_BUILD_LDFLAGS_HASH_STYLE
727OPENJDK_BUILD_LDFLAGS_CXX_JDK
728OPENJDK_BUILD_JDKEXE_LIBS
729OPENJDK_BUILD_JDKLIB_LIBS
730OPENJDK_BUILD_LDFLAGS_JDKEXE
731OPENJDK_BUILD_LDFLAGS_JDKLIB
732OPENJDK_BUILD_CXXFLAGS_JDKEXE
733OPENJDK_BUILD_CXXFLAGS_JDKLIB
734OPENJDK_BUILD_CFLAGS_JDKEXE
735OPENJDK_BUILD_CFLAGS_JDKLIB
736OPENJDK_BUILD_CXXSTD_CXXFLAG
737JVM_LIBS
738JVM_ASFLAGS
739JVM_LDFLAGS
740JVM_CFLAGS
741LDFLAGS_HASH_STYLE
742LDFLAGS_CXX_JDK
743JDKEXE_LIBS
744JDKLIB_LIBS
745LDFLAGS_JDKEXE
746LDFLAGS_JDKLIB
747CXXFLAGS_JDKEXE
748CXXFLAGS_JDKLIB
749CFLAGS_JDKEXE
750CFLAGS_JDKLIB
751MACOSX_VERSION_MIN
752CXXSTD_CXXFLAG
753CXX_O_FLAG_SIZE
754CXX_O_FLAG_NONE
755CXX_O_FLAG_DEBUG
756CXX_O_FLAG_NORM
757CXX_O_FLAG_HI
758CXX_O_FLAG_HIGHEST
759CXX_O_FLAG_HIGHEST_JVM
760C_O_FLAG_SIZE
761C_O_FLAG_NONE
762C_O_FLAG_DEBUG
763C_O_FLAG_NORM
764C_O_FLAG_HI
765C_O_FLAG_HIGHEST
766C_O_FLAG_HIGHEST_JVM
767JVM_CFLAGS_SYMBOLS
768CXXFLAGS_DEBUG_SYMBOLS
769CFLAGS_DEBUG_SYMBOLS
770CXX_FLAG_DEPS
771C_FLAG_DEPS
772SHARED_LIBRARY_FLAGS
773SET_SHARED_LIBRARY_MAPFILE
774SET_SHARED_LIBRARY_NAME
775SET_SHARED_LIBRARY_ORIGIN
776SET_EXECUTABLE_ORIGIN
777CXX_FLAG_REORDER
778C_FLAG_REORDER
779JVM_RCFLAGS
780RC_FLAGS
781AR_OUT_OPTION
782LD_OUT_OPTION
783EXE_OUT_OPTION
784CC_OUT_OPTION
785STRIPFLAGS
786ARFLAGS
787COMPILER_BINDCMD_FILE_FLAG
788COMPILER_COMMAND_FILE_FLAG
789COMPILER_TARGET_BITS_FLAG
790JT_HOME
791JTREGEXE
792HOTSPOT_TOOLCHAIN_TYPE
793USING_BROKEN_SUSE_LD
794PACKAGE_PATH
795USE_CLANG
796HOTSPOT_LD
797HOTSPOT_CXX
798HOTSPOT_RC
799HOTSPOT_MT
800BUILD_AS
801BUILD_LDCXX
802BUILD_LD
803BUILD_STRIP
804BUILD_OBJCOPY
805BUILD_AR
806BUILD_NM
807BUILD_CXX
808BUILD_CC
809BUILD_SYSROOT_LDFLAGS
810BUILD_SYSROOT_CFLAGS
811ac_ct_OBJDUMP
812OBJDUMP
813ac_ct_OBJCOPY
814OBJCOPY
815ac_ct_NM
816ac_ct_STRIP
817GNM
818NM
819STRIP
820MSBUILD
821DUMPBIN
822RC
823MT
824LIPO
825ac_ct_AR
826AR
827AS
828LDCXX
829LD
830CXXCPP
831CPP
832CXX_VERSION_NUMBER
833CC_VERSION_NUMBER
834ac_ct_CXX
835CXXFLAGS
836CXX
837TOOLCHAIN_PATH_CXX
838POTENTIAL_CXX
839OBJEXT
840EXEEXT
841ac_ct_CC
842CPPFLAGS
843LDFLAGS
844CFLAGS
845CC
846TOOLCHAIN_PATH_CC
847POTENTIAL_CC
848TOOLCHAIN_VERSION
849VS_LIB
850VS_INCLUDE
851VS_PATH
852CYGWIN_LINK
853SYSROOT_LDFLAGS
854SYSROOT_CFLAGS
855EXTRA_LDFLAGS
856EXTRA_CXXFLAGS
857EXTRA_CFLAGS
858LEGACY_EXTRA_LDFLAGS
859LEGACY_EXTRA_CXXFLAGS
860LEGACY_EXTRA_CFLAGS
861EXE_SUFFIX
862OBJ_SUFFIX
863STATIC_LIBRARY
864SHARED_LIBRARY
865STATIC_LIBRARY_SUFFIX
866SHARED_LIBRARY_SUFFIX
867LIBRARY_PREFIX
868TOOLCHAIN_TYPE
869STATIC_BUILD
870IMPORT_MODULES_MAKE
871IMPORT_MODULES_SRC
872IMPORT_MODULES_CONF
873IMPORT_MODULES_LIBS
874IMPORT_MODULES_CMDS
875IMPORT_MODULES_CLASSES
876BUILD_HOTSPOT
877HOTSPOT_DIST
878BUILD_OUTPUT
879JDK_TOPDIR
880NASHORN_TOPDIR
881HOTSPOT_TOPDIR
882JAXWS_TOPDIR
883JAXP_TOPDIR
884CORBA_TOPDIR
885LANGTOOLS_TOPDIR
886EXTERNAL_BUILDJDK
887BUILD_JDK
888CREATE_BUILDJDK
889JLINK
890JMOD
891BOOT_JDK_BITS
892JAVAC_FLAGS
893BOOT_JDK_MODULAR
894BOOT_JDK_SOURCETARGET
895JARSIGNER
896JAR
897JAVAH
898JAVAC
899JAVA
900BOOT_JDK
901JAVA_CHECK
902JAVAC_CHECK
903VERSION_IS_GA
904VERSION_SHORT
905VERSION_STRING
906VERSION_NUMBER_FOUR_POSITIONS
907VERSION_NUMBER
908VERSION_OPT
909VERSION_BUILD
910VERSION_PRE
911VERSION_PATCH
912VERSION_SECURITY
913VERSION_MINOR
914VERSION_MAJOR
915MACOSX_BUNDLE_ID_BASE
916MACOSX_BUNDLE_NAME_BASE
917HOTSPOT_VM_DISTRO
918COMPANY_NAME
919JDK_RC_PLATFORM_NAME
920PRODUCT_SUFFIX
921PRODUCT_NAME
922LAUNCHER_NAME
923JLINK_KEEP_PACKAGED_MODULES
924COPYRIGHT_YEAR
925COMPRESS_JARS
926INCLUDE_SA
927UNLIMITED_CRYPTO
928CACERTS_FILE
929BUILD_HEADLESS
930SUPPORT_HEADFUL
931SUPPORT_HEADLESS
932DEFAULT_MAKE_TARGET
933OS_VERSION_MICRO
934OS_VERSION_MINOR
935OS_VERSION_MAJOR
936PKG_CONFIG
937BASH_ARGS
938SETFILE
939CODESIGN
940XATTR
941DSYMUTIL
942IS_GNU_TIME
943PATCH
944DTRACE
945TIME
946STAT
947HG
948READELF
949OTOOL
950LDD
951ZIP
952UNZIP
953TAR_SUPPORTS_TRANSFORM
954TAR_INCLUDE_PARAM
955TAR_CREATE_EXTRA_PARAM
956TAR_TYPE
957FIND_DELETE
958OUTPUT_SYNC
959OUTPUT_SYNC_SUPPORTED
960CHECK_TOOLSDIR_MAKE
961CHECK_TOOLSDIR_GMAKE
962CHECK_MAKE
963CHECK_GMAKE
964MAKE
965PKGHANDLER
966CONFIGURESUPPORT_OUTPUTDIR
967OUTPUT_ROOT
968CONF_NAME
969SPEC
970SDKROOT
971XCODEBUILD
972VALID_JVM_VARIANTS
973JVM_VARIANTS
974DEBUG_LEVEL
975HOTSPOT_DEBUG_LEVEL
976JDK_VARIANT
977USERNAME
978CANONICAL_TOPDIR
979ORIGINAL_TOPDIR
980TOPDIR
981PATH_SEP
982ZERO_ARCHDEF
983HOTSPOT_BUILD_CPU_DEFINE
984HOTSPOT_BUILD_CPU_ARCH
985HOTSPOT_BUILD_CPU
986HOTSPOT_BUILD_OS_TYPE
987HOTSPOT_BUILD_OS
988OPENJDK_BUILD_BUNDLE_PLATFORM
989OPENJDK_BUILD_CPU_BUNDLE
990OPENJDK_BUILD_OS_BUNDLE
991OPENJDK_BUILD_OS_EXPORT_DIR
992OPENJDK_BUILD_CPU_JLI_CFLAGS
993OPENJDK_BUILD_CPU_OSARCH
994OPENJDK_BUILD_CPU_ISADIR
995OPENJDK_BUILD_CPU_LIBDIR
996OPENJDK_BUILD_CPU_LEGACY_LIB
997OPENJDK_BUILD_CPU_LEGACY
998HOTSPOT_TARGET_CPU_DEFINE
999HOTSPOT_TARGET_CPU_ARCH
1000HOTSPOT_TARGET_CPU
1001HOTSPOT_TARGET_OS_TYPE
1002HOTSPOT_TARGET_OS
1003DEFINE_CROSS_COMPILE_ARCH
1004LP64
1005OPENJDK_TARGET_BUNDLE_PLATFORM
1006OPENJDK_TARGET_CPU_BUNDLE
1007OPENJDK_TARGET_OS_BUNDLE
1008OPENJDK_TARGET_OS_EXPORT_DIR
1009OPENJDK_TARGET_CPU_JLI_CFLAGS
1010OPENJDK_TARGET_CPU_OSARCH
1011OPENJDK_TARGET_CPU_ISADIR
1012OPENJDK_TARGET_CPU_LIBDIR
1013OPENJDK_TARGET_CPU_LEGACY_LIB
1014OPENJDK_TARGET_CPU_LEGACY
1015REQUIRED_OS_VERSION
1016REQUIRED_OS_NAME
1017COMPILE_TYPE
1018OPENJDK_TARGET_CPU_ENDIAN
1019OPENJDK_TARGET_CPU_BITS
1020OPENJDK_TARGET_CPU_ARCH
1021OPENJDK_TARGET_CPU
1022OPENJDK_TARGET_OS_ENV
1023OPENJDK_TARGET_OS_TYPE
1024OPENJDK_TARGET_OS
1025OPENJDK_BUILD_CPU_ENDIAN
1026OPENJDK_BUILD_CPU_BITS
1027OPENJDK_BUILD_CPU_ARCH
1028OPENJDK_BUILD_CPU
1029OPENJDK_BUILD_OS_ENV
1030OPENJDK_BUILD_OS_TYPE
1031OPENJDK_BUILD_OS
1032OPENJDK_BUILD_AUTOCONF_NAME
1033OPENJDK_TARGET_AUTOCONF_NAME
1034target_os
1035target_vendor
1036target_cpu
1037target
1038host_os
1039host_vendor
1040host_cpu
1041host
1042build_os
1043build_vendor
1044build_cpu
1045build
1046NICE
1047CPIO
1048DF
1049READLINK
1050CYGPATH
1051SED
1052FGREP
1053EGREP
1054GREP
1055AWK
1056XARGS
1057WHICH
1058WC
1059UNIQ
1060UNAME
1061TR
1062TOUCH
1063TEE
1064TAR
1065TAIL
1066SORT
1067SH
1068RMDIR
1069RM
1070PRINTF
1071NAWK
1072MV
1073MKTEMP
1074MKDIR
1075LS
1076LN
1077GZIP
1078GUNZIP
1079HEAD
1080FIND
1081FILE
1082EXPR
1083ECHO
1084DIRNAME
1085DIFF
1086DATE
1087CUT
1088CP
1089COMM
1090CMP
1091CHMOD
1092CAT
1093BASH
1094BASENAME
1095DATE_WHEN_CONFIGURED
1096ORIGINAL_PATH
1097CONFIGURE_COMMAND_LINE
1098target_alias
1099host_alias
1100build_alias
1101LIBS
1102ECHO_T
1103ECHO_N
1104ECHO_C
1105DEFS
1106mandir
1107localedir
1108libdir
1109psdir
1110pdfdir
1111dvidir
1112htmldir
1113infodir
1114docdir
1115oldincludedir
1116includedir
1117localstatedir
1118sharedstatedir
1119sysconfdir
1120datadir
1121datarootdir
1122libexecdir
1123sbindir
1124bindir
1125program_transform_name
1126prefix
1127exec_prefix
1128PACKAGE_URL
1129PACKAGE_BUGREPORT
1130PACKAGE_STRING
1131PACKAGE_VERSION
1132PACKAGE_TARNAME
1133PACKAGE_NAME
1134PATH_SEPARATOR
1135SHELL'
1136ac_subst_files=''
1137ac_user_opts='
1138enable_option_checking
1139with_target_bits
1140enable_openjdk_only
1141with_custom_make_dir
1142with_jdk_variant
1143enable_debug
1144with_debug_level
1145with_jvm_variants
1146with_devkit
1147with_sys_root
1148with_sysroot
1149with_tools_dir
1150with_toolchain_path
1151with_extra_path
1152with_sdk_name
1153with_conf_name
1154with_output_sync
1155with_default_make_target
1156enable_headful
1157with_cacerts_file
1158enable_unlimited_crypto
1159with_copyright_year
1160enable_keep_packaged_modules
1161with_milestone
1162with_update_version
1163with_user_release_suffix
1164with_build_number
1165with_version_string
1166with_version_pre
1167with_version_opt
1168with_version_build
1169with_version_major
1170with_version_minor
1171with_version_security
1172with_version_patch
1173with_boot_jdk
1174with_build_jdk
1175with_add_source_root
1176with_override_source_root
1177with_adds_and_overrides
1178with_override_langtools
1179with_override_corba
1180with_override_jaxp
1181with_override_jaxws
1182with_override_hotspot
1183with_override_nashorn
1184with_override_jdk
1185with_import_hotspot
1186with_import_modules
1187enable_static_build
1188with_toolchain_type
1189with_extra_cflags
1190with_extra_cxxflags
1191with_extra_ldflags
1192with_toolchain_version
1193with_build_devkit
1194with_jtreg
1195enable_warnings_as_errors
1196with_native_debug_symbols
1197enable_debug_symbols
1198enable_zip_debug_info
1199enable_native_coverage
1200enable_dtrace
1201with_jvm_features
1202with_jvm_interpreter
1203enable_hotspot_gtest
1204with_stdc__lib
1205with_msvcr_dll
1206with_msvcp_dll
1207with_x
1208with_cups
1209with_cups_include
1210with_freetype
1211with_freetype_include
1212with_freetype_lib
1213with_freetype_src
1214enable_freetype_bundling
1215with_alsa
1216with_alsa_include
1217with_alsa_lib
1218with_libffi
1219with_libffi_include
1220with_libffi_lib
1221with_libjpeg
1222with_giflib
1223with_libpng
1224with_zlib
1225with_lcms
1226with_dxsdk
1227with_dxsdk_lib
1228with_dxsdk_include
1229enable_jtreg_failure_handler
1230enable_generate_classlist
1231with_num_cores
1232with_memory_size
1233with_jobs
1234with_test_jobs
1235with_boot_jdk_jvmargs
1236with_sjavac_server_java
1237enable_sjavac
1238enable_javac_server
1239enable_icecc
1240enable_precompiled_headers
1241enable_ccache
1242with_ccache_dir
1243'
1244      ac_precious_vars='build_alias
1245host_alias
1246target_alias
1247BASENAME
1248BASH
1249CAT
1250CHMOD
1251CMP
1252COMM
1253CP
1254CUT
1255DATE
1256DIFF
1257DIRNAME
1258ECHO
1259EXPR
1260FILE
1261FIND
1262HEAD
1263GUNZIP
1264GZIP
1265LN
1266LS
1267MKDIR
1268MKTEMP
1269MV
1270NAWK
1271PRINTF
1272RM
1273RMDIR
1274SH
1275SORT
1276TAIL
1277TAR
1278TEE
1279TOUCH
1280TR
1281UNAME
1282UNIQ
1283WC
1284WHICH
1285XARGS
1286AWK
1287GREP
1288EGREP
1289FGREP
1290SED
1291CYGPATH
1292READLINK
1293DF
1294CPIO
1295NICE
1296MAKE
1297UNZIP
1298ZIP
1299LDD
1300OTOOL
1301READELF
1302HG
1303STAT
1304TIME
1305DTRACE
1306PATCH
1307DSYMUTIL
1308XATTR
1309CODESIGN
1310SETFILE
1311PKG_CONFIG
1312JAVA
1313JAVAC
1314JAVAH
1315JAR
1316JARSIGNER
1317CC
1318CFLAGS
1319LDFLAGS
1320LIBS
1321CPPFLAGS
1322CXX
1323CXXFLAGS
1324CCC
1325CPP
1326CXXCPP
1327AS
1328AR
1329LIPO
1330STRIP
1331NM
1332GNM
1333OBJCOPY
1334OBJDUMP
1335BUILD_CC
1336BUILD_CXX
1337BUILD_NM
1338BUILD_AR
1339BUILD_OBJCOPY
1340BUILD_STRIP
1341JTREGEXE
1342XMKMF
1343FREETYPE_CFLAGS
1344FREETYPE_LIBS
1345ALSA_CFLAGS
1346ALSA_LIBS
1347LIBFFI_CFLAGS
1348LIBFFI_LIBS
1349PNG_CFLAGS
1350PNG_LIBS
1351LCMS_CFLAGS
1352LCMS_LIBS
1353ICECC_CMD
1354ICECC_CREATE_ENV
1355ICECC_WRAPPER
1356CCACHE'
1357
1358
1359# Initialize some variables set by options.
1360ac_init_help=
1361ac_init_version=false
1362ac_unrecognized_opts=
1363ac_unrecognized_sep=
1364# The variables have the same names as the options, with
1365# dashes changed to underlines.
1366cache_file=/dev/null
1367exec_prefix=NONE
1368no_create=
1369no_recursion=
1370prefix=NONE
1371program_prefix=NONE
1372program_suffix=NONE
1373program_transform_name=s,x,x,
1374silent=
1375site=
1376srcdir=
1377verbose=
1378x_includes=NONE
1379x_libraries=NONE
1380
1381# Installation directory options.
1382# These are left unexpanded so users can "make install exec_prefix=/foo"
1383# and all the variables that are supposed to be based on exec_prefix
1384# by default will actually change.
1385# Use braces instead of parens because sh, perl, etc. also accept them.
1386# (The list follows the same order as the GNU Coding Standards.)
1387bindir='${exec_prefix}/bin'
1388sbindir='${exec_prefix}/sbin'
1389libexecdir='${exec_prefix}/libexec'
1390datarootdir='${prefix}/share'
1391datadir='${datarootdir}'
1392sysconfdir='${prefix}/etc'
1393sharedstatedir='${prefix}/com'
1394localstatedir='${prefix}/var'
1395includedir='${prefix}/include'
1396oldincludedir='/usr/include'
1397docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1398infodir='${datarootdir}/info'
1399htmldir='${docdir}'
1400dvidir='${docdir}'
1401pdfdir='${docdir}'
1402psdir='${docdir}'
1403libdir='${exec_prefix}/lib'
1404localedir='${datarootdir}/locale'
1405mandir='${datarootdir}/man'
1406
1407ac_prev=
1408ac_dashdash=
1409for ac_option
1410do
1411  # If the previous option needs an argument, assign it.
1412  if test -n "$ac_prev"; then
1413    eval $ac_prev=\$ac_option
1414    ac_prev=
1415    continue
1416  fi
1417
1418  case $ac_option in
1419  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1420  *=)   ac_optarg= ;;
1421  *)    ac_optarg=yes ;;
1422  esac
1423
1424  # Accept the important Cygnus configure options, so we can diagnose typos.
1425
1426  case $ac_dashdash$ac_option in
1427  --)
1428    ac_dashdash=yes ;;
1429
1430  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1431    ac_prev=bindir ;;
1432  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1433    bindir=$ac_optarg ;;
1434
1435  -build | --build | --buil | --bui | --bu)
1436    ac_prev=build_alias ;;
1437  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1438    build_alias=$ac_optarg ;;
1439
1440  -cache-file | --cache-file | --cache-fil | --cache-fi \
1441  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1442    ac_prev=cache_file ;;
1443  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1444  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1445    cache_file=$ac_optarg ;;
1446
1447  --config-cache | -C)
1448    cache_file=config.cache ;;
1449
1450  -datadir | --datadir | --datadi | --datad)
1451    ac_prev=datadir ;;
1452  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1453    datadir=$ac_optarg ;;
1454
1455  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1456  | --dataroo | --dataro | --datar)
1457    ac_prev=datarootdir ;;
1458  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1459  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1460    datarootdir=$ac_optarg ;;
1461
1462  -disable-* | --disable-*)
1463    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1464    # Reject names that are not valid shell variable names.
1465    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1466      as_fn_error $? "invalid feature name: $ac_useropt"
1467    ac_useropt_orig=$ac_useropt
1468    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1469    case $ac_user_opts in
1470      *"
1471"enable_$ac_useropt"
1472"*) ;;
1473      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1474	 ac_unrecognized_sep=', ';;
1475    esac
1476    eval enable_$ac_useropt=no ;;
1477
1478  -docdir | --docdir | --docdi | --doc | --do)
1479    ac_prev=docdir ;;
1480  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1481    docdir=$ac_optarg ;;
1482
1483  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1484    ac_prev=dvidir ;;
1485  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1486    dvidir=$ac_optarg ;;
1487
1488  -enable-* | --enable-*)
1489    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1490    # Reject names that are not valid shell variable names.
1491    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1492      as_fn_error $? "invalid feature name: $ac_useropt"
1493    ac_useropt_orig=$ac_useropt
1494    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1495    case $ac_user_opts in
1496      *"
1497"enable_$ac_useropt"
1498"*) ;;
1499      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1500	 ac_unrecognized_sep=', ';;
1501    esac
1502    eval enable_$ac_useropt=\$ac_optarg ;;
1503
1504  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1505  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1506  | --exec | --exe | --ex)
1507    ac_prev=exec_prefix ;;
1508  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1509  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1510  | --exec=* | --exe=* | --ex=*)
1511    exec_prefix=$ac_optarg ;;
1512
1513  -gas | --gas | --ga | --g)
1514    # Obsolete; use --with-gas.
1515    with_gas=yes ;;
1516
1517  -help | --help | --hel | --he | -h)
1518    ac_init_help=long ;;
1519  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1520    ac_init_help=recursive ;;
1521  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1522    ac_init_help=short ;;
1523
1524  -host | --host | --hos | --ho)
1525    ac_prev=host_alias ;;
1526  -host=* | --host=* | --hos=* | --ho=*)
1527    host_alias=$ac_optarg ;;
1528
1529  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1530    ac_prev=htmldir ;;
1531  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1532  | --ht=*)
1533    htmldir=$ac_optarg ;;
1534
1535  -includedir | --includedir | --includedi | --included | --include \
1536  | --includ | --inclu | --incl | --inc)
1537    ac_prev=includedir ;;
1538  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1539  | --includ=* | --inclu=* | --incl=* | --inc=*)
1540    includedir=$ac_optarg ;;
1541
1542  -infodir | --infodir | --infodi | --infod | --info | --inf)
1543    ac_prev=infodir ;;
1544  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1545    infodir=$ac_optarg ;;
1546
1547  -libdir | --libdir | --libdi | --libd)
1548    ac_prev=libdir ;;
1549  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1550    libdir=$ac_optarg ;;
1551
1552  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1553  | --libexe | --libex | --libe)
1554    ac_prev=libexecdir ;;
1555  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1556  | --libexe=* | --libex=* | --libe=*)
1557    libexecdir=$ac_optarg ;;
1558
1559  -localedir | --localedir | --localedi | --localed | --locale)
1560    ac_prev=localedir ;;
1561  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1562    localedir=$ac_optarg ;;
1563
1564  -localstatedir | --localstatedir | --localstatedi | --localstated \
1565  | --localstate | --localstat | --localsta | --localst | --locals)
1566    ac_prev=localstatedir ;;
1567  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1568  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1569    localstatedir=$ac_optarg ;;
1570
1571  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1572    ac_prev=mandir ;;
1573  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1574    mandir=$ac_optarg ;;
1575
1576  -nfp | --nfp | --nf)
1577    # Obsolete; use --without-fp.
1578    with_fp=no ;;
1579
1580  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1581  | --no-cr | --no-c | -n)
1582    no_create=yes ;;
1583
1584  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1585  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1586    no_recursion=yes ;;
1587
1588  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1589  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1590  | --oldin | --oldi | --old | --ol | --o)
1591    ac_prev=oldincludedir ;;
1592  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1593  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1594  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1595    oldincludedir=$ac_optarg ;;
1596
1597  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1598    ac_prev=prefix ;;
1599  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1600    prefix=$ac_optarg ;;
1601
1602  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1603  | --program-pre | --program-pr | --program-p)
1604    ac_prev=program_prefix ;;
1605  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1606  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1607    program_prefix=$ac_optarg ;;
1608
1609  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1610  | --program-suf | --program-su | --program-s)
1611    ac_prev=program_suffix ;;
1612  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1613  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1614    program_suffix=$ac_optarg ;;
1615
1616  -program-transform-name | --program-transform-name \
1617  | --program-transform-nam | --program-transform-na \
1618  | --program-transform-n | --program-transform- \
1619  | --program-transform | --program-transfor \
1620  | --program-transfo | --program-transf \
1621  | --program-trans | --program-tran \
1622  | --progr-tra | --program-tr | --program-t)
1623    ac_prev=program_transform_name ;;
1624  -program-transform-name=* | --program-transform-name=* \
1625  | --program-transform-nam=* | --program-transform-na=* \
1626  | --program-transform-n=* | --program-transform-=* \
1627  | --program-transform=* | --program-transfor=* \
1628  | --program-transfo=* | --program-transf=* \
1629  | --program-trans=* | --program-tran=* \
1630  | --progr-tra=* | --program-tr=* | --program-t=*)
1631    program_transform_name=$ac_optarg ;;
1632
1633  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1634    ac_prev=pdfdir ;;
1635  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1636    pdfdir=$ac_optarg ;;
1637
1638  -psdir | --psdir | --psdi | --psd | --ps)
1639    ac_prev=psdir ;;
1640  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1641    psdir=$ac_optarg ;;
1642
1643  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1644  | -silent | --silent | --silen | --sile | --sil)
1645    silent=yes ;;
1646
1647  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1648    ac_prev=sbindir ;;
1649  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1650  | --sbi=* | --sb=*)
1651    sbindir=$ac_optarg ;;
1652
1653  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1654  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1655  | --sharedst | --shareds | --shared | --share | --shar \
1656  | --sha | --sh)
1657    ac_prev=sharedstatedir ;;
1658  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1659  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1660  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1661  | --sha=* | --sh=*)
1662    sharedstatedir=$ac_optarg ;;
1663
1664  -site | --site | --sit)
1665    ac_prev=site ;;
1666  -site=* | --site=* | --sit=*)
1667    site=$ac_optarg ;;
1668
1669  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1670    ac_prev=srcdir ;;
1671  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1672    srcdir=$ac_optarg ;;
1673
1674  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1675  | --syscon | --sysco | --sysc | --sys | --sy)
1676    ac_prev=sysconfdir ;;
1677  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1678  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1679    sysconfdir=$ac_optarg ;;
1680
1681  -target | --target | --targe | --targ | --tar | --ta | --t)
1682    ac_prev=target_alias ;;
1683  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1684    target_alias=$ac_optarg ;;
1685
1686  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1687    verbose=yes ;;
1688
1689  -version | --version | --versio | --versi | --vers | -V)
1690    ac_init_version=: ;;
1691
1692  -with-* | --with-*)
1693    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1694    # Reject names that are not valid shell variable names.
1695    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696      as_fn_error $? "invalid package name: $ac_useropt"
1697    ac_useropt_orig=$ac_useropt
1698    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699    case $ac_user_opts in
1700      *"
1701"with_$ac_useropt"
1702"*) ;;
1703      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1704	 ac_unrecognized_sep=', ';;
1705    esac
1706    eval with_$ac_useropt=\$ac_optarg ;;
1707
1708  -without-* | --without-*)
1709    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1710    # Reject names that are not valid shell variable names.
1711    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1712      as_fn_error $? "invalid package name: $ac_useropt"
1713    ac_useropt_orig=$ac_useropt
1714    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1715    case $ac_user_opts in
1716      *"
1717"with_$ac_useropt"
1718"*) ;;
1719      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1720	 ac_unrecognized_sep=', ';;
1721    esac
1722    eval with_$ac_useropt=no ;;
1723
1724  --x)
1725    # Obsolete; use --with-x.
1726    with_x=yes ;;
1727
1728  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1729  | --x-incl | --x-inc | --x-in | --x-i)
1730    ac_prev=x_includes ;;
1731  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1732  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1733    x_includes=$ac_optarg ;;
1734
1735  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1736  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1737    ac_prev=x_libraries ;;
1738  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1739  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1740    x_libraries=$ac_optarg ;;
1741
1742  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1743Try \`$0 --help' for more information"
1744    ;;
1745
1746  *=*)
1747    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1748    # Reject names that are not valid shell variable names.
1749    case $ac_envvar in #(
1750      '' | [0-9]* | *[!_$as_cr_alnum]* )
1751      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1752    esac
1753    eval $ac_envvar=\$ac_optarg
1754    export $ac_envvar ;;
1755
1756  *)
1757    # FIXME: should be removed in autoconf 3.0.
1758    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1759    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1760      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1761    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1762    ;;
1763
1764  esac
1765done
1766
1767if test -n "$ac_prev"; then
1768  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1769  as_fn_error $? "missing argument to $ac_option"
1770fi
1771
1772if test -n "$ac_unrecognized_opts"; then
1773  case $enable_option_checking in
1774    no) ;;
1775    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1776    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1777  esac
1778fi
1779
1780# Check all directory arguments for consistency.
1781for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1782		datadir sysconfdir sharedstatedir localstatedir includedir \
1783		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1784		libdir localedir mandir
1785do
1786  eval ac_val=\$$ac_var
1787  # Remove trailing slashes.
1788  case $ac_val in
1789    */ )
1790      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1791      eval $ac_var=\$ac_val;;
1792  esac
1793  # Be sure to have absolute directory names.
1794  case $ac_val in
1795    [\\/$]* | ?:[\\/]* )  continue;;
1796    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1797  esac
1798  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1799done
1800
1801# There might be people who depend on the old broken behavior: `$host'
1802# used to hold the argument of --host etc.
1803# FIXME: To remove some day.
1804build=$build_alias
1805host=$host_alias
1806target=$target_alias
1807
1808# FIXME: To remove some day.
1809if test "x$host_alias" != x; then
1810  if test "x$build_alias" = x; then
1811    cross_compiling=maybe
1812  elif test "x$build_alias" != "x$host_alias"; then
1813    cross_compiling=yes
1814  fi
1815fi
1816
1817ac_tool_prefix=
1818test -n "$host_alias" && ac_tool_prefix=$host_alias-
1819
1820test "$silent" = yes && exec 6>/dev/null
1821
1822
1823ac_pwd=`pwd` && test -n "$ac_pwd" &&
1824ac_ls_di=`ls -di .` &&
1825ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1826  as_fn_error $? "working directory cannot be determined"
1827test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1828  as_fn_error $? "pwd does not report name of working directory"
1829
1830
1831# Find the source files, if location was not specified.
1832if test -z "$srcdir"; then
1833  ac_srcdir_defaulted=yes
1834  # Try the directory containing this script, then the parent directory.
1835  ac_confdir=`$as_dirname -- "$as_myself" ||
1836$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1837	 X"$as_myself" : 'X\(//\)[^/]' \| \
1838	 X"$as_myself" : 'X\(//\)$' \| \
1839	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1840$as_echo X"$as_myself" |
1841    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\/\)[^/].*/{
1846	    s//\1/
1847	    q
1848	  }
1849	  /^X\(\/\/\)$/{
1850	    s//\1/
1851	    q
1852	  }
1853	  /^X\(\/\).*/{
1854	    s//\1/
1855	    q
1856	  }
1857	  s/.*/./; q'`
1858  srcdir=$ac_confdir
1859  if test ! -r "$srcdir/$ac_unique_file"; then
1860    srcdir=..
1861  fi
1862else
1863  ac_srcdir_defaulted=no
1864fi
1865if test ! -r "$srcdir/$ac_unique_file"; then
1866  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1867  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1868fi
1869ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1870ac_abs_confdir=`(
1871	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1872	pwd)`
1873# When building in place, set srcdir=.
1874if test "$ac_abs_confdir" = "$ac_pwd"; then
1875  srcdir=.
1876fi
1877# Remove unnecessary trailing slashes from srcdir.
1878# Double slashes in file names in object file debugging info
1879# mess up M-x gdb in Emacs.
1880case $srcdir in
1881*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1882esac
1883for ac_var in $ac_precious_vars; do
1884  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_env_${ac_var}_value=\$${ac_var}
1886  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1887  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1888done
1889
1890#
1891# Report the --help message.
1892#
1893if test "$ac_init_help" = "long"; then
1894  # Omit some internal or obsolete options to make the list less imposing.
1895  # This message is too long to be a string in the A/UX 3.1 sh.
1896  cat <<_ACEOF
1897\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1898
1899Usage: $0 [OPTION]... [VAR=VALUE]...
1900
1901To assign environment variables (e.g., CC, CFLAGS...), specify them as
1902VAR=VALUE.  See below for descriptions of some of the useful variables.
1903
1904Defaults for the options are specified in brackets.
1905
1906Configuration:
1907  -h, --help              display this help and exit
1908      --help=short        display options specific to this package
1909      --help=recursive    display the short help of all the included packages
1910  -V, --version           display version information and exit
1911  -q, --quiet, --silent   do not print \`checking ...' messages
1912      --cache-file=FILE   cache test results in FILE [disabled]
1913  -C, --config-cache      alias for \`--cache-file=config.cache'
1914  -n, --no-create         do not create output files
1915      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1916
1917Installation directories:
1918  --prefix=PREFIX         install architecture-independent files in PREFIX
1919                          [$ac_default_prefix]
1920  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1921                          [PREFIX]
1922
1923By default, \`make install' will install all the files in
1924\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1925an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1926for instance \`--prefix=\$HOME'.
1927
1928For better control, use the options below.
1929
1930Fine tuning of the installation directories:
1931  --bindir=DIR            user executables [EPREFIX/bin]
1932  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1933  --libexecdir=DIR        program executables [EPREFIX/libexec]
1934  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1935  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1936  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1937  --libdir=DIR            object code libraries [EPREFIX/lib]
1938  --includedir=DIR        C header files [PREFIX/include]
1939  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1940  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1941  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1942  --infodir=DIR           info documentation [DATAROOTDIR/info]
1943  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1944  --mandir=DIR            man documentation [DATAROOTDIR/man]
1945  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1946  --htmldir=DIR           html documentation [DOCDIR]
1947  --dvidir=DIR            dvi documentation [DOCDIR]
1948  --pdfdir=DIR            pdf documentation [DOCDIR]
1949  --psdir=DIR             ps documentation [DOCDIR]
1950_ACEOF
1951
1952  cat <<\_ACEOF
1953
1954X features:
1955  --x-includes=DIR    X include files are in DIR
1956  --x-libraries=DIR   X library files are in DIR
1957
1958System types:
1959  --build=BUILD     configure for building on BUILD [guessed]
1960  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1961  --target=TARGET   configure for building compilers for TARGET [HOST]
1962_ACEOF
1963fi
1964
1965if test -n "$ac_init_help"; then
1966  case $ac_init_help in
1967     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1968   esac
1969  cat <<\_ACEOF
1970
1971Optional Features:
1972  --disable-option-checking  ignore unrecognized --enable/--with options
1973  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1974  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1975  --enable-openjdk-only   suppress building custom source even if present
1976                          [disabled]
1977  --enable-debug          set the debug level to fastdebug (shorthand for
1978                          --with-debug-level=fastdebug) [disabled]
1979  --disable-headful       disable building headful support (graphical UI
1980                          support) [enabled]
1981  --enable-unlimited-crypto
1982                          Enable unlimited crypto policy [disabled]
1983  --disable-keep-packaged-modules
1984                          Do not keep packaged modules in jdk image [enable]
1985  --enable-static-build   enable static library build [disabled]
1986  --disable-warnings-as-errors
1987                          do not consider native warnings to be an error
1988                          [enabled]
1989  --enable-debug-symbols  Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --enable-zip-debug-info Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --enable-native-coverage
1994                          enable native compilation with code coverage
1995                          data[disabled]
1996  --enable-dtrace[=yes/no/auto]
1997                          enable dtrace. Default is auto, where dtrace is
1998                          enabled if all dependencies are present.
1999  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2000  --disable-freetype-bundling
2001                          disable bundling of the freetype library with the
2002                          build result [enabled on Windows or when using
2003                          --with-freetype, disabled otherwise]
2004  --enable-jtreg-failure-handler
2005                          forces build of the jtreg failure handler to be
2006                          enabled, missing dependencies become fatal errors.
2007                          Default is auto, where the failure handler is built
2008                          if all dependencies are present and otherwise just
2009                          disabled.
2010  --disable-generate-classlist
2011                          forces enabling or disabling of the generation of a
2012                          CDS classlist at build time. Default is to generate
2013                          it when either the server or client JVMs are built.
2014  --enable-sjavac         use sjavac to do fast incremental compiles
2015                          [disabled]
2016  --disable-javac-server  disable javac server [enabled]
2017  --enable-icecc          enable distribted compilation of native code using
2018                          icecc/icecream [disabled]
2019  --disable-precompiled-headers
2020                          disable using precompiled headers when compiling C++
2021                          [enabled]
2022  --enable-ccache         enable using ccache to speed up recompilations
2023                          [disabled]
2024
2025Optional Packages:
2026  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2027  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2028  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2029                          support it), e.g. --with-target-bits=32 [guessed]
2030  --with-custom-make-dir  Deprecated. Option is kept for backwards
2031                          compatibility and is ignored
2032  --with-jdk-variant      JDK variant to build (normal) [normal]
2033  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2034                          optimized) [release]
2035  --with-jvm-variants     JVM variants (separated by commas) to build
2036                          (server,client,minimal,core,zero,zeroshark,custom)
2037                          [server]
2038  --with-devkit           use this devkit for compilers, tools and resources
2039  --with-sys-root         alias for --with-sysroot for backwards compatability
2040  --with-sysroot          use this directory as sysroot
2041  --with-tools-dir        alias for --with-toolchain-path for backwards
2042                          compatibility
2043  --with-toolchain-path   prepend these directories when searching for
2044                          toolchain binaries (compilers etc)
2045  --with-extra-path       prepend these directories to the default path
2046  --with-sdk-name         use the platform SDK of the given name. [macosx]
2047  --with-conf-name        use this as the name of the configuration [generated
2048                          from important configuration options]
2049  --with-output-sync      set make output sync type if supported by make.
2050                          [recurse]
2051  --with-default-make-target
2052                          set the default make target [exploded-image]
2053  --with-cacerts-file     specify alternative cacerts file
2054  --with-copyright-year   Set copyright year value for build [current year]
2055  --with-milestone        Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-update-version   Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-user-release-suffix
2060                          Deprecated. Option is kept for backwards
2061                          compatibility and is ignored
2062  --with-build-number     Deprecated. Option is kept for backwards
2063                          compatibility and is ignored
2064  --with-version-string   Set version string [calculated]
2065  --with-version-pre      Set the base part of the version 'PRE' field
2066                          (pre-release identifier) ['internal']
2067  --with-version-opt      Set version 'OPT' field (build metadata)
2068                          [<timestamp>.<user>.<dirname>]
2069  --with-version-build    Set version 'BUILD' field (build number) [not
2070                          specified]
2071  --with-version-major    Set version 'MAJOR' field (first number) [current
2072                          source value]
2073  --with-version-minor    Set version 'MINOR' field (second number) [current
2074                          source value]
2075  --with-version-security Set version 'SECURITY' field (third number) [current
2076                          source value]
2077  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2078                          specified]
2079  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2080  --with-build-jdk        path to JDK of same version as is being built[the
2081                          newly built JDK]
2082  --with-add-source-root  Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-override-source-root
2085                          Deprecated. Option is kept for backwards
2086                          compatibility and is ignored
2087  --with-adds-and-overrides
2088                          Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-langtools
2091                          Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-corba   Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-jaxp    Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-jaxws   Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-hotspot Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-nashorn Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-jdk     Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-import-hotspot   import hotspot binaries from this jdk image or
2106                          hotspot build dist dir instead of building from
2107                          source
2108  --with-import-modules   import a set of prebuilt modules either as a zip
2109                          file or an exploded directory
2110  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2111                          to show possible values [platform dependent]
2112  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2113  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2114  --with-extra-ldflags    extra flags to be used when linking jdk
2115  --with-toolchain-version
2116                          the version of the toolchain to look for, use
2117                          '--help' to show possible values [platform
2118                          dependent]
2119  --with-build-devkit     Devkit to use for the build platform toolchain
2120  --with-jtreg            Regression Test Harness [probed]
2121  --with-native-debug-symbols
2122                          set the native debug symbol configuration (none,
2123                          internal, external, zipped) [varying]
2124  --with-jvm-features     additional JVM features to enable (separated by
2125                          comma), use '--help' to show possible values [none]
2126  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2127                          compatibility and is ignored
2128  --with-stdc++lib=<static>,<dynamic>,<default>
2129                          force linking of the C++ runtime on Linux to either
2130                          static or dynamic, default is static with dynamic as
2131                          fallback
2132  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2133                          (Windows only) [probed]
2134  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2135                          (Windows only) [probed]
2136  --with-x                use the X Window System
2137  --with-cups             specify prefix directory for the cups package
2138                          (expecting the headers under PATH/include)
2139  --with-cups-include     specify directory for the cups include files
2140  --with-freetype         specify prefix directory for the freetype package
2141                          (expecting the libraries under PATH/lib and the
2142                          headers under PATH/include)
2143  --with-freetype-include specify directory for the freetype include files
2144  --with-freetype-lib     specify directory for the freetype library
2145  --with-freetype-src     specify directory with freetype sources to
2146                          automatically build the library (experimental,
2147                          Windows-only)
2148  --with-alsa             specify prefix directory for the alsa package
2149                          (expecting the libraries under PATH/lib and the
2150                          headers under PATH/include)
2151  --with-alsa-include     specify directory for the alsa include files
2152  --with-alsa-lib         specify directory for the alsa library
2153  --with-libffi           specify prefix directory for the libffi package
2154                          (expecting the libraries under PATH/lib and the
2155                          headers under PATH/include)
2156  --with-libffi-include   specify directory for the libffi include files
2157  --with-libffi-lib       specify directory for the libffi library
2158  --with-libjpeg          use libjpeg from build system or OpenJDK source
2159                          (system, bundled) [bundled]
2160  --with-giflib           use giflib from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-libpng           use libpng from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-zlib             use zlib from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-lcms             use lcms2 from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-dxsdk            Deprecated. Option is kept for backwards
2169                          compatibility and is ignored
2170  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2171                          compatibility and is ignored
2172  --with-dxsdk-include    Deprecated. Option is kept for backwards
2173                          compatibility and is ignored
2174  --with-num-cores        number of cores in the build system, e.g.
2175                          --with-num-cores=8 [probed]
2176  --with-memory-size      memory (in MB) available in the build system, e.g.
2177                          --with-memory-size=1024 [probed]
2178  --with-jobs             number of parallel jobs to let make run [calculated
2179                          based on cores and memory]
2180  --with-test-jobs        number of parallel tests jobs to run [based on build
2181                          jobs]
2182  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2183                          invocations of boot JDK, overriding the default
2184                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2185                          -enableassertions"
2186  --with-sjavac-server-java
2187                          use this java binary for running the sjavac
2188                          background server [Boot JDK java]
2189  --with-ccache-dir       where to store ccache files [~/.ccache]
2190
2191Some influential environment variables:
2192  BASENAME    Override default value for BASENAME
2193  BASH        Override default value for BASH
2194  CAT         Override default value for CAT
2195  CHMOD       Override default value for CHMOD
2196  CMP         Override default value for CMP
2197  COMM        Override default value for COMM
2198  CP          Override default value for CP
2199  CUT         Override default value for CUT
2200  DATE        Override default value for DATE
2201  DIFF        Override default value for DIFF
2202  DIRNAME     Override default value for DIRNAME
2203  ECHO        Override default value for ECHO
2204  EXPR        Override default value for EXPR
2205  FILE        Override default value for FILE
2206  FIND        Override default value for FIND
2207  HEAD        Override default value for HEAD
2208  GUNZIP      Override default value for GUNZIP
2209  GZIP        Override default value for GZIP
2210  LN          Override default value for LN
2211  LS          Override default value for LS
2212  MKDIR       Override default value for MKDIR
2213  MKTEMP      Override default value for MKTEMP
2214  MV          Override default value for MV
2215  NAWK        Override default value for NAWK
2216  PRINTF      Override default value for PRINTF
2217  RM          Override default value for RM
2218  RMDIR       Override default value for RMDIR
2219  SH          Override default value for SH
2220  SORT        Override default value for SORT
2221  TAIL        Override default value for TAIL
2222  TAR         Override default value for TAR
2223  TEE         Override default value for TEE
2224  TOUCH       Override default value for TOUCH
2225  TR          Override default value for TR
2226  UNAME       Override default value for UNAME
2227  UNIQ        Override default value for UNIQ
2228  WC          Override default value for WC
2229  WHICH       Override default value for WHICH
2230  XARGS       Override default value for XARGS
2231  AWK         Override default value for AWK
2232  GREP        Override default value for GREP
2233  EGREP       Override default value for EGREP
2234  FGREP       Override default value for FGREP
2235  SED         Override default value for SED
2236  CYGPATH     Override default value for CYGPATH
2237  READLINK    Override default value for READLINK
2238  DF          Override default value for DF
2239  CPIO        Override default value for CPIO
2240  NICE        Override default value for NICE
2241  MAKE        Override default value for MAKE
2242  UNZIP       Override default value for UNZIP
2243  ZIP         Override default value for ZIP
2244  LDD         Override default value for LDD
2245  OTOOL       Override default value for OTOOL
2246  READELF     Override default value for READELF
2247  HG          Override default value for HG
2248  STAT        Override default value for STAT
2249  TIME        Override default value for TIME
2250  DTRACE      Override default value for DTRACE
2251  PATCH       Override default value for PATCH
2252  DSYMUTIL    Override default value for DSYMUTIL
2253  XATTR       Override default value for XATTR
2254  CODESIGN    Override default value for CODESIGN
2255  SETFILE     Override default value for SETFILE
2256  PKG_CONFIG  path to pkg-config utility
2257  JAVA        Override default value for JAVA
2258  JAVAC       Override default value for JAVAC
2259  JAVAH       Override default value for JAVAH
2260  JAR         Override default value for JAR
2261  JARSIGNER   Override default value for JARSIGNER
2262  CC          C compiler command
2263  CFLAGS      C compiler flags
2264  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2265              nonstandard directory <lib dir>
2266  LIBS        libraries to pass to the linker, e.g. -l<library>
2267  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2268              you have headers in a nonstandard directory <include dir>
2269  CXX         C++ compiler command
2270  CXXFLAGS    C++ compiler flags
2271  CPP         C preprocessor
2272  CXXCPP      C++ preprocessor
2273  AS          Override default value for AS
2274  AR          Override default value for AR
2275  LIPO        Override default value for LIPO
2276  STRIP       Override default value for STRIP
2277  NM          Override default value for NM
2278  GNM         Override default value for GNM
2279  OBJCOPY     Override default value for OBJCOPY
2280  OBJDUMP     Override default value for OBJDUMP
2281  BUILD_CC    Override default value for BUILD_CC
2282  BUILD_CXX   Override default value for BUILD_CXX
2283  BUILD_NM    Override default value for BUILD_NM
2284  BUILD_AR    Override default value for BUILD_AR
2285  BUILD_OBJCOPY
2286              Override default value for BUILD_OBJCOPY
2287  BUILD_STRIP Override default value for BUILD_STRIP
2288  JTREGEXE    Override default value for JTREGEXE
2289  XMKMF       Path to xmkmf, Makefile generator for X Window System
2290  FREETYPE_CFLAGS
2291              C compiler flags for FREETYPE, overriding pkg-config
2292  FREETYPE_LIBS
2293              linker flags for FREETYPE, overriding pkg-config
2294  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2295  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2296  LIBFFI_CFLAGS
2297              C compiler flags for LIBFFI, overriding pkg-config
2298  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2299  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2300  PNG_LIBS    linker flags for PNG, overriding pkg-config
2301  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2302  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2303  ICECC_CMD   Override default value for ICECC_CMD
2304  ICECC_CREATE_ENV
2305              Override default value for ICECC_CREATE_ENV
2306  ICECC_WRAPPER
2307              Override default value for ICECC_WRAPPER
2308  CCACHE      Override default value for CCACHE
2309
2310Use these variables to override the choices made by `configure' or to help
2311it to find libraries and programs with nonstandard names/locations.
2312
2313Report bugs to <build-dev@openjdk.java.net>.
2314OpenJDK home page: <http://openjdk.java.net>.
2315_ACEOF
2316ac_status=$?
2317fi
2318
2319if test "$ac_init_help" = "recursive"; then
2320  # If there are subdirs, report their specific --help.
2321  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2322    test -d "$ac_dir" ||
2323      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2324      continue
2325    ac_builddir=.
2326
2327case "$ac_dir" in
2328.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2329*)
2330  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2331  # A ".." for each directory in $ac_dir_suffix.
2332  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2333  case $ac_top_builddir_sub in
2334  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2335  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2336  esac ;;
2337esac
2338ac_abs_top_builddir=$ac_pwd
2339ac_abs_builddir=$ac_pwd$ac_dir_suffix
2340# for backward compatibility:
2341ac_top_builddir=$ac_top_build_prefix
2342
2343case $srcdir in
2344  .)  # We are building in place.
2345    ac_srcdir=.
2346    ac_top_srcdir=$ac_top_builddir_sub
2347    ac_abs_top_srcdir=$ac_pwd ;;
2348  [\\/]* | ?:[\\/]* )  # Absolute name.
2349    ac_srcdir=$srcdir$ac_dir_suffix;
2350    ac_top_srcdir=$srcdir
2351    ac_abs_top_srcdir=$srcdir ;;
2352  *) # Relative name.
2353    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2354    ac_top_srcdir=$ac_top_build_prefix$srcdir
2355    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2356esac
2357ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2358
2359    cd "$ac_dir" || { ac_status=$?; continue; }
2360    # Check for guested configure.
2361    if test -f "$ac_srcdir/configure.gnu"; then
2362      echo &&
2363      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2364    elif test -f "$ac_srcdir/configure"; then
2365      echo &&
2366      $SHELL "$ac_srcdir/configure" --help=recursive
2367    else
2368      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2369    fi || ac_status=$?
2370    cd "$ac_pwd" || { ac_status=$?; break; }
2371  done
2372fi
2373
2374test -n "$ac_init_help" && exit $ac_status
2375if $ac_init_version; then
2376  cat <<\_ACEOF
2377OpenJDK configure jdk9
2378generated by GNU Autoconf 2.69
2379
2380Copyright (C) 2012 Free Software Foundation, Inc.
2381This configure script is free software; the Free Software Foundation
2382gives unlimited permission to copy, distribute and modify it.
2383_ACEOF
2384  exit
2385fi
2386
2387## ------------------------ ##
2388## Autoconf initialization. ##
2389## ------------------------ ##
2390
2391# ac_fn_c_try_compile LINENO
2392# --------------------------
2393# Try to compile conftest.$ac_ext, and return whether this succeeded.
2394ac_fn_c_try_compile ()
2395{
2396  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2397  rm -f conftest.$ac_objext
2398  if { { ac_try="$ac_compile"
2399case "(($ac_try" in
2400  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2401  *) ac_try_echo=$ac_try;;
2402esac
2403eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2404$as_echo "$ac_try_echo"; } >&5
2405  (eval "$ac_compile") 2>conftest.err
2406  ac_status=$?
2407  if test -s conftest.err; then
2408    grep -v '^ *+' conftest.err >conftest.er1
2409    cat conftest.er1 >&5
2410    mv -f conftest.er1 conftest.err
2411  fi
2412  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2413  test $ac_status = 0; } && {
2414	 test -z "$ac_c_werror_flag" ||
2415	 test ! -s conftest.err
2416       } && test -s conftest.$ac_objext; then :
2417  ac_retval=0
2418else
2419  $as_echo "$as_me: failed program was:" >&5
2420sed 's/^/| /' conftest.$ac_ext >&5
2421
2422	ac_retval=1
2423fi
2424  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2425  as_fn_set_status $ac_retval
2426
2427} # ac_fn_c_try_compile
2428
2429# ac_fn_cxx_try_compile LINENO
2430# ----------------------------
2431# Try to compile conftest.$ac_ext, and return whether this succeeded.
2432ac_fn_cxx_try_compile ()
2433{
2434  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2435  rm -f conftest.$ac_objext
2436  if { { ac_try="$ac_compile"
2437case "(($ac_try" in
2438  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2439  *) ac_try_echo=$ac_try;;
2440esac
2441eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2442$as_echo "$ac_try_echo"; } >&5
2443  (eval "$ac_compile") 2>conftest.err
2444  ac_status=$?
2445  if test -s conftest.err; then
2446    grep -v '^ *+' conftest.err >conftest.er1
2447    cat conftest.er1 >&5
2448    mv -f conftest.er1 conftest.err
2449  fi
2450  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2451  test $ac_status = 0; } && {
2452	 test -z "$ac_cxx_werror_flag" ||
2453	 test ! -s conftest.err
2454       } && test -s conftest.$ac_objext; then :
2455  ac_retval=0
2456else
2457  $as_echo "$as_me: failed program was:" >&5
2458sed 's/^/| /' conftest.$ac_ext >&5
2459
2460	ac_retval=1
2461fi
2462  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2463  as_fn_set_status $ac_retval
2464
2465} # ac_fn_cxx_try_compile
2466
2467# ac_fn_c_try_cpp LINENO
2468# ----------------------
2469# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2470ac_fn_c_try_cpp ()
2471{
2472  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2473  if { { ac_try="$ac_cpp conftest.$ac_ext"
2474case "(($ac_try" in
2475  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2476  *) ac_try_echo=$ac_try;;
2477esac
2478eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2479$as_echo "$ac_try_echo"; } >&5
2480  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2481  ac_status=$?
2482  if test -s conftest.err; then
2483    grep -v '^ *+' conftest.err >conftest.er1
2484    cat conftest.er1 >&5
2485    mv -f conftest.er1 conftest.err
2486  fi
2487  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2488  test $ac_status = 0; } > conftest.i && {
2489	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2490	 test ! -s conftest.err
2491       }; then :
2492  ac_retval=0
2493else
2494  $as_echo "$as_me: failed program was:" >&5
2495sed 's/^/| /' conftest.$ac_ext >&5
2496
2497    ac_retval=1
2498fi
2499  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2500  as_fn_set_status $ac_retval
2501
2502} # ac_fn_c_try_cpp
2503
2504# ac_fn_cxx_try_cpp LINENO
2505# ------------------------
2506# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2507ac_fn_cxx_try_cpp ()
2508{
2509  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2510  if { { ac_try="$ac_cpp conftest.$ac_ext"
2511case "(($ac_try" in
2512  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2513  *) ac_try_echo=$ac_try;;
2514esac
2515eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2516$as_echo "$ac_try_echo"; } >&5
2517  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2518  ac_status=$?
2519  if test -s conftest.err; then
2520    grep -v '^ *+' conftest.err >conftest.er1
2521    cat conftest.er1 >&5
2522    mv -f conftest.er1 conftest.err
2523  fi
2524  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2525  test $ac_status = 0; } > conftest.i && {
2526	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2527	 test ! -s conftest.err
2528       }; then :
2529  ac_retval=0
2530else
2531  $as_echo "$as_me: failed program was:" >&5
2532sed 's/^/| /' conftest.$ac_ext >&5
2533
2534    ac_retval=1
2535fi
2536  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2537  as_fn_set_status $ac_retval
2538
2539} # ac_fn_cxx_try_cpp
2540
2541# ac_fn_c_try_link LINENO
2542# -----------------------
2543# Try to link conftest.$ac_ext, and return whether this succeeded.
2544ac_fn_c_try_link ()
2545{
2546  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2547  rm -f conftest.$ac_objext conftest$ac_exeext
2548  if { { ac_try="$ac_link"
2549case "(($ac_try" in
2550  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2551  *) ac_try_echo=$ac_try;;
2552esac
2553eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2554$as_echo "$ac_try_echo"; } >&5
2555  (eval "$ac_link") 2>conftest.err
2556  ac_status=$?
2557  if test -s conftest.err; then
2558    grep -v '^ *+' conftest.err >conftest.er1
2559    cat conftest.er1 >&5
2560    mv -f conftest.er1 conftest.err
2561  fi
2562  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2563  test $ac_status = 0; } && {
2564	 test -z "$ac_c_werror_flag" ||
2565	 test ! -s conftest.err
2566       } && test -s conftest$ac_exeext && {
2567	 test "$cross_compiling" = yes ||
2568	 test -x conftest$ac_exeext
2569       }; then :
2570  ac_retval=0
2571else
2572  $as_echo "$as_me: failed program was:" >&5
2573sed 's/^/| /' conftest.$ac_ext >&5
2574
2575	ac_retval=1
2576fi
2577  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2578  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2579  # interfere with the next link command; also delete a directory that is
2580  # left behind by Apple's compiler.  We do this before executing the actions.
2581  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2582  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2583  as_fn_set_status $ac_retval
2584
2585} # ac_fn_c_try_link
2586
2587# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2588# ---------------------------------------------------------
2589# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2590# the include files in INCLUDES and setting the cache variable VAR
2591# accordingly.
2592ac_fn_cxx_check_header_mongrel ()
2593{
2594  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595  if eval \${$3+:} false; then :
2596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2597$as_echo_n "checking for $2... " >&6; }
2598if eval \${$3+:} false; then :
2599  $as_echo_n "(cached) " >&6
2600fi
2601eval ac_res=\$$3
2602	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2603$as_echo "$ac_res" >&6; }
2604else
2605  # Is the header compilable?
2606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2607$as_echo_n "checking $2 usability... " >&6; }
2608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2609/* end confdefs.h.  */
2610$4
2611#include <$2>
2612_ACEOF
2613if ac_fn_cxx_try_compile "$LINENO"; then :
2614  ac_header_compiler=yes
2615else
2616  ac_header_compiler=no
2617fi
2618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2620$as_echo "$ac_header_compiler" >&6; }
2621
2622# Is the header present?
2623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2624$as_echo_n "checking $2 presence... " >&6; }
2625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2626/* end confdefs.h.  */
2627#include <$2>
2628_ACEOF
2629if ac_fn_cxx_try_cpp "$LINENO"; then :
2630  ac_header_preproc=yes
2631else
2632  ac_header_preproc=no
2633fi
2634rm -f conftest.err conftest.i conftest.$ac_ext
2635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2636$as_echo "$ac_header_preproc" >&6; }
2637
2638# So?  What about this header?
2639case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2640  yes:no: )
2641    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2642$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2644$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2645    ;;
2646  no:yes:* )
2647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2648$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2650$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2652$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2653    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2654$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2656$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2657( $as_echo "## ----------------------------------------- ##
2658## Report this to build-dev@openjdk.java.net ##
2659## ----------------------------------------- ##"
2660     ) | sed "s/^/$as_me: WARNING:     /" >&2
2661    ;;
2662esac
2663  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2664$as_echo_n "checking for $2... " >&6; }
2665if eval \${$3+:} false; then :
2666  $as_echo_n "(cached) " >&6
2667else
2668  eval "$3=\$ac_header_compiler"
2669fi
2670eval ac_res=\$$3
2671	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2672$as_echo "$ac_res" >&6; }
2673fi
2674  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2675
2676} # ac_fn_cxx_check_header_mongrel
2677
2678# ac_fn_cxx_try_run LINENO
2679# ------------------------
2680# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2681# that executables *can* be run.
2682ac_fn_cxx_try_run ()
2683{
2684  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2685  if { { ac_try="$ac_link"
2686case "(($ac_try" in
2687  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2688  *) ac_try_echo=$ac_try;;
2689esac
2690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2691$as_echo "$ac_try_echo"; } >&5
2692  (eval "$ac_link") 2>&5
2693  ac_status=$?
2694  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2695  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2696  { { case "(($ac_try" in
2697  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2698  *) ac_try_echo=$ac_try;;
2699esac
2700eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2701$as_echo "$ac_try_echo"; } >&5
2702  (eval "$ac_try") 2>&5
2703  ac_status=$?
2704  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2705  test $ac_status = 0; }; }; then :
2706  ac_retval=0
2707else
2708  $as_echo "$as_me: program exited with status $ac_status" >&5
2709       $as_echo "$as_me: failed program was:" >&5
2710sed 's/^/| /' conftest.$ac_ext >&5
2711
2712       ac_retval=$ac_status
2713fi
2714  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2715  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2716  as_fn_set_status $ac_retval
2717
2718} # ac_fn_cxx_try_run
2719
2720# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2721# ---------------------------------------------------------
2722# Tests whether HEADER exists and can be compiled using the include files in
2723# INCLUDES, setting the cache variable VAR accordingly.
2724ac_fn_cxx_check_header_compile ()
2725{
2726  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2728$as_echo_n "checking for $2... " >&6; }
2729if eval \${$3+:} false; then :
2730  $as_echo_n "(cached) " >&6
2731else
2732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2733/* end confdefs.h.  */
2734$4
2735#include <$2>
2736_ACEOF
2737if ac_fn_cxx_try_compile "$LINENO"; then :
2738  eval "$3=yes"
2739else
2740  eval "$3=no"
2741fi
2742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2743fi
2744eval ac_res=\$$3
2745	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2746$as_echo "$ac_res" >&6; }
2747  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2748
2749} # ac_fn_cxx_check_header_compile
2750
2751# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2752# ----------------------------------------------
2753# Tries to find the compile-time value of EXPR in a program that includes
2754# INCLUDES, setting VAR accordingly. Returns whether the value could be
2755# computed
2756ac_fn_cxx_compute_int ()
2757{
2758  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2759  if test "$cross_compiling" = yes; then
2760    # Depending upon the size, compute the lo and hi bounds.
2761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2762/* end confdefs.h.  */
2763$4
2764int
2765main ()
2766{
2767static int test_array [1 - 2 * !(($2) >= 0)];
2768test_array [0] = 0;
2769return test_array [0];
2770
2771  ;
2772  return 0;
2773}
2774_ACEOF
2775if ac_fn_cxx_try_compile "$LINENO"; then :
2776  ac_lo=0 ac_mid=0
2777  while :; do
2778    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2779/* end confdefs.h.  */
2780$4
2781int
2782main ()
2783{
2784static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2785test_array [0] = 0;
2786return test_array [0];
2787
2788  ;
2789  return 0;
2790}
2791_ACEOF
2792if ac_fn_cxx_try_compile "$LINENO"; then :
2793  ac_hi=$ac_mid; break
2794else
2795  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2796			if test $ac_lo -le $ac_mid; then
2797			  ac_lo= ac_hi=
2798			  break
2799			fi
2800			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2801fi
2802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2803  done
2804else
2805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2806/* end confdefs.h.  */
2807$4
2808int
2809main ()
2810{
2811static int test_array [1 - 2 * !(($2) < 0)];
2812test_array [0] = 0;
2813return test_array [0];
2814
2815  ;
2816  return 0;
2817}
2818_ACEOF
2819if ac_fn_cxx_try_compile "$LINENO"; then :
2820  ac_hi=-1 ac_mid=-1
2821  while :; do
2822    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2823/* end confdefs.h.  */
2824$4
2825int
2826main ()
2827{
2828static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2829test_array [0] = 0;
2830return test_array [0];
2831
2832  ;
2833  return 0;
2834}
2835_ACEOF
2836if ac_fn_cxx_try_compile "$LINENO"; then :
2837  ac_lo=$ac_mid; break
2838else
2839  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2840			if test $ac_mid -le $ac_hi; then
2841			  ac_lo= ac_hi=
2842			  break
2843			fi
2844			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2845fi
2846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2847  done
2848else
2849  ac_lo= ac_hi=
2850fi
2851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2852fi
2853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2854# Binary search between lo and hi bounds.
2855while test "x$ac_lo" != "x$ac_hi"; do
2856  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2857  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2858/* end confdefs.h.  */
2859$4
2860int
2861main ()
2862{
2863static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2864test_array [0] = 0;
2865return test_array [0];
2866
2867  ;
2868  return 0;
2869}
2870_ACEOF
2871if ac_fn_cxx_try_compile "$LINENO"; then :
2872  ac_hi=$ac_mid
2873else
2874  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2875fi
2876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2877done
2878case $ac_lo in #((
2879?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2880'') ac_retval=1 ;;
2881esac
2882  else
2883    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2884/* end confdefs.h.  */
2885$4
2886static long int longval () { return $2; }
2887static unsigned long int ulongval () { return $2; }
2888#include <stdio.h>
2889#include <stdlib.h>
2890int
2891main ()
2892{
2893
2894  FILE *f = fopen ("conftest.val", "w");
2895  if (! f)
2896    return 1;
2897  if (($2) < 0)
2898    {
2899      long int i = longval ();
2900      if (i != ($2))
2901	return 1;
2902      fprintf (f, "%ld", i);
2903    }
2904  else
2905    {
2906      unsigned long int i = ulongval ();
2907      if (i != ($2))
2908	return 1;
2909      fprintf (f, "%lu", i);
2910    }
2911  /* Do not output a trailing newline, as this causes \r\n confusion
2912     on some platforms.  */
2913  return ferror (f) || fclose (f) != 0;
2914
2915  ;
2916  return 0;
2917}
2918_ACEOF
2919if ac_fn_cxx_try_run "$LINENO"; then :
2920  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2921else
2922  ac_retval=1
2923fi
2924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2925  conftest.$ac_objext conftest.beam conftest.$ac_ext
2926rm -f conftest.val
2927
2928  fi
2929  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2930  as_fn_set_status $ac_retval
2931
2932} # ac_fn_cxx_compute_int
2933
2934# ac_fn_cxx_try_link LINENO
2935# -------------------------
2936# Try to link conftest.$ac_ext, and return whether this succeeded.
2937ac_fn_cxx_try_link ()
2938{
2939  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2940  rm -f conftest.$ac_objext conftest$ac_exeext
2941  if { { ac_try="$ac_link"
2942case "(($ac_try" in
2943  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2944  *) ac_try_echo=$ac_try;;
2945esac
2946eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2947$as_echo "$ac_try_echo"; } >&5
2948  (eval "$ac_link") 2>conftest.err
2949  ac_status=$?
2950  if test -s conftest.err; then
2951    grep -v '^ *+' conftest.err >conftest.er1
2952    cat conftest.er1 >&5
2953    mv -f conftest.er1 conftest.err
2954  fi
2955  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2956  test $ac_status = 0; } && {
2957	 test -z "$ac_cxx_werror_flag" ||
2958	 test ! -s conftest.err
2959       } && test -s conftest$ac_exeext && {
2960	 test "$cross_compiling" = yes ||
2961	 test -x conftest$ac_exeext
2962       }; then :
2963  ac_retval=0
2964else
2965  $as_echo "$as_me: failed program was:" >&5
2966sed 's/^/| /' conftest.$ac_ext >&5
2967
2968	ac_retval=1
2969fi
2970  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2971  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2972  # interfere with the next link command; also delete a directory that is
2973  # left behind by Apple's compiler.  We do this before executing the actions.
2974  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2975  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2976  as_fn_set_status $ac_retval
2977
2978} # ac_fn_cxx_try_link
2979
2980# ac_fn_cxx_check_func LINENO FUNC VAR
2981# ------------------------------------
2982# Tests whether FUNC exists, setting the cache variable VAR accordingly
2983ac_fn_cxx_check_func ()
2984{
2985  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2986  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2987$as_echo_n "checking for $2... " >&6; }
2988if eval \${$3+:} false; then :
2989  $as_echo_n "(cached) " >&6
2990else
2991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2992/* end confdefs.h.  */
2993/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2994   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2995#define $2 innocuous_$2
2996
2997/* System header to define __stub macros and hopefully few prototypes,
2998    which can conflict with char $2 (); below.
2999    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3000    <limits.h> exists even on freestanding compilers.  */
3001
3002#ifdef __STDC__
3003# include <limits.h>
3004#else
3005# include <assert.h>
3006#endif
3007
3008#undef $2
3009
3010/* Override any GCC internal prototype to avoid an error.
3011   Use char because int might match the return type of a GCC
3012   builtin and then its argument prototype would still apply.  */
3013#ifdef __cplusplus
3014extern "C"
3015#endif
3016char $2 ();
3017/* The GNU C library defines this for functions which it implements
3018    to always fail with ENOSYS.  Some functions are actually named
3019    something starting with __ and the normal name is an alias.  */
3020#if defined __stub_$2 || defined __stub___$2
3021choke me
3022#endif
3023
3024int
3025main ()
3026{
3027return $2 ();
3028  ;
3029  return 0;
3030}
3031_ACEOF
3032if ac_fn_cxx_try_link "$LINENO"; then :
3033  eval "$3=yes"
3034else
3035  eval "$3=no"
3036fi
3037rm -f core conftest.err conftest.$ac_objext \
3038    conftest$ac_exeext conftest.$ac_ext
3039fi
3040eval ac_res=\$$3
3041	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3042$as_echo "$ac_res" >&6; }
3043  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3044
3045} # ac_fn_cxx_check_func
3046
3047# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3048# -------------------------------------------------------
3049# Tests whether HEADER exists and can be compiled using the include files in
3050# INCLUDES, setting the cache variable VAR accordingly.
3051ac_fn_c_check_header_compile ()
3052{
3053  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3055$as_echo_n "checking for $2... " >&6; }
3056if eval \${$3+:} false; then :
3057  $as_echo_n "(cached) " >&6
3058else
3059  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3060/* end confdefs.h.  */
3061$4
3062#include <$2>
3063_ACEOF
3064if ac_fn_c_try_compile "$LINENO"; then :
3065  eval "$3=yes"
3066else
3067  eval "$3=no"
3068fi
3069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3070fi
3071eval ac_res=\$$3
3072	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3073$as_echo "$ac_res" >&6; }
3074  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3075
3076} # ac_fn_c_check_header_compile
3077cat >config.log <<_ACEOF
3078This file contains any messages produced by compilers while
3079running configure, to aid debugging if configure makes a mistake.
3080
3081It was created by OpenJDK $as_me jdk9, which was
3082generated by GNU Autoconf 2.69.  Invocation command line was
3083
3084  $ $0 $@
3085
3086_ACEOF
3087exec 5>>config.log
3088{
3089cat <<_ASUNAME
3090## --------- ##
3091## Platform. ##
3092## --------- ##
3093
3094hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3095uname -m = `(uname -m) 2>/dev/null || echo unknown`
3096uname -r = `(uname -r) 2>/dev/null || echo unknown`
3097uname -s = `(uname -s) 2>/dev/null || echo unknown`
3098uname -v = `(uname -v) 2>/dev/null || echo unknown`
3099
3100/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3101/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3102
3103/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3104/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3105/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3106/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3107/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3108/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3109/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3110
3111_ASUNAME
3112
3113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3114for as_dir in $PATH
3115do
3116  IFS=$as_save_IFS
3117  test -z "$as_dir" && as_dir=.
3118    $as_echo "PATH: $as_dir"
3119  done
3120IFS=$as_save_IFS
3121
3122} >&5
3123
3124cat >&5 <<_ACEOF
3125
3126
3127## ----------- ##
3128## Core tests. ##
3129## ----------- ##
3130
3131_ACEOF
3132
3133
3134# Keep a trace of the command line.
3135# Strip out --no-create and --no-recursion so they do not pile up.
3136# Strip out --silent because we don't want to record it for future runs.
3137# Also quote any args containing shell meta-characters.
3138# Make two passes to allow for proper duplicate-argument suppression.
3139ac_configure_args=
3140ac_configure_args0=
3141ac_configure_args1=
3142ac_must_keep_next=false
3143for ac_pass in 1 2
3144do
3145  for ac_arg
3146  do
3147    case $ac_arg in
3148    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3149    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3150    | -silent | --silent | --silen | --sile | --sil)
3151      continue ;;
3152    *\'*)
3153      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3154    esac
3155    case $ac_pass in
3156    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3157    2)
3158      as_fn_append ac_configure_args1 " '$ac_arg'"
3159      if test $ac_must_keep_next = true; then
3160	ac_must_keep_next=false # Got value, back to normal.
3161      else
3162	case $ac_arg in
3163	  *=* | --config-cache | -C | -disable-* | --disable-* \
3164	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3165	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3166	  | -with-* | --with-* | -without-* | --without-* | --x)
3167	    case "$ac_configure_args0 " in
3168	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3169	    esac
3170	    ;;
3171	  -* ) ac_must_keep_next=true ;;
3172	esac
3173      fi
3174      as_fn_append ac_configure_args " '$ac_arg'"
3175      ;;
3176    esac
3177  done
3178done
3179{ ac_configure_args0=; unset ac_configure_args0;}
3180{ ac_configure_args1=; unset ac_configure_args1;}
3181
3182# When interrupted or exit'd, cleanup temporary files, and complete
3183# config.log.  We remove comments because anyway the quotes in there
3184# would cause problems or look ugly.
3185# WARNING: Use '\'' to represent an apostrophe within the trap.
3186# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3187trap 'exit_status=$?
3188  # Save into config.log some information that might help in debugging.
3189  {
3190    echo
3191
3192    $as_echo "## ---------------- ##
3193## Cache variables. ##
3194## ---------------- ##"
3195    echo
3196    # The following way of writing the cache mishandles newlines in values,
3197(
3198  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3199    eval ac_val=\$$ac_var
3200    case $ac_val in #(
3201    *${as_nl}*)
3202      case $ac_var in #(
3203      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3204$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3205      esac
3206      case $ac_var in #(
3207      _ | IFS | as_nl) ;; #(
3208      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3209      *) { eval $ac_var=; unset $ac_var;} ;;
3210      esac ;;
3211    esac
3212  done
3213  (set) 2>&1 |
3214    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3215    *${as_nl}ac_space=\ *)
3216      sed -n \
3217	"s/'\''/'\''\\\\'\'''\''/g;
3218	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3219      ;; #(
3220    *)
3221      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3222      ;;
3223    esac |
3224    sort
3225)
3226    echo
3227
3228    $as_echo "## ----------------- ##
3229## Output variables. ##
3230## ----------------- ##"
3231    echo
3232    for ac_var in $ac_subst_vars
3233    do
3234      eval ac_val=\$$ac_var
3235      case $ac_val in
3236      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3237      esac
3238      $as_echo "$ac_var='\''$ac_val'\''"
3239    done | sort
3240    echo
3241
3242    if test -n "$ac_subst_files"; then
3243      $as_echo "## ------------------- ##
3244## File substitutions. ##
3245## ------------------- ##"
3246      echo
3247      for ac_var in $ac_subst_files
3248      do
3249	eval ac_val=\$$ac_var
3250	case $ac_val in
3251	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3252	esac
3253	$as_echo "$ac_var='\''$ac_val'\''"
3254      done | sort
3255      echo
3256    fi
3257
3258    if test -s confdefs.h; then
3259      $as_echo "## ----------- ##
3260## confdefs.h. ##
3261## ----------- ##"
3262      echo
3263      cat confdefs.h
3264      echo
3265    fi
3266    test "$ac_signal" != 0 &&
3267      $as_echo "$as_me: caught signal $ac_signal"
3268    $as_echo "$as_me: exit $exit_status"
3269  } >&5
3270  rm -f core *.core core.conftest.* &&
3271    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3272    exit $exit_status
3273' 0
3274for ac_signal in 1 2 13 15; do
3275  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3276done
3277ac_signal=0
3278
3279# confdefs.h avoids OS command line length limits that DEFS can exceed.
3280rm -f -r conftest* confdefs.h
3281
3282$as_echo "/* confdefs.h */" > confdefs.h
3283
3284# Predefined preprocessor variables.
3285
3286cat >>confdefs.h <<_ACEOF
3287#define PACKAGE_NAME "$PACKAGE_NAME"
3288_ACEOF
3289
3290cat >>confdefs.h <<_ACEOF
3291#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3292_ACEOF
3293
3294cat >>confdefs.h <<_ACEOF
3295#define PACKAGE_VERSION "$PACKAGE_VERSION"
3296_ACEOF
3297
3298cat >>confdefs.h <<_ACEOF
3299#define PACKAGE_STRING "$PACKAGE_STRING"
3300_ACEOF
3301
3302cat >>confdefs.h <<_ACEOF
3303#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3304_ACEOF
3305
3306cat >>confdefs.h <<_ACEOF
3307#define PACKAGE_URL "$PACKAGE_URL"
3308_ACEOF
3309
3310
3311# Let the site file select an alternate cache file if it wants to.
3312# Prefer an explicitly selected file to automatically selected ones.
3313ac_site_file1=NONE
3314ac_site_file2=NONE
3315if test -n "$CONFIG_SITE"; then
3316  # We do not want a PATH search for config.site.
3317  case $CONFIG_SITE in #((
3318    -*)  ac_site_file1=./$CONFIG_SITE;;
3319    */*) ac_site_file1=$CONFIG_SITE;;
3320    *)   ac_site_file1=./$CONFIG_SITE;;
3321  esac
3322elif test "x$prefix" != xNONE; then
3323  ac_site_file1=$prefix/share/config.site
3324  ac_site_file2=$prefix/etc/config.site
3325else
3326  ac_site_file1=$ac_default_prefix/share/config.site
3327  ac_site_file2=$ac_default_prefix/etc/config.site
3328fi
3329for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3330do
3331  test "x$ac_site_file" = xNONE && continue
3332  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3333    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3334$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3335    sed 's/^/| /' "$ac_site_file" >&5
3336    . "$ac_site_file" \
3337      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3338$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3339as_fn_error $? "failed to load site script $ac_site_file
3340See \`config.log' for more details" "$LINENO" 5; }
3341  fi
3342done
3343
3344if test -r "$cache_file"; then
3345  # Some versions of bash will fail to source /dev/null (special files
3346  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3347  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3348    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3349$as_echo "$as_me: loading cache $cache_file" >&6;}
3350    case $cache_file in
3351      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3352      *)                      . "./$cache_file";;
3353    esac
3354  fi
3355else
3356  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3357$as_echo "$as_me: creating cache $cache_file" >&6;}
3358  >$cache_file
3359fi
3360
3361# Check that the precious variables saved in the cache have kept the same
3362# value.
3363ac_cache_corrupted=false
3364for ac_var in $ac_precious_vars; do
3365  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3366  eval ac_new_set=\$ac_env_${ac_var}_set
3367  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3368  eval ac_new_val=\$ac_env_${ac_var}_value
3369  case $ac_old_set,$ac_new_set in
3370    set,)
3371      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3372$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3373      ac_cache_corrupted=: ;;
3374    ,set)
3375      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3376$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3377      ac_cache_corrupted=: ;;
3378    ,);;
3379    *)
3380      if test "x$ac_old_val" != "x$ac_new_val"; then
3381	# differences in whitespace do not lead to failure.
3382	ac_old_val_w=`echo x $ac_old_val`
3383	ac_new_val_w=`echo x $ac_new_val`
3384	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3385	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3386$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3387	  ac_cache_corrupted=:
3388	else
3389	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3390$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3391	  eval $ac_var=\$ac_old_val
3392	fi
3393	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3394$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3395	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3396$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3397      fi;;
3398  esac
3399  # Pass precious variables to config.status.
3400  if test "$ac_new_set" = set; then
3401    case $ac_new_val in
3402    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3403    *) ac_arg=$ac_var=$ac_new_val ;;
3404    esac
3405    case " $ac_configure_args " in
3406      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3407      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3408    esac
3409  fi
3410done
3411if $ac_cache_corrupted; then
3412  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3414  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3415$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3416  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3417fi
3418## -------------------- ##
3419## Main body of script. ##
3420## -------------------- ##
3421
3422ac_ext=c
3423ac_cpp='$CPP $CPPFLAGS'
3424ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3425ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3426ac_compiler_gnu=$ac_cv_c_compiler_gnu
3427
3428
3429
3430ac_aux_dir=
3431for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3432  if test -f "$ac_dir/install-sh"; then
3433    ac_aux_dir=$ac_dir
3434    ac_install_sh="$ac_aux_dir/install-sh -c"
3435    break
3436  elif test -f "$ac_dir/install.sh"; then
3437    ac_aux_dir=$ac_dir
3438    ac_install_sh="$ac_aux_dir/install.sh -c"
3439    break
3440  elif test -f "$ac_dir/shtool"; then
3441    ac_aux_dir=$ac_dir
3442    ac_install_sh="$ac_aux_dir/shtool install -c"
3443    break
3444  fi
3445done
3446if test -z "$ac_aux_dir"; then
3447  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
3448fi
3449
3450# These three variables are undocumented and unsupported,
3451# and are intended to be withdrawn in a future Autoconf release.
3452# They can cause serious problems if a builder's source tree is in a directory
3453# whose full name contains unusual characters.
3454ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3455ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3456ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3457
3458
3459# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3460
3461#
3462# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3463# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3464#
3465# This code is free software; you can redistribute it and/or modify it
3466# under the terms of the GNU General Public License version 2 only, as
3467# published by the Free Software Foundation.  Oracle designates this
3468# particular file as subject to the "Classpath" exception as provided
3469# by Oracle in the LICENSE file that accompanied this code.
3470#
3471# This code is distributed in the hope that it will be useful, but WITHOUT
3472# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3473# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3474# version 2 for more details (a copy is included in the LICENSE file that
3475# accompanied this code).
3476#
3477# You should have received a copy of the GNU General Public License version
3478# 2 along with this work; if not, write to the Free Software Foundation,
3479# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3480#
3481# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3482# or visit www.oracle.com if you need additional information or have any
3483# questions.
3484#
3485
3486#
3487# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3488#
3489# This program is free software; you can redistribute it and/or modify
3490# it under the terms of the GNU General Public License as published by
3491# the Free Software Foundation; either version 2 of the License, or
3492# (at your option) any later version.
3493#
3494# This program is distributed in the hope that it will be useful, but
3495# WITHOUT ANY WARRANTY; without even the implied warranty of
3496# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3497# General Public License for more details.
3498#
3499# You should have received a copy of the GNU General Public License
3500# along with this program; if not, write to the Free Software
3501# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3502#
3503# As a special exception to the GNU General Public License, if you
3504# distribute this file as part of a program that contains a
3505# configuration script generated by Autoconf, you may include it under
3506# the same distribution terms that you use for the rest of that program.
3507
3508# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3509# ----------------------------------
3510# PKG_PROG_PKG_CONFIG
3511
3512# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3513#
3514# Check to see whether a particular set of modules exists.  Similar
3515# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3516#
3517#
3518# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3519# this or PKG_CHECK_MODULES is called, or make sure to call
3520# PKG_CHECK_EXISTS manually
3521# --------------------------------------------------------------
3522
3523
3524
3525# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3526# ---------------------------------------------
3527# _PKG_CONFIG
3528
3529# _PKG_SHORT_ERRORS_SUPPORTED
3530# -----------------------------
3531# _PKG_SHORT_ERRORS_SUPPORTED
3532
3533
3534# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3535# [ACTION-IF-NOT-FOUND])
3536#
3537#
3538# Note that if there is a possibility the first call to
3539# PKG_CHECK_MODULES might not happen, you should be sure to include an
3540# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3541#
3542#
3543# --------------------------------------------------------------
3544# PKG_CHECK_MODULES
3545
3546
3547# Include these first...
3548#
3549# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3550# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3551#
3552# This code is free software; you can redistribute it and/or modify it
3553# under the terms of the GNU General Public License version 2 only, as
3554# published by the Free Software Foundation.  Oracle designates this
3555# particular file as subject to the "Classpath" exception as provided
3556# by Oracle in the LICENSE file that accompanied this code.
3557#
3558# This code is distributed in the hope that it will be useful, but WITHOUT
3559# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3560# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3561# version 2 for more details (a copy is included in the LICENSE file that
3562# accompanied this code).
3563#
3564# You should have received a copy of the GNU General Public License version
3565# 2 along with this work; if not, write to the Free Software Foundation,
3566# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3567#
3568# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3569# or visit www.oracle.com if you need additional information or have any
3570# questions.
3571#
3572
3573# Create a function/macro that takes a series of named arguments. The call is
3574# similar to AC_DEFUN, but the setup of the function looks like this:
3575# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3576# ... do something
3577#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3578# ])
3579# A star (*) in front of a named argument means that it is required and it's
3580# presence will be verified. To pass e.g. the first value as a normal indexed
3581# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3582# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3583# "ARG_FOO".
3584#
3585# The generated function can be called like this:
3586# MYFUNC(FOO: [foo-val],
3587#     BAR: [
3588#         $ECHO hello world
3589#     ])
3590# Note that the argument value must start on the same line as the argument name.
3591#
3592# Argument 1: Name of the function to define
3593# Argument 2: List of legal named arguments, with a * prefix for required arguments
3594# Argument 3: Argument array to treat as named, typically $@
3595# Argument 4: The main function body
3596
3597
3598# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3599# If so, then append $1 to $2 \
3600# Also set JVM_ARG_OK to true/false depending on outcome.
3601
3602
3603# Appends a string to a path variable, only adding the : when needed.
3604
3605
3606# Prepends a string to a path variable, only adding the : when needed.
3607
3608
3609# This will make sure the given variable points to a full and proper
3610# path. This means:
3611# 1) There will be no spaces in the path. On unix platforms,
3612#    spaces in the path will result in an error. On Windows,
3613#    the path will be rewritten using short-style to be space-free.
3614# 2) The path will be absolute, and it will be in unix-style (on
3615#     cygwin).
3616# $1: The name of the variable to fix
3617
3618
3619# This will make sure the given variable points to a executable
3620# with a full and proper path. This means:
3621# 1) There will be no spaces in the path. On unix platforms,
3622#    spaces in the path will result in an error. On Windows,
3623#    the path will be rewritten using short-style to be space-free.
3624# 2) The path will be absolute, and it will be in unix-style (on
3625#     cygwin).
3626# Any arguments given to the executable is preserved.
3627# If the input variable does not have a directory specification, then
3628# it need to be in the PATH.
3629# $1: The name of the variable to fix
3630
3631
3632
3633
3634# Register a --with argument but mark it as deprecated
3635# $1: The name of the with argument to deprecate, not including --with-
3636
3637
3638# Register a --enable argument but mark it as deprecated
3639# $1: The name of the with argument to deprecate, not including --enable-
3640# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3641# $3: Messages to user.
3642
3643
3644
3645
3646# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3647# $1: variable to check
3648
3649
3650# Check that there are no unprocessed overridden variables left.
3651# If so, they are an incorrect argument and we will exit with an error.
3652
3653
3654# Setup a tool for the given variable. If correctly specified by the user,
3655# use that value, otherwise search for the tool using the supplied code snippet.
3656# $1: variable to set
3657# $2: code snippet to call to look for the tool
3658# $3: code snippet to call if variable was used to find tool
3659
3660
3661# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3662# $1: variable to set
3663# $2: executable name (or list of names) to look for
3664
3665
3666# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3667# $1: variable to set
3668# $2: executable name (or list of names) to look for
3669
3670
3671# Like BASIC_PATH_PROGS but fails if no tool was found.
3672# $1: variable to set
3673# $2: executable name (or list of names) to look for
3674
3675
3676# Like BASIC_SETUP_TOOL but fails if no tool was found.
3677# $1: variable to set
3678# $2: autoconf macro to call to look for the special tool
3679
3680
3681# Setup the most fundamental tools that relies on not much else to set up,
3682# but is used by much of the early bootstrap code.
3683
3684
3685# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3686
3687
3688# Evaluates platform specific overrides for devkit variables.
3689# $1: Name of variable
3690
3691
3692
3693
3694
3695
3696#%%% Simple tools %%%
3697
3698# Check if we have found a usable version of make
3699# $1: the path to a potential make binary (or empty)
3700# $2: the description on how we found this
3701
3702
3703
3704
3705# Goes looking for a usable version of GNU make.
3706
3707
3708
3709
3710
3711
3712
3713
3714# Check if build directory is on local disk. If not possible to determine,
3715# we prefer to claim it's local.
3716# Argument 1: directory to test
3717# Argument 2: what to do if it is on local disk
3718# Argument 3: what to do otherwise (remote disk or failure)
3719
3720
3721# Check that source files have basic read permissions set. This might
3722# not be the case in cygwin in certain conditions.
3723
3724
3725
3726
3727# Check for support for specific options in bash
3728
3729
3730################################################################################
3731#
3732# Default make target
3733#
3734
3735
3736# Code to run after AC_OUTPUT
3737
3738
3739#
3740# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3741# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3742#
3743# This code is free software; you can redistribute it and/or modify it
3744# under the terms of the GNU General Public License version 2 only, as
3745# published by the Free Software Foundation.  Oracle designates this
3746# particular file as subject to the "Classpath" exception as provided
3747# by Oracle in the LICENSE file that accompanied this code.
3748#
3749# This code is distributed in the hope that it will be useful, but WITHOUT
3750# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3751# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3752# version 2 for more details (a copy is included in the LICENSE file that
3753# accompanied this code).
3754#
3755# You should have received a copy of the GNU General Public License version
3756# 2 along with this work; if not, write to the Free Software Foundation,
3757# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3758#
3759# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3760# or visit www.oracle.com if you need additional information or have any
3761# questions.
3762#
3763
3764
3765
3766
3767
3768# Helper function which possibly converts a path using DOS-style short mode.
3769# If so, the updated path is stored in $new_path.
3770# $1: The path to check
3771
3772
3773# Helper function which possibly converts a path using DOS-style short mode.
3774# If so, the updated path is stored in $new_path.
3775# $1: The path to check
3776
3777
3778# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3779# and could probably be heavily simplified. However, all changes in this
3780# area tend to need lot of testing in different scenarios, and in lack of
3781# proper unit testing, cleaning this up has not been deemed worth the effort
3782# at the moment.
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3793
3794
3795
3796
3797# ... then the rest
3798#
3799# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3800# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3801#
3802# This code is free software; you can redistribute it and/or modify it
3803# under the terms of the GNU General Public License version 2 only, as
3804# published by the Free Software Foundation.  Oracle designates this
3805# particular file as subject to the "Classpath" exception as provided
3806# by Oracle in the LICENSE file that accompanied this code.
3807#
3808# This code is distributed in the hope that it will be useful, but WITHOUT
3809# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3810# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3811# version 2 for more details (a copy is included in the LICENSE file that
3812# accompanied this code).
3813#
3814# You should have received a copy of the GNU General Public License version
3815# 2 along with this work; if not, write to the Free Software Foundation,
3816# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3817#
3818# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3819# or visit www.oracle.com if you need additional information or have any
3820# questions.
3821#
3822
3823########################################################################
3824# This file handles detection of the Boot JDK. The Boot JDK detection
3825# process has been developed as a response to solve a complex real-world
3826# problem. Initially, it was simple, but it has grown as platform after
3827# platform, idiosyncracy after idiosyncracy has been supported.
3828#
3829# The basic idea is this:
3830# 1) You need an acceptable *) JDK to use as a Boot JDK
3831# 2) There are several ways to locate a JDK, that are mostly platform
3832#    dependent **)
3833# 3) You can have multiple JDKs installed
3834# 4) If possible, configure should try to dig out an acceptable JDK
3835#    automatically, without having to resort to command-line options
3836#
3837# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3838#     javac) and not a JRE, etc.
3839#
3840# **) On Windows we typically use a well-known path.
3841#     On MacOSX we typically use the tool java_home.
3842#     On Linux we typically find javac in the $PATH, and then follow a
3843#     chain of symlinks that often ends up in a real JDK.
3844#
3845# This leads to the code where we check in different ways to locate a
3846# JDK, and if one is found, check if it is acceptable. If not, we print
3847# our reasons for rejecting it (useful when debugging non-working
3848# configure situations) and continue checking the next one.
3849########################################################################
3850
3851# Execute the check given as argument, and verify the result
3852# If the Boot JDK was previously found, do nothing
3853# $1 A command line (typically autoconf macro) to execute
3854
3855
3856# Test: Is bootjdk explicitely set by command line arguments?
3857
3858
3859# Test: Is $JAVA_HOME set?
3860
3861
3862# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3863
3864
3865# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3866# $1: Argument to the java_home binary (optional)
3867
3868
3869# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3870
3871
3872# Look for a jdk in the given path. If there are multiple, try to select the newest.
3873# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3874# $1 = Path to directory containing jdk installations.
3875# $2 = String to append to the found JDK directory to get the proper JDK home
3876
3877
3878# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3879# environmental variable as base for where to look.
3880# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3881
3882
3883# Test: Is there a JDK installed in default, well-known locations?
3884
3885
3886# Check that a command-line tool in the Boot JDK is correct
3887# $1 = name of variable to assign
3888# $2 = name of binary
3889
3890
3891###############################################################################
3892#
3893# We need a Boot JDK to bootstrap the build.
3894#
3895
3896
3897
3898
3899
3900# BUILD_JDK: the location of the latest JDK that can run
3901#   on the host system and supports the target class file version
3902#   generated in this JDK build.  This variable should only be
3903#   used after the launchers are built.
3904#
3905
3906# Execute the check given as argument, and verify the result.
3907# If the JDK was previously found, do nothing.
3908# $1 A command line (typically autoconf macro) to execute
3909
3910
3911# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3912# is different than the host system doing the build (e.g. cross-compilation),
3913# a special BUILD_JDK is built as part of the build process.  An external
3914# prebuilt BUILD_JDK can also be supplied.
3915
3916
3917#
3918# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3919# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3920#
3921# This code is free software; you can redistribute it and/or modify it
3922# under the terms of the GNU General Public License version 2 only, as
3923# published by the Free Software Foundation.  Oracle designates this
3924# particular file as subject to the "Classpath" exception as provided
3925# by Oracle in the LICENSE file that accompanied this code.
3926#
3927# This code is distributed in the hope that it will be useful, but WITHOUT
3928# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3929# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3930# version 2 for more details (a copy is included in the LICENSE file that
3931# accompanied this code).
3932#
3933# You should have received a copy of the GNU General Public License version
3934# 2 along with this work; if not, write to the Free Software Foundation,
3935# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3936#
3937# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3938# or visit www.oracle.com if you need additional information or have any
3939# questions.
3940#
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958################################################################################
3959#
3960# Runs icecc-create-env once and prints the error if it fails
3961#
3962# $1: arguments to icecc-create-env
3963# $2: log file
3964#
3965
3966
3967################################################################################
3968#
3969# Optionally enable distributed compilation of native code using icecc/icecream
3970#
3971
3972
3973
3974
3975
3976
3977
3978#
3979# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3980# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3981#
3982# This code is free software; you can redistribute it and/or modify it
3983# under the terms of the GNU General Public License version 2 only, as
3984# published by the Free Software Foundation.  Oracle designates this
3985# particular file as subject to the "Classpath" exception as provided
3986# by Oracle in the LICENSE file that accompanied this code.
3987#
3988# This code is distributed in the hope that it will be useful, but WITHOUT
3989# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3990# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3991# version 2 for more details (a copy is included in the LICENSE file that
3992# accompanied this code).
3993#
3994# You should have received a copy of the GNU General Public License version
3995# 2 along with this work; if not, write to the Free Software Foundation,
3996# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3997#
3998# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3999# or visit www.oracle.com if you need additional information or have any
4000# questions.
4001#
4002
4003# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4004# corresponding configure arguments instead
4005
4006
4007# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4008# that configure can use them while detecting compilers.
4009# TOOLCHAIN_TYPE is available here.
4010# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4011
4012
4013
4014
4015
4016
4017# Documentation on common flags used for solstudio in HIGHEST.
4018#
4019# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4020#          done with care, there are some assumptions below that need to
4021#          be understood about the use of pointers, and IEEE behavior.
4022#
4023# -fns: Use non-standard floating point mode (not IEEE 754)
4024# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4025# -fsingle: Use single precision floating point with 'float'
4026# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4027#   (Source with excessing pointer casting and data access with mixed
4028#    pointer types are not recommended)
4029# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4030#   (If you expect perfect errno behavior, do not use this)
4031# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4032# -xrestrict: Pointer parameters to functions do not overlap
4033#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4034#    If you pass in multiple pointers to the same data, do not use this)
4035# -xlibmil: Inline some library routines
4036#   (If you expect perfect errno behavior, do not use this)
4037# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4038#   (If you expect perfect errno behavior, do not use this)
4039#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4040
4041    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4042    # Bug?
4043    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4044    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4045    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4046    #fi
4047
4048
4049
4050
4051
4052
4053################################################################################
4054# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4055#      conditionals against.
4056# $2 - Optional prefix for each variable defined.
4057
4058
4059# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4060#                                  IF_FALSE: [RUN-IF-FALSE])
4061# ------------------------------------------------------------
4062# Check that the C compiler supports an argument
4063
4064
4065
4066
4067# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4068#                                    IF_FALSE: [RUN-IF-FALSE])
4069# ------------------------------------------------------------
4070# Check that the C++ compiler supports an argument
4071
4072
4073
4074
4075# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4076#                                IF_FALSE: [RUN-IF-FALSE])
4077# ------------------------------------------------------------
4078# Check that the C and C++ compilers support an argument
4079
4080
4081
4082
4083# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4084#                                   IF_FALSE: [RUN-IF-FALSE])
4085# ------------------------------------------------------------
4086# Check that the linker support an argument
4087
4088
4089
4090
4091
4092
4093# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4094# Arguments:
4095# $1 - Optional prefix for each variable defined.
4096
4097
4098#
4099# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4100# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4101#
4102# This code is free software; you can redistribute it and/or modify it
4103# under the terms of the GNU General Public License version 2 only, as
4104# published by the Free Software Foundation.  Oracle designates this
4105# particular file as subject to the "Classpath" exception as provided
4106# by Oracle in the LICENSE file that accompanied this code.
4107#
4108# This code is distributed in the hope that it will be useful, but WITHOUT
4109# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4110# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4111# version 2 for more details (a copy is included in the LICENSE file that
4112# accompanied this code).
4113#
4114# You should have received a copy of the GNU General Public License version
4115# 2 along with this work; if not, write to the Free Software Foundation,
4116# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4117#
4118# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4119# or visit www.oracle.com if you need additional information or have any
4120# questions.
4121#
4122
4123
4124
4125
4126
4127cygwin_help() {
4128  case $1 in
4129    unzip)
4130      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4131      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4132      ;;
4133    zip)
4134      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4135      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4136      ;;
4137    make)
4138      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4139      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4140      ;;
4141    freetype)
4142      HELP_MSG="
4143The freetype library can now be build during the configure process.
4144Download the freetype sources and unpack them into an arbitrary directory:
4145
4146wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4147tar -xzf freetype-2.5.3.tar.gz
4148
4149Then run configure with '--with-freetype-src=<freetype_src>'. This will
4150automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4151builds or into '<freetype_src>/lib32' for 32-bit builds.
4152Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4153and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4154
4155Alternatively you can unpack the sources like this to use the default directory:
4156
4157tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4158      ;;
4159  esac
4160}
4161
4162msys_help() {
4163  PKGHANDLER_COMMAND=""
4164}
4165
4166apt_help() {
4167  case $1 in
4168    reduced)
4169      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4170    devkit)
4171      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4172    openjdk)
4173      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4174    alsa)
4175      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4176    cups)
4177      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4178    freetype)
4179      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4180    ffi)
4181      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4182    x11)
4183      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4184    ccache)
4185      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4186    dtrace)
4187      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4188  esac
4189}
4190
4191yum_help() {
4192  case $1 in
4193    devkit)
4194      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4195    openjdk)
4196      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4197    alsa)
4198      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4199    cups)
4200      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4201    freetype)
4202      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4203    x11)
4204      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4205    ccache)
4206      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4207  esac
4208}
4209
4210port_help() {
4211  PKGHANDLER_COMMAND=""
4212}
4213
4214pkgutil_help() {
4215  PKGHANDLER_COMMAND=""
4216}
4217
4218pkgadd_help() {
4219  PKGHANDLER_COMMAND=""
4220}
4221
4222# This function will check if we're called from the "configure" wrapper while
4223# printing --help. If so, we will print out additional information that can
4224# only be extracted within the autoconf script, and then exit. This must be
4225# called at the very beginning in configure.ac.
4226
4227
4228
4229
4230
4231
4232#
4233# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4234# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4235#
4236# This code is free software; you can redistribute it and/or modify it
4237# under the terms of the GNU General Public License version 2 only, as
4238# published by the Free Software Foundation.  Oracle designates this
4239# particular file as subject to the "Classpath" exception as provided
4240# by Oracle in the LICENSE file that accompanied this code.
4241#
4242# This code is distributed in the hope that it will be useful, but WITHOUT
4243# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4244# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4245# version 2 for more details (a copy is included in the LICENSE file that
4246# accompanied this code).
4247#
4248# You should have received a copy of the GNU General Public License version
4249# 2 along with this work; if not, write to the Free Software Foundation,
4250# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4251#
4252# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4253# or visit www.oracle.com if you need additional information or have any
4254# questions.
4255#
4256
4257# All valid JVM features, regardless of platform
4258VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4259    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4260
4261# All valid JVM variants
4262VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4263
4264###############################################################################
4265# Check if the specified JVM variant should be built. To be used in shell if
4266# constructs, like this:
4267# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4268#
4269# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4270
4271# Definition kept in one line to allow inlining in if statements.
4272# Additional [] needed to keep m4 from mangling shell constructs.
4273
4274
4275###############################################################################
4276# Check if the specified JVM features are explicitly enabled. To be used in
4277# shell if constructs, like this:
4278# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4279#
4280# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4281
4282# Definition kept in one line to allow inlining in if statements.
4283# Additional [] needed to keep m4 from mangling shell constructs.
4284
4285
4286###############################################################################
4287# Check which variants of the JVM that we want to build. Available variants are:
4288#   server: normal interpreter, and a tiered C1/C2 compiler
4289#   client: normal interpreter, and C1 (no C2 compiler)
4290#   minimal: reduced form of client with optional features stripped out
4291#   core: normal interpreter only, no compiler
4292#   zero: C++ based interpreter only, no compiler
4293#   zeroshark: C++ based interpreter, and a llvm-based compiler
4294#   custom: baseline JVM with no default features
4295#
4296
4297
4298###############################################################################
4299# Check if dtrace should be enabled and has all prerequisites present.
4300#
4301
4302
4303###############################################################################
4304# Set up all JVM features for each JVM variant.
4305#
4306
4307
4308###############################################################################
4309# Validate JVM features once all setup is complete, including custom setup.
4310#
4311
4312
4313################################################################################
4314# Check if gtest should be built
4315#
4316
4317
4318#
4319# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4320# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4321#
4322# This code is free software; you can redistribute it and/or modify it
4323# under the terms of the GNU General Public License version 2 only, as
4324# published by the Free Software Foundation.  Oracle designates this
4325# particular file as subject to the "Classpath" exception as provided
4326# by Oracle in the LICENSE file that accompanied this code.
4327#
4328# This code is distributed in the hope that it will be useful, but WITHOUT
4329# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4330# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4331# version 2 for more details (a copy is included in the LICENSE file that
4332# accompanied this code).
4333#
4334# You should have received a copy of the GNU General Public License version
4335# 2 along with this work; if not, write to the Free Software Foundation,
4336# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4337#
4338# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4339# or visit www.oracle.com if you need additional information or have any
4340# questions.
4341#
4342
4343###############################################################################
4344# Check which variant of the JDK that we want to build.
4345# Currently we have:
4346#    normal:   standard edition
4347# but the custom make system may add other variants
4348#
4349# Effectively the JDK variant gives a name to a specific set of
4350# modules to compile into the JDK.
4351
4352
4353###############################################################################
4354# Set the debug level
4355#    release: no debug information, all optimizations, no asserts.
4356#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4357#    fastdebug: debug information (-g), all optimizations, all asserts
4358#    slowdebug: debug information (-g), no optimizations, all asserts
4359
4360
4361###############################################################################
4362#
4363# Should we build only OpenJDK even if closed sources are present?
4364#
4365
4366
4367
4368
4369###############################################################################
4370#
4371# Enable or disable the elliptic curve crypto implementation
4372#
4373
4374
4375
4376
4377################################################################################
4378#
4379# Gcov coverage data for hotspot
4380#
4381
4382
4383################################################################################
4384#
4385# Static build support.  When enabled will generate static
4386# libraries instead of shared libraries for all JDK libs.
4387#
4388
4389
4390################################################################################
4391#
4392# jlink options.
4393# We always keep packaged modules in JDK image.
4394#
4395
4396
4397################################################################################
4398#
4399# Check if building of the jtreg failure handler should be enabled.
4400#
4401
4402
4403################################################################################
4404#
4405# Enable or disable generation of the classlist at build time
4406#
4407
4408
4409#
4410# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4411# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4412#
4413# This code is free software; you can redistribute it and/or modify it
4414# under the terms of the GNU General Public License version 2 only, as
4415# published by the Free Software Foundation.  Oracle designates this
4416# particular file as subject to the "Classpath" exception as provided
4417# by Oracle in the LICENSE file that accompanied this code.
4418#
4419# This code is distributed in the hope that it will be useful, but WITHOUT
4420# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4421# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4422# version 2 for more details (a copy is included in the LICENSE file that
4423# accompanied this code).
4424#
4425# You should have received a copy of the GNU General Public License version
4426# 2 along with this work; if not, write to the Free Software Foundation,
4427# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4428#
4429# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4430# or visit www.oracle.com if you need additional information or have any
4431# questions.
4432#
4433
4434###############################################################################
4435#
4436# Setup version numbers
4437#
4438
4439# Verify that a given string represents a valid version number, and assign it
4440# to a variable.
4441
4442# Argument 1: the variable to assign to
4443# Argument 2: the value given by the user
4444
4445
4446
4447
4448#
4449# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4450# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4451#
4452# This code is free software; you can redistribute it and/or modify it
4453# under the terms of the GNU General Public License version 2 only, as
4454# published by the Free Software Foundation.  Oracle designates this
4455# particular file as subject to the "Classpath" exception as provided
4456# by Oracle in the LICENSE file that accompanied this code.
4457#
4458# This code is distributed in the hope that it will be useful, but WITHOUT
4459# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4460# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4461# version 2 for more details (a copy is included in the LICENSE file that
4462# accompanied this code).
4463#
4464# You should have received a copy of the GNU General Public License version
4465# 2 along with this work; if not, write to the Free Software Foundation,
4466# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4467#
4468# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4469# or visit www.oracle.com if you need additional information or have any
4470# questions.
4471#
4472
4473# Major library component reside in separate files.
4474#
4475# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4476# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4477#
4478# This code is free software; you can redistribute it and/or modify it
4479# under the terms of the GNU General Public License version 2 only, as
4480# published by the Free Software Foundation.  Oracle designates this
4481# particular file as subject to the "Classpath" exception as provided
4482# by Oracle in the LICENSE file that accompanied this code.
4483#
4484# This code is distributed in the hope that it will be useful, but WITHOUT
4485# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4486# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4487# version 2 for more details (a copy is included in the LICENSE file that
4488# accompanied this code).
4489#
4490# You should have received a copy of the GNU General Public License version
4491# 2 along with this work; if not, write to the Free Software Foundation,
4492# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4493#
4494# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4495# or visit www.oracle.com if you need additional information or have any
4496# questions.
4497#
4498
4499################################################################################
4500# Setup alsa (Advanced Linux Sound Architecture)
4501################################################################################
4502
4503
4504#
4505# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4506# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4507#
4508# This code is free software; you can redistribute it and/or modify it
4509# under the terms of the GNU General Public License version 2 only, as
4510# published by the Free Software Foundation.  Oracle designates this
4511# particular file as subject to the "Classpath" exception as provided
4512# by Oracle in the LICENSE file that accompanied this code.
4513#
4514# This code is distributed in the hope that it will be useful, but WITHOUT
4515# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4516# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4517# version 2 for more details (a copy is included in the LICENSE file that
4518# accompanied this code).
4519#
4520# You should have received a copy of the GNU General Public License version
4521# 2 along with this work; if not, write to the Free Software Foundation,
4522# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4523#
4524# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4525# or visit www.oracle.com if you need additional information or have any
4526# questions.
4527#
4528
4529################################################################################
4530# Setup bundled libraries.
4531#
4532# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4533# OpenJDK repository. Default is to use these libraries as bundled, but they
4534# might be replaced by en external version by the user.
4535################################################################################
4536
4537
4538################################################################################
4539# Setup libjpeg
4540################################################################################
4541
4542
4543################################################################################
4544# Setup giflib
4545################################################################################
4546
4547
4548################################################################################
4549# Setup libpng
4550################################################################################
4551
4552
4553################################################################################
4554# Setup zlib
4555################################################################################
4556
4557
4558################################################################################
4559# Setup lcms (Little CMS)
4560################################################################################
4561
4562
4563#
4564# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4565# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4566#
4567# This code is free software; you can redistribute it and/or modify it
4568# under the terms of the GNU General Public License version 2 only, as
4569# published by the Free Software Foundation.  Oracle designates this
4570# particular file as subject to the "Classpath" exception as provided
4571# by Oracle in the LICENSE file that accompanied this code.
4572#
4573# This code is distributed in the hope that it will be useful, but WITHOUT
4574# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4575# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4576# version 2 for more details (a copy is included in the LICENSE file that
4577# accompanied this code).
4578#
4579# You should have received a copy of the GNU General Public License version
4580# 2 along with this work; if not, write to the Free Software Foundation,
4581# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4582#
4583# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4584# or visit www.oracle.com if you need additional information or have any
4585# questions.
4586#
4587
4588################################################################################
4589# Setup cups (Common Unix Printing System)
4590################################################################################
4591
4592
4593#
4594# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4595# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4596#
4597# This code is free software; you can redistribute it and/or modify it
4598# under the terms of the GNU General Public License version 2 only, as
4599# published by the Free Software Foundation.  Oracle designates this
4600# particular file as subject to the "Classpath" exception as provided
4601# by Oracle in the LICENSE file that accompanied this code.
4602#
4603# This code is distributed in the hope that it will be useful, but WITHOUT
4604# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4605# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4606# version 2 for more details (a copy is included in the LICENSE file that
4607# accompanied this code).
4608#
4609# You should have received a copy of the GNU General Public License version
4610# 2 along with this work; if not, write to the Free Software Foundation,
4611# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4612#
4613# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4614# or visit www.oracle.com if you need additional information or have any
4615# questions.
4616#
4617
4618################################################################################
4619# Setup libffi (Foreign Function Interface)
4620################################################################################
4621
4622
4623#
4624# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4625# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4626#
4627# This code is free software; you can redistribute it and/or modify it
4628# under the terms of the GNU General Public License version 2 only, as
4629# published by the Free Software Foundation.  Oracle designates this
4630# particular file as subject to the "Classpath" exception as provided
4631# by Oracle in the LICENSE file that accompanied this code.
4632#
4633# This code is distributed in the hope that it will be useful, but WITHOUT
4634# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4635# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4636# version 2 for more details (a copy is included in the LICENSE file that
4637# accompanied this code).
4638#
4639# You should have received a copy of the GNU General Public License version
4640# 2 along with this work; if not, write to the Free Software Foundation,
4641# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4642#
4643# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4644# or visit www.oracle.com if you need additional information or have any
4645# questions.
4646#
4647
4648################################################################################
4649# Build the freetype lib from source
4650################################################################################
4651
4652
4653################################################################################
4654# Check if a potential freeype library match is correct and usable
4655################################################################################
4656
4657
4658################################################################################
4659# Setup freetype (The FreeType2 font rendering library)
4660################################################################################
4661
4662
4663#
4664# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4665# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4666#
4667# This code is free software; you can redistribute it and/or modify it
4668# under the terms of the GNU General Public License version 2 only, as
4669# published by the Free Software Foundation.  Oracle designates this
4670# particular file as subject to the "Classpath" exception as provided
4671# by Oracle in the LICENSE file that accompanied this code.
4672#
4673# This code is distributed in the hope that it will be useful, but WITHOUT
4674# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4675# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4676# version 2 for more details (a copy is included in the LICENSE file that
4677# accompanied this code).
4678#
4679# You should have received a copy of the GNU General Public License version
4680# 2 along with this work; if not, write to the Free Software Foundation,
4681# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4682#
4683# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4684# or visit www.oracle.com if you need additional information or have any
4685# questions.
4686#
4687
4688################################################################################
4689# Setup the standard C/C++ runtime libraries.
4690#
4691# Most importantly, determine if stdc++ should be linked statically or
4692# dynamically.
4693################################################################################
4694
4695
4696#
4697# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4698# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4699#
4700# This code is free software; you can redistribute it and/or modify it
4701# under the terms of the GNU General Public License version 2 only, as
4702# published by the Free Software Foundation.  Oracle designates this
4703# particular file as subject to the "Classpath" exception as provided
4704# by Oracle in the LICENSE file that accompanied this code.
4705#
4706# This code is distributed in the hope that it will be useful, but WITHOUT
4707# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4708# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4709# version 2 for more details (a copy is included in the LICENSE file that
4710# accompanied this code).
4711#
4712# You should have received a copy of the GNU General Public License version
4713# 2 along with this work; if not, write to the Free Software Foundation,
4714# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4715#
4716# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4717# or visit www.oracle.com if you need additional information or have any
4718# questions.
4719#
4720
4721################################################################################
4722# Setup X11 Windows system
4723################################################################################
4724
4725
4726
4727################################################################################
4728# Determine which libraries are needed for this configuration
4729################################################################################
4730
4731
4732################################################################################
4733# Parse library options, and setup needed libraries
4734################################################################################
4735
4736
4737################################################################################
4738# Setup llvm (Low-Level VM)
4739################################################################################
4740
4741
4742################################################################################
4743# Setup various libraries, typically small system libraries
4744################################################################################
4745
4746
4747################################################################################
4748# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4749# redistribute it in the test image.
4750################################################################################
4751
4752
4753
4754#
4755# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4756# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4757#
4758# This code is free software; you can redistribute it and/or modify it
4759# under the terms of the GNU General Public License version 2 only, as
4760# published by the Free Software Foundation.  Oracle designates this
4761# particular file as subject to the "Classpath" exception as provided
4762# by Oracle in the LICENSE file that accompanied this code.
4763#
4764# This code is distributed in the hope that it will be useful, but WITHOUT
4765# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4766# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4767# version 2 for more details (a copy is included in the LICENSE file that
4768# accompanied this code).
4769#
4770# You should have received a copy of the GNU General Public License version
4771# 2 along with this work; if not, write to the Free Software Foundation,
4772# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4773#
4774# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4775# or visit www.oracle.com if you need additional information or have any
4776# questions.
4777#
4778
4779# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4780# Converts autoconf style CPU name to OpenJDK style, into
4781# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4782
4783
4784# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4785# Converts autoconf style OS name to OpenJDK style, into
4786# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4787
4788
4789# Expects $host_os $host_cpu $build_os and $build_cpu
4790# and $with_target_bits to have been setup!
4791#
4792# Translate the standard triplet(quadruplet) definition
4793# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4794# OPENJDK_BUILD_OS, etc.
4795
4796
4797# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4798# accordingly. Must be done after setting up build and target system, but before
4799# doing anything else with these values.
4800
4801
4802# Setup the legacy variables, for controlling the old makefiles.
4803#
4804
4805
4806# $1 - Either TARGET or BUILD to setup the variables for.
4807
4808
4809
4810
4811#%%% Build and target systems %%%
4812
4813
4814
4815
4816# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4817# Add -mX to various FLAGS variables.
4818
4819
4820
4821
4822
4823
4824#
4825# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4826# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4827#
4828# This code is free software; you can redistribute it and/or modify it
4829# under the terms of the GNU General Public License version 2 only, as
4830# published by the Free Software Foundation.  Oracle designates this
4831# particular file as subject to the "Classpath" exception as provided
4832# by Oracle in the LICENSE file that accompanied this code.
4833#
4834# This code is distributed in the hope that it will be useful, but WITHOUT
4835# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4836# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4837# version 2 for more details (a copy is included in the LICENSE file that
4838# accompanied this code).
4839#
4840# You should have received a copy of the GNU General Public License version
4841# 2 along with this work; if not, write to the Free Software Foundation,
4842# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4843#
4844# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4845# or visit www.oracle.com if you need additional information or have any
4846# questions.
4847#
4848
4849
4850
4851
4852
4853
4854
4855################################################################################
4856# Define a mechanism for importing extra prebuilt modules
4857#
4858
4859
4860
4861#
4862# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4863# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4864#
4865# This code is free software; you can redistribute it and/or modify it
4866# under the terms of the GNU General Public License version 2 only, as
4867# published by the Free Software Foundation.  Oracle designates this
4868# particular file as subject to the "Classpath" exception as provided
4869# by Oracle in the LICENSE file that accompanied this code.
4870#
4871# This code is distributed in the hope that it will be useful, but WITHOUT
4872# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4873# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4874# version 2 for more details (a copy is included in the LICENSE file that
4875# accompanied this code).
4876#
4877# You should have received a copy of the GNU General Public License version
4878# 2 along with this work; if not, write to the Free Software Foundation,
4879# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4880#
4881# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4882# or visit www.oracle.com if you need additional information or have any
4883# questions.
4884#
4885
4886########################################################################
4887# This file is responsible for detecting, verifying and setting up the
4888# toolchain, i.e. the compiler, linker and related utilities. It will setup
4889# proper paths to the binaries, but it will not setup any flags.
4890#
4891# The binaries used is determined by the toolchain type, which is the family of
4892# compilers and related tools that are used.
4893########################################################################
4894
4895
4896# All valid toolchains, regardless of platform (used by help.m4)
4897VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4898
4899# These toolchains are valid on different platforms
4900VALID_TOOLCHAINS_linux="gcc clang"
4901VALID_TOOLCHAINS_solaris="solstudio"
4902VALID_TOOLCHAINS_macosx="gcc clang"
4903VALID_TOOLCHAINS_aix="xlc"
4904VALID_TOOLCHAINS_windows="microsoft"
4905
4906# Toolchain descriptions
4907TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4908TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4909TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4910TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4911TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4912
4913# Minimum supported versions, empty means unspecified
4914TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4915TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4916TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4917TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4918TOOLCHAIN_MINIMUM_VERSION_xlc=""
4919
4920# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4921# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4922# $1 - optional variable prefix for compiler and version variables (BUILD_)
4923# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4924
4925
4926# Check if the configured compiler (C and C++) is of a specific version or
4927# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4928#
4929# Arguments:
4930#   VERSION:   The version string to check against the found version
4931#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4932#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4933#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4934
4935
4936
4937
4938# Setup a number of variables describing how native output files are
4939# named on this platform/toolchain.
4940
4941
4942# Determine which toolchain type to use, and make sure it is valid for this
4943# platform. Setup various information about the selected toolchain.
4944
4945
4946# Before we start detecting the toolchain executables, we might need some
4947# special setup, e.g. additional paths etc.
4948
4949
4950# Restore path, etc
4951
4952
4953# Check if a compiler is of the toolchain type we expect, and save the version
4954# information from it. If the compiler does not match the expected type,
4955# this function will abort using AC_MSG_ERROR. If it matches, the version will
4956# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4957# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4958#
4959# $1 = compiler to test (CC or CXX)
4960# $2 = human readable name of compiler (C or C++)
4961
4962
4963# Try to locate the given C or C++ compiler in the path, or otherwise.
4964#
4965# $1 = compiler to test (CC or CXX)
4966# $2 = human readable name of compiler (C or C++)
4967# $3 = list of compiler names to search for
4968
4969
4970# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4971# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4972# archiver (AR). Verify that the compilers are correct according to the
4973# toolchain type.
4974
4975
4976# Setup additional tools that is considered a part of the toolchain, but not the
4977# core part. Many of these are highly platform-specific and do not exist,
4978# and/or are not needed on all platforms.
4979
4980
4981# Setup the build tools (i.e, the compiler and linker used to build programs
4982# that should be run on the build platform, not the target platform, as a build
4983# helper). Since the non-cross-compile case uses the normal, target compilers
4984# for this, we can only do this after these have been setup.
4985
4986
4987# Setup legacy variables that are still needed as alternative ways to refer to
4988# parts of the toolchain.
4989
4990
4991# Do some additional checks on the detected tools.
4992
4993
4994# Setup the JTReg Regression Test Harness.
4995
4996
4997#
4998# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4999# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5000#
5001# This code is free software; you can redistribute it and/or modify it
5002# under the terms of the GNU General Public License version 2 only, as
5003# published by the Free Software Foundation.  Oracle designates this
5004# particular file as subject to the "Classpath" exception as provided
5005# by Oracle in the LICENSE file that accompanied this code.
5006#
5007# This code is distributed in the hope that it will be useful, but WITHOUT
5008# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5009# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5010# version 2 for more details (a copy is included in the LICENSE file that
5011# accompanied this code).
5012#
5013# You should have received a copy of the GNU General Public License version
5014# 2 along with this work; if not, write to the Free Software Foundation,
5015# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5016#
5017# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5018# or visit www.oracle.com if you need additional information or have any
5019# questions.
5020#
5021
5022################################################################################
5023# The order of these defines the priority by which we try to find them.
5024VALID_VS_VERSIONS="2013 2012 2010"
5025
5026VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5027VS_VERSION_INTERNAL_2010=100
5028VS_MSVCR_2010=msvcr100.dll
5029# We don't use msvcp on Visual Studio 2010
5030#VS_MSVCP_2010=msvcp100.dll
5031VS_ENVVAR_2010="VS100COMNTOOLS"
5032VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5033VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5034VS_VS_PLATFORM_NAME_2010="v100"
5035VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5036
5037VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5038VS_VERSION_INTERNAL_2012=110
5039VS_MSVCR_2012=msvcr110.dll
5040VS_MSVCP_2012=msvcp110.dll
5041VS_ENVVAR_2012="VS110COMNTOOLS"
5042VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5043VS_SDK_INSTALLDIR_2012=
5044VS_VS_PLATFORM_NAME_2012="v110"
5045VS_SDK_PLATFORM_NAME_2012=
5046
5047VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5048VS_VERSION_INTERNAL_2013=120
5049VS_MSVCR_2013=msvcr120.dll
5050VS_MSVCP_2013=msvcp120.dll
5051VS_ENVVAR_2013="VS120COMNTOOLS"
5052VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5053VS_SDK_INSTALLDIR_2013=
5054VS_VS_PLATFORM_NAME_2013="v120"
5055VS_SDK_PLATFORM_NAME_2013=
5056
5057################################################################################
5058
5059
5060
5061################################################################################
5062
5063
5064
5065################################################################################
5066# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5067# build environment and assigns it to VS_ENV_CMD
5068
5069
5070################################################################################
5071
5072
5073
5074################################################################################
5075# Check if the VS env variables were setup prior to running configure.
5076# If not, then find vcvarsall.bat and run it automatically, and integrate
5077# the set env variables into the spec file.
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092# This line needs to be here, verbatim, after all includes and the dummy hook
5093# definitions. It is replaced with custom functionality when building
5094# custom sources.
5095#CUSTOM_AUTOCONF_INCLUDE
5096
5097# Do not change or remove the following line, it is needed for consistency checks:
5098DATE_WHEN_GENERATED=1469207452
5099
5100###############################################################################
5101#
5102# Initialization / Boot-strapping
5103#
5104# The bootstrapping process needs to solve the "chicken or the egg" problem,
5105# thus it jumps back and forth, each time gaining something needed later on.
5106#
5107###############################################################################
5108
5109# If we are requested to print additional help, do that and then exit.
5110# This must be the very first call.
5111
5112  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5113
5114    # Print available toolchains
5115    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5116    $PRINTF "Which are valid to use depends on the build platform.\n"
5117    for toolchain in $VALID_TOOLCHAINS_all; do
5118      # Use indirect variable referencing
5119      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5120      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5121      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5122    done
5123    $PRINTF "\n"
5124
5125    # Print available jvm features
5126    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5127    $PRINTF "Which are valid to use depends on the target platform.\n  "
5128    $PRINTF "%s " $VALID_JVM_FEATURES
5129    $PRINTF "\n"
5130
5131    # And now exit directly
5132    exit 0
5133  fi
5134
5135
5136# Basic initialization that must happen first of all in the normal process.
5137
5138  # Save the original command line. This is passed to us by the wrapper configure script.
5139
5140  # Save the path variable before it gets changed
5141  ORIGINAL_PATH="$PATH"
5142
5143  DATE_WHEN_CONFIGURED=`LANG=C date`
5144
5145  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5146$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5147  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5148$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5149
5150
5151  # Start with tools that do not need have cross compilation support
5152  # and can be expected to be found in the default PATH. These tools are
5153  # used by configure.
5154
5155  # First are all the simple required tools.
5156
5157
5158
5159  # Publish this variable in the help.
5160
5161
5162  if [ -z "${BASENAME+x}" ]; then
5163    # The variable is not set by user, try to locate tool using the code snippet
5164    for ac_prog in basename
5165do
5166  # Extract the first word of "$ac_prog", so it can be a program name with args.
5167set dummy $ac_prog; ac_word=$2
5168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5169$as_echo_n "checking for $ac_word... " >&6; }
5170if ${ac_cv_path_BASENAME+:} false; then :
5171  $as_echo_n "(cached) " >&6
5172else
5173  case $BASENAME in
5174  [\\/]* | ?:[\\/]*)
5175  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5176  ;;
5177  *)
5178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5179for as_dir in $PATH
5180do
5181  IFS=$as_save_IFS
5182  test -z "$as_dir" && as_dir=.
5183    for ac_exec_ext in '' $ac_executable_extensions; do
5184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5185    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5187    break 2
5188  fi
5189done
5190  done
5191IFS=$as_save_IFS
5192
5193  ;;
5194esac
5195fi
5196BASENAME=$ac_cv_path_BASENAME
5197if test -n "$BASENAME"; then
5198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5199$as_echo "$BASENAME" >&6; }
5200else
5201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5202$as_echo "no" >&6; }
5203fi
5204
5205
5206  test -n "$BASENAME" && break
5207done
5208
5209  else
5210    # The variable is set, but is it from the command line or the environment?
5211
5212    # Try to remove the string !BASENAME! from our list.
5213    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5214    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5215      # If it failed, the variable was not from the command line. Ignore it,
5216      # but warn the user (except for BASH, which is always set by the calling BASH).
5217      if test "xBASENAME" != xBASH; then
5218        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5219$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5220      fi
5221      # Try to locate tool using the code snippet
5222      for ac_prog in basename
5223do
5224  # Extract the first word of "$ac_prog", so it can be a program name with args.
5225set dummy $ac_prog; ac_word=$2
5226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5227$as_echo_n "checking for $ac_word... " >&6; }
5228if ${ac_cv_path_BASENAME+:} false; then :
5229  $as_echo_n "(cached) " >&6
5230else
5231  case $BASENAME in
5232  [\\/]* | ?:[\\/]*)
5233  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5234  ;;
5235  *)
5236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5237for as_dir in $PATH
5238do
5239  IFS=$as_save_IFS
5240  test -z "$as_dir" && as_dir=.
5241    for ac_exec_ext in '' $ac_executable_extensions; do
5242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5243    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5245    break 2
5246  fi
5247done
5248  done
5249IFS=$as_save_IFS
5250
5251  ;;
5252esac
5253fi
5254BASENAME=$ac_cv_path_BASENAME
5255if test -n "$BASENAME"; then
5256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5257$as_echo "$BASENAME" >&6; }
5258else
5259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5260$as_echo "no" >&6; }
5261fi
5262
5263
5264  test -n "$BASENAME" && break
5265done
5266
5267    else
5268      # If it succeeded, then it was overridden by the user. We will use it
5269      # for the tool.
5270
5271      # First remove it from the list of overridden variables, so we can test
5272      # for unknown variables in the end.
5273      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5274
5275      # Check if we try to supply an empty value
5276      if test "x$BASENAME" = x; then
5277        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5278$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5279        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5280$as_echo_n "checking for BASENAME... " >&6; }
5281        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5282$as_echo "disabled" >&6; }
5283      else
5284        # Check if the provided tool contains a complete path.
5285        tool_specified="$BASENAME"
5286        tool_basename="${tool_specified##*/}"
5287        if test "x$tool_basename" = "x$tool_specified"; then
5288          # A command without a complete path is provided, search $PATH.
5289          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5290$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5291          # Extract the first word of "$tool_basename", so it can be a program name with args.
5292set dummy $tool_basename; ac_word=$2
5293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5294$as_echo_n "checking for $ac_word... " >&6; }
5295if ${ac_cv_path_BASENAME+:} false; then :
5296  $as_echo_n "(cached) " >&6
5297else
5298  case $BASENAME in
5299  [\\/]* | ?:[\\/]*)
5300  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5301  ;;
5302  *)
5303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5304for as_dir in $PATH
5305do
5306  IFS=$as_save_IFS
5307  test -z "$as_dir" && as_dir=.
5308    for ac_exec_ext in '' $ac_executable_extensions; do
5309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5310    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5312    break 2
5313  fi
5314done
5315  done
5316IFS=$as_save_IFS
5317
5318  ;;
5319esac
5320fi
5321BASENAME=$ac_cv_path_BASENAME
5322if test -n "$BASENAME"; then
5323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5324$as_echo "$BASENAME" >&6; }
5325else
5326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5327$as_echo "no" >&6; }
5328fi
5329
5330
5331          if test "x$BASENAME" = x; then
5332            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5333          fi
5334        else
5335          # Otherwise we believe it is a complete path. Use it as it is.
5336          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5337$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5338          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5339$as_echo_n "checking for BASENAME... " >&6; }
5340          if test ! -x "$tool_specified"; then
5341            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5342$as_echo "not found" >&6; }
5343            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5344          fi
5345          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5346$as_echo "$tool_specified" >&6; }
5347        fi
5348      fi
5349    fi
5350
5351  fi
5352
5353
5354
5355  if test "x$BASENAME" = x; then
5356    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5357  fi
5358
5359
5360
5361
5362
5363  # Publish this variable in the help.
5364
5365
5366  if [ -z "${BASH+x}" ]; then
5367    # The variable is not set by user, try to locate tool using the code snippet
5368    for ac_prog in bash
5369do
5370  # Extract the first word of "$ac_prog", so it can be a program name with args.
5371set dummy $ac_prog; ac_word=$2
5372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5373$as_echo_n "checking for $ac_word... " >&6; }
5374if ${ac_cv_path_BASH+:} false; then :
5375  $as_echo_n "(cached) " >&6
5376else
5377  case $BASH in
5378  [\\/]* | ?:[\\/]*)
5379  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5380  ;;
5381  *)
5382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5383for as_dir in $PATH
5384do
5385  IFS=$as_save_IFS
5386  test -z "$as_dir" && as_dir=.
5387    for ac_exec_ext in '' $ac_executable_extensions; do
5388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5389    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5391    break 2
5392  fi
5393done
5394  done
5395IFS=$as_save_IFS
5396
5397  ;;
5398esac
5399fi
5400BASH=$ac_cv_path_BASH
5401if test -n "$BASH"; then
5402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5403$as_echo "$BASH" >&6; }
5404else
5405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5406$as_echo "no" >&6; }
5407fi
5408
5409
5410  test -n "$BASH" && break
5411done
5412
5413  else
5414    # The variable is set, but is it from the command line or the environment?
5415
5416    # Try to remove the string !BASH! from our list.
5417    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5418    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5419      # If it failed, the variable was not from the command line. Ignore it,
5420      # but warn the user (except for BASH, which is always set by the calling BASH).
5421      if test "xBASH" != xBASH; then
5422        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5423$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5424      fi
5425      # Try to locate tool using the code snippet
5426      for ac_prog in bash
5427do
5428  # Extract the first word of "$ac_prog", so it can be a program name with args.
5429set dummy $ac_prog; ac_word=$2
5430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5431$as_echo_n "checking for $ac_word... " >&6; }
5432if ${ac_cv_path_BASH+:} false; then :
5433  $as_echo_n "(cached) " >&6
5434else
5435  case $BASH in
5436  [\\/]* | ?:[\\/]*)
5437  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5438  ;;
5439  *)
5440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5441for as_dir in $PATH
5442do
5443  IFS=$as_save_IFS
5444  test -z "$as_dir" && as_dir=.
5445    for ac_exec_ext in '' $ac_executable_extensions; do
5446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5447    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5449    break 2
5450  fi
5451done
5452  done
5453IFS=$as_save_IFS
5454
5455  ;;
5456esac
5457fi
5458BASH=$ac_cv_path_BASH
5459if test -n "$BASH"; then
5460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5461$as_echo "$BASH" >&6; }
5462else
5463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5464$as_echo "no" >&6; }
5465fi
5466
5467
5468  test -n "$BASH" && break
5469done
5470
5471    else
5472      # If it succeeded, then it was overridden by the user. We will use it
5473      # for the tool.
5474
5475      # First remove it from the list of overridden variables, so we can test
5476      # for unknown variables in the end.
5477      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5478
5479      # Check if we try to supply an empty value
5480      if test "x$BASH" = x; then
5481        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5482$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5483        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5484$as_echo_n "checking for BASH... " >&6; }
5485        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5486$as_echo "disabled" >&6; }
5487      else
5488        # Check if the provided tool contains a complete path.
5489        tool_specified="$BASH"
5490        tool_basename="${tool_specified##*/}"
5491        if test "x$tool_basename" = "x$tool_specified"; then
5492          # A command without a complete path is provided, search $PATH.
5493          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5494$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5495          # Extract the first word of "$tool_basename", so it can be a program name with args.
5496set dummy $tool_basename; ac_word=$2
5497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5498$as_echo_n "checking for $ac_word... " >&6; }
5499if ${ac_cv_path_BASH+:} false; then :
5500  $as_echo_n "(cached) " >&6
5501else
5502  case $BASH in
5503  [\\/]* | ?:[\\/]*)
5504  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5505  ;;
5506  *)
5507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5508for as_dir in $PATH
5509do
5510  IFS=$as_save_IFS
5511  test -z "$as_dir" && as_dir=.
5512    for ac_exec_ext in '' $ac_executable_extensions; do
5513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5514    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5516    break 2
5517  fi
5518done
5519  done
5520IFS=$as_save_IFS
5521
5522  ;;
5523esac
5524fi
5525BASH=$ac_cv_path_BASH
5526if test -n "$BASH"; then
5527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5528$as_echo "$BASH" >&6; }
5529else
5530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5531$as_echo "no" >&6; }
5532fi
5533
5534
5535          if test "x$BASH" = x; then
5536            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5537          fi
5538        else
5539          # Otherwise we believe it is a complete path. Use it as it is.
5540          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5541$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5542          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5543$as_echo_n "checking for BASH... " >&6; }
5544          if test ! -x "$tool_specified"; then
5545            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5546$as_echo "not found" >&6; }
5547            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5548          fi
5549          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5550$as_echo "$tool_specified" >&6; }
5551        fi
5552      fi
5553    fi
5554
5555  fi
5556
5557
5558
5559  if test "x$BASH" = x; then
5560    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5561  fi
5562
5563
5564
5565
5566
5567  # Publish this variable in the help.
5568
5569
5570  if [ -z "${CAT+x}" ]; then
5571    # The variable is not set by user, try to locate tool using the code snippet
5572    for ac_prog in cat
5573do
5574  # Extract the first word of "$ac_prog", so it can be a program name with args.
5575set dummy $ac_prog; ac_word=$2
5576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5577$as_echo_n "checking for $ac_word... " >&6; }
5578if ${ac_cv_path_CAT+:} false; then :
5579  $as_echo_n "(cached) " >&6
5580else
5581  case $CAT in
5582  [\\/]* | ?:[\\/]*)
5583  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5584  ;;
5585  *)
5586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5587for as_dir in $PATH
5588do
5589  IFS=$as_save_IFS
5590  test -z "$as_dir" && as_dir=.
5591    for ac_exec_ext in '' $ac_executable_extensions; do
5592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5593    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5595    break 2
5596  fi
5597done
5598  done
5599IFS=$as_save_IFS
5600
5601  ;;
5602esac
5603fi
5604CAT=$ac_cv_path_CAT
5605if test -n "$CAT"; then
5606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5607$as_echo "$CAT" >&6; }
5608else
5609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5610$as_echo "no" >&6; }
5611fi
5612
5613
5614  test -n "$CAT" && break
5615done
5616
5617  else
5618    # The variable is set, but is it from the command line or the environment?
5619
5620    # Try to remove the string !CAT! from our list.
5621    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5622    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5623      # If it failed, the variable was not from the command line. Ignore it,
5624      # but warn the user (except for BASH, which is always set by the calling BASH).
5625      if test "xCAT" != xBASH; then
5626        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5627$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5628      fi
5629      # Try to locate tool using the code snippet
5630      for ac_prog in cat
5631do
5632  # Extract the first word of "$ac_prog", so it can be a program name with args.
5633set dummy $ac_prog; ac_word=$2
5634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5635$as_echo_n "checking for $ac_word... " >&6; }
5636if ${ac_cv_path_CAT+:} false; then :
5637  $as_echo_n "(cached) " >&6
5638else
5639  case $CAT in
5640  [\\/]* | ?:[\\/]*)
5641  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5642  ;;
5643  *)
5644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5645for as_dir in $PATH
5646do
5647  IFS=$as_save_IFS
5648  test -z "$as_dir" && as_dir=.
5649    for ac_exec_ext in '' $ac_executable_extensions; do
5650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5651    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5653    break 2
5654  fi
5655done
5656  done
5657IFS=$as_save_IFS
5658
5659  ;;
5660esac
5661fi
5662CAT=$ac_cv_path_CAT
5663if test -n "$CAT"; then
5664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5665$as_echo "$CAT" >&6; }
5666else
5667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5668$as_echo "no" >&6; }
5669fi
5670
5671
5672  test -n "$CAT" && break
5673done
5674
5675    else
5676      # If it succeeded, then it was overridden by the user. We will use it
5677      # for the tool.
5678
5679      # First remove it from the list of overridden variables, so we can test
5680      # for unknown variables in the end.
5681      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5682
5683      # Check if we try to supply an empty value
5684      if test "x$CAT" = x; then
5685        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5686$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5687        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5688$as_echo_n "checking for CAT... " >&6; }
5689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5690$as_echo "disabled" >&6; }
5691      else
5692        # Check if the provided tool contains a complete path.
5693        tool_specified="$CAT"
5694        tool_basename="${tool_specified##*/}"
5695        if test "x$tool_basename" = "x$tool_specified"; then
5696          # A command without a complete path is provided, search $PATH.
5697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5698$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5699          # Extract the first word of "$tool_basename", so it can be a program name with args.
5700set dummy $tool_basename; ac_word=$2
5701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5702$as_echo_n "checking for $ac_word... " >&6; }
5703if ${ac_cv_path_CAT+:} false; then :
5704  $as_echo_n "(cached) " >&6
5705else
5706  case $CAT in
5707  [\\/]* | ?:[\\/]*)
5708  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5709  ;;
5710  *)
5711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5712for as_dir in $PATH
5713do
5714  IFS=$as_save_IFS
5715  test -z "$as_dir" && as_dir=.
5716    for ac_exec_ext in '' $ac_executable_extensions; do
5717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5718    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5720    break 2
5721  fi
5722done
5723  done
5724IFS=$as_save_IFS
5725
5726  ;;
5727esac
5728fi
5729CAT=$ac_cv_path_CAT
5730if test -n "$CAT"; then
5731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5732$as_echo "$CAT" >&6; }
5733else
5734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5735$as_echo "no" >&6; }
5736fi
5737
5738
5739          if test "x$CAT" = x; then
5740            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5741          fi
5742        else
5743          # Otherwise we believe it is a complete path. Use it as it is.
5744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5745$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5746          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5747$as_echo_n "checking for CAT... " >&6; }
5748          if test ! -x "$tool_specified"; then
5749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5750$as_echo "not found" >&6; }
5751            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5752          fi
5753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5754$as_echo "$tool_specified" >&6; }
5755        fi
5756      fi
5757    fi
5758
5759  fi
5760
5761
5762
5763  if test "x$CAT" = x; then
5764    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5765  fi
5766
5767
5768
5769
5770
5771  # Publish this variable in the help.
5772
5773
5774  if [ -z "${CHMOD+x}" ]; then
5775    # The variable is not set by user, try to locate tool using the code snippet
5776    for ac_prog in chmod
5777do
5778  # Extract the first word of "$ac_prog", so it can be a program name with args.
5779set dummy $ac_prog; ac_word=$2
5780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5781$as_echo_n "checking for $ac_word... " >&6; }
5782if ${ac_cv_path_CHMOD+:} false; then :
5783  $as_echo_n "(cached) " >&6
5784else
5785  case $CHMOD in
5786  [\\/]* | ?:[\\/]*)
5787  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5788  ;;
5789  *)
5790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791for as_dir in $PATH
5792do
5793  IFS=$as_save_IFS
5794  test -z "$as_dir" && as_dir=.
5795    for ac_exec_ext in '' $ac_executable_extensions; do
5796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5797    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5799    break 2
5800  fi
5801done
5802  done
5803IFS=$as_save_IFS
5804
5805  ;;
5806esac
5807fi
5808CHMOD=$ac_cv_path_CHMOD
5809if test -n "$CHMOD"; then
5810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5811$as_echo "$CHMOD" >&6; }
5812else
5813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5814$as_echo "no" >&6; }
5815fi
5816
5817
5818  test -n "$CHMOD" && break
5819done
5820
5821  else
5822    # The variable is set, but is it from the command line or the environment?
5823
5824    # Try to remove the string !CHMOD! from our list.
5825    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5826    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5827      # If it failed, the variable was not from the command line. Ignore it,
5828      # but warn the user (except for BASH, which is always set by the calling BASH).
5829      if test "xCHMOD" != xBASH; then
5830        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5831$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5832      fi
5833      # Try to locate tool using the code snippet
5834      for ac_prog in chmod
5835do
5836  # Extract the first word of "$ac_prog", so it can be a program name with args.
5837set dummy $ac_prog; ac_word=$2
5838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5839$as_echo_n "checking for $ac_word... " >&6; }
5840if ${ac_cv_path_CHMOD+:} false; then :
5841  $as_echo_n "(cached) " >&6
5842else
5843  case $CHMOD in
5844  [\\/]* | ?:[\\/]*)
5845  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5846  ;;
5847  *)
5848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849for as_dir in $PATH
5850do
5851  IFS=$as_save_IFS
5852  test -z "$as_dir" && as_dir=.
5853    for ac_exec_ext in '' $ac_executable_extensions; do
5854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5855    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5857    break 2
5858  fi
5859done
5860  done
5861IFS=$as_save_IFS
5862
5863  ;;
5864esac
5865fi
5866CHMOD=$ac_cv_path_CHMOD
5867if test -n "$CHMOD"; then
5868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5869$as_echo "$CHMOD" >&6; }
5870else
5871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5872$as_echo "no" >&6; }
5873fi
5874
5875
5876  test -n "$CHMOD" && break
5877done
5878
5879    else
5880      # If it succeeded, then it was overridden by the user. We will use it
5881      # for the tool.
5882
5883      # First remove it from the list of overridden variables, so we can test
5884      # for unknown variables in the end.
5885      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5886
5887      # Check if we try to supply an empty value
5888      if test "x$CHMOD" = x; then
5889        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5890$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5891        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5892$as_echo_n "checking for CHMOD... " >&6; }
5893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5894$as_echo "disabled" >&6; }
5895      else
5896        # Check if the provided tool contains a complete path.
5897        tool_specified="$CHMOD"
5898        tool_basename="${tool_specified##*/}"
5899        if test "x$tool_basename" = "x$tool_specified"; then
5900          # A command without a complete path is provided, search $PATH.
5901          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5902$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5903          # Extract the first word of "$tool_basename", so it can be a program name with args.
5904set dummy $tool_basename; ac_word=$2
5905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5906$as_echo_n "checking for $ac_word... " >&6; }
5907if ${ac_cv_path_CHMOD+:} false; then :
5908  $as_echo_n "(cached) " >&6
5909else
5910  case $CHMOD in
5911  [\\/]* | ?:[\\/]*)
5912  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5913  ;;
5914  *)
5915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5916for as_dir in $PATH
5917do
5918  IFS=$as_save_IFS
5919  test -z "$as_dir" && as_dir=.
5920    for ac_exec_ext in '' $ac_executable_extensions; do
5921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5922    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5924    break 2
5925  fi
5926done
5927  done
5928IFS=$as_save_IFS
5929
5930  ;;
5931esac
5932fi
5933CHMOD=$ac_cv_path_CHMOD
5934if test -n "$CHMOD"; then
5935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5936$as_echo "$CHMOD" >&6; }
5937else
5938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5939$as_echo "no" >&6; }
5940fi
5941
5942
5943          if test "x$CHMOD" = x; then
5944            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5945          fi
5946        else
5947          # Otherwise we believe it is a complete path. Use it as it is.
5948          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5949$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5950          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5951$as_echo_n "checking for CHMOD... " >&6; }
5952          if test ! -x "$tool_specified"; then
5953            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5954$as_echo "not found" >&6; }
5955            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5956          fi
5957          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5958$as_echo "$tool_specified" >&6; }
5959        fi
5960      fi
5961    fi
5962
5963  fi
5964
5965
5966
5967  if test "x$CHMOD" = x; then
5968    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5969  fi
5970
5971
5972
5973
5974
5975  # Publish this variable in the help.
5976
5977
5978  if [ -z "${CMP+x}" ]; then
5979    # The variable is not set by user, try to locate tool using the code snippet
5980    for ac_prog in cmp
5981do
5982  # Extract the first word of "$ac_prog", so it can be a program name with args.
5983set dummy $ac_prog; ac_word=$2
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5985$as_echo_n "checking for $ac_word... " >&6; }
5986if ${ac_cv_path_CMP+:} false; then :
5987  $as_echo_n "(cached) " >&6
5988else
5989  case $CMP in
5990  [\\/]* | ?:[\\/]*)
5991  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5992  ;;
5993  *)
5994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH
5996do
5997  IFS=$as_save_IFS
5998  test -z "$as_dir" && as_dir=.
5999    for ac_exec_ext in '' $ac_executable_extensions; do
6000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6001    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6003    break 2
6004  fi
6005done
6006  done
6007IFS=$as_save_IFS
6008
6009  ;;
6010esac
6011fi
6012CMP=$ac_cv_path_CMP
6013if test -n "$CMP"; then
6014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6015$as_echo "$CMP" >&6; }
6016else
6017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6018$as_echo "no" >&6; }
6019fi
6020
6021
6022  test -n "$CMP" && break
6023done
6024
6025  else
6026    # The variable is set, but is it from the command line or the environment?
6027
6028    # Try to remove the string !CMP! from our list.
6029    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6030    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6031      # If it failed, the variable was not from the command line. Ignore it,
6032      # but warn the user (except for BASH, which is always set by the calling BASH).
6033      if test "xCMP" != xBASH; then
6034        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6035$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6036      fi
6037      # Try to locate tool using the code snippet
6038      for ac_prog in cmp
6039do
6040  # Extract the first word of "$ac_prog", so it can be a program name with args.
6041set dummy $ac_prog; ac_word=$2
6042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6043$as_echo_n "checking for $ac_word... " >&6; }
6044if ${ac_cv_path_CMP+:} false; then :
6045  $as_echo_n "(cached) " >&6
6046else
6047  case $CMP in
6048  [\\/]* | ?:[\\/]*)
6049  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6050  ;;
6051  *)
6052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6053for as_dir in $PATH
6054do
6055  IFS=$as_save_IFS
6056  test -z "$as_dir" && as_dir=.
6057    for ac_exec_ext in '' $ac_executable_extensions; do
6058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6059    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6061    break 2
6062  fi
6063done
6064  done
6065IFS=$as_save_IFS
6066
6067  ;;
6068esac
6069fi
6070CMP=$ac_cv_path_CMP
6071if test -n "$CMP"; then
6072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6073$as_echo "$CMP" >&6; }
6074else
6075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6076$as_echo "no" >&6; }
6077fi
6078
6079
6080  test -n "$CMP" && break
6081done
6082
6083    else
6084      # If it succeeded, then it was overridden by the user. We will use it
6085      # for the tool.
6086
6087      # First remove it from the list of overridden variables, so we can test
6088      # for unknown variables in the end.
6089      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6090
6091      # Check if we try to supply an empty value
6092      if test "x$CMP" = x; then
6093        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6094$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6096$as_echo_n "checking for CMP... " >&6; }
6097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6098$as_echo "disabled" >&6; }
6099      else
6100        # Check if the provided tool contains a complete path.
6101        tool_specified="$CMP"
6102        tool_basename="${tool_specified##*/}"
6103        if test "x$tool_basename" = "x$tool_specified"; then
6104          # A command without a complete path is provided, search $PATH.
6105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6106$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6107          # Extract the first word of "$tool_basename", so it can be a program name with args.
6108set dummy $tool_basename; ac_word=$2
6109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6110$as_echo_n "checking for $ac_word... " >&6; }
6111if ${ac_cv_path_CMP+:} false; then :
6112  $as_echo_n "(cached) " >&6
6113else
6114  case $CMP in
6115  [\\/]* | ?:[\\/]*)
6116  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6117  ;;
6118  *)
6119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6120for as_dir in $PATH
6121do
6122  IFS=$as_save_IFS
6123  test -z "$as_dir" && as_dir=.
6124    for ac_exec_ext in '' $ac_executable_extensions; do
6125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6126    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6128    break 2
6129  fi
6130done
6131  done
6132IFS=$as_save_IFS
6133
6134  ;;
6135esac
6136fi
6137CMP=$ac_cv_path_CMP
6138if test -n "$CMP"; then
6139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6140$as_echo "$CMP" >&6; }
6141else
6142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6143$as_echo "no" >&6; }
6144fi
6145
6146
6147          if test "x$CMP" = x; then
6148            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6149          fi
6150        else
6151          # Otherwise we believe it is a complete path. Use it as it is.
6152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6153$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6154          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6155$as_echo_n "checking for CMP... " >&6; }
6156          if test ! -x "$tool_specified"; then
6157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6158$as_echo "not found" >&6; }
6159            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6160          fi
6161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6162$as_echo "$tool_specified" >&6; }
6163        fi
6164      fi
6165    fi
6166
6167  fi
6168
6169
6170
6171  if test "x$CMP" = x; then
6172    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6173  fi
6174
6175
6176
6177
6178
6179  # Publish this variable in the help.
6180
6181
6182  if [ -z "${COMM+x}" ]; then
6183    # The variable is not set by user, try to locate tool using the code snippet
6184    for ac_prog in comm
6185do
6186  # Extract the first word of "$ac_prog", so it can be a program name with args.
6187set dummy $ac_prog; ac_word=$2
6188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6189$as_echo_n "checking for $ac_word... " >&6; }
6190if ${ac_cv_path_COMM+:} false; then :
6191  $as_echo_n "(cached) " >&6
6192else
6193  case $COMM in
6194  [\\/]* | ?:[\\/]*)
6195  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6196  ;;
6197  *)
6198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6199for as_dir in $PATH
6200do
6201  IFS=$as_save_IFS
6202  test -z "$as_dir" && as_dir=.
6203    for ac_exec_ext in '' $ac_executable_extensions; do
6204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6205    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6207    break 2
6208  fi
6209done
6210  done
6211IFS=$as_save_IFS
6212
6213  ;;
6214esac
6215fi
6216COMM=$ac_cv_path_COMM
6217if test -n "$COMM"; then
6218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6219$as_echo "$COMM" >&6; }
6220else
6221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6222$as_echo "no" >&6; }
6223fi
6224
6225
6226  test -n "$COMM" && break
6227done
6228
6229  else
6230    # The variable is set, but is it from the command line or the environment?
6231
6232    # Try to remove the string !COMM! from our list.
6233    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6234    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6235      # If it failed, the variable was not from the command line. Ignore it,
6236      # but warn the user (except for BASH, which is always set by the calling BASH).
6237      if test "xCOMM" != xBASH; then
6238        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6239$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6240      fi
6241      # Try to locate tool using the code snippet
6242      for ac_prog in comm
6243do
6244  # Extract the first word of "$ac_prog", so it can be a program name with args.
6245set dummy $ac_prog; ac_word=$2
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6247$as_echo_n "checking for $ac_word... " >&6; }
6248if ${ac_cv_path_COMM+:} false; then :
6249  $as_echo_n "(cached) " >&6
6250else
6251  case $COMM in
6252  [\\/]* | ?:[\\/]*)
6253  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6254  ;;
6255  *)
6256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6257for as_dir in $PATH
6258do
6259  IFS=$as_save_IFS
6260  test -z "$as_dir" && as_dir=.
6261    for ac_exec_ext in '' $ac_executable_extensions; do
6262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6263    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6265    break 2
6266  fi
6267done
6268  done
6269IFS=$as_save_IFS
6270
6271  ;;
6272esac
6273fi
6274COMM=$ac_cv_path_COMM
6275if test -n "$COMM"; then
6276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6277$as_echo "$COMM" >&6; }
6278else
6279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6280$as_echo "no" >&6; }
6281fi
6282
6283
6284  test -n "$COMM" && break
6285done
6286
6287    else
6288      # If it succeeded, then it was overridden by the user. We will use it
6289      # for the tool.
6290
6291      # First remove it from the list of overridden variables, so we can test
6292      # for unknown variables in the end.
6293      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6294
6295      # Check if we try to supply an empty value
6296      if test "x$COMM" = x; then
6297        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6298$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6299        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6300$as_echo_n "checking for COMM... " >&6; }
6301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6302$as_echo "disabled" >&6; }
6303      else
6304        # Check if the provided tool contains a complete path.
6305        tool_specified="$COMM"
6306        tool_basename="${tool_specified##*/}"
6307        if test "x$tool_basename" = "x$tool_specified"; then
6308          # A command without a complete path is provided, search $PATH.
6309          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6310$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6311          # Extract the first word of "$tool_basename", so it can be a program name with args.
6312set dummy $tool_basename; ac_word=$2
6313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6314$as_echo_n "checking for $ac_word... " >&6; }
6315if ${ac_cv_path_COMM+:} false; then :
6316  $as_echo_n "(cached) " >&6
6317else
6318  case $COMM in
6319  [\\/]* | ?:[\\/]*)
6320  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6321  ;;
6322  *)
6323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6324for as_dir in $PATH
6325do
6326  IFS=$as_save_IFS
6327  test -z "$as_dir" && as_dir=.
6328    for ac_exec_ext in '' $ac_executable_extensions; do
6329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6330    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6332    break 2
6333  fi
6334done
6335  done
6336IFS=$as_save_IFS
6337
6338  ;;
6339esac
6340fi
6341COMM=$ac_cv_path_COMM
6342if test -n "$COMM"; then
6343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6344$as_echo "$COMM" >&6; }
6345else
6346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6347$as_echo "no" >&6; }
6348fi
6349
6350
6351          if test "x$COMM" = x; then
6352            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6353          fi
6354        else
6355          # Otherwise we believe it is a complete path. Use it as it is.
6356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6357$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6358          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6359$as_echo_n "checking for COMM... " >&6; }
6360          if test ! -x "$tool_specified"; then
6361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6362$as_echo "not found" >&6; }
6363            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6364          fi
6365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6366$as_echo "$tool_specified" >&6; }
6367        fi
6368      fi
6369    fi
6370
6371  fi
6372
6373
6374
6375  if test "x$COMM" = x; then
6376    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6377  fi
6378
6379
6380
6381
6382
6383  # Publish this variable in the help.
6384
6385
6386  if [ -z "${CP+x}" ]; then
6387    # The variable is not set by user, try to locate tool using the code snippet
6388    for ac_prog in cp
6389do
6390  # Extract the first word of "$ac_prog", so it can be a program name with args.
6391set dummy $ac_prog; ac_word=$2
6392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6393$as_echo_n "checking for $ac_word... " >&6; }
6394if ${ac_cv_path_CP+:} false; then :
6395  $as_echo_n "(cached) " >&6
6396else
6397  case $CP in
6398  [\\/]* | ?:[\\/]*)
6399  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6400  ;;
6401  *)
6402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6403for as_dir in $PATH
6404do
6405  IFS=$as_save_IFS
6406  test -z "$as_dir" && as_dir=.
6407    for ac_exec_ext in '' $ac_executable_extensions; do
6408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6409    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6411    break 2
6412  fi
6413done
6414  done
6415IFS=$as_save_IFS
6416
6417  ;;
6418esac
6419fi
6420CP=$ac_cv_path_CP
6421if test -n "$CP"; then
6422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6423$as_echo "$CP" >&6; }
6424else
6425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6426$as_echo "no" >&6; }
6427fi
6428
6429
6430  test -n "$CP" && break
6431done
6432
6433  else
6434    # The variable is set, but is it from the command line or the environment?
6435
6436    # Try to remove the string !CP! from our list.
6437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6439      # If it failed, the variable was not from the command line. Ignore it,
6440      # but warn the user (except for BASH, which is always set by the calling BASH).
6441      if test "xCP" != xBASH; then
6442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6443$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6444      fi
6445      # Try to locate tool using the code snippet
6446      for ac_prog in cp
6447do
6448  # Extract the first word of "$ac_prog", so it can be a program name with args.
6449set dummy $ac_prog; ac_word=$2
6450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6451$as_echo_n "checking for $ac_word... " >&6; }
6452if ${ac_cv_path_CP+:} false; then :
6453  $as_echo_n "(cached) " >&6
6454else
6455  case $CP in
6456  [\\/]* | ?:[\\/]*)
6457  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6458  ;;
6459  *)
6460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6461for as_dir in $PATH
6462do
6463  IFS=$as_save_IFS
6464  test -z "$as_dir" && as_dir=.
6465    for ac_exec_ext in '' $ac_executable_extensions; do
6466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6467    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6469    break 2
6470  fi
6471done
6472  done
6473IFS=$as_save_IFS
6474
6475  ;;
6476esac
6477fi
6478CP=$ac_cv_path_CP
6479if test -n "$CP"; then
6480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6481$as_echo "$CP" >&6; }
6482else
6483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6484$as_echo "no" >&6; }
6485fi
6486
6487
6488  test -n "$CP" && break
6489done
6490
6491    else
6492      # If it succeeded, then it was overridden by the user. We will use it
6493      # for the tool.
6494
6495      # First remove it from the list of overridden variables, so we can test
6496      # for unknown variables in the end.
6497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6498
6499      # Check if we try to supply an empty value
6500      if test "x$CP" = x; then
6501        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6502$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6503        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6504$as_echo_n "checking for CP... " >&6; }
6505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6506$as_echo "disabled" >&6; }
6507      else
6508        # Check if the provided tool contains a complete path.
6509        tool_specified="$CP"
6510        tool_basename="${tool_specified##*/}"
6511        if test "x$tool_basename" = "x$tool_specified"; then
6512          # A command without a complete path is provided, search $PATH.
6513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6514$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6515          # Extract the first word of "$tool_basename", so it can be a program name with args.
6516set dummy $tool_basename; ac_word=$2
6517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6518$as_echo_n "checking for $ac_word... " >&6; }
6519if ${ac_cv_path_CP+:} false; then :
6520  $as_echo_n "(cached) " >&6
6521else
6522  case $CP in
6523  [\\/]* | ?:[\\/]*)
6524  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6525  ;;
6526  *)
6527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6528for as_dir in $PATH
6529do
6530  IFS=$as_save_IFS
6531  test -z "$as_dir" && as_dir=.
6532    for ac_exec_ext in '' $ac_executable_extensions; do
6533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6534    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6536    break 2
6537  fi
6538done
6539  done
6540IFS=$as_save_IFS
6541
6542  ;;
6543esac
6544fi
6545CP=$ac_cv_path_CP
6546if test -n "$CP"; then
6547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6548$as_echo "$CP" >&6; }
6549else
6550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6551$as_echo "no" >&6; }
6552fi
6553
6554
6555          if test "x$CP" = x; then
6556            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6557          fi
6558        else
6559          # Otherwise we believe it is a complete path. Use it as it is.
6560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6561$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6562          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6563$as_echo_n "checking for CP... " >&6; }
6564          if test ! -x "$tool_specified"; then
6565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6566$as_echo "not found" >&6; }
6567            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6568          fi
6569          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6570$as_echo "$tool_specified" >&6; }
6571        fi
6572      fi
6573    fi
6574
6575  fi
6576
6577
6578
6579  if test "x$CP" = x; then
6580    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6581  fi
6582
6583
6584
6585
6586
6587  # Publish this variable in the help.
6588
6589
6590  if [ -z "${CUT+x}" ]; then
6591    # The variable is not set by user, try to locate tool using the code snippet
6592    for ac_prog in cut
6593do
6594  # Extract the first word of "$ac_prog", so it can be a program name with args.
6595set dummy $ac_prog; ac_word=$2
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6597$as_echo_n "checking for $ac_word... " >&6; }
6598if ${ac_cv_path_CUT+:} false; then :
6599  $as_echo_n "(cached) " >&6
6600else
6601  case $CUT in
6602  [\\/]* | ?:[\\/]*)
6603  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6604  ;;
6605  *)
6606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6607for as_dir in $PATH
6608do
6609  IFS=$as_save_IFS
6610  test -z "$as_dir" && as_dir=.
6611    for ac_exec_ext in '' $ac_executable_extensions; do
6612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6613    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6615    break 2
6616  fi
6617done
6618  done
6619IFS=$as_save_IFS
6620
6621  ;;
6622esac
6623fi
6624CUT=$ac_cv_path_CUT
6625if test -n "$CUT"; then
6626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6627$as_echo "$CUT" >&6; }
6628else
6629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6630$as_echo "no" >&6; }
6631fi
6632
6633
6634  test -n "$CUT" && break
6635done
6636
6637  else
6638    # The variable is set, but is it from the command line or the environment?
6639
6640    # Try to remove the string !CUT! from our list.
6641    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6642    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6643      # If it failed, the variable was not from the command line. Ignore it,
6644      # but warn the user (except for BASH, which is always set by the calling BASH).
6645      if test "xCUT" != xBASH; then
6646        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6647$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6648      fi
6649      # Try to locate tool using the code snippet
6650      for ac_prog in cut
6651do
6652  # Extract the first word of "$ac_prog", so it can be a program name with args.
6653set dummy $ac_prog; ac_word=$2
6654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6655$as_echo_n "checking for $ac_word... " >&6; }
6656if ${ac_cv_path_CUT+:} false; then :
6657  $as_echo_n "(cached) " >&6
6658else
6659  case $CUT in
6660  [\\/]* | ?:[\\/]*)
6661  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6662  ;;
6663  *)
6664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6665for as_dir in $PATH
6666do
6667  IFS=$as_save_IFS
6668  test -z "$as_dir" && as_dir=.
6669    for ac_exec_ext in '' $ac_executable_extensions; do
6670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6671    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6673    break 2
6674  fi
6675done
6676  done
6677IFS=$as_save_IFS
6678
6679  ;;
6680esac
6681fi
6682CUT=$ac_cv_path_CUT
6683if test -n "$CUT"; then
6684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6685$as_echo "$CUT" >&6; }
6686else
6687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6688$as_echo "no" >&6; }
6689fi
6690
6691
6692  test -n "$CUT" && break
6693done
6694
6695    else
6696      # If it succeeded, then it was overridden by the user. We will use it
6697      # for the tool.
6698
6699      # First remove it from the list of overridden variables, so we can test
6700      # for unknown variables in the end.
6701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6702
6703      # Check if we try to supply an empty value
6704      if test "x$CUT" = x; then
6705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6706$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6708$as_echo_n "checking for CUT... " >&6; }
6709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6710$as_echo "disabled" >&6; }
6711      else
6712        # Check if the provided tool contains a complete path.
6713        tool_specified="$CUT"
6714        tool_basename="${tool_specified##*/}"
6715        if test "x$tool_basename" = "x$tool_specified"; then
6716          # A command without a complete path is provided, search $PATH.
6717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6718$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6719          # Extract the first word of "$tool_basename", so it can be a program name with args.
6720set dummy $tool_basename; ac_word=$2
6721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6722$as_echo_n "checking for $ac_word... " >&6; }
6723if ${ac_cv_path_CUT+:} false; then :
6724  $as_echo_n "(cached) " >&6
6725else
6726  case $CUT in
6727  [\\/]* | ?:[\\/]*)
6728  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6729  ;;
6730  *)
6731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6732for as_dir in $PATH
6733do
6734  IFS=$as_save_IFS
6735  test -z "$as_dir" && as_dir=.
6736    for ac_exec_ext in '' $ac_executable_extensions; do
6737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6738    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6740    break 2
6741  fi
6742done
6743  done
6744IFS=$as_save_IFS
6745
6746  ;;
6747esac
6748fi
6749CUT=$ac_cv_path_CUT
6750if test -n "$CUT"; then
6751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6752$as_echo "$CUT" >&6; }
6753else
6754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6755$as_echo "no" >&6; }
6756fi
6757
6758
6759          if test "x$CUT" = x; then
6760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6761          fi
6762        else
6763          # Otherwise we believe it is a complete path. Use it as it is.
6764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6765$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6767$as_echo_n "checking for CUT... " >&6; }
6768          if test ! -x "$tool_specified"; then
6769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6770$as_echo "not found" >&6; }
6771            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6772          fi
6773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6774$as_echo "$tool_specified" >&6; }
6775        fi
6776      fi
6777    fi
6778
6779  fi
6780
6781
6782
6783  if test "x$CUT" = x; then
6784    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6785  fi
6786
6787
6788
6789
6790
6791  # Publish this variable in the help.
6792
6793
6794  if [ -z "${DATE+x}" ]; then
6795    # The variable is not set by user, try to locate tool using the code snippet
6796    for ac_prog in date
6797do
6798  # Extract the first word of "$ac_prog", so it can be a program name with args.
6799set dummy $ac_prog; ac_word=$2
6800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6801$as_echo_n "checking for $ac_word... " >&6; }
6802if ${ac_cv_path_DATE+:} false; then :
6803  $as_echo_n "(cached) " >&6
6804else
6805  case $DATE in
6806  [\\/]* | ?:[\\/]*)
6807  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6808  ;;
6809  *)
6810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6811for as_dir in $PATH
6812do
6813  IFS=$as_save_IFS
6814  test -z "$as_dir" && as_dir=.
6815    for ac_exec_ext in '' $ac_executable_extensions; do
6816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6817    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6819    break 2
6820  fi
6821done
6822  done
6823IFS=$as_save_IFS
6824
6825  ;;
6826esac
6827fi
6828DATE=$ac_cv_path_DATE
6829if test -n "$DATE"; then
6830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6831$as_echo "$DATE" >&6; }
6832else
6833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6834$as_echo "no" >&6; }
6835fi
6836
6837
6838  test -n "$DATE" && break
6839done
6840
6841  else
6842    # The variable is set, but is it from the command line or the environment?
6843
6844    # Try to remove the string !DATE! from our list.
6845    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6846    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6847      # If it failed, the variable was not from the command line. Ignore it,
6848      # but warn the user (except for BASH, which is always set by the calling BASH).
6849      if test "xDATE" != xBASH; then
6850        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6851$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6852      fi
6853      # Try to locate tool using the code snippet
6854      for ac_prog in date
6855do
6856  # Extract the first word of "$ac_prog", so it can be a program name with args.
6857set dummy $ac_prog; ac_word=$2
6858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6859$as_echo_n "checking for $ac_word... " >&6; }
6860if ${ac_cv_path_DATE+:} false; then :
6861  $as_echo_n "(cached) " >&6
6862else
6863  case $DATE in
6864  [\\/]* | ?:[\\/]*)
6865  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6866  ;;
6867  *)
6868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6869for as_dir in $PATH
6870do
6871  IFS=$as_save_IFS
6872  test -z "$as_dir" && as_dir=.
6873    for ac_exec_ext in '' $ac_executable_extensions; do
6874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6875    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6877    break 2
6878  fi
6879done
6880  done
6881IFS=$as_save_IFS
6882
6883  ;;
6884esac
6885fi
6886DATE=$ac_cv_path_DATE
6887if test -n "$DATE"; then
6888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6889$as_echo "$DATE" >&6; }
6890else
6891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6892$as_echo "no" >&6; }
6893fi
6894
6895
6896  test -n "$DATE" && break
6897done
6898
6899    else
6900      # If it succeeded, then it was overridden by the user. We will use it
6901      # for the tool.
6902
6903      # First remove it from the list of overridden variables, so we can test
6904      # for unknown variables in the end.
6905      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6906
6907      # Check if we try to supply an empty value
6908      if test "x$DATE" = x; then
6909        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6910$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6912$as_echo_n "checking for DATE... " >&6; }
6913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6914$as_echo "disabled" >&6; }
6915      else
6916        # Check if the provided tool contains a complete path.
6917        tool_specified="$DATE"
6918        tool_basename="${tool_specified##*/}"
6919        if test "x$tool_basename" = "x$tool_specified"; then
6920          # A command without a complete path is provided, search $PATH.
6921          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6922$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6923          # Extract the first word of "$tool_basename", so it can be a program name with args.
6924set dummy $tool_basename; ac_word=$2
6925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6926$as_echo_n "checking for $ac_word... " >&6; }
6927if ${ac_cv_path_DATE+:} false; then :
6928  $as_echo_n "(cached) " >&6
6929else
6930  case $DATE in
6931  [\\/]* | ?:[\\/]*)
6932  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6933  ;;
6934  *)
6935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6936for as_dir in $PATH
6937do
6938  IFS=$as_save_IFS
6939  test -z "$as_dir" && as_dir=.
6940    for ac_exec_ext in '' $ac_executable_extensions; do
6941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6942    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6944    break 2
6945  fi
6946done
6947  done
6948IFS=$as_save_IFS
6949
6950  ;;
6951esac
6952fi
6953DATE=$ac_cv_path_DATE
6954if test -n "$DATE"; then
6955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6956$as_echo "$DATE" >&6; }
6957else
6958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6959$as_echo "no" >&6; }
6960fi
6961
6962
6963          if test "x$DATE" = x; then
6964            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6965          fi
6966        else
6967          # Otherwise we believe it is a complete path. Use it as it is.
6968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6969$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6970          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6971$as_echo_n "checking for DATE... " >&6; }
6972          if test ! -x "$tool_specified"; then
6973            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6974$as_echo "not found" >&6; }
6975            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6976          fi
6977          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6978$as_echo "$tool_specified" >&6; }
6979        fi
6980      fi
6981    fi
6982
6983  fi
6984
6985
6986
6987  if test "x$DATE" = x; then
6988    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6989  fi
6990
6991
6992
6993
6994
6995  # Publish this variable in the help.
6996
6997
6998  if [ -z "${DIFF+x}" ]; then
6999    # The variable is not set by user, try to locate tool using the code snippet
7000    for ac_prog in gdiff diff
7001do
7002  # Extract the first word of "$ac_prog", so it can be a program name with args.
7003set dummy $ac_prog; ac_word=$2
7004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7005$as_echo_n "checking for $ac_word... " >&6; }
7006if ${ac_cv_path_DIFF+:} false; then :
7007  $as_echo_n "(cached) " >&6
7008else
7009  case $DIFF in
7010  [\\/]* | ?:[\\/]*)
7011  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7012  ;;
7013  *)
7014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7015for as_dir in $PATH
7016do
7017  IFS=$as_save_IFS
7018  test -z "$as_dir" && as_dir=.
7019    for ac_exec_ext in '' $ac_executable_extensions; do
7020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7021    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7023    break 2
7024  fi
7025done
7026  done
7027IFS=$as_save_IFS
7028
7029  ;;
7030esac
7031fi
7032DIFF=$ac_cv_path_DIFF
7033if test -n "$DIFF"; then
7034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7035$as_echo "$DIFF" >&6; }
7036else
7037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7038$as_echo "no" >&6; }
7039fi
7040
7041
7042  test -n "$DIFF" && break
7043done
7044
7045  else
7046    # The variable is set, but is it from the command line or the environment?
7047
7048    # Try to remove the string !DIFF! from our list.
7049    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7050    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7051      # If it failed, the variable was not from the command line. Ignore it,
7052      # but warn the user (except for BASH, which is always set by the calling BASH).
7053      if test "xDIFF" != xBASH; then
7054        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7055$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7056      fi
7057      # Try to locate tool using the code snippet
7058      for ac_prog in gdiff diff
7059do
7060  # Extract the first word of "$ac_prog", so it can be a program name with args.
7061set dummy $ac_prog; ac_word=$2
7062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7063$as_echo_n "checking for $ac_word... " >&6; }
7064if ${ac_cv_path_DIFF+:} false; then :
7065  $as_echo_n "(cached) " >&6
7066else
7067  case $DIFF in
7068  [\\/]* | ?:[\\/]*)
7069  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7070  ;;
7071  *)
7072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7073for as_dir in $PATH
7074do
7075  IFS=$as_save_IFS
7076  test -z "$as_dir" && as_dir=.
7077    for ac_exec_ext in '' $ac_executable_extensions; do
7078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7079    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7081    break 2
7082  fi
7083done
7084  done
7085IFS=$as_save_IFS
7086
7087  ;;
7088esac
7089fi
7090DIFF=$ac_cv_path_DIFF
7091if test -n "$DIFF"; then
7092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7093$as_echo "$DIFF" >&6; }
7094else
7095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7096$as_echo "no" >&6; }
7097fi
7098
7099
7100  test -n "$DIFF" && break
7101done
7102
7103    else
7104      # If it succeeded, then it was overridden by the user. We will use it
7105      # for the tool.
7106
7107      # First remove it from the list of overridden variables, so we can test
7108      # for unknown variables in the end.
7109      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7110
7111      # Check if we try to supply an empty value
7112      if test "x$DIFF" = x; then
7113        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7114$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7115        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7116$as_echo_n "checking for DIFF... " >&6; }
7117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7118$as_echo "disabled" >&6; }
7119      else
7120        # Check if the provided tool contains a complete path.
7121        tool_specified="$DIFF"
7122        tool_basename="${tool_specified##*/}"
7123        if test "x$tool_basename" = "x$tool_specified"; then
7124          # A command without a complete path is provided, search $PATH.
7125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7126$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7127          # Extract the first word of "$tool_basename", so it can be a program name with args.
7128set dummy $tool_basename; ac_word=$2
7129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7130$as_echo_n "checking for $ac_word... " >&6; }
7131if ${ac_cv_path_DIFF+:} false; then :
7132  $as_echo_n "(cached) " >&6
7133else
7134  case $DIFF in
7135  [\\/]* | ?:[\\/]*)
7136  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7137  ;;
7138  *)
7139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7140for as_dir in $PATH
7141do
7142  IFS=$as_save_IFS
7143  test -z "$as_dir" && as_dir=.
7144    for ac_exec_ext in '' $ac_executable_extensions; do
7145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7146    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7148    break 2
7149  fi
7150done
7151  done
7152IFS=$as_save_IFS
7153
7154  ;;
7155esac
7156fi
7157DIFF=$ac_cv_path_DIFF
7158if test -n "$DIFF"; then
7159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7160$as_echo "$DIFF" >&6; }
7161else
7162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7163$as_echo "no" >&6; }
7164fi
7165
7166
7167          if test "x$DIFF" = x; then
7168            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7169          fi
7170        else
7171          # Otherwise we believe it is a complete path. Use it as it is.
7172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7173$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7174          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7175$as_echo_n "checking for DIFF... " >&6; }
7176          if test ! -x "$tool_specified"; then
7177            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7178$as_echo "not found" >&6; }
7179            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7180          fi
7181          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7182$as_echo "$tool_specified" >&6; }
7183        fi
7184      fi
7185    fi
7186
7187  fi
7188
7189
7190
7191  if test "x$DIFF" = x; then
7192    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7193  fi
7194
7195
7196
7197
7198
7199  # Publish this variable in the help.
7200
7201
7202  if [ -z "${DIRNAME+x}" ]; then
7203    # The variable is not set by user, try to locate tool using the code snippet
7204    for ac_prog in dirname
7205do
7206  # Extract the first word of "$ac_prog", so it can be a program name with args.
7207set dummy $ac_prog; ac_word=$2
7208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7209$as_echo_n "checking for $ac_word... " >&6; }
7210if ${ac_cv_path_DIRNAME+:} false; then :
7211  $as_echo_n "(cached) " >&6
7212else
7213  case $DIRNAME in
7214  [\\/]* | ?:[\\/]*)
7215  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7216  ;;
7217  *)
7218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7219for as_dir in $PATH
7220do
7221  IFS=$as_save_IFS
7222  test -z "$as_dir" && as_dir=.
7223    for ac_exec_ext in '' $ac_executable_extensions; do
7224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7225    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7227    break 2
7228  fi
7229done
7230  done
7231IFS=$as_save_IFS
7232
7233  ;;
7234esac
7235fi
7236DIRNAME=$ac_cv_path_DIRNAME
7237if test -n "$DIRNAME"; then
7238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7239$as_echo "$DIRNAME" >&6; }
7240else
7241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7242$as_echo "no" >&6; }
7243fi
7244
7245
7246  test -n "$DIRNAME" && break
7247done
7248
7249  else
7250    # The variable is set, but is it from the command line or the environment?
7251
7252    # Try to remove the string !DIRNAME! from our list.
7253    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7254    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7255      # If it failed, the variable was not from the command line. Ignore it,
7256      # but warn the user (except for BASH, which is always set by the calling BASH).
7257      if test "xDIRNAME" != xBASH; then
7258        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7259$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7260      fi
7261      # Try to locate tool using the code snippet
7262      for ac_prog in dirname
7263do
7264  # Extract the first word of "$ac_prog", so it can be a program name with args.
7265set dummy $ac_prog; ac_word=$2
7266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7267$as_echo_n "checking for $ac_word... " >&6; }
7268if ${ac_cv_path_DIRNAME+:} false; then :
7269  $as_echo_n "(cached) " >&6
7270else
7271  case $DIRNAME in
7272  [\\/]* | ?:[\\/]*)
7273  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7274  ;;
7275  *)
7276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7277for as_dir in $PATH
7278do
7279  IFS=$as_save_IFS
7280  test -z "$as_dir" && as_dir=.
7281    for ac_exec_ext in '' $ac_executable_extensions; do
7282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7283    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7285    break 2
7286  fi
7287done
7288  done
7289IFS=$as_save_IFS
7290
7291  ;;
7292esac
7293fi
7294DIRNAME=$ac_cv_path_DIRNAME
7295if test -n "$DIRNAME"; then
7296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7297$as_echo "$DIRNAME" >&6; }
7298else
7299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7300$as_echo "no" >&6; }
7301fi
7302
7303
7304  test -n "$DIRNAME" && break
7305done
7306
7307    else
7308      # If it succeeded, then it was overridden by the user. We will use it
7309      # for the tool.
7310
7311      # First remove it from the list of overridden variables, so we can test
7312      # for unknown variables in the end.
7313      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7314
7315      # Check if we try to supply an empty value
7316      if test "x$DIRNAME" = x; then
7317        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7318$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7319        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7320$as_echo_n "checking for DIRNAME... " >&6; }
7321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7322$as_echo "disabled" >&6; }
7323      else
7324        # Check if the provided tool contains a complete path.
7325        tool_specified="$DIRNAME"
7326        tool_basename="${tool_specified##*/}"
7327        if test "x$tool_basename" = "x$tool_specified"; then
7328          # A command without a complete path is provided, search $PATH.
7329          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7330$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7331          # Extract the first word of "$tool_basename", so it can be a program name with args.
7332set dummy $tool_basename; ac_word=$2
7333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7334$as_echo_n "checking for $ac_word... " >&6; }
7335if ${ac_cv_path_DIRNAME+:} false; then :
7336  $as_echo_n "(cached) " >&6
7337else
7338  case $DIRNAME in
7339  [\\/]* | ?:[\\/]*)
7340  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7341  ;;
7342  *)
7343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7344for as_dir in $PATH
7345do
7346  IFS=$as_save_IFS
7347  test -z "$as_dir" && as_dir=.
7348    for ac_exec_ext in '' $ac_executable_extensions; do
7349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7350    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7352    break 2
7353  fi
7354done
7355  done
7356IFS=$as_save_IFS
7357
7358  ;;
7359esac
7360fi
7361DIRNAME=$ac_cv_path_DIRNAME
7362if test -n "$DIRNAME"; then
7363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7364$as_echo "$DIRNAME" >&6; }
7365else
7366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7367$as_echo "no" >&6; }
7368fi
7369
7370
7371          if test "x$DIRNAME" = x; then
7372            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7373          fi
7374        else
7375          # Otherwise we believe it is a complete path. Use it as it is.
7376          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7377$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7378          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7379$as_echo_n "checking for DIRNAME... " >&6; }
7380          if test ! -x "$tool_specified"; then
7381            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7382$as_echo "not found" >&6; }
7383            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7384          fi
7385          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7386$as_echo "$tool_specified" >&6; }
7387        fi
7388      fi
7389    fi
7390
7391  fi
7392
7393
7394
7395  if test "x$DIRNAME" = x; then
7396    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7397  fi
7398
7399
7400
7401
7402
7403  # Publish this variable in the help.
7404
7405
7406  if [ -z "${ECHO+x}" ]; then
7407    # The variable is not set by user, try to locate tool using the code snippet
7408    for ac_prog in echo
7409do
7410  # Extract the first word of "$ac_prog", so it can be a program name with args.
7411set dummy $ac_prog; ac_word=$2
7412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7413$as_echo_n "checking for $ac_word... " >&6; }
7414if ${ac_cv_path_ECHO+:} false; then :
7415  $as_echo_n "(cached) " >&6
7416else
7417  case $ECHO in
7418  [\\/]* | ?:[\\/]*)
7419  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7420  ;;
7421  *)
7422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7423for as_dir in $PATH
7424do
7425  IFS=$as_save_IFS
7426  test -z "$as_dir" && as_dir=.
7427    for ac_exec_ext in '' $ac_executable_extensions; do
7428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7429    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7431    break 2
7432  fi
7433done
7434  done
7435IFS=$as_save_IFS
7436
7437  ;;
7438esac
7439fi
7440ECHO=$ac_cv_path_ECHO
7441if test -n "$ECHO"; then
7442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7443$as_echo "$ECHO" >&6; }
7444else
7445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7446$as_echo "no" >&6; }
7447fi
7448
7449
7450  test -n "$ECHO" && break
7451done
7452
7453  else
7454    # The variable is set, but is it from the command line or the environment?
7455
7456    # Try to remove the string !ECHO! from our list.
7457    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7458    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7459      # If it failed, the variable was not from the command line. Ignore it,
7460      # but warn the user (except for BASH, which is always set by the calling BASH).
7461      if test "xECHO" != xBASH; then
7462        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7463$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7464      fi
7465      # Try to locate tool using the code snippet
7466      for ac_prog in echo
7467do
7468  # Extract the first word of "$ac_prog", so it can be a program name with args.
7469set dummy $ac_prog; ac_word=$2
7470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7471$as_echo_n "checking for $ac_word... " >&6; }
7472if ${ac_cv_path_ECHO+:} false; then :
7473  $as_echo_n "(cached) " >&6
7474else
7475  case $ECHO in
7476  [\\/]* | ?:[\\/]*)
7477  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7478  ;;
7479  *)
7480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7481for as_dir in $PATH
7482do
7483  IFS=$as_save_IFS
7484  test -z "$as_dir" && as_dir=.
7485    for ac_exec_ext in '' $ac_executable_extensions; do
7486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7487    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7489    break 2
7490  fi
7491done
7492  done
7493IFS=$as_save_IFS
7494
7495  ;;
7496esac
7497fi
7498ECHO=$ac_cv_path_ECHO
7499if test -n "$ECHO"; then
7500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7501$as_echo "$ECHO" >&6; }
7502else
7503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7504$as_echo "no" >&6; }
7505fi
7506
7507
7508  test -n "$ECHO" && break
7509done
7510
7511    else
7512      # If it succeeded, then it was overridden by the user. We will use it
7513      # for the tool.
7514
7515      # First remove it from the list of overridden variables, so we can test
7516      # for unknown variables in the end.
7517      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7518
7519      # Check if we try to supply an empty value
7520      if test "x$ECHO" = x; then
7521        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7522$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7523        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7524$as_echo_n "checking for ECHO... " >&6; }
7525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7526$as_echo "disabled" >&6; }
7527      else
7528        # Check if the provided tool contains a complete path.
7529        tool_specified="$ECHO"
7530        tool_basename="${tool_specified##*/}"
7531        if test "x$tool_basename" = "x$tool_specified"; then
7532          # A command without a complete path is provided, search $PATH.
7533          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7534$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7535          # Extract the first word of "$tool_basename", so it can be a program name with args.
7536set dummy $tool_basename; ac_word=$2
7537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7538$as_echo_n "checking for $ac_word... " >&6; }
7539if ${ac_cv_path_ECHO+:} false; then :
7540  $as_echo_n "(cached) " >&6
7541else
7542  case $ECHO in
7543  [\\/]* | ?:[\\/]*)
7544  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7545  ;;
7546  *)
7547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7548for as_dir in $PATH
7549do
7550  IFS=$as_save_IFS
7551  test -z "$as_dir" && as_dir=.
7552    for ac_exec_ext in '' $ac_executable_extensions; do
7553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7554    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7556    break 2
7557  fi
7558done
7559  done
7560IFS=$as_save_IFS
7561
7562  ;;
7563esac
7564fi
7565ECHO=$ac_cv_path_ECHO
7566if test -n "$ECHO"; then
7567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7568$as_echo "$ECHO" >&6; }
7569else
7570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7571$as_echo "no" >&6; }
7572fi
7573
7574
7575          if test "x$ECHO" = x; then
7576            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7577          fi
7578        else
7579          # Otherwise we believe it is a complete path. Use it as it is.
7580          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7581$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7582          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7583$as_echo_n "checking for ECHO... " >&6; }
7584          if test ! -x "$tool_specified"; then
7585            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7586$as_echo "not found" >&6; }
7587            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7588          fi
7589          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7590$as_echo "$tool_specified" >&6; }
7591        fi
7592      fi
7593    fi
7594
7595  fi
7596
7597
7598
7599  if test "x$ECHO" = x; then
7600    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7601  fi
7602
7603
7604
7605
7606
7607  # Publish this variable in the help.
7608
7609
7610  if [ -z "${EXPR+x}" ]; then
7611    # The variable is not set by user, try to locate tool using the code snippet
7612    for ac_prog in expr
7613do
7614  # Extract the first word of "$ac_prog", so it can be a program name with args.
7615set dummy $ac_prog; ac_word=$2
7616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7617$as_echo_n "checking for $ac_word... " >&6; }
7618if ${ac_cv_path_EXPR+:} false; then :
7619  $as_echo_n "(cached) " >&6
7620else
7621  case $EXPR in
7622  [\\/]* | ?:[\\/]*)
7623  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7624  ;;
7625  *)
7626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7627for as_dir in $PATH
7628do
7629  IFS=$as_save_IFS
7630  test -z "$as_dir" && as_dir=.
7631    for ac_exec_ext in '' $ac_executable_extensions; do
7632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7633    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7635    break 2
7636  fi
7637done
7638  done
7639IFS=$as_save_IFS
7640
7641  ;;
7642esac
7643fi
7644EXPR=$ac_cv_path_EXPR
7645if test -n "$EXPR"; then
7646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7647$as_echo "$EXPR" >&6; }
7648else
7649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7650$as_echo "no" >&6; }
7651fi
7652
7653
7654  test -n "$EXPR" && break
7655done
7656
7657  else
7658    # The variable is set, but is it from the command line or the environment?
7659
7660    # Try to remove the string !EXPR! from our list.
7661    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7662    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7663      # If it failed, the variable was not from the command line. Ignore it,
7664      # but warn the user (except for BASH, which is always set by the calling BASH).
7665      if test "xEXPR" != xBASH; then
7666        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7667$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7668      fi
7669      # Try to locate tool using the code snippet
7670      for ac_prog in expr
7671do
7672  # Extract the first word of "$ac_prog", so it can be a program name with args.
7673set dummy $ac_prog; ac_word=$2
7674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7675$as_echo_n "checking for $ac_word... " >&6; }
7676if ${ac_cv_path_EXPR+:} false; then :
7677  $as_echo_n "(cached) " >&6
7678else
7679  case $EXPR in
7680  [\\/]* | ?:[\\/]*)
7681  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7682  ;;
7683  *)
7684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7685for as_dir in $PATH
7686do
7687  IFS=$as_save_IFS
7688  test -z "$as_dir" && as_dir=.
7689    for ac_exec_ext in '' $ac_executable_extensions; do
7690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7691    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7693    break 2
7694  fi
7695done
7696  done
7697IFS=$as_save_IFS
7698
7699  ;;
7700esac
7701fi
7702EXPR=$ac_cv_path_EXPR
7703if test -n "$EXPR"; then
7704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7705$as_echo "$EXPR" >&6; }
7706else
7707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7708$as_echo "no" >&6; }
7709fi
7710
7711
7712  test -n "$EXPR" && break
7713done
7714
7715    else
7716      # If it succeeded, then it was overridden by the user. We will use it
7717      # for the tool.
7718
7719      # First remove it from the list of overridden variables, so we can test
7720      # for unknown variables in the end.
7721      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7722
7723      # Check if we try to supply an empty value
7724      if test "x$EXPR" = x; then
7725        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7726$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7727        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7728$as_echo_n "checking for EXPR... " >&6; }
7729        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7730$as_echo "disabled" >&6; }
7731      else
7732        # Check if the provided tool contains a complete path.
7733        tool_specified="$EXPR"
7734        tool_basename="${tool_specified##*/}"
7735        if test "x$tool_basename" = "x$tool_specified"; then
7736          # A command without a complete path is provided, search $PATH.
7737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7738$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7739          # Extract the first word of "$tool_basename", so it can be a program name with args.
7740set dummy $tool_basename; ac_word=$2
7741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7742$as_echo_n "checking for $ac_word... " >&6; }
7743if ${ac_cv_path_EXPR+:} false; then :
7744  $as_echo_n "(cached) " >&6
7745else
7746  case $EXPR in
7747  [\\/]* | ?:[\\/]*)
7748  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7749  ;;
7750  *)
7751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7752for as_dir in $PATH
7753do
7754  IFS=$as_save_IFS
7755  test -z "$as_dir" && as_dir=.
7756    for ac_exec_ext in '' $ac_executable_extensions; do
7757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7758    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7760    break 2
7761  fi
7762done
7763  done
7764IFS=$as_save_IFS
7765
7766  ;;
7767esac
7768fi
7769EXPR=$ac_cv_path_EXPR
7770if test -n "$EXPR"; then
7771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7772$as_echo "$EXPR" >&6; }
7773else
7774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7775$as_echo "no" >&6; }
7776fi
7777
7778
7779          if test "x$EXPR" = x; then
7780            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7781          fi
7782        else
7783          # Otherwise we believe it is a complete path. Use it as it is.
7784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7785$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7786          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7787$as_echo_n "checking for EXPR... " >&6; }
7788          if test ! -x "$tool_specified"; then
7789            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7790$as_echo "not found" >&6; }
7791            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7792          fi
7793          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7794$as_echo "$tool_specified" >&6; }
7795        fi
7796      fi
7797    fi
7798
7799  fi
7800
7801
7802
7803  if test "x$EXPR" = x; then
7804    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7805  fi
7806
7807
7808
7809
7810
7811  # Publish this variable in the help.
7812
7813
7814  if [ -z "${FILE+x}" ]; then
7815    # The variable is not set by user, try to locate tool using the code snippet
7816    for ac_prog in file
7817do
7818  # Extract the first word of "$ac_prog", so it can be a program name with args.
7819set dummy $ac_prog; ac_word=$2
7820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7821$as_echo_n "checking for $ac_word... " >&6; }
7822if ${ac_cv_path_FILE+:} false; then :
7823  $as_echo_n "(cached) " >&6
7824else
7825  case $FILE in
7826  [\\/]* | ?:[\\/]*)
7827  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7828  ;;
7829  *)
7830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7831for as_dir in $PATH
7832do
7833  IFS=$as_save_IFS
7834  test -z "$as_dir" && as_dir=.
7835    for ac_exec_ext in '' $ac_executable_extensions; do
7836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7837    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7839    break 2
7840  fi
7841done
7842  done
7843IFS=$as_save_IFS
7844
7845  ;;
7846esac
7847fi
7848FILE=$ac_cv_path_FILE
7849if test -n "$FILE"; then
7850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7851$as_echo "$FILE" >&6; }
7852else
7853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7854$as_echo "no" >&6; }
7855fi
7856
7857
7858  test -n "$FILE" && break
7859done
7860
7861  else
7862    # The variable is set, but is it from the command line or the environment?
7863
7864    # Try to remove the string !FILE! from our list.
7865    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7866    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7867      # If it failed, the variable was not from the command line. Ignore it,
7868      # but warn the user (except for BASH, which is always set by the calling BASH).
7869      if test "xFILE" != xBASH; then
7870        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7871$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7872      fi
7873      # Try to locate tool using the code snippet
7874      for ac_prog in file
7875do
7876  # Extract the first word of "$ac_prog", so it can be a program name with args.
7877set dummy $ac_prog; ac_word=$2
7878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7879$as_echo_n "checking for $ac_word... " >&6; }
7880if ${ac_cv_path_FILE+:} false; then :
7881  $as_echo_n "(cached) " >&6
7882else
7883  case $FILE in
7884  [\\/]* | ?:[\\/]*)
7885  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7886  ;;
7887  *)
7888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7889for as_dir in $PATH
7890do
7891  IFS=$as_save_IFS
7892  test -z "$as_dir" && as_dir=.
7893    for ac_exec_ext in '' $ac_executable_extensions; do
7894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7895    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7897    break 2
7898  fi
7899done
7900  done
7901IFS=$as_save_IFS
7902
7903  ;;
7904esac
7905fi
7906FILE=$ac_cv_path_FILE
7907if test -n "$FILE"; then
7908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7909$as_echo "$FILE" >&6; }
7910else
7911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7912$as_echo "no" >&6; }
7913fi
7914
7915
7916  test -n "$FILE" && break
7917done
7918
7919    else
7920      # If it succeeded, then it was overridden by the user. We will use it
7921      # for the tool.
7922
7923      # First remove it from the list of overridden variables, so we can test
7924      # for unknown variables in the end.
7925      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7926
7927      # Check if we try to supply an empty value
7928      if test "x$FILE" = x; then
7929        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7930$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7932$as_echo_n "checking for FILE... " >&6; }
7933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7934$as_echo "disabled" >&6; }
7935      else
7936        # Check if the provided tool contains a complete path.
7937        tool_specified="$FILE"
7938        tool_basename="${tool_specified##*/}"
7939        if test "x$tool_basename" = "x$tool_specified"; then
7940          # A command without a complete path is provided, search $PATH.
7941          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7942$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7943          # Extract the first word of "$tool_basename", so it can be a program name with args.
7944set dummy $tool_basename; ac_word=$2
7945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7946$as_echo_n "checking for $ac_word... " >&6; }
7947if ${ac_cv_path_FILE+:} false; then :
7948  $as_echo_n "(cached) " >&6
7949else
7950  case $FILE in
7951  [\\/]* | ?:[\\/]*)
7952  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7953  ;;
7954  *)
7955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7956for as_dir in $PATH
7957do
7958  IFS=$as_save_IFS
7959  test -z "$as_dir" && as_dir=.
7960    for ac_exec_ext in '' $ac_executable_extensions; do
7961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7962    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7964    break 2
7965  fi
7966done
7967  done
7968IFS=$as_save_IFS
7969
7970  ;;
7971esac
7972fi
7973FILE=$ac_cv_path_FILE
7974if test -n "$FILE"; then
7975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7976$as_echo "$FILE" >&6; }
7977else
7978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7979$as_echo "no" >&6; }
7980fi
7981
7982
7983          if test "x$FILE" = x; then
7984            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7985          fi
7986        else
7987          # Otherwise we believe it is a complete path. Use it as it is.
7988          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7989$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7990          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7991$as_echo_n "checking for FILE... " >&6; }
7992          if test ! -x "$tool_specified"; then
7993            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7994$as_echo "not found" >&6; }
7995            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7996          fi
7997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7998$as_echo "$tool_specified" >&6; }
7999        fi
8000      fi
8001    fi
8002
8003  fi
8004
8005
8006
8007  if test "x$FILE" = x; then
8008    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8009  fi
8010
8011
8012
8013
8014
8015  # Publish this variable in the help.
8016
8017
8018  if [ -z "${FIND+x}" ]; then
8019    # The variable is not set by user, try to locate tool using the code snippet
8020    for ac_prog in find
8021do
8022  # Extract the first word of "$ac_prog", so it can be a program name with args.
8023set dummy $ac_prog; ac_word=$2
8024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8025$as_echo_n "checking for $ac_word... " >&6; }
8026if ${ac_cv_path_FIND+:} false; then :
8027  $as_echo_n "(cached) " >&6
8028else
8029  case $FIND in
8030  [\\/]* | ?:[\\/]*)
8031  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8032  ;;
8033  *)
8034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8035for as_dir in $PATH
8036do
8037  IFS=$as_save_IFS
8038  test -z "$as_dir" && as_dir=.
8039    for ac_exec_ext in '' $ac_executable_extensions; do
8040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8041    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8043    break 2
8044  fi
8045done
8046  done
8047IFS=$as_save_IFS
8048
8049  ;;
8050esac
8051fi
8052FIND=$ac_cv_path_FIND
8053if test -n "$FIND"; then
8054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8055$as_echo "$FIND" >&6; }
8056else
8057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8058$as_echo "no" >&6; }
8059fi
8060
8061
8062  test -n "$FIND" && break
8063done
8064
8065  else
8066    # The variable is set, but is it from the command line or the environment?
8067
8068    # Try to remove the string !FIND! from our list.
8069    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8070    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8071      # If it failed, the variable was not from the command line. Ignore it,
8072      # but warn the user (except for BASH, which is always set by the calling BASH).
8073      if test "xFIND" != xBASH; then
8074        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8075$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8076      fi
8077      # Try to locate tool using the code snippet
8078      for ac_prog in find
8079do
8080  # Extract the first word of "$ac_prog", so it can be a program name with args.
8081set dummy $ac_prog; ac_word=$2
8082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8083$as_echo_n "checking for $ac_word... " >&6; }
8084if ${ac_cv_path_FIND+:} false; then :
8085  $as_echo_n "(cached) " >&6
8086else
8087  case $FIND in
8088  [\\/]* | ?:[\\/]*)
8089  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8090  ;;
8091  *)
8092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8093for as_dir in $PATH
8094do
8095  IFS=$as_save_IFS
8096  test -z "$as_dir" && as_dir=.
8097    for ac_exec_ext in '' $ac_executable_extensions; do
8098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8099    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8101    break 2
8102  fi
8103done
8104  done
8105IFS=$as_save_IFS
8106
8107  ;;
8108esac
8109fi
8110FIND=$ac_cv_path_FIND
8111if test -n "$FIND"; then
8112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8113$as_echo "$FIND" >&6; }
8114else
8115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8116$as_echo "no" >&6; }
8117fi
8118
8119
8120  test -n "$FIND" && break
8121done
8122
8123    else
8124      # If it succeeded, then it was overridden by the user. We will use it
8125      # for the tool.
8126
8127      # First remove it from the list of overridden variables, so we can test
8128      # for unknown variables in the end.
8129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8130
8131      # Check if we try to supply an empty value
8132      if test "x$FIND" = x; then
8133        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8134$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8135        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8136$as_echo_n "checking for FIND... " >&6; }
8137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8138$as_echo "disabled" >&6; }
8139      else
8140        # Check if the provided tool contains a complete path.
8141        tool_specified="$FIND"
8142        tool_basename="${tool_specified##*/}"
8143        if test "x$tool_basename" = "x$tool_specified"; then
8144          # A command without a complete path is provided, search $PATH.
8145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8146$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8147          # Extract the first word of "$tool_basename", so it can be a program name with args.
8148set dummy $tool_basename; ac_word=$2
8149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8150$as_echo_n "checking for $ac_word... " >&6; }
8151if ${ac_cv_path_FIND+:} false; then :
8152  $as_echo_n "(cached) " >&6
8153else
8154  case $FIND in
8155  [\\/]* | ?:[\\/]*)
8156  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8157  ;;
8158  *)
8159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8160for as_dir in $PATH
8161do
8162  IFS=$as_save_IFS
8163  test -z "$as_dir" && as_dir=.
8164    for ac_exec_ext in '' $ac_executable_extensions; do
8165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8166    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8168    break 2
8169  fi
8170done
8171  done
8172IFS=$as_save_IFS
8173
8174  ;;
8175esac
8176fi
8177FIND=$ac_cv_path_FIND
8178if test -n "$FIND"; then
8179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8180$as_echo "$FIND" >&6; }
8181else
8182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8183$as_echo "no" >&6; }
8184fi
8185
8186
8187          if test "x$FIND" = x; then
8188            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8189          fi
8190        else
8191          # Otherwise we believe it is a complete path. Use it as it is.
8192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8193$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8194          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8195$as_echo_n "checking for FIND... " >&6; }
8196          if test ! -x "$tool_specified"; then
8197            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8198$as_echo "not found" >&6; }
8199            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8200          fi
8201          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8202$as_echo "$tool_specified" >&6; }
8203        fi
8204      fi
8205    fi
8206
8207  fi
8208
8209
8210
8211  if test "x$FIND" = x; then
8212    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8213  fi
8214
8215
8216
8217
8218
8219  # Publish this variable in the help.
8220
8221
8222  if [ -z "${HEAD+x}" ]; then
8223    # The variable is not set by user, try to locate tool using the code snippet
8224    for ac_prog in head
8225do
8226  # Extract the first word of "$ac_prog", so it can be a program name with args.
8227set dummy $ac_prog; ac_word=$2
8228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8229$as_echo_n "checking for $ac_word... " >&6; }
8230if ${ac_cv_path_HEAD+:} false; then :
8231  $as_echo_n "(cached) " >&6
8232else
8233  case $HEAD in
8234  [\\/]* | ?:[\\/]*)
8235  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8236  ;;
8237  *)
8238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8239for as_dir in $PATH
8240do
8241  IFS=$as_save_IFS
8242  test -z "$as_dir" && as_dir=.
8243    for ac_exec_ext in '' $ac_executable_extensions; do
8244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8245    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8247    break 2
8248  fi
8249done
8250  done
8251IFS=$as_save_IFS
8252
8253  ;;
8254esac
8255fi
8256HEAD=$ac_cv_path_HEAD
8257if test -n "$HEAD"; then
8258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8259$as_echo "$HEAD" >&6; }
8260else
8261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8262$as_echo "no" >&6; }
8263fi
8264
8265
8266  test -n "$HEAD" && break
8267done
8268
8269  else
8270    # The variable is set, but is it from the command line or the environment?
8271
8272    # Try to remove the string !HEAD! from our list.
8273    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8274    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8275      # If it failed, the variable was not from the command line. Ignore it,
8276      # but warn the user (except for BASH, which is always set by the calling BASH).
8277      if test "xHEAD" != xBASH; then
8278        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8279$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8280      fi
8281      # Try to locate tool using the code snippet
8282      for ac_prog in head
8283do
8284  # Extract the first word of "$ac_prog", so it can be a program name with args.
8285set dummy $ac_prog; ac_word=$2
8286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8287$as_echo_n "checking for $ac_word... " >&6; }
8288if ${ac_cv_path_HEAD+:} false; then :
8289  $as_echo_n "(cached) " >&6
8290else
8291  case $HEAD in
8292  [\\/]* | ?:[\\/]*)
8293  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8294  ;;
8295  *)
8296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8297for as_dir in $PATH
8298do
8299  IFS=$as_save_IFS
8300  test -z "$as_dir" && as_dir=.
8301    for ac_exec_ext in '' $ac_executable_extensions; do
8302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8303    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8305    break 2
8306  fi
8307done
8308  done
8309IFS=$as_save_IFS
8310
8311  ;;
8312esac
8313fi
8314HEAD=$ac_cv_path_HEAD
8315if test -n "$HEAD"; then
8316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8317$as_echo "$HEAD" >&6; }
8318else
8319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8320$as_echo "no" >&6; }
8321fi
8322
8323
8324  test -n "$HEAD" && break
8325done
8326
8327    else
8328      # If it succeeded, then it was overridden by the user. We will use it
8329      # for the tool.
8330
8331      # First remove it from the list of overridden variables, so we can test
8332      # for unknown variables in the end.
8333      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8334
8335      # Check if we try to supply an empty value
8336      if test "x$HEAD" = x; then
8337        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8338$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8339        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8340$as_echo_n "checking for HEAD... " >&6; }
8341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8342$as_echo "disabled" >&6; }
8343      else
8344        # Check if the provided tool contains a complete path.
8345        tool_specified="$HEAD"
8346        tool_basename="${tool_specified##*/}"
8347        if test "x$tool_basename" = "x$tool_specified"; then
8348          # A command without a complete path is provided, search $PATH.
8349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8350$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8351          # Extract the first word of "$tool_basename", so it can be a program name with args.
8352set dummy $tool_basename; ac_word=$2
8353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8354$as_echo_n "checking for $ac_word... " >&6; }
8355if ${ac_cv_path_HEAD+:} false; then :
8356  $as_echo_n "(cached) " >&6
8357else
8358  case $HEAD in
8359  [\\/]* | ?:[\\/]*)
8360  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8361  ;;
8362  *)
8363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8364for as_dir in $PATH
8365do
8366  IFS=$as_save_IFS
8367  test -z "$as_dir" && as_dir=.
8368    for ac_exec_ext in '' $ac_executable_extensions; do
8369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8370    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8372    break 2
8373  fi
8374done
8375  done
8376IFS=$as_save_IFS
8377
8378  ;;
8379esac
8380fi
8381HEAD=$ac_cv_path_HEAD
8382if test -n "$HEAD"; then
8383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8384$as_echo "$HEAD" >&6; }
8385else
8386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8387$as_echo "no" >&6; }
8388fi
8389
8390
8391          if test "x$HEAD" = x; then
8392            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8393          fi
8394        else
8395          # Otherwise we believe it is a complete path. Use it as it is.
8396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8397$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8398          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8399$as_echo_n "checking for HEAD... " >&6; }
8400          if test ! -x "$tool_specified"; then
8401            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8402$as_echo "not found" >&6; }
8403            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8404          fi
8405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8406$as_echo "$tool_specified" >&6; }
8407        fi
8408      fi
8409    fi
8410
8411  fi
8412
8413
8414
8415  if test "x$HEAD" = x; then
8416    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8417  fi
8418
8419
8420
8421
8422
8423  # Publish this variable in the help.
8424
8425
8426  if [ -z "${GUNZIP+x}" ]; then
8427    # The variable is not set by user, try to locate tool using the code snippet
8428    for ac_prog in gunzip
8429do
8430  # Extract the first word of "$ac_prog", so it can be a program name with args.
8431set dummy $ac_prog; ac_word=$2
8432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8433$as_echo_n "checking for $ac_word... " >&6; }
8434if ${ac_cv_path_GUNZIP+:} false; then :
8435  $as_echo_n "(cached) " >&6
8436else
8437  case $GUNZIP in
8438  [\\/]* | ?:[\\/]*)
8439  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8440  ;;
8441  *)
8442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8443for as_dir in $PATH
8444do
8445  IFS=$as_save_IFS
8446  test -z "$as_dir" && as_dir=.
8447    for ac_exec_ext in '' $ac_executable_extensions; do
8448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8449    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8451    break 2
8452  fi
8453done
8454  done
8455IFS=$as_save_IFS
8456
8457  ;;
8458esac
8459fi
8460GUNZIP=$ac_cv_path_GUNZIP
8461if test -n "$GUNZIP"; then
8462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8463$as_echo "$GUNZIP" >&6; }
8464else
8465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8466$as_echo "no" >&6; }
8467fi
8468
8469
8470  test -n "$GUNZIP" && break
8471done
8472
8473  else
8474    # The variable is set, but is it from the command line or the environment?
8475
8476    # Try to remove the string !GUNZIP! from our list.
8477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8479      # If it failed, the variable was not from the command line. Ignore it,
8480      # but warn the user (except for BASH, which is always set by the calling BASH).
8481      if test "xGUNZIP" != xBASH; then
8482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8483$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8484      fi
8485      # Try to locate tool using the code snippet
8486      for ac_prog in gunzip
8487do
8488  # Extract the first word of "$ac_prog", so it can be a program name with args.
8489set dummy $ac_prog; ac_word=$2
8490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8491$as_echo_n "checking for $ac_word... " >&6; }
8492if ${ac_cv_path_GUNZIP+:} false; then :
8493  $as_echo_n "(cached) " >&6
8494else
8495  case $GUNZIP in
8496  [\\/]* | ?:[\\/]*)
8497  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8498  ;;
8499  *)
8500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8501for as_dir in $PATH
8502do
8503  IFS=$as_save_IFS
8504  test -z "$as_dir" && as_dir=.
8505    for ac_exec_ext in '' $ac_executable_extensions; do
8506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8507    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8509    break 2
8510  fi
8511done
8512  done
8513IFS=$as_save_IFS
8514
8515  ;;
8516esac
8517fi
8518GUNZIP=$ac_cv_path_GUNZIP
8519if test -n "$GUNZIP"; then
8520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8521$as_echo "$GUNZIP" >&6; }
8522else
8523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8524$as_echo "no" >&6; }
8525fi
8526
8527
8528  test -n "$GUNZIP" && break
8529done
8530
8531    else
8532      # If it succeeded, then it was overridden by the user. We will use it
8533      # for the tool.
8534
8535      # First remove it from the list of overridden variables, so we can test
8536      # for unknown variables in the end.
8537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8538
8539      # Check if we try to supply an empty value
8540      if test "x$GUNZIP" = x; then
8541        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8542$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8544$as_echo_n "checking for GUNZIP... " >&6; }
8545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8546$as_echo "disabled" >&6; }
8547      else
8548        # Check if the provided tool contains a complete path.
8549        tool_specified="$GUNZIP"
8550        tool_basename="${tool_specified##*/}"
8551        if test "x$tool_basename" = "x$tool_specified"; then
8552          # A command without a complete path is provided, search $PATH.
8553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8554$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8555          # Extract the first word of "$tool_basename", so it can be a program name with args.
8556set dummy $tool_basename; ac_word=$2
8557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8558$as_echo_n "checking for $ac_word... " >&6; }
8559if ${ac_cv_path_GUNZIP+:} false; then :
8560  $as_echo_n "(cached) " >&6
8561else
8562  case $GUNZIP in
8563  [\\/]* | ?:[\\/]*)
8564  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8565  ;;
8566  *)
8567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8568for as_dir in $PATH
8569do
8570  IFS=$as_save_IFS
8571  test -z "$as_dir" && as_dir=.
8572    for ac_exec_ext in '' $ac_executable_extensions; do
8573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8574    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8576    break 2
8577  fi
8578done
8579  done
8580IFS=$as_save_IFS
8581
8582  ;;
8583esac
8584fi
8585GUNZIP=$ac_cv_path_GUNZIP
8586if test -n "$GUNZIP"; then
8587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8588$as_echo "$GUNZIP" >&6; }
8589else
8590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8591$as_echo "no" >&6; }
8592fi
8593
8594
8595          if test "x$GUNZIP" = x; then
8596            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8597          fi
8598        else
8599          # Otherwise we believe it is a complete path. Use it as it is.
8600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8601$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8602          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8603$as_echo_n "checking for GUNZIP... " >&6; }
8604          if test ! -x "$tool_specified"; then
8605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8606$as_echo "not found" >&6; }
8607            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8608          fi
8609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8610$as_echo "$tool_specified" >&6; }
8611        fi
8612      fi
8613    fi
8614
8615  fi
8616
8617
8618
8619  if test "x$GUNZIP" = x; then
8620    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8621  fi
8622
8623
8624
8625
8626
8627  # Publish this variable in the help.
8628
8629
8630  if [ -z "${GZIP+x}" ]; then
8631    # The variable is not set by user, try to locate tool using the code snippet
8632    for ac_prog in pigz gzip
8633do
8634  # Extract the first word of "$ac_prog", so it can be a program name with args.
8635set dummy $ac_prog; ac_word=$2
8636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8637$as_echo_n "checking for $ac_word... " >&6; }
8638if ${ac_cv_path_GZIP+:} false; then :
8639  $as_echo_n "(cached) " >&6
8640else
8641  case $GZIP in
8642  [\\/]* | ?:[\\/]*)
8643  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8644  ;;
8645  *)
8646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8647for as_dir in $PATH
8648do
8649  IFS=$as_save_IFS
8650  test -z "$as_dir" && as_dir=.
8651    for ac_exec_ext in '' $ac_executable_extensions; do
8652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8653    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8655    break 2
8656  fi
8657done
8658  done
8659IFS=$as_save_IFS
8660
8661  ;;
8662esac
8663fi
8664GZIP=$ac_cv_path_GZIP
8665if test -n "$GZIP"; then
8666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8667$as_echo "$GZIP" >&6; }
8668else
8669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8670$as_echo "no" >&6; }
8671fi
8672
8673
8674  test -n "$GZIP" && break
8675done
8676
8677  else
8678    # The variable is set, but is it from the command line or the environment?
8679
8680    # Try to remove the string !GZIP! from our list.
8681    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8682    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8683      # If it failed, the variable was not from the command line. Ignore it,
8684      # but warn the user (except for BASH, which is always set by the calling BASH).
8685      if test "xGZIP" != xBASH; then
8686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8687$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8688      fi
8689      # Try to locate tool using the code snippet
8690      for ac_prog in pigz gzip
8691do
8692  # Extract the first word of "$ac_prog", so it can be a program name with args.
8693set dummy $ac_prog; ac_word=$2
8694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8695$as_echo_n "checking for $ac_word... " >&6; }
8696if ${ac_cv_path_GZIP+:} false; then :
8697  $as_echo_n "(cached) " >&6
8698else
8699  case $GZIP in
8700  [\\/]* | ?:[\\/]*)
8701  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8702  ;;
8703  *)
8704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8705for as_dir in $PATH
8706do
8707  IFS=$as_save_IFS
8708  test -z "$as_dir" && as_dir=.
8709    for ac_exec_ext in '' $ac_executable_extensions; do
8710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8711    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8713    break 2
8714  fi
8715done
8716  done
8717IFS=$as_save_IFS
8718
8719  ;;
8720esac
8721fi
8722GZIP=$ac_cv_path_GZIP
8723if test -n "$GZIP"; then
8724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8725$as_echo "$GZIP" >&6; }
8726else
8727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8728$as_echo "no" >&6; }
8729fi
8730
8731
8732  test -n "$GZIP" && break
8733done
8734
8735    else
8736      # If it succeeded, then it was overridden by the user. We will use it
8737      # for the tool.
8738
8739      # First remove it from the list of overridden variables, so we can test
8740      # for unknown variables in the end.
8741      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8742
8743      # Check if we try to supply an empty value
8744      if test "x$GZIP" = x; then
8745        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8746$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8748$as_echo_n "checking for GZIP... " >&6; }
8749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8750$as_echo "disabled" >&6; }
8751      else
8752        # Check if the provided tool contains a complete path.
8753        tool_specified="$GZIP"
8754        tool_basename="${tool_specified##*/}"
8755        if test "x$tool_basename" = "x$tool_specified"; then
8756          # A command without a complete path is provided, search $PATH.
8757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8758$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8759          # Extract the first word of "$tool_basename", so it can be a program name with args.
8760set dummy $tool_basename; ac_word=$2
8761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8762$as_echo_n "checking for $ac_word... " >&6; }
8763if ${ac_cv_path_GZIP+:} false; then :
8764  $as_echo_n "(cached) " >&6
8765else
8766  case $GZIP in
8767  [\\/]* | ?:[\\/]*)
8768  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8769  ;;
8770  *)
8771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8772for as_dir in $PATH
8773do
8774  IFS=$as_save_IFS
8775  test -z "$as_dir" && as_dir=.
8776    for ac_exec_ext in '' $ac_executable_extensions; do
8777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8778    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8780    break 2
8781  fi
8782done
8783  done
8784IFS=$as_save_IFS
8785
8786  ;;
8787esac
8788fi
8789GZIP=$ac_cv_path_GZIP
8790if test -n "$GZIP"; then
8791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8792$as_echo "$GZIP" >&6; }
8793else
8794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8795$as_echo "no" >&6; }
8796fi
8797
8798
8799          if test "x$GZIP" = x; then
8800            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8801          fi
8802        else
8803          # Otherwise we believe it is a complete path. Use it as it is.
8804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8805$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8806          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8807$as_echo_n "checking for GZIP... " >&6; }
8808          if test ! -x "$tool_specified"; then
8809            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8810$as_echo "not found" >&6; }
8811            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8812          fi
8813          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8814$as_echo "$tool_specified" >&6; }
8815        fi
8816      fi
8817    fi
8818
8819  fi
8820
8821
8822
8823  if test "x$GZIP" = x; then
8824    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8825  fi
8826
8827
8828
8829
8830
8831  # Publish this variable in the help.
8832
8833
8834  if [ -z "${LN+x}" ]; then
8835    # The variable is not set by user, try to locate tool using the code snippet
8836    for ac_prog in ln
8837do
8838  # Extract the first word of "$ac_prog", so it can be a program name with args.
8839set dummy $ac_prog; ac_word=$2
8840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8841$as_echo_n "checking for $ac_word... " >&6; }
8842if ${ac_cv_path_LN+:} false; then :
8843  $as_echo_n "(cached) " >&6
8844else
8845  case $LN in
8846  [\\/]* | ?:[\\/]*)
8847  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8848  ;;
8849  *)
8850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8851for as_dir in $PATH
8852do
8853  IFS=$as_save_IFS
8854  test -z "$as_dir" && as_dir=.
8855    for ac_exec_ext in '' $ac_executable_extensions; do
8856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8857    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8859    break 2
8860  fi
8861done
8862  done
8863IFS=$as_save_IFS
8864
8865  ;;
8866esac
8867fi
8868LN=$ac_cv_path_LN
8869if test -n "$LN"; then
8870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8871$as_echo "$LN" >&6; }
8872else
8873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8874$as_echo "no" >&6; }
8875fi
8876
8877
8878  test -n "$LN" && break
8879done
8880
8881  else
8882    # The variable is set, but is it from the command line or the environment?
8883
8884    # Try to remove the string !LN! from our list.
8885    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8886    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8887      # If it failed, the variable was not from the command line. Ignore it,
8888      # but warn the user (except for BASH, which is always set by the calling BASH).
8889      if test "xLN" != xBASH; then
8890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8891$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8892      fi
8893      # Try to locate tool using the code snippet
8894      for ac_prog in ln
8895do
8896  # Extract the first word of "$ac_prog", so it can be a program name with args.
8897set dummy $ac_prog; ac_word=$2
8898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8899$as_echo_n "checking for $ac_word... " >&6; }
8900if ${ac_cv_path_LN+:} false; then :
8901  $as_echo_n "(cached) " >&6
8902else
8903  case $LN in
8904  [\\/]* | ?:[\\/]*)
8905  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8906  ;;
8907  *)
8908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8909for as_dir in $PATH
8910do
8911  IFS=$as_save_IFS
8912  test -z "$as_dir" && as_dir=.
8913    for ac_exec_ext in '' $ac_executable_extensions; do
8914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8915    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8917    break 2
8918  fi
8919done
8920  done
8921IFS=$as_save_IFS
8922
8923  ;;
8924esac
8925fi
8926LN=$ac_cv_path_LN
8927if test -n "$LN"; then
8928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8929$as_echo "$LN" >&6; }
8930else
8931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8932$as_echo "no" >&6; }
8933fi
8934
8935
8936  test -n "$LN" && break
8937done
8938
8939    else
8940      # If it succeeded, then it was overridden by the user. We will use it
8941      # for the tool.
8942
8943      # First remove it from the list of overridden variables, so we can test
8944      # for unknown variables in the end.
8945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8946
8947      # Check if we try to supply an empty value
8948      if test "x$LN" = x; then
8949        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8950$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8952$as_echo_n "checking for LN... " >&6; }
8953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8954$as_echo "disabled" >&6; }
8955      else
8956        # Check if the provided tool contains a complete path.
8957        tool_specified="$LN"
8958        tool_basename="${tool_specified##*/}"
8959        if test "x$tool_basename" = "x$tool_specified"; then
8960          # A command without a complete path is provided, search $PATH.
8961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8962$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8963          # Extract the first word of "$tool_basename", so it can be a program name with args.
8964set dummy $tool_basename; ac_word=$2
8965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8966$as_echo_n "checking for $ac_word... " >&6; }
8967if ${ac_cv_path_LN+:} false; then :
8968  $as_echo_n "(cached) " >&6
8969else
8970  case $LN in
8971  [\\/]* | ?:[\\/]*)
8972  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8973  ;;
8974  *)
8975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8976for as_dir in $PATH
8977do
8978  IFS=$as_save_IFS
8979  test -z "$as_dir" && as_dir=.
8980    for ac_exec_ext in '' $ac_executable_extensions; do
8981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8982    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8984    break 2
8985  fi
8986done
8987  done
8988IFS=$as_save_IFS
8989
8990  ;;
8991esac
8992fi
8993LN=$ac_cv_path_LN
8994if test -n "$LN"; then
8995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8996$as_echo "$LN" >&6; }
8997else
8998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8999$as_echo "no" >&6; }
9000fi
9001
9002
9003          if test "x$LN" = x; then
9004            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9005          fi
9006        else
9007          # Otherwise we believe it is a complete path. Use it as it is.
9008          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9009$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9010          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9011$as_echo_n "checking for LN... " >&6; }
9012          if test ! -x "$tool_specified"; then
9013            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9014$as_echo "not found" >&6; }
9015            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9016          fi
9017          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9018$as_echo "$tool_specified" >&6; }
9019        fi
9020      fi
9021    fi
9022
9023  fi
9024
9025
9026
9027  if test "x$LN" = x; then
9028    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9029  fi
9030
9031
9032
9033
9034
9035  # Publish this variable in the help.
9036
9037
9038  if [ -z "${LS+x}" ]; then
9039    # The variable is not set by user, try to locate tool using the code snippet
9040    for ac_prog in ls
9041do
9042  # Extract the first word of "$ac_prog", so it can be a program name with args.
9043set dummy $ac_prog; ac_word=$2
9044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9045$as_echo_n "checking for $ac_word... " >&6; }
9046if ${ac_cv_path_LS+:} false; then :
9047  $as_echo_n "(cached) " >&6
9048else
9049  case $LS in
9050  [\\/]* | ?:[\\/]*)
9051  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9052  ;;
9053  *)
9054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9055for as_dir in $PATH
9056do
9057  IFS=$as_save_IFS
9058  test -z "$as_dir" && as_dir=.
9059    for ac_exec_ext in '' $ac_executable_extensions; do
9060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9061    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9063    break 2
9064  fi
9065done
9066  done
9067IFS=$as_save_IFS
9068
9069  ;;
9070esac
9071fi
9072LS=$ac_cv_path_LS
9073if test -n "$LS"; then
9074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9075$as_echo "$LS" >&6; }
9076else
9077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9078$as_echo "no" >&6; }
9079fi
9080
9081
9082  test -n "$LS" && break
9083done
9084
9085  else
9086    # The variable is set, but is it from the command line or the environment?
9087
9088    # Try to remove the string !LS! from our list.
9089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9091      # If it failed, the variable was not from the command line. Ignore it,
9092      # but warn the user (except for BASH, which is always set by the calling BASH).
9093      if test "xLS" != xBASH; then
9094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9095$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9096      fi
9097      # Try to locate tool using the code snippet
9098      for ac_prog in ls
9099do
9100  # Extract the first word of "$ac_prog", so it can be a program name with args.
9101set dummy $ac_prog; ac_word=$2
9102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9103$as_echo_n "checking for $ac_word... " >&6; }
9104if ${ac_cv_path_LS+:} false; then :
9105  $as_echo_n "(cached) " >&6
9106else
9107  case $LS in
9108  [\\/]* | ?:[\\/]*)
9109  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9110  ;;
9111  *)
9112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9113for as_dir in $PATH
9114do
9115  IFS=$as_save_IFS
9116  test -z "$as_dir" && as_dir=.
9117    for ac_exec_ext in '' $ac_executable_extensions; do
9118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9119    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9121    break 2
9122  fi
9123done
9124  done
9125IFS=$as_save_IFS
9126
9127  ;;
9128esac
9129fi
9130LS=$ac_cv_path_LS
9131if test -n "$LS"; then
9132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9133$as_echo "$LS" >&6; }
9134else
9135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9136$as_echo "no" >&6; }
9137fi
9138
9139
9140  test -n "$LS" && break
9141done
9142
9143    else
9144      # If it succeeded, then it was overridden by the user. We will use it
9145      # for the tool.
9146
9147      # First remove it from the list of overridden variables, so we can test
9148      # for unknown variables in the end.
9149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9150
9151      # Check if we try to supply an empty value
9152      if test "x$LS" = x; then
9153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9154$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9156$as_echo_n "checking for LS... " >&6; }
9157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9158$as_echo "disabled" >&6; }
9159      else
9160        # Check if the provided tool contains a complete path.
9161        tool_specified="$LS"
9162        tool_basename="${tool_specified##*/}"
9163        if test "x$tool_basename" = "x$tool_specified"; then
9164          # A command without a complete path is provided, search $PATH.
9165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9166$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9167          # Extract the first word of "$tool_basename", so it can be a program name with args.
9168set dummy $tool_basename; ac_word=$2
9169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9170$as_echo_n "checking for $ac_word... " >&6; }
9171if ${ac_cv_path_LS+:} false; then :
9172  $as_echo_n "(cached) " >&6
9173else
9174  case $LS in
9175  [\\/]* | ?:[\\/]*)
9176  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9177  ;;
9178  *)
9179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9180for as_dir in $PATH
9181do
9182  IFS=$as_save_IFS
9183  test -z "$as_dir" && as_dir=.
9184    for ac_exec_ext in '' $ac_executable_extensions; do
9185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9186    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9188    break 2
9189  fi
9190done
9191  done
9192IFS=$as_save_IFS
9193
9194  ;;
9195esac
9196fi
9197LS=$ac_cv_path_LS
9198if test -n "$LS"; then
9199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9200$as_echo "$LS" >&6; }
9201else
9202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9203$as_echo "no" >&6; }
9204fi
9205
9206
9207          if test "x$LS" = x; then
9208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9209          fi
9210        else
9211          # Otherwise we believe it is a complete path. Use it as it is.
9212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9213$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9215$as_echo_n "checking for LS... " >&6; }
9216          if test ! -x "$tool_specified"; then
9217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9218$as_echo "not found" >&6; }
9219            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9220          fi
9221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9222$as_echo "$tool_specified" >&6; }
9223        fi
9224      fi
9225    fi
9226
9227  fi
9228
9229
9230
9231  if test "x$LS" = x; then
9232    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9233  fi
9234
9235
9236
9237
9238
9239  # Publish this variable in the help.
9240
9241
9242  if [ -z "${MKDIR+x}" ]; then
9243    # The variable is not set by user, try to locate tool using the code snippet
9244    for ac_prog in mkdir
9245do
9246  # Extract the first word of "$ac_prog", so it can be a program name with args.
9247set dummy $ac_prog; ac_word=$2
9248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9249$as_echo_n "checking for $ac_word... " >&6; }
9250if ${ac_cv_path_MKDIR+:} false; then :
9251  $as_echo_n "(cached) " >&6
9252else
9253  case $MKDIR in
9254  [\\/]* | ?:[\\/]*)
9255  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9256  ;;
9257  *)
9258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9259for as_dir in $PATH
9260do
9261  IFS=$as_save_IFS
9262  test -z "$as_dir" && as_dir=.
9263    for ac_exec_ext in '' $ac_executable_extensions; do
9264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9265    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9267    break 2
9268  fi
9269done
9270  done
9271IFS=$as_save_IFS
9272
9273  ;;
9274esac
9275fi
9276MKDIR=$ac_cv_path_MKDIR
9277if test -n "$MKDIR"; then
9278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9279$as_echo "$MKDIR" >&6; }
9280else
9281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9282$as_echo "no" >&6; }
9283fi
9284
9285
9286  test -n "$MKDIR" && break
9287done
9288
9289  else
9290    # The variable is set, but is it from the command line or the environment?
9291
9292    # Try to remove the string !MKDIR! from our list.
9293    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9294    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9295      # If it failed, the variable was not from the command line. Ignore it,
9296      # but warn the user (except for BASH, which is always set by the calling BASH).
9297      if test "xMKDIR" != xBASH; then
9298        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9299$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9300      fi
9301      # Try to locate tool using the code snippet
9302      for ac_prog in mkdir
9303do
9304  # Extract the first word of "$ac_prog", so it can be a program name with args.
9305set dummy $ac_prog; ac_word=$2
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9307$as_echo_n "checking for $ac_word... " >&6; }
9308if ${ac_cv_path_MKDIR+:} false; then :
9309  $as_echo_n "(cached) " >&6
9310else
9311  case $MKDIR in
9312  [\\/]* | ?:[\\/]*)
9313  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9314  ;;
9315  *)
9316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9317for as_dir in $PATH
9318do
9319  IFS=$as_save_IFS
9320  test -z "$as_dir" && as_dir=.
9321    for ac_exec_ext in '' $ac_executable_extensions; do
9322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9323    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9325    break 2
9326  fi
9327done
9328  done
9329IFS=$as_save_IFS
9330
9331  ;;
9332esac
9333fi
9334MKDIR=$ac_cv_path_MKDIR
9335if test -n "$MKDIR"; then
9336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9337$as_echo "$MKDIR" >&6; }
9338else
9339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9340$as_echo "no" >&6; }
9341fi
9342
9343
9344  test -n "$MKDIR" && break
9345done
9346
9347    else
9348      # If it succeeded, then it was overridden by the user. We will use it
9349      # for the tool.
9350
9351      # First remove it from the list of overridden variables, so we can test
9352      # for unknown variables in the end.
9353      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9354
9355      # Check if we try to supply an empty value
9356      if test "x$MKDIR" = x; then
9357        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9358$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9359        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9360$as_echo_n "checking for MKDIR... " >&6; }
9361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9362$as_echo "disabled" >&6; }
9363      else
9364        # Check if the provided tool contains a complete path.
9365        tool_specified="$MKDIR"
9366        tool_basename="${tool_specified##*/}"
9367        if test "x$tool_basename" = "x$tool_specified"; then
9368          # A command without a complete path is provided, search $PATH.
9369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9370$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9371          # Extract the first word of "$tool_basename", so it can be a program name with args.
9372set dummy $tool_basename; ac_word=$2
9373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9374$as_echo_n "checking for $ac_word... " >&6; }
9375if ${ac_cv_path_MKDIR+:} false; then :
9376  $as_echo_n "(cached) " >&6
9377else
9378  case $MKDIR in
9379  [\\/]* | ?:[\\/]*)
9380  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9381  ;;
9382  *)
9383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9384for as_dir in $PATH
9385do
9386  IFS=$as_save_IFS
9387  test -z "$as_dir" && as_dir=.
9388    for ac_exec_ext in '' $ac_executable_extensions; do
9389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9390    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9392    break 2
9393  fi
9394done
9395  done
9396IFS=$as_save_IFS
9397
9398  ;;
9399esac
9400fi
9401MKDIR=$ac_cv_path_MKDIR
9402if test -n "$MKDIR"; then
9403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9404$as_echo "$MKDIR" >&6; }
9405else
9406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9407$as_echo "no" >&6; }
9408fi
9409
9410
9411          if test "x$MKDIR" = x; then
9412            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9413          fi
9414        else
9415          # Otherwise we believe it is a complete path. Use it as it is.
9416          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9417$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9418          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9419$as_echo_n "checking for MKDIR... " >&6; }
9420          if test ! -x "$tool_specified"; then
9421            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9422$as_echo "not found" >&6; }
9423            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9424          fi
9425          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9426$as_echo "$tool_specified" >&6; }
9427        fi
9428      fi
9429    fi
9430
9431  fi
9432
9433
9434
9435  if test "x$MKDIR" = x; then
9436    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9437  fi
9438
9439
9440
9441
9442
9443  # Publish this variable in the help.
9444
9445
9446  if [ -z "${MKTEMP+x}" ]; then
9447    # The variable is not set by user, try to locate tool using the code snippet
9448    for ac_prog in mktemp
9449do
9450  # Extract the first word of "$ac_prog", so it can be a program name with args.
9451set dummy $ac_prog; ac_word=$2
9452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9453$as_echo_n "checking for $ac_word... " >&6; }
9454if ${ac_cv_path_MKTEMP+:} false; then :
9455  $as_echo_n "(cached) " >&6
9456else
9457  case $MKTEMP in
9458  [\\/]* | ?:[\\/]*)
9459  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9460  ;;
9461  *)
9462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9463for as_dir in $PATH
9464do
9465  IFS=$as_save_IFS
9466  test -z "$as_dir" && as_dir=.
9467    for ac_exec_ext in '' $ac_executable_extensions; do
9468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9469    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9471    break 2
9472  fi
9473done
9474  done
9475IFS=$as_save_IFS
9476
9477  ;;
9478esac
9479fi
9480MKTEMP=$ac_cv_path_MKTEMP
9481if test -n "$MKTEMP"; then
9482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9483$as_echo "$MKTEMP" >&6; }
9484else
9485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9486$as_echo "no" >&6; }
9487fi
9488
9489
9490  test -n "$MKTEMP" && break
9491done
9492
9493  else
9494    # The variable is set, but is it from the command line or the environment?
9495
9496    # Try to remove the string !MKTEMP! from our list.
9497    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9498    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9499      # If it failed, the variable was not from the command line. Ignore it,
9500      # but warn the user (except for BASH, which is always set by the calling BASH).
9501      if test "xMKTEMP" != xBASH; then
9502        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9503$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9504      fi
9505      # Try to locate tool using the code snippet
9506      for ac_prog in mktemp
9507do
9508  # Extract the first word of "$ac_prog", so it can be a program name with args.
9509set dummy $ac_prog; ac_word=$2
9510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9511$as_echo_n "checking for $ac_word... " >&6; }
9512if ${ac_cv_path_MKTEMP+:} false; then :
9513  $as_echo_n "(cached) " >&6
9514else
9515  case $MKTEMP in
9516  [\\/]* | ?:[\\/]*)
9517  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9518  ;;
9519  *)
9520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9521for as_dir in $PATH
9522do
9523  IFS=$as_save_IFS
9524  test -z "$as_dir" && as_dir=.
9525    for ac_exec_ext in '' $ac_executable_extensions; do
9526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9527    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9529    break 2
9530  fi
9531done
9532  done
9533IFS=$as_save_IFS
9534
9535  ;;
9536esac
9537fi
9538MKTEMP=$ac_cv_path_MKTEMP
9539if test -n "$MKTEMP"; then
9540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9541$as_echo "$MKTEMP" >&6; }
9542else
9543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9544$as_echo "no" >&6; }
9545fi
9546
9547
9548  test -n "$MKTEMP" && break
9549done
9550
9551    else
9552      # If it succeeded, then it was overridden by the user. We will use it
9553      # for the tool.
9554
9555      # First remove it from the list of overridden variables, so we can test
9556      # for unknown variables in the end.
9557      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9558
9559      # Check if we try to supply an empty value
9560      if test "x$MKTEMP" = x; then
9561        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9562$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9563        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9564$as_echo_n "checking for MKTEMP... " >&6; }
9565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9566$as_echo "disabled" >&6; }
9567      else
9568        # Check if the provided tool contains a complete path.
9569        tool_specified="$MKTEMP"
9570        tool_basename="${tool_specified##*/}"
9571        if test "x$tool_basename" = "x$tool_specified"; then
9572          # A command without a complete path is provided, search $PATH.
9573          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9574$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9575          # Extract the first word of "$tool_basename", so it can be a program name with args.
9576set dummy $tool_basename; ac_word=$2
9577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9578$as_echo_n "checking for $ac_word... " >&6; }
9579if ${ac_cv_path_MKTEMP+:} false; then :
9580  $as_echo_n "(cached) " >&6
9581else
9582  case $MKTEMP in
9583  [\\/]* | ?:[\\/]*)
9584  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9585  ;;
9586  *)
9587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9588for as_dir in $PATH
9589do
9590  IFS=$as_save_IFS
9591  test -z "$as_dir" && as_dir=.
9592    for ac_exec_ext in '' $ac_executable_extensions; do
9593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9594    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9596    break 2
9597  fi
9598done
9599  done
9600IFS=$as_save_IFS
9601
9602  ;;
9603esac
9604fi
9605MKTEMP=$ac_cv_path_MKTEMP
9606if test -n "$MKTEMP"; then
9607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9608$as_echo "$MKTEMP" >&6; }
9609else
9610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9611$as_echo "no" >&6; }
9612fi
9613
9614
9615          if test "x$MKTEMP" = x; then
9616            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9617          fi
9618        else
9619          # Otherwise we believe it is a complete path. Use it as it is.
9620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9621$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9622          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9623$as_echo_n "checking for MKTEMP... " >&6; }
9624          if test ! -x "$tool_specified"; then
9625            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9626$as_echo "not found" >&6; }
9627            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9628          fi
9629          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9630$as_echo "$tool_specified" >&6; }
9631        fi
9632      fi
9633    fi
9634
9635  fi
9636
9637
9638
9639  if test "x$MKTEMP" = x; then
9640    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9641  fi
9642
9643
9644
9645
9646
9647  # Publish this variable in the help.
9648
9649
9650  if [ -z "${MV+x}" ]; then
9651    # The variable is not set by user, try to locate tool using the code snippet
9652    for ac_prog in mv
9653do
9654  # Extract the first word of "$ac_prog", so it can be a program name with args.
9655set dummy $ac_prog; ac_word=$2
9656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9657$as_echo_n "checking for $ac_word... " >&6; }
9658if ${ac_cv_path_MV+:} false; then :
9659  $as_echo_n "(cached) " >&6
9660else
9661  case $MV in
9662  [\\/]* | ?:[\\/]*)
9663  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9664  ;;
9665  *)
9666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9667for as_dir in $PATH
9668do
9669  IFS=$as_save_IFS
9670  test -z "$as_dir" && as_dir=.
9671    for ac_exec_ext in '' $ac_executable_extensions; do
9672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9673    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9675    break 2
9676  fi
9677done
9678  done
9679IFS=$as_save_IFS
9680
9681  ;;
9682esac
9683fi
9684MV=$ac_cv_path_MV
9685if test -n "$MV"; then
9686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9687$as_echo "$MV" >&6; }
9688else
9689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9690$as_echo "no" >&6; }
9691fi
9692
9693
9694  test -n "$MV" && break
9695done
9696
9697  else
9698    # The variable is set, but is it from the command line or the environment?
9699
9700    # Try to remove the string !MV! from our list.
9701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9703      # If it failed, the variable was not from the command line. Ignore it,
9704      # but warn the user (except for BASH, which is always set by the calling BASH).
9705      if test "xMV" != xBASH; then
9706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9707$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9708      fi
9709      # Try to locate tool using the code snippet
9710      for ac_prog in mv
9711do
9712  # Extract the first word of "$ac_prog", so it can be a program name with args.
9713set dummy $ac_prog; ac_word=$2
9714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9715$as_echo_n "checking for $ac_word... " >&6; }
9716if ${ac_cv_path_MV+:} false; then :
9717  $as_echo_n "(cached) " >&6
9718else
9719  case $MV in
9720  [\\/]* | ?:[\\/]*)
9721  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9722  ;;
9723  *)
9724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9725for as_dir in $PATH
9726do
9727  IFS=$as_save_IFS
9728  test -z "$as_dir" && as_dir=.
9729    for ac_exec_ext in '' $ac_executable_extensions; do
9730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9731    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9733    break 2
9734  fi
9735done
9736  done
9737IFS=$as_save_IFS
9738
9739  ;;
9740esac
9741fi
9742MV=$ac_cv_path_MV
9743if test -n "$MV"; then
9744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9745$as_echo "$MV" >&6; }
9746else
9747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9748$as_echo "no" >&6; }
9749fi
9750
9751
9752  test -n "$MV" && break
9753done
9754
9755    else
9756      # If it succeeded, then it was overridden by the user. We will use it
9757      # for the tool.
9758
9759      # First remove it from the list of overridden variables, so we can test
9760      # for unknown variables in the end.
9761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9762
9763      # Check if we try to supply an empty value
9764      if test "x$MV" = x; then
9765        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9766$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9768$as_echo_n "checking for MV... " >&6; }
9769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9770$as_echo "disabled" >&6; }
9771      else
9772        # Check if the provided tool contains a complete path.
9773        tool_specified="$MV"
9774        tool_basename="${tool_specified##*/}"
9775        if test "x$tool_basename" = "x$tool_specified"; then
9776          # A command without a complete path is provided, search $PATH.
9777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9778$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9779          # Extract the first word of "$tool_basename", so it can be a program name with args.
9780set dummy $tool_basename; ac_word=$2
9781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9782$as_echo_n "checking for $ac_word... " >&6; }
9783if ${ac_cv_path_MV+:} false; then :
9784  $as_echo_n "(cached) " >&6
9785else
9786  case $MV in
9787  [\\/]* | ?:[\\/]*)
9788  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9789  ;;
9790  *)
9791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9792for as_dir in $PATH
9793do
9794  IFS=$as_save_IFS
9795  test -z "$as_dir" && as_dir=.
9796    for ac_exec_ext in '' $ac_executable_extensions; do
9797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9798    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9800    break 2
9801  fi
9802done
9803  done
9804IFS=$as_save_IFS
9805
9806  ;;
9807esac
9808fi
9809MV=$ac_cv_path_MV
9810if test -n "$MV"; then
9811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9812$as_echo "$MV" >&6; }
9813else
9814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9815$as_echo "no" >&6; }
9816fi
9817
9818
9819          if test "x$MV" = x; then
9820            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9821          fi
9822        else
9823          # Otherwise we believe it is a complete path. Use it as it is.
9824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9825$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9826          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9827$as_echo_n "checking for MV... " >&6; }
9828          if test ! -x "$tool_specified"; then
9829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9830$as_echo "not found" >&6; }
9831            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9832          fi
9833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9834$as_echo "$tool_specified" >&6; }
9835        fi
9836      fi
9837    fi
9838
9839  fi
9840
9841
9842
9843  if test "x$MV" = x; then
9844    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9845  fi
9846
9847
9848
9849
9850
9851  # Publish this variable in the help.
9852
9853
9854  if [ -z "${NAWK+x}" ]; then
9855    # The variable is not set by user, try to locate tool using the code snippet
9856    for ac_prog in nawk gawk awk
9857do
9858  # Extract the first word of "$ac_prog", so it can be a program name with args.
9859set dummy $ac_prog; ac_word=$2
9860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9861$as_echo_n "checking for $ac_word... " >&6; }
9862if ${ac_cv_path_NAWK+:} false; then :
9863  $as_echo_n "(cached) " >&6
9864else
9865  case $NAWK in
9866  [\\/]* | ?:[\\/]*)
9867  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9868  ;;
9869  *)
9870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9871for as_dir in $PATH
9872do
9873  IFS=$as_save_IFS
9874  test -z "$as_dir" && as_dir=.
9875    for ac_exec_ext in '' $ac_executable_extensions; do
9876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9877    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9879    break 2
9880  fi
9881done
9882  done
9883IFS=$as_save_IFS
9884
9885  ;;
9886esac
9887fi
9888NAWK=$ac_cv_path_NAWK
9889if test -n "$NAWK"; then
9890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9891$as_echo "$NAWK" >&6; }
9892else
9893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9894$as_echo "no" >&6; }
9895fi
9896
9897
9898  test -n "$NAWK" && break
9899done
9900
9901  else
9902    # The variable is set, but is it from the command line or the environment?
9903
9904    # Try to remove the string !NAWK! from our list.
9905    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9906    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9907      # If it failed, the variable was not from the command line. Ignore it,
9908      # but warn the user (except for BASH, which is always set by the calling BASH).
9909      if test "xNAWK" != xBASH; then
9910        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9911$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9912      fi
9913      # Try to locate tool using the code snippet
9914      for ac_prog in nawk gawk awk
9915do
9916  # Extract the first word of "$ac_prog", so it can be a program name with args.
9917set dummy $ac_prog; ac_word=$2
9918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9919$as_echo_n "checking for $ac_word... " >&6; }
9920if ${ac_cv_path_NAWK+:} false; then :
9921  $as_echo_n "(cached) " >&6
9922else
9923  case $NAWK in
9924  [\\/]* | ?:[\\/]*)
9925  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9926  ;;
9927  *)
9928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9929for as_dir in $PATH
9930do
9931  IFS=$as_save_IFS
9932  test -z "$as_dir" && as_dir=.
9933    for ac_exec_ext in '' $ac_executable_extensions; do
9934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9935    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9937    break 2
9938  fi
9939done
9940  done
9941IFS=$as_save_IFS
9942
9943  ;;
9944esac
9945fi
9946NAWK=$ac_cv_path_NAWK
9947if test -n "$NAWK"; then
9948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9949$as_echo "$NAWK" >&6; }
9950else
9951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9952$as_echo "no" >&6; }
9953fi
9954
9955
9956  test -n "$NAWK" && break
9957done
9958
9959    else
9960      # If it succeeded, then it was overridden by the user. We will use it
9961      # for the tool.
9962
9963      # First remove it from the list of overridden variables, so we can test
9964      # for unknown variables in the end.
9965      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9966
9967      # Check if we try to supply an empty value
9968      if test "x$NAWK" = x; then
9969        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9970$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9972$as_echo_n "checking for NAWK... " >&6; }
9973        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9974$as_echo "disabled" >&6; }
9975      else
9976        # Check if the provided tool contains a complete path.
9977        tool_specified="$NAWK"
9978        tool_basename="${tool_specified##*/}"
9979        if test "x$tool_basename" = "x$tool_specified"; then
9980          # A command without a complete path is provided, search $PATH.
9981          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9982$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9983          # Extract the first word of "$tool_basename", so it can be a program name with args.
9984set dummy $tool_basename; ac_word=$2
9985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9986$as_echo_n "checking for $ac_word... " >&6; }
9987if ${ac_cv_path_NAWK+:} false; then :
9988  $as_echo_n "(cached) " >&6
9989else
9990  case $NAWK in
9991  [\\/]* | ?:[\\/]*)
9992  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9993  ;;
9994  *)
9995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9996for as_dir in $PATH
9997do
9998  IFS=$as_save_IFS
9999  test -z "$as_dir" && as_dir=.
10000    for ac_exec_ext in '' $ac_executable_extensions; do
10001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10002    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10004    break 2
10005  fi
10006done
10007  done
10008IFS=$as_save_IFS
10009
10010  ;;
10011esac
10012fi
10013NAWK=$ac_cv_path_NAWK
10014if test -n "$NAWK"; then
10015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10016$as_echo "$NAWK" >&6; }
10017else
10018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10019$as_echo "no" >&6; }
10020fi
10021
10022
10023          if test "x$NAWK" = x; then
10024            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10025          fi
10026        else
10027          # Otherwise we believe it is a complete path. Use it as it is.
10028          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10029$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10030          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10031$as_echo_n "checking for NAWK... " >&6; }
10032          if test ! -x "$tool_specified"; then
10033            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10034$as_echo "not found" >&6; }
10035            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10036          fi
10037          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10038$as_echo "$tool_specified" >&6; }
10039        fi
10040      fi
10041    fi
10042
10043  fi
10044
10045
10046
10047  if test "x$NAWK" = x; then
10048    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10049  fi
10050
10051
10052
10053
10054
10055  # Publish this variable in the help.
10056
10057
10058  if [ -z "${PRINTF+x}" ]; then
10059    # The variable is not set by user, try to locate tool using the code snippet
10060    for ac_prog in printf
10061do
10062  # Extract the first word of "$ac_prog", so it can be a program name with args.
10063set dummy $ac_prog; ac_word=$2
10064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10065$as_echo_n "checking for $ac_word... " >&6; }
10066if ${ac_cv_path_PRINTF+:} false; then :
10067  $as_echo_n "(cached) " >&6
10068else
10069  case $PRINTF in
10070  [\\/]* | ?:[\\/]*)
10071  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10072  ;;
10073  *)
10074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10075for as_dir in $PATH
10076do
10077  IFS=$as_save_IFS
10078  test -z "$as_dir" && as_dir=.
10079    for ac_exec_ext in '' $ac_executable_extensions; do
10080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10081    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10083    break 2
10084  fi
10085done
10086  done
10087IFS=$as_save_IFS
10088
10089  ;;
10090esac
10091fi
10092PRINTF=$ac_cv_path_PRINTF
10093if test -n "$PRINTF"; then
10094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10095$as_echo "$PRINTF" >&6; }
10096else
10097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098$as_echo "no" >&6; }
10099fi
10100
10101
10102  test -n "$PRINTF" && break
10103done
10104
10105  else
10106    # The variable is set, but is it from the command line or the environment?
10107
10108    # Try to remove the string !PRINTF! from our list.
10109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10111      # If it failed, the variable was not from the command line. Ignore it,
10112      # but warn the user (except for BASH, which is always set by the calling BASH).
10113      if test "xPRINTF" != xBASH; then
10114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10115$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10116      fi
10117      # Try to locate tool using the code snippet
10118      for ac_prog in printf
10119do
10120  # Extract the first word of "$ac_prog", so it can be a program name with args.
10121set dummy $ac_prog; ac_word=$2
10122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10123$as_echo_n "checking for $ac_word... " >&6; }
10124if ${ac_cv_path_PRINTF+:} false; then :
10125  $as_echo_n "(cached) " >&6
10126else
10127  case $PRINTF in
10128  [\\/]* | ?:[\\/]*)
10129  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10130  ;;
10131  *)
10132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10133for as_dir in $PATH
10134do
10135  IFS=$as_save_IFS
10136  test -z "$as_dir" && as_dir=.
10137    for ac_exec_ext in '' $ac_executable_extensions; do
10138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10139    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10141    break 2
10142  fi
10143done
10144  done
10145IFS=$as_save_IFS
10146
10147  ;;
10148esac
10149fi
10150PRINTF=$ac_cv_path_PRINTF
10151if test -n "$PRINTF"; then
10152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10153$as_echo "$PRINTF" >&6; }
10154else
10155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10156$as_echo "no" >&6; }
10157fi
10158
10159
10160  test -n "$PRINTF" && break
10161done
10162
10163    else
10164      # If it succeeded, then it was overridden by the user. We will use it
10165      # for the tool.
10166
10167      # First remove it from the list of overridden variables, so we can test
10168      # for unknown variables in the end.
10169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10170
10171      # Check if we try to supply an empty value
10172      if test "x$PRINTF" = x; then
10173        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10174$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10176$as_echo_n "checking for PRINTF... " >&6; }
10177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10178$as_echo "disabled" >&6; }
10179      else
10180        # Check if the provided tool contains a complete path.
10181        tool_specified="$PRINTF"
10182        tool_basename="${tool_specified##*/}"
10183        if test "x$tool_basename" = "x$tool_specified"; then
10184          # A command without a complete path is provided, search $PATH.
10185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10186$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10187          # Extract the first word of "$tool_basename", so it can be a program name with args.
10188set dummy $tool_basename; ac_word=$2
10189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10190$as_echo_n "checking for $ac_word... " >&6; }
10191if ${ac_cv_path_PRINTF+:} false; then :
10192  $as_echo_n "(cached) " >&6
10193else
10194  case $PRINTF in
10195  [\\/]* | ?:[\\/]*)
10196  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10197  ;;
10198  *)
10199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10200for as_dir in $PATH
10201do
10202  IFS=$as_save_IFS
10203  test -z "$as_dir" && as_dir=.
10204    for ac_exec_ext in '' $ac_executable_extensions; do
10205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10206    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10208    break 2
10209  fi
10210done
10211  done
10212IFS=$as_save_IFS
10213
10214  ;;
10215esac
10216fi
10217PRINTF=$ac_cv_path_PRINTF
10218if test -n "$PRINTF"; then
10219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10220$as_echo "$PRINTF" >&6; }
10221else
10222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10223$as_echo "no" >&6; }
10224fi
10225
10226
10227          if test "x$PRINTF" = x; then
10228            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10229          fi
10230        else
10231          # Otherwise we believe it is a complete path. Use it as it is.
10232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10233$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10234          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10235$as_echo_n "checking for PRINTF... " >&6; }
10236          if test ! -x "$tool_specified"; then
10237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10238$as_echo "not found" >&6; }
10239            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10240          fi
10241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10242$as_echo "$tool_specified" >&6; }
10243        fi
10244      fi
10245    fi
10246
10247  fi
10248
10249
10250
10251  if test "x$PRINTF" = x; then
10252    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10253  fi
10254
10255
10256
10257
10258
10259  # Publish this variable in the help.
10260
10261
10262  if [ -z "${RM+x}" ]; then
10263    # The variable is not set by user, try to locate tool using the code snippet
10264    for ac_prog in rm
10265do
10266  # Extract the first word of "$ac_prog", so it can be a program name with args.
10267set dummy $ac_prog; ac_word=$2
10268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10269$as_echo_n "checking for $ac_word... " >&6; }
10270if ${ac_cv_path_RM+:} false; then :
10271  $as_echo_n "(cached) " >&6
10272else
10273  case $RM in
10274  [\\/]* | ?:[\\/]*)
10275  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10276  ;;
10277  *)
10278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10279for as_dir in $PATH
10280do
10281  IFS=$as_save_IFS
10282  test -z "$as_dir" && as_dir=.
10283    for ac_exec_ext in '' $ac_executable_extensions; do
10284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10285    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10287    break 2
10288  fi
10289done
10290  done
10291IFS=$as_save_IFS
10292
10293  ;;
10294esac
10295fi
10296RM=$ac_cv_path_RM
10297if test -n "$RM"; then
10298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10299$as_echo "$RM" >&6; }
10300else
10301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10302$as_echo "no" >&6; }
10303fi
10304
10305
10306  test -n "$RM" && break
10307done
10308
10309  else
10310    # The variable is set, but is it from the command line or the environment?
10311
10312    # Try to remove the string !RM! from our list.
10313    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10314    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10315      # If it failed, the variable was not from the command line. Ignore it,
10316      # but warn the user (except for BASH, which is always set by the calling BASH).
10317      if test "xRM" != xBASH; then
10318        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10319$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10320      fi
10321      # Try to locate tool using the code snippet
10322      for ac_prog in rm
10323do
10324  # Extract the first word of "$ac_prog", so it can be a program name with args.
10325set dummy $ac_prog; ac_word=$2
10326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10327$as_echo_n "checking for $ac_word... " >&6; }
10328if ${ac_cv_path_RM+:} false; then :
10329  $as_echo_n "(cached) " >&6
10330else
10331  case $RM in
10332  [\\/]* | ?:[\\/]*)
10333  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10334  ;;
10335  *)
10336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10337for as_dir in $PATH
10338do
10339  IFS=$as_save_IFS
10340  test -z "$as_dir" && as_dir=.
10341    for ac_exec_ext in '' $ac_executable_extensions; do
10342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10343    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10345    break 2
10346  fi
10347done
10348  done
10349IFS=$as_save_IFS
10350
10351  ;;
10352esac
10353fi
10354RM=$ac_cv_path_RM
10355if test -n "$RM"; then
10356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10357$as_echo "$RM" >&6; }
10358else
10359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10360$as_echo "no" >&6; }
10361fi
10362
10363
10364  test -n "$RM" && break
10365done
10366
10367    else
10368      # If it succeeded, then it was overridden by the user. We will use it
10369      # for the tool.
10370
10371      # First remove it from the list of overridden variables, so we can test
10372      # for unknown variables in the end.
10373      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10374
10375      # Check if we try to supply an empty value
10376      if test "x$RM" = x; then
10377        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10378$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10380$as_echo_n "checking for RM... " >&6; }
10381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10382$as_echo "disabled" >&6; }
10383      else
10384        # Check if the provided tool contains a complete path.
10385        tool_specified="$RM"
10386        tool_basename="${tool_specified##*/}"
10387        if test "x$tool_basename" = "x$tool_specified"; then
10388          # A command without a complete path is provided, search $PATH.
10389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10390$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10391          # Extract the first word of "$tool_basename", so it can be a program name with args.
10392set dummy $tool_basename; ac_word=$2
10393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10394$as_echo_n "checking for $ac_word... " >&6; }
10395if ${ac_cv_path_RM+:} false; then :
10396  $as_echo_n "(cached) " >&6
10397else
10398  case $RM in
10399  [\\/]* | ?:[\\/]*)
10400  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10401  ;;
10402  *)
10403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10404for as_dir in $PATH
10405do
10406  IFS=$as_save_IFS
10407  test -z "$as_dir" && as_dir=.
10408    for ac_exec_ext in '' $ac_executable_extensions; do
10409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10410    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10412    break 2
10413  fi
10414done
10415  done
10416IFS=$as_save_IFS
10417
10418  ;;
10419esac
10420fi
10421RM=$ac_cv_path_RM
10422if test -n "$RM"; then
10423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10424$as_echo "$RM" >&6; }
10425else
10426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10427$as_echo "no" >&6; }
10428fi
10429
10430
10431          if test "x$RM" = x; then
10432            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10433          fi
10434        else
10435          # Otherwise we believe it is a complete path. Use it as it is.
10436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10437$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10438          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10439$as_echo_n "checking for RM... " >&6; }
10440          if test ! -x "$tool_specified"; then
10441            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10442$as_echo "not found" >&6; }
10443            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10444          fi
10445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10446$as_echo "$tool_specified" >&6; }
10447        fi
10448      fi
10449    fi
10450
10451  fi
10452
10453
10454
10455  if test "x$RM" = x; then
10456    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10457  fi
10458
10459
10460
10461
10462
10463  # Publish this variable in the help.
10464
10465
10466  if [ -z "${RMDIR+x}" ]; then
10467    # The variable is not set by user, try to locate tool using the code snippet
10468    for ac_prog in rmdir
10469do
10470  # Extract the first word of "$ac_prog", so it can be a program name with args.
10471set dummy $ac_prog; 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_RMDIR+:} false; then :
10475  $as_echo_n "(cached) " >&6
10476else
10477  case $RMDIR in
10478  [\\/]* | ?:[\\/]*)
10479  ac_cv_path_RMDIR="$RMDIR" # 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_RMDIR="$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
10500RMDIR=$ac_cv_path_RMDIR
10501if test -n "$RMDIR"; then
10502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10503$as_echo "$RMDIR" >&6; }
10504else
10505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10506$as_echo "no" >&6; }
10507fi
10508
10509
10510  test -n "$RMDIR" && break
10511done
10512
10513  else
10514    # The variable is set, but is it from the command line or the environment?
10515
10516    # Try to remove the string !RMDIR! from our list.
10517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10519      # If it failed, the variable was not from the command line. Ignore it,
10520      # but warn the user (except for BASH, which is always set by the calling BASH).
10521      if test "xRMDIR" != xBASH; then
10522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10523$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10524      fi
10525      # Try to locate tool using the code snippet
10526      for ac_prog in rmdir
10527do
10528  # Extract the first word of "$ac_prog", so it can be a program name with args.
10529set dummy $ac_prog; ac_word=$2
10530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10531$as_echo_n "checking for $ac_word... " >&6; }
10532if ${ac_cv_path_RMDIR+:} false; then :
10533  $as_echo_n "(cached) " >&6
10534else
10535  case $RMDIR in
10536  [\\/]* | ?:[\\/]*)
10537  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10538  ;;
10539  *)
10540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10541for as_dir in $PATH
10542do
10543  IFS=$as_save_IFS
10544  test -z "$as_dir" && as_dir=.
10545    for ac_exec_ext in '' $ac_executable_extensions; do
10546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10547    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10549    break 2
10550  fi
10551done
10552  done
10553IFS=$as_save_IFS
10554
10555  ;;
10556esac
10557fi
10558RMDIR=$ac_cv_path_RMDIR
10559if test -n "$RMDIR"; then
10560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10561$as_echo "$RMDIR" >&6; }
10562else
10563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10564$as_echo "no" >&6; }
10565fi
10566
10567
10568  test -n "$RMDIR" && break
10569done
10570
10571    else
10572      # If it succeeded, then it was overridden by the user. We will use it
10573      # for the tool.
10574
10575      # First remove it from the list of overridden variables, so we can test
10576      # for unknown variables in the end.
10577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10578
10579      # Check if we try to supply an empty value
10580      if test "x$RMDIR" = x; then
10581        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10582$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10583        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10584$as_echo_n "checking for RMDIR... " >&6; }
10585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10586$as_echo "disabled" >&6; }
10587      else
10588        # Check if the provided tool contains a complete path.
10589        tool_specified="$RMDIR"
10590        tool_basename="${tool_specified##*/}"
10591        if test "x$tool_basename" = "x$tool_specified"; then
10592          # A command without a complete path is provided, search $PATH.
10593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10594$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10595          # Extract the first word of "$tool_basename", so it can be a program name with args.
10596set dummy $tool_basename; ac_word=$2
10597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10598$as_echo_n "checking for $ac_word... " >&6; }
10599if ${ac_cv_path_RMDIR+:} false; then :
10600  $as_echo_n "(cached) " >&6
10601else
10602  case $RMDIR in
10603  [\\/]* | ?:[\\/]*)
10604  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10605  ;;
10606  *)
10607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10608for as_dir in $PATH
10609do
10610  IFS=$as_save_IFS
10611  test -z "$as_dir" && as_dir=.
10612    for ac_exec_ext in '' $ac_executable_extensions; do
10613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10614    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10616    break 2
10617  fi
10618done
10619  done
10620IFS=$as_save_IFS
10621
10622  ;;
10623esac
10624fi
10625RMDIR=$ac_cv_path_RMDIR
10626if test -n "$RMDIR"; then
10627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10628$as_echo "$RMDIR" >&6; }
10629else
10630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10631$as_echo "no" >&6; }
10632fi
10633
10634
10635          if test "x$RMDIR" = x; then
10636            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10637          fi
10638        else
10639          # Otherwise we believe it is a complete path. Use it as it is.
10640          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10641$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10642          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10643$as_echo_n "checking for RMDIR... " >&6; }
10644          if test ! -x "$tool_specified"; then
10645            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10646$as_echo "not found" >&6; }
10647            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10648          fi
10649          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10650$as_echo "$tool_specified" >&6; }
10651        fi
10652      fi
10653    fi
10654
10655  fi
10656
10657
10658
10659  if test "x$RMDIR" = x; then
10660    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10661  fi
10662
10663
10664
10665
10666
10667  # Publish this variable in the help.
10668
10669
10670  if [ -z "${SH+x}" ]; then
10671    # The variable is not set by user, try to locate tool using the code snippet
10672    for ac_prog in sh
10673do
10674  # Extract the first word of "$ac_prog", so it can be a program name with args.
10675set dummy $ac_prog; ac_word=$2
10676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10677$as_echo_n "checking for $ac_word... " >&6; }
10678if ${ac_cv_path_SH+:} false; then :
10679  $as_echo_n "(cached) " >&6
10680else
10681  case $SH in
10682  [\\/]* | ?:[\\/]*)
10683  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10684  ;;
10685  *)
10686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10687for as_dir in $PATH
10688do
10689  IFS=$as_save_IFS
10690  test -z "$as_dir" && as_dir=.
10691    for ac_exec_ext in '' $ac_executable_extensions; do
10692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10693    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10695    break 2
10696  fi
10697done
10698  done
10699IFS=$as_save_IFS
10700
10701  ;;
10702esac
10703fi
10704SH=$ac_cv_path_SH
10705if test -n "$SH"; then
10706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10707$as_echo "$SH" >&6; }
10708else
10709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10710$as_echo "no" >&6; }
10711fi
10712
10713
10714  test -n "$SH" && break
10715done
10716
10717  else
10718    # The variable is set, but is it from the command line or the environment?
10719
10720    # Try to remove the string !SH! from our list.
10721    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10722    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10723      # If it failed, the variable was not from the command line. Ignore it,
10724      # but warn the user (except for BASH, which is always set by the calling BASH).
10725      if test "xSH" != xBASH; then
10726        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10727$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10728      fi
10729      # Try to locate tool using the code snippet
10730      for ac_prog in sh
10731do
10732  # Extract the first word of "$ac_prog", so it can be a program name with args.
10733set dummy $ac_prog; ac_word=$2
10734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10735$as_echo_n "checking for $ac_word... " >&6; }
10736if ${ac_cv_path_SH+:} false; then :
10737  $as_echo_n "(cached) " >&6
10738else
10739  case $SH in
10740  [\\/]* | ?:[\\/]*)
10741  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10742  ;;
10743  *)
10744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10745for as_dir in $PATH
10746do
10747  IFS=$as_save_IFS
10748  test -z "$as_dir" && as_dir=.
10749    for ac_exec_ext in '' $ac_executable_extensions; do
10750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10751    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10753    break 2
10754  fi
10755done
10756  done
10757IFS=$as_save_IFS
10758
10759  ;;
10760esac
10761fi
10762SH=$ac_cv_path_SH
10763if test -n "$SH"; then
10764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10765$as_echo "$SH" >&6; }
10766else
10767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10768$as_echo "no" >&6; }
10769fi
10770
10771
10772  test -n "$SH" && break
10773done
10774
10775    else
10776      # If it succeeded, then it was overridden by the user. We will use it
10777      # for the tool.
10778
10779      # First remove it from the list of overridden variables, so we can test
10780      # for unknown variables in the end.
10781      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10782
10783      # Check if we try to supply an empty value
10784      if test "x$SH" = x; then
10785        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10786$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10788$as_echo_n "checking for SH... " >&6; }
10789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10790$as_echo "disabled" >&6; }
10791      else
10792        # Check if the provided tool contains a complete path.
10793        tool_specified="$SH"
10794        tool_basename="${tool_specified##*/}"
10795        if test "x$tool_basename" = "x$tool_specified"; then
10796          # A command without a complete path is provided, search $PATH.
10797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10798$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10799          # Extract the first word of "$tool_basename", so it can be a program name with args.
10800set dummy $tool_basename; ac_word=$2
10801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10802$as_echo_n "checking for $ac_word... " >&6; }
10803if ${ac_cv_path_SH+:} false; then :
10804  $as_echo_n "(cached) " >&6
10805else
10806  case $SH in
10807  [\\/]* | ?:[\\/]*)
10808  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10809  ;;
10810  *)
10811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10812for as_dir in $PATH
10813do
10814  IFS=$as_save_IFS
10815  test -z "$as_dir" && as_dir=.
10816    for ac_exec_ext in '' $ac_executable_extensions; do
10817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10818    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10820    break 2
10821  fi
10822done
10823  done
10824IFS=$as_save_IFS
10825
10826  ;;
10827esac
10828fi
10829SH=$ac_cv_path_SH
10830if test -n "$SH"; then
10831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10832$as_echo "$SH" >&6; }
10833else
10834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10835$as_echo "no" >&6; }
10836fi
10837
10838
10839          if test "x$SH" = x; then
10840            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10841          fi
10842        else
10843          # Otherwise we believe it is a complete path. Use it as it is.
10844          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10845$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10846          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10847$as_echo_n "checking for SH... " >&6; }
10848          if test ! -x "$tool_specified"; then
10849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10850$as_echo "not found" >&6; }
10851            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10852          fi
10853          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10854$as_echo "$tool_specified" >&6; }
10855        fi
10856      fi
10857    fi
10858
10859  fi
10860
10861
10862
10863  if test "x$SH" = x; then
10864    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10865  fi
10866
10867
10868
10869
10870
10871  # Publish this variable in the help.
10872
10873
10874  if [ -z "${SORT+x}" ]; then
10875    # The variable is not set by user, try to locate tool using the code snippet
10876    for ac_prog in sort
10877do
10878  # Extract the first word of "$ac_prog", so it can be a program name with args.
10879set dummy $ac_prog; ac_word=$2
10880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10881$as_echo_n "checking for $ac_word... " >&6; }
10882if ${ac_cv_path_SORT+:} false; then :
10883  $as_echo_n "(cached) " >&6
10884else
10885  case $SORT in
10886  [\\/]* | ?:[\\/]*)
10887  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10888  ;;
10889  *)
10890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10891for as_dir in $PATH
10892do
10893  IFS=$as_save_IFS
10894  test -z "$as_dir" && as_dir=.
10895    for ac_exec_ext in '' $ac_executable_extensions; do
10896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10897    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10899    break 2
10900  fi
10901done
10902  done
10903IFS=$as_save_IFS
10904
10905  ;;
10906esac
10907fi
10908SORT=$ac_cv_path_SORT
10909if test -n "$SORT"; then
10910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10911$as_echo "$SORT" >&6; }
10912else
10913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10914$as_echo "no" >&6; }
10915fi
10916
10917
10918  test -n "$SORT" && break
10919done
10920
10921  else
10922    # The variable is set, but is it from the command line or the environment?
10923
10924    # Try to remove the string !SORT! from our list.
10925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10927      # If it failed, the variable was not from the command line. Ignore it,
10928      # but warn the user (except for BASH, which is always set by the calling BASH).
10929      if test "xSORT" != xBASH; then
10930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10931$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10932      fi
10933      # Try to locate tool using the code snippet
10934      for ac_prog in sort
10935do
10936  # Extract the first word of "$ac_prog", so it can be a program name with args.
10937set dummy $ac_prog; ac_word=$2
10938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10939$as_echo_n "checking for $ac_word... " >&6; }
10940if ${ac_cv_path_SORT+:} false; then :
10941  $as_echo_n "(cached) " >&6
10942else
10943  case $SORT in
10944  [\\/]* | ?:[\\/]*)
10945  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10946  ;;
10947  *)
10948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10949for as_dir in $PATH
10950do
10951  IFS=$as_save_IFS
10952  test -z "$as_dir" && as_dir=.
10953    for ac_exec_ext in '' $ac_executable_extensions; do
10954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10955    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10957    break 2
10958  fi
10959done
10960  done
10961IFS=$as_save_IFS
10962
10963  ;;
10964esac
10965fi
10966SORT=$ac_cv_path_SORT
10967if test -n "$SORT"; then
10968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10969$as_echo "$SORT" >&6; }
10970else
10971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10972$as_echo "no" >&6; }
10973fi
10974
10975
10976  test -n "$SORT" && break
10977done
10978
10979    else
10980      # If it succeeded, then it was overridden by the user. We will use it
10981      # for the tool.
10982
10983      # First remove it from the list of overridden variables, so we can test
10984      # for unknown variables in the end.
10985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10986
10987      # Check if we try to supply an empty value
10988      if test "x$SORT" = x; then
10989        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10990$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10991        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10992$as_echo_n "checking for SORT... " >&6; }
10993        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10994$as_echo "disabled" >&6; }
10995      else
10996        # Check if the provided tool contains a complete path.
10997        tool_specified="$SORT"
10998        tool_basename="${tool_specified##*/}"
10999        if test "x$tool_basename" = "x$tool_specified"; then
11000          # A command without a complete path is provided, search $PATH.
11001          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11002$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11003          # Extract the first word of "$tool_basename", so it can be a program name with args.
11004set dummy $tool_basename; ac_word=$2
11005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11006$as_echo_n "checking for $ac_word... " >&6; }
11007if ${ac_cv_path_SORT+:} false; then :
11008  $as_echo_n "(cached) " >&6
11009else
11010  case $SORT in
11011  [\\/]* | ?:[\\/]*)
11012  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11013  ;;
11014  *)
11015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11016for as_dir in $PATH
11017do
11018  IFS=$as_save_IFS
11019  test -z "$as_dir" && as_dir=.
11020    for ac_exec_ext in '' $ac_executable_extensions; do
11021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11022    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11024    break 2
11025  fi
11026done
11027  done
11028IFS=$as_save_IFS
11029
11030  ;;
11031esac
11032fi
11033SORT=$ac_cv_path_SORT
11034if test -n "$SORT"; then
11035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11036$as_echo "$SORT" >&6; }
11037else
11038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11039$as_echo "no" >&6; }
11040fi
11041
11042
11043          if test "x$SORT" = x; then
11044            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11045          fi
11046        else
11047          # Otherwise we believe it is a complete path. Use it as it is.
11048          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11049$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11050          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11051$as_echo_n "checking for SORT... " >&6; }
11052          if test ! -x "$tool_specified"; then
11053            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11054$as_echo "not found" >&6; }
11055            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11056          fi
11057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11058$as_echo "$tool_specified" >&6; }
11059        fi
11060      fi
11061    fi
11062
11063  fi
11064
11065
11066
11067  if test "x$SORT" = x; then
11068    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11069  fi
11070
11071
11072
11073
11074
11075  # Publish this variable in the help.
11076
11077
11078  if [ -z "${TAIL+x}" ]; then
11079    # The variable is not set by user, try to locate tool using the code snippet
11080    for ac_prog in tail
11081do
11082  # Extract the first word of "$ac_prog", so it can be a program name with args.
11083set dummy $ac_prog; ac_word=$2
11084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11085$as_echo_n "checking for $ac_word... " >&6; }
11086if ${ac_cv_path_TAIL+:} false; then :
11087  $as_echo_n "(cached) " >&6
11088else
11089  case $TAIL in
11090  [\\/]* | ?:[\\/]*)
11091  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11092  ;;
11093  *)
11094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11095for as_dir in $PATH
11096do
11097  IFS=$as_save_IFS
11098  test -z "$as_dir" && as_dir=.
11099    for ac_exec_ext in '' $ac_executable_extensions; do
11100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11101    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11103    break 2
11104  fi
11105done
11106  done
11107IFS=$as_save_IFS
11108
11109  ;;
11110esac
11111fi
11112TAIL=$ac_cv_path_TAIL
11113if test -n "$TAIL"; then
11114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11115$as_echo "$TAIL" >&6; }
11116else
11117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11118$as_echo "no" >&6; }
11119fi
11120
11121
11122  test -n "$TAIL" && break
11123done
11124
11125  else
11126    # The variable is set, but is it from the command line or the environment?
11127
11128    # Try to remove the string !TAIL! from our list.
11129    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11130    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11131      # If it failed, the variable was not from the command line. Ignore it,
11132      # but warn the user (except for BASH, which is always set by the calling BASH).
11133      if test "xTAIL" != xBASH; then
11134        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11135$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11136      fi
11137      # Try to locate tool using the code snippet
11138      for ac_prog in tail
11139do
11140  # Extract the first word of "$ac_prog", so it can be a program name with args.
11141set dummy $ac_prog; ac_word=$2
11142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11143$as_echo_n "checking for $ac_word... " >&6; }
11144if ${ac_cv_path_TAIL+:} false; then :
11145  $as_echo_n "(cached) " >&6
11146else
11147  case $TAIL in
11148  [\\/]* | ?:[\\/]*)
11149  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11150  ;;
11151  *)
11152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11153for as_dir in $PATH
11154do
11155  IFS=$as_save_IFS
11156  test -z "$as_dir" && as_dir=.
11157    for ac_exec_ext in '' $ac_executable_extensions; do
11158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11159    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11161    break 2
11162  fi
11163done
11164  done
11165IFS=$as_save_IFS
11166
11167  ;;
11168esac
11169fi
11170TAIL=$ac_cv_path_TAIL
11171if test -n "$TAIL"; then
11172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11173$as_echo "$TAIL" >&6; }
11174else
11175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11176$as_echo "no" >&6; }
11177fi
11178
11179
11180  test -n "$TAIL" && break
11181done
11182
11183    else
11184      # If it succeeded, then it was overridden by the user. We will use it
11185      # for the tool.
11186
11187      # First remove it from the list of overridden variables, so we can test
11188      # for unknown variables in the end.
11189      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11190
11191      # Check if we try to supply an empty value
11192      if test "x$TAIL" = x; then
11193        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11194$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11195        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11196$as_echo_n "checking for TAIL... " >&6; }
11197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11198$as_echo "disabled" >&6; }
11199      else
11200        # Check if the provided tool contains a complete path.
11201        tool_specified="$TAIL"
11202        tool_basename="${tool_specified##*/}"
11203        if test "x$tool_basename" = "x$tool_specified"; then
11204          # A command without a complete path is provided, search $PATH.
11205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11206$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11207          # Extract the first word of "$tool_basename", so it can be a program name with args.
11208set dummy $tool_basename; ac_word=$2
11209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11210$as_echo_n "checking for $ac_word... " >&6; }
11211if ${ac_cv_path_TAIL+:} false; then :
11212  $as_echo_n "(cached) " >&6
11213else
11214  case $TAIL in
11215  [\\/]* | ?:[\\/]*)
11216  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11217  ;;
11218  *)
11219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11220for as_dir in $PATH
11221do
11222  IFS=$as_save_IFS
11223  test -z "$as_dir" && as_dir=.
11224    for ac_exec_ext in '' $ac_executable_extensions; do
11225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11226    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11228    break 2
11229  fi
11230done
11231  done
11232IFS=$as_save_IFS
11233
11234  ;;
11235esac
11236fi
11237TAIL=$ac_cv_path_TAIL
11238if test -n "$TAIL"; then
11239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11240$as_echo "$TAIL" >&6; }
11241else
11242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11243$as_echo "no" >&6; }
11244fi
11245
11246
11247          if test "x$TAIL" = x; then
11248            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11249          fi
11250        else
11251          # Otherwise we believe it is a complete path. Use it as it is.
11252          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11253$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11254          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11255$as_echo_n "checking for TAIL... " >&6; }
11256          if test ! -x "$tool_specified"; then
11257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11258$as_echo "not found" >&6; }
11259            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11260          fi
11261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11262$as_echo "$tool_specified" >&6; }
11263        fi
11264      fi
11265    fi
11266
11267  fi
11268
11269
11270
11271  if test "x$TAIL" = x; then
11272    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11273  fi
11274
11275
11276
11277
11278
11279  # Publish this variable in the help.
11280
11281
11282  if [ -z "${TAR+x}" ]; then
11283    # The variable is not set by user, try to locate tool using the code snippet
11284    for ac_prog in gtar tar
11285do
11286  # Extract the first word of "$ac_prog", so it can be a program name with args.
11287set dummy $ac_prog; ac_word=$2
11288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11289$as_echo_n "checking for $ac_word... " >&6; }
11290if ${ac_cv_path_TAR+:} false; then :
11291  $as_echo_n "(cached) " >&6
11292else
11293  case $TAR in
11294  [\\/]* | ?:[\\/]*)
11295  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11296  ;;
11297  *)
11298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11299for as_dir in $PATH
11300do
11301  IFS=$as_save_IFS
11302  test -z "$as_dir" && as_dir=.
11303    for ac_exec_ext in '' $ac_executable_extensions; do
11304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11305    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11307    break 2
11308  fi
11309done
11310  done
11311IFS=$as_save_IFS
11312
11313  ;;
11314esac
11315fi
11316TAR=$ac_cv_path_TAR
11317if test -n "$TAR"; then
11318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11319$as_echo "$TAR" >&6; }
11320else
11321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11322$as_echo "no" >&6; }
11323fi
11324
11325
11326  test -n "$TAR" && break
11327done
11328
11329  else
11330    # The variable is set, but is it from the command line or the environment?
11331
11332    # Try to remove the string !TAR! from our list.
11333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11335      # If it failed, the variable was not from the command line. Ignore it,
11336      # but warn the user (except for BASH, which is always set by the calling BASH).
11337      if test "xTAR" != xBASH; then
11338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11339$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11340      fi
11341      # Try to locate tool using the code snippet
11342      for ac_prog in gtar tar
11343do
11344  # Extract the first word of "$ac_prog", so it can be a program name with args.
11345set dummy $ac_prog; ac_word=$2
11346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11347$as_echo_n "checking for $ac_word... " >&6; }
11348if ${ac_cv_path_TAR+:} false; then :
11349  $as_echo_n "(cached) " >&6
11350else
11351  case $TAR in
11352  [\\/]* | ?:[\\/]*)
11353  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11354  ;;
11355  *)
11356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11357for as_dir in $PATH
11358do
11359  IFS=$as_save_IFS
11360  test -z "$as_dir" && as_dir=.
11361    for ac_exec_ext in '' $ac_executable_extensions; do
11362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11363    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11365    break 2
11366  fi
11367done
11368  done
11369IFS=$as_save_IFS
11370
11371  ;;
11372esac
11373fi
11374TAR=$ac_cv_path_TAR
11375if test -n "$TAR"; then
11376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11377$as_echo "$TAR" >&6; }
11378else
11379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11380$as_echo "no" >&6; }
11381fi
11382
11383
11384  test -n "$TAR" && break
11385done
11386
11387    else
11388      # If it succeeded, then it was overridden by the user. We will use it
11389      # for the tool.
11390
11391      # First remove it from the list of overridden variables, so we can test
11392      # for unknown variables in the end.
11393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11394
11395      # Check if we try to supply an empty value
11396      if test "x$TAR" = x; then
11397        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11398$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11399        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11400$as_echo_n "checking for TAR... " >&6; }
11401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11402$as_echo "disabled" >&6; }
11403      else
11404        # Check if the provided tool contains a complete path.
11405        tool_specified="$TAR"
11406        tool_basename="${tool_specified##*/}"
11407        if test "x$tool_basename" = "x$tool_specified"; then
11408          # A command without a complete path is provided, search $PATH.
11409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11410$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11411          # Extract the first word of "$tool_basename", so it can be a program name with args.
11412set dummy $tool_basename; ac_word=$2
11413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11414$as_echo_n "checking for $ac_word... " >&6; }
11415if ${ac_cv_path_TAR+:} false; then :
11416  $as_echo_n "(cached) " >&6
11417else
11418  case $TAR in
11419  [\\/]* | ?:[\\/]*)
11420  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11421  ;;
11422  *)
11423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11424for as_dir in $PATH
11425do
11426  IFS=$as_save_IFS
11427  test -z "$as_dir" && as_dir=.
11428    for ac_exec_ext in '' $ac_executable_extensions; do
11429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11430    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11432    break 2
11433  fi
11434done
11435  done
11436IFS=$as_save_IFS
11437
11438  ;;
11439esac
11440fi
11441TAR=$ac_cv_path_TAR
11442if test -n "$TAR"; then
11443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11444$as_echo "$TAR" >&6; }
11445else
11446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11447$as_echo "no" >&6; }
11448fi
11449
11450
11451          if test "x$TAR" = x; then
11452            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11453          fi
11454        else
11455          # Otherwise we believe it is a complete path. Use it as it is.
11456          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11457$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11458          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11459$as_echo_n "checking for TAR... " >&6; }
11460          if test ! -x "$tool_specified"; then
11461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11462$as_echo "not found" >&6; }
11463            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11464          fi
11465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11466$as_echo "$tool_specified" >&6; }
11467        fi
11468      fi
11469    fi
11470
11471  fi
11472
11473
11474
11475  if test "x$TAR" = x; then
11476    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11477  fi
11478
11479
11480
11481
11482
11483  # Publish this variable in the help.
11484
11485
11486  if [ -z "${TEE+x}" ]; then
11487    # The variable is not set by user, try to locate tool using the code snippet
11488    for ac_prog in tee
11489do
11490  # Extract the first word of "$ac_prog", so it can be a program name with args.
11491set dummy $ac_prog; ac_word=$2
11492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11493$as_echo_n "checking for $ac_word... " >&6; }
11494if ${ac_cv_path_TEE+:} false; then :
11495  $as_echo_n "(cached) " >&6
11496else
11497  case $TEE in
11498  [\\/]* | ?:[\\/]*)
11499  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11500  ;;
11501  *)
11502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11503for as_dir in $PATH
11504do
11505  IFS=$as_save_IFS
11506  test -z "$as_dir" && as_dir=.
11507    for ac_exec_ext in '' $ac_executable_extensions; do
11508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11509    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11511    break 2
11512  fi
11513done
11514  done
11515IFS=$as_save_IFS
11516
11517  ;;
11518esac
11519fi
11520TEE=$ac_cv_path_TEE
11521if test -n "$TEE"; then
11522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11523$as_echo "$TEE" >&6; }
11524else
11525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11526$as_echo "no" >&6; }
11527fi
11528
11529
11530  test -n "$TEE" && break
11531done
11532
11533  else
11534    # The variable is set, but is it from the command line or the environment?
11535
11536    # Try to remove the string !TEE! from our list.
11537    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11538    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11539      # If it failed, the variable was not from the command line. Ignore it,
11540      # but warn the user (except for BASH, which is always set by the calling BASH).
11541      if test "xTEE" != xBASH; then
11542        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11543$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11544      fi
11545      # Try to locate tool using the code snippet
11546      for ac_prog in tee
11547do
11548  # Extract the first word of "$ac_prog", so it can be a program name with args.
11549set dummy $ac_prog; ac_word=$2
11550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11551$as_echo_n "checking for $ac_word... " >&6; }
11552if ${ac_cv_path_TEE+:} false; then :
11553  $as_echo_n "(cached) " >&6
11554else
11555  case $TEE in
11556  [\\/]* | ?:[\\/]*)
11557  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11558  ;;
11559  *)
11560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11561for as_dir in $PATH
11562do
11563  IFS=$as_save_IFS
11564  test -z "$as_dir" && as_dir=.
11565    for ac_exec_ext in '' $ac_executable_extensions; do
11566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11567    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11569    break 2
11570  fi
11571done
11572  done
11573IFS=$as_save_IFS
11574
11575  ;;
11576esac
11577fi
11578TEE=$ac_cv_path_TEE
11579if test -n "$TEE"; then
11580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11581$as_echo "$TEE" >&6; }
11582else
11583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11584$as_echo "no" >&6; }
11585fi
11586
11587
11588  test -n "$TEE" && break
11589done
11590
11591    else
11592      # If it succeeded, then it was overridden by the user. We will use it
11593      # for the tool.
11594
11595      # First remove it from the list of overridden variables, so we can test
11596      # for unknown variables in the end.
11597      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11598
11599      # Check if we try to supply an empty value
11600      if test "x$TEE" = x; then
11601        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11602$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11604$as_echo_n "checking for TEE... " >&6; }
11605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11606$as_echo "disabled" >&6; }
11607      else
11608        # Check if the provided tool contains a complete path.
11609        tool_specified="$TEE"
11610        tool_basename="${tool_specified##*/}"
11611        if test "x$tool_basename" = "x$tool_specified"; then
11612          # A command without a complete path is provided, search $PATH.
11613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11614$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11615          # Extract the first word of "$tool_basename", so it can be a program name with args.
11616set dummy $tool_basename; ac_word=$2
11617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11618$as_echo_n "checking for $ac_word... " >&6; }
11619if ${ac_cv_path_TEE+:} false; then :
11620  $as_echo_n "(cached) " >&6
11621else
11622  case $TEE in
11623  [\\/]* | ?:[\\/]*)
11624  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11625  ;;
11626  *)
11627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11628for as_dir in $PATH
11629do
11630  IFS=$as_save_IFS
11631  test -z "$as_dir" && as_dir=.
11632    for ac_exec_ext in '' $ac_executable_extensions; do
11633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11634    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11636    break 2
11637  fi
11638done
11639  done
11640IFS=$as_save_IFS
11641
11642  ;;
11643esac
11644fi
11645TEE=$ac_cv_path_TEE
11646if test -n "$TEE"; then
11647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11648$as_echo "$TEE" >&6; }
11649else
11650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11651$as_echo "no" >&6; }
11652fi
11653
11654
11655          if test "x$TEE" = x; then
11656            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11657          fi
11658        else
11659          # Otherwise we believe it is a complete path. Use it as it is.
11660          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11661$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11662          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11663$as_echo_n "checking for TEE... " >&6; }
11664          if test ! -x "$tool_specified"; then
11665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11666$as_echo "not found" >&6; }
11667            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11668          fi
11669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11670$as_echo "$tool_specified" >&6; }
11671        fi
11672      fi
11673    fi
11674
11675  fi
11676
11677
11678
11679  if test "x$TEE" = x; then
11680    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11681  fi
11682
11683
11684
11685
11686
11687  # Publish this variable in the help.
11688
11689
11690  if [ -z "${TOUCH+x}" ]; then
11691    # The variable is not set by user, try to locate tool using the code snippet
11692    for ac_prog in touch
11693do
11694  # Extract the first word of "$ac_prog", so it can be a program name with args.
11695set dummy $ac_prog; ac_word=$2
11696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11697$as_echo_n "checking for $ac_word... " >&6; }
11698if ${ac_cv_path_TOUCH+:} false; then :
11699  $as_echo_n "(cached) " >&6
11700else
11701  case $TOUCH in
11702  [\\/]* | ?:[\\/]*)
11703  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11704  ;;
11705  *)
11706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11707for as_dir in $PATH
11708do
11709  IFS=$as_save_IFS
11710  test -z "$as_dir" && as_dir=.
11711    for ac_exec_ext in '' $ac_executable_extensions; do
11712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11713    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11715    break 2
11716  fi
11717done
11718  done
11719IFS=$as_save_IFS
11720
11721  ;;
11722esac
11723fi
11724TOUCH=$ac_cv_path_TOUCH
11725if test -n "$TOUCH"; then
11726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11727$as_echo "$TOUCH" >&6; }
11728else
11729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11730$as_echo "no" >&6; }
11731fi
11732
11733
11734  test -n "$TOUCH" && break
11735done
11736
11737  else
11738    # The variable is set, but is it from the command line or the environment?
11739
11740    # Try to remove the string !TOUCH! from our list.
11741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11743      # If it failed, the variable was not from the command line. Ignore it,
11744      # but warn the user (except for BASH, which is always set by the calling BASH).
11745      if test "xTOUCH" != xBASH; then
11746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11747$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11748      fi
11749      # Try to locate tool using the code snippet
11750      for ac_prog in touch
11751do
11752  # Extract the first word of "$ac_prog", so it can be a program name with args.
11753set dummy $ac_prog; ac_word=$2
11754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11755$as_echo_n "checking for $ac_word... " >&6; }
11756if ${ac_cv_path_TOUCH+:} false; then :
11757  $as_echo_n "(cached) " >&6
11758else
11759  case $TOUCH in
11760  [\\/]* | ?:[\\/]*)
11761  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11762  ;;
11763  *)
11764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11765for as_dir in $PATH
11766do
11767  IFS=$as_save_IFS
11768  test -z "$as_dir" && as_dir=.
11769    for ac_exec_ext in '' $ac_executable_extensions; do
11770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11771    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11773    break 2
11774  fi
11775done
11776  done
11777IFS=$as_save_IFS
11778
11779  ;;
11780esac
11781fi
11782TOUCH=$ac_cv_path_TOUCH
11783if test -n "$TOUCH"; then
11784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11785$as_echo "$TOUCH" >&6; }
11786else
11787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11788$as_echo "no" >&6; }
11789fi
11790
11791
11792  test -n "$TOUCH" && break
11793done
11794
11795    else
11796      # If it succeeded, then it was overridden by the user. We will use it
11797      # for the tool.
11798
11799      # First remove it from the list of overridden variables, so we can test
11800      # for unknown variables in the end.
11801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11802
11803      # Check if we try to supply an empty value
11804      if test "x$TOUCH" = x; then
11805        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11806$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11807        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11808$as_echo_n "checking for TOUCH... " >&6; }
11809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11810$as_echo "disabled" >&6; }
11811      else
11812        # Check if the provided tool contains a complete path.
11813        tool_specified="$TOUCH"
11814        tool_basename="${tool_specified##*/}"
11815        if test "x$tool_basename" = "x$tool_specified"; then
11816          # A command without a complete path is provided, search $PATH.
11817          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11818$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11819          # Extract the first word of "$tool_basename", so it can be a program name with args.
11820set dummy $tool_basename; ac_word=$2
11821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11822$as_echo_n "checking for $ac_word... " >&6; }
11823if ${ac_cv_path_TOUCH+:} false; then :
11824  $as_echo_n "(cached) " >&6
11825else
11826  case $TOUCH in
11827  [\\/]* | ?:[\\/]*)
11828  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11829  ;;
11830  *)
11831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11832for as_dir in $PATH
11833do
11834  IFS=$as_save_IFS
11835  test -z "$as_dir" && as_dir=.
11836    for ac_exec_ext in '' $ac_executable_extensions; do
11837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11838    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11840    break 2
11841  fi
11842done
11843  done
11844IFS=$as_save_IFS
11845
11846  ;;
11847esac
11848fi
11849TOUCH=$ac_cv_path_TOUCH
11850if test -n "$TOUCH"; then
11851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11852$as_echo "$TOUCH" >&6; }
11853else
11854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11855$as_echo "no" >&6; }
11856fi
11857
11858
11859          if test "x$TOUCH" = x; then
11860            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11861          fi
11862        else
11863          # Otherwise we believe it is a complete path. Use it as it is.
11864          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11865$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11866          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11867$as_echo_n "checking for TOUCH... " >&6; }
11868          if test ! -x "$tool_specified"; then
11869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11870$as_echo "not found" >&6; }
11871            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11872          fi
11873          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11874$as_echo "$tool_specified" >&6; }
11875        fi
11876      fi
11877    fi
11878
11879  fi
11880
11881
11882
11883  if test "x$TOUCH" = x; then
11884    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11885  fi
11886
11887
11888
11889
11890
11891  # Publish this variable in the help.
11892
11893
11894  if [ -z "${TR+x}" ]; then
11895    # The variable is not set by user, try to locate tool using the code snippet
11896    for ac_prog in tr
11897do
11898  # Extract the first word of "$ac_prog", so it can be a program name with args.
11899set dummy $ac_prog; ac_word=$2
11900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11901$as_echo_n "checking for $ac_word... " >&6; }
11902if ${ac_cv_path_TR+:} false; then :
11903  $as_echo_n "(cached) " >&6
11904else
11905  case $TR in
11906  [\\/]* | ?:[\\/]*)
11907  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11908  ;;
11909  *)
11910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11911for as_dir in $PATH
11912do
11913  IFS=$as_save_IFS
11914  test -z "$as_dir" && as_dir=.
11915    for ac_exec_ext in '' $ac_executable_extensions; do
11916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11917    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11919    break 2
11920  fi
11921done
11922  done
11923IFS=$as_save_IFS
11924
11925  ;;
11926esac
11927fi
11928TR=$ac_cv_path_TR
11929if test -n "$TR"; then
11930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11931$as_echo "$TR" >&6; }
11932else
11933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11934$as_echo "no" >&6; }
11935fi
11936
11937
11938  test -n "$TR" && break
11939done
11940
11941  else
11942    # The variable is set, but is it from the command line or the environment?
11943
11944    # Try to remove the string !TR! from our list.
11945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11947      # If it failed, the variable was not from the command line. Ignore it,
11948      # but warn the user (except for BASH, which is always set by the calling BASH).
11949      if test "xTR" != xBASH; then
11950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11951$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11952      fi
11953      # Try to locate tool using the code snippet
11954      for ac_prog in tr
11955do
11956  # Extract the first word of "$ac_prog", so it can be a program name with args.
11957set dummy $ac_prog; ac_word=$2
11958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11959$as_echo_n "checking for $ac_word... " >&6; }
11960if ${ac_cv_path_TR+:} false; then :
11961  $as_echo_n "(cached) " >&6
11962else
11963  case $TR in
11964  [\\/]* | ?:[\\/]*)
11965  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11966  ;;
11967  *)
11968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11969for as_dir in $PATH
11970do
11971  IFS=$as_save_IFS
11972  test -z "$as_dir" && as_dir=.
11973    for ac_exec_ext in '' $ac_executable_extensions; do
11974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11975    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11977    break 2
11978  fi
11979done
11980  done
11981IFS=$as_save_IFS
11982
11983  ;;
11984esac
11985fi
11986TR=$ac_cv_path_TR
11987if test -n "$TR"; then
11988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11989$as_echo "$TR" >&6; }
11990else
11991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11992$as_echo "no" >&6; }
11993fi
11994
11995
11996  test -n "$TR" && break
11997done
11998
11999    else
12000      # If it succeeded, then it was overridden by the user. We will use it
12001      # for the tool.
12002
12003      # First remove it from the list of overridden variables, so we can test
12004      # for unknown variables in the end.
12005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12006
12007      # Check if we try to supply an empty value
12008      if test "x$TR" = x; then
12009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12010$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12012$as_echo_n "checking for TR... " >&6; }
12013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12014$as_echo "disabled" >&6; }
12015      else
12016        # Check if the provided tool contains a complete path.
12017        tool_specified="$TR"
12018        tool_basename="${tool_specified##*/}"
12019        if test "x$tool_basename" = "x$tool_specified"; then
12020          # A command without a complete path is provided, search $PATH.
12021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12022$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12023          # Extract the first word of "$tool_basename", so it can be a program name with args.
12024set dummy $tool_basename; ac_word=$2
12025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12026$as_echo_n "checking for $ac_word... " >&6; }
12027if ${ac_cv_path_TR+:} false; then :
12028  $as_echo_n "(cached) " >&6
12029else
12030  case $TR in
12031  [\\/]* | ?:[\\/]*)
12032  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12033  ;;
12034  *)
12035  as_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_path_TR="$as_dir/$ac_word$ac_exec_ext"
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
12050  ;;
12051esac
12052fi
12053TR=$ac_cv_path_TR
12054if test -n "$TR"; then
12055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12056$as_echo "$TR" >&6; }
12057else
12058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059$as_echo "no" >&6; }
12060fi
12061
12062
12063          if test "x$TR" = x; then
12064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12065          fi
12066        else
12067          # Otherwise we believe it is a complete path. Use it as it is.
12068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12069$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12071$as_echo_n "checking for TR... " >&6; }
12072          if test ! -x "$tool_specified"; then
12073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12074$as_echo "not found" >&6; }
12075            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12076          fi
12077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12078$as_echo "$tool_specified" >&6; }
12079        fi
12080      fi
12081    fi
12082
12083  fi
12084
12085
12086
12087  if test "x$TR" = x; then
12088    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12089  fi
12090
12091
12092
12093
12094
12095  # Publish this variable in the help.
12096
12097
12098  if [ -z "${UNAME+x}" ]; then
12099    # The variable is not set by user, try to locate tool using the code snippet
12100    for ac_prog in uname
12101do
12102  # Extract the first word of "$ac_prog", so it can be a program name with args.
12103set dummy $ac_prog; ac_word=$2
12104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12105$as_echo_n "checking for $ac_word... " >&6; }
12106if ${ac_cv_path_UNAME+:} false; then :
12107  $as_echo_n "(cached) " >&6
12108else
12109  case $UNAME in
12110  [\\/]* | ?:[\\/]*)
12111  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12112  ;;
12113  *)
12114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12115for as_dir in $PATH
12116do
12117  IFS=$as_save_IFS
12118  test -z "$as_dir" && as_dir=.
12119    for ac_exec_ext in '' $ac_executable_extensions; do
12120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12121    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12123    break 2
12124  fi
12125done
12126  done
12127IFS=$as_save_IFS
12128
12129  ;;
12130esac
12131fi
12132UNAME=$ac_cv_path_UNAME
12133if test -n "$UNAME"; then
12134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12135$as_echo "$UNAME" >&6; }
12136else
12137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12138$as_echo "no" >&6; }
12139fi
12140
12141
12142  test -n "$UNAME" && break
12143done
12144
12145  else
12146    # The variable is set, but is it from the command line or the environment?
12147
12148    # Try to remove the string !UNAME! from our list.
12149    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12150    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12151      # If it failed, the variable was not from the command line. Ignore it,
12152      # but warn the user (except for BASH, which is always set by the calling BASH).
12153      if test "xUNAME" != xBASH; then
12154        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12155$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12156      fi
12157      # Try to locate tool using the code snippet
12158      for ac_prog in uname
12159do
12160  # Extract the first word of "$ac_prog", so it can be a program name with args.
12161set dummy $ac_prog; ac_word=$2
12162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12163$as_echo_n "checking for $ac_word... " >&6; }
12164if ${ac_cv_path_UNAME+:} false; then :
12165  $as_echo_n "(cached) " >&6
12166else
12167  case $UNAME in
12168  [\\/]* | ?:[\\/]*)
12169  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12170  ;;
12171  *)
12172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12173for as_dir in $PATH
12174do
12175  IFS=$as_save_IFS
12176  test -z "$as_dir" && as_dir=.
12177    for ac_exec_ext in '' $ac_executable_extensions; do
12178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12179    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12181    break 2
12182  fi
12183done
12184  done
12185IFS=$as_save_IFS
12186
12187  ;;
12188esac
12189fi
12190UNAME=$ac_cv_path_UNAME
12191if test -n "$UNAME"; then
12192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12193$as_echo "$UNAME" >&6; }
12194else
12195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12196$as_echo "no" >&6; }
12197fi
12198
12199
12200  test -n "$UNAME" && break
12201done
12202
12203    else
12204      # If it succeeded, then it was overridden by the user. We will use it
12205      # for the tool.
12206
12207      # First remove it from the list of overridden variables, so we can test
12208      # for unknown variables in the end.
12209      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12210
12211      # Check if we try to supply an empty value
12212      if test "x$UNAME" = x; then
12213        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12214$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12216$as_echo_n "checking for UNAME... " >&6; }
12217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12218$as_echo "disabled" >&6; }
12219      else
12220        # Check if the provided tool contains a complete path.
12221        tool_specified="$UNAME"
12222        tool_basename="${tool_specified##*/}"
12223        if test "x$tool_basename" = "x$tool_specified"; then
12224          # A command without a complete path is provided, search $PATH.
12225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12226$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12227          # Extract the first word of "$tool_basename", so it can be a program name with args.
12228set dummy $tool_basename; ac_word=$2
12229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12230$as_echo_n "checking for $ac_word... " >&6; }
12231if ${ac_cv_path_UNAME+:} false; then :
12232  $as_echo_n "(cached) " >&6
12233else
12234  case $UNAME in
12235  [\\/]* | ?:[\\/]*)
12236  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12237  ;;
12238  *)
12239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12240for as_dir in $PATH
12241do
12242  IFS=$as_save_IFS
12243  test -z "$as_dir" && as_dir=.
12244    for ac_exec_ext in '' $ac_executable_extensions; do
12245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12246    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12248    break 2
12249  fi
12250done
12251  done
12252IFS=$as_save_IFS
12253
12254  ;;
12255esac
12256fi
12257UNAME=$ac_cv_path_UNAME
12258if test -n "$UNAME"; then
12259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12260$as_echo "$UNAME" >&6; }
12261else
12262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12263$as_echo "no" >&6; }
12264fi
12265
12266
12267          if test "x$UNAME" = x; then
12268            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12269          fi
12270        else
12271          # Otherwise we believe it is a complete path. Use it as it is.
12272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12273$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12274          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12275$as_echo_n "checking for UNAME... " >&6; }
12276          if test ! -x "$tool_specified"; then
12277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12278$as_echo "not found" >&6; }
12279            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12280          fi
12281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12282$as_echo "$tool_specified" >&6; }
12283        fi
12284      fi
12285    fi
12286
12287  fi
12288
12289
12290
12291  if test "x$UNAME" = x; then
12292    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12293  fi
12294
12295
12296
12297
12298
12299  # Publish this variable in the help.
12300
12301
12302  if [ -z "${UNIQ+x}" ]; then
12303    # The variable is not set by user, try to locate tool using the code snippet
12304    for ac_prog in uniq
12305do
12306  # Extract the first word of "$ac_prog", so it can be a program name with args.
12307set dummy $ac_prog; ac_word=$2
12308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12309$as_echo_n "checking for $ac_word... " >&6; }
12310if ${ac_cv_path_UNIQ+:} false; then :
12311  $as_echo_n "(cached) " >&6
12312else
12313  case $UNIQ in
12314  [\\/]* | ?:[\\/]*)
12315  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12316  ;;
12317  *)
12318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12319for as_dir in $PATH
12320do
12321  IFS=$as_save_IFS
12322  test -z "$as_dir" && as_dir=.
12323    for ac_exec_ext in '' $ac_executable_extensions; do
12324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12325    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12327    break 2
12328  fi
12329done
12330  done
12331IFS=$as_save_IFS
12332
12333  ;;
12334esac
12335fi
12336UNIQ=$ac_cv_path_UNIQ
12337if test -n "$UNIQ"; then
12338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12339$as_echo "$UNIQ" >&6; }
12340else
12341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12342$as_echo "no" >&6; }
12343fi
12344
12345
12346  test -n "$UNIQ" && break
12347done
12348
12349  else
12350    # The variable is set, but is it from the command line or the environment?
12351
12352    # Try to remove the string !UNIQ! from our list.
12353    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12354    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12355      # If it failed, the variable was not from the command line. Ignore it,
12356      # but warn the user (except for BASH, which is always set by the calling BASH).
12357      if test "xUNIQ" != xBASH; then
12358        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12359$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12360      fi
12361      # Try to locate tool using the code snippet
12362      for ac_prog in uniq
12363do
12364  # Extract the first word of "$ac_prog", so it can be a program name with args.
12365set dummy $ac_prog; ac_word=$2
12366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12367$as_echo_n "checking for $ac_word... " >&6; }
12368if ${ac_cv_path_UNIQ+:} false; then :
12369  $as_echo_n "(cached) " >&6
12370else
12371  case $UNIQ in
12372  [\\/]* | ?:[\\/]*)
12373  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12374  ;;
12375  *)
12376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12377for as_dir in $PATH
12378do
12379  IFS=$as_save_IFS
12380  test -z "$as_dir" && as_dir=.
12381    for ac_exec_ext in '' $ac_executable_extensions; do
12382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12383    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12385    break 2
12386  fi
12387done
12388  done
12389IFS=$as_save_IFS
12390
12391  ;;
12392esac
12393fi
12394UNIQ=$ac_cv_path_UNIQ
12395if test -n "$UNIQ"; then
12396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12397$as_echo "$UNIQ" >&6; }
12398else
12399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12400$as_echo "no" >&6; }
12401fi
12402
12403
12404  test -n "$UNIQ" && break
12405done
12406
12407    else
12408      # If it succeeded, then it was overridden by the user. We will use it
12409      # for the tool.
12410
12411      # First remove it from the list of overridden variables, so we can test
12412      # for unknown variables in the end.
12413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12414
12415      # Check if we try to supply an empty value
12416      if test "x$UNIQ" = x; then
12417        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12418$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12420$as_echo_n "checking for UNIQ... " >&6; }
12421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12422$as_echo "disabled" >&6; }
12423      else
12424        # Check if the provided tool contains a complete path.
12425        tool_specified="$UNIQ"
12426        tool_basename="${tool_specified##*/}"
12427        if test "x$tool_basename" = "x$tool_specified"; then
12428          # A command without a complete path is provided, search $PATH.
12429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12430$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12431          # Extract the first word of "$tool_basename", so it can be a program name with args.
12432set dummy $tool_basename; ac_word=$2
12433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12434$as_echo_n "checking for $ac_word... " >&6; }
12435if ${ac_cv_path_UNIQ+:} false; then :
12436  $as_echo_n "(cached) " >&6
12437else
12438  case $UNIQ in
12439  [\\/]* | ?:[\\/]*)
12440  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12441  ;;
12442  *)
12443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12444for as_dir in $PATH
12445do
12446  IFS=$as_save_IFS
12447  test -z "$as_dir" && as_dir=.
12448    for ac_exec_ext in '' $ac_executable_extensions; do
12449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12450    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12452    break 2
12453  fi
12454done
12455  done
12456IFS=$as_save_IFS
12457
12458  ;;
12459esac
12460fi
12461UNIQ=$ac_cv_path_UNIQ
12462if test -n "$UNIQ"; then
12463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12464$as_echo "$UNIQ" >&6; }
12465else
12466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12467$as_echo "no" >&6; }
12468fi
12469
12470
12471          if test "x$UNIQ" = x; then
12472            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12473          fi
12474        else
12475          # Otherwise we believe it is a complete path. Use it as it is.
12476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12477$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12478          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12479$as_echo_n "checking for UNIQ... " >&6; }
12480          if test ! -x "$tool_specified"; then
12481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12482$as_echo "not found" >&6; }
12483            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12484          fi
12485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12486$as_echo "$tool_specified" >&6; }
12487        fi
12488      fi
12489    fi
12490
12491  fi
12492
12493
12494
12495  if test "x$UNIQ" = x; then
12496    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12497  fi
12498
12499
12500
12501
12502
12503  # Publish this variable in the help.
12504
12505
12506  if [ -z "${WC+x}" ]; then
12507    # The variable is not set by user, try to locate tool using the code snippet
12508    for ac_prog in wc
12509do
12510  # Extract the first word of "$ac_prog", so it can be a program name with args.
12511set dummy $ac_prog; ac_word=$2
12512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12513$as_echo_n "checking for $ac_word... " >&6; }
12514if ${ac_cv_path_WC+:} false; then :
12515  $as_echo_n "(cached) " >&6
12516else
12517  case $WC in
12518  [\\/]* | ?:[\\/]*)
12519  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12520  ;;
12521  *)
12522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12523for as_dir in $PATH
12524do
12525  IFS=$as_save_IFS
12526  test -z "$as_dir" && as_dir=.
12527    for ac_exec_ext in '' $ac_executable_extensions; do
12528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12529    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12531    break 2
12532  fi
12533done
12534  done
12535IFS=$as_save_IFS
12536
12537  ;;
12538esac
12539fi
12540WC=$ac_cv_path_WC
12541if test -n "$WC"; then
12542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12543$as_echo "$WC" >&6; }
12544else
12545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12546$as_echo "no" >&6; }
12547fi
12548
12549
12550  test -n "$WC" && break
12551done
12552
12553  else
12554    # The variable is set, but is it from the command line or the environment?
12555
12556    # Try to remove the string !WC! from our list.
12557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12559      # If it failed, the variable was not from the command line. Ignore it,
12560      # but warn the user (except for BASH, which is always set by the calling BASH).
12561      if test "xWC" != xBASH; then
12562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12563$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12564      fi
12565      # Try to locate tool using the code snippet
12566      for ac_prog in wc
12567do
12568  # Extract the first word of "$ac_prog", so it can be a program name with args.
12569set dummy $ac_prog; ac_word=$2
12570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12571$as_echo_n "checking for $ac_word... " >&6; }
12572if ${ac_cv_path_WC+:} false; then :
12573  $as_echo_n "(cached) " >&6
12574else
12575  case $WC in
12576  [\\/]* | ?:[\\/]*)
12577  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12578  ;;
12579  *)
12580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12581for as_dir in $PATH
12582do
12583  IFS=$as_save_IFS
12584  test -z "$as_dir" && as_dir=.
12585    for ac_exec_ext in '' $ac_executable_extensions; do
12586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12587    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12589    break 2
12590  fi
12591done
12592  done
12593IFS=$as_save_IFS
12594
12595  ;;
12596esac
12597fi
12598WC=$ac_cv_path_WC
12599if test -n "$WC"; then
12600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12601$as_echo "$WC" >&6; }
12602else
12603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12604$as_echo "no" >&6; }
12605fi
12606
12607
12608  test -n "$WC" && break
12609done
12610
12611    else
12612      # If it succeeded, then it was overridden by the user. We will use it
12613      # for the tool.
12614
12615      # First remove it from the list of overridden variables, so we can test
12616      # for unknown variables in the end.
12617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12618
12619      # Check if we try to supply an empty value
12620      if test "x$WC" = x; then
12621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12622$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12624$as_echo_n "checking for WC... " >&6; }
12625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12626$as_echo "disabled" >&6; }
12627      else
12628        # Check if the provided tool contains a complete path.
12629        tool_specified="$WC"
12630        tool_basename="${tool_specified##*/}"
12631        if test "x$tool_basename" = "x$tool_specified"; then
12632          # A command without a complete path is provided, search $PATH.
12633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12634$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12635          # Extract the first word of "$tool_basename", so it can be a program name with args.
12636set dummy $tool_basename; ac_word=$2
12637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12638$as_echo_n "checking for $ac_word... " >&6; }
12639if ${ac_cv_path_WC+:} false; then :
12640  $as_echo_n "(cached) " >&6
12641else
12642  case $WC in
12643  [\\/]* | ?:[\\/]*)
12644  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12645  ;;
12646  *)
12647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12648for as_dir in $PATH
12649do
12650  IFS=$as_save_IFS
12651  test -z "$as_dir" && as_dir=.
12652    for ac_exec_ext in '' $ac_executable_extensions; do
12653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12654    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12656    break 2
12657  fi
12658done
12659  done
12660IFS=$as_save_IFS
12661
12662  ;;
12663esac
12664fi
12665WC=$ac_cv_path_WC
12666if test -n "$WC"; then
12667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12668$as_echo "$WC" >&6; }
12669else
12670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12671$as_echo "no" >&6; }
12672fi
12673
12674
12675          if test "x$WC" = x; then
12676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12677          fi
12678        else
12679          # Otherwise we believe it is a complete path. Use it as it is.
12680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12681$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12683$as_echo_n "checking for WC... " >&6; }
12684          if test ! -x "$tool_specified"; then
12685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12686$as_echo "not found" >&6; }
12687            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12688          fi
12689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12690$as_echo "$tool_specified" >&6; }
12691        fi
12692      fi
12693    fi
12694
12695  fi
12696
12697
12698
12699  if test "x$WC" = x; then
12700    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12701  fi
12702
12703
12704
12705
12706
12707  # Publish this variable in the help.
12708
12709
12710  if [ -z "${WHICH+x}" ]; then
12711    # The variable is not set by user, try to locate tool using the code snippet
12712    for ac_prog in which
12713do
12714  # Extract the first word of "$ac_prog", so it can be a program name with args.
12715set dummy $ac_prog; ac_word=$2
12716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12717$as_echo_n "checking for $ac_word... " >&6; }
12718if ${ac_cv_path_WHICH+:} false; then :
12719  $as_echo_n "(cached) " >&6
12720else
12721  case $WHICH in
12722  [\\/]* | ?:[\\/]*)
12723  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12724  ;;
12725  *)
12726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12727for as_dir in $PATH
12728do
12729  IFS=$as_save_IFS
12730  test -z "$as_dir" && as_dir=.
12731    for ac_exec_ext in '' $ac_executable_extensions; do
12732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12733    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12735    break 2
12736  fi
12737done
12738  done
12739IFS=$as_save_IFS
12740
12741  ;;
12742esac
12743fi
12744WHICH=$ac_cv_path_WHICH
12745if test -n "$WHICH"; then
12746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12747$as_echo "$WHICH" >&6; }
12748else
12749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12750$as_echo "no" >&6; }
12751fi
12752
12753
12754  test -n "$WHICH" && break
12755done
12756
12757  else
12758    # The variable is set, but is it from the command line or the environment?
12759
12760    # Try to remove the string !WHICH! from our list.
12761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12763      # If it failed, the variable was not from the command line. Ignore it,
12764      # but warn the user (except for BASH, which is always set by the calling BASH).
12765      if test "xWHICH" != xBASH; then
12766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12767$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12768      fi
12769      # Try to locate tool using the code snippet
12770      for ac_prog in which
12771do
12772  # Extract the first word of "$ac_prog", so it can be a program name with args.
12773set dummy $ac_prog; ac_word=$2
12774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12775$as_echo_n "checking for $ac_word... " >&6; }
12776if ${ac_cv_path_WHICH+:} false; then :
12777  $as_echo_n "(cached) " >&6
12778else
12779  case $WHICH in
12780  [\\/]* | ?:[\\/]*)
12781  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12782  ;;
12783  *)
12784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12785for as_dir in $PATH
12786do
12787  IFS=$as_save_IFS
12788  test -z "$as_dir" && as_dir=.
12789    for ac_exec_ext in '' $ac_executable_extensions; do
12790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12791    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12793    break 2
12794  fi
12795done
12796  done
12797IFS=$as_save_IFS
12798
12799  ;;
12800esac
12801fi
12802WHICH=$ac_cv_path_WHICH
12803if test -n "$WHICH"; then
12804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12805$as_echo "$WHICH" >&6; }
12806else
12807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12808$as_echo "no" >&6; }
12809fi
12810
12811
12812  test -n "$WHICH" && break
12813done
12814
12815    else
12816      # If it succeeded, then it was overridden by the user. We will use it
12817      # for the tool.
12818
12819      # First remove it from the list of overridden variables, so we can test
12820      # for unknown variables in the end.
12821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12822
12823      # Check if we try to supply an empty value
12824      if test "x$WHICH" = x; then
12825        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12826$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12828$as_echo_n "checking for WHICH... " >&6; }
12829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12830$as_echo "disabled" >&6; }
12831      else
12832        # Check if the provided tool contains a complete path.
12833        tool_specified="$WHICH"
12834        tool_basename="${tool_specified##*/}"
12835        if test "x$tool_basename" = "x$tool_specified"; then
12836          # A command without a complete path is provided, search $PATH.
12837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12838$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12839          # Extract the first word of "$tool_basename", so it can be a program name with args.
12840set dummy $tool_basename; ac_word=$2
12841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12842$as_echo_n "checking for $ac_word... " >&6; }
12843if ${ac_cv_path_WHICH+:} false; then :
12844  $as_echo_n "(cached) " >&6
12845else
12846  case $WHICH in
12847  [\\/]* | ?:[\\/]*)
12848  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12849  ;;
12850  *)
12851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12852for as_dir in $PATH
12853do
12854  IFS=$as_save_IFS
12855  test -z "$as_dir" && as_dir=.
12856    for ac_exec_ext in '' $ac_executable_extensions; do
12857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12858    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12860    break 2
12861  fi
12862done
12863  done
12864IFS=$as_save_IFS
12865
12866  ;;
12867esac
12868fi
12869WHICH=$ac_cv_path_WHICH
12870if test -n "$WHICH"; then
12871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12872$as_echo "$WHICH" >&6; }
12873else
12874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12875$as_echo "no" >&6; }
12876fi
12877
12878
12879          if test "x$WHICH" = x; then
12880            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12881          fi
12882        else
12883          # Otherwise we believe it is a complete path. Use it as it is.
12884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12885$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12886          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12887$as_echo_n "checking for WHICH... " >&6; }
12888          if test ! -x "$tool_specified"; then
12889            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12890$as_echo "not found" >&6; }
12891            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12892          fi
12893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12894$as_echo "$tool_specified" >&6; }
12895        fi
12896      fi
12897    fi
12898
12899  fi
12900
12901
12902
12903  if test "x$WHICH" = x; then
12904    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12905  fi
12906
12907
12908
12909
12910
12911  # Publish this variable in the help.
12912
12913
12914  if [ -z "${XARGS+x}" ]; then
12915    # The variable is not set by user, try to locate tool using the code snippet
12916    for ac_prog in xargs
12917do
12918  # Extract the first word of "$ac_prog", so it can be a program name with args.
12919set dummy $ac_prog; ac_word=$2
12920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12921$as_echo_n "checking for $ac_word... " >&6; }
12922if ${ac_cv_path_XARGS+:} false; then :
12923  $as_echo_n "(cached) " >&6
12924else
12925  case $XARGS in
12926  [\\/]* | ?:[\\/]*)
12927  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12928  ;;
12929  *)
12930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12931for as_dir in $PATH
12932do
12933  IFS=$as_save_IFS
12934  test -z "$as_dir" && as_dir=.
12935    for ac_exec_ext in '' $ac_executable_extensions; do
12936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12937    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12939    break 2
12940  fi
12941done
12942  done
12943IFS=$as_save_IFS
12944
12945  ;;
12946esac
12947fi
12948XARGS=$ac_cv_path_XARGS
12949if test -n "$XARGS"; then
12950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12951$as_echo "$XARGS" >&6; }
12952else
12953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12954$as_echo "no" >&6; }
12955fi
12956
12957
12958  test -n "$XARGS" && break
12959done
12960
12961  else
12962    # The variable is set, but is it from the command line or the environment?
12963
12964    # Try to remove the string !XARGS! from our list.
12965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12967      # If it failed, the variable was not from the command line. Ignore it,
12968      # but warn the user (except for BASH, which is always set by the calling BASH).
12969      if test "xXARGS" != xBASH; then
12970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12971$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12972      fi
12973      # Try to locate tool using the code snippet
12974      for ac_prog in xargs
12975do
12976  # Extract the first word of "$ac_prog", so it can be a program name with args.
12977set dummy $ac_prog; ac_word=$2
12978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12979$as_echo_n "checking for $ac_word... " >&6; }
12980if ${ac_cv_path_XARGS+:} false; then :
12981  $as_echo_n "(cached) " >&6
12982else
12983  case $XARGS in
12984  [\\/]* | ?:[\\/]*)
12985  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12986  ;;
12987  *)
12988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12989for as_dir in $PATH
12990do
12991  IFS=$as_save_IFS
12992  test -z "$as_dir" && as_dir=.
12993    for ac_exec_ext in '' $ac_executable_extensions; do
12994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12995    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12997    break 2
12998  fi
12999done
13000  done
13001IFS=$as_save_IFS
13002
13003  ;;
13004esac
13005fi
13006XARGS=$ac_cv_path_XARGS
13007if test -n "$XARGS"; then
13008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13009$as_echo "$XARGS" >&6; }
13010else
13011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13012$as_echo "no" >&6; }
13013fi
13014
13015
13016  test -n "$XARGS" && break
13017done
13018
13019    else
13020      # If it succeeded, then it was overridden by the user. We will use it
13021      # for the tool.
13022
13023      # First remove it from the list of overridden variables, so we can test
13024      # for unknown variables in the end.
13025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13026
13027      # Check if we try to supply an empty value
13028      if test "x$XARGS" = x; then
13029        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13030$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13032$as_echo_n "checking for XARGS... " >&6; }
13033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13034$as_echo "disabled" >&6; }
13035      else
13036        # Check if the provided tool contains a complete path.
13037        tool_specified="$XARGS"
13038        tool_basename="${tool_specified##*/}"
13039        if test "x$tool_basename" = "x$tool_specified"; then
13040          # A command without a complete path is provided, search $PATH.
13041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13042$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13043          # Extract the first word of "$tool_basename", so it can be a program name with args.
13044set dummy $tool_basename; ac_word=$2
13045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13046$as_echo_n "checking for $ac_word... " >&6; }
13047if ${ac_cv_path_XARGS+:} false; then :
13048  $as_echo_n "(cached) " >&6
13049else
13050  case $XARGS in
13051  [\\/]* | ?:[\\/]*)
13052  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13053  ;;
13054  *)
13055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13056for as_dir in $PATH
13057do
13058  IFS=$as_save_IFS
13059  test -z "$as_dir" && as_dir=.
13060    for ac_exec_ext in '' $ac_executable_extensions; do
13061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13062    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13064    break 2
13065  fi
13066done
13067  done
13068IFS=$as_save_IFS
13069
13070  ;;
13071esac
13072fi
13073XARGS=$ac_cv_path_XARGS
13074if test -n "$XARGS"; then
13075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13076$as_echo "$XARGS" >&6; }
13077else
13078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13079$as_echo "no" >&6; }
13080fi
13081
13082
13083          if test "x$XARGS" = x; then
13084            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13085          fi
13086        else
13087          # Otherwise we believe it is a complete path. Use it as it is.
13088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13089$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13090          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13091$as_echo_n "checking for XARGS... " >&6; }
13092          if test ! -x "$tool_specified"; then
13093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13094$as_echo "not found" >&6; }
13095            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13096          fi
13097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13098$as_echo "$tool_specified" >&6; }
13099        fi
13100      fi
13101    fi
13102
13103  fi
13104
13105
13106
13107  if test "x$XARGS" = x; then
13108    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13109  fi
13110
13111
13112
13113  # Then required tools that require some special treatment.
13114
13115
13116  # Publish this variable in the help.
13117
13118
13119  if [ -z "${AWK+x}" ]; then
13120    # The variable is not set by user, try to locate tool using the code snippet
13121    for ac_prog in gawk mawk nawk awk
13122do
13123  # Extract the first word of "$ac_prog", so it can be a program name with args.
13124set dummy $ac_prog; ac_word=$2
13125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13126$as_echo_n "checking for $ac_word... " >&6; }
13127if ${ac_cv_prog_AWK+:} false; then :
13128  $as_echo_n "(cached) " >&6
13129else
13130  if test -n "$AWK"; then
13131  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13132else
13133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13134for as_dir in $PATH
13135do
13136  IFS=$as_save_IFS
13137  test -z "$as_dir" && as_dir=.
13138    for ac_exec_ext in '' $ac_executable_extensions; do
13139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13140    ac_cv_prog_AWK="$ac_prog"
13141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13142    break 2
13143  fi
13144done
13145  done
13146IFS=$as_save_IFS
13147
13148fi
13149fi
13150AWK=$ac_cv_prog_AWK
13151if test -n "$AWK"; then
13152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13153$as_echo "$AWK" >&6; }
13154else
13155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13156$as_echo "no" >&6; }
13157fi
13158
13159
13160  test -n "$AWK" && break
13161done
13162
13163  else
13164    # The variable is set, but is it from the command line or the environment?
13165
13166    # Try to remove the string !AWK! from our list.
13167    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13168    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13169      # If it failed, the variable was not from the command line. Ignore it,
13170      # but warn the user (except for BASH, which is always set by the calling BASH).
13171      if test "xAWK" != xBASH; then
13172        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13173$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13174      fi
13175      # Try to locate tool using the code snippet
13176      for ac_prog in gawk mawk nawk awk
13177do
13178  # Extract the first word of "$ac_prog", so it can be a program name with args.
13179set dummy $ac_prog; ac_word=$2
13180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13181$as_echo_n "checking for $ac_word... " >&6; }
13182if ${ac_cv_prog_AWK+:} false; then :
13183  $as_echo_n "(cached) " >&6
13184else
13185  if test -n "$AWK"; then
13186  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13187else
13188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13189for as_dir in $PATH
13190do
13191  IFS=$as_save_IFS
13192  test -z "$as_dir" && as_dir=.
13193    for ac_exec_ext in '' $ac_executable_extensions; do
13194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13195    ac_cv_prog_AWK="$ac_prog"
13196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13197    break 2
13198  fi
13199done
13200  done
13201IFS=$as_save_IFS
13202
13203fi
13204fi
13205AWK=$ac_cv_prog_AWK
13206if test -n "$AWK"; then
13207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13208$as_echo "$AWK" >&6; }
13209else
13210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13211$as_echo "no" >&6; }
13212fi
13213
13214
13215  test -n "$AWK" && break
13216done
13217
13218    else
13219      # If it succeeded, then it was overridden by the user. We will use it
13220      # for the tool.
13221
13222      # First remove it from the list of overridden variables, so we can test
13223      # for unknown variables in the end.
13224      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13225
13226      # Check if we try to supply an empty value
13227      if test "x$AWK" = x; then
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13229$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13231$as_echo_n "checking for AWK... " >&6; }
13232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13233$as_echo "disabled" >&6; }
13234      else
13235        # Check if the provided tool contains a complete path.
13236        tool_specified="$AWK"
13237        tool_basename="${tool_specified##*/}"
13238        if test "x$tool_basename" = "x$tool_specified"; then
13239          # A command without a complete path is provided, search $PATH.
13240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13241$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13242          # Extract the first word of "$tool_basename", so it can be a program name with args.
13243set dummy $tool_basename; ac_word=$2
13244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13245$as_echo_n "checking for $ac_word... " >&6; }
13246if ${ac_cv_path_AWK+:} false; then :
13247  $as_echo_n "(cached) " >&6
13248else
13249  case $AWK in
13250  [\\/]* | ?:[\\/]*)
13251  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13252  ;;
13253  *)
13254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13255for as_dir in $PATH
13256do
13257  IFS=$as_save_IFS
13258  test -z "$as_dir" && as_dir=.
13259    for ac_exec_ext in '' $ac_executable_extensions; do
13260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13261    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13263    break 2
13264  fi
13265done
13266  done
13267IFS=$as_save_IFS
13268
13269  ;;
13270esac
13271fi
13272AWK=$ac_cv_path_AWK
13273if test -n "$AWK"; then
13274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13275$as_echo "$AWK" >&6; }
13276else
13277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13278$as_echo "no" >&6; }
13279fi
13280
13281
13282          if test "x$AWK" = x; then
13283            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13284          fi
13285        else
13286          # Otherwise we believe it is a complete path. Use it as it is.
13287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13288$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13289          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13290$as_echo_n "checking for AWK... " >&6; }
13291          if test ! -x "$tool_specified"; then
13292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13293$as_echo "not found" >&6; }
13294            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13295          fi
13296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13297$as_echo "$tool_specified" >&6; }
13298        fi
13299      fi
13300    fi
13301
13302  fi
13303
13304
13305  if test "x$AWK" = x; then
13306    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13307  fi
13308
13309
13310
13311
13312  # Publish this variable in the help.
13313
13314
13315  if [ -z "${GREP+x}" ]; then
13316    # The variable is not set by user, try to locate tool using the code snippet
13317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13318$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13319if ${ac_cv_path_GREP+:} false; then :
13320  $as_echo_n "(cached) " >&6
13321else
13322  if test -z "$GREP"; then
13323  ac_path_GREP_found=false
13324  # Loop through the user's path and test for each of PROGNAME-LIST
13325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13326for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13327do
13328  IFS=$as_save_IFS
13329  test -z "$as_dir" && as_dir=.
13330    for ac_prog in grep ggrep; do
13331    for ac_exec_ext in '' $ac_executable_extensions; do
13332      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13333      as_fn_executable_p "$ac_path_GREP" || continue
13334# Check for GNU ac_path_GREP and select it if it is found.
13335  # Check for GNU $ac_path_GREP
13336case `"$ac_path_GREP" --version 2>&1` in
13337*GNU*)
13338  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13339*)
13340  ac_count=0
13341  $as_echo_n 0123456789 >"conftest.in"
13342  while :
13343  do
13344    cat "conftest.in" "conftest.in" >"conftest.tmp"
13345    mv "conftest.tmp" "conftest.in"
13346    cp "conftest.in" "conftest.nl"
13347    $as_echo 'GREP' >> "conftest.nl"
13348    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13349    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13350    as_fn_arith $ac_count + 1 && ac_count=$as_val
13351    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13352      # Best one so far, save it but keep looking for a better one
13353      ac_cv_path_GREP="$ac_path_GREP"
13354      ac_path_GREP_max=$ac_count
13355    fi
13356    # 10*(2^10) chars as input seems more than enough
13357    test $ac_count -gt 10 && break
13358  done
13359  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13360esac
13361
13362      $ac_path_GREP_found && break 3
13363    done
13364  done
13365  done
13366IFS=$as_save_IFS
13367  if test -z "$ac_cv_path_GREP"; then
13368    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13369  fi
13370else
13371  ac_cv_path_GREP=$GREP
13372fi
13373
13374fi
13375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13376$as_echo "$ac_cv_path_GREP" >&6; }
13377 GREP="$ac_cv_path_GREP"
13378
13379
13380  else
13381    # The variable is set, but is it from the command line or the environment?
13382
13383    # Try to remove the string !GREP! from our list.
13384    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13385    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13386      # If it failed, the variable was not from the command line. Ignore it,
13387      # but warn the user (except for BASH, which is always set by the calling BASH).
13388      if test "xGREP" != xBASH; then
13389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13390$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13391      fi
13392      # Try to locate tool using the code snippet
13393      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13394$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13395if ${ac_cv_path_GREP+:} false; then :
13396  $as_echo_n "(cached) " >&6
13397else
13398  if test -z "$GREP"; then
13399  ac_path_GREP_found=false
13400  # Loop through the user's path and test for each of PROGNAME-LIST
13401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13402for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13403do
13404  IFS=$as_save_IFS
13405  test -z "$as_dir" && as_dir=.
13406    for ac_prog in grep ggrep; do
13407    for ac_exec_ext in '' $ac_executable_extensions; do
13408      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13409      as_fn_executable_p "$ac_path_GREP" || continue
13410# Check for GNU ac_path_GREP and select it if it is found.
13411  # Check for GNU $ac_path_GREP
13412case `"$ac_path_GREP" --version 2>&1` in
13413*GNU*)
13414  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13415*)
13416  ac_count=0
13417  $as_echo_n 0123456789 >"conftest.in"
13418  while :
13419  do
13420    cat "conftest.in" "conftest.in" >"conftest.tmp"
13421    mv "conftest.tmp" "conftest.in"
13422    cp "conftest.in" "conftest.nl"
13423    $as_echo 'GREP' >> "conftest.nl"
13424    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13425    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13426    as_fn_arith $ac_count + 1 && ac_count=$as_val
13427    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13428      # Best one so far, save it but keep looking for a better one
13429      ac_cv_path_GREP="$ac_path_GREP"
13430      ac_path_GREP_max=$ac_count
13431    fi
13432    # 10*(2^10) chars as input seems more than enough
13433    test $ac_count -gt 10 && break
13434  done
13435  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13436esac
13437
13438      $ac_path_GREP_found && break 3
13439    done
13440  done
13441  done
13442IFS=$as_save_IFS
13443  if test -z "$ac_cv_path_GREP"; then
13444    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13445  fi
13446else
13447  ac_cv_path_GREP=$GREP
13448fi
13449
13450fi
13451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13452$as_echo "$ac_cv_path_GREP" >&6; }
13453 GREP="$ac_cv_path_GREP"
13454
13455
13456    else
13457      # If it succeeded, then it was overridden by the user. We will use it
13458      # for the tool.
13459
13460      # First remove it from the list of overridden variables, so we can test
13461      # for unknown variables in the end.
13462      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13463
13464      # Check if we try to supply an empty value
13465      if test "x$GREP" = x; then
13466        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13467$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13468        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13469$as_echo_n "checking for GREP... " >&6; }
13470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13471$as_echo "disabled" >&6; }
13472      else
13473        # Check if the provided tool contains a complete path.
13474        tool_specified="$GREP"
13475        tool_basename="${tool_specified##*/}"
13476        if test "x$tool_basename" = "x$tool_specified"; then
13477          # A command without a complete path is provided, search $PATH.
13478          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13479$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13480          # Extract the first word of "$tool_basename", so it can be a program name with args.
13481set dummy $tool_basename; ac_word=$2
13482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13483$as_echo_n "checking for $ac_word... " >&6; }
13484if ${ac_cv_path_GREP+:} false; then :
13485  $as_echo_n "(cached) " >&6
13486else
13487  case $GREP in
13488  [\\/]* | ?:[\\/]*)
13489  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13490  ;;
13491  *)
13492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13493for as_dir in $PATH
13494do
13495  IFS=$as_save_IFS
13496  test -z "$as_dir" && as_dir=.
13497    for ac_exec_ext in '' $ac_executable_extensions; do
13498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13499    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13501    break 2
13502  fi
13503done
13504  done
13505IFS=$as_save_IFS
13506
13507  ;;
13508esac
13509fi
13510GREP=$ac_cv_path_GREP
13511if test -n "$GREP"; then
13512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13513$as_echo "$GREP" >&6; }
13514else
13515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13516$as_echo "no" >&6; }
13517fi
13518
13519
13520          if test "x$GREP" = x; then
13521            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13522          fi
13523        else
13524          # Otherwise we believe it is a complete path. Use it as it is.
13525          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13526$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13527          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13528$as_echo_n "checking for GREP... " >&6; }
13529          if test ! -x "$tool_specified"; then
13530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13531$as_echo "not found" >&6; }
13532            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13533          fi
13534          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13535$as_echo "$tool_specified" >&6; }
13536        fi
13537      fi
13538    fi
13539
13540  fi
13541
13542
13543  if test "x$GREP" = x; then
13544    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13545  fi
13546
13547
13548
13549
13550  # Publish this variable in the help.
13551
13552
13553  if [ -z "${EGREP+x}" ]; then
13554    # The variable is not set by user, try to locate tool using the code snippet
13555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13556$as_echo_n "checking for egrep... " >&6; }
13557if ${ac_cv_path_EGREP+:} false; then :
13558  $as_echo_n "(cached) " >&6
13559else
13560  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13561   then ac_cv_path_EGREP="$GREP -E"
13562   else
13563     if test -z "$EGREP"; then
13564  ac_path_EGREP_found=false
13565  # Loop through the user's path and test for each of PROGNAME-LIST
13566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13567for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13568do
13569  IFS=$as_save_IFS
13570  test -z "$as_dir" && as_dir=.
13571    for ac_prog in egrep; do
13572    for ac_exec_ext in '' $ac_executable_extensions; do
13573      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13574      as_fn_executable_p "$ac_path_EGREP" || continue
13575# Check for GNU ac_path_EGREP and select it if it is found.
13576  # Check for GNU $ac_path_EGREP
13577case `"$ac_path_EGREP" --version 2>&1` in
13578*GNU*)
13579  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13580*)
13581  ac_count=0
13582  $as_echo_n 0123456789 >"conftest.in"
13583  while :
13584  do
13585    cat "conftest.in" "conftest.in" >"conftest.tmp"
13586    mv "conftest.tmp" "conftest.in"
13587    cp "conftest.in" "conftest.nl"
13588    $as_echo 'EGREP' >> "conftest.nl"
13589    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13590    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13591    as_fn_arith $ac_count + 1 && ac_count=$as_val
13592    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13593      # Best one so far, save it but keep looking for a better one
13594      ac_cv_path_EGREP="$ac_path_EGREP"
13595      ac_path_EGREP_max=$ac_count
13596    fi
13597    # 10*(2^10) chars as input seems more than enough
13598    test $ac_count -gt 10 && break
13599  done
13600  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13601esac
13602
13603      $ac_path_EGREP_found && break 3
13604    done
13605  done
13606  done
13607IFS=$as_save_IFS
13608  if test -z "$ac_cv_path_EGREP"; then
13609    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13610  fi
13611else
13612  ac_cv_path_EGREP=$EGREP
13613fi
13614
13615   fi
13616fi
13617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13618$as_echo "$ac_cv_path_EGREP" >&6; }
13619 EGREP="$ac_cv_path_EGREP"
13620
13621
13622  else
13623    # The variable is set, but is it from the command line or the environment?
13624
13625    # Try to remove the string !EGREP! from our list.
13626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13628      # If it failed, the variable was not from the command line. Ignore it,
13629      # but warn the user (except for BASH, which is always set by the calling BASH).
13630      if test "xEGREP" != xBASH; then
13631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13632$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13633      fi
13634      # Try to locate tool using the code snippet
13635      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13636$as_echo_n "checking for egrep... " >&6; }
13637if ${ac_cv_path_EGREP+:} false; then :
13638  $as_echo_n "(cached) " >&6
13639else
13640  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13641   then ac_cv_path_EGREP="$GREP -E"
13642   else
13643     if test -z "$EGREP"; then
13644  ac_path_EGREP_found=false
13645  # Loop through the user's path and test for each of PROGNAME-LIST
13646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13647for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13648do
13649  IFS=$as_save_IFS
13650  test -z "$as_dir" && as_dir=.
13651    for ac_prog in egrep; do
13652    for ac_exec_ext in '' $ac_executable_extensions; do
13653      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13654      as_fn_executable_p "$ac_path_EGREP" || continue
13655# Check for GNU ac_path_EGREP and select it if it is found.
13656  # Check for GNU $ac_path_EGREP
13657case `"$ac_path_EGREP" --version 2>&1` in
13658*GNU*)
13659  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13660*)
13661  ac_count=0
13662  $as_echo_n 0123456789 >"conftest.in"
13663  while :
13664  do
13665    cat "conftest.in" "conftest.in" >"conftest.tmp"
13666    mv "conftest.tmp" "conftest.in"
13667    cp "conftest.in" "conftest.nl"
13668    $as_echo 'EGREP' >> "conftest.nl"
13669    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13670    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13671    as_fn_arith $ac_count + 1 && ac_count=$as_val
13672    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13673      # Best one so far, save it but keep looking for a better one
13674      ac_cv_path_EGREP="$ac_path_EGREP"
13675      ac_path_EGREP_max=$ac_count
13676    fi
13677    # 10*(2^10) chars as input seems more than enough
13678    test $ac_count -gt 10 && break
13679  done
13680  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13681esac
13682
13683      $ac_path_EGREP_found && break 3
13684    done
13685  done
13686  done
13687IFS=$as_save_IFS
13688  if test -z "$ac_cv_path_EGREP"; then
13689    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13690  fi
13691else
13692  ac_cv_path_EGREP=$EGREP
13693fi
13694
13695   fi
13696fi
13697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13698$as_echo "$ac_cv_path_EGREP" >&6; }
13699 EGREP="$ac_cv_path_EGREP"
13700
13701
13702    else
13703      # If it succeeded, then it was overridden by the user. We will use it
13704      # for the tool.
13705
13706      # First remove it from the list of overridden variables, so we can test
13707      # for unknown variables in the end.
13708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13709
13710      # Check if we try to supply an empty value
13711      if test "x$EGREP" = x; then
13712        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13713$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13715$as_echo_n "checking for EGREP... " >&6; }
13716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13717$as_echo "disabled" >&6; }
13718      else
13719        # Check if the provided tool contains a complete path.
13720        tool_specified="$EGREP"
13721        tool_basename="${tool_specified##*/}"
13722        if test "x$tool_basename" = "x$tool_specified"; then
13723          # A command without a complete path is provided, search $PATH.
13724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13725$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13726          # Extract the first word of "$tool_basename", so it can be a program name with args.
13727set dummy $tool_basename; ac_word=$2
13728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13729$as_echo_n "checking for $ac_word... " >&6; }
13730if ${ac_cv_path_EGREP+:} false; then :
13731  $as_echo_n "(cached) " >&6
13732else
13733  case $EGREP in
13734  [\\/]* | ?:[\\/]*)
13735  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13736  ;;
13737  *)
13738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13739for as_dir in $PATH
13740do
13741  IFS=$as_save_IFS
13742  test -z "$as_dir" && as_dir=.
13743    for ac_exec_ext in '' $ac_executable_extensions; do
13744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13745    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13747    break 2
13748  fi
13749done
13750  done
13751IFS=$as_save_IFS
13752
13753  ;;
13754esac
13755fi
13756EGREP=$ac_cv_path_EGREP
13757if test -n "$EGREP"; then
13758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13759$as_echo "$EGREP" >&6; }
13760else
13761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13762$as_echo "no" >&6; }
13763fi
13764
13765
13766          if test "x$EGREP" = x; then
13767            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13768          fi
13769        else
13770          # Otherwise we believe it is a complete path. Use it as it is.
13771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13772$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13773          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13774$as_echo_n "checking for EGREP... " >&6; }
13775          if test ! -x "$tool_specified"; then
13776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13777$as_echo "not found" >&6; }
13778            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13779          fi
13780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13781$as_echo "$tool_specified" >&6; }
13782        fi
13783      fi
13784    fi
13785
13786  fi
13787
13788
13789  if test "x$EGREP" = x; then
13790    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13791  fi
13792
13793
13794
13795
13796  # Publish this variable in the help.
13797
13798
13799  if [ -z "${FGREP+x}" ]; then
13800    # The variable is not set by user, try to locate tool using the code snippet
13801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13802$as_echo_n "checking for fgrep... " >&6; }
13803if ${ac_cv_path_FGREP+:} false; then :
13804  $as_echo_n "(cached) " >&6
13805else
13806  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13807   then ac_cv_path_FGREP="$GREP -F"
13808   else
13809     if test -z "$FGREP"; then
13810  ac_path_FGREP_found=false
13811  # Loop through the user's path and test for each of PROGNAME-LIST
13812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13813for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13814do
13815  IFS=$as_save_IFS
13816  test -z "$as_dir" && as_dir=.
13817    for ac_prog in fgrep; do
13818    for ac_exec_ext in '' $ac_executable_extensions; do
13819      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13820      as_fn_executable_p "$ac_path_FGREP" || continue
13821# Check for GNU ac_path_FGREP and select it if it is found.
13822  # Check for GNU $ac_path_FGREP
13823case `"$ac_path_FGREP" --version 2>&1` in
13824*GNU*)
13825  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13826*)
13827  ac_count=0
13828  $as_echo_n 0123456789 >"conftest.in"
13829  while :
13830  do
13831    cat "conftest.in" "conftest.in" >"conftest.tmp"
13832    mv "conftest.tmp" "conftest.in"
13833    cp "conftest.in" "conftest.nl"
13834    $as_echo 'FGREP' >> "conftest.nl"
13835    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13836    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13837    as_fn_arith $ac_count + 1 && ac_count=$as_val
13838    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13839      # Best one so far, save it but keep looking for a better one
13840      ac_cv_path_FGREP="$ac_path_FGREP"
13841      ac_path_FGREP_max=$ac_count
13842    fi
13843    # 10*(2^10) chars as input seems more than enough
13844    test $ac_count -gt 10 && break
13845  done
13846  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13847esac
13848
13849      $ac_path_FGREP_found && break 3
13850    done
13851  done
13852  done
13853IFS=$as_save_IFS
13854  if test -z "$ac_cv_path_FGREP"; then
13855    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13856  fi
13857else
13858  ac_cv_path_FGREP=$FGREP
13859fi
13860
13861   fi
13862fi
13863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13864$as_echo "$ac_cv_path_FGREP" >&6; }
13865 FGREP="$ac_cv_path_FGREP"
13866
13867
13868  else
13869    # The variable is set, but is it from the command line or the environment?
13870
13871    # Try to remove the string !FGREP! from our list.
13872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13874      # If it failed, the variable was not from the command line. Ignore it,
13875      # but warn the user (except for BASH, which is always set by the calling BASH).
13876      if test "xFGREP" != xBASH; then
13877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13878$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13879      fi
13880      # Try to locate tool using the code snippet
13881      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13882$as_echo_n "checking for fgrep... " >&6; }
13883if ${ac_cv_path_FGREP+:} false; then :
13884  $as_echo_n "(cached) " >&6
13885else
13886  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13887   then ac_cv_path_FGREP="$GREP -F"
13888   else
13889     if test -z "$FGREP"; then
13890  ac_path_FGREP_found=false
13891  # Loop through the user's path and test for each of PROGNAME-LIST
13892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13893for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13894do
13895  IFS=$as_save_IFS
13896  test -z "$as_dir" && as_dir=.
13897    for ac_prog in fgrep; do
13898    for ac_exec_ext in '' $ac_executable_extensions; do
13899      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13900      as_fn_executable_p "$ac_path_FGREP" || continue
13901# Check for GNU ac_path_FGREP and select it if it is found.
13902  # Check for GNU $ac_path_FGREP
13903case `"$ac_path_FGREP" --version 2>&1` in
13904*GNU*)
13905  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13906*)
13907  ac_count=0
13908  $as_echo_n 0123456789 >"conftest.in"
13909  while :
13910  do
13911    cat "conftest.in" "conftest.in" >"conftest.tmp"
13912    mv "conftest.tmp" "conftest.in"
13913    cp "conftest.in" "conftest.nl"
13914    $as_echo 'FGREP' >> "conftest.nl"
13915    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13916    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13917    as_fn_arith $ac_count + 1 && ac_count=$as_val
13918    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13919      # Best one so far, save it but keep looking for a better one
13920      ac_cv_path_FGREP="$ac_path_FGREP"
13921      ac_path_FGREP_max=$ac_count
13922    fi
13923    # 10*(2^10) chars as input seems more than enough
13924    test $ac_count -gt 10 && break
13925  done
13926  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13927esac
13928
13929      $ac_path_FGREP_found && break 3
13930    done
13931  done
13932  done
13933IFS=$as_save_IFS
13934  if test -z "$ac_cv_path_FGREP"; then
13935    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13936  fi
13937else
13938  ac_cv_path_FGREP=$FGREP
13939fi
13940
13941   fi
13942fi
13943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13944$as_echo "$ac_cv_path_FGREP" >&6; }
13945 FGREP="$ac_cv_path_FGREP"
13946
13947
13948    else
13949      # If it succeeded, then it was overridden by the user. We will use it
13950      # for the tool.
13951
13952      # First remove it from the list of overridden variables, so we can test
13953      # for unknown variables in the end.
13954      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13955
13956      # Check if we try to supply an empty value
13957      if test "x$FGREP" = x; then
13958        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13959$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13961$as_echo_n "checking for FGREP... " >&6; }
13962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13963$as_echo "disabled" >&6; }
13964      else
13965        # Check if the provided tool contains a complete path.
13966        tool_specified="$FGREP"
13967        tool_basename="${tool_specified##*/}"
13968        if test "x$tool_basename" = "x$tool_specified"; then
13969          # A command without a complete path is provided, search $PATH.
13970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13971$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13972          # Extract the first word of "$tool_basename", so it can be a program name with args.
13973set dummy $tool_basename; ac_word=$2
13974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13975$as_echo_n "checking for $ac_word... " >&6; }
13976if ${ac_cv_path_FGREP+:} false; then :
13977  $as_echo_n "(cached) " >&6
13978else
13979  case $FGREP in
13980  [\\/]* | ?:[\\/]*)
13981  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13982  ;;
13983  *)
13984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13985for as_dir in $PATH
13986do
13987  IFS=$as_save_IFS
13988  test -z "$as_dir" && as_dir=.
13989    for ac_exec_ext in '' $ac_executable_extensions; do
13990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13991    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13993    break 2
13994  fi
13995done
13996  done
13997IFS=$as_save_IFS
13998
13999  ;;
14000esac
14001fi
14002FGREP=$ac_cv_path_FGREP
14003if test -n "$FGREP"; then
14004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14005$as_echo "$FGREP" >&6; }
14006else
14007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14008$as_echo "no" >&6; }
14009fi
14010
14011
14012          if test "x$FGREP" = x; then
14013            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14014          fi
14015        else
14016          # Otherwise we believe it is a complete path. Use it as it is.
14017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14018$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14019          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14020$as_echo_n "checking for FGREP... " >&6; }
14021          if test ! -x "$tool_specified"; then
14022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14023$as_echo "not found" >&6; }
14024            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14025          fi
14026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14027$as_echo "$tool_specified" >&6; }
14028        fi
14029      fi
14030    fi
14031
14032  fi
14033
14034
14035  if test "x$FGREP" = x; then
14036    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14037  fi
14038
14039
14040
14041
14042  # Publish this variable in the help.
14043
14044
14045  if [ -z "${SED+x}" ]; then
14046    # The variable is not set by user, try to locate tool using the code snippet
14047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14048$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14049if ${ac_cv_path_SED+:} false; then :
14050  $as_echo_n "(cached) " >&6
14051else
14052            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14053     for ac_i in 1 2 3 4 5 6 7; do
14054       ac_script="$ac_script$as_nl$ac_script"
14055     done
14056     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14057     { ac_script=; unset ac_script;}
14058     if test -z "$SED"; then
14059  ac_path_SED_found=false
14060  # Loop through the user's path and test for each of PROGNAME-LIST
14061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14062for as_dir in $PATH
14063do
14064  IFS=$as_save_IFS
14065  test -z "$as_dir" && as_dir=.
14066    for ac_prog in sed gsed; do
14067    for ac_exec_ext in '' $ac_executable_extensions; do
14068      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14069      as_fn_executable_p "$ac_path_SED" || continue
14070# Check for GNU ac_path_SED and select it if it is found.
14071  # Check for GNU $ac_path_SED
14072case `"$ac_path_SED" --version 2>&1` in
14073*GNU*)
14074  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14075*)
14076  ac_count=0
14077  $as_echo_n 0123456789 >"conftest.in"
14078  while :
14079  do
14080    cat "conftest.in" "conftest.in" >"conftest.tmp"
14081    mv "conftest.tmp" "conftest.in"
14082    cp "conftest.in" "conftest.nl"
14083    $as_echo '' >> "conftest.nl"
14084    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14085    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14086    as_fn_arith $ac_count + 1 && ac_count=$as_val
14087    if test $ac_count -gt ${ac_path_SED_max-0}; then
14088      # Best one so far, save it but keep looking for a better one
14089      ac_cv_path_SED="$ac_path_SED"
14090      ac_path_SED_max=$ac_count
14091    fi
14092    # 10*(2^10) chars as input seems more than enough
14093    test $ac_count -gt 10 && break
14094  done
14095  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14096esac
14097
14098      $ac_path_SED_found && break 3
14099    done
14100  done
14101  done
14102IFS=$as_save_IFS
14103  if test -z "$ac_cv_path_SED"; then
14104    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14105  fi
14106else
14107  ac_cv_path_SED=$SED
14108fi
14109
14110fi
14111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14112$as_echo "$ac_cv_path_SED" >&6; }
14113 SED="$ac_cv_path_SED"
14114  rm -f conftest.sed
14115
14116  else
14117    # The variable is set, but is it from the command line or the environment?
14118
14119    # Try to remove the string !SED! from our list.
14120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14122      # If it failed, the variable was not from the command line. Ignore it,
14123      # but warn the user (except for BASH, which is always set by the calling BASH).
14124      if test "xSED" != xBASH; then
14125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14126$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14127      fi
14128      # Try to locate tool using the code snippet
14129      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14130$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14131if ${ac_cv_path_SED+:} false; then :
14132  $as_echo_n "(cached) " >&6
14133else
14134            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14135     for ac_i in 1 2 3 4 5 6 7; do
14136       ac_script="$ac_script$as_nl$ac_script"
14137     done
14138     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14139     { ac_script=; unset ac_script;}
14140     if test -z "$SED"; then
14141  ac_path_SED_found=false
14142  # Loop through the user's path and test for each of PROGNAME-LIST
14143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14144for as_dir in $PATH
14145do
14146  IFS=$as_save_IFS
14147  test -z "$as_dir" && as_dir=.
14148    for ac_prog in sed gsed; do
14149    for ac_exec_ext in '' $ac_executable_extensions; do
14150      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14151      as_fn_executable_p "$ac_path_SED" || continue
14152# Check for GNU ac_path_SED and select it if it is found.
14153  # Check for GNU $ac_path_SED
14154case `"$ac_path_SED" --version 2>&1` in
14155*GNU*)
14156  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14157*)
14158  ac_count=0
14159  $as_echo_n 0123456789 >"conftest.in"
14160  while :
14161  do
14162    cat "conftest.in" "conftest.in" >"conftest.tmp"
14163    mv "conftest.tmp" "conftest.in"
14164    cp "conftest.in" "conftest.nl"
14165    $as_echo '' >> "conftest.nl"
14166    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14167    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14168    as_fn_arith $ac_count + 1 && ac_count=$as_val
14169    if test $ac_count -gt ${ac_path_SED_max-0}; then
14170      # Best one so far, save it but keep looking for a better one
14171      ac_cv_path_SED="$ac_path_SED"
14172      ac_path_SED_max=$ac_count
14173    fi
14174    # 10*(2^10) chars as input seems more than enough
14175    test $ac_count -gt 10 && break
14176  done
14177  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14178esac
14179
14180      $ac_path_SED_found && break 3
14181    done
14182  done
14183  done
14184IFS=$as_save_IFS
14185  if test -z "$ac_cv_path_SED"; then
14186    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14187  fi
14188else
14189  ac_cv_path_SED=$SED
14190fi
14191
14192fi
14193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14194$as_echo "$ac_cv_path_SED" >&6; }
14195 SED="$ac_cv_path_SED"
14196  rm -f conftest.sed
14197
14198    else
14199      # If it succeeded, then it was overridden by the user. We will use it
14200      # for the tool.
14201
14202      # First remove it from the list of overridden variables, so we can test
14203      # for unknown variables in the end.
14204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14205
14206      # Check if we try to supply an empty value
14207      if test "x$SED" = x; then
14208        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14209$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14210        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14211$as_echo_n "checking for SED... " >&6; }
14212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14213$as_echo "disabled" >&6; }
14214      else
14215        # Check if the provided tool contains a complete path.
14216        tool_specified="$SED"
14217        tool_basename="${tool_specified##*/}"
14218        if test "x$tool_basename" = "x$tool_specified"; then
14219          # A command without a complete path is provided, search $PATH.
14220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14221$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14222          # Extract the first word of "$tool_basename", so it can be a program name with args.
14223set dummy $tool_basename; ac_word=$2
14224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14225$as_echo_n "checking for $ac_word... " >&6; }
14226if ${ac_cv_path_SED+:} false; then :
14227  $as_echo_n "(cached) " >&6
14228else
14229  case $SED in
14230  [\\/]* | ?:[\\/]*)
14231  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14232  ;;
14233  *)
14234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14235for as_dir in $PATH
14236do
14237  IFS=$as_save_IFS
14238  test -z "$as_dir" && as_dir=.
14239    for ac_exec_ext in '' $ac_executable_extensions; do
14240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14241    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14243    break 2
14244  fi
14245done
14246  done
14247IFS=$as_save_IFS
14248
14249  ;;
14250esac
14251fi
14252SED=$ac_cv_path_SED
14253if test -n "$SED"; then
14254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14255$as_echo "$SED" >&6; }
14256else
14257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14258$as_echo "no" >&6; }
14259fi
14260
14261
14262          if test "x$SED" = x; then
14263            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14264          fi
14265        else
14266          # Otherwise we believe it is a complete path. Use it as it is.
14267          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14268$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14269          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14270$as_echo_n "checking for SED... " >&6; }
14271          if test ! -x "$tool_specified"; then
14272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14273$as_echo "not found" >&6; }
14274            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14275          fi
14276          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14277$as_echo "$tool_specified" >&6; }
14278        fi
14279      fi
14280    fi
14281
14282  fi
14283
14284
14285  if test "x$SED" = x; then
14286    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14287  fi
14288
14289
14290
14291  # Always force rm.
14292  RM="$RM -f"
14293
14294  # pwd behaves differently on various platforms and some don't support the -L flag.
14295  # Always use the bash builtin pwd to get uniform behavior.
14296  THEPWDCMD=pwd
14297
14298  # These are not required on all platforms
14299
14300
14301  # Publish this variable in the help.
14302
14303
14304  if [ -z "${CYGPATH+x}" ]; then
14305    # The variable is not set by user, try to locate tool using the code snippet
14306    for ac_prog in cygpath
14307do
14308  # Extract the first word of "$ac_prog", so it can be a program name with args.
14309set dummy $ac_prog; ac_word=$2
14310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14311$as_echo_n "checking for $ac_word... " >&6; }
14312if ${ac_cv_path_CYGPATH+:} false; then :
14313  $as_echo_n "(cached) " >&6
14314else
14315  case $CYGPATH in
14316  [\\/]* | ?:[\\/]*)
14317  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14318  ;;
14319  *)
14320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14321for as_dir in $PATH
14322do
14323  IFS=$as_save_IFS
14324  test -z "$as_dir" && as_dir=.
14325    for ac_exec_ext in '' $ac_executable_extensions; do
14326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14327    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14329    break 2
14330  fi
14331done
14332  done
14333IFS=$as_save_IFS
14334
14335  ;;
14336esac
14337fi
14338CYGPATH=$ac_cv_path_CYGPATH
14339if test -n "$CYGPATH"; then
14340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14341$as_echo "$CYGPATH" >&6; }
14342else
14343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14344$as_echo "no" >&6; }
14345fi
14346
14347
14348  test -n "$CYGPATH" && break
14349done
14350
14351  else
14352    # The variable is set, but is it from the command line or the environment?
14353
14354    # Try to remove the string !CYGPATH! from our list.
14355    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14356    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14357      # If it failed, the variable was not from the command line. Ignore it,
14358      # but warn the user (except for BASH, which is always set by the calling BASH).
14359      if test "xCYGPATH" != xBASH; then
14360        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14361$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14362      fi
14363      # Try to locate tool using the code snippet
14364      for ac_prog in cygpath
14365do
14366  # Extract the first word of "$ac_prog", so it can be a program name with args.
14367set dummy $ac_prog; ac_word=$2
14368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14369$as_echo_n "checking for $ac_word... " >&6; }
14370if ${ac_cv_path_CYGPATH+:} false; then :
14371  $as_echo_n "(cached) " >&6
14372else
14373  case $CYGPATH in
14374  [\\/]* | ?:[\\/]*)
14375  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14376  ;;
14377  *)
14378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14379for as_dir in $PATH
14380do
14381  IFS=$as_save_IFS
14382  test -z "$as_dir" && as_dir=.
14383    for ac_exec_ext in '' $ac_executable_extensions; do
14384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14385    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14387    break 2
14388  fi
14389done
14390  done
14391IFS=$as_save_IFS
14392
14393  ;;
14394esac
14395fi
14396CYGPATH=$ac_cv_path_CYGPATH
14397if test -n "$CYGPATH"; then
14398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14399$as_echo "$CYGPATH" >&6; }
14400else
14401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14402$as_echo "no" >&6; }
14403fi
14404
14405
14406  test -n "$CYGPATH" && break
14407done
14408
14409    else
14410      # If it succeeded, then it was overridden by the user. We will use it
14411      # for the tool.
14412
14413      # First remove it from the list of overridden variables, so we can test
14414      # for unknown variables in the end.
14415      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14416
14417      # Check if we try to supply an empty value
14418      if test "x$CYGPATH" = x; then
14419        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14420$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14421        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14422$as_echo_n "checking for CYGPATH... " >&6; }
14423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14424$as_echo "disabled" >&6; }
14425      else
14426        # Check if the provided tool contains a complete path.
14427        tool_specified="$CYGPATH"
14428        tool_basename="${tool_specified##*/}"
14429        if test "x$tool_basename" = "x$tool_specified"; then
14430          # A command without a complete path is provided, search $PATH.
14431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14432$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14433          # Extract the first word of "$tool_basename", so it can be a program name with args.
14434set dummy $tool_basename; ac_word=$2
14435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14436$as_echo_n "checking for $ac_word... " >&6; }
14437if ${ac_cv_path_CYGPATH+:} false; then :
14438  $as_echo_n "(cached) " >&6
14439else
14440  case $CYGPATH in
14441  [\\/]* | ?:[\\/]*)
14442  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14443  ;;
14444  *)
14445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14446for as_dir in $PATH
14447do
14448  IFS=$as_save_IFS
14449  test -z "$as_dir" && as_dir=.
14450    for ac_exec_ext in '' $ac_executable_extensions; do
14451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14452    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14454    break 2
14455  fi
14456done
14457  done
14458IFS=$as_save_IFS
14459
14460  ;;
14461esac
14462fi
14463CYGPATH=$ac_cv_path_CYGPATH
14464if test -n "$CYGPATH"; then
14465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14466$as_echo "$CYGPATH" >&6; }
14467else
14468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14469$as_echo "no" >&6; }
14470fi
14471
14472
14473          if test "x$CYGPATH" = x; then
14474            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14475          fi
14476        else
14477          # Otherwise we believe it is a complete path. Use it as it is.
14478          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14479$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14480          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14481$as_echo_n "checking for CYGPATH... " >&6; }
14482          if test ! -x "$tool_specified"; then
14483            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14484$as_echo "not found" >&6; }
14485            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14486          fi
14487          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14488$as_echo "$tool_specified" >&6; }
14489        fi
14490      fi
14491    fi
14492
14493  fi
14494
14495
14496
14497
14498  # Publish this variable in the help.
14499
14500
14501  if [ -z "${READLINK+x}" ]; then
14502    # The variable is not set by user, try to locate tool using the code snippet
14503    for ac_prog in greadlink readlink
14504do
14505  # Extract the first word of "$ac_prog", so it can be a program name with args.
14506set dummy $ac_prog; ac_word=$2
14507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14508$as_echo_n "checking for $ac_word... " >&6; }
14509if ${ac_cv_path_READLINK+:} false; then :
14510  $as_echo_n "(cached) " >&6
14511else
14512  case $READLINK in
14513  [\\/]* | ?:[\\/]*)
14514  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14515  ;;
14516  *)
14517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14518for as_dir in $PATH
14519do
14520  IFS=$as_save_IFS
14521  test -z "$as_dir" && as_dir=.
14522    for ac_exec_ext in '' $ac_executable_extensions; do
14523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14524    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14526    break 2
14527  fi
14528done
14529  done
14530IFS=$as_save_IFS
14531
14532  ;;
14533esac
14534fi
14535READLINK=$ac_cv_path_READLINK
14536if test -n "$READLINK"; then
14537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14538$as_echo "$READLINK" >&6; }
14539else
14540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14541$as_echo "no" >&6; }
14542fi
14543
14544
14545  test -n "$READLINK" && break
14546done
14547
14548  else
14549    # The variable is set, but is it from the command line or the environment?
14550
14551    # Try to remove the string !READLINK! from our list.
14552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14554      # If it failed, the variable was not from the command line. Ignore it,
14555      # but warn the user (except for BASH, which is always set by the calling BASH).
14556      if test "xREADLINK" != xBASH; then
14557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14558$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14559      fi
14560      # Try to locate tool using the code snippet
14561      for ac_prog in greadlink readlink
14562do
14563  # Extract the first word of "$ac_prog", so it can be a program name with args.
14564set dummy $ac_prog; ac_word=$2
14565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14566$as_echo_n "checking for $ac_word... " >&6; }
14567if ${ac_cv_path_READLINK+:} false; then :
14568  $as_echo_n "(cached) " >&6
14569else
14570  case $READLINK in
14571  [\\/]* | ?:[\\/]*)
14572  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14573  ;;
14574  *)
14575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14576for as_dir in $PATH
14577do
14578  IFS=$as_save_IFS
14579  test -z "$as_dir" && as_dir=.
14580    for ac_exec_ext in '' $ac_executable_extensions; do
14581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14582    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14584    break 2
14585  fi
14586done
14587  done
14588IFS=$as_save_IFS
14589
14590  ;;
14591esac
14592fi
14593READLINK=$ac_cv_path_READLINK
14594if test -n "$READLINK"; then
14595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14596$as_echo "$READLINK" >&6; }
14597else
14598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14599$as_echo "no" >&6; }
14600fi
14601
14602
14603  test -n "$READLINK" && break
14604done
14605
14606    else
14607      # If it succeeded, then it was overridden by the user. We will use it
14608      # for the tool.
14609
14610      # First remove it from the list of overridden variables, so we can test
14611      # for unknown variables in the end.
14612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14613
14614      # Check if we try to supply an empty value
14615      if test "x$READLINK" = x; then
14616        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14617$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14619$as_echo_n "checking for READLINK... " >&6; }
14620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14621$as_echo "disabled" >&6; }
14622      else
14623        # Check if the provided tool contains a complete path.
14624        tool_specified="$READLINK"
14625        tool_basename="${tool_specified##*/}"
14626        if test "x$tool_basename" = "x$tool_specified"; then
14627          # A command without a complete path is provided, search $PATH.
14628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14629$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14630          # Extract the first word of "$tool_basename", so it can be a program name with args.
14631set dummy $tool_basename; ac_word=$2
14632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14633$as_echo_n "checking for $ac_word... " >&6; }
14634if ${ac_cv_path_READLINK+:} false; then :
14635  $as_echo_n "(cached) " >&6
14636else
14637  case $READLINK in
14638  [\\/]* | ?:[\\/]*)
14639  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14640  ;;
14641  *)
14642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14643for as_dir in $PATH
14644do
14645  IFS=$as_save_IFS
14646  test -z "$as_dir" && as_dir=.
14647    for ac_exec_ext in '' $ac_executable_extensions; do
14648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14649    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14651    break 2
14652  fi
14653done
14654  done
14655IFS=$as_save_IFS
14656
14657  ;;
14658esac
14659fi
14660READLINK=$ac_cv_path_READLINK
14661if test -n "$READLINK"; then
14662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14663$as_echo "$READLINK" >&6; }
14664else
14665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14666$as_echo "no" >&6; }
14667fi
14668
14669
14670          if test "x$READLINK" = x; then
14671            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14672          fi
14673        else
14674          # Otherwise we believe it is a complete path. Use it as it is.
14675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14676$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14677          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14678$as_echo_n "checking for READLINK... " >&6; }
14679          if test ! -x "$tool_specified"; then
14680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14681$as_echo "not found" >&6; }
14682            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14683          fi
14684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14685$as_echo "$tool_specified" >&6; }
14686        fi
14687      fi
14688    fi
14689
14690  fi
14691
14692
14693
14694
14695  # Publish this variable in the help.
14696
14697
14698  if [ -z "${DF+x}" ]; then
14699    # The variable is not set by user, try to locate tool using the code snippet
14700    for ac_prog in df
14701do
14702  # Extract the first word of "$ac_prog", so it can be a program name with args.
14703set dummy $ac_prog; ac_word=$2
14704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14705$as_echo_n "checking for $ac_word... " >&6; }
14706if ${ac_cv_path_DF+:} false; then :
14707  $as_echo_n "(cached) " >&6
14708else
14709  case $DF in
14710  [\\/]* | ?:[\\/]*)
14711  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14712  ;;
14713  *)
14714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14715for as_dir in $PATH
14716do
14717  IFS=$as_save_IFS
14718  test -z "$as_dir" && as_dir=.
14719    for ac_exec_ext in '' $ac_executable_extensions; do
14720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14721    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14723    break 2
14724  fi
14725done
14726  done
14727IFS=$as_save_IFS
14728
14729  ;;
14730esac
14731fi
14732DF=$ac_cv_path_DF
14733if test -n "$DF"; then
14734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14735$as_echo "$DF" >&6; }
14736else
14737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14738$as_echo "no" >&6; }
14739fi
14740
14741
14742  test -n "$DF" && break
14743done
14744
14745  else
14746    # The variable is set, but is it from the command line or the environment?
14747
14748    # Try to remove the string !DF! from our list.
14749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14751      # If it failed, the variable was not from the command line. Ignore it,
14752      # but warn the user (except for BASH, which is always set by the calling BASH).
14753      if test "xDF" != xBASH; then
14754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14755$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14756      fi
14757      # Try to locate tool using the code snippet
14758      for ac_prog in df
14759do
14760  # Extract the first word of "$ac_prog", so it can be a program name with args.
14761set dummy $ac_prog; ac_word=$2
14762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14763$as_echo_n "checking for $ac_word... " >&6; }
14764if ${ac_cv_path_DF+:} false; then :
14765  $as_echo_n "(cached) " >&6
14766else
14767  case $DF in
14768  [\\/]* | ?:[\\/]*)
14769  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14770  ;;
14771  *)
14772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14773for as_dir in $PATH
14774do
14775  IFS=$as_save_IFS
14776  test -z "$as_dir" && as_dir=.
14777    for ac_exec_ext in '' $ac_executable_extensions; do
14778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14779    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14781    break 2
14782  fi
14783done
14784  done
14785IFS=$as_save_IFS
14786
14787  ;;
14788esac
14789fi
14790DF=$ac_cv_path_DF
14791if test -n "$DF"; then
14792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14793$as_echo "$DF" >&6; }
14794else
14795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14796$as_echo "no" >&6; }
14797fi
14798
14799
14800  test -n "$DF" && break
14801done
14802
14803    else
14804      # If it succeeded, then it was overridden by the user. We will use it
14805      # for the tool.
14806
14807      # First remove it from the list of overridden variables, so we can test
14808      # for unknown variables in the end.
14809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14810
14811      # Check if we try to supply an empty value
14812      if test "x$DF" = x; then
14813        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14814$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14816$as_echo_n "checking for DF... " >&6; }
14817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14818$as_echo "disabled" >&6; }
14819      else
14820        # Check if the provided tool contains a complete path.
14821        tool_specified="$DF"
14822        tool_basename="${tool_specified##*/}"
14823        if test "x$tool_basename" = "x$tool_specified"; then
14824          # A command without a complete path is provided, search $PATH.
14825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14826$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14827          # Extract the first word of "$tool_basename", so it can be a program name with args.
14828set dummy $tool_basename; ac_word=$2
14829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14830$as_echo_n "checking for $ac_word... " >&6; }
14831if ${ac_cv_path_DF+:} false; then :
14832  $as_echo_n "(cached) " >&6
14833else
14834  case $DF in
14835  [\\/]* | ?:[\\/]*)
14836  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14837  ;;
14838  *)
14839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14840for as_dir in $PATH
14841do
14842  IFS=$as_save_IFS
14843  test -z "$as_dir" && as_dir=.
14844    for ac_exec_ext in '' $ac_executable_extensions; do
14845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14846    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14848    break 2
14849  fi
14850done
14851  done
14852IFS=$as_save_IFS
14853
14854  ;;
14855esac
14856fi
14857DF=$ac_cv_path_DF
14858if test -n "$DF"; then
14859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14860$as_echo "$DF" >&6; }
14861else
14862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14863$as_echo "no" >&6; }
14864fi
14865
14866
14867          if test "x$DF" = x; then
14868            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14869          fi
14870        else
14871          # Otherwise we believe it is a complete path. Use it as it is.
14872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14873$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14874          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14875$as_echo_n "checking for DF... " >&6; }
14876          if test ! -x "$tool_specified"; then
14877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14878$as_echo "not found" >&6; }
14879            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14880          fi
14881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14882$as_echo "$tool_specified" >&6; }
14883        fi
14884      fi
14885    fi
14886
14887  fi
14888
14889
14890
14891
14892  # Publish this variable in the help.
14893
14894
14895  if [ -z "${CPIO+x}" ]; then
14896    # The variable is not set by user, try to locate tool using the code snippet
14897    for ac_prog in cpio bsdcpio
14898do
14899  # Extract the first word of "$ac_prog", so it can be a program name with args.
14900set dummy $ac_prog; ac_word=$2
14901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14902$as_echo_n "checking for $ac_word... " >&6; }
14903if ${ac_cv_path_CPIO+:} false; then :
14904  $as_echo_n "(cached) " >&6
14905else
14906  case $CPIO in
14907  [\\/]* | ?:[\\/]*)
14908  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14909  ;;
14910  *)
14911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14912for as_dir in $PATH
14913do
14914  IFS=$as_save_IFS
14915  test -z "$as_dir" && as_dir=.
14916    for ac_exec_ext in '' $ac_executable_extensions; do
14917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14918    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14920    break 2
14921  fi
14922done
14923  done
14924IFS=$as_save_IFS
14925
14926  ;;
14927esac
14928fi
14929CPIO=$ac_cv_path_CPIO
14930if test -n "$CPIO"; then
14931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14932$as_echo "$CPIO" >&6; }
14933else
14934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14935$as_echo "no" >&6; }
14936fi
14937
14938
14939  test -n "$CPIO" && break
14940done
14941
14942  else
14943    # The variable is set, but is it from the command line or the environment?
14944
14945    # Try to remove the string !CPIO! from our list.
14946    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14947    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14948      # If it failed, the variable was not from the command line. Ignore it,
14949      # but warn the user (except for BASH, which is always set by the calling BASH).
14950      if test "xCPIO" != xBASH; then
14951        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14952$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14953      fi
14954      # Try to locate tool using the code snippet
14955      for ac_prog in cpio bsdcpio
14956do
14957  # Extract the first word of "$ac_prog", so it can be a program name with args.
14958set dummy $ac_prog; ac_word=$2
14959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14960$as_echo_n "checking for $ac_word... " >&6; }
14961if ${ac_cv_path_CPIO+:} false; then :
14962  $as_echo_n "(cached) " >&6
14963else
14964  case $CPIO in
14965  [\\/]* | ?:[\\/]*)
14966  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14967  ;;
14968  *)
14969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14970for as_dir in $PATH
14971do
14972  IFS=$as_save_IFS
14973  test -z "$as_dir" && as_dir=.
14974    for ac_exec_ext in '' $ac_executable_extensions; do
14975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14976    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14978    break 2
14979  fi
14980done
14981  done
14982IFS=$as_save_IFS
14983
14984  ;;
14985esac
14986fi
14987CPIO=$ac_cv_path_CPIO
14988if test -n "$CPIO"; then
14989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14990$as_echo "$CPIO" >&6; }
14991else
14992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14993$as_echo "no" >&6; }
14994fi
14995
14996
14997  test -n "$CPIO" && break
14998done
14999
15000    else
15001      # If it succeeded, then it was overridden by the user. We will use it
15002      # for the tool.
15003
15004      # First remove it from the list of overridden variables, so we can test
15005      # for unknown variables in the end.
15006      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15007
15008      # Check if we try to supply an empty value
15009      if test "x$CPIO" = x; then
15010        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15011$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15012        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15013$as_echo_n "checking for CPIO... " >&6; }
15014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15015$as_echo "disabled" >&6; }
15016      else
15017        # Check if the provided tool contains a complete path.
15018        tool_specified="$CPIO"
15019        tool_basename="${tool_specified##*/}"
15020        if test "x$tool_basename" = "x$tool_specified"; then
15021          # A command without a complete path is provided, search $PATH.
15022          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15023$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15024          # Extract the first word of "$tool_basename", so it can be a program name with args.
15025set dummy $tool_basename; ac_word=$2
15026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15027$as_echo_n "checking for $ac_word... " >&6; }
15028if ${ac_cv_path_CPIO+:} false; then :
15029  $as_echo_n "(cached) " >&6
15030else
15031  case $CPIO in
15032  [\\/]* | ?:[\\/]*)
15033  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15034  ;;
15035  *)
15036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15037for as_dir in $PATH
15038do
15039  IFS=$as_save_IFS
15040  test -z "$as_dir" && as_dir=.
15041    for ac_exec_ext in '' $ac_executable_extensions; do
15042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15043    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15045    break 2
15046  fi
15047done
15048  done
15049IFS=$as_save_IFS
15050
15051  ;;
15052esac
15053fi
15054CPIO=$ac_cv_path_CPIO
15055if test -n "$CPIO"; then
15056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15057$as_echo "$CPIO" >&6; }
15058else
15059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15060$as_echo "no" >&6; }
15061fi
15062
15063
15064          if test "x$CPIO" = x; then
15065            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15066          fi
15067        else
15068          # Otherwise we believe it is a complete path. Use it as it is.
15069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15070$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15071          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15072$as_echo_n "checking for CPIO... " >&6; }
15073          if test ! -x "$tool_specified"; then
15074            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15075$as_echo "not found" >&6; }
15076            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15077          fi
15078          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15079$as_echo "$tool_specified" >&6; }
15080        fi
15081      fi
15082    fi
15083
15084  fi
15085
15086
15087
15088
15089  # Publish this variable in the help.
15090
15091
15092  if [ -z "${NICE+x}" ]; then
15093    # The variable is not set by user, try to locate tool using the code snippet
15094    for ac_prog in nice
15095do
15096  # Extract the first word of "$ac_prog", so it can be a program name with args.
15097set dummy $ac_prog; ac_word=$2
15098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15099$as_echo_n "checking for $ac_word... " >&6; }
15100if ${ac_cv_path_NICE+:} false; then :
15101  $as_echo_n "(cached) " >&6
15102else
15103  case $NICE in
15104  [\\/]* | ?:[\\/]*)
15105  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15106  ;;
15107  *)
15108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15109for as_dir in $PATH
15110do
15111  IFS=$as_save_IFS
15112  test -z "$as_dir" && as_dir=.
15113    for ac_exec_ext in '' $ac_executable_extensions; do
15114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15115    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15117    break 2
15118  fi
15119done
15120  done
15121IFS=$as_save_IFS
15122
15123  ;;
15124esac
15125fi
15126NICE=$ac_cv_path_NICE
15127if test -n "$NICE"; then
15128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15129$as_echo "$NICE" >&6; }
15130else
15131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15132$as_echo "no" >&6; }
15133fi
15134
15135
15136  test -n "$NICE" && break
15137done
15138
15139  else
15140    # The variable is set, but is it from the command line or the environment?
15141
15142    # Try to remove the string !NICE! from our list.
15143    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15144    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15145      # If it failed, the variable was not from the command line. Ignore it,
15146      # but warn the user (except for BASH, which is always set by the calling BASH).
15147      if test "xNICE" != xBASH; then
15148        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15149$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15150      fi
15151      # Try to locate tool using the code snippet
15152      for ac_prog in nice
15153do
15154  # Extract the first word of "$ac_prog", so it can be a program name with args.
15155set dummy $ac_prog; ac_word=$2
15156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15157$as_echo_n "checking for $ac_word... " >&6; }
15158if ${ac_cv_path_NICE+:} false; then :
15159  $as_echo_n "(cached) " >&6
15160else
15161  case $NICE in
15162  [\\/]* | ?:[\\/]*)
15163  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15164  ;;
15165  *)
15166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15167for as_dir in $PATH
15168do
15169  IFS=$as_save_IFS
15170  test -z "$as_dir" && as_dir=.
15171    for ac_exec_ext in '' $ac_executable_extensions; do
15172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15173    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15175    break 2
15176  fi
15177done
15178  done
15179IFS=$as_save_IFS
15180
15181  ;;
15182esac
15183fi
15184NICE=$ac_cv_path_NICE
15185if test -n "$NICE"; then
15186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15187$as_echo "$NICE" >&6; }
15188else
15189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15190$as_echo "no" >&6; }
15191fi
15192
15193
15194  test -n "$NICE" && break
15195done
15196
15197    else
15198      # If it succeeded, then it was overridden by the user. We will use it
15199      # for the tool.
15200
15201      # First remove it from the list of overridden variables, so we can test
15202      # for unknown variables in the end.
15203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15204
15205      # Check if we try to supply an empty value
15206      if test "x$NICE" = x; then
15207        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15208$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15210$as_echo_n "checking for NICE... " >&6; }
15211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15212$as_echo "disabled" >&6; }
15213      else
15214        # Check if the provided tool contains a complete path.
15215        tool_specified="$NICE"
15216        tool_basename="${tool_specified##*/}"
15217        if test "x$tool_basename" = "x$tool_specified"; then
15218          # A command without a complete path is provided, search $PATH.
15219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15220$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15221          # Extract the first word of "$tool_basename", so it can be a program name with args.
15222set dummy $tool_basename; ac_word=$2
15223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15224$as_echo_n "checking for $ac_word... " >&6; }
15225if ${ac_cv_path_NICE+:} false; then :
15226  $as_echo_n "(cached) " >&6
15227else
15228  case $NICE in
15229  [\\/]* | ?:[\\/]*)
15230  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15231  ;;
15232  *)
15233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15234for as_dir in $PATH
15235do
15236  IFS=$as_save_IFS
15237  test -z "$as_dir" && as_dir=.
15238    for ac_exec_ext in '' $ac_executable_extensions; do
15239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15240    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15242    break 2
15243  fi
15244done
15245  done
15246IFS=$as_save_IFS
15247
15248  ;;
15249esac
15250fi
15251NICE=$ac_cv_path_NICE
15252if test -n "$NICE"; then
15253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15254$as_echo "$NICE" >&6; }
15255else
15256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15257$as_echo "no" >&6; }
15258fi
15259
15260
15261          if test "x$NICE" = x; then
15262            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15263          fi
15264        else
15265          # Otherwise we believe it is a complete path. Use it as it is.
15266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15267$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15268          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15269$as_echo_n "checking for NICE... " >&6; }
15270          if test ! -x "$tool_specified"; then
15271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15272$as_echo "not found" >&6; }
15273            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15274          fi
15275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15276$as_echo "$tool_specified" >&6; }
15277        fi
15278      fi
15279    fi
15280
15281  fi
15282
15283
15284
15285
15286# Now we can determine OpenJDK build and target platforms. This is required to
15287# have early on.
15288# Make sure we can run config.sub.
15289$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15290  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15291
15292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15293$as_echo_n "checking build system type... " >&6; }
15294if ${ac_cv_build+:} false; then :
15295  $as_echo_n "(cached) " >&6
15296else
15297  ac_build_alias=$build_alias
15298test "x$ac_build_alias" = x &&
15299  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15300test "x$ac_build_alias" = x &&
15301  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15302ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15303  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15304
15305fi
15306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15307$as_echo "$ac_cv_build" >&6; }
15308case $ac_cv_build in
15309*-*-*) ;;
15310*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15311esac
15312build=$ac_cv_build
15313ac_save_IFS=$IFS; IFS='-'
15314set x $ac_cv_build
15315shift
15316build_cpu=$1
15317build_vendor=$2
15318shift; shift
15319# Remember, the first character of IFS is used to create $*,
15320# except with old shells:
15321build_os=$*
15322IFS=$ac_save_IFS
15323case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15324
15325
15326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15327$as_echo_n "checking host system type... " >&6; }
15328if ${ac_cv_host+:} false; then :
15329  $as_echo_n "(cached) " >&6
15330else
15331  if test "x$host_alias" = x; then
15332  ac_cv_host=$ac_cv_build
15333else
15334  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15335    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15336fi
15337
15338fi
15339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15340$as_echo "$ac_cv_host" >&6; }
15341case $ac_cv_host in
15342*-*-*) ;;
15343*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15344esac
15345host=$ac_cv_host
15346ac_save_IFS=$IFS; IFS='-'
15347set x $ac_cv_host
15348shift
15349host_cpu=$1
15350host_vendor=$2
15351shift; shift
15352# Remember, the first character of IFS is used to create $*,
15353# except with old shells:
15354host_os=$*
15355IFS=$ac_save_IFS
15356case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15357
15358
15359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15360$as_echo_n "checking target system type... " >&6; }
15361if ${ac_cv_target+:} false; then :
15362  $as_echo_n "(cached) " >&6
15363else
15364  if test "x$target_alias" = x; then
15365  ac_cv_target=$ac_cv_host
15366else
15367  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15368    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15369fi
15370
15371fi
15372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15373$as_echo "$ac_cv_target" >&6; }
15374case $ac_cv_target in
15375*-*-*) ;;
15376*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15377esac
15378target=$ac_cv_target
15379ac_save_IFS=$IFS; IFS='-'
15380set x $ac_cv_target
15381shift
15382target_cpu=$1
15383target_vendor=$2
15384shift; shift
15385# Remember, the first character of IFS is used to create $*,
15386# except with old shells:
15387target_os=$*
15388IFS=$ac_save_IFS
15389case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15390
15391
15392# The aliases save the names the user supplied, while $host etc.
15393# will get canonicalized.
15394test -n "$target_alias" &&
15395  test "$program_prefix$program_suffix$program_transform_name" = \
15396    NONENONEs,x,x, &&
15397  program_prefix=${target_alias}-
15398
15399  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15400  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15401  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15402  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15403  # to use the configure naming style.
15404
15405
15406
15407
15408
15409  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15410  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15411  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15412  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15413  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15414  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15415
15416
15417
15418  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15419
15420  case "$build_os" in
15421    *linux*)
15422      VAR_OS=linux
15423      VAR_OS_TYPE=unix
15424      ;;
15425    *solaris*)
15426      VAR_OS=solaris
15427      VAR_OS_TYPE=unix
15428      ;;
15429    *darwin*)
15430      VAR_OS=macosx
15431      VAR_OS_TYPE=unix
15432      ;;
15433    *bsd*)
15434      VAR_OS=bsd
15435      VAR_OS_TYPE=unix
15436      ;;
15437    *cygwin*)
15438      VAR_OS=windows
15439      VAR_OS_ENV=windows.cygwin
15440      ;;
15441    *mingw*)
15442      VAR_OS=windows
15443      VAR_OS_ENV=windows.msys
15444      ;;
15445    *aix*)
15446      VAR_OS=aix
15447      VAR_OS_TYPE=unix
15448      ;;
15449    *)
15450      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15451      ;;
15452  esac
15453
15454
15455  # First argument is the cpu name from the trip/quad
15456  case "$build_cpu" in
15457    x86_64)
15458      VAR_CPU=x86_64
15459      VAR_CPU_ARCH=x86
15460      VAR_CPU_BITS=64
15461      VAR_CPU_ENDIAN=little
15462      ;;
15463    i?86)
15464      VAR_CPU=x86
15465      VAR_CPU_ARCH=x86
15466      VAR_CPU_BITS=32
15467      VAR_CPU_ENDIAN=little
15468      ;;
15469    arm*)
15470      VAR_CPU=arm
15471      VAR_CPU_ARCH=arm
15472      VAR_CPU_BITS=32
15473      VAR_CPU_ENDIAN=little
15474      ;;
15475    aarch64)
15476      VAR_CPU=aarch64
15477      VAR_CPU_ARCH=aarch64
15478      VAR_CPU_BITS=64
15479      VAR_CPU_ENDIAN=little
15480      ;;
15481    powerpc)
15482      VAR_CPU=ppc
15483      VAR_CPU_ARCH=ppc
15484      VAR_CPU_BITS=32
15485      VAR_CPU_ENDIAN=big
15486      ;;
15487    powerpc64)
15488      VAR_CPU=ppc64
15489      VAR_CPU_ARCH=ppc
15490      VAR_CPU_BITS=64
15491      VAR_CPU_ENDIAN=big
15492      ;;
15493    powerpc64le)
15494      VAR_CPU=ppc64le
15495      VAR_CPU_ARCH=ppc
15496      VAR_CPU_BITS=64
15497      VAR_CPU_ENDIAN=little
15498      ;;
15499    s390)
15500      VAR_CPU=s390
15501      VAR_CPU_ARCH=s390
15502      VAR_CPU_BITS=32
15503      VAR_CPU_ENDIAN=big
15504      ;;
15505    s390x)
15506      VAR_CPU=s390x
15507      VAR_CPU_ARCH=s390
15508      VAR_CPU_BITS=64
15509      VAR_CPU_ENDIAN=big
15510      ;;
15511    sparc)
15512      VAR_CPU=sparc
15513      VAR_CPU_ARCH=sparc
15514      VAR_CPU_BITS=32
15515      VAR_CPU_ENDIAN=big
15516      ;;
15517    sparcv9|sparc64)
15518      VAR_CPU=sparcv9
15519      VAR_CPU_ARCH=sparc
15520      VAR_CPU_BITS=64
15521      VAR_CPU_ENDIAN=big
15522      ;;
15523    *)
15524      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15525      ;;
15526  esac
15527
15528  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15529  OPENJDK_BUILD_OS="$VAR_OS"
15530  if test "x$VAR_OS_TYPE" != x; then
15531    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15532  else
15533    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15534  fi
15535  if test "x$VAR_OS_ENV" != x; then
15536    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15537  else
15538    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15539  fi
15540  OPENJDK_BUILD_CPU="$VAR_CPU"
15541  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15542  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15543  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15544
15545
15546
15547
15548
15549
15550
15551
15552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15553$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15555$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15556
15557  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15558
15559  case "$host_os" in
15560    *linux*)
15561      VAR_OS=linux
15562      VAR_OS_TYPE=unix
15563      ;;
15564    *solaris*)
15565      VAR_OS=solaris
15566      VAR_OS_TYPE=unix
15567      ;;
15568    *darwin*)
15569      VAR_OS=macosx
15570      VAR_OS_TYPE=unix
15571      ;;
15572    *bsd*)
15573      VAR_OS=bsd
15574      VAR_OS_TYPE=unix
15575      ;;
15576    *cygwin*)
15577      VAR_OS=windows
15578      VAR_OS_ENV=windows.cygwin
15579      ;;
15580    *mingw*)
15581      VAR_OS=windows
15582      VAR_OS_ENV=windows.msys
15583      ;;
15584    *aix*)
15585      VAR_OS=aix
15586      VAR_OS_TYPE=unix
15587      ;;
15588    *)
15589      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15590      ;;
15591  esac
15592
15593
15594  # First argument is the cpu name from the trip/quad
15595  case "$host_cpu" in
15596    x86_64)
15597      VAR_CPU=x86_64
15598      VAR_CPU_ARCH=x86
15599      VAR_CPU_BITS=64
15600      VAR_CPU_ENDIAN=little
15601      ;;
15602    i?86)
15603      VAR_CPU=x86
15604      VAR_CPU_ARCH=x86
15605      VAR_CPU_BITS=32
15606      VAR_CPU_ENDIAN=little
15607      ;;
15608    arm*)
15609      VAR_CPU=arm
15610      VAR_CPU_ARCH=arm
15611      VAR_CPU_BITS=32
15612      VAR_CPU_ENDIAN=little
15613      ;;
15614    aarch64)
15615      VAR_CPU=aarch64
15616      VAR_CPU_ARCH=aarch64
15617      VAR_CPU_BITS=64
15618      VAR_CPU_ENDIAN=little
15619      ;;
15620    powerpc)
15621      VAR_CPU=ppc
15622      VAR_CPU_ARCH=ppc
15623      VAR_CPU_BITS=32
15624      VAR_CPU_ENDIAN=big
15625      ;;
15626    powerpc64)
15627      VAR_CPU=ppc64
15628      VAR_CPU_ARCH=ppc
15629      VAR_CPU_BITS=64
15630      VAR_CPU_ENDIAN=big
15631      ;;
15632    powerpc64le)
15633      VAR_CPU=ppc64le
15634      VAR_CPU_ARCH=ppc
15635      VAR_CPU_BITS=64
15636      VAR_CPU_ENDIAN=little
15637      ;;
15638    s390)
15639      VAR_CPU=s390
15640      VAR_CPU_ARCH=s390
15641      VAR_CPU_BITS=32
15642      VAR_CPU_ENDIAN=big
15643      ;;
15644    s390x)
15645      VAR_CPU=s390x
15646      VAR_CPU_ARCH=s390
15647      VAR_CPU_BITS=64
15648      VAR_CPU_ENDIAN=big
15649      ;;
15650    sparc)
15651      VAR_CPU=sparc
15652      VAR_CPU_ARCH=sparc
15653      VAR_CPU_BITS=32
15654      VAR_CPU_ENDIAN=big
15655      ;;
15656    sparcv9|sparc64)
15657      VAR_CPU=sparcv9
15658      VAR_CPU_ARCH=sparc
15659      VAR_CPU_BITS=64
15660      VAR_CPU_ENDIAN=big
15661      ;;
15662    *)
15663      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15664      ;;
15665  esac
15666
15667  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15668  OPENJDK_TARGET_OS="$VAR_OS"
15669  if test "x$VAR_OS_TYPE" != x; then
15670    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15671  else
15672    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15673  fi
15674  if test "x$VAR_OS_ENV" != x; then
15675    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15676  else
15677    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15678  fi
15679  OPENJDK_TARGET_CPU="$VAR_CPU"
15680  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15681  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15682  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15683
15684
15685
15686
15687
15688
15689
15690
15691  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15692$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15694$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15695
15696
15697
15698# Check whether --with-target-bits was given.
15699if test "${with_target_bits+set}" = set; then :
15700  withval=$with_target_bits;
15701fi
15702
15703
15704  # We have three types of compiles:
15705  # native  == normal compilation, target system == build system
15706  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15707  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15708  #
15709  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15710    # We're doing a proper cross-compilation
15711    COMPILE_TYPE="cross"
15712  else
15713    COMPILE_TYPE="native"
15714  fi
15715
15716  if test "x$with_target_bits" != x; then
15717    if test "x$COMPILE_TYPE" = "xcross"; then
15718      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15719    fi
15720
15721    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15722      # A reduced build is requested
15723      COMPILE_TYPE="reduced"
15724      OPENJDK_TARGET_CPU_BITS=32
15725      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15726        OPENJDK_TARGET_CPU=x86
15727      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15728        OPENJDK_TARGET_CPU=sparc
15729      else
15730        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15731      fi
15732    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15733      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
15734    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15735      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15736$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15737    else
15738      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15739    fi
15740  fi
15741
15742
15743  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15744$as_echo_n "checking compilation type... " >&6; }
15745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15746$as_echo "$COMPILE_TYPE" >&6; }
15747
15748
15749  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15750    REQUIRED_OS_NAME=SunOS
15751    REQUIRED_OS_VERSION=5.10
15752  fi
15753  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15754    REQUIRED_OS_NAME=Linux
15755    REQUIRED_OS_VERSION=2.6
15756  fi
15757  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15758    REQUIRED_OS_NAME=Windows
15759    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15760      REQUIRED_OS_VERSION=5.2
15761    else
15762      REQUIRED_OS_VERSION=5.1
15763    fi
15764  fi
15765  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15766    REQUIRED_OS_NAME=Darwin
15767    REQUIRED_OS_VERSION=11.2
15768  fi
15769  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15770    REQUIRED_OS_NAME=AIX
15771    REQUIRED_OS_VERSION=7.1
15772  fi
15773
15774
15775
15776
15777
15778
15779  # Also store the legacy naming of the cpu.
15780  # Ie i586 and amd64 instead of x86 and x86_64
15781  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15782  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15783    OPENJDK_TARGET_CPU_LEGACY="i586"
15784  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15785    # On all platforms except MacOSX replace x86_64 with amd64.
15786    OPENJDK_TARGET_CPU_LEGACY="amd64"
15787  fi
15788
15789
15790  # And the second legacy naming of the cpu.
15791  # Ie i386 and amd64 instead of x86 and x86_64.
15792  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15793  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15794    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15795  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15796    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15797  fi
15798
15799
15800  # This is the name of the cpu (but using i386 and amd64 instead of
15801  # x86 and x86_64, respectively), preceeded by a /, to be used when
15802  # locating libraries. On macosx, it's empty, though.
15803  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15804  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15805    OPENJDK_TARGET_CPU_LIBDIR=""
15806  fi
15807
15808
15809  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15810  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15811  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15812  OPENJDK_TARGET_CPU_ISADIR=""
15813  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15814    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15815      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15816    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15817      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15818    fi
15819  fi
15820
15821
15822  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15823  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15824  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15825    # On linux only, we replace x86 with i386.
15826    OPENJDK_TARGET_CPU_OSARCH="i386"
15827  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15828    # On all platforms except macosx, we replace x86_64 with amd64.
15829    OPENJDK_TARGET_CPU_OSARCH="amd64"
15830  fi
15831
15832
15833  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15834  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15835    OPENJDK_TARGET_CPU_JLI="i386"
15836  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15837    # On all platforms except macosx, we replace x86_64 with amd64.
15838    OPENJDK_TARGET_CPU_JLI="amd64"
15839  fi
15840  # Now setup the -D flags for building libjli.
15841  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15842  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15843    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15844      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15845    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15846      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15847    fi
15848  fi
15849
15850
15851  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15852      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15853  else
15854      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15855  fi
15856
15857
15858  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15859  # Macosx is osx and x86_64 is x64
15860  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15861    OPENJDK_TARGET_OS_BUNDLE="osx"
15862  else
15863    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15864  fi
15865  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15866    OPENJDK_TARGET_CPU_BUNDLE="x64"
15867  else
15868    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15869  fi
15870  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15871
15872
15873
15874
15875  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15876    A_LP64="LP64:="
15877    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15878    # unpack200.exe
15879    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15880      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15881    fi
15882  fi
15883  LP64=$A_LP64
15884
15885
15886  if test "x$COMPILE_TYPE" = "xcross"; then
15887    # FIXME: ... or should this include reduced builds..?
15888    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15889  else
15890    DEFINE_CROSS_COMPILE_ARCH=""
15891  fi
15892
15893
15894  # Convert openjdk platform names to hotspot names
15895
15896  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15897  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15898    HOTSPOT_TARGET_OS=bsd
15899  fi
15900
15901
15902  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15903  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15904    HOTSPOT_TARGET_OS_TYPE=posix
15905  fi
15906
15907
15908  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15909  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15910    HOTSPOT_TARGET_CPU=x86_32
15911  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15912    HOTSPOT_TARGET_CPU=sparc
15913  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15914    HOTSPOT_TARGET_CPU=ppc_64
15915  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15916    HOTSPOT_TARGET_CPU=ppc_64
15917  fi
15918
15919
15920  # This is identical with OPENJDK_*, but define anyway for consistency.
15921  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15922
15923
15924  # Setup HOTSPOT_TARGET_CPU_DEFINE
15925  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15926    HOTSPOT_TARGET_CPU_DEFINE=IA32
15927  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15928    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15929  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15930    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15931  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15932    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15933  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15934    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15935  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15936    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15937
15938  # The cpu defines below are for zero, we don't support them directly.
15939  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15940    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15941  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15942    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15943  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15944    HOTSPOT_TARGET_CPU_DEFINE=S390
15945  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15946    HOTSPOT_TARGET_CPU_DEFINE=S390
15947  fi
15948
15949
15950
15951
15952  # Also store the legacy naming of the cpu.
15953  # Ie i586 and amd64 instead of x86 and x86_64
15954  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15955  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15956    OPENJDK_BUILD_CPU_LEGACY="i586"
15957  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15958    # On all platforms except MacOSX replace x86_64 with amd64.
15959    OPENJDK_BUILD_CPU_LEGACY="amd64"
15960  fi
15961
15962
15963  # And the second legacy naming of the cpu.
15964  # Ie i386 and amd64 instead of x86 and x86_64.
15965  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15966  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15967    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15968  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15969    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15970  fi
15971
15972
15973  # This is the name of the cpu (but using i386 and amd64 instead of
15974  # x86 and x86_64, respectively), preceeded by a /, to be used when
15975  # locating libraries. On macosx, it's empty, though.
15976  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15977  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15978    OPENJDK_BUILD_CPU_LIBDIR=""
15979  fi
15980
15981
15982  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15983  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15984  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15985  OPENJDK_BUILD_CPU_ISADIR=""
15986  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15987    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15988      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15989    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15990      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15991    fi
15992  fi
15993
15994
15995  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15996  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15997  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15998    # On linux only, we replace x86 with i386.
15999    OPENJDK_BUILD_CPU_OSARCH="i386"
16000  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16001    # On all platforms except macosx, we replace x86_64 with amd64.
16002    OPENJDK_BUILD_CPU_OSARCH="amd64"
16003  fi
16004
16005
16006  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16007  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16008    OPENJDK_BUILD_CPU_JLI="i386"
16009  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16010    # On all platforms except macosx, we replace x86_64 with amd64.
16011    OPENJDK_BUILD_CPU_JLI="amd64"
16012  fi
16013  # Now setup the -D flags for building libjli.
16014  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16015  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16016    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16017      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16018    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16019      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16020    fi
16021  fi
16022
16023
16024  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16025      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16026  else
16027      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16028  fi
16029
16030
16031  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16032  # Macosx is osx and x86_64 is x64
16033  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16034    OPENJDK_BUILD_OS_BUNDLE="osx"
16035  else
16036    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16037  fi
16038  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16039    OPENJDK_BUILD_CPU_BUNDLE="x64"
16040  else
16041    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16042  fi
16043  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16044
16045
16046
16047
16048  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16049    A_LP64="LP64:="
16050    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16051    # unpack200.exe
16052    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16053      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16054    fi
16055  fi
16056  LP64=$A_LP64
16057
16058
16059  if test "x$COMPILE_TYPE" = "xcross"; then
16060    # FIXME: ... or should this include reduced builds..?
16061    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16062  else
16063    DEFINE_CROSS_COMPILE_ARCH=""
16064  fi
16065
16066
16067  # Convert openjdk platform names to hotspot names
16068
16069  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16070  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16071    HOTSPOT_BUILD_OS=bsd
16072  fi
16073
16074
16075  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16076  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16077    HOTSPOT_BUILD_OS_TYPE=posix
16078  fi
16079
16080
16081  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16082  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16083    HOTSPOT_BUILD_CPU=x86_32
16084  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16085    HOTSPOT_BUILD_CPU=sparc
16086  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16087    HOTSPOT_BUILD_CPU=ppc_64
16088  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16089    HOTSPOT_BUILD_CPU=ppc_64
16090  fi
16091
16092
16093  # This is identical with OPENJDK_*, but define anyway for consistency.
16094  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16095
16096
16097  # Setup HOTSPOT_BUILD_CPU_DEFINE
16098  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16099    HOTSPOT_BUILD_CPU_DEFINE=IA32
16100  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16101    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16102  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16103    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16104  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16105    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16106  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16107    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16108  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16109    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16110
16111  # The cpu defines below are for zero, we don't support them directly.
16112  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16113    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16114  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16115    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16116  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16117    HOTSPOT_BUILD_CPU_DEFINE=S390
16118  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16119    HOTSPOT_BUILD_CPU_DEFINE=S390
16120  fi
16121
16122
16123
16124
16125  # ZERO_ARCHDEF is used to enable architecture-specific code.
16126  # This is used in legacy hotspot build.
16127  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16128
16129
16130
16131
16132
16133# Continue setting up basic stuff. Most remaining code require fundamental tools.
16134
16135  # Save the current directory this script was started from
16136  CURDIR="$PWD"
16137
16138  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16139  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16140  # was not available at that time.
16141  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16142  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16143    ORIGINAL_PATH="$REWRITTEN_PATH"
16144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16145$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16146  fi
16147
16148  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16149    PATH_SEP=";"
16150
16151  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16152  if test $SRC_ROOT_LENGTH -gt 100; then
16153    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16154  fi
16155
16156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16158$as_echo_n "checking cygwin release... " >&6; }
16159    CYGWIN_VERSION=`$UNAME -r`
16160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16161$as_echo "$CYGWIN_VERSION" >&6; }
16162    WINDOWS_ENV_VENDOR='cygwin'
16163    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16164
16165    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16166    if test "x$CYGWIN_VERSION_OLD" != x; then
16167      { $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
16168$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;}
16169      as_fn_error $? "Cannot continue" "$LINENO" 5
16170    fi
16171    if test "x$CYGPATH" = x; then
16172      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16173    fi
16174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16175$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16176    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16177    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16178    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16179    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16181$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16182    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16183    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16184    if test "x$test_cygdrive_prefix" = x; then
16185      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16186    fi
16187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16189$as_echo_n "checking msys release... " >&6; }
16190    MSYS_VERSION=`$UNAME -r`
16191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16192$as_echo "$MSYS_VERSION" >&6; }
16193
16194    WINDOWS_ENV_VENDOR='msys'
16195    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16196
16197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16198$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16199    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16200    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16201
16202  windows_path="$MSYS_ROOT_PATH"
16203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16204    unix_path=`$CYGPATH -u "$windows_path"`
16205    MSYS_ROOT_PATH="$unix_path"
16206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16208    MSYS_ROOT_PATH="$unix_path"
16209  fi
16210
16211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16212$as_echo "$MSYS_ROOT_PATH" >&6; }
16213    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16214  else
16215    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16216  fi
16217
16218  # Test if windows or unix (cygwin/msys) find is first in path.
16219  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16220$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16221  FIND_BINARY_OUTPUT=`find --version 2>&1`
16222  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16224$as_echo "unix style" >&6; }
16225  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16227$as_echo "Windows" >&6; }
16228    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16229$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16230    { $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
16231$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16232    as_fn_error $? "Cannot continue" "$LINENO" 5
16233  else
16234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16235$as_echo "unknown" >&6; }
16236    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16237$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16238  fi
16239
16240  else
16241    PATH_SEP=":"
16242  fi
16243
16244
16245  # We get the top-level directory from the supporting wrappers.
16246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16247$as_echo_n "checking for top-level directory... " >&6; }
16248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16249$as_echo "$TOPDIR" >&6; }
16250
16251
16252  # Save the original version of TOPDIR for string comparisons
16253  ORIGINAL_TOPDIR="$TOPDIR"
16254
16255
16256  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16257
16258  # Only process if variable expands to non-empty
16259
16260  if test "x$CURDIR" != x; then
16261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16262
16263  # Input might be given as Windows format, start by converting to
16264  # unix format.
16265  path="$CURDIR"
16266  new_path=`$CYGPATH -u "$path"`
16267
16268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16271  # "foo.exe" is OK but "foo" is an error.
16272  #
16273  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16274  # It is also a way to make sure we got the proper file name for the real test later on.
16275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16276  if test "x$test_shortpath" = x; then
16277    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16278$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16279    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16280  fi
16281
16282  # Call helper function which possibly converts this using DOS-style short mode.
16283  # If so, the updated path is stored in $new_path.
16284
16285  input_path="$new_path"
16286  # Check if we need to convert this using DOS-style short mode. If the path
16287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16288  # take no chances and rewrite it.
16289  # Note: m4 eats our [], so we need to use [ and ] instead.
16290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16291  if test "x$has_forbidden_chars" != x; then
16292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16296      # Going to short mode and back again did indeed matter. Since short mode is
16297      # case insensitive, let's make it lowercase to improve readability.
16298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16299      # Now convert it back to Unix-style (cygpath)
16300      input_path=`$CYGPATH -u "$shortmode_path"`
16301      new_path="$input_path"
16302    fi
16303  fi
16304
16305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16306  if test "x$test_cygdrive_prefix" = x; then
16307    # As a simple fix, exclude /usr/bin since it's not a real path.
16308    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16310      # a path prefixed by /cygdrive for fixpath to work.
16311      new_path="$CYGWIN_ROOT_PATH$input_path"
16312    fi
16313  fi
16314
16315
16316  if test "x$path" != "x$new_path"; then
16317    CURDIR="$new_path"
16318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16319$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16320  fi
16321
16322    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16323
16324  path="$CURDIR"
16325  has_colon=`$ECHO $path | $GREP ^.:`
16326  new_path="$path"
16327  if test "x$has_colon" = x; then
16328    # Not in mixed or Windows style, start by that.
16329    new_path=`cmd //c echo $path`
16330  fi
16331
16332
16333  input_path="$new_path"
16334  # Check if we need to convert this using DOS-style short mode. If the path
16335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16336  # take no chances and rewrite it.
16337  # Note: m4 eats our [], so we need to use [ and ] instead.
16338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16339  if test "x$has_forbidden_chars" != x; then
16340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16341    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16342  fi
16343
16344
16345  windows_path="$new_path"
16346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16347    unix_path=`$CYGPATH -u "$windows_path"`
16348    new_path="$unix_path"
16349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16351    new_path="$unix_path"
16352  fi
16353
16354  if test "x$path" != "x$new_path"; then
16355    CURDIR="$new_path"
16356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16357$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16358  fi
16359
16360  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16361  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16362
16363    else
16364      # We're on a unix platform. Hooray! :)
16365      path="$CURDIR"
16366      has_space=`$ECHO "$path" | $GREP " "`
16367      if test "x$has_space" != x; then
16368        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16369$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16370        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16371      fi
16372
16373      # Use eval to expand a potential ~
16374      eval path="$path"
16375      if test ! -f "$path" && test ! -d "$path"; then
16376        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16377      fi
16378
16379      if test -d "$path"; then
16380        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16381      else
16382        dir="`$DIRNAME "$path"`"
16383        base="`$BASENAME "$path"`"
16384        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16385      fi
16386    fi
16387  fi
16388
16389
16390  # Only process if variable expands to non-empty
16391
16392  if test "x$TOPDIR" != x; then
16393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16394
16395  # Input might be given as Windows format, start by converting to
16396  # unix format.
16397  path="$TOPDIR"
16398  new_path=`$CYGPATH -u "$path"`
16399
16400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16403  # "foo.exe" is OK but "foo" is an error.
16404  #
16405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16406  # It is also a way to make sure we got the proper file name for the real test later on.
16407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16408  if test "x$test_shortpath" = x; then
16409    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16410$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16411    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
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
16417  input_path="$new_path"
16418  # Check if we need to convert this using DOS-style short mode. If the path
16419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16420  # take no chances and rewrite it.
16421  # Note: m4 eats our [], so we need to use [ and ] instead.
16422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16423  if test "x$has_forbidden_chars" != x; then
16424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16428      # Going to short mode and back again did indeed matter. Since short mode is
16429      # case insensitive, let's make it lowercase to improve readability.
16430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16431      # Now convert it back to Unix-style (cygpath)
16432      input_path=`$CYGPATH -u "$shortmode_path"`
16433      new_path="$input_path"
16434    fi
16435  fi
16436
16437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16438  if test "x$test_cygdrive_prefix" = x; then
16439    # As a simple fix, exclude /usr/bin since it's not a real path.
16440    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16442      # a path prefixed by /cygdrive for fixpath to work.
16443      new_path="$CYGWIN_ROOT_PATH$input_path"
16444    fi
16445  fi
16446
16447
16448  if test "x$path" != "x$new_path"; then
16449    TOPDIR="$new_path"
16450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16451$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16452  fi
16453
16454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16455
16456  path="$TOPDIR"
16457  has_colon=`$ECHO $path | $GREP ^.:`
16458  new_path="$path"
16459  if test "x$has_colon" = x; then
16460    # Not in mixed or Windows style, start by that.
16461    new_path=`cmd //c echo $path`
16462  fi
16463
16464
16465  input_path="$new_path"
16466  # Check if we need to convert this using DOS-style short mode. If the path
16467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16468  # take no chances and rewrite it.
16469  # Note: m4 eats our [], so we need to use [ and ] instead.
16470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16471  if test "x$has_forbidden_chars" != x; then
16472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16474  fi
16475
16476
16477  windows_path="$new_path"
16478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16479    unix_path=`$CYGPATH -u "$windows_path"`
16480    new_path="$unix_path"
16481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16483    new_path="$unix_path"
16484  fi
16485
16486  if test "x$path" != "x$new_path"; then
16487    TOPDIR="$new_path"
16488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16489$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16490  fi
16491
16492  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16493  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16494
16495    else
16496      # We're on a unix platform. Hooray! :)
16497      path="$TOPDIR"
16498      has_space=`$ECHO "$path" | $GREP " "`
16499      if test "x$has_space" != x; then
16500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16501$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16502        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16503      fi
16504
16505      # Use eval to expand a potential ~
16506      eval path="$path"
16507      if test ! -f "$path" && test ! -d "$path"; then
16508        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16509      fi
16510
16511      if test -d "$path"; then
16512        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16513      else
16514        dir="`$DIRNAME "$path"`"
16515        base="`$BASENAME "$path"`"
16516        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16517      fi
16518    fi
16519  fi
16520
16521  # SRC_ROOT is a traditional alias for TOPDIR.
16522  SRC_ROOT=$TOPDIR
16523
16524  # Calculate a canonical version of TOPDIR for string comparisons
16525  CANONICAL_TOPDIR=$TOPDIR
16526
16527  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16528    # Follow a chain of symbolic links. Use readlink
16529    # where it exists, else fall back to horribly
16530    # complicated shell code.
16531    if test "x$READLINK_TESTED" != yes; then
16532      # On MacOSX there is a readlink tool with a different
16533      # purpose than the GNU readlink tool. Check the found readlink.
16534      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16535      if test "x$ISGNU" = x; then
16536        # A readlink that we do not know how to use.
16537        # Are there other non-GNU readlinks out there?
16538        READLINK_TESTED=yes
16539        READLINK=
16540      fi
16541    fi
16542
16543    if test "x$READLINK" != x; then
16544      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16545    else
16546      # Save the current directory for restoring afterwards
16547      STARTDIR=$PWD
16548      COUNTER=0
16549      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16550      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16551      cd $sym_link_dir
16552      # Use -P flag to resolve symlinks in directories.
16553      cd `$THEPWDCMD -P`
16554      sym_link_dir=`$THEPWDCMD -P`
16555      # Resolve file symlinks
16556      while test $COUNTER -lt 20; do
16557        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16558        if test "x$ISLINK" == x; then
16559          # This is not a symbolic link! We are done!
16560          break
16561        fi
16562        # Again resolve directory symlinks since the target of the just found
16563        # link could be in a different directory
16564        cd `$DIRNAME $ISLINK`
16565        sym_link_dir=`$THEPWDCMD -P`
16566        sym_link_file=`$BASENAME $ISLINK`
16567        let COUNTER=COUNTER+1
16568      done
16569      cd $STARTDIR
16570      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16571    fi
16572  fi
16573
16574
16575
16576  # Locate the directory of this script.
16577  AUTOCONF_DIR=$TOPDIR/common/autoconf
16578
16579  # Setup username (for use in adhoc version strings etc)
16580  # Outer [ ] to quote m4.
16581   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16582
16583
16584
16585# Check if it's a pure open build or if custom sources are to be used.
16586
16587  # Check whether --enable-openjdk-only was given.
16588if test "${enable_openjdk_only+set}" = set; then :
16589  enableval=$enable_openjdk_only;
16590else
16591  enable_openjdk_only="no"
16592fi
16593
16594
16595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16596$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16598$as_echo "$enable_openjdk_only" >&6; }
16599  if test "x$enable_openjdk_only" = "xyes"; then
16600    SUPPRESS_CUSTOM_EXTENSIONS="true"
16601  elif test "x$enable_openjdk_only" = "xno"; then
16602    SUPPRESS_CUSTOM_EXTENSIONS="false"
16603  else
16604    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16605  fi
16606
16607  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16608  # the IncludeCustomExtension macro.
16609
16610
16611# Check whether --with-custom-make-dir was given.
16612if test "${with_custom_make_dir+set}" = set; then :
16613  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
16614$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16615fi
16616
16617
16618
16619
16620# These are needed to be able to create a configuration name (and thus the output directory)
16621
16622  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16623$as_echo_n "checking which variant of the JDK to build... " >&6; }
16624
16625# Check whether --with-jdk-variant was given.
16626if test "${with_jdk_variant+set}" = set; then :
16627  withval=$with_jdk_variant;
16628fi
16629
16630
16631  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16632    JDK_VARIANT="normal"
16633  else
16634    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16635  fi
16636
16637
16638
16639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16640$as_echo "$JDK_VARIANT" >&6; }
16641
16642
16643  DEBUG_LEVEL="release"
16644  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16645$as_echo_n "checking which debug level to use... " >&6; }
16646  # Check whether --enable-debug was given.
16647if test "${enable_debug+set}" = set; then :
16648  enableval=$enable_debug;
16649        ENABLE_DEBUG="${enableval}"
16650        DEBUG_LEVEL="fastdebug"
16651
16652else
16653  ENABLE_DEBUG="no"
16654fi
16655
16656
16657
16658# Check whether --with-debug-level was given.
16659if test "${with_debug_level+set}" = set; then :
16660  withval=$with_debug_level;
16661        DEBUG_LEVEL="${withval}"
16662        if test "x$ENABLE_DEBUG" = xyes; then
16663          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16664        fi
16665
16666fi
16667
16668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16669$as_echo "$DEBUG_LEVEL" >&6; }
16670
16671  if test "x$DEBUG_LEVEL" != xrelease && \
16672      test "x$DEBUG_LEVEL" != xoptimized && \
16673      test "x$DEBUG_LEVEL" != xfastdebug && \
16674      test "x$DEBUG_LEVEL" != xslowdebug; then
16675    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16676  fi
16677
16678  # Translate DEBUG_LEVEL to debug level used by Hotspot
16679  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16680  if test "x$DEBUG_LEVEL" = xrelease; then
16681    HOTSPOT_DEBUG_LEVEL="product"
16682  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16683    HOTSPOT_DEBUG_LEVEL="debug"
16684  fi
16685
16686  if test "x$DEBUG_LEVEL" = xoptimized; then
16687    # The debug level 'optimized' is a little special because it is currently only
16688    # applicable to the HotSpot build where it means to build a completely
16689    # optimized version of the VM without any debugging code (like for the
16690    # 'release' debug level which is called 'product' in the HotSpot build) but
16691    # with the exception that it can contain additional code which is otherwise
16692    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16693    # test new and/or experimental features which are not intended for customer
16694    # shipment. Because these new features need to be tested and benchmarked in
16695    # real world scenarios, we want to build the containing JDK at the 'release'
16696    # debug level.
16697    DEBUG_LEVEL="release"
16698  fi
16699
16700
16701
16702
16703
16704
16705# Check whether --with-jvm-variants was given.
16706if test "${with_jvm_variants+set}" = set; then :
16707  withval=$with_jvm_variants;
16708fi
16709
16710
16711  if test "x$with_jvm_variants" = x; then
16712    with_jvm_variants="server"
16713  fi
16714  JVM_VARIANTS_OPT="$with_jvm_variants"
16715
16716  # Has the user listed more than one variant?
16717  # Additional [] needed to keep m4 from mangling shell constructs.
16718  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16719    BUILDING_MULTIPLE_JVM_VARIANTS=true
16720  else
16721    BUILDING_MULTIPLE_JVM_VARIANTS=false
16722  fi
16723  # Replace the commas with AND for use in the build directory name.
16724  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16725
16726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16727$as_echo_n "checking which variants of the JVM to build... " >&6; }
16728  # JVM_VARIANTS is a space-separated list.
16729  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16730  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16732$as_echo "$JVM_VARIANTS" >&6; }
16733
16734  # Check that the selected variants are valid
16735
16736  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16737  # Notice that the original variant failes on SLES 10 and 11
16738  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16739  STACK=${JVM_VARIANTS// /$'\n'}
16740  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16741  if test "x$INVALID_VARIANTS" != x; then
16742    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16743$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16744    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16745  fi
16746
16747  # All "special" variants share the same output directory ("server")
16748  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16749  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16750  STACK=${JVM_VARIANTS// /$'\n'}
16751  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16752  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16753    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16754  fi
16755
16756
16757
16758
16759  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16760    # zero behaves as a platform and rewrites these values. This is really weird. :(
16761    # We are guaranteed that we do not build any other variants when building zero.
16762    HOTSPOT_TARGET_CPU=zero
16763    HOTSPOT_TARGET_CPU_ARCH=zero
16764  fi
16765
16766
16767# With basic setup done, call the custom early hook.
16768
16769
16770# Check if we have devkits, extra paths or sysroot set.
16771
16772
16773# Check whether --with-devkit was given.
16774if test "${with_devkit+set}" = set; then :
16775  withval=$with_devkit;
16776
16777  # Only process if variable expands to non-empty
16778
16779  if test "x$with_devkit" != x; then
16780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16781
16782  # Input might be given as Windows format, start by converting to
16783  # unix format.
16784  path="$with_devkit"
16785  new_path=`$CYGPATH -u "$path"`
16786
16787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16790  # "foo.exe" is OK but "foo" is an error.
16791  #
16792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16793  # It is also a way to make sure we got the proper file name for the real test later on.
16794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16795  if test "x$test_shortpath" = x; then
16796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16797$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16798    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
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
16804  input_path="$new_path"
16805  # Check if we need to convert this using DOS-style short mode. If the path
16806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16807  # take no chances and rewrite it.
16808  # Note: m4 eats our [], so we need to use [ and ] instead.
16809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16810  if test "x$has_forbidden_chars" != x; then
16811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16815      # Going to short mode and back again did indeed matter. Since short mode is
16816      # case insensitive, let's make it lowercase to improve readability.
16817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16818      # Now convert it back to Unix-style (cygpath)
16819      input_path=`$CYGPATH -u "$shortmode_path"`
16820      new_path="$input_path"
16821    fi
16822  fi
16823
16824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16825  if test "x$test_cygdrive_prefix" = x; then
16826    # As a simple fix, exclude /usr/bin since it's not a real path.
16827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16829      # a path prefixed by /cygdrive for fixpath to work.
16830      new_path="$CYGWIN_ROOT_PATH$input_path"
16831    fi
16832  fi
16833
16834
16835  if test "x$path" != "x$new_path"; then
16836    with_devkit="$new_path"
16837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16838$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16839  fi
16840
16841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16842
16843  path="$with_devkit"
16844  has_colon=`$ECHO $path | $GREP ^.:`
16845  new_path="$path"
16846  if test "x$has_colon" = x; then
16847    # Not in mixed or Windows style, start by that.
16848    new_path=`cmd //c echo $path`
16849  fi
16850
16851
16852  input_path="$new_path"
16853  # Check if we need to convert this using DOS-style short mode. If the path
16854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16855  # take no chances and rewrite it.
16856  # Note: m4 eats our [], so we need to use [ and ] instead.
16857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16858  if test "x$has_forbidden_chars" != x; then
16859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16861  fi
16862
16863
16864  windows_path="$new_path"
16865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16866    unix_path=`$CYGPATH -u "$windows_path"`
16867    new_path="$unix_path"
16868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16870    new_path="$unix_path"
16871  fi
16872
16873  if test "x$path" != "x$new_path"; then
16874    with_devkit="$new_path"
16875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16876$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16877  fi
16878
16879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16881
16882    else
16883      # We're on a unix platform. Hooray! :)
16884      path="$with_devkit"
16885      has_space=`$ECHO "$path" | $GREP " "`
16886      if test "x$has_space" != x; then
16887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16888$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16889        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16890      fi
16891
16892      # Use eval to expand a potential ~
16893      eval path="$path"
16894      if test ! -f "$path" && test ! -d "$path"; then
16895        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16896      fi
16897
16898      if test -d "$path"; then
16899        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16900      else
16901        dir="`$DIRNAME "$path"`"
16902        base="`$BASENAME "$path"`"
16903        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16904      fi
16905    fi
16906  fi
16907
16908        DEVKIT_ROOT="$with_devkit"
16909        # Check for a meta data info file in the root of the devkit
16910        if test -f "$DEVKIT_ROOT/devkit.info"; then
16911          . $DEVKIT_ROOT/devkit.info
16912          # This potentially sets the following:
16913          # A descriptive name of the devkit
16914
16915  if test "x$DEVKIT_NAME" = x; then
16916    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16917  fi
16918
16919          # Corresponds to --with-extra-path
16920
16921  if test "x$DEVKIT_EXTRA_PATH" = x; then
16922    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16923  fi
16924
16925          # Corresponds to --with-toolchain-path
16926
16927  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16928    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16929  fi
16930
16931          # Corresponds to --with-sysroot
16932
16933  if test "x$DEVKIT_SYSROOT" = x; then
16934    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16935  fi
16936
16937
16938          # Identifies the Visual Studio version in the devkit
16939
16940  if test "x$DEVKIT_VS_VERSION" = x; then
16941    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16942  fi
16943
16944          # The Visual Studio include environment variable
16945
16946  if test "x$DEVKIT_VS_INCLUDE" = x; then
16947    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16948  fi
16949
16950          # The Visual Studio lib environment variable
16951
16952  if test "x$DEVKIT_VS_LIB" = x; then
16953    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16954  fi
16955
16956          # Corresponds to --with-msvcr-dll
16957
16958  if test "x$DEVKIT_MSVCR_DLL" = x; then
16959    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16960  fi
16961
16962          # Corresponds to --with-msvcp-dll
16963
16964  if test "x$DEVKIT_MSVCP_DLL" = x; then
16965    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16966  fi
16967
16968        fi
16969
16970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16971$as_echo_n "checking for devkit... " >&6; }
16972        if test "x$DEVKIT_NAME" != x; then
16973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16974$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16975        else
16976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16977$as_echo "$DEVKIT_ROOT" >&6; }
16978        fi
16979
16980
16981  if test "x$DEVKIT_EXTRA_PATH" != x; then
16982    if test "x$EXTRA_PATH" = x; then
16983      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16984    else
16985      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16986    fi
16987  fi
16988
16989
16990        # Fallback default of just /bin if DEVKIT_PATH is not defined
16991        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16992          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16993        fi
16994
16995  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16996    if test "x$TOOLCHAIN_PATH" = x; then
16997      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16998    else
16999      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17000    fi
17001  fi
17002
17003
17004        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17005        # places for backwards compatiblity.
17006        if test "x$DEVKIT_SYSROOT" != x; then
17007          SYSROOT="$DEVKIT_SYSROOT"
17008        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17009          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17010        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17011          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17012        fi
17013
17014
17015fi
17016
17017
17018  # You can force the sysroot if the sysroot encoded into the compiler tools
17019  # is not correct.
17020
17021# Check whether --with-sys-root was given.
17022if test "${with_sys_root+set}" = set; then :
17023  withval=$with_sys_root; SYSROOT=$with_sys_root
17024
17025fi
17026
17027
17028
17029# Check whether --with-sysroot was given.
17030if test "${with_sysroot+set}" = set; then :
17031  withval=$with_sysroot; SYSROOT=$with_sysroot
17032
17033fi
17034
17035
17036
17037# Check whether --with-tools-dir was given.
17038if test "${with_tools_dir+set}" = set; then :
17039  withval=$with_tools_dir;
17040  if test "x$with_tools_dir" != x; then
17041    if test "x$TOOLCHAIN_PATH" = x; then
17042      TOOLCHAIN_PATH="$with_tools_dir"
17043    else
17044      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17045    fi
17046  fi
17047
17048
17049fi
17050
17051
17052
17053# Check whether --with-toolchain-path was given.
17054if test "${with_toolchain_path+set}" = set; then :
17055  withval=$with_toolchain_path;
17056  if test "x$with_toolchain_path" != x; then
17057    if test "x$TOOLCHAIN_PATH" = x; then
17058      TOOLCHAIN_PATH="$with_toolchain_path"
17059    else
17060      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17061    fi
17062  fi
17063
17064
17065fi
17066
17067
17068
17069# Check whether --with-extra-path was given.
17070if test "${with_extra_path+set}" = set; then :
17071  withval=$with_extra_path;
17072  if test "x$with_extra_path" != x; then
17073    if test "x$EXTRA_PATH" = x; then
17074      EXTRA_PATH="$with_extra_path"
17075    else
17076      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17077    fi
17078  fi
17079
17080
17081fi
17082
17083
17084  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17085    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17086    # If not, detect if Xcode is installed by running xcodebuild -version
17087    # if no Xcode installed, xcodebuild exits with 1
17088    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17089    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17090      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17091      # fall back on the stub binary in /usr/bin/xcodebuild
17092      # Extract the first word of "xcodebuild", so it can be a program name with args.
17093set dummy xcodebuild; ac_word=$2
17094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17095$as_echo_n "checking for $ac_word... " >&6; }
17096if ${ac_cv_path_XCODEBUILD+:} false; then :
17097  $as_echo_n "(cached) " >&6
17098else
17099  case $XCODEBUILD in
17100  [\\/]* | ?:[\\/]*)
17101  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17102  ;;
17103  *)
17104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17105for as_dir in $TOOLCHAIN_PATH
17106do
17107  IFS=$as_save_IFS
17108  test -z "$as_dir" && as_dir=.
17109    for ac_exec_ext in '' $ac_executable_extensions; do
17110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17111    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17113    break 2
17114  fi
17115done
17116  done
17117IFS=$as_save_IFS
17118
17119  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17120  ;;
17121esac
17122fi
17123XCODEBUILD=$ac_cv_path_XCODEBUILD
17124if test -n "$XCODEBUILD"; then
17125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17126$as_echo "$XCODEBUILD" >&6; }
17127else
17128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17129$as_echo "no" >&6; }
17130fi
17131
17132
17133    else
17134      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17135      # when only the command line tools are installed there are no SDKs, so headers
17136      # are copied into the system frameworks
17137      XCODEBUILD=
17138
17139    fi
17140
17141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17142$as_echo_n "checking for sdk name... " >&6; }
17143
17144# Check whether --with-sdk-name was given.
17145if test "${with_sdk_name+set}" = set; then :
17146  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17147
17148fi
17149
17150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17151$as_echo "$SDKNAME" >&6; }
17152
17153    # if toolchain path is specified then don't rely on system headers, they may not compile
17154    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17155    test -z "$TOOLCHAIN_PATH" && \
17156      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17157
17158    if test -z "$SYSROOT"; then
17159      if test -n "$XCODEBUILD"; then
17160        # if we don't have system headers, use default SDK name (last resort)
17161        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17162          SDKNAME=${SDKNAME:-macosx}
17163        fi
17164
17165        if test -n "$SDKNAME"; then
17166          # Call xcodebuild to determine SYSROOT
17167          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17168        fi
17169      else
17170        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17171          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
17172        fi
17173      fi
17174    else
17175      # warn user if --with-sdk-name was also set
17176      if test -n "$with_sdk_name"; then
17177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17178$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17179      fi
17180    fi
17181
17182    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17183      # If no system framework headers, then SYSROOT must be set, or we won't build
17184      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
17185    fi
17186
17187    # Perform a basic sanity test
17188    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17189      if test -z "$SYSROOT"; then
17190        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
17191      else
17192        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17193      fi
17194    fi
17195
17196    # set SDKROOT too, Xcode tools will pick it up
17197    SDKROOT=$SYSROOT
17198
17199  fi
17200
17201  # Prepend the extra path to the global path
17202
17203  if test "x$EXTRA_PATH" != x; then
17204    if test "x$PATH" = x; then
17205      PATH="$EXTRA_PATH"
17206    else
17207      PATH="$EXTRA_PATH:$PATH"
17208    fi
17209  fi
17210
17211
17212  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
17213    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
17214    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
17215  fi
17216
17217  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17218$as_echo_n "checking for sysroot... " >&6; }
17219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17220$as_echo "$SYSROOT" >&6; }
17221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17222$as_echo_n "checking for toolchain path... " >&6; }
17223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17224$as_echo "$TOOLCHAIN_PATH" >&6; }
17225  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17226$as_echo_n "checking for extra path... " >&6; }
17227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17228$as_echo "$EXTRA_PATH" >&6; }
17229
17230
17231# To properly create a configuration name, we need to have the OpenJDK target
17232# and options (variants and debug level) parsed.
17233
17234
17235
17236# Check whether --with-conf-name was given.
17237if test "${with_conf_name+set}" = set; then :
17238  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17239fi
17240
17241
17242  # Test from where we are running configure, in or outside of src root.
17243  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17244$as_echo_n "checking where to store configuration... " >&6; }
17245  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17246      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17247      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17248    # We are running configure from the src root.
17249    # Create a default ./build/target-variant-debuglevel output root.
17250    if test "x${CONF_NAME}" = x; then
17251      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17252$as_echo "in default location" >&6; }
17253      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17254    else
17255      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17256$as_echo "in build directory with custom name" >&6; }
17257    fi
17258    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17259    $MKDIR -p "$OUTPUT_ROOT"
17260    if test ! -d "$OUTPUT_ROOT"; then
17261      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17262    fi
17263  else
17264    # We are running configure from outside of the src dir.
17265    # Then use the current directory as output dir!
17266    # If configuration is situated in normal build directory, just use the build
17267    # directory name as configuration name, otherwise use the complete path.
17268    if test "x${CONF_NAME}" = x; then
17269      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17270    fi
17271    OUTPUT_ROOT="$CURDIR"
17272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17273$as_echo "in current directory" >&6; }
17274
17275    # WARNING: This might be a bad thing to do. You need to be sure you want to
17276    # have a configuration in this directory. Do some sanity checks!
17277
17278    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17279      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17280      # other files
17281      files_present=`$LS $OUTPUT_ROOT`
17282      # Configure has already touched config.log and confdefs.h in the current dir when this check
17283      # is performed.
17284      filtered_files=`$ECHO "$files_present" \
17285          | $SED -e 's/config.log//g' \
17286              -e 's/configure.log//g' \
17287              -e 's/confdefs.h//g' \
17288              -e 's/ //g' \
17289          | $TR -d '\n'`
17290      if test "x$filtered_files" != x; then
17291        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17292$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17293        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17294$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17295        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17296$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17297        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17298$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17299        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17300$as_echo "$as_me: seriously mess up just about everything." >&6;}
17301        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17302$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17303        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17304$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17305        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17306      fi
17307    fi
17308  fi
17309  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17310$as_echo_n "checking what configuration name to use... " >&6; }
17311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17312$as_echo "$CONF_NAME" >&6; }
17313
17314
17315  # Only process if variable expands to non-empty
17316
17317  if test "x$OUTPUT_ROOT" != x; then
17318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17319
17320  # Input might be given as Windows format, start by converting to
17321  # unix format.
17322  path="$OUTPUT_ROOT"
17323  new_path=`$CYGPATH -u "$path"`
17324
17325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17328  # "foo.exe" is OK but "foo" is an error.
17329  #
17330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17331  # It is also a way to make sure we got the proper file name for the real test later on.
17332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17333  if test "x$test_shortpath" = x; then
17334    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17335$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17336    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17337  fi
17338
17339  # Call helper function which possibly converts this using DOS-style short mode.
17340  # If so, the updated path is stored in $new_path.
17341
17342  input_path="$new_path"
17343  # Check if we need to convert this using DOS-style short mode. If the path
17344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17345  # take no chances and rewrite it.
17346  # Note: m4 eats our [], so we need to use [ and ] instead.
17347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17348  if test "x$has_forbidden_chars" != x; then
17349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17353      # Going to short mode and back again did indeed matter. Since short mode is
17354      # case insensitive, let's make it lowercase to improve readability.
17355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17356      # Now convert it back to Unix-style (cygpath)
17357      input_path=`$CYGPATH -u "$shortmode_path"`
17358      new_path="$input_path"
17359    fi
17360  fi
17361
17362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17363  if test "x$test_cygdrive_prefix" = x; then
17364    # As a simple fix, exclude /usr/bin since it's not a real path.
17365    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17367      # a path prefixed by /cygdrive for fixpath to work.
17368      new_path="$CYGWIN_ROOT_PATH$input_path"
17369    fi
17370  fi
17371
17372
17373  if test "x$path" != "x$new_path"; then
17374    OUTPUT_ROOT="$new_path"
17375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17376$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17377  fi
17378
17379    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17380
17381  path="$OUTPUT_ROOT"
17382  has_colon=`$ECHO $path | $GREP ^.:`
17383  new_path="$path"
17384  if test "x$has_colon" = x; then
17385    # Not in mixed or Windows style, start by that.
17386    new_path=`cmd //c echo $path`
17387  fi
17388
17389
17390  input_path="$new_path"
17391  # Check if we need to convert this using DOS-style short mode. If the path
17392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17393  # take no chances and rewrite it.
17394  # Note: m4 eats our [], so we need to use [ and ] instead.
17395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17396  if test "x$has_forbidden_chars" != x; then
17397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17399  fi
17400
17401
17402  windows_path="$new_path"
17403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17404    unix_path=`$CYGPATH -u "$windows_path"`
17405    new_path="$unix_path"
17406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17408    new_path="$unix_path"
17409  fi
17410
17411  if test "x$path" != "x$new_path"; then
17412    OUTPUT_ROOT="$new_path"
17413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17414$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17415  fi
17416
17417  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17418  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17419
17420    else
17421      # We're on a unix platform. Hooray! :)
17422      path="$OUTPUT_ROOT"
17423      has_space=`$ECHO "$path" | $GREP " "`
17424      if test "x$has_space" != x; then
17425        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17426$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17427        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17428      fi
17429
17430      # Use eval to expand a potential ~
17431      eval path="$path"
17432      if test ! -f "$path" && test ! -d "$path"; then
17433        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17434      fi
17435
17436      if test -d "$path"; then
17437        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17438      else
17439        dir="`$DIRNAME "$path"`"
17440        base="`$BASENAME "$path"`"
17441        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17442      fi
17443    fi
17444  fi
17445
17446
17447  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17448  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17449
17450  SPEC=$OUTPUT_ROOT/spec.gmk
17451
17452  CONF_NAME=$CONF_NAME
17453
17454  OUTPUT_ROOT=$OUTPUT_ROOT
17455
17456
17457
17458  # The spec.gmk file contains all variables for the make system.
17459  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17460
17461  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17462  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17463
17464  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17465  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17466
17467  # The compare.sh is used to compare the build output to other builds.
17468  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17469
17470  # The generated Makefile knows where the spec.gmk is and where the source is.
17471  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17472  # which will look for generated configurations
17473  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17474
17475
17476
17477# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17478
17479  for ac_prog in apt-get yum port pkgutil pkgadd
17480do
17481  # Extract the first word of "$ac_prog", so it can be a program name with args.
17482set dummy $ac_prog; ac_word=$2
17483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17484$as_echo_n "checking for $ac_word... " >&6; }
17485if ${ac_cv_prog_PKGHANDLER+:} false; then :
17486  $as_echo_n "(cached) " >&6
17487else
17488  if test -n "$PKGHANDLER"; then
17489  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17490else
17491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17492for as_dir in $PATH
17493do
17494  IFS=$as_save_IFS
17495  test -z "$as_dir" && as_dir=.
17496    for ac_exec_ext in '' $ac_executable_extensions; do
17497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17498    ac_cv_prog_PKGHANDLER="$ac_prog"
17499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17500    break 2
17501  fi
17502done
17503  done
17504IFS=$as_save_IFS
17505
17506fi
17507fi
17508PKGHANDLER=$ac_cv_prog_PKGHANDLER
17509if test -n "$PKGHANDLER"; then
17510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17511$as_echo "$PKGHANDLER" >&6; }
17512else
17513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17514$as_echo "no" >&6; }
17515fi
17516
17517
17518  test -n "$PKGHANDLER" && break
17519done
17520
17521
17522
17523# Setup tools that requires more complex handling, or that is not needed by the configure script.
17524
17525
17526
17527  # Publish this variable in the help.
17528
17529
17530  if [ -z "${MAKE+x}" ]; then
17531    # The variable is not set by user, try to locate tool using the code snippet
17532
17533    # Try our hardest to locate a correct version of GNU make
17534    for ac_prog in gmake
17535do
17536  # Extract the first word of "$ac_prog", so it can be a program name with args.
17537set dummy $ac_prog; ac_word=$2
17538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17539$as_echo_n "checking for $ac_word... " >&6; }
17540if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17541  $as_echo_n "(cached) " >&6
17542else
17543  case $CHECK_GMAKE in
17544  [\\/]* | ?:[\\/]*)
17545  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17546  ;;
17547  *)
17548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17549for as_dir in $PATH
17550do
17551  IFS=$as_save_IFS
17552  test -z "$as_dir" && as_dir=.
17553    for ac_exec_ext in '' $ac_executable_extensions; do
17554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17555    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17557    break 2
17558  fi
17559done
17560  done
17561IFS=$as_save_IFS
17562
17563  ;;
17564esac
17565fi
17566CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17567if test -n "$CHECK_GMAKE"; then
17568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17569$as_echo "$CHECK_GMAKE" >&6; }
17570else
17571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17572$as_echo "no" >&6; }
17573fi
17574
17575
17576  test -n "$CHECK_GMAKE" && break
17577done
17578
17579
17580  MAKE_CANDIDATE=""$CHECK_GMAKE""
17581  DESCRIPTION="gmake in PATH"
17582
17583  # On Cygwin, we require a newer version of make than on other platforms
17584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17585    MAKE_VERSION_EXPR="-e 4\."
17586    MAKE_REQUIRED_VERSION="4.0"
17587   else
17588    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17589    MAKE_REQUIRED_VERSION="3.81"
17590  fi
17591
17592  if test "x$MAKE_CANDIDATE" != x; then
17593    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17594$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17595    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17596    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17597    if test "x$IS_GNU_MAKE" = x; then
17598      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17599$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17600    else
17601      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17602      if test "x$IS_MODERN_MAKE" = x; then
17603        { $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
17604$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;}
17605      else
17606        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17607          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17608            MAKE_EXPECTED_ENV='cygwin'
17609          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17610            MAKE_EXPECTED_ENV='msys'
17611          else
17612            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17613          fi
17614          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17615          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17616        else
17617          # Not relevant for non-Windows
17618          IS_MAKE_CORRECT_ENV=true
17619        fi
17620        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17621          { $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
17622$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;}
17623        else
17624          FOUND_MAKE=$MAKE_CANDIDATE
17625
17626  # Only process if variable expands to non-empty
17627
17628  if test "x$FOUND_MAKE" != x; then
17629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17630
17631  # First separate the path from the arguments. This will split at the first
17632  # space.
17633  complete="$FOUND_MAKE"
17634  path="${complete%% *}"
17635  tmp="$complete EOL"
17636  arguments="${tmp#* }"
17637
17638  # Input might be given as Windows format, start by converting to
17639  # unix format.
17640  new_path=`$CYGPATH -u "$path"`
17641
17642  # Now try to locate executable using which
17643  new_path=`$WHICH "$new_path" 2> /dev/null`
17644  # bat and cmd files are not always considered executable in cygwin causing which
17645  # to not find them
17646  if test "x$new_path" = x \
17647      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17648      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17649    new_path=`$CYGPATH -u "$path"`
17650  fi
17651  if test "x$new_path" = x; then
17652    # Oops. Which didn't find the executable.
17653    # The splitting of arguments from the executable at a space might have been incorrect,
17654    # since paths with space are more likely in Windows. Give it another try with the whole
17655    # argument.
17656    path="$complete"
17657    arguments="EOL"
17658    new_path=`$CYGPATH -u "$path"`
17659    new_path=`$WHICH "$new_path" 2> /dev/null`
17660    # bat and cmd files are not always considered executable in cygwin causing which
17661    # to not find them
17662    if test "x$new_path" = x \
17663        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17664        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17665      new_path=`$CYGPATH -u "$path"`
17666    fi
17667    if test "x$new_path" = x; then
17668      # It's still not found. Now this is an unrecoverable error.
17669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17670$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17671      has_space=`$ECHO "$complete" | $GREP " "`
17672      if test "x$has_space" != x; then
17673        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17674$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17675      fi
17676      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17677    fi
17678  fi
17679
17680  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17681  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17682  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17683  # "foo.exe" is OK but "foo" is an error.
17684  #
17685  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17686  # It is also a way to make sure we got the proper file name for the real test later on.
17687  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17688  if test "x$test_shortpath" = x; then
17689    # Short path failed, file does not exist as specified.
17690    # Try adding .exe or .cmd
17691    if test -f "${new_path}.exe"; then
17692      input_to_shortpath="${new_path}.exe"
17693    elif test -f "${new_path}.cmd"; then
17694      input_to_shortpath="${new_path}.cmd"
17695    else
17696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17697$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17698      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17699$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17700      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17701    fi
17702  else
17703    input_to_shortpath="$new_path"
17704  fi
17705
17706  # Call helper function which possibly converts this using DOS-style short mode.
17707  # If so, the updated path is stored in $new_path.
17708  new_path="$input_to_shortpath"
17709
17710  input_path="$input_to_shortpath"
17711  # Check if we need to convert this using DOS-style short mode. If the path
17712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17713  # take no chances and rewrite it.
17714  # Note: m4 eats our [], so we need to use [ and ] instead.
17715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17716  if test "x$has_forbidden_chars" != x; then
17717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17721      # Going to short mode and back again did indeed matter. Since short mode is
17722      # case insensitive, let's make it lowercase to improve readability.
17723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17724      # Now convert it back to Unix-style (cygpath)
17725      input_path=`$CYGPATH -u "$shortmode_path"`
17726      new_path="$input_path"
17727    fi
17728  fi
17729
17730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17731  if test "x$test_cygdrive_prefix" = x; then
17732    # As a simple fix, exclude /usr/bin since it's not a real path.
17733    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17735      # a path prefixed by /cygdrive for fixpath to work.
17736      new_path="$CYGWIN_ROOT_PATH$input_path"
17737    fi
17738  fi
17739
17740  # remove trailing .exe if any
17741  new_path="${new_path/%.exe/}"
17742
17743    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17744
17745  # First separate the path from the arguments. This will split at the first
17746  # space.
17747  complete="$FOUND_MAKE"
17748  path="${complete%% *}"
17749  tmp="$complete EOL"
17750  arguments="${tmp#* }"
17751
17752  # Input might be given as Windows format, start by converting to
17753  # unix format.
17754  new_path="$path"
17755
17756  windows_path="$new_path"
17757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17758    unix_path=`$CYGPATH -u "$windows_path"`
17759    new_path="$unix_path"
17760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17762    new_path="$unix_path"
17763  fi
17764
17765
17766  # Now try to locate executable using which
17767  new_path=`$WHICH "$new_path" 2> /dev/null`
17768
17769  if test "x$new_path" = x; then
17770    # Oops. Which didn't find the executable.
17771    # The splitting of arguments from the executable at a space might have been incorrect,
17772    # since paths with space are more likely in Windows. Give it another try with the whole
17773    # argument.
17774    path="$complete"
17775    arguments="EOL"
17776    new_path="$path"
17777
17778  windows_path="$new_path"
17779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17780    unix_path=`$CYGPATH -u "$windows_path"`
17781    new_path="$unix_path"
17782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17784    new_path="$unix_path"
17785  fi
17786
17787
17788    new_path=`$WHICH "$new_path" 2> /dev/null`
17789    # bat and cmd files are not always considered executable in MSYS causing which
17790    # to not find them
17791    if test "x$new_path" = x \
17792        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17793        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17794      new_path="$path"
17795
17796  windows_path="$new_path"
17797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17798    unix_path=`$CYGPATH -u "$windows_path"`
17799    new_path="$unix_path"
17800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17802    new_path="$unix_path"
17803  fi
17804
17805    fi
17806
17807    if test "x$new_path" = x; then
17808      # It's still not found. Now this is an unrecoverable error.
17809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17810$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17811      has_space=`$ECHO "$complete" | $GREP " "`
17812      if test "x$has_space" != x; then
17813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17815      fi
17816      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17817    fi
17818  fi
17819
17820  # Now new_path has a complete unix path to the binary
17821  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17822    # Keep paths in /bin as-is, but remove trailing .exe if any
17823    new_path="${new_path/%.exe/}"
17824    # Do not save /bin paths to all_fixpath_prefixes!
17825  else
17826    # Not in mixed or Windows style, start by that.
17827    new_path=`cmd //c echo $new_path`
17828
17829  input_path="$new_path"
17830  # Check if we need to convert this using DOS-style short mode. If the path
17831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17832  # take no chances and rewrite it.
17833  # Note: m4 eats our [], so we need to use [ and ] instead.
17834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17835  if test "x$has_forbidden_chars" != x; then
17836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17838  fi
17839
17840    # Output is in $new_path
17841
17842  windows_path="$new_path"
17843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17844    unix_path=`$CYGPATH -u "$windows_path"`
17845    new_path="$unix_path"
17846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17848    new_path="$unix_path"
17849  fi
17850
17851    # remove trailing .exe if any
17852    new_path="${new_path/%.exe/}"
17853
17854    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17855    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17856  fi
17857
17858    else
17859      # We're on a unix platform. Hooray! :)
17860      # First separate the path from the arguments. This will split at the first
17861      # space.
17862      complete="$FOUND_MAKE"
17863      path="${complete%% *}"
17864      tmp="$complete EOL"
17865      arguments="${tmp#* }"
17866
17867      # Cannot rely on the command "which" here since it doesn't always work.
17868      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17869      if test -z "$is_absolute_path"; then
17870        # Path to executable is not absolute. Find it.
17871        IFS_save="$IFS"
17872        IFS=:
17873        for p in $PATH; do
17874          if test -f "$p/$path" && test -x "$p/$path"; then
17875            new_path="$p/$path"
17876            break
17877          fi
17878        done
17879        IFS="$IFS_save"
17880      else
17881        # This is an absolute path, we can use it without further modifications.
17882        new_path="$path"
17883      fi
17884
17885      if test "x$new_path" = x; then
17886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17887$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17888        has_space=`$ECHO "$complete" | $GREP " "`
17889        if test "x$has_space" != x; then
17890          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17891$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17892        fi
17893        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17894      fi
17895    fi
17896
17897    # Now join together the path and the arguments once again
17898    if test "x$arguments" != xEOL; then
17899      new_complete="$new_path ${arguments% *}"
17900    else
17901      new_complete="$new_path"
17902    fi
17903
17904    if test "x$complete" != "x$new_complete"; then
17905      FOUND_MAKE="$new_complete"
17906      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17907$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17908    fi
17909  fi
17910
17911        fi
17912      fi
17913    fi
17914  fi
17915
17916
17917    if test "x$FOUND_MAKE" = x; then
17918      for ac_prog in make
17919do
17920  # Extract the first word of "$ac_prog", so it can be a program name with args.
17921set dummy $ac_prog; ac_word=$2
17922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17923$as_echo_n "checking for $ac_word... " >&6; }
17924if ${ac_cv_path_CHECK_MAKE+:} false; then :
17925  $as_echo_n "(cached) " >&6
17926else
17927  case $CHECK_MAKE in
17928  [\\/]* | ?:[\\/]*)
17929  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17930  ;;
17931  *)
17932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17933for as_dir in $PATH
17934do
17935  IFS=$as_save_IFS
17936  test -z "$as_dir" && as_dir=.
17937    for ac_exec_ext in '' $ac_executable_extensions; do
17938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17939    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17941    break 2
17942  fi
17943done
17944  done
17945IFS=$as_save_IFS
17946
17947  ;;
17948esac
17949fi
17950CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17951if test -n "$CHECK_MAKE"; then
17952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17953$as_echo "$CHECK_MAKE" >&6; }
17954else
17955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17956$as_echo "no" >&6; }
17957fi
17958
17959
17960  test -n "$CHECK_MAKE" && break
17961done
17962
17963
17964  MAKE_CANDIDATE=""$CHECK_MAKE""
17965  DESCRIPTION="make in PATH"
17966
17967  # On Cygwin, we require a newer version of make than on other platforms
17968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17969    MAKE_VERSION_EXPR="-e 4\."
17970    MAKE_REQUIRED_VERSION="4.0"
17971   else
17972    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17973    MAKE_REQUIRED_VERSION="3.81"
17974  fi
17975
17976  if test "x$MAKE_CANDIDATE" != x; then
17977    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17978$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17979    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17980    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17981    if test "x$IS_GNU_MAKE" = x; then
17982      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17983$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17984    else
17985      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17986      if test "x$IS_MODERN_MAKE" = x; then
17987        { $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
17988$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;}
17989      else
17990        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17991          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17992            MAKE_EXPECTED_ENV='cygwin'
17993          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17994            MAKE_EXPECTED_ENV='msys'
17995          else
17996            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17997          fi
17998          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17999          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18000        else
18001          # Not relevant for non-Windows
18002          IS_MAKE_CORRECT_ENV=true
18003        fi
18004        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18005          { $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
18006$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;}
18007        else
18008          FOUND_MAKE=$MAKE_CANDIDATE
18009
18010  # Only process if variable expands to non-empty
18011
18012  if test "x$FOUND_MAKE" != x; then
18013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18014
18015  # First separate the path from the arguments. This will split at the first
18016  # space.
18017  complete="$FOUND_MAKE"
18018  path="${complete%% *}"
18019  tmp="$complete EOL"
18020  arguments="${tmp#* }"
18021
18022  # Input might be given as Windows format, start by converting to
18023  # unix format.
18024  new_path=`$CYGPATH -u "$path"`
18025
18026  # Now try to locate executable using which
18027  new_path=`$WHICH "$new_path" 2> /dev/null`
18028  # bat and cmd files are not always considered executable in cygwin causing which
18029  # to not find them
18030  if test "x$new_path" = x \
18031      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18032      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18033    new_path=`$CYGPATH -u "$path"`
18034  fi
18035  if test "x$new_path" = x; then
18036    # Oops. Which didn't find the executable.
18037    # The splitting of arguments from the executable at a space might have been incorrect,
18038    # since paths with space are more likely in Windows. Give it another try with the whole
18039    # argument.
18040    path="$complete"
18041    arguments="EOL"
18042    new_path=`$CYGPATH -u "$path"`
18043    new_path=`$WHICH "$new_path" 2> /dev/null`
18044    # bat and cmd files are not always considered executable in cygwin causing which
18045    # to not find them
18046    if test "x$new_path" = x \
18047        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18048        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18049      new_path=`$CYGPATH -u "$path"`
18050    fi
18051    if test "x$new_path" = x; then
18052      # It's still not found. Now this is an unrecoverable error.
18053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18054$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18055      has_space=`$ECHO "$complete" | $GREP " "`
18056      if test "x$has_space" != x; then
18057        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18058$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18059      fi
18060      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18061    fi
18062  fi
18063
18064  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18065  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18066  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18067  # "foo.exe" is OK but "foo" is an error.
18068  #
18069  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18070  # It is also a way to make sure we got the proper file name for the real test later on.
18071  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18072  if test "x$test_shortpath" = x; then
18073    # Short path failed, file does not exist as specified.
18074    # Try adding .exe or .cmd
18075    if test -f "${new_path}.exe"; then
18076      input_to_shortpath="${new_path}.exe"
18077    elif test -f "${new_path}.cmd"; then
18078      input_to_shortpath="${new_path}.cmd"
18079    else
18080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18081$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18082      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18083$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18084      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18085    fi
18086  else
18087    input_to_shortpath="$new_path"
18088  fi
18089
18090  # Call helper function which possibly converts this using DOS-style short mode.
18091  # If so, the updated path is stored in $new_path.
18092  new_path="$input_to_shortpath"
18093
18094  input_path="$input_to_shortpath"
18095  # Check if we need to convert this using DOS-style short mode. If the path
18096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18097  # take no chances and rewrite it.
18098  # Note: m4 eats our [], so we need to use [ and ] instead.
18099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18100  if test "x$has_forbidden_chars" != x; then
18101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18102    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18103    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18104    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18105      # Going to short mode and back again did indeed matter. Since short mode is
18106      # case insensitive, let's make it lowercase to improve readability.
18107      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18108      # Now convert it back to Unix-style (cygpath)
18109      input_path=`$CYGPATH -u "$shortmode_path"`
18110      new_path="$input_path"
18111    fi
18112  fi
18113
18114  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18115  if test "x$test_cygdrive_prefix" = x; then
18116    # As a simple fix, exclude /usr/bin since it's not a real path.
18117    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18118      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18119      # a path prefixed by /cygdrive for fixpath to work.
18120      new_path="$CYGWIN_ROOT_PATH$input_path"
18121    fi
18122  fi
18123
18124  # remove trailing .exe if any
18125  new_path="${new_path/%.exe/}"
18126
18127    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18128
18129  # First separate the path from the arguments. This will split at the first
18130  # space.
18131  complete="$FOUND_MAKE"
18132  path="${complete%% *}"
18133  tmp="$complete EOL"
18134  arguments="${tmp#* }"
18135
18136  # Input might be given as Windows format, start by converting to
18137  # unix format.
18138  new_path="$path"
18139
18140  windows_path="$new_path"
18141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18142    unix_path=`$CYGPATH -u "$windows_path"`
18143    new_path="$unix_path"
18144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18146    new_path="$unix_path"
18147  fi
18148
18149
18150  # Now try to locate executable using which
18151  new_path=`$WHICH "$new_path" 2> /dev/null`
18152
18153  if test "x$new_path" = x; then
18154    # Oops. Which didn't find the executable.
18155    # The splitting of arguments from the executable at a space might have been incorrect,
18156    # since paths with space are more likely in Windows. Give it another try with the whole
18157    # argument.
18158    path="$complete"
18159    arguments="EOL"
18160    new_path="$path"
18161
18162  windows_path="$new_path"
18163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18164    unix_path=`$CYGPATH -u "$windows_path"`
18165    new_path="$unix_path"
18166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18168    new_path="$unix_path"
18169  fi
18170
18171
18172    new_path=`$WHICH "$new_path" 2> /dev/null`
18173    # bat and cmd files are not always considered executable in MSYS causing which
18174    # to not find them
18175    if test "x$new_path" = x \
18176        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18177        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18178      new_path="$path"
18179
18180  windows_path="$new_path"
18181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18182    unix_path=`$CYGPATH -u "$windows_path"`
18183    new_path="$unix_path"
18184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18186    new_path="$unix_path"
18187  fi
18188
18189    fi
18190
18191    if test "x$new_path" = x; then
18192      # It's still not found. Now this is an unrecoverable error.
18193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18194$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18195      has_space=`$ECHO "$complete" | $GREP " "`
18196      if test "x$has_space" != x; then
18197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18199      fi
18200      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18201    fi
18202  fi
18203
18204  # Now new_path has a complete unix path to the binary
18205  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18206    # Keep paths in /bin as-is, but remove trailing .exe if any
18207    new_path="${new_path/%.exe/}"
18208    # Do not save /bin paths to all_fixpath_prefixes!
18209  else
18210    # Not in mixed or Windows style, start by that.
18211    new_path=`cmd //c echo $new_path`
18212
18213  input_path="$new_path"
18214  # Check if we need to convert this using DOS-style short mode. If the path
18215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18216  # take no chances and rewrite it.
18217  # Note: m4 eats our [], so we need to use [ and ] instead.
18218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18219  if test "x$has_forbidden_chars" != x; then
18220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18222  fi
18223
18224    # Output is in $new_path
18225
18226  windows_path="$new_path"
18227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18228    unix_path=`$CYGPATH -u "$windows_path"`
18229    new_path="$unix_path"
18230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18232    new_path="$unix_path"
18233  fi
18234
18235    # remove trailing .exe if any
18236    new_path="${new_path/%.exe/}"
18237
18238    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18239    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18240  fi
18241
18242    else
18243      # We're on a unix platform. Hooray! :)
18244      # First separate the path from the arguments. This will split at the first
18245      # space.
18246      complete="$FOUND_MAKE"
18247      path="${complete%% *}"
18248      tmp="$complete EOL"
18249      arguments="${tmp#* }"
18250
18251      # Cannot rely on the command "which" here since it doesn't always work.
18252      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18253      if test -z "$is_absolute_path"; then
18254        # Path to executable is not absolute. Find it.
18255        IFS_save="$IFS"
18256        IFS=:
18257        for p in $PATH; do
18258          if test -f "$p/$path" && test -x "$p/$path"; then
18259            new_path="$p/$path"
18260            break
18261          fi
18262        done
18263        IFS="$IFS_save"
18264      else
18265        # This is an absolute path, we can use it without further modifications.
18266        new_path="$path"
18267      fi
18268
18269      if test "x$new_path" = x; then
18270        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18271$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18272        has_space=`$ECHO "$complete" | $GREP " "`
18273        if test "x$has_space" != x; then
18274          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18275$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18276        fi
18277        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18278      fi
18279    fi
18280
18281    # Now join together the path and the arguments once again
18282    if test "x$arguments" != xEOL; then
18283      new_complete="$new_path ${arguments% *}"
18284    else
18285      new_complete="$new_path"
18286    fi
18287
18288    if test "x$complete" != "x$new_complete"; then
18289      FOUND_MAKE="$new_complete"
18290      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18291$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18292    fi
18293  fi
18294
18295        fi
18296      fi
18297    fi
18298  fi
18299
18300    fi
18301
18302    if test "x$FOUND_MAKE" = x; then
18303      if test "x$TOOLCHAIN_PATH" != x; then
18304        # We have a toolchain path, check that as well before giving up.
18305        OLD_PATH=$PATH
18306        PATH=$TOOLCHAIN_PATH:$PATH
18307        for ac_prog in gmake
18308do
18309  # Extract the first word of "$ac_prog", so it can be a program name with args.
18310set dummy $ac_prog; ac_word=$2
18311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18312$as_echo_n "checking for $ac_word... " >&6; }
18313if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18314  $as_echo_n "(cached) " >&6
18315else
18316  case $CHECK_TOOLSDIR_GMAKE in
18317  [\\/]* | ?:[\\/]*)
18318  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18319  ;;
18320  *)
18321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18322for as_dir in $PATH
18323do
18324  IFS=$as_save_IFS
18325  test -z "$as_dir" && as_dir=.
18326    for ac_exec_ext in '' $ac_executable_extensions; do
18327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18328    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18330    break 2
18331  fi
18332done
18333  done
18334IFS=$as_save_IFS
18335
18336  ;;
18337esac
18338fi
18339CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18340if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18342$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18343else
18344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18345$as_echo "no" >&6; }
18346fi
18347
18348
18349  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18350done
18351
18352
18353  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18354  DESCRIPTION="gmake in tools-dir"
18355
18356  # On Cygwin, we require a newer version of make than on other platforms
18357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18358    MAKE_VERSION_EXPR="-e 4\."
18359    MAKE_REQUIRED_VERSION="4.0"
18360   else
18361    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18362    MAKE_REQUIRED_VERSION="3.81"
18363  fi
18364
18365  if test "x$MAKE_CANDIDATE" != x; then
18366    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18367$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18368    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18369    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18370    if test "x$IS_GNU_MAKE" = x; then
18371      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18372$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18373    else
18374      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18375      if test "x$IS_MODERN_MAKE" = x; then
18376        { $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
18377$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;}
18378      else
18379        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18380          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18381            MAKE_EXPECTED_ENV='cygwin'
18382          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18383            MAKE_EXPECTED_ENV='msys'
18384          else
18385            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18386          fi
18387          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18388          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18389        else
18390          # Not relevant for non-Windows
18391          IS_MAKE_CORRECT_ENV=true
18392        fi
18393        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18394          { $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
18395$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;}
18396        else
18397          FOUND_MAKE=$MAKE_CANDIDATE
18398
18399  # Only process if variable expands to non-empty
18400
18401  if test "x$FOUND_MAKE" != x; then
18402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18403
18404  # First separate the path from the arguments. This will split at the first
18405  # space.
18406  complete="$FOUND_MAKE"
18407  path="${complete%% *}"
18408  tmp="$complete EOL"
18409  arguments="${tmp#* }"
18410
18411  # Input might be given as Windows format, start by converting to
18412  # unix format.
18413  new_path=`$CYGPATH -u "$path"`
18414
18415  # Now try to locate executable using which
18416  new_path=`$WHICH "$new_path" 2> /dev/null`
18417  # bat and cmd files are not always considered executable in cygwin causing which
18418  # to not find them
18419  if test "x$new_path" = x \
18420      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18421      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18422    new_path=`$CYGPATH -u "$path"`
18423  fi
18424  if test "x$new_path" = x; then
18425    # Oops. Which didn't find the executable.
18426    # The splitting of arguments from the executable at a space might have been incorrect,
18427    # since paths with space are more likely in Windows. Give it another try with the whole
18428    # argument.
18429    path="$complete"
18430    arguments="EOL"
18431    new_path=`$CYGPATH -u "$path"`
18432    new_path=`$WHICH "$new_path" 2> /dev/null`
18433    # bat and cmd files are not always considered executable in cygwin causing which
18434    # to not find them
18435    if test "x$new_path" = x \
18436        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18437        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18438      new_path=`$CYGPATH -u "$path"`
18439    fi
18440    if test "x$new_path" = x; then
18441      # It's still not found. Now this is an unrecoverable error.
18442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18443$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18444      has_space=`$ECHO "$complete" | $GREP " "`
18445      if test "x$has_space" != x; then
18446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18448      fi
18449      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18450    fi
18451  fi
18452
18453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18456  # "foo.exe" is OK but "foo" is an error.
18457  #
18458  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18459  # It is also a way to make sure we got the proper file name for the real test later on.
18460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18461  if test "x$test_shortpath" = x; then
18462    # Short path failed, file does not exist as specified.
18463    # Try adding .exe or .cmd
18464    if test -f "${new_path}.exe"; then
18465      input_to_shortpath="${new_path}.exe"
18466    elif test -f "${new_path}.cmd"; then
18467      input_to_shortpath="${new_path}.cmd"
18468    else
18469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18470$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18471      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18472$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18473      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18474    fi
18475  else
18476    input_to_shortpath="$new_path"
18477  fi
18478
18479  # Call helper function which possibly converts this using DOS-style short mode.
18480  # If so, the updated path is stored in $new_path.
18481  new_path="$input_to_shortpath"
18482
18483  input_path="$input_to_shortpath"
18484  # Check if we need to convert this using DOS-style short mode. If the path
18485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18486  # take no chances and rewrite it.
18487  # Note: m4 eats our [], so we need to use [ and ] instead.
18488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18489  if test "x$has_forbidden_chars" != x; then
18490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18494      # Going to short mode and back again did indeed matter. Since short mode is
18495      # case insensitive, let's make it lowercase to improve readability.
18496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18497      # Now convert it back to Unix-style (cygpath)
18498      input_path=`$CYGPATH -u "$shortmode_path"`
18499      new_path="$input_path"
18500    fi
18501  fi
18502
18503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18504  if test "x$test_cygdrive_prefix" = x; then
18505    # As a simple fix, exclude /usr/bin since it's not a real path.
18506    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18508      # a path prefixed by /cygdrive for fixpath to work.
18509      new_path="$CYGWIN_ROOT_PATH$input_path"
18510    fi
18511  fi
18512
18513  # remove trailing .exe if any
18514  new_path="${new_path/%.exe/}"
18515
18516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18517
18518  # First separate the path from the arguments. This will split at the first
18519  # space.
18520  complete="$FOUND_MAKE"
18521  path="${complete%% *}"
18522  tmp="$complete EOL"
18523  arguments="${tmp#* }"
18524
18525  # Input might be given as Windows format, start by converting to
18526  # unix format.
18527  new_path="$path"
18528
18529  windows_path="$new_path"
18530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18531    unix_path=`$CYGPATH -u "$windows_path"`
18532    new_path="$unix_path"
18533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18535    new_path="$unix_path"
18536  fi
18537
18538
18539  # Now try to locate executable using which
18540  new_path=`$WHICH "$new_path" 2> /dev/null`
18541
18542  if test "x$new_path" = x; then
18543    # Oops. Which didn't find the executable.
18544    # The splitting of arguments from the executable at a space might have been incorrect,
18545    # since paths with space are more likely in Windows. Give it another try with the whole
18546    # argument.
18547    path="$complete"
18548    arguments="EOL"
18549    new_path="$path"
18550
18551  windows_path="$new_path"
18552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18553    unix_path=`$CYGPATH -u "$windows_path"`
18554    new_path="$unix_path"
18555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18557    new_path="$unix_path"
18558  fi
18559
18560
18561    new_path=`$WHICH "$new_path" 2> /dev/null`
18562    # bat and cmd files are not always considered executable in MSYS causing which
18563    # to not find them
18564    if test "x$new_path" = x \
18565        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18566        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18567      new_path="$path"
18568
18569  windows_path="$new_path"
18570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18571    unix_path=`$CYGPATH -u "$windows_path"`
18572    new_path="$unix_path"
18573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18575    new_path="$unix_path"
18576  fi
18577
18578    fi
18579
18580    if test "x$new_path" = x; then
18581      # It's still not found. Now this is an unrecoverable error.
18582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18583$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18584      has_space=`$ECHO "$complete" | $GREP " "`
18585      if test "x$has_space" != x; then
18586        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18587$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18588      fi
18589      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18590    fi
18591  fi
18592
18593  # Now new_path has a complete unix path to the binary
18594  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18595    # Keep paths in /bin as-is, but remove trailing .exe if any
18596    new_path="${new_path/%.exe/}"
18597    # Do not save /bin paths to all_fixpath_prefixes!
18598  else
18599    # Not in mixed or Windows style, start by that.
18600    new_path=`cmd //c echo $new_path`
18601
18602  input_path="$new_path"
18603  # Check if we need to convert this using DOS-style short mode. If the path
18604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18605  # take no chances and rewrite it.
18606  # Note: m4 eats our [], so we need to use [ and ] instead.
18607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18608  if test "x$has_forbidden_chars" != x; then
18609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18611  fi
18612
18613    # Output is in $new_path
18614
18615  windows_path="$new_path"
18616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18617    unix_path=`$CYGPATH -u "$windows_path"`
18618    new_path="$unix_path"
18619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18621    new_path="$unix_path"
18622  fi
18623
18624    # remove trailing .exe if any
18625    new_path="${new_path/%.exe/}"
18626
18627    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18628    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18629  fi
18630
18631    else
18632      # We're on a unix platform. Hooray! :)
18633      # First separate the path from the arguments. This will split at the first
18634      # space.
18635      complete="$FOUND_MAKE"
18636      path="${complete%% *}"
18637      tmp="$complete EOL"
18638      arguments="${tmp#* }"
18639
18640      # Cannot rely on the command "which" here since it doesn't always work.
18641      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18642      if test -z "$is_absolute_path"; then
18643        # Path to executable is not absolute. Find it.
18644        IFS_save="$IFS"
18645        IFS=:
18646        for p in $PATH; do
18647          if test -f "$p/$path" && test -x "$p/$path"; then
18648            new_path="$p/$path"
18649            break
18650          fi
18651        done
18652        IFS="$IFS_save"
18653      else
18654        # This is an absolute path, we can use it without further modifications.
18655        new_path="$path"
18656      fi
18657
18658      if test "x$new_path" = x; then
18659        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18660$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18661        has_space=`$ECHO "$complete" | $GREP " "`
18662        if test "x$has_space" != x; then
18663          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18664$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18665        fi
18666        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18667      fi
18668    fi
18669
18670    # Now join together the path and the arguments once again
18671    if test "x$arguments" != xEOL; then
18672      new_complete="$new_path ${arguments% *}"
18673    else
18674      new_complete="$new_path"
18675    fi
18676
18677    if test "x$complete" != "x$new_complete"; then
18678      FOUND_MAKE="$new_complete"
18679      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18680$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18681    fi
18682  fi
18683
18684        fi
18685      fi
18686    fi
18687  fi
18688
18689        if test "x$FOUND_MAKE" = x; then
18690          for ac_prog in make
18691do
18692  # Extract the first word of "$ac_prog", so it can be a program name with args.
18693set dummy $ac_prog; ac_word=$2
18694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18695$as_echo_n "checking for $ac_word... " >&6; }
18696if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18697  $as_echo_n "(cached) " >&6
18698else
18699  case $CHECK_TOOLSDIR_MAKE in
18700  [\\/]* | ?:[\\/]*)
18701  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18702  ;;
18703  *)
18704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18705for as_dir in $PATH
18706do
18707  IFS=$as_save_IFS
18708  test -z "$as_dir" && as_dir=.
18709    for ac_exec_ext in '' $ac_executable_extensions; do
18710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18711    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18713    break 2
18714  fi
18715done
18716  done
18717IFS=$as_save_IFS
18718
18719  ;;
18720esac
18721fi
18722CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18723if test -n "$CHECK_TOOLSDIR_MAKE"; then
18724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18725$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18726else
18727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18728$as_echo "no" >&6; }
18729fi
18730
18731
18732  test -n "$CHECK_TOOLSDIR_MAKE" && break
18733done
18734
18735
18736  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18737  DESCRIPTION="make in tools-dir"
18738
18739  # On Cygwin, we require a newer version of make than on other platforms
18740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18741    MAKE_VERSION_EXPR="-e 4\."
18742    MAKE_REQUIRED_VERSION="4.0"
18743   else
18744    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18745    MAKE_REQUIRED_VERSION="3.81"
18746  fi
18747
18748  if test "x$MAKE_CANDIDATE" != x; then
18749    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18750$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18751    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18752    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18753    if test "x$IS_GNU_MAKE" = x; then
18754      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18755$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18756    else
18757      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18758      if test "x$IS_MODERN_MAKE" = x; then
18759        { $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
18760$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;}
18761      else
18762        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18763          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18764            MAKE_EXPECTED_ENV='cygwin'
18765          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18766            MAKE_EXPECTED_ENV='msys'
18767          else
18768            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18769          fi
18770          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18771          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18772        else
18773          # Not relevant for non-Windows
18774          IS_MAKE_CORRECT_ENV=true
18775        fi
18776        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18777          { $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
18778$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;}
18779        else
18780          FOUND_MAKE=$MAKE_CANDIDATE
18781
18782  # Only process if variable expands to non-empty
18783
18784  if test "x$FOUND_MAKE" != x; then
18785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18786
18787  # First separate the path from the arguments. This will split at the first
18788  # space.
18789  complete="$FOUND_MAKE"
18790  path="${complete%% *}"
18791  tmp="$complete EOL"
18792  arguments="${tmp#* }"
18793
18794  # Input might be given as Windows format, start by converting to
18795  # unix format.
18796  new_path=`$CYGPATH -u "$path"`
18797
18798  # Now try to locate executable using which
18799  new_path=`$WHICH "$new_path" 2> /dev/null`
18800  # bat and cmd files are not always considered executable in cygwin causing which
18801  # to not find them
18802  if test "x$new_path" = x \
18803      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18804      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18805    new_path=`$CYGPATH -u "$path"`
18806  fi
18807  if test "x$new_path" = x; then
18808    # Oops. Which didn't find the executable.
18809    # The splitting of arguments from the executable at a space might have been incorrect,
18810    # since paths with space are more likely in Windows. Give it another try with the whole
18811    # argument.
18812    path="$complete"
18813    arguments="EOL"
18814    new_path=`$CYGPATH -u "$path"`
18815    new_path=`$WHICH "$new_path" 2> /dev/null`
18816    # bat and cmd files are not always considered executable in cygwin causing which
18817    # to not find them
18818    if test "x$new_path" = x \
18819        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18820        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18821      new_path=`$CYGPATH -u "$path"`
18822    fi
18823    if test "x$new_path" = x; then
18824      # It's still not found. Now this is an unrecoverable error.
18825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18826$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18827      has_space=`$ECHO "$complete" | $GREP " "`
18828      if test "x$has_space" != x; then
18829        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18830$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18831      fi
18832      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18833    fi
18834  fi
18835
18836  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18837  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18838  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18839  # "foo.exe" is OK but "foo" is an error.
18840  #
18841  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18842  # It is also a way to make sure we got the proper file name for the real test later on.
18843  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18844  if test "x$test_shortpath" = x; then
18845    # Short path failed, file does not exist as specified.
18846    # Try adding .exe or .cmd
18847    if test -f "${new_path}.exe"; then
18848      input_to_shortpath="${new_path}.exe"
18849    elif test -f "${new_path}.cmd"; then
18850      input_to_shortpath="${new_path}.cmd"
18851    else
18852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18853$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18854      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18855$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18856      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18857    fi
18858  else
18859    input_to_shortpath="$new_path"
18860  fi
18861
18862  # Call helper function which possibly converts this using DOS-style short mode.
18863  # If so, the updated path is stored in $new_path.
18864  new_path="$input_to_shortpath"
18865
18866  input_path="$input_to_shortpath"
18867  # Check if we need to convert this using DOS-style short mode. If the path
18868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18869  # take no chances and rewrite it.
18870  # Note: m4 eats our [], so we need to use [ and ] instead.
18871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18872  if test "x$has_forbidden_chars" != x; then
18873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18877      # Going to short mode and back again did indeed matter. Since short mode is
18878      # case insensitive, let's make it lowercase to improve readability.
18879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18880      # Now convert it back to Unix-style (cygpath)
18881      input_path=`$CYGPATH -u "$shortmode_path"`
18882      new_path="$input_path"
18883    fi
18884  fi
18885
18886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18887  if test "x$test_cygdrive_prefix" = x; then
18888    # As a simple fix, exclude /usr/bin since it's not a real path.
18889    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18891      # a path prefixed by /cygdrive for fixpath to work.
18892      new_path="$CYGWIN_ROOT_PATH$input_path"
18893    fi
18894  fi
18895
18896  # remove trailing .exe if any
18897  new_path="${new_path/%.exe/}"
18898
18899    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18900
18901  # First separate the path from the arguments. This will split at the first
18902  # space.
18903  complete="$FOUND_MAKE"
18904  path="${complete%% *}"
18905  tmp="$complete EOL"
18906  arguments="${tmp#* }"
18907
18908  # Input might be given as Windows format, start by converting to
18909  # unix format.
18910  new_path="$path"
18911
18912  windows_path="$new_path"
18913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18914    unix_path=`$CYGPATH -u "$windows_path"`
18915    new_path="$unix_path"
18916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18918    new_path="$unix_path"
18919  fi
18920
18921
18922  # Now try to locate executable using which
18923  new_path=`$WHICH "$new_path" 2> /dev/null`
18924
18925  if test "x$new_path" = x; then
18926    # Oops. Which didn't find the executable.
18927    # The splitting of arguments from the executable at a space might have been incorrect,
18928    # since paths with space are more likely in Windows. Give it another try with the whole
18929    # argument.
18930    path="$complete"
18931    arguments="EOL"
18932    new_path="$path"
18933
18934  windows_path="$new_path"
18935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18936    unix_path=`$CYGPATH -u "$windows_path"`
18937    new_path="$unix_path"
18938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18940    new_path="$unix_path"
18941  fi
18942
18943
18944    new_path=`$WHICH "$new_path" 2> /dev/null`
18945    # bat and cmd files are not always considered executable in MSYS causing which
18946    # to not find them
18947    if test "x$new_path" = x \
18948        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18949        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18950      new_path="$path"
18951
18952  windows_path="$new_path"
18953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18954    unix_path=`$CYGPATH -u "$windows_path"`
18955    new_path="$unix_path"
18956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18958    new_path="$unix_path"
18959  fi
18960
18961    fi
18962
18963    if test "x$new_path" = x; then
18964      # It's still not found. Now this is an unrecoverable error.
18965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18966$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18967      has_space=`$ECHO "$complete" | $GREP " "`
18968      if test "x$has_space" != x; then
18969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18971      fi
18972      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18973    fi
18974  fi
18975
18976  # Now new_path has a complete unix path to the binary
18977  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18978    # Keep paths in /bin as-is, but remove trailing .exe if any
18979    new_path="${new_path/%.exe/}"
18980    # Do not save /bin paths to all_fixpath_prefixes!
18981  else
18982    # Not in mixed or Windows style, start by that.
18983    new_path=`cmd //c echo $new_path`
18984
18985  input_path="$new_path"
18986  # Check if we need to convert this using DOS-style short mode. If the path
18987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18988  # take no chances and rewrite it.
18989  # Note: m4 eats our [], so we need to use [ and ] instead.
18990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18991  if test "x$has_forbidden_chars" != x; then
18992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18994  fi
18995
18996    # Output is in $new_path
18997
18998  windows_path="$new_path"
18999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19000    unix_path=`$CYGPATH -u "$windows_path"`
19001    new_path="$unix_path"
19002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19004    new_path="$unix_path"
19005  fi
19006
19007    # remove trailing .exe if any
19008    new_path="${new_path/%.exe/}"
19009
19010    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19011    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19012  fi
19013
19014    else
19015      # We're on a unix platform. Hooray! :)
19016      # First separate the path from the arguments. This will split at the first
19017      # space.
19018      complete="$FOUND_MAKE"
19019      path="${complete%% *}"
19020      tmp="$complete EOL"
19021      arguments="${tmp#* }"
19022
19023      # Cannot rely on the command "which" here since it doesn't always work.
19024      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19025      if test -z "$is_absolute_path"; then
19026        # Path to executable is not absolute. Find it.
19027        IFS_save="$IFS"
19028        IFS=:
19029        for p in $PATH; do
19030          if test -f "$p/$path" && test -x "$p/$path"; then
19031            new_path="$p/$path"
19032            break
19033          fi
19034        done
19035        IFS="$IFS_save"
19036      else
19037        # This is an absolute path, we can use it without further modifications.
19038        new_path="$path"
19039      fi
19040
19041      if test "x$new_path" = x; then
19042        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19043$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19044        has_space=`$ECHO "$complete" | $GREP " "`
19045        if test "x$has_space" != x; then
19046          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19047$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19048        fi
19049        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19050      fi
19051    fi
19052
19053    # Now join together the path and the arguments once again
19054    if test "x$arguments" != xEOL; then
19055      new_complete="$new_path ${arguments% *}"
19056    else
19057      new_complete="$new_path"
19058    fi
19059
19060    if test "x$complete" != "x$new_complete"; then
19061      FOUND_MAKE="$new_complete"
19062      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19063$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19064    fi
19065  fi
19066
19067        fi
19068      fi
19069    fi
19070  fi
19071
19072        fi
19073        PATH=$OLD_PATH
19074      fi
19075    fi
19076
19077    if test "x$FOUND_MAKE" = x; then
19078      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
19079    fi
19080
19081  else
19082    # The variable is set, but is it from the command line or the environment?
19083
19084    # Try to remove the string !MAKE! from our list.
19085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19087      # If it failed, the variable was not from the command line. Ignore it,
19088      # but warn the user (except for BASH, which is always set by the calling BASH).
19089      if test "xMAKE" != xBASH; then
19090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19091$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19092      fi
19093      # Try to locate tool using the code snippet
19094
19095    # Try our hardest to locate a correct version of GNU make
19096    for ac_prog in gmake
19097do
19098  # Extract the first word of "$ac_prog", so it can be a program name with args.
19099set dummy $ac_prog; ac_word=$2
19100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19101$as_echo_n "checking for $ac_word... " >&6; }
19102if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19103  $as_echo_n "(cached) " >&6
19104else
19105  case $CHECK_GMAKE in
19106  [\\/]* | ?:[\\/]*)
19107  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19108  ;;
19109  *)
19110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19111for as_dir in $PATH
19112do
19113  IFS=$as_save_IFS
19114  test -z "$as_dir" && as_dir=.
19115    for ac_exec_ext in '' $ac_executable_extensions; do
19116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19117    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19119    break 2
19120  fi
19121done
19122  done
19123IFS=$as_save_IFS
19124
19125  ;;
19126esac
19127fi
19128CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19129if test -n "$CHECK_GMAKE"; then
19130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19131$as_echo "$CHECK_GMAKE" >&6; }
19132else
19133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19134$as_echo "no" >&6; }
19135fi
19136
19137
19138  test -n "$CHECK_GMAKE" && break
19139done
19140
19141
19142  MAKE_CANDIDATE=""$CHECK_GMAKE""
19143  DESCRIPTION="gmake in PATH"
19144
19145  # On Cygwin, we require a newer version of make than on other platforms
19146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19147    MAKE_VERSION_EXPR="-e 4\."
19148    MAKE_REQUIRED_VERSION="4.0"
19149   else
19150    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19151    MAKE_REQUIRED_VERSION="3.81"
19152  fi
19153
19154  if test "x$MAKE_CANDIDATE" != x; then
19155    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19156$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19157    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19158    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19159    if test "x$IS_GNU_MAKE" = x; then
19160      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19161$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19162    else
19163      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19164      if test "x$IS_MODERN_MAKE" = x; then
19165        { $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
19166$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;}
19167      else
19168        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19169          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19170            MAKE_EXPECTED_ENV='cygwin'
19171          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19172            MAKE_EXPECTED_ENV='msys'
19173          else
19174            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19175          fi
19176          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19177          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19178        else
19179          # Not relevant for non-Windows
19180          IS_MAKE_CORRECT_ENV=true
19181        fi
19182        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19183          { $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
19184$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;}
19185        else
19186          FOUND_MAKE=$MAKE_CANDIDATE
19187
19188  # Only process if variable expands to non-empty
19189
19190  if test "x$FOUND_MAKE" != x; then
19191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19192
19193  # First separate the path from the arguments. This will split at the first
19194  # space.
19195  complete="$FOUND_MAKE"
19196  path="${complete%% *}"
19197  tmp="$complete EOL"
19198  arguments="${tmp#* }"
19199
19200  # Input might be given as Windows format, start by converting to
19201  # unix format.
19202  new_path=`$CYGPATH -u "$path"`
19203
19204  # Now try to locate executable using which
19205  new_path=`$WHICH "$new_path" 2> /dev/null`
19206  # bat and cmd files are not always considered executable in cygwin causing which
19207  # to not find them
19208  if test "x$new_path" = x \
19209      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19210      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19211    new_path=`$CYGPATH -u "$path"`
19212  fi
19213  if test "x$new_path" = x; then
19214    # Oops. Which didn't find the executable.
19215    # The splitting of arguments from the executable at a space might have been incorrect,
19216    # since paths with space are more likely in Windows. Give it another try with the whole
19217    # argument.
19218    path="$complete"
19219    arguments="EOL"
19220    new_path=`$CYGPATH -u "$path"`
19221    new_path=`$WHICH "$new_path" 2> /dev/null`
19222    # bat and cmd files are not always considered executable in cygwin causing which
19223    # to not find them
19224    if test "x$new_path" = x \
19225        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19226        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19227      new_path=`$CYGPATH -u "$path"`
19228    fi
19229    if test "x$new_path" = x; then
19230      # It's still not found. Now this is an unrecoverable error.
19231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19232$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19233      has_space=`$ECHO "$complete" | $GREP " "`
19234      if test "x$has_space" != x; then
19235        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19236$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19237      fi
19238      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19239    fi
19240  fi
19241
19242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19245  # "foo.exe" is OK but "foo" is an error.
19246  #
19247  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19248  # It is also a way to make sure we got the proper file name for the real test later on.
19249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19250  if test "x$test_shortpath" = x; then
19251    # Short path failed, file does not exist as specified.
19252    # Try adding .exe or .cmd
19253    if test -f "${new_path}.exe"; then
19254      input_to_shortpath="${new_path}.exe"
19255    elif test -f "${new_path}.cmd"; then
19256      input_to_shortpath="${new_path}.cmd"
19257    else
19258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19259$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19260      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19261$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19262      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19263    fi
19264  else
19265    input_to_shortpath="$new_path"
19266  fi
19267
19268  # Call helper function which possibly converts this using DOS-style short mode.
19269  # If so, the updated path is stored in $new_path.
19270  new_path="$input_to_shortpath"
19271
19272  input_path="$input_to_shortpath"
19273  # Check if we need to convert this using DOS-style short mode. If the path
19274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19275  # take no chances and rewrite it.
19276  # Note: m4 eats our [], so we need to use [ and ] instead.
19277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19278  if test "x$has_forbidden_chars" != x; then
19279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19283      # Going to short mode and back again did indeed matter. Since short mode is
19284      # case insensitive, let's make it lowercase to improve readability.
19285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19286      # Now convert it back to Unix-style (cygpath)
19287      input_path=`$CYGPATH -u "$shortmode_path"`
19288      new_path="$input_path"
19289    fi
19290  fi
19291
19292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19293  if test "x$test_cygdrive_prefix" = x; then
19294    # As a simple fix, exclude /usr/bin since it's not a real path.
19295    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19297      # a path prefixed by /cygdrive for fixpath to work.
19298      new_path="$CYGWIN_ROOT_PATH$input_path"
19299    fi
19300  fi
19301
19302  # remove trailing .exe if any
19303  new_path="${new_path/%.exe/}"
19304
19305    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19306
19307  # First separate the path from the arguments. This will split at the first
19308  # space.
19309  complete="$FOUND_MAKE"
19310  path="${complete%% *}"
19311  tmp="$complete EOL"
19312  arguments="${tmp#* }"
19313
19314  # Input might be given as Windows format, start by converting to
19315  # unix format.
19316  new_path="$path"
19317
19318  windows_path="$new_path"
19319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19320    unix_path=`$CYGPATH -u "$windows_path"`
19321    new_path="$unix_path"
19322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19324    new_path="$unix_path"
19325  fi
19326
19327
19328  # Now try to locate executable using which
19329  new_path=`$WHICH "$new_path" 2> /dev/null`
19330
19331  if test "x$new_path" = x; then
19332    # Oops. Which didn't find the executable.
19333    # The splitting of arguments from the executable at a space might have been incorrect,
19334    # since paths with space are more likely in Windows. Give it another try with the whole
19335    # argument.
19336    path="$complete"
19337    arguments="EOL"
19338    new_path="$path"
19339
19340  windows_path="$new_path"
19341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19342    unix_path=`$CYGPATH -u "$windows_path"`
19343    new_path="$unix_path"
19344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19346    new_path="$unix_path"
19347  fi
19348
19349
19350    new_path=`$WHICH "$new_path" 2> /dev/null`
19351    # bat and cmd files are not always considered executable in MSYS causing which
19352    # to not find them
19353    if test "x$new_path" = x \
19354        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19355        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19356      new_path="$path"
19357
19358  windows_path="$new_path"
19359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19360    unix_path=`$CYGPATH -u "$windows_path"`
19361    new_path="$unix_path"
19362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19364    new_path="$unix_path"
19365  fi
19366
19367    fi
19368
19369    if test "x$new_path" = x; then
19370      # It's still not found. Now this is an unrecoverable error.
19371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19372$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19373      has_space=`$ECHO "$complete" | $GREP " "`
19374      if test "x$has_space" != x; then
19375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19377      fi
19378      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19379    fi
19380  fi
19381
19382  # Now new_path has a complete unix path to the binary
19383  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19384    # Keep paths in /bin as-is, but remove trailing .exe if any
19385    new_path="${new_path/%.exe/}"
19386    # Do not save /bin paths to all_fixpath_prefixes!
19387  else
19388    # Not in mixed or Windows style, start by that.
19389    new_path=`cmd //c echo $new_path`
19390
19391  input_path="$new_path"
19392  # Check if we need to convert this using DOS-style short mode. If the path
19393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19394  # take no chances and rewrite it.
19395  # Note: m4 eats our [], so we need to use [ and ] instead.
19396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19397  if test "x$has_forbidden_chars" != x; then
19398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19400  fi
19401
19402    # Output is in $new_path
19403
19404  windows_path="$new_path"
19405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19406    unix_path=`$CYGPATH -u "$windows_path"`
19407    new_path="$unix_path"
19408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19410    new_path="$unix_path"
19411  fi
19412
19413    # remove trailing .exe if any
19414    new_path="${new_path/%.exe/}"
19415
19416    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19417    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19418  fi
19419
19420    else
19421      # We're on a unix platform. Hooray! :)
19422      # First separate the path from the arguments. This will split at the first
19423      # space.
19424      complete="$FOUND_MAKE"
19425      path="${complete%% *}"
19426      tmp="$complete EOL"
19427      arguments="${tmp#* }"
19428
19429      # Cannot rely on the command "which" here since it doesn't always work.
19430      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19431      if test -z "$is_absolute_path"; then
19432        # Path to executable is not absolute. Find it.
19433        IFS_save="$IFS"
19434        IFS=:
19435        for p in $PATH; do
19436          if test -f "$p/$path" && test -x "$p/$path"; then
19437            new_path="$p/$path"
19438            break
19439          fi
19440        done
19441        IFS="$IFS_save"
19442      else
19443        # This is an absolute path, we can use it without further modifications.
19444        new_path="$path"
19445      fi
19446
19447      if test "x$new_path" = x; then
19448        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19449$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19450        has_space=`$ECHO "$complete" | $GREP " "`
19451        if test "x$has_space" != x; then
19452          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19453$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19454        fi
19455        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19456      fi
19457    fi
19458
19459    # Now join together the path and the arguments once again
19460    if test "x$arguments" != xEOL; then
19461      new_complete="$new_path ${arguments% *}"
19462    else
19463      new_complete="$new_path"
19464    fi
19465
19466    if test "x$complete" != "x$new_complete"; then
19467      FOUND_MAKE="$new_complete"
19468      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19469$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19470    fi
19471  fi
19472
19473        fi
19474      fi
19475    fi
19476  fi
19477
19478
19479    if test "x$FOUND_MAKE" = x; then
19480      for ac_prog in make
19481do
19482  # Extract the first word of "$ac_prog", so it can be a program name with args.
19483set dummy $ac_prog; ac_word=$2
19484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19485$as_echo_n "checking for $ac_word... " >&6; }
19486if ${ac_cv_path_CHECK_MAKE+:} false; then :
19487  $as_echo_n "(cached) " >&6
19488else
19489  case $CHECK_MAKE in
19490  [\\/]* | ?:[\\/]*)
19491  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19492  ;;
19493  *)
19494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19495for as_dir in $PATH
19496do
19497  IFS=$as_save_IFS
19498  test -z "$as_dir" && as_dir=.
19499    for ac_exec_ext in '' $ac_executable_extensions; do
19500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19501    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19503    break 2
19504  fi
19505done
19506  done
19507IFS=$as_save_IFS
19508
19509  ;;
19510esac
19511fi
19512CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19513if test -n "$CHECK_MAKE"; then
19514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19515$as_echo "$CHECK_MAKE" >&6; }
19516else
19517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19518$as_echo "no" >&6; }
19519fi
19520
19521
19522  test -n "$CHECK_MAKE" && break
19523done
19524
19525
19526  MAKE_CANDIDATE=""$CHECK_MAKE""
19527  DESCRIPTION="make in PATH"
19528
19529  # On Cygwin, we require a newer version of make than on other platforms
19530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19531    MAKE_VERSION_EXPR="-e 4\."
19532    MAKE_REQUIRED_VERSION="4.0"
19533   else
19534    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19535    MAKE_REQUIRED_VERSION="3.81"
19536  fi
19537
19538  if test "x$MAKE_CANDIDATE" != x; then
19539    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19540$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19541    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19542    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19543    if test "x$IS_GNU_MAKE" = x; then
19544      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19545$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19546    else
19547      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19548      if test "x$IS_MODERN_MAKE" = x; then
19549        { $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
19550$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;}
19551      else
19552        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19553          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19554            MAKE_EXPECTED_ENV='cygwin'
19555          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19556            MAKE_EXPECTED_ENV='msys'
19557          else
19558            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19559          fi
19560          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19561          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19562        else
19563          # Not relevant for non-Windows
19564          IS_MAKE_CORRECT_ENV=true
19565        fi
19566        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19567          { $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
19568$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;}
19569        else
19570          FOUND_MAKE=$MAKE_CANDIDATE
19571
19572  # Only process if variable expands to non-empty
19573
19574  if test "x$FOUND_MAKE" != x; then
19575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19576
19577  # First separate the path from the arguments. This will split at the first
19578  # space.
19579  complete="$FOUND_MAKE"
19580  path="${complete%% *}"
19581  tmp="$complete EOL"
19582  arguments="${tmp#* }"
19583
19584  # Input might be given as Windows format, start by converting to
19585  # unix format.
19586  new_path=`$CYGPATH -u "$path"`
19587
19588  # Now try to locate executable using which
19589  new_path=`$WHICH "$new_path" 2> /dev/null`
19590  # bat and cmd files are not always considered executable in cygwin causing which
19591  # to not find them
19592  if test "x$new_path" = x \
19593      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19594      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19595    new_path=`$CYGPATH -u "$path"`
19596  fi
19597  if test "x$new_path" = x; then
19598    # Oops. Which didn't find the executable.
19599    # The splitting of arguments from the executable at a space might have been incorrect,
19600    # since paths with space are more likely in Windows. Give it another try with the whole
19601    # argument.
19602    path="$complete"
19603    arguments="EOL"
19604    new_path=`$CYGPATH -u "$path"`
19605    new_path=`$WHICH "$new_path" 2> /dev/null`
19606    # bat and cmd files are not always considered executable in cygwin causing which
19607    # to not find them
19608    if test "x$new_path" = x \
19609        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19610        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19611      new_path=`$CYGPATH -u "$path"`
19612    fi
19613    if test "x$new_path" = x; then
19614      # It's still not found. Now this is an unrecoverable error.
19615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19616$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19617      has_space=`$ECHO "$complete" | $GREP " "`
19618      if test "x$has_space" != x; then
19619        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19620$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19621      fi
19622      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19623    fi
19624  fi
19625
19626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19629  # "foo.exe" is OK but "foo" is an error.
19630  #
19631  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19632  # It is also a way to make sure we got the proper file name for the real test later on.
19633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19634  if test "x$test_shortpath" = x; then
19635    # Short path failed, file does not exist as specified.
19636    # Try adding .exe or .cmd
19637    if test -f "${new_path}.exe"; then
19638      input_to_shortpath="${new_path}.exe"
19639    elif test -f "${new_path}.cmd"; then
19640      input_to_shortpath="${new_path}.cmd"
19641    else
19642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19643$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19644      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19645$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19646      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19647    fi
19648  else
19649    input_to_shortpath="$new_path"
19650  fi
19651
19652  # Call helper function which possibly converts this using DOS-style short mode.
19653  # If so, the updated path is stored in $new_path.
19654  new_path="$input_to_shortpath"
19655
19656  input_path="$input_to_shortpath"
19657  # Check if we need to convert this using DOS-style short mode. If the path
19658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19659  # take no chances and rewrite it.
19660  # Note: m4 eats our [], so we need to use [ and ] instead.
19661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19662  if test "x$has_forbidden_chars" != x; then
19663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19667      # Going to short mode and back again did indeed matter. Since short mode is
19668      # case insensitive, let's make it lowercase to improve readability.
19669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19670      # Now convert it back to Unix-style (cygpath)
19671      input_path=`$CYGPATH -u "$shortmode_path"`
19672      new_path="$input_path"
19673    fi
19674  fi
19675
19676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19677  if test "x$test_cygdrive_prefix" = x; then
19678    # As a simple fix, exclude /usr/bin since it's not a real path.
19679    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19681      # a path prefixed by /cygdrive for fixpath to work.
19682      new_path="$CYGWIN_ROOT_PATH$input_path"
19683    fi
19684  fi
19685
19686  # remove trailing .exe if any
19687  new_path="${new_path/%.exe/}"
19688
19689    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19690
19691  # First separate the path from the arguments. This will split at the first
19692  # space.
19693  complete="$FOUND_MAKE"
19694  path="${complete%% *}"
19695  tmp="$complete EOL"
19696  arguments="${tmp#* }"
19697
19698  # Input might be given as Windows format, start by converting to
19699  # unix format.
19700  new_path="$path"
19701
19702  windows_path="$new_path"
19703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19704    unix_path=`$CYGPATH -u "$windows_path"`
19705    new_path="$unix_path"
19706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19708    new_path="$unix_path"
19709  fi
19710
19711
19712  # Now try to locate executable using which
19713  new_path=`$WHICH "$new_path" 2> /dev/null`
19714
19715  if test "x$new_path" = x; then
19716    # Oops. Which didn't find the executable.
19717    # The splitting of arguments from the executable at a space might have been incorrect,
19718    # since paths with space are more likely in Windows. Give it another try with the whole
19719    # argument.
19720    path="$complete"
19721    arguments="EOL"
19722    new_path="$path"
19723
19724  windows_path="$new_path"
19725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19726    unix_path=`$CYGPATH -u "$windows_path"`
19727    new_path="$unix_path"
19728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19730    new_path="$unix_path"
19731  fi
19732
19733
19734    new_path=`$WHICH "$new_path" 2> /dev/null`
19735    # bat and cmd files are not always considered executable in MSYS causing which
19736    # to not find them
19737    if test "x$new_path" = x \
19738        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19739        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19740      new_path="$path"
19741
19742  windows_path="$new_path"
19743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19744    unix_path=`$CYGPATH -u "$windows_path"`
19745    new_path="$unix_path"
19746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19748    new_path="$unix_path"
19749  fi
19750
19751    fi
19752
19753    if test "x$new_path" = x; then
19754      # It's still not found. Now this is an unrecoverable error.
19755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19756$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19757      has_space=`$ECHO "$complete" | $GREP " "`
19758      if test "x$has_space" != x; then
19759        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19760$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19761      fi
19762      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19763    fi
19764  fi
19765
19766  # Now new_path has a complete unix path to the binary
19767  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19768    # Keep paths in /bin as-is, but remove trailing .exe if any
19769    new_path="${new_path/%.exe/}"
19770    # Do not save /bin paths to all_fixpath_prefixes!
19771  else
19772    # Not in mixed or Windows style, start by that.
19773    new_path=`cmd //c echo $new_path`
19774
19775  input_path="$new_path"
19776  # Check if we need to convert this using DOS-style short mode. If the path
19777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19778  # take no chances and rewrite it.
19779  # Note: m4 eats our [], so we need to use [ and ] instead.
19780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19781  if test "x$has_forbidden_chars" != x; then
19782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19784  fi
19785
19786    # Output is in $new_path
19787
19788  windows_path="$new_path"
19789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19790    unix_path=`$CYGPATH -u "$windows_path"`
19791    new_path="$unix_path"
19792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19794    new_path="$unix_path"
19795  fi
19796
19797    # remove trailing .exe if any
19798    new_path="${new_path/%.exe/}"
19799
19800    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19801    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19802  fi
19803
19804    else
19805      # We're on a unix platform. Hooray! :)
19806      # First separate the path from the arguments. This will split at the first
19807      # space.
19808      complete="$FOUND_MAKE"
19809      path="${complete%% *}"
19810      tmp="$complete EOL"
19811      arguments="${tmp#* }"
19812
19813      # Cannot rely on the command "which" here since it doesn't always work.
19814      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19815      if test -z "$is_absolute_path"; then
19816        # Path to executable is not absolute. Find it.
19817        IFS_save="$IFS"
19818        IFS=:
19819        for p in $PATH; do
19820          if test -f "$p/$path" && test -x "$p/$path"; then
19821            new_path="$p/$path"
19822            break
19823          fi
19824        done
19825        IFS="$IFS_save"
19826      else
19827        # This is an absolute path, we can use it without further modifications.
19828        new_path="$path"
19829      fi
19830
19831      if test "x$new_path" = x; then
19832        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19833$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19834        has_space=`$ECHO "$complete" | $GREP " "`
19835        if test "x$has_space" != x; then
19836          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19837$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19838        fi
19839        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19840      fi
19841    fi
19842
19843    # Now join together the path and the arguments once again
19844    if test "x$arguments" != xEOL; then
19845      new_complete="$new_path ${arguments% *}"
19846    else
19847      new_complete="$new_path"
19848    fi
19849
19850    if test "x$complete" != "x$new_complete"; then
19851      FOUND_MAKE="$new_complete"
19852      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19853$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19854    fi
19855  fi
19856
19857        fi
19858      fi
19859    fi
19860  fi
19861
19862    fi
19863
19864    if test "x$FOUND_MAKE" = x; then
19865      if test "x$TOOLCHAIN_PATH" != x; then
19866        # We have a toolchain path, check that as well before giving up.
19867        OLD_PATH=$PATH
19868        PATH=$TOOLCHAIN_PATH:$PATH
19869        for ac_prog in gmake
19870do
19871  # Extract the first word of "$ac_prog", so it can be a program name with args.
19872set dummy $ac_prog; ac_word=$2
19873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19874$as_echo_n "checking for $ac_word... " >&6; }
19875if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19876  $as_echo_n "(cached) " >&6
19877else
19878  case $CHECK_TOOLSDIR_GMAKE in
19879  [\\/]* | ?:[\\/]*)
19880  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19881  ;;
19882  *)
19883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19884for as_dir in $PATH
19885do
19886  IFS=$as_save_IFS
19887  test -z "$as_dir" && as_dir=.
19888    for ac_exec_ext in '' $ac_executable_extensions; do
19889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19890    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19892    break 2
19893  fi
19894done
19895  done
19896IFS=$as_save_IFS
19897
19898  ;;
19899esac
19900fi
19901CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19902if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19904$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19905else
19906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19907$as_echo "no" >&6; }
19908fi
19909
19910
19911  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19912done
19913
19914
19915  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19916  DESCRIPTION="gmake in tools-dir"
19917
19918  # On Cygwin, we require a newer version of make than on other platforms
19919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19920    MAKE_VERSION_EXPR="-e 4\."
19921    MAKE_REQUIRED_VERSION="4.0"
19922   else
19923    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19924    MAKE_REQUIRED_VERSION="3.81"
19925  fi
19926
19927  if test "x$MAKE_CANDIDATE" != x; then
19928    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19929$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19930    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19931    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19932    if test "x$IS_GNU_MAKE" = x; then
19933      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19934$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19935    else
19936      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19937      if test "x$IS_MODERN_MAKE" = x; then
19938        { $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
19939$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;}
19940      else
19941        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19942          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19943            MAKE_EXPECTED_ENV='cygwin'
19944          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19945            MAKE_EXPECTED_ENV='msys'
19946          else
19947            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19948          fi
19949          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19950          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19951        else
19952          # Not relevant for non-Windows
19953          IS_MAKE_CORRECT_ENV=true
19954        fi
19955        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19956          { $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
19957$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;}
19958        else
19959          FOUND_MAKE=$MAKE_CANDIDATE
19960
19961  # Only process if variable expands to non-empty
19962
19963  if test "x$FOUND_MAKE" != x; then
19964    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19965
19966  # First separate the path from the arguments. This will split at the first
19967  # space.
19968  complete="$FOUND_MAKE"
19969  path="${complete%% *}"
19970  tmp="$complete EOL"
19971  arguments="${tmp#* }"
19972
19973  # Input might be given as Windows format, start by converting to
19974  # unix format.
19975  new_path=`$CYGPATH -u "$path"`
19976
19977  # Now try to locate executable using which
19978  new_path=`$WHICH "$new_path" 2> /dev/null`
19979  # bat and cmd files are not always considered executable in cygwin causing which
19980  # to not find them
19981  if test "x$new_path" = x \
19982      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19983      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19984    new_path=`$CYGPATH -u "$path"`
19985  fi
19986  if test "x$new_path" = x; then
19987    # Oops. Which didn't find the executable.
19988    # The splitting of arguments from the executable at a space might have been incorrect,
19989    # since paths with space are more likely in Windows. Give it another try with the whole
19990    # argument.
19991    path="$complete"
19992    arguments="EOL"
19993    new_path=`$CYGPATH -u "$path"`
19994    new_path=`$WHICH "$new_path" 2> /dev/null`
19995    # bat and cmd files are not always considered executable in cygwin causing which
19996    # to not find them
19997    if test "x$new_path" = x \
19998        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19999        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20000      new_path=`$CYGPATH -u "$path"`
20001    fi
20002    if test "x$new_path" = x; then
20003      # It's still not found. Now this is an unrecoverable error.
20004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20005$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20006      has_space=`$ECHO "$complete" | $GREP " "`
20007      if test "x$has_space" != x; then
20008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20010      fi
20011      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20012    fi
20013  fi
20014
20015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20018  # "foo.exe" is OK but "foo" is an error.
20019  #
20020  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20021  # It is also a way to make sure we got the proper file name for the real test later on.
20022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20023  if test "x$test_shortpath" = x; then
20024    # Short path failed, file does not exist as specified.
20025    # Try adding .exe or .cmd
20026    if test -f "${new_path}.exe"; then
20027      input_to_shortpath="${new_path}.exe"
20028    elif test -f "${new_path}.cmd"; then
20029      input_to_shortpath="${new_path}.cmd"
20030    else
20031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20032$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20033      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20034$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20035      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20036    fi
20037  else
20038    input_to_shortpath="$new_path"
20039  fi
20040
20041  # Call helper function which possibly converts this using DOS-style short mode.
20042  # If so, the updated path is stored in $new_path.
20043  new_path="$input_to_shortpath"
20044
20045  input_path="$input_to_shortpath"
20046  # Check if we need to convert this using DOS-style short mode. If the path
20047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20048  # take no chances and rewrite it.
20049  # Note: m4 eats our [], so we need to use [ and ] instead.
20050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20051  if test "x$has_forbidden_chars" != x; then
20052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20056      # Going to short mode and back again did indeed matter. Since short mode is
20057      # case insensitive, let's make it lowercase to improve readability.
20058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20059      # Now convert it back to Unix-style (cygpath)
20060      input_path=`$CYGPATH -u "$shortmode_path"`
20061      new_path="$input_path"
20062    fi
20063  fi
20064
20065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20066  if test "x$test_cygdrive_prefix" = x; then
20067    # As a simple fix, exclude /usr/bin since it's not a real path.
20068    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20070      # a path prefixed by /cygdrive for fixpath to work.
20071      new_path="$CYGWIN_ROOT_PATH$input_path"
20072    fi
20073  fi
20074
20075  # remove trailing .exe if any
20076  new_path="${new_path/%.exe/}"
20077
20078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20079
20080  # First separate the path from the arguments. This will split at the first
20081  # space.
20082  complete="$FOUND_MAKE"
20083  path="${complete%% *}"
20084  tmp="$complete EOL"
20085  arguments="${tmp#* }"
20086
20087  # Input might be given as Windows format, start by converting to
20088  # unix format.
20089  new_path="$path"
20090
20091  windows_path="$new_path"
20092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20093    unix_path=`$CYGPATH -u "$windows_path"`
20094    new_path="$unix_path"
20095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20097    new_path="$unix_path"
20098  fi
20099
20100
20101  # Now try to locate executable using which
20102  new_path=`$WHICH "$new_path" 2> /dev/null`
20103
20104  if test "x$new_path" = x; then
20105    # Oops. Which didn't find the executable.
20106    # The splitting of arguments from the executable at a space might have been incorrect,
20107    # since paths with space are more likely in Windows. Give it another try with the whole
20108    # argument.
20109    path="$complete"
20110    arguments="EOL"
20111    new_path="$path"
20112
20113  windows_path="$new_path"
20114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20115    unix_path=`$CYGPATH -u "$windows_path"`
20116    new_path="$unix_path"
20117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20119    new_path="$unix_path"
20120  fi
20121
20122
20123    new_path=`$WHICH "$new_path" 2> /dev/null`
20124    # bat and cmd files are not always considered executable in MSYS causing which
20125    # to not find them
20126    if test "x$new_path" = x \
20127        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20128        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20129      new_path="$path"
20130
20131  windows_path="$new_path"
20132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20133    unix_path=`$CYGPATH -u "$windows_path"`
20134    new_path="$unix_path"
20135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20137    new_path="$unix_path"
20138  fi
20139
20140    fi
20141
20142    if test "x$new_path" = x; then
20143      # It's still not found. Now this is an unrecoverable error.
20144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20145$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20146      has_space=`$ECHO "$complete" | $GREP " "`
20147      if test "x$has_space" != x; then
20148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20150      fi
20151      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20152    fi
20153  fi
20154
20155  # Now new_path has a complete unix path to the binary
20156  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20157    # Keep paths in /bin as-is, but remove trailing .exe if any
20158    new_path="${new_path/%.exe/}"
20159    # Do not save /bin paths to all_fixpath_prefixes!
20160  else
20161    # Not in mixed or Windows style, start by that.
20162    new_path=`cmd //c echo $new_path`
20163
20164  input_path="$new_path"
20165  # Check if we need to convert this using DOS-style short mode. If the path
20166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20167  # take no chances and rewrite it.
20168  # Note: m4 eats our [], so we need to use [ and ] instead.
20169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20170  if test "x$has_forbidden_chars" != x; then
20171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20173  fi
20174
20175    # Output is in $new_path
20176
20177  windows_path="$new_path"
20178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20179    unix_path=`$CYGPATH -u "$windows_path"`
20180    new_path="$unix_path"
20181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20183    new_path="$unix_path"
20184  fi
20185
20186    # remove trailing .exe if any
20187    new_path="${new_path/%.exe/}"
20188
20189    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20190    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20191  fi
20192
20193    else
20194      # We're on a unix platform. Hooray! :)
20195      # First separate the path from the arguments. This will split at the first
20196      # space.
20197      complete="$FOUND_MAKE"
20198      path="${complete%% *}"
20199      tmp="$complete EOL"
20200      arguments="${tmp#* }"
20201
20202      # Cannot rely on the command "which" here since it doesn't always work.
20203      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20204      if test -z "$is_absolute_path"; then
20205        # Path to executable is not absolute. Find it.
20206        IFS_save="$IFS"
20207        IFS=:
20208        for p in $PATH; do
20209          if test -f "$p/$path" && test -x "$p/$path"; then
20210            new_path="$p/$path"
20211            break
20212          fi
20213        done
20214        IFS="$IFS_save"
20215      else
20216        # This is an absolute path, we can use it without further modifications.
20217        new_path="$path"
20218      fi
20219
20220      if test "x$new_path" = x; then
20221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20222$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20223        has_space=`$ECHO "$complete" | $GREP " "`
20224        if test "x$has_space" != x; then
20225          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20226$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20227        fi
20228        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20229      fi
20230    fi
20231
20232    # Now join together the path and the arguments once again
20233    if test "x$arguments" != xEOL; then
20234      new_complete="$new_path ${arguments% *}"
20235    else
20236      new_complete="$new_path"
20237    fi
20238
20239    if test "x$complete" != "x$new_complete"; then
20240      FOUND_MAKE="$new_complete"
20241      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20242$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20243    fi
20244  fi
20245
20246        fi
20247      fi
20248    fi
20249  fi
20250
20251        if test "x$FOUND_MAKE" = x; then
20252          for ac_prog in make
20253do
20254  # Extract the first word of "$ac_prog", so it can be a program name with args.
20255set dummy $ac_prog; ac_word=$2
20256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20257$as_echo_n "checking for $ac_word... " >&6; }
20258if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20259  $as_echo_n "(cached) " >&6
20260else
20261  case $CHECK_TOOLSDIR_MAKE in
20262  [\\/]* | ?:[\\/]*)
20263  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20264  ;;
20265  *)
20266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20267for as_dir in $PATH
20268do
20269  IFS=$as_save_IFS
20270  test -z "$as_dir" && as_dir=.
20271    for ac_exec_ext in '' $ac_executable_extensions; do
20272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20273    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20275    break 2
20276  fi
20277done
20278  done
20279IFS=$as_save_IFS
20280
20281  ;;
20282esac
20283fi
20284CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20285if test -n "$CHECK_TOOLSDIR_MAKE"; then
20286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20287$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20288else
20289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20290$as_echo "no" >&6; }
20291fi
20292
20293
20294  test -n "$CHECK_TOOLSDIR_MAKE" && break
20295done
20296
20297
20298  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20299  DESCRIPTION="make in tools-dir"
20300
20301  # On Cygwin, we require a newer version of make than on other platforms
20302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20303    MAKE_VERSION_EXPR="-e 4\."
20304    MAKE_REQUIRED_VERSION="4.0"
20305   else
20306    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20307    MAKE_REQUIRED_VERSION="3.81"
20308  fi
20309
20310  if test "x$MAKE_CANDIDATE" != x; then
20311    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20312$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20313    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20314    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20315    if test "x$IS_GNU_MAKE" = x; then
20316      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20317$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20318    else
20319      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20320      if test "x$IS_MODERN_MAKE" = x; then
20321        { $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
20322$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;}
20323      else
20324        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20325          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20326            MAKE_EXPECTED_ENV='cygwin'
20327          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20328            MAKE_EXPECTED_ENV='msys'
20329          else
20330            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20331          fi
20332          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20333          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20334        else
20335          # Not relevant for non-Windows
20336          IS_MAKE_CORRECT_ENV=true
20337        fi
20338        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20339          { $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
20340$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;}
20341        else
20342          FOUND_MAKE=$MAKE_CANDIDATE
20343
20344  # Only process if variable expands to non-empty
20345
20346  if test "x$FOUND_MAKE" != x; then
20347    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20348
20349  # First separate the path from the arguments. This will split at the first
20350  # space.
20351  complete="$FOUND_MAKE"
20352  path="${complete%% *}"
20353  tmp="$complete EOL"
20354  arguments="${tmp#* }"
20355
20356  # Input might be given as Windows format, start by converting to
20357  # unix format.
20358  new_path=`$CYGPATH -u "$path"`
20359
20360  # Now try to locate executable using which
20361  new_path=`$WHICH "$new_path" 2> /dev/null`
20362  # bat and cmd files are not always considered executable in cygwin causing which
20363  # to not find them
20364  if test "x$new_path" = x \
20365      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20366      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20367    new_path=`$CYGPATH -u "$path"`
20368  fi
20369  if test "x$new_path" = x; then
20370    # Oops. Which didn't find the executable.
20371    # The splitting of arguments from the executable at a space might have been incorrect,
20372    # since paths with space are more likely in Windows. Give it another try with the whole
20373    # argument.
20374    path="$complete"
20375    arguments="EOL"
20376    new_path=`$CYGPATH -u "$path"`
20377    new_path=`$WHICH "$new_path" 2> /dev/null`
20378    # bat and cmd files are not always considered executable in cygwin causing which
20379    # to not find them
20380    if test "x$new_path" = x \
20381        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20382        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20383      new_path=`$CYGPATH -u "$path"`
20384    fi
20385    if test "x$new_path" = x; then
20386      # It's still not found. Now this is an unrecoverable error.
20387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20388$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20389      has_space=`$ECHO "$complete" | $GREP " "`
20390      if test "x$has_space" != x; then
20391        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20392$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20393      fi
20394      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20395    fi
20396  fi
20397
20398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20401  # "foo.exe" is OK but "foo" is an error.
20402  #
20403  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20404  # It is also a way to make sure we got the proper file name for the real test later on.
20405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20406  if test "x$test_shortpath" = x; then
20407    # Short path failed, file does not exist as specified.
20408    # Try adding .exe or .cmd
20409    if test -f "${new_path}.exe"; then
20410      input_to_shortpath="${new_path}.exe"
20411    elif test -f "${new_path}.cmd"; then
20412      input_to_shortpath="${new_path}.cmd"
20413    else
20414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20415$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20416      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20417$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20418      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20419    fi
20420  else
20421    input_to_shortpath="$new_path"
20422  fi
20423
20424  # Call helper function which possibly converts this using DOS-style short mode.
20425  # If so, the updated path is stored in $new_path.
20426  new_path="$input_to_shortpath"
20427
20428  input_path="$input_to_shortpath"
20429  # Check if we need to convert this using DOS-style short mode. If the path
20430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20431  # take no chances and rewrite it.
20432  # Note: m4 eats our [], so we need to use [ and ] instead.
20433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20434  if test "x$has_forbidden_chars" != x; then
20435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20439      # Going to short mode and back again did indeed matter. Since short mode is
20440      # case insensitive, let's make it lowercase to improve readability.
20441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20442      # Now convert it back to Unix-style (cygpath)
20443      input_path=`$CYGPATH -u "$shortmode_path"`
20444      new_path="$input_path"
20445    fi
20446  fi
20447
20448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20449  if test "x$test_cygdrive_prefix" = x; then
20450    # As a simple fix, exclude /usr/bin since it's not a real path.
20451    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20453      # a path prefixed by /cygdrive for fixpath to work.
20454      new_path="$CYGWIN_ROOT_PATH$input_path"
20455    fi
20456  fi
20457
20458  # remove trailing .exe if any
20459  new_path="${new_path/%.exe/}"
20460
20461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20462
20463  # First separate the path from the arguments. This will split at the first
20464  # space.
20465  complete="$FOUND_MAKE"
20466  path="${complete%% *}"
20467  tmp="$complete EOL"
20468  arguments="${tmp#* }"
20469
20470  # Input might be given as Windows format, start by converting to
20471  # unix format.
20472  new_path="$path"
20473
20474  windows_path="$new_path"
20475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20476    unix_path=`$CYGPATH -u "$windows_path"`
20477    new_path="$unix_path"
20478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20480    new_path="$unix_path"
20481  fi
20482
20483
20484  # Now try to locate executable using which
20485  new_path=`$WHICH "$new_path" 2> /dev/null`
20486
20487  if test "x$new_path" = x; then
20488    # Oops. Which didn't find the executable.
20489    # The splitting of arguments from the executable at a space might have been incorrect,
20490    # since paths with space are more likely in Windows. Give it another try with the whole
20491    # argument.
20492    path="$complete"
20493    arguments="EOL"
20494    new_path="$path"
20495
20496  windows_path="$new_path"
20497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20498    unix_path=`$CYGPATH -u "$windows_path"`
20499    new_path="$unix_path"
20500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20502    new_path="$unix_path"
20503  fi
20504
20505
20506    new_path=`$WHICH "$new_path" 2> /dev/null`
20507    # bat and cmd files are not always considered executable in MSYS causing which
20508    # to not find them
20509    if test "x$new_path" = x \
20510        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20511        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20512      new_path="$path"
20513
20514  windows_path="$new_path"
20515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20516    unix_path=`$CYGPATH -u "$windows_path"`
20517    new_path="$unix_path"
20518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20520    new_path="$unix_path"
20521  fi
20522
20523    fi
20524
20525    if test "x$new_path" = x; then
20526      # It's still not found. Now this is an unrecoverable error.
20527      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20528$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20529      has_space=`$ECHO "$complete" | $GREP " "`
20530      if test "x$has_space" != x; then
20531        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20532$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20533      fi
20534      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20535    fi
20536  fi
20537
20538  # Now new_path has a complete unix path to the binary
20539  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20540    # Keep paths in /bin as-is, but remove trailing .exe if any
20541    new_path="${new_path/%.exe/}"
20542    # Do not save /bin paths to all_fixpath_prefixes!
20543  else
20544    # Not in mixed or Windows style, start by that.
20545    new_path=`cmd //c echo $new_path`
20546
20547  input_path="$new_path"
20548  # Check if we need to convert this using DOS-style short mode. If the path
20549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20550  # take no chances and rewrite it.
20551  # Note: m4 eats our [], so we need to use [ and ] instead.
20552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20553  if test "x$has_forbidden_chars" != x; then
20554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20555    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20556  fi
20557
20558    # Output is in $new_path
20559
20560  windows_path="$new_path"
20561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20562    unix_path=`$CYGPATH -u "$windows_path"`
20563    new_path="$unix_path"
20564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20566    new_path="$unix_path"
20567  fi
20568
20569    # remove trailing .exe if any
20570    new_path="${new_path/%.exe/}"
20571
20572    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20573    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20574  fi
20575
20576    else
20577      # We're on a unix platform. Hooray! :)
20578      # First separate the path from the arguments. This will split at the first
20579      # space.
20580      complete="$FOUND_MAKE"
20581      path="${complete%% *}"
20582      tmp="$complete EOL"
20583      arguments="${tmp#* }"
20584
20585      # Cannot rely on the command "which" here since it doesn't always work.
20586      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20587      if test -z "$is_absolute_path"; then
20588        # Path to executable is not absolute. Find it.
20589        IFS_save="$IFS"
20590        IFS=:
20591        for p in $PATH; do
20592          if test -f "$p/$path" && test -x "$p/$path"; then
20593            new_path="$p/$path"
20594            break
20595          fi
20596        done
20597        IFS="$IFS_save"
20598      else
20599        # This is an absolute path, we can use it without further modifications.
20600        new_path="$path"
20601      fi
20602
20603      if test "x$new_path" = x; then
20604        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20605$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20606        has_space=`$ECHO "$complete" | $GREP " "`
20607        if test "x$has_space" != x; then
20608          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20609$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20610        fi
20611        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20612      fi
20613    fi
20614
20615    # Now join together the path and the arguments once again
20616    if test "x$arguments" != xEOL; then
20617      new_complete="$new_path ${arguments% *}"
20618    else
20619      new_complete="$new_path"
20620    fi
20621
20622    if test "x$complete" != "x$new_complete"; then
20623      FOUND_MAKE="$new_complete"
20624      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20625$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20626    fi
20627  fi
20628
20629        fi
20630      fi
20631    fi
20632  fi
20633
20634        fi
20635        PATH=$OLD_PATH
20636      fi
20637    fi
20638
20639    if test "x$FOUND_MAKE" = x; then
20640      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
20641    fi
20642
20643    else
20644      # If it succeeded, then it was overridden by the user. We will use it
20645      # for the tool.
20646
20647      # First remove it from the list of overridden variables, so we can test
20648      # for unknown variables in the end.
20649      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20650
20651      # Check if we try to supply an empty value
20652      if test "x$MAKE" = x; then
20653        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20654$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20655        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20656$as_echo_n "checking for MAKE... " >&6; }
20657        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20658$as_echo "disabled" >&6; }
20659      else
20660        # Check if the provided tool contains a complete path.
20661        tool_specified="$MAKE"
20662        tool_basename="${tool_specified##*/}"
20663        if test "x$tool_basename" = "x$tool_specified"; then
20664          # A command without a complete path is provided, search $PATH.
20665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20666$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20667          # Extract the first word of "$tool_basename", so it can be a program name with args.
20668set dummy $tool_basename; ac_word=$2
20669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20670$as_echo_n "checking for $ac_word... " >&6; }
20671if ${ac_cv_path_MAKE+:} false; then :
20672  $as_echo_n "(cached) " >&6
20673else
20674  case $MAKE in
20675  [\\/]* | ?:[\\/]*)
20676  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20677  ;;
20678  *)
20679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20680for as_dir in $PATH
20681do
20682  IFS=$as_save_IFS
20683  test -z "$as_dir" && as_dir=.
20684    for ac_exec_ext in '' $ac_executable_extensions; do
20685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20686    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20688    break 2
20689  fi
20690done
20691  done
20692IFS=$as_save_IFS
20693
20694  ;;
20695esac
20696fi
20697MAKE=$ac_cv_path_MAKE
20698if test -n "$MAKE"; then
20699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20700$as_echo "$MAKE" >&6; }
20701else
20702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20703$as_echo "no" >&6; }
20704fi
20705
20706
20707          if test "x$MAKE" = x; then
20708            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20709          fi
20710        else
20711          # Otherwise we believe it is a complete path. Use it as it is.
20712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20713$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20714          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20715$as_echo_n "checking for MAKE... " >&6; }
20716          if test ! -x "$tool_specified"; then
20717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20718$as_echo "not found" >&6; }
20719            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20720          fi
20721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20722$as_echo "$tool_specified" >&6; }
20723        fi
20724      fi
20725    fi
20726
20727    # If MAKE was set by user, verify the version
20728
20729  MAKE_CANDIDATE=""$MAKE""
20730  DESCRIPTION="user supplied MAKE=$MAKE"
20731
20732  # On Cygwin, we require a newer version of make than on other platforms
20733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20734    MAKE_VERSION_EXPR="-e 4\."
20735    MAKE_REQUIRED_VERSION="4.0"
20736   else
20737    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20738    MAKE_REQUIRED_VERSION="3.81"
20739  fi
20740
20741  if test "x$MAKE_CANDIDATE" != x; then
20742    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20743$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20744    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20745    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20746    if test "x$IS_GNU_MAKE" = x; then
20747      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20748$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20749    else
20750      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20751      if test "x$IS_MODERN_MAKE" = x; then
20752        { $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
20753$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;}
20754      else
20755        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20756          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20757            MAKE_EXPECTED_ENV='cygwin'
20758          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20759            MAKE_EXPECTED_ENV='msys'
20760          else
20761            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20762          fi
20763          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20764          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20765        else
20766          # Not relevant for non-Windows
20767          IS_MAKE_CORRECT_ENV=true
20768        fi
20769        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20770          { $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
20771$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;}
20772        else
20773          FOUND_MAKE=$MAKE_CANDIDATE
20774
20775  # Only process if variable expands to non-empty
20776
20777  if test "x$FOUND_MAKE" != x; then
20778    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20779
20780  # First separate the path from the arguments. This will split at the first
20781  # space.
20782  complete="$FOUND_MAKE"
20783  path="${complete%% *}"
20784  tmp="$complete EOL"
20785  arguments="${tmp#* }"
20786
20787  # Input might be given as Windows format, start by converting to
20788  # unix format.
20789  new_path=`$CYGPATH -u "$path"`
20790
20791  # Now try to locate executable using which
20792  new_path=`$WHICH "$new_path" 2> /dev/null`
20793  # bat and cmd files are not always considered executable in cygwin causing which
20794  # to not find them
20795  if test "x$new_path" = x \
20796      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20797      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20798    new_path=`$CYGPATH -u "$path"`
20799  fi
20800  if test "x$new_path" = x; then
20801    # Oops. Which didn't find the executable.
20802    # The splitting of arguments from the executable at a space might have been incorrect,
20803    # since paths with space are more likely in Windows. Give it another try with the whole
20804    # argument.
20805    path="$complete"
20806    arguments="EOL"
20807    new_path=`$CYGPATH -u "$path"`
20808    new_path=`$WHICH "$new_path" 2> /dev/null`
20809    # bat and cmd files are not always considered executable in cygwin causing which
20810    # to not find them
20811    if test "x$new_path" = x \
20812        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20813        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20814      new_path=`$CYGPATH -u "$path"`
20815    fi
20816    if test "x$new_path" = x; then
20817      # It's still not found. Now this is an unrecoverable error.
20818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20819$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20820      has_space=`$ECHO "$complete" | $GREP " "`
20821      if test "x$has_space" != x; then
20822        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20823$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20824      fi
20825      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20826    fi
20827  fi
20828
20829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20832  # "foo.exe" is OK but "foo" is an error.
20833  #
20834  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20835  # It is also a way to make sure we got the proper file name for the real test later on.
20836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20837  if test "x$test_shortpath" = x; then
20838    # Short path failed, file does not exist as specified.
20839    # Try adding .exe or .cmd
20840    if test -f "${new_path}.exe"; then
20841      input_to_shortpath="${new_path}.exe"
20842    elif test -f "${new_path}.cmd"; then
20843      input_to_shortpath="${new_path}.cmd"
20844    else
20845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20846$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20847      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20848$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20849      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20850    fi
20851  else
20852    input_to_shortpath="$new_path"
20853  fi
20854
20855  # Call helper function which possibly converts this using DOS-style short mode.
20856  # If so, the updated path is stored in $new_path.
20857  new_path="$input_to_shortpath"
20858
20859  input_path="$input_to_shortpath"
20860  # Check if we need to convert this using DOS-style short mode. If the path
20861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20862  # take no chances and rewrite it.
20863  # Note: m4 eats our [], so we need to use [ and ] instead.
20864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20865  if test "x$has_forbidden_chars" != x; then
20866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20870      # Going to short mode and back again did indeed matter. Since short mode is
20871      # case insensitive, let's make it lowercase to improve readability.
20872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20873      # Now convert it back to Unix-style (cygpath)
20874      input_path=`$CYGPATH -u "$shortmode_path"`
20875      new_path="$input_path"
20876    fi
20877  fi
20878
20879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20880  if test "x$test_cygdrive_prefix" = x; then
20881    # As a simple fix, exclude /usr/bin since it's not a real path.
20882    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20884      # a path prefixed by /cygdrive for fixpath to work.
20885      new_path="$CYGWIN_ROOT_PATH$input_path"
20886    fi
20887  fi
20888
20889  # remove trailing .exe if any
20890  new_path="${new_path/%.exe/}"
20891
20892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20893
20894  # First separate the path from the arguments. This will split at the first
20895  # space.
20896  complete="$FOUND_MAKE"
20897  path="${complete%% *}"
20898  tmp="$complete EOL"
20899  arguments="${tmp#* }"
20900
20901  # Input might be given as Windows format, start by converting to
20902  # unix format.
20903  new_path="$path"
20904
20905  windows_path="$new_path"
20906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20907    unix_path=`$CYGPATH -u "$windows_path"`
20908    new_path="$unix_path"
20909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20911    new_path="$unix_path"
20912  fi
20913
20914
20915  # Now try to locate executable using which
20916  new_path=`$WHICH "$new_path" 2> /dev/null`
20917
20918  if test "x$new_path" = x; then
20919    # Oops. Which didn't find the executable.
20920    # The splitting of arguments from the executable at a space might have been incorrect,
20921    # since paths with space are more likely in Windows. Give it another try with the whole
20922    # argument.
20923    path="$complete"
20924    arguments="EOL"
20925    new_path="$path"
20926
20927  windows_path="$new_path"
20928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20929    unix_path=`$CYGPATH -u "$windows_path"`
20930    new_path="$unix_path"
20931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20933    new_path="$unix_path"
20934  fi
20935
20936
20937    new_path=`$WHICH "$new_path" 2> /dev/null`
20938    # bat and cmd files are not always considered executable in MSYS causing which
20939    # to not find them
20940    if test "x$new_path" = x \
20941        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20942        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20943      new_path="$path"
20944
20945  windows_path="$new_path"
20946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20947    unix_path=`$CYGPATH -u "$windows_path"`
20948    new_path="$unix_path"
20949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20951    new_path="$unix_path"
20952  fi
20953
20954    fi
20955
20956    if test "x$new_path" = x; then
20957      # It's still not found. Now this is an unrecoverable error.
20958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20959$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20960      has_space=`$ECHO "$complete" | $GREP " "`
20961      if test "x$has_space" != x; then
20962        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20963$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20964      fi
20965      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20966    fi
20967  fi
20968
20969  # Now new_path has a complete unix path to the binary
20970  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20971    # Keep paths in /bin as-is, but remove trailing .exe if any
20972    new_path="${new_path/%.exe/}"
20973    # Do not save /bin paths to all_fixpath_prefixes!
20974  else
20975    # Not in mixed or Windows style, start by that.
20976    new_path=`cmd //c echo $new_path`
20977
20978  input_path="$new_path"
20979  # Check if we need to convert this using DOS-style short mode. If the path
20980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20981  # take no chances and rewrite it.
20982  # Note: m4 eats our [], so we need to use [ and ] instead.
20983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20984  if test "x$has_forbidden_chars" != x; then
20985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20987  fi
20988
20989    # Output is in $new_path
20990
20991  windows_path="$new_path"
20992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20993    unix_path=`$CYGPATH -u "$windows_path"`
20994    new_path="$unix_path"
20995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20997    new_path="$unix_path"
20998  fi
20999
21000    # remove trailing .exe if any
21001    new_path="${new_path/%.exe/}"
21002
21003    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21004    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21005  fi
21006
21007    else
21008      # We're on a unix platform. Hooray! :)
21009      # First separate the path from the arguments. This will split at the first
21010      # space.
21011      complete="$FOUND_MAKE"
21012      path="${complete%% *}"
21013      tmp="$complete EOL"
21014      arguments="${tmp#* }"
21015
21016      # Cannot rely on the command "which" here since it doesn't always work.
21017      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21018      if test -z "$is_absolute_path"; then
21019        # Path to executable is not absolute. Find it.
21020        IFS_save="$IFS"
21021        IFS=:
21022        for p in $PATH; do
21023          if test -f "$p/$path" && test -x "$p/$path"; then
21024            new_path="$p/$path"
21025            break
21026          fi
21027        done
21028        IFS="$IFS_save"
21029      else
21030        # This is an absolute path, we can use it without further modifications.
21031        new_path="$path"
21032      fi
21033
21034      if test "x$new_path" = x; then
21035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21036$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21037        has_space=`$ECHO "$complete" | $GREP " "`
21038        if test "x$has_space" != x; then
21039          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21040$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21041        fi
21042        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21043      fi
21044    fi
21045
21046    # Now join together the path and the arguments once again
21047    if test "x$arguments" != xEOL; then
21048      new_complete="$new_path ${arguments% *}"
21049    else
21050      new_complete="$new_path"
21051    fi
21052
21053    if test "x$complete" != "x$new_complete"; then
21054      FOUND_MAKE="$new_complete"
21055      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21056$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21057    fi
21058  fi
21059
21060        fi
21061      fi
21062    fi
21063  fi
21064
21065    if test "x$FOUND_MAKE" = x; then
21066      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21067    fi
21068
21069  fi
21070
21071
21072  MAKE=$FOUND_MAKE
21073
21074  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21075$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21076
21077
21078  # Check if make supports the output sync option and if so, setup using it.
21079  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21080$as_echo_n "checking if make --output-sync is supported... " >&6; }
21081  if $MAKE --version -O > /dev/null 2>&1; then
21082    OUTPUT_SYNC_SUPPORTED=true
21083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21084$as_echo "yes" >&6; }
21085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21086$as_echo_n "checking for output-sync value... " >&6; }
21087
21088# Check whether --with-output-sync was given.
21089if test "${with_output_sync+set}" = set; then :
21090  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21091fi
21092
21093    if test "x$OUTPUT_SYNC" = "x"; then
21094      OUTPUT_SYNC=none
21095    fi
21096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21097$as_echo "$OUTPUT_SYNC" >&6; }
21098    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21099      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21100    fi
21101  else
21102    OUTPUT_SYNC_SUPPORTED=false
21103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21104$as_echo "no" >&6; }
21105  fi
21106
21107
21108
21109
21110
21111
21112  # Test if find supports -delete
21113  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21114$as_echo_n "checking if find supports -delete... " >&6; }
21115  FIND_DELETE="-delete"
21116
21117  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21118
21119  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21120
21121  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21122  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21123    # No, it does not.
21124    $RM $DELETEDIR/TestIfFindSupportsDelete
21125    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21126      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21127      FIND_DELETE="-print | $XARGS $RM"
21128    else
21129      FIND_DELETE="-exec $RM \{\} \+"
21130    fi
21131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21132$as_echo "no" >&6; }
21133  else
21134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21135$as_echo "yes" >&6; }
21136  fi
21137  $RMDIR $DELETEDIR
21138
21139
21140
21141  # Test which kind of tar was found
21142  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21143    TAR_TYPE="gnu"
21144  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21145    TAR_TYPE="bsd"
21146  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21147    TAR_TYPE="solaris"
21148  fi
21149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21150$as_echo_n "checking what type of tar was found... " >&6; }
21151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21152$as_echo "$TAR_TYPE" >&6; }
21153
21154  TAR_CREATE_FILE_PARAM=""
21155
21156  if test "x$TAR_TYPE" = "xgnu"; then
21157    TAR_INCLUDE_PARAM="T"
21158    TAR_SUPPORTS_TRANSFORM="true"
21159    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21160      # When using gnu tar for Solaris targets, need to use compatibility mode
21161      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21162    fi
21163  else
21164    TAR_INCLUDE_PARAM="I"
21165    TAR_SUPPORTS_TRANSFORM="false"
21166  fi
21167
21168
21169
21170
21171
21172
21173  # These tools might not be installed by default,
21174  # need hint on how to install them.
21175
21176
21177
21178  # Publish this variable in the help.
21179
21180
21181  if [ -z "${UNZIP+x}" ]; then
21182    # The variable is not set by user, try to locate tool using the code snippet
21183    for ac_prog in unzip
21184do
21185  # Extract the first word of "$ac_prog", so it can be a program name with args.
21186set dummy $ac_prog; ac_word=$2
21187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21188$as_echo_n "checking for $ac_word... " >&6; }
21189if ${ac_cv_path_UNZIP+:} false; then :
21190  $as_echo_n "(cached) " >&6
21191else
21192  case $UNZIP in
21193  [\\/]* | ?:[\\/]*)
21194  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21195  ;;
21196  *)
21197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21198for as_dir in $PATH
21199do
21200  IFS=$as_save_IFS
21201  test -z "$as_dir" && as_dir=.
21202    for ac_exec_ext in '' $ac_executable_extensions; do
21203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21204    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21206    break 2
21207  fi
21208done
21209  done
21210IFS=$as_save_IFS
21211
21212  ;;
21213esac
21214fi
21215UNZIP=$ac_cv_path_UNZIP
21216if test -n "$UNZIP"; then
21217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21218$as_echo "$UNZIP" >&6; }
21219else
21220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21221$as_echo "no" >&6; }
21222fi
21223
21224
21225  test -n "$UNZIP" && break
21226done
21227
21228  else
21229    # The variable is set, but is it from the command line or the environment?
21230
21231    # Try to remove the string !UNZIP! from our list.
21232    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21233    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21234      # If it failed, the variable was not from the command line. Ignore it,
21235      # but warn the user (except for BASH, which is always set by the calling BASH).
21236      if test "xUNZIP" != xBASH; then
21237        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21238$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21239      fi
21240      # Try to locate tool using the code snippet
21241      for ac_prog in unzip
21242do
21243  # Extract the first word of "$ac_prog", so it can be a program name with args.
21244set dummy $ac_prog; ac_word=$2
21245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21246$as_echo_n "checking for $ac_word... " >&6; }
21247if ${ac_cv_path_UNZIP+:} false; then :
21248  $as_echo_n "(cached) " >&6
21249else
21250  case $UNZIP in
21251  [\\/]* | ?:[\\/]*)
21252  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21253  ;;
21254  *)
21255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21256for as_dir in $PATH
21257do
21258  IFS=$as_save_IFS
21259  test -z "$as_dir" && as_dir=.
21260    for ac_exec_ext in '' $ac_executable_extensions; do
21261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21262    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21264    break 2
21265  fi
21266done
21267  done
21268IFS=$as_save_IFS
21269
21270  ;;
21271esac
21272fi
21273UNZIP=$ac_cv_path_UNZIP
21274if test -n "$UNZIP"; then
21275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21276$as_echo "$UNZIP" >&6; }
21277else
21278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21279$as_echo "no" >&6; }
21280fi
21281
21282
21283  test -n "$UNZIP" && break
21284done
21285
21286    else
21287      # If it succeeded, then it was overridden by the user. We will use it
21288      # for the tool.
21289
21290      # First remove it from the list of overridden variables, so we can test
21291      # for unknown variables in the end.
21292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21293
21294      # Check if we try to supply an empty value
21295      if test "x$UNZIP" = x; then
21296        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21297$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21299$as_echo_n "checking for UNZIP... " >&6; }
21300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21301$as_echo "disabled" >&6; }
21302      else
21303        # Check if the provided tool contains a complete path.
21304        tool_specified="$UNZIP"
21305        tool_basename="${tool_specified##*/}"
21306        if test "x$tool_basename" = "x$tool_specified"; then
21307          # A command without a complete path is provided, search $PATH.
21308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21309$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21310          # Extract the first word of "$tool_basename", so it can be a program name with args.
21311set dummy $tool_basename; ac_word=$2
21312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21313$as_echo_n "checking for $ac_word... " >&6; }
21314if ${ac_cv_path_UNZIP+:} false; then :
21315  $as_echo_n "(cached) " >&6
21316else
21317  case $UNZIP in
21318  [\\/]* | ?:[\\/]*)
21319  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21320  ;;
21321  *)
21322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21323for as_dir in $PATH
21324do
21325  IFS=$as_save_IFS
21326  test -z "$as_dir" && as_dir=.
21327    for ac_exec_ext in '' $ac_executable_extensions; do
21328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21329    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21331    break 2
21332  fi
21333done
21334  done
21335IFS=$as_save_IFS
21336
21337  ;;
21338esac
21339fi
21340UNZIP=$ac_cv_path_UNZIP
21341if test -n "$UNZIP"; then
21342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21343$as_echo "$UNZIP" >&6; }
21344else
21345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21346$as_echo "no" >&6; }
21347fi
21348
21349
21350          if test "x$UNZIP" = x; then
21351            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21352          fi
21353        else
21354          # Otherwise we believe it is a complete path. Use it as it is.
21355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21356$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21357          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21358$as_echo_n "checking for UNZIP... " >&6; }
21359          if test ! -x "$tool_specified"; then
21360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21361$as_echo "not found" >&6; }
21362            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21363          fi
21364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21365$as_echo "$tool_specified" >&6; }
21366        fi
21367      fi
21368    fi
21369
21370  fi
21371
21372
21373
21374  if test "x$UNZIP" = x; then
21375    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21376  fi
21377
21378
21379
21380
21381
21382  # Publish this variable in the help.
21383
21384
21385  if [ -z "${ZIP+x}" ]; then
21386    # The variable is not set by user, try to locate tool using the code snippet
21387    for ac_prog in zip
21388do
21389  # Extract the first word of "$ac_prog", so it can be a program name with args.
21390set dummy $ac_prog; ac_word=$2
21391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21392$as_echo_n "checking for $ac_word... " >&6; }
21393if ${ac_cv_path_ZIP+:} false; then :
21394  $as_echo_n "(cached) " >&6
21395else
21396  case $ZIP in
21397  [\\/]* | ?:[\\/]*)
21398  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21399  ;;
21400  *)
21401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21402for as_dir in $PATH
21403do
21404  IFS=$as_save_IFS
21405  test -z "$as_dir" && as_dir=.
21406    for ac_exec_ext in '' $ac_executable_extensions; do
21407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21408    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21410    break 2
21411  fi
21412done
21413  done
21414IFS=$as_save_IFS
21415
21416  ;;
21417esac
21418fi
21419ZIP=$ac_cv_path_ZIP
21420if test -n "$ZIP"; then
21421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21422$as_echo "$ZIP" >&6; }
21423else
21424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21425$as_echo "no" >&6; }
21426fi
21427
21428
21429  test -n "$ZIP" && break
21430done
21431
21432  else
21433    # The variable is set, but is it from the command line or the environment?
21434
21435    # Try to remove the string !ZIP! from our list.
21436    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21437    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21438      # If it failed, the variable was not from the command line. Ignore it,
21439      # but warn the user (except for BASH, which is always set by the calling BASH).
21440      if test "xZIP" != xBASH; then
21441        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21442$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21443      fi
21444      # Try to locate tool using the code snippet
21445      for ac_prog in zip
21446do
21447  # Extract the first word of "$ac_prog", so it can be a program name with args.
21448set dummy $ac_prog; ac_word=$2
21449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21450$as_echo_n "checking for $ac_word... " >&6; }
21451if ${ac_cv_path_ZIP+:} false; then :
21452  $as_echo_n "(cached) " >&6
21453else
21454  case $ZIP in
21455  [\\/]* | ?:[\\/]*)
21456  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21457  ;;
21458  *)
21459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21460for as_dir in $PATH
21461do
21462  IFS=$as_save_IFS
21463  test -z "$as_dir" && as_dir=.
21464    for ac_exec_ext in '' $ac_executable_extensions; do
21465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21466    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21468    break 2
21469  fi
21470done
21471  done
21472IFS=$as_save_IFS
21473
21474  ;;
21475esac
21476fi
21477ZIP=$ac_cv_path_ZIP
21478if test -n "$ZIP"; then
21479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21480$as_echo "$ZIP" >&6; }
21481else
21482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21483$as_echo "no" >&6; }
21484fi
21485
21486
21487  test -n "$ZIP" && break
21488done
21489
21490    else
21491      # If it succeeded, then it was overridden by the user. We will use it
21492      # for the tool.
21493
21494      # First remove it from the list of overridden variables, so we can test
21495      # for unknown variables in the end.
21496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21497
21498      # Check if we try to supply an empty value
21499      if test "x$ZIP" = x; then
21500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21501$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21503$as_echo_n "checking for ZIP... " >&6; }
21504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21505$as_echo "disabled" >&6; }
21506      else
21507        # Check if the provided tool contains a complete path.
21508        tool_specified="$ZIP"
21509        tool_basename="${tool_specified##*/}"
21510        if test "x$tool_basename" = "x$tool_specified"; then
21511          # A command without a complete path is provided, search $PATH.
21512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21513$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21514          # Extract the first word of "$tool_basename", so it can be a program name with args.
21515set dummy $tool_basename; ac_word=$2
21516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21517$as_echo_n "checking for $ac_word... " >&6; }
21518if ${ac_cv_path_ZIP+:} false; then :
21519  $as_echo_n "(cached) " >&6
21520else
21521  case $ZIP in
21522  [\\/]* | ?:[\\/]*)
21523  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21524  ;;
21525  *)
21526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21527for as_dir in $PATH
21528do
21529  IFS=$as_save_IFS
21530  test -z "$as_dir" && as_dir=.
21531    for ac_exec_ext in '' $ac_executable_extensions; do
21532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21533    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21535    break 2
21536  fi
21537done
21538  done
21539IFS=$as_save_IFS
21540
21541  ;;
21542esac
21543fi
21544ZIP=$ac_cv_path_ZIP
21545if test -n "$ZIP"; then
21546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21547$as_echo "$ZIP" >&6; }
21548else
21549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21550$as_echo "no" >&6; }
21551fi
21552
21553
21554          if test "x$ZIP" = x; then
21555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21556          fi
21557        else
21558          # Otherwise we believe it is a complete path. Use it as it is.
21559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21560$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21562$as_echo_n "checking for ZIP... " >&6; }
21563          if test ! -x "$tool_specified"; then
21564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21565$as_echo "not found" >&6; }
21566            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21567          fi
21568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21569$as_echo "$tool_specified" >&6; }
21570        fi
21571      fi
21572    fi
21573
21574  fi
21575
21576
21577
21578  if test "x$ZIP" = x; then
21579    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21580  fi
21581
21582
21583
21584  # Non-required basic tools
21585
21586
21587
21588  # Publish this variable in the help.
21589
21590
21591  if [ -z "${LDD+x}" ]; then
21592    # The variable is not set by user, try to locate tool using the code snippet
21593    for ac_prog in ldd
21594do
21595  # Extract the first word of "$ac_prog", so it can be a program name with args.
21596set dummy $ac_prog; ac_word=$2
21597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21598$as_echo_n "checking for $ac_word... " >&6; }
21599if ${ac_cv_path_LDD+:} false; then :
21600  $as_echo_n "(cached) " >&6
21601else
21602  case $LDD in
21603  [\\/]* | ?:[\\/]*)
21604  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21605  ;;
21606  *)
21607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21608for as_dir in $PATH
21609do
21610  IFS=$as_save_IFS
21611  test -z "$as_dir" && as_dir=.
21612    for ac_exec_ext in '' $ac_executable_extensions; do
21613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21614    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21616    break 2
21617  fi
21618done
21619  done
21620IFS=$as_save_IFS
21621
21622  ;;
21623esac
21624fi
21625LDD=$ac_cv_path_LDD
21626if test -n "$LDD"; then
21627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21628$as_echo "$LDD" >&6; }
21629else
21630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21631$as_echo "no" >&6; }
21632fi
21633
21634
21635  test -n "$LDD" && break
21636done
21637
21638  else
21639    # The variable is set, but is it from the command line or the environment?
21640
21641    # Try to remove the string !LDD! from our list.
21642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21644      # If it failed, the variable was not from the command line. Ignore it,
21645      # but warn the user (except for BASH, which is always set by the calling BASH).
21646      if test "xLDD" != xBASH; then
21647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21648$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21649      fi
21650      # Try to locate tool using the code snippet
21651      for ac_prog in ldd
21652do
21653  # Extract the first word of "$ac_prog", so it can be a program name with args.
21654set dummy $ac_prog; ac_word=$2
21655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21656$as_echo_n "checking for $ac_word... " >&6; }
21657if ${ac_cv_path_LDD+:} false; then :
21658  $as_echo_n "(cached) " >&6
21659else
21660  case $LDD in
21661  [\\/]* | ?:[\\/]*)
21662  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21663  ;;
21664  *)
21665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21666for as_dir in $PATH
21667do
21668  IFS=$as_save_IFS
21669  test -z "$as_dir" && as_dir=.
21670    for ac_exec_ext in '' $ac_executable_extensions; do
21671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21672    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21674    break 2
21675  fi
21676done
21677  done
21678IFS=$as_save_IFS
21679
21680  ;;
21681esac
21682fi
21683LDD=$ac_cv_path_LDD
21684if test -n "$LDD"; then
21685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21686$as_echo "$LDD" >&6; }
21687else
21688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21689$as_echo "no" >&6; }
21690fi
21691
21692
21693  test -n "$LDD" && break
21694done
21695
21696    else
21697      # If it succeeded, then it was overridden by the user. We will use it
21698      # for the tool.
21699
21700      # First remove it from the list of overridden variables, so we can test
21701      # for unknown variables in the end.
21702      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21703
21704      # Check if we try to supply an empty value
21705      if test "x$LDD" = x; then
21706        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21707$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21709$as_echo_n "checking for LDD... " >&6; }
21710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21711$as_echo "disabled" >&6; }
21712      else
21713        # Check if the provided tool contains a complete path.
21714        tool_specified="$LDD"
21715        tool_basename="${tool_specified##*/}"
21716        if test "x$tool_basename" = "x$tool_specified"; then
21717          # A command without a complete path is provided, search $PATH.
21718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21719$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21720          # Extract the first word of "$tool_basename", so it can be a program name with args.
21721set dummy $tool_basename; ac_word=$2
21722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21723$as_echo_n "checking for $ac_word... " >&6; }
21724if ${ac_cv_path_LDD+:} false; then :
21725  $as_echo_n "(cached) " >&6
21726else
21727  case $LDD in
21728  [\\/]* | ?:[\\/]*)
21729  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21730  ;;
21731  *)
21732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21733for as_dir in $PATH
21734do
21735  IFS=$as_save_IFS
21736  test -z "$as_dir" && as_dir=.
21737    for ac_exec_ext in '' $ac_executable_extensions; do
21738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21739    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21741    break 2
21742  fi
21743done
21744  done
21745IFS=$as_save_IFS
21746
21747  ;;
21748esac
21749fi
21750LDD=$ac_cv_path_LDD
21751if test -n "$LDD"; then
21752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21753$as_echo "$LDD" >&6; }
21754else
21755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21756$as_echo "no" >&6; }
21757fi
21758
21759
21760          if test "x$LDD" = x; then
21761            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21762          fi
21763        else
21764          # Otherwise we believe it is a complete path. Use it as it is.
21765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21766$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21767          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21768$as_echo_n "checking for LDD... " >&6; }
21769          if test ! -x "$tool_specified"; then
21770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21771$as_echo "not found" >&6; }
21772            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21773          fi
21774          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21775$as_echo "$tool_specified" >&6; }
21776        fi
21777      fi
21778    fi
21779
21780  fi
21781
21782
21783  if test "x$LDD" = "x"; then
21784    # List shared lib dependencies is used for
21785    # debug output and checking for forbidden dependencies.
21786    # We can build without it.
21787    LDD="true"
21788  fi
21789
21790
21791  # Publish this variable in the help.
21792
21793
21794  if [ -z "${OTOOL+x}" ]; then
21795    # The variable is not set by user, try to locate tool using the code snippet
21796    for ac_prog in otool
21797do
21798  # Extract the first word of "$ac_prog", so it can be a program name with args.
21799set dummy $ac_prog; ac_word=$2
21800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21801$as_echo_n "checking for $ac_word... " >&6; }
21802if ${ac_cv_path_OTOOL+:} false; then :
21803  $as_echo_n "(cached) " >&6
21804else
21805  case $OTOOL in
21806  [\\/]* | ?:[\\/]*)
21807  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21808  ;;
21809  *)
21810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21811for as_dir in $PATH
21812do
21813  IFS=$as_save_IFS
21814  test -z "$as_dir" && as_dir=.
21815    for ac_exec_ext in '' $ac_executable_extensions; do
21816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21817    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21819    break 2
21820  fi
21821done
21822  done
21823IFS=$as_save_IFS
21824
21825  ;;
21826esac
21827fi
21828OTOOL=$ac_cv_path_OTOOL
21829if test -n "$OTOOL"; then
21830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21831$as_echo "$OTOOL" >&6; }
21832else
21833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21834$as_echo "no" >&6; }
21835fi
21836
21837
21838  test -n "$OTOOL" && break
21839done
21840
21841  else
21842    # The variable is set, but is it from the command line or the environment?
21843
21844    # Try to remove the string !OTOOL! from our list.
21845    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21846    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21847      # If it failed, the variable was not from the command line. Ignore it,
21848      # but warn the user (except for BASH, which is always set by the calling BASH).
21849      if test "xOTOOL" != xBASH; then
21850        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21851$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21852      fi
21853      # Try to locate tool using the code snippet
21854      for ac_prog in otool
21855do
21856  # Extract the first word of "$ac_prog", so it can be a program name with args.
21857set dummy $ac_prog; ac_word=$2
21858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21859$as_echo_n "checking for $ac_word... " >&6; }
21860if ${ac_cv_path_OTOOL+:} false; then :
21861  $as_echo_n "(cached) " >&6
21862else
21863  case $OTOOL in
21864  [\\/]* | ?:[\\/]*)
21865  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21866  ;;
21867  *)
21868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21869for as_dir in $PATH
21870do
21871  IFS=$as_save_IFS
21872  test -z "$as_dir" && as_dir=.
21873    for ac_exec_ext in '' $ac_executable_extensions; do
21874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21875    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21877    break 2
21878  fi
21879done
21880  done
21881IFS=$as_save_IFS
21882
21883  ;;
21884esac
21885fi
21886OTOOL=$ac_cv_path_OTOOL
21887if test -n "$OTOOL"; then
21888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21889$as_echo "$OTOOL" >&6; }
21890else
21891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21892$as_echo "no" >&6; }
21893fi
21894
21895
21896  test -n "$OTOOL" && break
21897done
21898
21899    else
21900      # If it succeeded, then it was overridden by the user. We will use it
21901      # for the tool.
21902
21903      # First remove it from the list of overridden variables, so we can test
21904      # for unknown variables in the end.
21905      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21906
21907      # Check if we try to supply an empty value
21908      if test "x$OTOOL" = x; then
21909        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21910$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21912$as_echo_n "checking for OTOOL... " >&6; }
21913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21914$as_echo "disabled" >&6; }
21915      else
21916        # Check if the provided tool contains a complete path.
21917        tool_specified="$OTOOL"
21918        tool_basename="${tool_specified##*/}"
21919        if test "x$tool_basename" = "x$tool_specified"; then
21920          # A command without a complete path is provided, search $PATH.
21921          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21922$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21923          # Extract the first word of "$tool_basename", so it can be a program name with args.
21924set dummy $tool_basename; ac_word=$2
21925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21926$as_echo_n "checking for $ac_word... " >&6; }
21927if ${ac_cv_path_OTOOL+:} false; then :
21928  $as_echo_n "(cached) " >&6
21929else
21930  case $OTOOL in
21931  [\\/]* | ?:[\\/]*)
21932  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21933  ;;
21934  *)
21935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21936for as_dir in $PATH
21937do
21938  IFS=$as_save_IFS
21939  test -z "$as_dir" && as_dir=.
21940    for ac_exec_ext in '' $ac_executable_extensions; do
21941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21942    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21944    break 2
21945  fi
21946done
21947  done
21948IFS=$as_save_IFS
21949
21950  ;;
21951esac
21952fi
21953OTOOL=$ac_cv_path_OTOOL
21954if test -n "$OTOOL"; then
21955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21956$as_echo "$OTOOL" >&6; }
21957else
21958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21959$as_echo "no" >&6; }
21960fi
21961
21962
21963          if test "x$OTOOL" = x; then
21964            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21965          fi
21966        else
21967          # Otherwise we believe it is a complete path. Use it as it is.
21968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21969$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21970          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21971$as_echo_n "checking for OTOOL... " >&6; }
21972          if test ! -x "$tool_specified"; then
21973            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21974$as_echo "not found" >&6; }
21975            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21976          fi
21977          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21978$as_echo "$tool_specified" >&6; }
21979        fi
21980      fi
21981    fi
21982
21983  fi
21984
21985
21986  if test "x$OTOOL" = "x"; then
21987    OTOOL="true"
21988  fi
21989
21990
21991  # Publish this variable in the help.
21992
21993
21994  if [ -z "${READELF+x}" ]; then
21995    # The variable is not set by user, try to locate tool using the code snippet
21996    for ac_prog in greadelf readelf
21997do
21998  # Extract the first word of "$ac_prog", so it can be a program name with args.
21999set dummy $ac_prog; ac_word=$2
22000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22001$as_echo_n "checking for $ac_word... " >&6; }
22002if ${ac_cv_path_READELF+:} false; then :
22003  $as_echo_n "(cached) " >&6
22004else
22005  case $READELF in
22006  [\\/]* | ?:[\\/]*)
22007  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22008  ;;
22009  *)
22010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22011for as_dir in $PATH
22012do
22013  IFS=$as_save_IFS
22014  test -z "$as_dir" && as_dir=.
22015    for ac_exec_ext in '' $ac_executable_extensions; do
22016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22017    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22019    break 2
22020  fi
22021done
22022  done
22023IFS=$as_save_IFS
22024
22025  ;;
22026esac
22027fi
22028READELF=$ac_cv_path_READELF
22029if test -n "$READELF"; then
22030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22031$as_echo "$READELF" >&6; }
22032else
22033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22034$as_echo "no" >&6; }
22035fi
22036
22037
22038  test -n "$READELF" && break
22039done
22040
22041  else
22042    # The variable is set, but is it from the command line or the environment?
22043
22044    # Try to remove the string !READELF! from our list.
22045    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22046    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22047      # If it failed, the variable was not from the command line. Ignore it,
22048      # but warn the user (except for BASH, which is always set by the calling BASH).
22049      if test "xREADELF" != xBASH; then
22050        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22051$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22052      fi
22053      # Try to locate tool using the code snippet
22054      for ac_prog in greadelf readelf
22055do
22056  # Extract the first word of "$ac_prog", so it can be a program name with args.
22057set dummy $ac_prog; ac_word=$2
22058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22059$as_echo_n "checking for $ac_word... " >&6; }
22060if ${ac_cv_path_READELF+:} false; then :
22061  $as_echo_n "(cached) " >&6
22062else
22063  case $READELF in
22064  [\\/]* | ?:[\\/]*)
22065  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22066  ;;
22067  *)
22068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22069for as_dir in $PATH
22070do
22071  IFS=$as_save_IFS
22072  test -z "$as_dir" && as_dir=.
22073    for ac_exec_ext in '' $ac_executable_extensions; do
22074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22075    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22077    break 2
22078  fi
22079done
22080  done
22081IFS=$as_save_IFS
22082
22083  ;;
22084esac
22085fi
22086READELF=$ac_cv_path_READELF
22087if test -n "$READELF"; then
22088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22089$as_echo "$READELF" >&6; }
22090else
22091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22092$as_echo "no" >&6; }
22093fi
22094
22095
22096  test -n "$READELF" && break
22097done
22098
22099    else
22100      # If it succeeded, then it was overridden by the user. We will use it
22101      # for the tool.
22102
22103      # First remove it from the list of overridden variables, so we can test
22104      # for unknown variables in the end.
22105      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22106
22107      # Check if we try to supply an empty value
22108      if test "x$READELF" = x; then
22109        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22110$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22112$as_echo_n "checking for READELF... " >&6; }
22113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22114$as_echo "disabled" >&6; }
22115      else
22116        # Check if the provided tool contains a complete path.
22117        tool_specified="$READELF"
22118        tool_basename="${tool_specified##*/}"
22119        if test "x$tool_basename" = "x$tool_specified"; then
22120          # A command without a complete path is provided, search $PATH.
22121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22122$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22123          # Extract the first word of "$tool_basename", so it can be a program name with args.
22124set dummy $tool_basename; ac_word=$2
22125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22126$as_echo_n "checking for $ac_word... " >&6; }
22127if ${ac_cv_path_READELF+:} false; then :
22128  $as_echo_n "(cached) " >&6
22129else
22130  case $READELF in
22131  [\\/]* | ?:[\\/]*)
22132  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22133  ;;
22134  *)
22135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22136for as_dir in $PATH
22137do
22138  IFS=$as_save_IFS
22139  test -z "$as_dir" && as_dir=.
22140    for ac_exec_ext in '' $ac_executable_extensions; do
22141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22142    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22144    break 2
22145  fi
22146done
22147  done
22148IFS=$as_save_IFS
22149
22150  ;;
22151esac
22152fi
22153READELF=$ac_cv_path_READELF
22154if test -n "$READELF"; then
22155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22156$as_echo "$READELF" >&6; }
22157else
22158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22159$as_echo "no" >&6; }
22160fi
22161
22162
22163          if test "x$READELF" = x; then
22164            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22165          fi
22166        else
22167          # Otherwise we believe it is a complete path. Use it as it is.
22168          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22169$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22170          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22171$as_echo_n "checking for READELF... " >&6; }
22172          if test ! -x "$tool_specified"; then
22173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22174$as_echo "not found" >&6; }
22175            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22176          fi
22177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22178$as_echo "$tool_specified" >&6; }
22179        fi
22180      fi
22181    fi
22182
22183  fi
22184
22185
22186
22187
22188  # Publish this variable in the help.
22189
22190
22191  if [ -z "${HG+x}" ]; then
22192    # The variable is not set by user, try to locate tool using the code snippet
22193    for ac_prog in hg
22194do
22195  # Extract the first word of "$ac_prog", so it can be a program name with args.
22196set dummy $ac_prog; ac_word=$2
22197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22198$as_echo_n "checking for $ac_word... " >&6; }
22199if ${ac_cv_path_HG+:} false; then :
22200  $as_echo_n "(cached) " >&6
22201else
22202  case $HG in
22203  [\\/]* | ?:[\\/]*)
22204  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22205  ;;
22206  *)
22207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22208for as_dir in $PATH
22209do
22210  IFS=$as_save_IFS
22211  test -z "$as_dir" && as_dir=.
22212    for ac_exec_ext in '' $ac_executable_extensions; do
22213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22214    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22216    break 2
22217  fi
22218done
22219  done
22220IFS=$as_save_IFS
22221
22222  ;;
22223esac
22224fi
22225HG=$ac_cv_path_HG
22226if test -n "$HG"; then
22227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22228$as_echo "$HG" >&6; }
22229else
22230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22231$as_echo "no" >&6; }
22232fi
22233
22234
22235  test -n "$HG" && break
22236done
22237
22238  else
22239    # The variable is set, but is it from the command line or the environment?
22240
22241    # Try to remove the string !HG! from our list.
22242    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22243    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22244      # If it failed, the variable was not from the command line. Ignore it,
22245      # but warn the user (except for BASH, which is always set by the calling BASH).
22246      if test "xHG" != xBASH; then
22247        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22248$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22249      fi
22250      # Try to locate tool using the code snippet
22251      for ac_prog in hg
22252do
22253  # Extract the first word of "$ac_prog", so it can be a program name with args.
22254set dummy $ac_prog; ac_word=$2
22255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22256$as_echo_n "checking for $ac_word... " >&6; }
22257if ${ac_cv_path_HG+:} false; then :
22258  $as_echo_n "(cached) " >&6
22259else
22260  case $HG in
22261  [\\/]* | ?:[\\/]*)
22262  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22263  ;;
22264  *)
22265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22266for as_dir in $PATH
22267do
22268  IFS=$as_save_IFS
22269  test -z "$as_dir" && as_dir=.
22270    for ac_exec_ext in '' $ac_executable_extensions; do
22271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22272    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22274    break 2
22275  fi
22276done
22277  done
22278IFS=$as_save_IFS
22279
22280  ;;
22281esac
22282fi
22283HG=$ac_cv_path_HG
22284if test -n "$HG"; then
22285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22286$as_echo "$HG" >&6; }
22287else
22288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22289$as_echo "no" >&6; }
22290fi
22291
22292
22293  test -n "$HG" && break
22294done
22295
22296    else
22297      # If it succeeded, then it was overridden by the user. We will use it
22298      # for the tool.
22299
22300      # First remove it from the list of overridden variables, so we can test
22301      # for unknown variables in the end.
22302      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22303
22304      # Check if we try to supply an empty value
22305      if test "x$HG" = x; then
22306        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22307$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22308        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22309$as_echo_n "checking for HG... " >&6; }
22310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22311$as_echo "disabled" >&6; }
22312      else
22313        # Check if the provided tool contains a complete path.
22314        tool_specified="$HG"
22315        tool_basename="${tool_specified##*/}"
22316        if test "x$tool_basename" = "x$tool_specified"; then
22317          # A command without a complete path is provided, search $PATH.
22318          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22319$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22320          # Extract the first word of "$tool_basename", so it can be a program name with args.
22321set dummy $tool_basename; ac_word=$2
22322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22323$as_echo_n "checking for $ac_word... " >&6; }
22324if ${ac_cv_path_HG+:} false; then :
22325  $as_echo_n "(cached) " >&6
22326else
22327  case $HG in
22328  [\\/]* | ?:[\\/]*)
22329  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22330  ;;
22331  *)
22332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22333for as_dir in $PATH
22334do
22335  IFS=$as_save_IFS
22336  test -z "$as_dir" && as_dir=.
22337    for ac_exec_ext in '' $ac_executable_extensions; do
22338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22339    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22341    break 2
22342  fi
22343done
22344  done
22345IFS=$as_save_IFS
22346
22347  ;;
22348esac
22349fi
22350HG=$ac_cv_path_HG
22351if test -n "$HG"; then
22352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22353$as_echo "$HG" >&6; }
22354else
22355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22356$as_echo "no" >&6; }
22357fi
22358
22359
22360          if test "x$HG" = x; then
22361            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22362          fi
22363        else
22364          # Otherwise we believe it is a complete path. Use it as it is.
22365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22366$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22367          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22368$as_echo_n "checking for HG... " >&6; }
22369          if test ! -x "$tool_specified"; then
22370            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22371$as_echo "not found" >&6; }
22372            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22373          fi
22374          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22375$as_echo "$tool_specified" >&6; }
22376        fi
22377      fi
22378    fi
22379
22380  fi
22381
22382
22383
22384
22385  # Publish this variable in the help.
22386
22387
22388  if [ -z "${STAT+x}" ]; then
22389    # The variable is not set by user, try to locate tool using the code snippet
22390    for ac_prog in stat
22391do
22392  # Extract the first word of "$ac_prog", so it can be a program name with args.
22393set dummy $ac_prog; ac_word=$2
22394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22395$as_echo_n "checking for $ac_word... " >&6; }
22396if ${ac_cv_path_STAT+:} false; then :
22397  $as_echo_n "(cached) " >&6
22398else
22399  case $STAT in
22400  [\\/]* | ?:[\\/]*)
22401  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22402  ;;
22403  *)
22404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22405for as_dir in $PATH
22406do
22407  IFS=$as_save_IFS
22408  test -z "$as_dir" && as_dir=.
22409    for ac_exec_ext in '' $ac_executable_extensions; do
22410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22411    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22413    break 2
22414  fi
22415done
22416  done
22417IFS=$as_save_IFS
22418
22419  ;;
22420esac
22421fi
22422STAT=$ac_cv_path_STAT
22423if test -n "$STAT"; then
22424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22425$as_echo "$STAT" >&6; }
22426else
22427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22428$as_echo "no" >&6; }
22429fi
22430
22431
22432  test -n "$STAT" && break
22433done
22434
22435  else
22436    # The variable is set, but is it from the command line or the environment?
22437
22438    # Try to remove the string !STAT! from our list.
22439    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22440    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22441      # If it failed, the variable was not from the command line. Ignore it,
22442      # but warn the user (except for BASH, which is always set by the calling BASH).
22443      if test "xSTAT" != xBASH; then
22444        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22445$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22446      fi
22447      # Try to locate tool using the code snippet
22448      for ac_prog in stat
22449do
22450  # Extract the first word of "$ac_prog", so it can be a program name with args.
22451set dummy $ac_prog; ac_word=$2
22452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22453$as_echo_n "checking for $ac_word... " >&6; }
22454if ${ac_cv_path_STAT+:} false; then :
22455  $as_echo_n "(cached) " >&6
22456else
22457  case $STAT in
22458  [\\/]* | ?:[\\/]*)
22459  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22460  ;;
22461  *)
22462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22463for as_dir in $PATH
22464do
22465  IFS=$as_save_IFS
22466  test -z "$as_dir" && as_dir=.
22467    for ac_exec_ext in '' $ac_executable_extensions; do
22468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22469    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22471    break 2
22472  fi
22473done
22474  done
22475IFS=$as_save_IFS
22476
22477  ;;
22478esac
22479fi
22480STAT=$ac_cv_path_STAT
22481if test -n "$STAT"; then
22482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22483$as_echo "$STAT" >&6; }
22484else
22485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22486$as_echo "no" >&6; }
22487fi
22488
22489
22490  test -n "$STAT" && break
22491done
22492
22493    else
22494      # If it succeeded, then it was overridden by the user. We will use it
22495      # for the tool.
22496
22497      # First remove it from the list of overridden variables, so we can test
22498      # for unknown variables in the end.
22499      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22500
22501      # Check if we try to supply an empty value
22502      if test "x$STAT" = x; then
22503        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22504$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22505        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22506$as_echo_n "checking for STAT... " >&6; }
22507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22508$as_echo "disabled" >&6; }
22509      else
22510        # Check if the provided tool contains a complete path.
22511        tool_specified="$STAT"
22512        tool_basename="${tool_specified##*/}"
22513        if test "x$tool_basename" = "x$tool_specified"; then
22514          # A command without a complete path is provided, search $PATH.
22515          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22516$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22517          # Extract the first word of "$tool_basename", so it can be a program name with args.
22518set dummy $tool_basename; ac_word=$2
22519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22520$as_echo_n "checking for $ac_word... " >&6; }
22521if ${ac_cv_path_STAT+:} false; then :
22522  $as_echo_n "(cached) " >&6
22523else
22524  case $STAT in
22525  [\\/]* | ?:[\\/]*)
22526  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22527  ;;
22528  *)
22529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22530for as_dir in $PATH
22531do
22532  IFS=$as_save_IFS
22533  test -z "$as_dir" && as_dir=.
22534    for ac_exec_ext in '' $ac_executable_extensions; do
22535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22536    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22538    break 2
22539  fi
22540done
22541  done
22542IFS=$as_save_IFS
22543
22544  ;;
22545esac
22546fi
22547STAT=$ac_cv_path_STAT
22548if test -n "$STAT"; then
22549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22550$as_echo "$STAT" >&6; }
22551else
22552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22553$as_echo "no" >&6; }
22554fi
22555
22556
22557          if test "x$STAT" = x; then
22558            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22559          fi
22560        else
22561          # Otherwise we believe it is a complete path. Use it as it is.
22562          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22563$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22564          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22565$as_echo_n "checking for STAT... " >&6; }
22566          if test ! -x "$tool_specified"; then
22567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22568$as_echo "not found" >&6; }
22569            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22570          fi
22571          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22572$as_echo "$tool_specified" >&6; }
22573        fi
22574      fi
22575    fi
22576
22577  fi
22578
22579
22580
22581
22582  # Publish this variable in the help.
22583
22584
22585  if [ -z "${TIME+x}" ]; then
22586    # The variable is not set by user, try to locate tool using the code snippet
22587    for ac_prog in time
22588do
22589  # Extract the first word of "$ac_prog", so it can be a program name with args.
22590set dummy $ac_prog; ac_word=$2
22591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22592$as_echo_n "checking for $ac_word... " >&6; }
22593if ${ac_cv_path_TIME+:} false; then :
22594  $as_echo_n "(cached) " >&6
22595else
22596  case $TIME in
22597  [\\/]* | ?:[\\/]*)
22598  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22599  ;;
22600  *)
22601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22602for as_dir in $PATH
22603do
22604  IFS=$as_save_IFS
22605  test -z "$as_dir" && as_dir=.
22606    for ac_exec_ext in '' $ac_executable_extensions; do
22607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22608    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22610    break 2
22611  fi
22612done
22613  done
22614IFS=$as_save_IFS
22615
22616  ;;
22617esac
22618fi
22619TIME=$ac_cv_path_TIME
22620if test -n "$TIME"; then
22621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22622$as_echo "$TIME" >&6; }
22623else
22624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22625$as_echo "no" >&6; }
22626fi
22627
22628
22629  test -n "$TIME" && break
22630done
22631
22632  else
22633    # The variable is set, but is it from the command line or the environment?
22634
22635    # Try to remove the string !TIME! from our list.
22636    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22637    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22638      # If it failed, the variable was not from the command line. Ignore it,
22639      # but warn the user (except for BASH, which is always set by the calling BASH).
22640      if test "xTIME" != xBASH; then
22641        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22642$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22643      fi
22644      # Try to locate tool using the code snippet
22645      for ac_prog in time
22646do
22647  # Extract the first word of "$ac_prog", so it can be a program name with args.
22648set dummy $ac_prog; ac_word=$2
22649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22650$as_echo_n "checking for $ac_word... " >&6; }
22651if ${ac_cv_path_TIME+:} false; then :
22652  $as_echo_n "(cached) " >&6
22653else
22654  case $TIME in
22655  [\\/]* | ?:[\\/]*)
22656  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22657  ;;
22658  *)
22659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22660for as_dir in $PATH
22661do
22662  IFS=$as_save_IFS
22663  test -z "$as_dir" && as_dir=.
22664    for ac_exec_ext in '' $ac_executable_extensions; do
22665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22666    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22668    break 2
22669  fi
22670done
22671  done
22672IFS=$as_save_IFS
22673
22674  ;;
22675esac
22676fi
22677TIME=$ac_cv_path_TIME
22678if test -n "$TIME"; then
22679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22680$as_echo "$TIME" >&6; }
22681else
22682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22683$as_echo "no" >&6; }
22684fi
22685
22686
22687  test -n "$TIME" && break
22688done
22689
22690    else
22691      # If it succeeded, then it was overridden by the user. We will use it
22692      # for the tool.
22693
22694      # First remove it from the list of overridden variables, so we can test
22695      # for unknown variables in the end.
22696      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22697
22698      # Check if we try to supply an empty value
22699      if test "x$TIME" = x; then
22700        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22701$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22702        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22703$as_echo_n "checking for TIME... " >&6; }
22704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22705$as_echo "disabled" >&6; }
22706      else
22707        # Check if the provided tool contains a complete path.
22708        tool_specified="$TIME"
22709        tool_basename="${tool_specified##*/}"
22710        if test "x$tool_basename" = "x$tool_specified"; then
22711          # A command without a complete path is provided, search $PATH.
22712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22713$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22714          # Extract the first word of "$tool_basename", so it can be a program name with args.
22715set dummy $tool_basename; ac_word=$2
22716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22717$as_echo_n "checking for $ac_word... " >&6; }
22718if ${ac_cv_path_TIME+:} false; then :
22719  $as_echo_n "(cached) " >&6
22720else
22721  case $TIME in
22722  [\\/]* | ?:[\\/]*)
22723  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22724  ;;
22725  *)
22726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22727for as_dir in $PATH
22728do
22729  IFS=$as_save_IFS
22730  test -z "$as_dir" && as_dir=.
22731    for ac_exec_ext in '' $ac_executable_extensions; do
22732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22733    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22735    break 2
22736  fi
22737done
22738  done
22739IFS=$as_save_IFS
22740
22741  ;;
22742esac
22743fi
22744TIME=$ac_cv_path_TIME
22745if test -n "$TIME"; then
22746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22747$as_echo "$TIME" >&6; }
22748else
22749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22750$as_echo "no" >&6; }
22751fi
22752
22753
22754          if test "x$TIME" = x; then
22755            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22756          fi
22757        else
22758          # Otherwise we believe it is a complete path. Use it as it is.
22759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22760$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22761          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22762$as_echo_n "checking for TIME... " >&6; }
22763          if test ! -x "$tool_specified"; then
22764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22765$as_echo "not found" >&6; }
22766            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22767          fi
22768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22769$as_echo "$tool_specified" >&6; }
22770        fi
22771      fi
22772    fi
22773
22774  fi
22775
22776
22777
22778
22779  # Publish this variable in the help.
22780
22781
22782  if [ -z "${DTRACE+x}" ]; then
22783    # The variable is not set by user, try to locate tool using the code snippet
22784    for ac_prog in dtrace
22785do
22786  # Extract the first word of "$ac_prog", so it can be a program name with args.
22787set dummy $ac_prog; ac_word=$2
22788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22789$as_echo_n "checking for $ac_word... " >&6; }
22790if ${ac_cv_path_DTRACE+:} false; then :
22791  $as_echo_n "(cached) " >&6
22792else
22793  case $DTRACE in
22794  [\\/]* | ?:[\\/]*)
22795  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22796  ;;
22797  *)
22798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22799for as_dir in $PATH
22800do
22801  IFS=$as_save_IFS
22802  test -z "$as_dir" && as_dir=.
22803    for ac_exec_ext in '' $ac_executable_extensions; do
22804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22805    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22807    break 2
22808  fi
22809done
22810  done
22811IFS=$as_save_IFS
22812
22813  ;;
22814esac
22815fi
22816DTRACE=$ac_cv_path_DTRACE
22817if test -n "$DTRACE"; then
22818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22819$as_echo "$DTRACE" >&6; }
22820else
22821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22822$as_echo "no" >&6; }
22823fi
22824
22825
22826  test -n "$DTRACE" && break
22827done
22828
22829  else
22830    # The variable is set, but is it from the command line or the environment?
22831
22832    # Try to remove the string !DTRACE! from our list.
22833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22835      # If it failed, the variable was not from the command line. Ignore it,
22836      # but warn the user (except for BASH, which is always set by the calling BASH).
22837      if test "xDTRACE" != xBASH; then
22838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22839$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22840      fi
22841      # Try to locate tool using the code snippet
22842      for ac_prog in dtrace
22843do
22844  # Extract the first word of "$ac_prog", so it can be a program name with args.
22845set dummy $ac_prog; ac_word=$2
22846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22847$as_echo_n "checking for $ac_word... " >&6; }
22848if ${ac_cv_path_DTRACE+:} false; then :
22849  $as_echo_n "(cached) " >&6
22850else
22851  case $DTRACE in
22852  [\\/]* | ?:[\\/]*)
22853  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22854  ;;
22855  *)
22856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22857for as_dir in $PATH
22858do
22859  IFS=$as_save_IFS
22860  test -z "$as_dir" && as_dir=.
22861    for ac_exec_ext in '' $ac_executable_extensions; do
22862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22863    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22865    break 2
22866  fi
22867done
22868  done
22869IFS=$as_save_IFS
22870
22871  ;;
22872esac
22873fi
22874DTRACE=$ac_cv_path_DTRACE
22875if test -n "$DTRACE"; then
22876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22877$as_echo "$DTRACE" >&6; }
22878else
22879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22880$as_echo "no" >&6; }
22881fi
22882
22883
22884  test -n "$DTRACE" && break
22885done
22886
22887    else
22888      # If it succeeded, then it was overridden by the user. We will use it
22889      # for the tool.
22890
22891      # First remove it from the list of overridden variables, so we can test
22892      # for unknown variables in the end.
22893      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22894
22895      # Check if we try to supply an empty value
22896      if test "x$DTRACE" = x; then
22897        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22898$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22899        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22900$as_echo_n "checking for DTRACE... " >&6; }
22901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22902$as_echo "disabled" >&6; }
22903      else
22904        # Check if the provided tool contains a complete path.
22905        tool_specified="$DTRACE"
22906        tool_basename="${tool_specified##*/}"
22907        if test "x$tool_basename" = "x$tool_specified"; then
22908          # A command without a complete path is provided, search $PATH.
22909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22910$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22911          # Extract the first word of "$tool_basename", so it can be a program name with args.
22912set dummy $tool_basename; ac_word=$2
22913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22914$as_echo_n "checking for $ac_word... " >&6; }
22915if ${ac_cv_path_DTRACE+:} false; then :
22916  $as_echo_n "(cached) " >&6
22917else
22918  case $DTRACE in
22919  [\\/]* | ?:[\\/]*)
22920  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22921  ;;
22922  *)
22923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22924for as_dir in $PATH
22925do
22926  IFS=$as_save_IFS
22927  test -z "$as_dir" && as_dir=.
22928    for ac_exec_ext in '' $ac_executable_extensions; do
22929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22930    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22932    break 2
22933  fi
22934done
22935  done
22936IFS=$as_save_IFS
22937
22938  ;;
22939esac
22940fi
22941DTRACE=$ac_cv_path_DTRACE
22942if test -n "$DTRACE"; then
22943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22944$as_echo "$DTRACE" >&6; }
22945else
22946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22947$as_echo "no" >&6; }
22948fi
22949
22950
22951          if test "x$DTRACE" = x; then
22952            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22953          fi
22954        else
22955          # Otherwise we believe it is a complete path. Use it as it is.
22956          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22957$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22958          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22959$as_echo_n "checking for DTRACE... " >&6; }
22960          if test ! -x "$tool_specified"; then
22961            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22962$as_echo "not found" >&6; }
22963            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22964          fi
22965          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22966$as_echo "$tool_specified" >&6; }
22967        fi
22968      fi
22969    fi
22970
22971  fi
22972
22973
22974
22975
22976  # Publish this variable in the help.
22977
22978
22979  if [ -z "${PATCH+x}" ]; then
22980    # The variable is not set by user, try to locate tool using the code snippet
22981    for ac_prog in gpatch patch
22982do
22983  # Extract the first word of "$ac_prog", so it can be a program name with args.
22984set dummy $ac_prog; ac_word=$2
22985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22986$as_echo_n "checking for $ac_word... " >&6; }
22987if ${ac_cv_path_PATCH+:} false; then :
22988  $as_echo_n "(cached) " >&6
22989else
22990  case $PATCH in
22991  [\\/]* | ?:[\\/]*)
22992  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22993  ;;
22994  *)
22995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22996for as_dir in $PATH
22997do
22998  IFS=$as_save_IFS
22999  test -z "$as_dir" && as_dir=.
23000    for ac_exec_ext in '' $ac_executable_extensions; do
23001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23002    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23004    break 2
23005  fi
23006done
23007  done
23008IFS=$as_save_IFS
23009
23010  ;;
23011esac
23012fi
23013PATCH=$ac_cv_path_PATCH
23014if test -n "$PATCH"; then
23015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23016$as_echo "$PATCH" >&6; }
23017else
23018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23019$as_echo "no" >&6; }
23020fi
23021
23022
23023  test -n "$PATCH" && break
23024done
23025
23026  else
23027    # The variable is set, but is it from the command line or the environment?
23028
23029    # Try to remove the string !PATCH! from our list.
23030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23032      # If it failed, the variable was not from the command line. Ignore it,
23033      # but warn the user (except for BASH, which is always set by the calling BASH).
23034      if test "xPATCH" != xBASH; then
23035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23036$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23037      fi
23038      # Try to locate tool using the code snippet
23039      for ac_prog in gpatch patch
23040do
23041  # Extract the first word of "$ac_prog", so it can be a program name with args.
23042set dummy $ac_prog; ac_word=$2
23043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23044$as_echo_n "checking for $ac_word... " >&6; }
23045if ${ac_cv_path_PATCH+:} false; then :
23046  $as_echo_n "(cached) " >&6
23047else
23048  case $PATCH in
23049  [\\/]* | ?:[\\/]*)
23050  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23051  ;;
23052  *)
23053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23054for as_dir in $PATH
23055do
23056  IFS=$as_save_IFS
23057  test -z "$as_dir" && as_dir=.
23058    for ac_exec_ext in '' $ac_executable_extensions; do
23059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23060    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23062    break 2
23063  fi
23064done
23065  done
23066IFS=$as_save_IFS
23067
23068  ;;
23069esac
23070fi
23071PATCH=$ac_cv_path_PATCH
23072if test -n "$PATCH"; then
23073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23074$as_echo "$PATCH" >&6; }
23075else
23076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23077$as_echo "no" >&6; }
23078fi
23079
23080
23081  test -n "$PATCH" && break
23082done
23083
23084    else
23085      # If it succeeded, then it was overridden by the user. We will use it
23086      # for the tool.
23087
23088      # First remove it from the list of overridden variables, so we can test
23089      # for unknown variables in the end.
23090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23091
23092      # Check if we try to supply an empty value
23093      if test "x$PATCH" = x; then
23094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23095$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23097$as_echo_n "checking for PATCH... " >&6; }
23098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23099$as_echo "disabled" >&6; }
23100      else
23101        # Check if the provided tool contains a complete path.
23102        tool_specified="$PATCH"
23103        tool_basename="${tool_specified##*/}"
23104        if test "x$tool_basename" = "x$tool_specified"; then
23105          # A command without a complete path is provided, search $PATH.
23106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23107$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23108          # Extract the first word of "$tool_basename", so it can be a program name with args.
23109set dummy $tool_basename; ac_word=$2
23110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23111$as_echo_n "checking for $ac_word... " >&6; }
23112if ${ac_cv_path_PATCH+:} false; then :
23113  $as_echo_n "(cached) " >&6
23114else
23115  case $PATCH in
23116  [\\/]* | ?:[\\/]*)
23117  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23118  ;;
23119  *)
23120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23121for as_dir in $PATH
23122do
23123  IFS=$as_save_IFS
23124  test -z "$as_dir" && as_dir=.
23125    for ac_exec_ext in '' $ac_executable_extensions; do
23126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23127    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23129    break 2
23130  fi
23131done
23132  done
23133IFS=$as_save_IFS
23134
23135  ;;
23136esac
23137fi
23138PATCH=$ac_cv_path_PATCH
23139if test -n "$PATCH"; then
23140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23141$as_echo "$PATCH" >&6; }
23142else
23143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23144$as_echo "no" >&6; }
23145fi
23146
23147
23148          if test "x$PATCH" = x; then
23149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23150          fi
23151        else
23152          # Otherwise we believe it is a complete path. Use it as it is.
23153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23154$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23156$as_echo_n "checking for PATCH... " >&6; }
23157          if test ! -x "$tool_specified"; then
23158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23159$as_echo "not found" >&6; }
23160            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23161          fi
23162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23163$as_echo "$tool_specified" >&6; }
23164        fi
23165      fi
23166    fi
23167
23168  fi
23169
23170
23171  # Check if it's GNU time
23172  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23173  if test "x$IS_GNU_TIME" != x; then
23174    IS_GNU_TIME=yes
23175  else
23176    IS_GNU_TIME=no
23177  fi
23178
23179
23180  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23181
23182
23183
23184  # Publish this variable in the help.
23185
23186
23187  if [ -z "${DSYMUTIL+x}" ]; then
23188    # The variable is not set by user, try to locate tool using the code snippet
23189    for ac_prog in dsymutil
23190do
23191  # Extract the first word of "$ac_prog", so it can be a program name with args.
23192set dummy $ac_prog; ac_word=$2
23193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23194$as_echo_n "checking for $ac_word... " >&6; }
23195if ${ac_cv_path_DSYMUTIL+:} false; then :
23196  $as_echo_n "(cached) " >&6
23197else
23198  case $DSYMUTIL in
23199  [\\/]* | ?:[\\/]*)
23200  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23201  ;;
23202  *)
23203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23204for as_dir in $PATH
23205do
23206  IFS=$as_save_IFS
23207  test -z "$as_dir" && as_dir=.
23208    for ac_exec_ext in '' $ac_executable_extensions; do
23209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23210    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23212    break 2
23213  fi
23214done
23215  done
23216IFS=$as_save_IFS
23217
23218  ;;
23219esac
23220fi
23221DSYMUTIL=$ac_cv_path_DSYMUTIL
23222if test -n "$DSYMUTIL"; then
23223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23224$as_echo "$DSYMUTIL" >&6; }
23225else
23226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23227$as_echo "no" >&6; }
23228fi
23229
23230
23231  test -n "$DSYMUTIL" && break
23232done
23233
23234  else
23235    # The variable is set, but is it from the command line or the environment?
23236
23237    # Try to remove the string !DSYMUTIL! from our list.
23238    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23239    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23240      # If it failed, the variable was not from the command line. Ignore it,
23241      # but warn the user (except for BASH, which is always set by the calling BASH).
23242      if test "xDSYMUTIL" != xBASH; then
23243        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23244$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23245      fi
23246      # Try to locate tool using the code snippet
23247      for ac_prog in dsymutil
23248do
23249  # Extract the first word of "$ac_prog", so it can be a program name with args.
23250set dummy $ac_prog; ac_word=$2
23251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23252$as_echo_n "checking for $ac_word... " >&6; }
23253if ${ac_cv_path_DSYMUTIL+:} false; then :
23254  $as_echo_n "(cached) " >&6
23255else
23256  case $DSYMUTIL in
23257  [\\/]* | ?:[\\/]*)
23258  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23259  ;;
23260  *)
23261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23262for as_dir in $PATH
23263do
23264  IFS=$as_save_IFS
23265  test -z "$as_dir" && as_dir=.
23266    for ac_exec_ext in '' $ac_executable_extensions; do
23267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23268    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23270    break 2
23271  fi
23272done
23273  done
23274IFS=$as_save_IFS
23275
23276  ;;
23277esac
23278fi
23279DSYMUTIL=$ac_cv_path_DSYMUTIL
23280if test -n "$DSYMUTIL"; then
23281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23282$as_echo "$DSYMUTIL" >&6; }
23283else
23284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23285$as_echo "no" >&6; }
23286fi
23287
23288
23289  test -n "$DSYMUTIL" && break
23290done
23291
23292    else
23293      # If it succeeded, then it was overridden by the user. We will use it
23294      # for the tool.
23295
23296      # First remove it from the list of overridden variables, so we can test
23297      # for unknown variables in the end.
23298      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23299
23300      # Check if we try to supply an empty value
23301      if test "x$DSYMUTIL" = x; then
23302        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23303$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23304        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23305$as_echo_n "checking for DSYMUTIL... " >&6; }
23306        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23307$as_echo "disabled" >&6; }
23308      else
23309        # Check if the provided tool contains a complete path.
23310        tool_specified="$DSYMUTIL"
23311        tool_basename="${tool_specified##*/}"
23312        if test "x$tool_basename" = "x$tool_specified"; then
23313          # A command without a complete path is provided, search $PATH.
23314          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23315$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23316          # Extract the first word of "$tool_basename", so it can be a program name with args.
23317set dummy $tool_basename; ac_word=$2
23318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23319$as_echo_n "checking for $ac_word... " >&6; }
23320if ${ac_cv_path_DSYMUTIL+:} false; then :
23321  $as_echo_n "(cached) " >&6
23322else
23323  case $DSYMUTIL in
23324  [\\/]* | ?:[\\/]*)
23325  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23326  ;;
23327  *)
23328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23329for as_dir in $PATH
23330do
23331  IFS=$as_save_IFS
23332  test -z "$as_dir" && as_dir=.
23333    for ac_exec_ext in '' $ac_executable_extensions; do
23334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23335    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23337    break 2
23338  fi
23339done
23340  done
23341IFS=$as_save_IFS
23342
23343  ;;
23344esac
23345fi
23346DSYMUTIL=$ac_cv_path_DSYMUTIL
23347if test -n "$DSYMUTIL"; then
23348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23349$as_echo "$DSYMUTIL" >&6; }
23350else
23351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23352$as_echo "no" >&6; }
23353fi
23354
23355
23356          if test "x$DSYMUTIL" = x; then
23357            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23358          fi
23359        else
23360          # Otherwise we believe it is a complete path. Use it as it is.
23361          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23362$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23363          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23364$as_echo_n "checking for DSYMUTIL... " >&6; }
23365          if test ! -x "$tool_specified"; then
23366            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23367$as_echo "not found" >&6; }
23368            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23369          fi
23370          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23371$as_echo "$tool_specified" >&6; }
23372        fi
23373      fi
23374    fi
23375
23376  fi
23377
23378
23379
23380  if test "x$DSYMUTIL" = x; then
23381    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23382  fi
23383
23384
23385
23386
23387
23388  # Publish this variable in the help.
23389
23390
23391  if [ -z "${XATTR+x}" ]; then
23392    # The variable is not set by user, try to locate tool using the code snippet
23393    for ac_prog in xattr
23394do
23395  # Extract the first word of "$ac_prog", so it can be a program name with args.
23396set dummy $ac_prog; ac_word=$2
23397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23398$as_echo_n "checking for $ac_word... " >&6; }
23399if ${ac_cv_path_XATTR+:} false; then :
23400  $as_echo_n "(cached) " >&6
23401else
23402  case $XATTR in
23403  [\\/]* | ?:[\\/]*)
23404  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23405  ;;
23406  *)
23407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23408for as_dir in $PATH
23409do
23410  IFS=$as_save_IFS
23411  test -z "$as_dir" && as_dir=.
23412    for ac_exec_ext in '' $ac_executable_extensions; do
23413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23414    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23416    break 2
23417  fi
23418done
23419  done
23420IFS=$as_save_IFS
23421
23422  ;;
23423esac
23424fi
23425XATTR=$ac_cv_path_XATTR
23426if test -n "$XATTR"; then
23427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23428$as_echo "$XATTR" >&6; }
23429else
23430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23431$as_echo "no" >&6; }
23432fi
23433
23434
23435  test -n "$XATTR" && break
23436done
23437
23438  else
23439    # The variable is set, but is it from the command line or the environment?
23440
23441    # Try to remove the string !XATTR! from our list.
23442    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23443    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23444      # If it failed, the variable was not from the command line. Ignore it,
23445      # but warn the user (except for BASH, which is always set by the calling BASH).
23446      if test "xXATTR" != xBASH; then
23447        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23448$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23449      fi
23450      # Try to locate tool using the code snippet
23451      for ac_prog in xattr
23452do
23453  # Extract the first word of "$ac_prog", so it can be a program name with args.
23454set dummy $ac_prog; ac_word=$2
23455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23456$as_echo_n "checking for $ac_word... " >&6; }
23457if ${ac_cv_path_XATTR+:} false; then :
23458  $as_echo_n "(cached) " >&6
23459else
23460  case $XATTR in
23461  [\\/]* | ?:[\\/]*)
23462  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23463  ;;
23464  *)
23465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23466for as_dir in $PATH
23467do
23468  IFS=$as_save_IFS
23469  test -z "$as_dir" && as_dir=.
23470    for ac_exec_ext in '' $ac_executable_extensions; do
23471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23472    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23474    break 2
23475  fi
23476done
23477  done
23478IFS=$as_save_IFS
23479
23480  ;;
23481esac
23482fi
23483XATTR=$ac_cv_path_XATTR
23484if test -n "$XATTR"; then
23485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23486$as_echo "$XATTR" >&6; }
23487else
23488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23489$as_echo "no" >&6; }
23490fi
23491
23492
23493  test -n "$XATTR" && break
23494done
23495
23496    else
23497      # If it succeeded, then it was overridden by the user. We will use it
23498      # for the tool.
23499
23500      # First remove it from the list of overridden variables, so we can test
23501      # for unknown variables in the end.
23502      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23503
23504      # Check if we try to supply an empty value
23505      if test "x$XATTR" = x; then
23506        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23507$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23508        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23509$as_echo_n "checking for XATTR... " >&6; }
23510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23511$as_echo "disabled" >&6; }
23512      else
23513        # Check if the provided tool contains a complete path.
23514        tool_specified="$XATTR"
23515        tool_basename="${tool_specified##*/}"
23516        if test "x$tool_basename" = "x$tool_specified"; then
23517          # A command without a complete path is provided, search $PATH.
23518          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23519$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23520          # Extract the first word of "$tool_basename", so it can be a program name with args.
23521set dummy $tool_basename; ac_word=$2
23522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23523$as_echo_n "checking for $ac_word... " >&6; }
23524if ${ac_cv_path_XATTR+:} false; then :
23525  $as_echo_n "(cached) " >&6
23526else
23527  case $XATTR in
23528  [\\/]* | ?:[\\/]*)
23529  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23530  ;;
23531  *)
23532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23533for as_dir in $PATH
23534do
23535  IFS=$as_save_IFS
23536  test -z "$as_dir" && as_dir=.
23537    for ac_exec_ext in '' $ac_executable_extensions; do
23538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23539    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23541    break 2
23542  fi
23543done
23544  done
23545IFS=$as_save_IFS
23546
23547  ;;
23548esac
23549fi
23550XATTR=$ac_cv_path_XATTR
23551if test -n "$XATTR"; then
23552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23553$as_echo "$XATTR" >&6; }
23554else
23555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23556$as_echo "no" >&6; }
23557fi
23558
23559
23560          if test "x$XATTR" = x; then
23561            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23562          fi
23563        else
23564          # Otherwise we believe it is a complete path. Use it as it is.
23565          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23566$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23567          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23568$as_echo_n "checking for XATTR... " >&6; }
23569          if test ! -x "$tool_specified"; then
23570            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23571$as_echo "not found" >&6; }
23572            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23573          fi
23574          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23575$as_echo "$tool_specified" >&6; }
23576        fi
23577      fi
23578    fi
23579
23580  fi
23581
23582
23583
23584  if test "x$XATTR" = x; then
23585    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23586  fi
23587
23588
23589
23590
23591  # Publish this variable in the help.
23592
23593
23594  if [ -z "${CODESIGN+x}" ]; then
23595    # The variable is not set by user, try to locate tool using the code snippet
23596    for ac_prog in codesign
23597do
23598  # Extract the first word of "$ac_prog", so it can be a program name with args.
23599set dummy $ac_prog; ac_word=$2
23600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23601$as_echo_n "checking for $ac_word... " >&6; }
23602if ${ac_cv_path_CODESIGN+:} false; then :
23603  $as_echo_n "(cached) " >&6
23604else
23605  case $CODESIGN in
23606  [\\/]* | ?:[\\/]*)
23607  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23608  ;;
23609  *)
23610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23611for as_dir in $PATH
23612do
23613  IFS=$as_save_IFS
23614  test -z "$as_dir" && as_dir=.
23615    for ac_exec_ext in '' $ac_executable_extensions; do
23616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23617    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23619    break 2
23620  fi
23621done
23622  done
23623IFS=$as_save_IFS
23624
23625  ;;
23626esac
23627fi
23628CODESIGN=$ac_cv_path_CODESIGN
23629if test -n "$CODESIGN"; then
23630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23631$as_echo "$CODESIGN" >&6; }
23632else
23633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23634$as_echo "no" >&6; }
23635fi
23636
23637
23638  test -n "$CODESIGN" && break
23639done
23640
23641  else
23642    # The variable is set, but is it from the command line or the environment?
23643
23644    # Try to remove the string !CODESIGN! from our list.
23645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23647      # If it failed, the variable was not from the command line. Ignore it,
23648      # but warn the user (except for BASH, which is always set by the calling BASH).
23649      if test "xCODESIGN" != xBASH; then
23650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23651$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23652      fi
23653      # Try to locate tool using the code snippet
23654      for ac_prog in codesign
23655do
23656  # Extract the first word of "$ac_prog", so it can be a program name with args.
23657set dummy $ac_prog; ac_word=$2
23658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23659$as_echo_n "checking for $ac_word... " >&6; }
23660if ${ac_cv_path_CODESIGN+:} false; then :
23661  $as_echo_n "(cached) " >&6
23662else
23663  case $CODESIGN in
23664  [\\/]* | ?:[\\/]*)
23665  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23666  ;;
23667  *)
23668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23669for as_dir in $PATH
23670do
23671  IFS=$as_save_IFS
23672  test -z "$as_dir" && as_dir=.
23673    for ac_exec_ext in '' $ac_executable_extensions; do
23674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23675    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23677    break 2
23678  fi
23679done
23680  done
23681IFS=$as_save_IFS
23682
23683  ;;
23684esac
23685fi
23686CODESIGN=$ac_cv_path_CODESIGN
23687if test -n "$CODESIGN"; then
23688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23689$as_echo "$CODESIGN" >&6; }
23690else
23691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23692$as_echo "no" >&6; }
23693fi
23694
23695
23696  test -n "$CODESIGN" && break
23697done
23698
23699    else
23700      # If it succeeded, then it was overridden by the user. We will use it
23701      # for the tool.
23702
23703      # First remove it from the list of overridden variables, so we can test
23704      # for unknown variables in the end.
23705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23706
23707      # Check if we try to supply an empty value
23708      if test "x$CODESIGN" = x; then
23709        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23710$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23712$as_echo_n "checking for CODESIGN... " >&6; }
23713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23714$as_echo "disabled" >&6; }
23715      else
23716        # Check if the provided tool contains a complete path.
23717        tool_specified="$CODESIGN"
23718        tool_basename="${tool_specified##*/}"
23719        if test "x$tool_basename" = "x$tool_specified"; then
23720          # A command without a complete path is provided, search $PATH.
23721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23722$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23723          # Extract the first word of "$tool_basename", so it can be a program name with args.
23724set dummy $tool_basename; ac_word=$2
23725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23726$as_echo_n "checking for $ac_word... " >&6; }
23727if ${ac_cv_path_CODESIGN+:} false; then :
23728  $as_echo_n "(cached) " >&6
23729else
23730  case $CODESIGN in
23731  [\\/]* | ?:[\\/]*)
23732  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23733  ;;
23734  *)
23735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23736for as_dir in $PATH
23737do
23738  IFS=$as_save_IFS
23739  test -z "$as_dir" && as_dir=.
23740    for ac_exec_ext in '' $ac_executable_extensions; do
23741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23742    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23744    break 2
23745  fi
23746done
23747  done
23748IFS=$as_save_IFS
23749
23750  ;;
23751esac
23752fi
23753CODESIGN=$ac_cv_path_CODESIGN
23754if test -n "$CODESIGN"; then
23755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23756$as_echo "$CODESIGN" >&6; }
23757else
23758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23759$as_echo "no" >&6; }
23760fi
23761
23762
23763          if test "x$CODESIGN" = x; then
23764            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23765          fi
23766        else
23767          # Otherwise we believe it is a complete path. Use it as it is.
23768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23769$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23770          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23771$as_echo_n "checking for CODESIGN... " >&6; }
23772          if test ! -x "$tool_specified"; then
23773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23774$as_echo "not found" >&6; }
23775            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23776          fi
23777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23778$as_echo "$tool_specified" >&6; }
23779        fi
23780      fi
23781    fi
23782
23783  fi
23784
23785
23786    if test "x$CODESIGN" != "x"; then
23787      # Verify that the openjdk_codesign certificate is present
23788      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23789$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23790      $RM codesign-testfile
23791      $TOUCH codesign-testfile
23792      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23793      $RM codesign-testfile
23794      if test "x$CODESIGN" = x; then
23795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23796$as_echo "no" >&6; }
23797      else
23798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23799$as_echo "yes" >&6; }
23800      fi
23801    fi
23802
23803
23804
23805  # Publish this variable in the help.
23806
23807
23808  if [ -z "${SETFILE+x}" ]; then
23809    # The variable is not set by user, try to locate tool using the code snippet
23810    for ac_prog in SetFile
23811do
23812  # Extract the first word of "$ac_prog", so it can be a program name with args.
23813set dummy $ac_prog; ac_word=$2
23814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23815$as_echo_n "checking for $ac_word... " >&6; }
23816if ${ac_cv_path_SETFILE+:} false; then :
23817  $as_echo_n "(cached) " >&6
23818else
23819  case $SETFILE in
23820  [\\/]* | ?:[\\/]*)
23821  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23822  ;;
23823  *)
23824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23825for as_dir in $PATH
23826do
23827  IFS=$as_save_IFS
23828  test -z "$as_dir" && as_dir=.
23829    for ac_exec_ext in '' $ac_executable_extensions; do
23830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23831    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23833    break 2
23834  fi
23835done
23836  done
23837IFS=$as_save_IFS
23838
23839  ;;
23840esac
23841fi
23842SETFILE=$ac_cv_path_SETFILE
23843if test -n "$SETFILE"; then
23844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23845$as_echo "$SETFILE" >&6; }
23846else
23847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23848$as_echo "no" >&6; }
23849fi
23850
23851
23852  test -n "$SETFILE" && break
23853done
23854
23855  else
23856    # The variable is set, but is it from the command line or the environment?
23857
23858    # Try to remove the string !SETFILE! from our list.
23859    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23860    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23861      # If it failed, the variable was not from the command line. Ignore it,
23862      # but warn the user (except for BASH, which is always set by the calling BASH).
23863      if test "xSETFILE" != xBASH; then
23864        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23865$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23866      fi
23867      # Try to locate tool using the code snippet
23868      for ac_prog in SetFile
23869do
23870  # Extract the first word of "$ac_prog", so it can be a program name with args.
23871set dummy $ac_prog; ac_word=$2
23872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23873$as_echo_n "checking for $ac_word... " >&6; }
23874if ${ac_cv_path_SETFILE+:} false; then :
23875  $as_echo_n "(cached) " >&6
23876else
23877  case $SETFILE in
23878  [\\/]* | ?:[\\/]*)
23879  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23880  ;;
23881  *)
23882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23883for as_dir in $PATH
23884do
23885  IFS=$as_save_IFS
23886  test -z "$as_dir" && as_dir=.
23887    for ac_exec_ext in '' $ac_executable_extensions; do
23888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23889    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23891    break 2
23892  fi
23893done
23894  done
23895IFS=$as_save_IFS
23896
23897  ;;
23898esac
23899fi
23900SETFILE=$ac_cv_path_SETFILE
23901if test -n "$SETFILE"; then
23902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23903$as_echo "$SETFILE" >&6; }
23904else
23905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23906$as_echo "no" >&6; }
23907fi
23908
23909
23910  test -n "$SETFILE" && break
23911done
23912
23913    else
23914      # If it succeeded, then it was overridden by the user. We will use it
23915      # for the tool.
23916
23917      # First remove it from the list of overridden variables, so we can test
23918      # for unknown variables in the end.
23919      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23920
23921      # Check if we try to supply an empty value
23922      if test "x$SETFILE" = x; then
23923        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23924$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23925        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23926$as_echo_n "checking for SETFILE... " >&6; }
23927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23928$as_echo "disabled" >&6; }
23929      else
23930        # Check if the provided tool contains a complete path.
23931        tool_specified="$SETFILE"
23932        tool_basename="${tool_specified##*/}"
23933        if test "x$tool_basename" = "x$tool_specified"; then
23934          # A command without a complete path is provided, search $PATH.
23935          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23936$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23937          # Extract the first word of "$tool_basename", so it can be a program name with args.
23938set dummy $tool_basename; ac_word=$2
23939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23940$as_echo_n "checking for $ac_word... " >&6; }
23941if ${ac_cv_path_SETFILE+:} false; then :
23942  $as_echo_n "(cached) " >&6
23943else
23944  case $SETFILE in
23945  [\\/]* | ?:[\\/]*)
23946  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23947  ;;
23948  *)
23949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23950for as_dir in $PATH
23951do
23952  IFS=$as_save_IFS
23953  test -z "$as_dir" && as_dir=.
23954    for ac_exec_ext in '' $ac_executable_extensions; do
23955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23956    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23958    break 2
23959  fi
23960done
23961  done
23962IFS=$as_save_IFS
23963
23964  ;;
23965esac
23966fi
23967SETFILE=$ac_cv_path_SETFILE
23968if test -n "$SETFILE"; then
23969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23970$as_echo "$SETFILE" >&6; }
23971else
23972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23973$as_echo "no" >&6; }
23974fi
23975
23976
23977          if test "x$SETFILE" = x; then
23978            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23979          fi
23980        else
23981          # Otherwise we believe it is a complete path. Use it as it is.
23982          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23983$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23984          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23985$as_echo_n "checking for SETFILE... " >&6; }
23986          if test ! -x "$tool_specified"; then
23987            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23988$as_echo "not found" >&6; }
23989            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23990          fi
23991          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23992$as_echo "$tool_specified" >&6; }
23993        fi
23994      fi
23995    fi
23996
23997  fi
23998
23999
24000
24001  if test "x$SETFILE" = x; then
24002    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24003  fi
24004
24005
24006  fi
24007
24008
24009  # Test if bash supports pipefail.
24010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24011$as_echo_n "checking if bash supports pipefail... " >&6; }
24012  if ${BASH} -c 'set -o pipefail'; then
24013    BASH_ARGS="$BASH_ARGS -o pipefail"
24014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24015$as_echo "yes" >&6; }
24016  else
24017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24018$as_echo "no" >&6; }
24019  fi
24020
24021  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24022$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24023  if ${BASH} -e -c 'true'; then
24024    BASH_ARGS="$BASH_ARGS -e"
24025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24026$as_echo "yes" >&6; }
24027  else
24028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24029$as_echo "no" >&6; }
24030  fi
24031
24032
24033
24034
24035# Check if pkg-config is available.
24036
24037
24038if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24039	if test -n "$ac_tool_prefix"; then
24040  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24041set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24043$as_echo_n "checking for $ac_word... " >&6; }
24044if ${ac_cv_path_PKG_CONFIG+:} false; then :
24045  $as_echo_n "(cached) " >&6
24046else
24047  case $PKG_CONFIG in
24048  [\\/]* | ?:[\\/]*)
24049  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24050  ;;
24051  *)
24052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24053for as_dir in $PATH
24054do
24055  IFS=$as_save_IFS
24056  test -z "$as_dir" && as_dir=.
24057    for ac_exec_ext in '' $ac_executable_extensions; do
24058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24059    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24061    break 2
24062  fi
24063done
24064  done
24065IFS=$as_save_IFS
24066
24067  ;;
24068esac
24069fi
24070PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24071if test -n "$PKG_CONFIG"; then
24072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24073$as_echo "$PKG_CONFIG" >&6; }
24074else
24075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24076$as_echo "no" >&6; }
24077fi
24078
24079
24080fi
24081if test -z "$ac_cv_path_PKG_CONFIG"; then
24082  ac_pt_PKG_CONFIG=$PKG_CONFIG
24083  # Extract the first word of "pkg-config", so it can be a program name with args.
24084set dummy pkg-config; ac_word=$2
24085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24086$as_echo_n "checking for $ac_word... " >&6; }
24087if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24088  $as_echo_n "(cached) " >&6
24089else
24090  case $ac_pt_PKG_CONFIG in
24091  [\\/]* | ?:[\\/]*)
24092  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24093  ;;
24094  *)
24095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24096for as_dir in $PATH
24097do
24098  IFS=$as_save_IFS
24099  test -z "$as_dir" && as_dir=.
24100    for ac_exec_ext in '' $ac_executable_extensions; do
24101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24102    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24104    break 2
24105  fi
24106done
24107  done
24108IFS=$as_save_IFS
24109
24110  ;;
24111esac
24112fi
24113ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24114if test -n "$ac_pt_PKG_CONFIG"; then
24115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24116$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24117else
24118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24119$as_echo "no" >&6; }
24120fi
24121
24122  if test "x$ac_pt_PKG_CONFIG" = x; then
24123    PKG_CONFIG=""
24124  else
24125    case $cross_compiling:$ac_tool_warned in
24126yes:)
24127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24129ac_tool_warned=yes ;;
24130esac
24131    PKG_CONFIG=$ac_pt_PKG_CONFIG
24132  fi
24133else
24134  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24135fi
24136
24137fi
24138if test -n "$PKG_CONFIG"; then
24139	_pkg_min_version=0.9.0
24140	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24141$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24142	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24143		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24144$as_echo "yes" >&6; }
24145	else
24146		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24147$as_echo "no" >&6; }
24148		PKG_CONFIG=""
24149	fi
24150
24151fi
24152
24153# After basic tools have been setup, we can check build os specific details.
24154
24155  ###############################################################################
24156
24157  # Note that this is the build platform OS version!
24158
24159  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24160  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24161  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24162  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24163
24164
24165
24166
24167
24168# Misc basic settings
24169
24170
24171# Check whether --with-default-make-target was given.
24172if test "${with_default_make_target+set}" = set; then :
24173  withval=$with_default_make_target;
24174fi
24175
24176  if test "x$with_default_make_target" = "x" \
24177      || test "x$with_default_make_target" = "xyes"; then
24178    DEFAULT_MAKE_TARGET="exploded-image"
24179  elif test "x$with_default_make_target" = "xno"; then
24180    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24181  else
24182    DEFAULT_MAKE_TARGET="$with_default_make_target"
24183  fi
24184
24185
24186
24187
24188###############################################################################
24189#
24190# Determine OpenJDK variants, options and version numbers.
24191#
24192###############################################################################
24193
24194# We need build & target for this.
24195
24196  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
24197  # We always build headless support.
24198  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
24199$as_echo_n "checking headful support... " >&6; }
24200  # Check whether --enable-headful was given.
24201if test "${enable_headful+set}" = set; then :
24202  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
24203else
24204  SUPPORT_HEADFUL=yes
24205fi
24206
24207
24208  SUPPORT_HEADLESS=yes
24209  BUILD_HEADLESS="BUILD_HEADLESS:=true"
24210
24211  if test "x$SUPPORT_HEADFUL" = xyes; then
24212    # We are building both headful and headless.
24213    headful_msg="include support for both headful and headless"
24214  fi
24215
24216  if test "x$SUPPORT_HEADFUL" = xno; then
24217    # Thus we are building headless only.
24218    BUILD_HEADLESS="BUILD_HEADLESS:=true"
24219    headful_msg="headless only"
24220  fi
24221
24222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
24223$as_echo "$headful_msg" >&6; }
24224
24225
24226
24227
24228
24229  # Choose cacerts source file
24230
24231# Check whether --with-cacerts-file was given.
24232if test "${with_cacerts_file+set}" = set; then :
24233  withval=$with_cacerts_file;
24234fi
24235
24236  if test "x$with_cacerts_file" != x; then
24237    CACERTS_FILE=$with_cacerts_file
24238  fi
24239
24240
24241  # Enable or disable unlimited crypto
24242  # Check whether --enable-unlimited-crypto was given.
24243if test "${enable_unlimited_crypto+set}" = set; then :
24244  enableval=$enable_unlimited_crypto;
24245else
24246  enable_unlimited_crypto=no
24247fi
24248
24249  if test "x$enable_unlimited_crypto" = "xyes"; then
24250    UNLIMITED_CRYPTO=true
24251  else
24252    UNLIMITED_CRYPTO=false
24253  fi
24254
24255
24256  # Should we build the serviceability agent (SA)?
24257  INCLUDE_SA=true
24258  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24259    INCLUDE_SA=false
24260  fi
24261  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24262    INCLUDE_SA=false
24263  fi
24264
24265
24266  # Compress jars
24267  COMPRESS_JARS=false
24268
24269
24270
24271  # Setup default copyright year. Mostly overridden when building close to a new year.
24272
24273# Check whether --with-copyright-year was given.
24274if test "${with_copyright_year+set}" = set; then :
24275  withval=$with_copyright_year;
24276fi
24277
24278  if test "x$with_copyright_year" = xyes; then
24279    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24280  elif test "x$with_copyright_year" != x; then
24281    COPYRIGHT_YEAR="$with_copyright_year"
24282  else
24283    COPYRIGHT_YEAR=`$DATE +'%Y'`
24284  fi
24285
24286
24287
24288  # Check whether --enable-keep-packaged-modules was given.
24289if test "${enable_keep_packaged_modules+set}" = set; then :
24290  enableval=$enable_keep_packaged_modules;
24291fi
24292
24293
24294  if test "x$enable_keep_packaged_modules" = "xyes"; then
24295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24296$as_echo_n "checking if packaged modules are kept... " >&6; }
24297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24298$as_echo "yes" >&6; }
24299    JLINK_KEEP_PACKAGED_MODULES=true
24300  elif test "x$enable_keep_packaged_modules" = "xno"; then
24301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24302$as_echo_n "checking if packaged modules are kept... " >&6; }
24303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24304$as_echo "no" >&6; }
24305    JLINK_KEEP_PACKAGED_MODULES=false
24306  elif test "x$enable_keep_packaged_modules" = "x"; then
24307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24308$as_echo "yes (default)" >&6; }
24309    JLINK_KEEP_PACKAGED_MODULES=true
24310  else
24311    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24312  fi
24313
24314
24315
24316
24317  # Warn user that old version arguments are deprecated.
24318
24319
24320# Check whether --with-milestone was given.
24321if test "${with_milestone+set}" = set; then :
24322  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24323$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24324fi
24325
24326
24327
24328
24329# Check whether --with-update-version was given.
24330if test "${with_update_version+set}" = set; then :
24331  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24332$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24333fi
24334
24335
24336
24337
24338# Check whether --with-user-release-suffix was given.
24339if test "${with_user_release_suffix+set}" = set; then :
24340  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
24341$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24342fi
24343
24344
24345
24346
24347# Check whether --with-build-number was given.
24348if test "${with_build_number+set}" = set; then :
24349  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24350$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24351fi
24352
24353
24354
24355  # Source the version numbers file
24356  . $AUTOCONF_DIR/version-numbers
24357
24358  # Some non-version number information is set in that file
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368  # Override version from arguments
24369
24370  # If --with-version-string is set, process it first. It is possible to
24371  # override parts with more specific flags, since these are processed later.
24372
24373# Check whether --with-version-string was given.
24374if test "${with_version_string+set}" = set; then :
24375  withval=$with_version_string;
24376fi
24377
24378  if test "x$with_version_string" = xyes; then
24379    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24380  elif test "x$with_version_string" != x; then
24381    # Additional [] needed to keep m4 from mangling shell constructs.
24382    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24383      VERSION_MAJOR=${BASH_REMATCH[1]}
24384      VERSION_MINOR=${BASH_REMATCH[3]}
24385      VERSION_SECURITY=${BASH_REMATCH[5]}
24386      VERSION_PATCH=${BASH_REMATCH[7]}
24387      VERSION_PRE=${BASH_REMATCH[9]}
24388      version_plus_separator=${BASH_REMATCH[11]}
24389      VERSION_BUILD=${BASH_REMATCH[12]}
24390      VERSION_OPT=${BASH_REMATCH[14]}
24391      # Unspecified numerical fields are interpreted as 0.
24392      if test "x$VERSION_MINOR" = x; then
24393        VERSION_MINOR=0
24394      fi
24395      if test "x$VERSION_SECURITY" = x; then
24396        VERSION_SECURITY=0
24397      fi
24398      if test "x$VERSION_PATCH" = x; then
24399        VERSION_PATCH=0
24400      fi
24401      if test "x$version_plus_separator" != x \
24402          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24403        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24404      fi
24405      # Stop the version part process from setting default values.
24406      # We still allow them to explicitely override though.
24407      NO_DEFAULT_VERSION_PARTS=true
24408    else
24409      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24410    fi
24411  fi
24412
24413
24414# Check whether --with-version-pre was given.
24415if test "${with_version_pre+set}" = set; then :
24416  withval=$with_version_pre; with_version_pre_present=true
24417else
24418  with_version_pre_present=false
24419fi
24420
24421
24422  if test "x$with_version_pre_present" = xtrue; then
24423    if test "x$with_version_pre" = xyes; then
24424      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24425    elif test "x$with_version_pre" = xno; then
24426      # Interpret --without-* as empty string instead of the literal "no"
24427      VERSION_PRE=
24428    else
24429      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24430       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24431      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24432        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24433$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24434      fi
24435    fi
24436  else
24437    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24438      # Default is to use "internal" as pre
24439      VERSION_PRE="internal"
24440    fi
24441  fi
24442
24443
24444# Check whether --with-version-opt was given.
24445if test "${with_version_opt+set}" = set; then :
24446  withval=$with_version_opt; with_version_opt_present=true
24447else
24448  with_version_opt_present=false
24449fi
24450
24451
24452  if test "x$with_version_opt_present" = xtrue; then
24453    if test "x$with_version_opt" = xyes; then
24454      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24455    elif test "x$with_version_opt" = xno; then
24456      # Interpret --without-* as empty string instead of the literal "no"
24457      VERSION_OPT=
24458    else
24459      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24460       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24461      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24462        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24463$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24464      fi
24465    fi
24466  else
24467    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24468      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24469      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24470      # Outer [ ] to quote m4.
24471       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24472      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24473    fi
24474  fi
24475
24476
24477# Check whether --with-version-build was given.
24478if test "${with_version_build+set}" = set; then :
24479  withval=$with_version_build; with_version_build_present=true
24480else
24481  with_version_build_present=false
24482fi
24483
24484
24485  if test "x$with_version_build_present" = xtrue; then
24486    if test "x$with_version_build" = xyes; then
24487      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24488    elif test "x$with_version_build" = xno; then
24489      # Interpret --without-* as empty string instead of the literal "no"
24490      VERSION_BUILD=
24491    elif test "x$with_version_build" = x; then
24492      VERSION_BUILD=
24493    else
24494
24495  # Additional [] needed to keep m4 from mangling shell constructs.
24496  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24497    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24498  fi
24499  # Extract the version number without leading zeros.
24500  cleaned_value=${BASH_REMATCH[1]}
24501  if test "x$cleaned_value" = x; then
24502    # Special case for zero
24503    cleaned_value=${BASH_REMATCH[2]}
24504  fi
24505
24506  if test $cleaned_value -gt 255; then
24507    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24508  fi
24509  if test "x$cleaned_value" != "x$with_version_build"; then
24510    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24511$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24512  fi
24513  VERSION_BUILD=$cleaned_value
24514
24515    fi
24516  else
24517    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24518      # Default is to not have a build number.
24519      VERSION_BUILD=""
24520      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24521      VERSION_BUILD=0
24522    fi
24523  fi
24524
24525
24526# Check whether --with-version-major was given.
24527if test "${with_version_major+set}" = set; then :
24528  withval=$with_version_major; with_version_major_present=true
24529else
24530  with_version_major_present=false
24531fi
24532
24533
24534  if test "x$with_version_major_present" = xtrue; then
24535    if test "x$with_version_major" = xyes; then
24536      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24537    else
24538
24539  # Additional [] needed to keep m4 from mangling shell constructs.
24540  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24541    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24542  fi
24543  # Extract the version number without leading zeros.
24544  cleaned_value=${BASH_REMATCH[1]}
24545  if test "x$cleaned_value" = x; then
24546    # Special case for zero
24547    cleaned_value=${BASH_REMATCH[2]}
24548  fi
24549
24550  if test $cleaned_value -gt 255; then
24551    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24552  fi
24553  if test "x$cleaned_value" != "x$with_version_major"; then
24554    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24555$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24556  fi
24557  VERSION_MAJOR=$cleaned_value
24558
24559    fi
24560  else
24561    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24562      # Default is to get value from version-numbers
24563      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24564    fi
24565  fi
24566
24567
24568# Check whether --with-version-minor was given.
24569if test "${with_version_minor+set}" = set; then :
24570  withval=$with_version_minor; with_version_minor_present=true
24571else
24572  with_version_minor_present=false
24573fi
24574
24575
24576  if test "x$with_version_minor_present" = xtrue; then
24577    if test "x$with_version_minor" = xyes; then
24578      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24579    elif test "x$with_version_minor" = xno; then
24580      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24581      VERSION_MINOR=0
24582    elif test "x$with_version_minor" = x; then
24583      VERSION_MINOR=0
24584    else
24585
24586  # Additional [] needed to keep m4 from mangling shell constructs.
24587  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24588    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24589  fi
24590  # Extract the version number without leading zeros.
24591  cleaned_value=${BASH_REMATCH[1]}
24592  if test "x$cleaned_value" = x; then
24593    # Special case for zero
24594    cleaned_value=${BASH_REMATCH[2]}
24595  fi
24596
24597  if test $cleaned_value -gt 255; then
24598    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24599  fi
24600  if test "x$cleaned_value" != "x$with_version_minor"; then
24601    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24602$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24603  fi
24604  VERSION_MINOR=$cleaned_value
24605
24606    fi
24607  else
24608    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24609      # Default is 0, if unspecified
24610      VERSION_MINOR=0
24611    fi
24612  fi
24613
24614
24615# Check whether --with-version-security was given.
24616if test "${with_version_security+set}" = set; then :
24617  withval=$with_version_security; with_version_security_present=true
24618else
24619  with_version_security_present=false
24620fi
24621
24622
24623  if test "x$with_version_security_present" = xtrue; then
24624    if test "x$with_version_security" = xyes; then
24625      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24626    elif test "x$with_version_security" = xno; then
24627      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24628      VERSION_SECURITY=0
24629    elif test "x$with_version_security" = x; then
24630      VERSION_SECURITY=0
24631    else
24632
24633  # Additional [] needed to keep m4 from mangling shell constructs.
24634  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24635    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24636  fi
24637  # Extract the version number without leading zeros.
24638  cleaned_value=${BASH_REMATCH[1]}
24639  if test "x$cleaned_value" = x; then
24640    # Special case for zero
24641    cleaned_value=${BASH_REMATCH[2]}
24642  fi
24643
24644  if test $cleaned_value -gt 255; then
24645    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24646  fi
24647  if test "x$cleaned_value" != "x$with_version_security"; then
24648    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24649$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24650  fi
24651  VERSION_SECURITY=$cleaned_value
24652
24653    fi
24654  else
24655    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24656      # Default is 0, if unspecified
24657      VERSION_SECURITY=0
24658    fi
24659  fi
24660
24661
24662# Check whether --with-version-patch was given.
24663if test "${with_version_patch+set}" = set; then :
24664  withval=$with_version_patch; with_version_patch_present=true
24665else
24666  with_version_patch_present=false
24667fi
24668
24669
24670  if test "x$with_version_patch_present" = xtrue; then
24671    if test "x$with_version_patch" = xyes; then
24672      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24673    elif test "x$with_version_patch" = xno; then
24674      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24675      VERSION_PATCH=0
24676    elif test "x$with_version_patch" = x; then
24677      VERSION_PATCH=0
24678    else
24679
24680  # Additional [] needed to keep m4 from mangling shell constructs.
24681  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24682    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24683  fi
24684  # Extract the version number without leading zeros.
24685  cleaned_value=${BASH_REMATCH[1]}
24686  if test "x$cleaned_value" = x; then
24687    # Special case for zero
24688    cleaned_value=${BASH_REMATCH[2]}
24689  fi
24690
24691  if test $cleaned_value -gt 255; then
24692    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24693  fi
24694  if test "x$cleaned_value" != "x$with_version_patch"; then
24695    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24696$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24697  fi
24698  VERSION_PATCH=$cleaned_value
24699
24700    fi
24701  else
24702    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24703      # Default is 0, if unspecified
24704      VERSION_PATCH=0
24705    fi
24706  fi
24707
24708  # Calculate derived version properties
24709
24710  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24711  if test "x$VERSION_PRE" = x; then
24712    VERSION_IS_GA=true
24713  else
24714    VERSION_IS_GA=false
24715  fi
24716
24717  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24718  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24719
24720  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24721  # Strip trailing zeroes from stripped_version_number
24722  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24723  VERSION_NUMBER=$stripped_version_number
24724
24725  # The complete version string, with additional build information
24726  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24727    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24728  else
24729    # If either build or opt is set, we need a + separator
24730    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24731  fi
24732
24733  # The short version string, just VERSION_NUMBER and PRE, if present.
24734  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24735
24736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24737$as_echo_n "checking for version string... " >&6; }
24738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24739$as_echo "$VERSION_STRING" >&6; }
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755###############################################################################
24756#
24757# Setup BootJDK, used to bootstrap the build.
24758#
24759###############################################################################
24760
24761
24762  BOOT_JDK_FOUND=no
24763
24764# Check whether --with-boot-jdk was given.
24765if test "${with_boot_jdk+set}" = set; then :
24766  withval=$with_boot_jdk;
24767fi
24768
24769
24770  # We look for the Boot JDK through various means, going from more certain to
24771  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24772  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24773  # must check if this is indeed valid; otherwise we'll continue looking.
24774
24775  # Test: Is bootjdk explicitely set by command line arguments?
24776
24777  if test "x$BOOT_JDK_FOUND" = xno; then
24778    # Now execute the test
24779
24780  if test "x$with_boot_jdk" != x; then
24781    BOOT_JDK=$with_boot_jdk
24782    BOOT_JDK_FOUND=maybe
24783    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24784$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24785  fi
24786
24787
24788    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24789    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24790      # Do we have a bin/java?
24791      if test ! -x "$BOOT_JDK/bin/java"; then
24792        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24794        BOOT_JDK_FOUND=no
24795      else
24796        # Do we have a bin/javac?
24797        if test ! -x "$BOOT_JDK/bin/javac"; then
24798          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24800          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24801$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24802          BOOT_JDK_FOUND=no
24803        else
24804          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24805          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24806
24807          # Extra M4 quote needed to protect [] in grep expression.
24808          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24809          if test "x$FOUND_CORRECT_VERSION" = x; then
24810            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24812            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24813$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24814            BOOT_JDK_FOUND=no
24815          else
24816            # We're done! :-)
24817            BOOT_JDK_FOUND=yes
24818
24819  # Only process if variable expands to non-empty
24820
24821  if test "x$BOOT_JDK" != x; then
24822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24823
24824  # Input might be given as Windows format, start by converting to
24825  # unix format.
24826  path="$BOOT_JDK"
24827  new_path=`$CYGPATH -u "$path"`
24828
24829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24832  # "foo.exe" is OK but "foo" is an error.
24833  #
24834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24835  # It is also a way to make sure we got the proper file name for the real test later on.
24836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24837  if test "x$test_shortpath" = x; then
24838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24839$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24840    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24841  fi
24842
24843  # Call helper function which possibly converts this using DOS-style short mode.
24844  # If so, the updated path is stored in $new_path.
24845
24846  input_path="$new_path"
24847  # Check if we need to convert this using DOS-style short mode. If the path
24848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24849  # take no chances and rewrite it.
24850  # Note: m4 eats our [], so we need to use [ and ] instead.
24851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24852  if test "x$has_forbidden_chars" != x; then
24853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24857      # Going to short mode and back again did indeed matter. Since short mode is
24858      # case insensitive, let's make it lowercase to improve readability.
24859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24860      # Now convert it back to Unix-style (cygpath)
24861      input_path=`$CYGPATH -u "$shortmode_path"`
24862      new_path="$input_path"
24863    fi
24864  fi
24865
24866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24867  if test "x$test_cygdrive_prefix" = x; then
24868    # As a simple fix, exclude /usr/bin since it's not a real path.
24869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24871      # a path prefixed by /cygdrive for fixpath to work.
24872      new_path="$CYGWIN_ROOT_PATH$input_path"
24873    fi
24874  fi
24875
24876
24877  if test "x$path" != "x$new_path"; then
24878    BOOT_JDK="$new_path"
24879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24880$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24881  fi
24882
24883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24884
24885  path="$BOOT_JDK"
24886  has_colon=`$ECHO $path | $GREP ^.:`
24887  new_path="$path"
24888  if test "x$has_colon" = x; then
24889    # Not in mixed or Windows style, start by that.
24890    new_path=`cmd //c echo $path`
24891  fi
24892
24893
24894  input_path="$new_path"
24895  # Check if we need to convert this using DOS-style short mode. If the path
24896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24897  # take no chances and rewrite it.
24898  # Note: m4 eats our [], so we need to use [ and ] instead.
24899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24900  if test "x$has_forbidden_chars" != x; then
24901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24903  fi
24904
24905
24906  windows_path="$new_path"
24907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24908    unix_path=`$CYGPATH -u "$windows_path"`
24909    new_path="$unix_path"
24910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24912    new_path="$unix_path"
24913  fi
24914
24915  if test "x$path" != "x$new_path"; then
24916    BOOT_JDK="$new_path"
24917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24918$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24919  fi
24920
24921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24923
24924    else
24925      # We're on a unix platform. Hooray! :)
24926      path="$BOOT_JDK"
24927      has_space=`$ECHO "$path" | $GREP " "`
24928      if test "x$has_space" != x; then
24929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24930$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24931        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24932      fi
24933
24934      # Use eval to expand a potential ~
24935      eval path="$path"
24936      if test ! -f "$path" && test ! -d "$path"; then
24937        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24938      fi
24939
24940      if test -d "$path"; then
24941        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24942      else
24943        dir="`$DIRNAME "$path"`"
24944        base="`$BASENAME "$path"`"
24945        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24946      fi
24947    fi
24948  fi
24949
24950            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24951$as_echo_n "checking for Boot JDK... " >&6; }
24952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24953$as_echo "$BOOT_JDK" >&6; }
24954            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24955$as_echo_n "checking Boot JDK version... " >&6; }
24956            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24958$as_echo "$BOOT_JDK_VERSION" >&6; }
24959          fi # end check jdk version
24960        fi # end check javac
24961      fi # end check java
24962    fi # end check boot jdk found
24963  fi
24964
24965  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24966    # Having specified an argument which is incorrect will produce an instant failure;
24967    # we should not go on looking
24968    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24969  fi
24970
24971  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24972
24973  if test "x$BOOT_JDK_FOUND" = xno; then
24974    # Now execute the test
24975
24976  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24977    # First check at user selected default
24978
24979  if test "x$BOOT_JDK_FOUND" = xno; then
24980    # Now execute the test
24981
24982  if test -x /usr/libexec/java_home; then
24983    BOOT_JDK=`/usr/libexec/java_home `
24984    BOOT_JDK_FOUND=maybe
24985    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24986$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24987  fi
24988
24989
24990    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24991    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24992      # Do we have a bin/java?
24993      if test ! -x "$BOOT_JDK/bin/java"; then
24994        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24996        BOOT_JDK_FOUND=no
24997      else
24998        # Do we have a bin/javac?
24999        if test ! -x "$BOOT_JDK/bin/javac"; then
25000          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25002          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25003$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25004          BOOT_JDK_FOUND=no
25005        else
25006          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25007          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25008
25009          # Extra M4 quote needed to protect [] in grep expression.
25010          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25011          if test "x$FOUND_CORRECT_VERSION" = x; then
25012            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25014            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25015$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25016            BOOT_JDK_FOUND=no
25017          else
25018            # We're done! :-)
25019            BOOT_JDK_FOUND=yes
25020
25021  # Only process if variable expands to non-empty
25022
25023  if test "x$BOOT_JDK" != x; then
25024    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25025
25026  # Input might be given as Windows format, start by converting to
25027  # unix format.
25028  path="$BOOT_JDK"
25029  new_path=`$CYGPATH -u "$path"`
25030
25031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25034  # "foo.exe" is OK but "foo" is an error.
25035  #
25036  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25037  # It is also a way to make sure we got the proper file name for the real test later on.
25038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25039  if test "x$test_shortpath" = x; then
25040    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25041$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25042    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25043  fi
25044
25045  # Call helper function which possibly converts this using DOS-style short mode.
25046  # If so, the updated path is stored in $new_path.
25047
25048  input_path="$new_path"
25049  # Check if we need to convert this using DOS-style short mode. If the path
25050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25051  # take no chances and rewrite it.
25052  # Note: m4 eats our [], so we need to use [ and ] instead.
25053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25054  if test "x$has_forbidden_chars" != x; then
25055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25059      # Going to short mode and back again did indeed matter. Since short mode is
25060      # case insensitive, let's make it lowercase to improve readability.
25061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25062      # Now convert it back to Unix-style (cygpath)
25063      input_path=`$CYGPATH -u "$shortmode_path"`
25064      new_path="$input_path"
25065    fi
25066  fi
25067
25068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25069  if test "x$test_cygdrive_prefix" = x; then
25070    # As a simple fix, exclude /usr/bin since it's not a real path.
25071    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25073      # a path prefixed by /cygdrive for fixpath to work.
25074      new_path="$CYGWIN_ROOT_PATH$input_path"
25075    fi
25076  fi
25077
25078
25079  if test "x$path" != "x$new_path"; then
25080    BOOT_JDK="$new_path"
25081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25082$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25083  fi
25084
25085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25086
25087  path="$BOOT_JDK"
25088  has_colon=`$ECHO $path | $GREP ^.:`
25089  new_path="$path"
25090  if test "x$has_colon" = x; then
25091    # Not in mixed or Windows style, start by that.
25092    new_path=`cmd //c echo $path`
25093  fi
25094
25095
25096  input_path="$new_path"
25097  # Check if we need to convert this using DOS-style short mode. If the path
25098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25099  # take no chances and rewrite it.
25100  # Note: m4 eats our [], so we need to use [ and ] instead.
25101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25102  if test "x$has_forbidden_chars" != x; then
25103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25105  fi
25106
25107
25108  windows_path="$new_path"
25109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25110    unix_path=`$CYGPATH -u "$windows_path"`
25111    new_path="$unix_path"
25112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25114    new_path="$unix_path"
25115  fi
25116
25117  if test "x$path" != "x$new_path"; then
25118    BOOT_JDK="$new_path"
25119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25120$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25121  fi
25122
25123  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25124  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25125
25126    else
25127      # We're on a unix platform. Hooray! :)
25128      path="$BOOT_JDK"
25129      has_space=`$ECHO "$path" | $GREP " "`
25130      if test "x$has_space" != x; then
25131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25132$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25133        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25134      fi
25135
25136      # Use eval to expand a potential ~
25137      eval path="$path"
25138      if test ! -f "$path" && test ! -d "$path"; then
25139        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25140      fi
25141
25142      if test -d "$path"; then
25143        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25144      else
25145        dir="`$DIRNAME "$path"`"
25146        base="`$BASENAME "$path"`"
25147        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25148      fi
25149    fi
25150  fi
25151
25152            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25153$as_echo_n "checking for Boot JDK... " >&6; }
25154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25155$as_echo "$BOOT_JDK" >&6; }
25156            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25157$as_echo_n "checking Boot JDK version... " >&6; }
25158            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25160$as_echo "$BOOT_JDK_VERSION" >&6; }
25161          fi # end check jdk version
25162        fi # end check javac
25163      fi # end check java
25164    fi # end check boot jdk found
25165  fi
25166
25167    # If that did not work out (e.g. too old), try explicit versions instead
25168
25169  if test "x$BOOT_JDK_FOUND" = xno; then
25170    # Now execute the test
25171
25172  if test -x /usr/libexec/java_home; then
25173    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25174    BOOT_JDK_FOUND=maybe
25175    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25176$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25177  fi
25178
25179
25180    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25181    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25182      # Do we have a bin/java?
25183      if test ! -x "$BOOT_JDK/bin/java"; then
25184        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25186        BOOT_JDK_FOUND=no
25187      else
25188        # Do we have a bin/javac?
25189        if test ! -x "$BOOT_JDK/bin/javac"; then
25190          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25192          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25193$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25194          BOOT_JDK_FOUND=no
25195        else
25196          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25197          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25198
25199          # Extra M4 quote needed to protect [] in grep expression.
25200          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25201          if test "x$FOUND_CORRECT_VERSION" = x; then
25202            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25204            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25205$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25206            BOOT_JDK_FOUND=no
25207          else
25208            # We're done! :-)
25209            BOOT_JDK_FOUND=yes
25210
25211  # Only process if variable expands to non-empty
25212
25213  if test "x$BOOT_JDK" != x; then
25214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25215
25216  # Input might be given as Windows format, start by converting to
25217  # unix format.
25218  path="$BOOT_JDK"
25219  new_path=`$CYGPATH -u "$path"`
25220
25221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25224  # "foo.exe" is OK but "foo" is an error.
25225  #
25226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25227  # It is also a way to make sure we got the proper file name for the real test later on.
25228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25229  if test "x$test_shortpath" = x; then
25230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25232    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25233  fi
25234
25235  # Call helper function which possibly converts this using DOS-style short mode.
25236  # If so, the updated path is stored in $new_path.
25237
25238  input_path="$new_path"
25239  # Check if we need to convert this using DOS-style short mode. If the path
25240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25241  # take no chances and rewrite it.
25242  # Note: m4 eats our [], so we need to use [ and ] instead.
25243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25244  if test "x$has_forbidden_chars" != x; then
25245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25249      # Going to short mode and back again did indeed matter. Since short mode is
25250      # case insensitive, let's make it lowercase to improve readability.
25251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25252      # Now convert it back to Unix-style (cygpath)
25253      input_path=`$CYGPATH -u "$shortmode_path"`
25254      new_path="$input_path"
25255    fi
25256  fi
25257
25258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25259  if test "x$test_cygdrive_prefix" = x; then
25260    # As a simple fix, exclude /usr/bin since it's not a real path.
25261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25263      # a path prefixed by /cygdrive for fixpath to work.
25264      new_path="$CYGWIN_ROOT_PATH$input_path"
25265    fi
25266  fi
25267
25268
25269  if test "x$path" != "x$new_path"; then
25270    BOOT_JDK="$new_path"
25271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25273  fi
25274
25275    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25276
25277  path="$BOOT_JDK"
25278  has_colon=`$ECHO $path | $GREP ^.:`
25279  new_path="$path"
25280  if test "x$has_colon" = x; then
25281    # Not in mixed or Windows style, start by that.
25282    new_path=`cmd //c echo $path`
25283  fi
25284
25285
25286  input_path="$new_path"
25287  # Check if we need to convert this using DOS-style short mode. If the path
25288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25289  # take no chances and rewrite it.
25290  # Note: m4 eats our [], so we need to use [ and ] instead.
25291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25292  if test "x$has_forbidden_chars" != x; then
25293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25295  fi
25296
25297
25298  windows_path="$new_path"
25299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25300    unix_path=`$CYGPATH -u "$windows_path"`
25301    new_path="$unix_path"
25302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25304    new_path="$unix_path"
25305  fi
25306
25307  if test "x$path" != "x$new_path"; then
25308    BOOT_JDK="$new_path"
25309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25311  fi
25312
25313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25315
25316    else
25317      # We're on a unix platform. Hooray! :)
25318      path="$BOOT_JDK"
25319      has_space=`$ECHO "$path" | $GREP " "`
25320      if test "x$has_space" != x; then
25321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25322$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25323        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25324      fi
25325
25326      # Use eval to expand a potential ~
25327      eval path="$path"
25328      if test ! -f "$path" && test ! -d "$path"; then
25329        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25330      fi
25331
25332      if test -d "$path"; then
25333        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25334      else
25335        dir="`$DIRNAME "$path"`"
25336        base="`$BASENAME "$path"`"
25337        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25338      fi
25339    fi
25340  fi
25341
25342            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25343$as_echo_n "checking for Boot JDK... " >&6; }
25344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25345$as_echo "$BOOT_JDK" >&6; }
25346            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25347$as_echo_n "checking Boot JDK version... " >&6; }
25348            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25350$as_echo "$BOOT_JDK_VERSION" >&6; }
25351          fi # end check jdk version
25352        fi # end check javac
25353      fi # end check java
25354    fi # end check boot jdk found
25355  fi
25356
25357
25358  if test "x$BOOT_JDK_FOUND" = xno; then
25359    # Now execute the test
25360
25361  if test -x /usr/libexec/java_home; then
25362    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25363    BOOT_JDK_FOUND=maybe
25364    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25365$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25366  fi
25367
25368
25369    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25370    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25371      # Do we have a bin/java?
25372      if test ! -x "$BOOT_JDK/bin/java"; then
25373        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25375        BOOT_JDK_FOUND=no
25376      else
25377        # Do we have a bin/javac?
25378        if test ! -x "$BOOT_JDK/bin/javac"; then
25379          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25381          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25382$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25383          BOOT_JDK_FOUND=no
25384        else
25385          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25386          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25387
25388          # Extra M4 quote needed to protect [] in grep expression.
25389          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25390          if test "x$FOUND_CORRECT_VERSION" = x; then
25391            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25392$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25393            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25394$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25395            BOOT_JDK_FOUND=no
25396          else
25397            # We're done! :-)
25398            BOOT_JDK_FOUND=yes
25399
25400  # Only process if variable expands to non-empty
25401
25402  if test "x$BOOT_JDK" != x; then
25403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25404
25405  # Input might be given as Windows format, start by converting to
25406  # unix format.
25407  path="$BOOT_JDK"
25408  new_path=`$CYGPATH -u "$path"`
25409
25410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25413  # "foo.exe" is OK but "foo" is an error.
25414  #
25415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25416  # It is also a way to make sure we got the proper file name for the real test later on.
25417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25418  if test "x$test_shortpath" = x; then
25419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25420$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25421    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25422  fi
25423
25424  # Call helper function which possibly converts this using DOS-style short mode.
25425  # If so, the updated path is stored in $new_path.
25426
25427  input_path="$new_path"
25428  # Check if we need to convert this using DOS-style short mode. If the path
25429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25430  # take no chances and rewrite it.
25431  # Note: m4 eats our [], so we need to use [ and ] instead.
25432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25433  if test "x$has_forbidden_chars" != x; then
25434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25438      # Going to short mode and back again did indeed matter. Since short mode is
25439      # case insensitive, let's make it lowercase to improve readability.
25440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25441      # Now convert it back to Unix-style (cygpath)
25442      input_path=`$CYGPATH -u "$shortmode_path"`
25443      new_path="$input_path"
25444    fi
25445  fi
25446
25447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25448  if test "x$test_cygdrive_prefix" = x; then
25449    # As a simple fix, exclude /usr/bin since it's not a real path.
25450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25452      # a path prefixed by /cygdrive for fixpath to work.
25453      new_path="$CYGWIN_ROOT_PATH$input_path"
25454    fi
25455  fi
25456
25457
25458  if test "x$path" != "x$new_path"; then
25459    BOOT_JDK="$new_path"
25460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25461$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25462  fi
25463
25464    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25465
25466  path="$BOOT_JDK"
25467  has_colon=`$ECHO $path | $GREP ^.:`
25468  new_path="$path"
25469  if test "x$has_colon" = x; then
25470    # Not in mixed or Windows style, start by that.
25471    new_path=`cmd //c echo $path`
25472  fi
25473
25474
25475  input_path="$new_path"
25476  # Check if we need to convert this using DOS-style short mode. If the path
25477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25478  # take no chances and rewrite it.
25479  # Note: m4 eats our [], so we need to use [ and ] instead.
25480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25481  if test "x$has_forbidden_chars" != x; then
25482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25484  fi
25485
25486
25487  windows_path="$new_path"
25488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25489    unix_path=`$CYGPATH -u "$windows_path"`
25490    new_path="$unix_path"
25491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25493    new_path="$unix_path"
25494  fi
25495
25496  if test "x$path" != "x$new_path"; then
25497    BOOT_JDK="$new_path"
25498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25499$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25500  fi
25501
25502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25504
25505    else
25506      # We're on a unix platform. Hooray! :)
25507      path="$BOOT_JDK"
25508      has_space=`$ECHO "$path" | $GREP " "`
25509      if test "x$has_space" != x; then
25510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25511$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25512        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25513      fi
25514
25515      # Use eval to expand a potential ~
25516      eval path="$path"
25517      if test ! -f "$path" && test ! -d "$path"; then
25518        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25519      fi
25520
25521      if test -d "$path"; then
25522        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25523      else
25524        dir="`$DIRNAME "$path"`"
25525        base="`$BASENAME "$path"`"
25526        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25527      fi
25528    fi
25529  fi
25530
25531            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25532$as_echo_n "checking for Boot JDK... " >&6; }
25533            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25534$as_echo "$BOOT_JDK" >&6; }
25535            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25536$as_echo_n "checking Boot JDK version... " >&6; }
25537            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25538            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25539$as_echo "$BOOT_JDK_VERSION" >&6; }
25540          fi # end check jdk version
25541        fi # end check javac
25542      fi # end check java
25543    fi # end check boot jdk found
25544  fi
25545
25546
25547  if test "x$BOOT_JDK_FOUND" = xno; then
25548    # Now execute the test
25549
25550  if test -x /usr/libexec/java_home; then
25551    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25552    BOOT_JDK_FOUND=maybe
25553    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25554$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25555  fi
25556
25557
25558    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25559    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25560      # Do we have a bin/java?
25561      if test ! -x "$BOOT_JDK/bin/java"; then
25562        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25564        BOOT_JDK_FOUND=no
25565      else
25566        # Do we have a bin/javac?
25567        if test ! -x "$BOOT_JDK/bin/javac"; then
25568          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25570          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25571$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25572          BOOT_JDK_FOUND=no
25573        else
25574          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25575          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25576
25577          # Extra M4 quote needed to protect [] in grep expression.
25578          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25579          if test "x$FOUND_CORRECT_VERSION" = x; then
25580            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25582            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25583$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25584            BOOT_JDK_FOUND=no
25585          else
25586            # We're done! :-)
25587            BOOT_JDK_FOUND=yes
25588
25589  # Only process if variable expands to non-empty
25590
25591  if test "x$BOOT_JDK" != x; then
25592    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25593
25594  # Input might be given as Windows format, start by converting to
25595  # unix format.
25596  path="$BOOT_JDK"
25597  new_path=`$CYGPATH -u "$path"`
25598
25599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25602  # "foo.exe" is OK but "foo" is an error.
25603  #
25604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25605  # It is also a way to make sure we got the proper file name for the real test later on.
25606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25607  if test "x$test_shortpath" = x; then
25608    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25610    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25611  fi
25612
25613  # Call helper function which possibly converts this using DOS-style short mode.
25614  # If so, the updated path is stored in $new_path.
25615
25616  input_path="$new_path"
25617  # Check if we need to convert this using DOS-style short mode. If the path
25618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25619  # take no chances and rewrite it.
25620  # Note: m4 eats our [], so we need to use [ and ] instead.
25621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25622  if test "x$has_forbidden_chars" != x; then
25623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25627      # Going to short mode and back again did indeed matter. Since short mode is
25628      # case insensitive, let's make it lowercase to improve readability.
25629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25630      # Now convert it back to Unix-style (cygpath)
25631      input_path=`$CYGPATH -u "$shortmode_path"`
25632      new_path="$input_path"
25633    fi
25634  fi
25635
25636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25637  if test "x$test_cygdrive_prefix" = x; then
25638    # As a simple fix, exclude /usr/bin since it's not a real path.
25639    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25641      # a path prefixed by /cygdrive for fixpath to work.
25642      new_path="$CYGWIN_ROOT_PATH$input_path"
25643    fi
25644  fi
25645
25646
25647  if test "x$path" != "x$new_path"; then
25648    BOOT_JDK="$new_path"
25649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25651  fi
25652
25653    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25654
25655  path="$BOOT_JDK"
25656  has_colon=`$ECHO $path | $GREP ^.:`
25657  new_path="$path"
25658  if test "x$has_colon" = x; then
25659    # Not in mixed or Windows style, start by that.
25660    new_path=`cmd //c echo $path`
25661  fi
25662
25663
25664  input_path="$new_path"
25665  # Check if we need to convert this using DOS-style short mode. If the path
25666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25667  # take no chances and rewrite it.
25668  # Note: m4 eats our [], so we need to use [ and ] instead.
25669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25670  if test "x$has_forbidden_chars" != x; then
25671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25673  fi
25674
25675
25676  windows_path="$new_path"
25677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25678    unix_path=`$CYGPATH -u "$windows_path"`
25679    new_path="$unix_path"
25680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25682    new_path="$unix_path"
25683  fi
25684
25685  if test "x$path" != "x$new_path"; then
25686    BOOT_JDK="$new_path"
25687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25688$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25689  fi
25690
25691  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25692  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25693
25694    else
25695      # We're on a unix platform. Hooray! :)
25696      path="$BOOT_JDK"
25697      has_space=`$ECHO "$path" | $GREP " "`
25698      if test "x$has_space" != x; then
25699        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25700$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25701        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25702      fi
25703
25704      # Use eval to expand a potential ~
25705      eval path="$path"
25706      if test ! -f "$path" && test ! -d "$path"; then
25707        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25708      fi
25709
25710      if test -d "$path"; then
25711        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25712      else
25713        dir="`$DIRNAME "$path"`"
25714        base="`$BASENAME "$path"`"
25715        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25716      fi
25717    fi
25718  fi
25719
25720            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25721$as_echo_n "checking for Boot JDK... " >&6; }
25722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25723$as_echo "$BOOT_JDK" >&6; }
25724            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25725$as_echo_n "checking Boot JDK version... " >&6; }
25726            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25728$as_echo "$BOOT_JDK_VERSION" >&6; }
25729          fi # end check jdk version
25730        fi # end check javac
25731      fi # end check java
25732    fi # end check boot jdk found
25733  fi
25734
25735  fi
25736
25737
25738    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25739    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25740      # Do we have a bin/java?
25741      if test ! -x "$BOOT_JDK/bin/java"; then
25742        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25743$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25744        BOOT_JDK_FOUND=no
25745      else
25746        # Do we have a bin/javac?
25747        if test ! -x "$BOOT_JDK/bin/javac"; then
25748          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25749$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25750          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25751$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25752          BOOT_JDK_FOUND=no
25753        else
25754          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25755          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25756
25757          # Extra M4 quote needed to protect [] in grep expression.
25758          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25759          if test "x$FOUND_CORRECT_VERSION" = x; then
25760            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25761$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25762            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25763$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25764            BOOT_JDK_FOUND=no
25765          else
25766            # We're done! :-)
25767            BOOT_JDK_FOUND=yes
25768
25769  # Only process if variable expands to non-empty
25770
25771  if test "x$BOOT_JDK" != x; then
25772    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25773
25774  # Input might be given as Windows format, start by converting to
25775  # unix format.
25776  path="$BOOT_JDK"
25777  new_path=`$CYGPATH -u "$path"`
25778
25779  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25780  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25781  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25782  # "foo.exe" is OK but "foo" is an error.
25783  #
25784  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25785  # It is also a way to make sure we got the proper file name for the real test later on.
25786  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25787  if test "x$test_shortpath" = x; then
25788    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25789$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25790    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25791  fi
25792
25793  # Call helper function which possibly converts this using DOS-style short mode.
25794  # If so, the updated path is stored in $new_path.
25795
25796  input_path="$new_path"
25797  # Check if we need to convert this using DOS-style short mode. If the path
25798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25799  # take no chances and rewrite it.
25800  # Note: m4 eats our [], so we need to use [ and ] instead.
25801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25802  if test "x$has_forbidden_chars" != x; then
25803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25807      # Going to short mode and back again did indeed matter. Since short mode is
25808      # case insensitive, let's make it lowercase to improve readability.
25809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25810      # Now convert it back to Unix-style (cygpath)
25811      input_path=`$CYGPATH -u "$shortmode_path"`
25812      new_path="$input_path"
25813    fi
25814  fi
25815
25816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25817  if test "x$test_cygdrive_prefix" = x; then
25818    # As a simple fix, exclude /usr/bin since it's not a real path.
25819    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25821      # a path prefixed by /cygdrive for fixpath to work.
25822      new_path="$CYGWIN_ROOT_PATH$input_path"
25823    fi
25824  fi
25825
25826
25827  if test "x$path" != "x$new_path"; then
25828    BOOT_JDK="$new_path"
25829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25830$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25831  fi
25832
25833    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25834
25835  path="$BOOT_JDK"
25836  has_colon=`$ECHO $path | $GREP ^.:`
25837  new_path="$path"
25838  if test "x$has_colon" = x; then
25839    # Not in mixed or Windows style, start by that.
25840    new_path=`cmd //c echo $path`
25841  fi
25842
25843
25844  input_path="$new_path"
25845  # Check if we need to convert this using DOS-style short mode. If the path
25846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25847  # take no chances and rewrite it.
25848  # Note: m4 eats our [], so we need to use [ and ] instead.
25849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25850  if test "x$has_forbidden_chars" != x; then
25851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25852    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25853  fi
25854
25855
25856  windows_path="$new_path"
25857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25858    unix_path=`$CYGPATH -u "$windows_path"`
25859    new_path="$unix_path"
25860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25862    new_path="$unix_path"
25863  fi
25864
25865  if test "x$path" != "x$new_path"; then
25866    BOOT_JDK="$new_path"
25867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25868$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25869  fi
25870
25871  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25872  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25873
25874    else
25875      # We're on a unix platform. Hooray! :)
25876      path="$BOOT_JDK"
25877      has_space=`$ECHO "$path" | $GREP " "`
25878      if test "x$has_space" != x; then
25879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25880$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25881        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25882      fi
25883
25884      # Use eval to expand a potential ~
25885      eval path="$path"
25886      if test ! -f "$path" && test ! -d "$path"; then
25887        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25888      fi
25889
25890      if test -d "$path"; then
25891        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25892      else
25893        dir="`$DIRNAME "$path"`"
25894        base="`$BASENAME "$path"`"
25895        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25896      fi
25897    fi
25898  fi
25899
25900            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25901$as_echo_n "checking for Boot JDK... " >&6; }
25902            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25903$as_echo "$BOOT_JDK" >&6; }
25904            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25905$as_echo_n "checking Boot JDK version... " >&6; }
25906            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25907            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25908$as_echo "$BOOT_JDK_VERSION" >&6; }
25909          fi # end check jdk version
25910        fi # end check javac
25911      fi # end check java
25912    fi # end check boot jdk found
25913  fi
25914
25915
25916  # Test: Is $JAVA_HOME set?
25917
25918  if test "x$BOOT_JDK_FOUND" = xno; then
25919    # Now execute the test
25920
25921  if test "x$JAVA_HOME" != x; then
25922    JAVA_HOME_PROCESSED="$JAVA_HOME"
25923
25924  # Only process if variable expands to non-empty
25925
25926  if test "x$JAVA_HOME_PROCESSED" != x; then
25927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25928
25929  # Input might be given as Windows format, start by converting to
25930  # unix format.
25931  path="$JAVA_HOME_PROCESSED"
25932  new_path=`$CYGPATH -u "$path"`
25933
25934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25937  # "foo.exe" is OK but "foo" is an error.
25938  #
25939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25940  # It is also a way to make sure we got the proper file name for the real test later on.
25941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25942  if test "x$test_shortpath" = x; then
25943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25944$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25945    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25946  fi
25947
25948  # Call helper function which possibly converts this using DOS-style short mode.
25949  # If so, the updated path is stored in $new_path.
25950
25951  input_path="$new_path"
25952  # Check if we need to convert this using DOS-style short mode. If the path
25953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25954  # take no chances and rewrite it.
25955  # Note: m4 eats our [], so we need to use [ and ] instead.
25956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25957  if test "x$has_forbidden_chars" != x; then
25958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25962      # Going to short mode and back again did indeed matter. Since short mode is
25963      # case insensitive, let's make it lowercase to improve readability.
25964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25965      # Now convert it back to Unix-style (cygpath)
25966      input_path=`$CYGPATH -u "$shortmode_path"`
25967      new_path="$input_path"
25968    fi
25969  fi
25970
25971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25972  if test "x$test_cygdrive_prefix" = x; then
25973    # As a simple fix, exclude /usr/bin since it's not a real path.
25974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25976      # a path prefixed by /cygdrive for fixpath to work.
25977      new_path="$CYGWIN_ROOT_PATH$input_path"
25978    fi
25979  fi
25980
25981
25982  if test "x$path" != "x$new_path"; then
25983    JAVA_HOME_PROCESSED="$new_path"
25984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25985$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25986  fi
25987
25988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25989
25990  path="$JAVA_HOME_PROCESSED"
25991  has_colon=`$ECHO $path | $GREP ^.:`
25992  new_path="$path"
25993  if test "x$has_colon" = x; then
25994    # Not in mixed or Windows style, start by that.
25995    new_path=`cmd //c echo $path`
25996  fi
25997
25998
25999  input_path="$new_path"
26000  # Check if we need to convert this using DOS-style short mode. If the path
26001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26002  # take no chances and rewrite it.
26003  # Note: m4 eats our [], so we need to use [ and ] instead.
26004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26005  if test "x$has_forbidden_chars" != x; then
26006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26008  fi
26009
26010
26011  windows_path="$new_path"
26012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26013    unix_path=`$CYGPATH -u "$windows_path"`
26014    new_path="$unix_path"
26015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26017    new_path="$unix_path"
26018  fi
26019
26020  if test "x$path" != "x$new_path"; then
26021    JAVA_HOME_PROCESSED="$new_path"
26022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26023$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26024  fi
26025
26026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26028
26029    else
26030      # We're on a unix platform. Hooray! :)
26031      path="$JAVA_HOME_PROCESSED"
26032      has_space=`$ECHO "$path" | $GREP " "`
26033      if test "x$has_space" != x; then
26034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26035$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26036        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26037      fi
26038
26039      # Use eval to expand a potential ~
26040      eval path="$path"
26041      if test ! -f "$path" && test ! -d "$path"; then
26042        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26043      fi
26044
26045      if test -d "$path"; then
26046        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26047      else
26048        dir="`$DIRNAME "$path"`"
26049        base="`$BASENAME "$path"`"
26050        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26051      fi
26052    fi
26053  fi
26054
26055    if test ! -d "$JAVA_HOME_PROCESSED"; then
26056      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26057$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26058    else
26059      # Aha, the user has set a JAVA_HOME
26060      # let us use that as the Boot JDK.
26061      BOOT_JDK="$JAVA_HOME_PROCESSED"
26062      BOOT_JDK_FOUND=maybe
26063      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26064$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26065    fi
26066  fi
26067
26068
26069    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26070    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26071      # Do we have a bin/java?
26072      if test ! -x "$BOOT_JDK/bin/java"; then
26073        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26075        BOOT_JDK_FOUND=no
26076      else
26077        # Do we have a bin/javac?
26078        if test ! -x "$BOOT_JDK/bin/javac"; then
26079          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26081          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26082$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26083          BOOT_JDK_FOUND=no
26084        else
26085          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26086          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26087
26088          # Extra M4 quote needed to protect [] in grep expression.
26089          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26090          if test "x$FOUND_CORRECT_VERSION" = x; then
26091            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26093            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26094$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26095            BOOT_JDK_FOUND=no
26096          else
26097            # We're done! :-)
26098            BOOT_JDK_FOUND=yes
26099
26100  # Only process if variable expands to non-empty
26101
26102  if test "x$BOOT_JDK" != x; then
26103    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26104
26105  # Input might be given as Windows format, start by converting to
26106  # unix format.
26107  path="$BOOT_JDK"
26108  new_path=`$CYGPATH -u "$path"`
26109
26110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26113  # "foo.exe" is OK but "foo" is an error.
26114  #
26115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26116  # It is also a way to make sure we got the proper file name for the real test later on.
26117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26118  if test "x$test_shortpath" = x; then
26119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26121    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26122  fi
26123
26124  # Call helper function which possibly converts this using DOS-style short mode.
26125  # If so, the updated path is stored in $new_path.
26126
26127  input_path="$new_path"
26128  # Check if we need to convert this using DOS-style short mode. If the path
26129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26130  # take no chances and rewrite it.
26131  # Note: m4 eats our [], so we need to use [ and ] instead.
26132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26133  if test "x$has_forbidden_chars" != x; then
26134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26138      # Going to short mode and back again did indeed matter. Since short mode is
26139      # case insensitive, let's make it lowercase to improve readability.
26140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26141      # Now convert it back to Unix-style (cygpath)
26142      input_path=`$CYGPATH -u "$shortmode_path"`
26143      new_path="$input_path"
26144    fi
26145  fi
26146
26147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26148  if test "x$test_cygdrive_prefix" = x; then
26149    # As a simple fix, exclude /usr/bin since it's not a real path.
26150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26152      # a path prefixed by /cygdrive for fixpath to work.
26153      new_path="$CYGWIN_ROOT_PATH$input_path"
26154    fi
26155  fi
26156
26157
26158  if test "x$path" != "x$new_path"; then
26159    BOOT_JDK="$new_path"
26160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26162  fi
26163
26164    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26165
26166  path="$BOOT_JDK"
26167  has_colon=`$ECHO $path | $GREP ^.:`
26168  new_path="$path"
26169  if test "x$has_colon" = x; then
26170    # Not in mixed or Windows style, start by that.
26171    new_path=`cmd //c echo $path`
26172  fi
26173
26174
26175  input_path="$new_path"
26176  # Check if we need to convert this using DOS-style short mode. If the path
26177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26178  # take no chances and rewrite it.
26179  # Note: m4 eats our [], so we need to use [ and ] instead.
26180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26181  if test "x$has_forbidden_chars" != x; then
26182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26184  fi
26185
26186
26187  windows_path="$new_path"
26188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26189    unix_path=`$CYGPATH -u "$windows_path"`
26190    new_path="$unix_path"
26191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26193    new_path="$unix_path"
26194  fi
26195
26196  if test "x$path" != "x$new_path"; then
26197    BOOT_JDK="$new_path"
26198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26199$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26200  fi
26201
26202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26204
26205    else
26206      # We're on a unix platform. Hooray! :)
26207      path="$BOOT_JDK"
26208      has_space=`$ECHO "$path" | $GREP " "`
26209      if test "x$has_space" != x; then
26210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26212        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26213      fi
26214
26215      # Use eval to expand a potential ~
26216      eval path="$path"
26217      if test ! -f "$path" && test ! -d "$path"; then
26218        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26219      fi
26220
26221      if test -d "$path"; then
26222        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26223      else
26224        dir="`$DIRNAME "$path"`"
26225        base="`$BASENAME "$path"`"
26226        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26227      fi
26228    fi
26229  fi
26230
26231            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26232$as_echo_n "checking for Boot JDK... " >&6; }
26233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26234$as_echo "$BOOT_JDK" >&6; }
26235            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26236$as_echo_n "checking Boot JDK version... " >&6; }
26237            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26239$as_echo "$BOOT_JDK_VERSION" >&6; }
26240          fi # end check jdk version
26241        fi # end check javac
26242      fi # end check java
26243    fi # end check boot jdk found
26244  fi
26245
26246
26247  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26248
26249  if test "x$BOOT_JDK_FOUND" = xno; then
26250    # Now execute the test
26251
26252  # Extract the first word of "javac", so it can be a program name with args.
26253set dummy javac; ac_word=$2
26254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26255$as_echo_n "checking for $ac_word... " >&6; }
26256if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26257  $as_echo_n "(cached) " >&6
26258else
26259  case $JAVAC_CHECK in
26260  [\\/]* | ?:[\\/]*)
26261  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26262  ;;
26263  *)
26264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26265for as_dir in $PATH
26266do
26267  IFS=$as_save_IFS
26268  test -z "$as_dir" && as_dir=.
26269    for ac_exec_ext in '' $ac_executable_extensions; do
26270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26271    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26273    break 2
26274  fi
26275done
26276  done
26277IFS=$as_save_IFS
26278
26279  ;;
26280esac
26281fi
26282JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26283if test -n "$JAVAC_CHECK"; then
26284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26285$as_echo "$JAVAC_CHECK" >&6; }
26286else
26287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26288$as_echo "no" >&6; }
26289fi
26290
26291
26292  # Extract the first word of "java", so it can be a program name with args.
26293set dummy java; ac_word=$2
26294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26295$as_echo_n "checking for $ac_word... " >&6; }
26296if ${ac_cv_path_JAVA_CHECK+:} false; then :
26297  $as_echo_n "(cached) " >&6
26298else
26299  case $JAVA_CHECK in
26300  [\\/]* | ?:[\\/]*)
26301  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26302  ;;
26303  *)
26304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26305for as_dir in $PATH
26306do
26307  IFS=$as_save_IFS
26308  test -z "$as_dir" && as_dir=.
26309    for ac_exec_ext in '' $ac_executable_extensions; do
26310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26311    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26313    break 2
26314  fi
26315done
26316  done
26317IFS=$as_save_IFS
26318
26319  ;;
26320esac
26321fi
26322JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26323if test -n "$JAVA_CHECK"; then
26324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26325$as_echo "$JAVA_CHECK" >&6; }
26326else
26327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26328$as_echo "no" >&6; }
26329fi
26330
26331
26332  BINARY="$JAVAC_CHECK"
26333  if test "x$JAVAC_CHECK" = x; then
26334    BINARY="$JAVA_CHECK"
26335  fi
26336  if test "x$BINARY" != x; then
26337    # So there is a java(c) binary, it might be part of a JDK.
26338    # Lets find the JDK/JRE directory by following symbolic links.
26339    # Linux/GNU systems often have links from /usr/bin/java to
26340    # /etc/alternatives/java to the real JDK binary.
26341
26342  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26343    # Follow a chain of symbolic links. Use readlink
26344    # where it exists, else fall back to horribly
26345    # complicated shell code.
26346    if test "x$READLINK_TESTED" != yes; then
26347      # On MacOSX there is a readlink tool with a different
26348      # purpose than the GNU readlink tool. Check the found readlink.
26349      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26350      if test "x$ISGNU" = x; then
26351        # A readlink that we do not know how to use.
26352        # Are there other non-GNU readlinks out there?
26353        READLINK_TESTED=yes
26354        READLINK=
26355      fi
26356    fi
26357
26358    if test "x$READLINK" != x; then
26359      BINARY=`$READLINK -f $BINARY`
26360    else
26361      # Save the current directory for restoring afterwards
26362      STARTDIR=$PWD
26363      COUNTER=0
26364      sym_link_dir=`$DIRNAME $BINARY`
26365      sym_link_file=`$BASENAME $BINARY`
26366      cd $sym_link_dir
26367      # Use -P flag to resolve symlinks in directories.
26368      cd `$THEPWDCMD -P`
26369      sym_link_dir=`$THEPWDCMD -P`
26370      # Resolve file symlinks
26371      while test $COUNTER -lt 20; do
26372        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26373        if test "x$ISLINK" == x; then
26374          # This is not a symbolic link! We are done!
26375          break
26376        fi
26377        # Again resolve directory symlinks since the target of the just found
26378        # link could be in a different directory
26379        cd `$DIRNAME $ISLINK`
26380        sym_link_dir=`$THEPWDCMD -P`
26381        sym_link_file=`$BASENAME $ISLINK`
26382        let COUNTER=COUNTER+1
26383      done
26384      cd $STARTDIR
26385      BINARY=$sym_link_dir/$sym_link_file
26386    fi
26387  fi
26388
26389    BOOT_JDK=`dirname "$BINARY"`
26390    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26391    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26392      # Looks like we found ourselves an JDK
26393      BOOT_JDK_FOUND=maybe
26394      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26395$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26396    fi
26397  fi
26398
26399
26400    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26401    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26402      # Do we have a bin/java?
26403      if test ! -x "$BOOT_JDK/bin/java"; then
26404        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26406        BOOT_JDK_FOUND=no
26407      else
26408        # Do we have a bin/javac?
26409        if test ! -x "$BOOT_JDK/bin/javac"; then
26410          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26412          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26413$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26414          BOOT_JDK_FOUND=no
26415        else
26416          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26417          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26418
26419          # Extra M4 quote needed to protect [] in grep expression.
26420          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26421          if test "x$FOUND_CORRECT_VERSION" = x; then
26422            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26424            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26425$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26426            BOOT_JDK_FOUND=no
26427          else
26428            # We're done! :-)
26429            BOOT_JDK_FOUND=yes
26430
26431  # Only process if variable expands to non-empty
26432
26433  if test "x$BOOT_JDK" != x; then
26434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26435
26436  # Input might be given as Windows format, start by converting to
26437  # unix format.
26438  path="$BOOT_JDK"
26439  new_path=`$CYGPATH -u "$path"`
26440
26441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26444  # "foo.exe" is OK but "foo" is an error.
26445  #
26446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26447  # It is also a way to make sure we got the proper file name for the real test later on.
26448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26449  if test "x$test_shortpath" = x; then
26450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26452    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26453  fi
26454
26455  # Call helper function which possibly converts this using DOS-style short mode.
26456  # If so, the updated path is stored in $new_path.
26457
26458  input_path="$new_path"
26459  # Check if we need to convert this using DOS-style short mode. If the path
26460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26461  # take no chances and rewrite it.
26462  # Note: m4 eats our [], so we need to use [ and ] instead.
26463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26464  if test "x$has_forbidden_chars" != x; then
26465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26469      # Going to short mode and back again did indeed matter. Since short mode is
26470      # case insensitive, let's make it lowercase to improve readability.
26471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26472      # Now convert it back to Unix-style (cygpath)
26473      input_path=`$CYGPATH -u "$shortmode_path"`
26474      new_path="$input_path"
26475    fi
26476  fi
26477
26478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26479  if test "x$test_cygdrive_prefix" = x; then
26480    # As a simple fix, exclude /usr/bin since it's not a real path.
26481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26483      # a path prefixed by /cygdrive for fixpath to work.
26484      new_path="$CYGWIN_ROOT_PATH$input_path"
26485    fi
26486  fi
26487
26488
26489  if test "x$path" != "x$new_path"; then
26490    BOOT_JDK="$new_path"
26491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26493  fi
26494
26495    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26496
26497  path="$BOOT_JDK"
26498  has_colon=`$ECHO $path | $GREP ^.:`
26499  new_path="$path"
26500  if test "x$has_colon" = x; then
26501    # Not in mixed or Windows style, start by that.
26502    new_path=`cmd //c echo $path`
26503  fi
26504
26505
26506  input_path="$new_path"
26507  # Check if we need to convert this using DOS-style short mode. If the path
26508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26509  # take no chances and rewrite it.
26510  # Note: m4 eats our [], so we need to use [ and ] instead.
26511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26512  if test "x$has_forbidden_chars" != x; then
26513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26515  fi
26516
26517
26518  windows_path="$new_path"
26519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26520    unix_path=`$CYGPATH -u "$windows_path"`
26521    new_path="$unix_path"
26522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26524    new_path="$unix_path"
26525  fi
26526
26527  if test "x$path" != "x$new_path"; then
26528    BOOT_JDK="$new_path"
26529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26530$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26531  fi
26532
26533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26535
26536    else
26537      # We're on a unix platform. Hooray! :)
26538      path="$BOOT_JDK"
26539      has_space=`$ECHO "$path" | $GREP " "`
26540      if test "x$has_space" != x; then
26541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26543        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26544      fi
26545
26546      # Use eval to expand a potential ~
26547      eval path="$path"
26548      if test ! -f "$path" && test ! -d "$path"; then
26549        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26550      fi
26551
26552      if test -d "$path"; then
26553        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26554      else
26555        dir="`$DIRNAME "$path"`"
26556        base="`$BASENAME "$path"`"
26557        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26558      fi
26559    fi
26560  fi
26561
26562            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26563$as_echo_n "checking for Boot JDK... " >&6; }
26564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26565$as_echo "$BOOT_JDK" >&6; }
26566            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26567$as_echo_n "checking Boot JDK version... " >&6; }
26568            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26570$as_echo "$BOOT_JDK_VERSION" >&6; }
26571          fi # end check jdk version
26572        fi # end check javac
26573      fi # end check java
26574    fi # end check boot jdk found
26575  fi
26576
26577
26578  # Test: Is there a JDK installed in default, well-known locations?
26579
26580  if test "x$BOOT_JDK_FOUND" = xno; then
26581    # Now execute the test
26582
26583  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26584
26585  if test "x$BOOT_JDK_FOUND" = xno; then
26586    # Now execute the test
26587
26588  if test "x$ProgramW6432" != x; then
26589    VIRTUAL_DIR="$ProgramW6432/Java"
26590
26591  windows_path="$VIRTUAL_DIR"
26592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26593    unix_path=`$CYGPATH -u "$windows_path"`
26594    VIRTUAL_DIR="$unix_path"
26595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26597    VIRTUAL_DIR="$unix_path"
26598  fi
26599
26600
26601  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26602  BOOT_JDK_SUFFIX=""
26603  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26604  if test "x$ALL_JDKS_FOUND" != x; then
26605    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26606
26607  if test "x$BOOT_JDK_FOUND" = xno; then
26608    # Now execute the test
26609
26610        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26611        if test -d "$BOOT_JDK"; then
26612          BOOT_JDK_FOUND=maybe
26613          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26614$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26615        fi
26616
26617
26618    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26619    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26620      # Do we have a bin/java?
26621      if test ! -x "$BOOT_JDK/bin/java"; then
26622        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26624        BOOT_JDK_FOUND=no
26625      else
26626        # Do we have a bin/javac?
26627        if test ! -x "$BOOT_JDK/bin/javac"; then
26628          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26630          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26631$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26632          BOOT_JDK_FOUND=no
26633        else
26634          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26635          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26636
26637          # Extra M4 quote needed to protect [] in grep expression.
26638          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26639          if test "x$FOUND_CORRECT_VERSION" = x; then
26640            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26641$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26642            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26643$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26644            BOOT_JDK_FOUND=no
26645          else
26646            # We're done! :-)
26647            BOOT_JDK_FOUND=yes
26648
26649  # Only process if variable expands to non-empty
26650
26651  if test "x$BOOT_JDK" != x; then
26652    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26653
26654  # Input might be given as Windows format, start by converting to
26655  # unix format.
26656  path="$BOOT_JDK"
26657  new_path=`$CYGPATH -u "$path"`
26658
26659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26662  # "foo.exe" is OK but "foo" is an error.
26663  #
26664  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26665  # It is also a way to make sure we got the proper file name for the real test later on.
26666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26667  if test "x$test_shortpath" = x; then
26668    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26669$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26670    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26671  fi
26672
26673  # Call helper function which possibly converts this using DOS-style short mode.
26674  # If so, the updated path is stored in $new_path.
26675
26676  input_path="$new_path"
26677  # Check if we need to convert this using DOS-style short mode. If the path
26678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26679  # take no chances and rewrite it.
26680  # Note: m4 eats our [], so we need to use [ and ] instead.
26681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26682  if test "x$has_forbidden_chars" != x; then
26683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26684    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26685    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26686    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26687      # Going to short mode and back again did indeed matter. Since short mode is
26688      # case insensitive, let's make it lowercase to improve readability.
26689      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26690      # Now convert it back to Unix-style (cygpath)
26691      input_path=`$CYGPATH -u "$shortmode_path"`
26692      new_path="$input_path"
26693    fi
26694  fi
26695
26696  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26697  if test "x$test_cygdrive_prefix" = x; then
26698    # As a simple fix, exclude /usr/bin since it's not a real path.
26699    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26700      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26701      # a path prefixed by /cygdrive for fixpath to work.
26702      new_path="$CYGWIN_ROOT_PATH$input_path"
26703    fi
26704  fi
26705
26706
26707  if test "x$path" != "x$new_path"; then
26708    BOOT_JDK="$new_path"
26709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26710$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26711  fi
26712
26713    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26714
26715  path="$BOOT_JDK"
26716  has_colon=`$ECHO $path | $GREP ^.:`
26717  new_path="$path"
26718  if test "x$has_colon" = x; then
26719    # Not in mixed or Windows style, start by that.
26720    new_path=`cmd //c echo $path`
26721  fi
26722
26723
26724  input_path="$new_path"
26725  # Check if we need to convert this using DOS-style short mode. If the path
26726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26727  # take no chances and rewrite it.
26728  # Note: m4 eats our [], so we need to use [ and ] instead.
26729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26730  if test "x$has_forbidden_chars" != x; then
26731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26733  fi
26734
26735
26736  windows_path="$new_path"
26737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26738    unix_path=`$CYGPATH -u "$windows_path"`
26739    new_path="$unix_path"
26740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26742    new_path="$unix_path"
26743  fi
26744
26745  if test "x$path" != "x$new_path"; then
26746    BOOT_JDK="$new_path"
26747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26748$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26749  fi
26750
26751  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26752  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26753
26754    else
26755      # We're on a unix platform. Hooray! :)
26756      path="$BOOT_JDK"
26757      has_space=`$ECHO "$path" | $GREP " "`
26758      if test "x$has_space" != x; then
26759        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26761        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26762      fi
26763
26764      # Use eval to expand a potential ~
26765      eval path="$path"
26766      if test ! -f "$path" && test ! -d "$path"; then
26767        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26768      fi
26769
26770      if test -d "$path"; then
26771        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26772      else
26773        dir="`$DIRNAME "$path"`"
26774        base="`$BASENAME "$path"`"
26775        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26776      fi
26777    fi
26778  fi
26779
26780            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26781$as_echo_n "checking for Boot JDK... " >&6; }
26782            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26783$as_echo "$BOOT_JDK" >&6; }
26784            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26785$as_echo_n "checking Boot JDK version... " >&6; }
26786            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26787            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26788$as_echo "$BOOT_JDK_VERSION" >&6; }
26789          fi # end check jdk version
26790        fi # end check javac
26791      fi # end check java
26792    fi # end check boot jdk found
26793  fi
26794
26795    done
26796  fi
26797
26798  fi
26799
26800
26801    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26802    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26803      # Do we have a bin/java?
26804      if test ! -x "$BOOT_JDK/bin/java"; then
26805        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26807        BOOT_JDK_FOUND=no
26808      else
26809        # Do we have a bin/javac?
26810        if test ! -x "$BOOT_JDK/bin/javac"; then
26811          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26813          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26814$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26815          BOOT_JDK_FOUND=no
26816        else
26817          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26818          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26819
26820          # Extra M4 quote needed to protect [] in grep expression.
26821          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26822          if test "x$FOUND_CORRECT_VERSION" = x; then
26823            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26825            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26826$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26827            BOOT_JDK_FOUND=no
26828          else
26829            # We're done! :-)
26830            BOOT_JDK_FOUND=yes
26831
26832  # Only process if variable expands to non-empty
26833
26834  if test "x$BOOT_JDK" != x; then
26835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26836
26837  # Input might be given as Windows format, start by converting to
26838  # unix format.
26839  path="$BOOT_JDK"
26840  new_path=`$CYGPATH -u "$path"`
26841
26842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26845  # "foo.exe" is OK but "foo" is an error.
26846  #
26847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26848  # It is also a way to make sure we got the proper file name for the real test later on.
26849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26850  if test "x$test_shortpath" = x; then
26851    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26852$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26853    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26854  fi
26855
26856  # Call helper function which possibly converts this using DOS-style short mode.
26857  # If so, the updated path is stored in $new_path.
26858
26859  input_path="$new_path"
26860  # Check if we need to convert this using DOS-style short mode. If the path
26861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26862  # take no chances and rewrite it.
26863  # Note: m4 eats our [], so we need to use [ and ] instead.
26864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26865  if test "x$has_forbidden_chars" != x; then
26866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26870      # Going to short mode and back again did indeed matter. Since short mode is
26871      # case insensitive, let's make it lowercase to improve readability.
26872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26873      # Now convert it back to Unix-style (cygpath)
26874      input_path=`$CYGPATH -u "$shortmode_path"`
26875      new_path="$input_path"
26876    fi
26877  fi
26878
26879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26880  if test "x$test_cygdrive_prefix" = x; then
26881    # As a simple fix, exclude /usr/bin since it's not a real path.
26882    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26884      # a path prefixed by /cygdrive for fixpath to work.
26885      new_path="$CYGWIN_ROOT_PATH$input_path"
26886    fi
26887  fi
26888
26889
26890  if test "x$path" != "x$new_path"; then
26891    BOOT_JDK="$new_path"
26892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26893$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26894  fi
26895
26896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26897
26898  path="$BOOT_JDK"
26899  has_colon=`$ECHO $path | $GREP ^.:`
26900  new_path="$path"
26901  if test "x$has_colon" = x; then
26902    # Not in mixed or Windows style, start by that.
26903    new_path=`cmd //c echo $path`
26904  fi
26905
26906
26907  input_path="$new_path"
26908  # Check if we need to convert this using DOS-style short mode. If the path
26909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26910  # take no chances and rewrite it.
26911  # Note: m4 eats our [], so we need to use [ and ] instead.
26912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26913  if test "x$has_forbidden_chars" != x; then
26914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26916  fi
26917
26918
26919  windows_path="$new_path"
26920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26921    unix_path=`$CYGPATH -u "$windows_path"`
26922    new_path="$unix_path"
26923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26925    new_path="$unix_path"
26926  fi
26927
26928  if test "x$path" != "x$new_path"; then
26929    BOOT_JDK="$new_path"
26930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26931$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26932  fi
26933
26934  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26935  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26936
26937    else
26938      # We're on a unix platform. Hooray! :)
26939      path="$BOOT_JDK"
26940      has_space=`$ECHO "$path" | $GREP " "`
26941      if test "x$has_space" != x; then
26942        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26943$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26944        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26945      fi
26946
26947      # Use eval to expand a potential ~
26948      eval path="$path"
26949      if test ! -f "$path" && test ! -d "$path"; then
26950        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26951      fi
26952
26953      if test -d "$path"; then
26954        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26955      else
26956        dir="`$DIRNAME "$path"`"
26957        base="`$BASENAME "$path"`"
26958        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26959      fi
26960    fi
26961  fi
26962
26963            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26964$as_echo_n "checking for Boot JDK... " >&6; }
26965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26966$as_echo "$BOOT_JDK" >&6; }
26967            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26968$as_echo_n "checking Boot JDK version... " >&6; }
26969            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26970            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26971$as_echo "$BOOT_JDK_VERSION" >&6; }
26972          fi # end check jdk version
26973        fi # end check javac
26974      fi # end check java
26975    fi # end check boot jdk found
26976  fi
26977
26978
26979  if test "x$BOOT_JDK_FOUND" = xno; then
26980    # Now execute the test
26981
26982  if test "x$PROGRAMW6432" != x; then
26983    VIRTUAL_DIR="$PROGRAMW6432/Java"
26984
26985  windows_path="$VIRTUAL_DIR"
26986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26987    unix_path=`$CYGPATH -u "$windows_path"`
26988    VIRTUAL_DIR="$unix_path"
26989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26991    VIRTUAL_DIR="$unix_path"
26992  fi
26993
26994
26995  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26996  BOOT_JDK_SUFFIX=""
26997  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26998  if test "x$ALL_JDKS_FOUND" != x; then
26999    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27000
27001  if test "x$BOOT_JDK_FOUND" = xno; then
27002    # Now execute the test
27003
27004        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27005        if test -d "$BOOT_JDK"; then
27006          BOOT_JDK_FOUND=maybe
27007          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27008$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27009        fi
27010
27011
27012    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27013    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27014      # Do we have a bin/java?
27015      if test ! -x "$BOOT_JDK/bin/java"; then
27016        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27018        BOOT_JDK_FOUND=no
27019      else
27020        # Do we have a bin/javac?
27021        if test ! -x "$BOOT_JDK/bin/javac"; then
27022          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27024          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27025$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27026          BOOT_JDK_FOUND=no
27027        else
27028          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27029          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27030
27031          # Extra M4 quote needed to protect [] in grep expression.
27032          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27033          if test "x$FOUND_CORRECT_VERSION" = x; then
27034            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27036            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27037$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27038            BOOT_JDK_FOUND=no
27039          else
27040            # We're done! :-)
27041            BOOT_JDK_FOUND=yes
27042
27043  # Only process if variable expands to non-empty
27044
27045  if test "x$BOOT_JDK" != x; then
27046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27047
27048  # Input might be given as Windows format, start by converting to
27049  # unix format.
27050  path="$BOOT_JDK"
27051  new_path=`$CYGPATH -u "$path"`
27052
27053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27056  # "foo.exe" is OK but "foo" is an error.
27057  #
27058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27059  # It is also a way to make sure we got the proper file name for the real test later on.
27060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27061  if test "x$test_shortpath" = x; then
27062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27064    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27065  fi
27066
27067  # Call helper function which possibly converts this using DOS-style short mode.
27068  # If so, the updated path is stored in $new_path.
27069
27070  input_path="$new_path"
27071  # Check if we need to convert this using DOS-style short mode. If the path
27072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27073  # take no chances and rewrite it.
27074  # Note: m4 eats our [], so we need to use [ and ] instead.
27075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27076  if test "x$has_forbidden_chars" != x; then
27077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27081      # Going to short mode and back again did indeed matter. Since short mode is
27082      # case insensitive, let's make it lowercase to improve readability.
27083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27084      # Now convert it back to Unix-style (cygpath)
27085      input_path=`$CYGPATH -u "$shortmode_path"`
27086      new_path="$input_path"
27087    fi
27088  fi
27089
27090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27091  if test "x$test_cygdrive_prefix" = x; then
27092    # As a simple fix, exclude /usr/bin since it's not a real path.
27093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27095      # a path prefixed by /cygdrive for fixpath to work.
27096      new_path="$CYGWIN_ROOT_PATH$input_path"
27097    fi
27098  fi
27099
27100
27101  if test "x$path" != "x$new_path"; then
27102    BOOT_JDK="$new_path"
27103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27105  fi
27106
27107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27108
27109  path="$BOOT_JDK"
27110  has_colon=`$ECHO $path | $GREP ^.:`
27111  new_path="$path"
27112  if test "x$has_colon" = x; then
27113    # Not in mixed or Windows style, start by that.
27114    new_path=`cmd //c echo $path`
27115  fi
27116
27117
27118  input_path="$new_path"
27119  # Check if we need to convert this using DOS-style short mode. If the path
27120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27121  # take no chances and rewrite it.
27122  # Note: m4 eats our [], so we need to use [ and ] instead.
27123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27124  if test "x$has_forbidden_chars" != x; then
27125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27127  fi
27128
27129
27130  windows_path="$new_path"
27131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27132    unix_path=`$CYGPATH -u "$windows_path"`
27133    new_path="$unix_path"
27134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27136    new_path="$unix_path"
27137  fi
27138
27139  if test "x$path" != "x$new_path"; then
27140    BOOT_JDK="$new_path"
27141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27143  fi
27144
27145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27147
27148    else
27149      # We're on a unix platform. Hooray! :)
27150      path="$BOOT_JDK"
27151      has_space=`$ECHO "$path" | $GREP " "`
27152      if test "x$has_space" != x; then
27153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27154$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27155        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27156      fi
27157
27158      # Use eval to expand a potential ~
27159      eval path="$path"
27160      if test ! -f "$path" && test ! -d "$path"; then
27161        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27162      fi
27163
27164      if test -d "$path"; then
27165        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27166      else
27167        dir="`$DIRNAME "$path"`"
27168        base="`$BASENAME "$path"`"
27169        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27170      fi
27171    fi
27172  fi
27173
27174            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27175$as_echo_n "checking for Boot JDK... " >&6; }
27176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27177$as_echo "$BOOT_JDK" >&6; }
27178            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27179$as_echo_n "checking Boot JDK version... " >&6; }
27180            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27182$as_echo "$BOOT_JDK_VERSION" >&6; }
27183          fi # end check jdk version
27184        fi # end check javac
27185      fi # end check java
27186    fi # end check boot jdk found
27187  fi
27188
27189    done
27190  fi
27191
27192  fi
27193
27194
27195    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27196    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27197      # Do we have a bin/java?
27198      if test ! -x "$BOOT_JDK/bin/java"; then
27199        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27201        BOOT_JDK_FOUND=no
27202      else
27203        # Do we have a bin/javac?
27204        if test ! -x "$BOOT_JDK/bin/javac"; then
27205          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27207          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27208$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27209          BOOT_JDK_FOUND=no
27210        else
27211          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27212          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27213
27214          # Extra M4 quote needed to protect [] in grep expression.
27215          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27216          if test "x$FOUND_CORRECT_VERSION" = x; then
27217            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27219            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27220$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27221            BOOT_JDK_FOUND=no
27222          else
27223            # We're done! :-)
27224            BOOT_JDK_FOUND=yes
27225
27226  # Only process if variable expands to non-empty
27227
27228  if test "x$BOOT_JDK" != x; then
27229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27230
27231  # Input might be given as Windows format, start by converting to
27232  # unix format.
27233  path="$BOOT_JDK"
27234  new_path=`$CYGPATH -u "$path"`
27235
27236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27239  # "foo.exe" is OK but "foo" is an error.
27240  #
27241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27242  # It is also a way to make sure we got the proper file name for the real test later on.
27243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27244  if test "x$test_shortpath" = x; then
27245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27246$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27247    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27248  fi
27249
27250  # Call helper function which possibly converts this using DOS-style short mode.
27251  # If so, the updated path is stored in $new_path.
27252
27253  input_path="$new_path"
27254  # Check if we need to convert this using DOS-style short mode. If the path
27255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27256  # take no chances and rewrite it.
27257  # Note: m4 eats our [], so we need to use [ and ] instead.
27258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27259  if test "x$has_forbidden_chars" != x; then
27260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27264      # Going to short mode and back again did indeed matter. Since short mode is
27265      # case insensitive, let's make it lowercase to improve readability.
27266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27267      # Now convert it back to Unix-style (cygpath)
27268      input_path=`$CYGPATH -u "$shortmode_path"`
27269      new_path="$input_path"
27270    fi
27271  fi
27272
27273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27274  if test "x$test_cygdrive_prefix" = x; then
27275    # As a simple fix, exclude /usr/bin since it's not a real path.
27276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27278      # a path prefixed by /cygdrive for fixpath to work.
27279      new_path="$CYGWIN_ROOT_PATH$input_path"
27280    fi
27281  fi
27282
27283
27284  if test "x$path" != "x$new_path"; then
27285    BOOT_JDK="$new_path"
27286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27287$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27288  fi
27289
27290    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27291
27292  path="$BOOT_JDK"
27293  has_colon=`$ECHO $path | $GREP ^.:`
27294  new_path="$path"
27295  if test "x$has_colon" = x; then
27296    # Not in mixed or Windows style, start by that.
27297    new_path=`cmd //c echo $path`
27298  fi
27299
27300
27301  input_path="$new_path"
27302  # Check if we need to convert this using DOS-style short mode. If the path
27303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27304  # take no chances and rewrite it.
27305  # Note: m4 eats our [], so we need to use [ and ] instead.
27306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27307  if test "x$has_forbidden_chars" != x; then
27308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27310  fi
27311
27312
27313  windows_path="$new_path"
27314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27315    unix_path=`$CYGPATH -u "$windows_path"`
27316    new_path="$unix_path"
27317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27319    new_path="$unix_path"
27320  fi
27321
27322  if test "x$path" != "x$new_path"; then
27323    BOOT_JDK="$new_path"
27324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27325$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27326  fi
27327
27328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27330
27331    else
27332      # We're on a unix platform. Hooray! :)
27333      path="$BOOT_JDK"
27334      has_space=`$ECHO "$path" | $GREP " "`
27335      if test "x$has_space" != x; then
27336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27337$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27338        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27339      fi
27340
27341      # Use eval to expand a potential ~
27342      eval path="$path"
27343      if test ! -f "$path" && test ! -d "$path"; then
27344        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27345      fi
27346
27347      if test -d "$path"; then
27348        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27349      else
27350        dir="`$DIRNAME "$path"`"
27351        base="`$BASENAME "$path"`"
27352        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27353      fi
27354    fi
27355  fi
27356
27357            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27358$as_echo_n "checking for Boot JDK... " >&6; }
27359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27360$as_echo "$BOOT_JDK" >&6; }
27361            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27362$as_echo_n "checking Boot JDK version... " >&6; }
27363            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27365$as_echo "$BOOT_JDK_VERSION" >&6; }
27366          fi # end check jdk version
27367        fi # end check javac
27368      fi # end check java
27369    fi # end check boot jdk found
27370  fi
27371
27372
27373  if test "x$BOOT_JDK_FOUND" = xno; then
27374    # Now execute the test
27375
27376  if test "x$PROGRAMFILES" != x; then
27377    VIRTUAL_DIR="$PROGRAMFILES/Java"
27378
27379  windows_path="$VIRTUAL_DIR"
27380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27381    unix_path=`$CYGPATH -u "$windows_path"`
27382    VIRTUAL_DIR="$unix_path"
27383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27385    VIRTUAL_DIR="$unix_path"
27386  fi
27387
27388
27389  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27390  BOOT_JDK_SUFFIX=""
27391  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27392  if test "x$ALL_JDKS_FOUND" != x; then
27393    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27394
27395  if test "x$BOOT_JDK_FOUND" = xno; then
27396    # Now execute the test
27397
27398        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27399        if test -d "$BOOT_JDK"; then
27400          BOOT_JDK_FOUND=maybe
27401          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27402$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27403        fi
27404
27405
27406    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27407    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27408      # Do we have a bin/java?
27409      if test ! -x "$BOOT_JDK/bin/java"; then
27410        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27412        BOOT_JDK_FOUND=no
27413      else
27414        # Do we have a bin/javac?
27415        if test ! -x "$BOOT_JDK/bin/javac"; then
27416          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27418          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27419$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27420          BOOT_JDK_FOUND=no
27421        else
27422          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27423          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27424
27425          # Extra M4 quote needed to protect [] in grep expression.
27426          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27427          if test "x$FOUND_CORRECT_VERSION" = x; then
27428            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27430            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27431$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27432            BOOT_JDK_FOUND=no
27433          else
27434            # We're done! :-)
27435            BOOT_JDK_FOUND=yes
27436
27437  # Only process if variable expands to non-empty
27438
27439  if test "x$BOOT_JDK" != x; then
27440    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27441
27442  # Input might be given as Windows format, start by converting to
27443  # unix format.
27444  path="$BOOT_JDK"
27445  new_path=`$CYGPATH -u "$path"`
27446
27447  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27448  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27449  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27450  # "foo.exe" is OK but "foo" is an error.
27451  #
27452  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27453  # It is also a way to make sure we got the proper file name for the real test later on.
27454  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27455  if test "x$test_shortpath" = x; then
27456    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27457$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27458    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27459  fi
27460
27461  # Call helper function which possibly converts this using DOS-style short mode.
27462  # If so, the updated path is stored in $new_path.
27463
27464  input_path="$new_path"
27465  # Check if we need to convert this using DOS-style short mode. If the path
27466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27467  # take no chances and rewrite it.
27468  # Note: m4 eats our [], so we need to use [ and ] instead.
27469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27470  if test "x$has_forbidden_chars" != x; then
27471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27472    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27473    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27474    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27475      # Going to short mode and back again did indeed matter. Since short mode is
27476      # case insensitive, let's make it lowercase to improve readability.
27477      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27478      # Now convert it back to Unix-style (cygpath)
27479      input_path=`$CYGPATH -u "$shortmode_path"`
27480      new_path="$input_path"
27481    fi
27482  fi
27483
27484  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27485  if test "x$test_cygdrive_prefix" = x; then
27486    # As a simple fix, exclude /usr/bin since it's not a real path.
27487    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27488      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27489      # a path prefixed by /cygdrive for fixpath to work.
27490      new_path="$CYGWIN_ROOT_PATH$input_path"
27491    fi
27492  fi
27493
27494
27495  if test "x$path" != "x$new_path"; then
27496    BOOT_JDK="$new_path"
27497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27499  fi
27500
27501    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27502
27503  path="$BOOT_JDK"
27504  has_colon=`$ECHO $path | $GREP ^.:`
27505  new_path="$path"
27506  if test "x$has_colon" = x; then
27507    # Not in mixed or Windows style, start by that.
27508    new_path=`cmd //c echo $path`
27509  fi
27510
27511
27512  input_path="$new_path"
27513  # Check if we need to convert this using DOS-style short mode. If the path
27514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27515  # take no chances and rewrite it.
27516  # Note: m4 eats our [], so we need to use [ and ] instead.
27517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27518  if test "x$has_forbidden_chars" != x; then
27519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27521  fi
27522
27523
27524  windows_path="$new_path"
27525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27526    unix_path=`$CYGPATH -u "$windows_path"`
27527    new_path="$unix_path"
27528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27530    new_path="$unix_path"
27531  fi
27532
27533  if test "x$path" != "x$new_path"; then
27534    BOOT_JDK="$new_path"
27535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27536$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27537  fi
27538
27539  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27540  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27541
27542    else
27543      # We're on a unix platform. Hooray! :)
27544      path="$BOOT_JDK"
27545      has_space=`$ECHO "$path" | $GREP " "`
27546      if test "x$has_space" != x; then
27547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27548$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27549        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27550      fi
27551
27552      # Use eval to expand a potential ~
27553      eval path="$path"
27554      if test ! -f "$path" && test ! -d "$path"; then
27555        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27556      fi
27557
27558      if test -d "$path"; then
27559        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27560      else
27561        dir="`$DIRNAME "$path"`"
27562        base="`$BASENAME "$path"`"
27563        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27564      fi
27565    fi
27566  fi
27567
27568            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27569$as_echo_n "checking for Boot JDK... " >&6; }
27570            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27571$as_echo "$BOOT_JDK" >&6; }
27572            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27573$as_echo_n "checking Boot JDK version... " >&6; }
27574            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27576$as_echo "$BOOT_JDK_VERSION" >&6; }
27577          fi # end check jdk version
27578        fi # end check javac
27579      fi # end check java
27580    fi # end check boot jdk found
27581  fi
27582
27583    done
27584  fi
27585
27586  fi
27587
27588
27589    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27590    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27591      # Do we have a bin/java?
27592      if test ! -x "$BOOT_JDK/bin/java"; then
27593        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27595        BOOT_JDK_FOUND=no
27596      else
27597        # Do we have a bin/javac?
27598        if test ! -x "$BOOT_JDK/bin/javac"; then
27599          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27601          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27602$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27603          BOOT_JDK_FOUND=no
27604        else
27605          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27606          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27607
27608          # Extra M4 quote needed to protect [] in grep expression.
27609          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27610          if test "x$FOUND_CORRECT_VERSION" = x; then
27611            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27613            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27614$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27615            BOOT_JDK_FOUND=no
27616          else
27617            # We're done! :-)
27618            BOOT_JDK_FOUND=yes
27619
27620  # Only process if variable expands to non-empty
27621
27622  if test "x$BOOT_JDK" != x; then
27623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27624
27625  # Input might be given as Windows format, start by converting to
27626  # unix format.
27627  path="$BOOT_JDK"
27628  new_path=`$CYGPATH -u "$path"`
27629
27630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27633  # "foo.exe" is OK but "foo" is an error.
27634  #
27635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27636  # It is also a way to make sure we got the proper file name for the real test later on.
27637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27638  if test "x$test_shortpath" = x; then
27639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27640$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27641    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27642  fi
27643
27644  # Call helper function which possibly converts this using DOS-style short mode.
27645  # If so, the updated path is stored in $new_path.
27646
27647  input_path="$new_path"
27648  # Check if we need to convert this using DOS-style short mode. If the path
27649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27650  # take no chances and rewrite it.
27651  # Note: m4 eats our [], so we need to use [ and ] instead.
27652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27653  if test "x$has_forbidden_chars" != x; then
27654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27658      # Going to short mode and back again did indeed matter. Since short mode is
27659      # case insensitive, let's make it lowercase to improve readability.
27660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27661      # Now convert it back to Unix-style (cygpath)
27662      input_path=`$CYGPATH -u "$shortmode_path"`
27663      new_path="$input_path"
27664    fi
27665  fi
27666
27667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27668  if test "x$test_cygdrive_prefix" = x; then
27669    # As a simple fix, exclude /usr/bin since it's not a real path.
27670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27672      # a path prefixed by /cygdrive for fixpath to work.
27673      new_path="$CYGWIN_ROOT_PATH$input_path"
27674    fi
27675  fi
27676
27677
27678  if test "x$path" != "x$new_path"; then
27679    BOOT_JDK="$new_path"
27680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27681$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27682  fi
27683
27684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27685
27686  path="$BOOT_JDK"
27687  has_colon=`$ECHO $path | $GREP ^.:`
27688  new_path="$path"
27689  if test "x$has_colon" = x; then
27690    # Not in mixed or Windows style, start by that.
27691    new_path=`cmd //c echo $path`
27692  fi
27693
27694
27695  input_path="$new_path"
27696  # Check if we need to convert this using DOS-style short mode. If the path
27697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27698  # take no chances and rewrite it.
27699  # Note: m4 eats our [], so we need to use [ and ] instead.
27700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27701  if test "x$has_forbidden_chars" != x; then
27702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27704  fi
27705
27706
27707  windows_path="$new_path"
27708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27709    unix_path=`$CYGPATH -u "$windows_path"`
27710    new_path="$unix_path"
27711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27713    new_path="$unix_path"
27714  fi
27715
27716  if test "x$path" != "x$new_path"; then
27717    BOOT_JDK="$new_path"
27718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27719$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27720  fi
27721
27722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27724
27725    else
27726      # We're on a unix platform. Hooray! :)
27727      path="$BOOT_JDK"
27728      has_space=`$ECHO "$path" | $GREP " "`
27729      if test "x$has_space" != x; then
27730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27731$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27732        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27733      fi
27734
27735      # Use eval to expand a potential ~
27736      eval path="$path"
27737      if test ! -f "$path" && test ! -d "$path"; then
27738        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27739      fi
27740
27741      if test -d "$path"; then
27742        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27743      else
27744        dir="`$DIRNAME "$path"`"
27745        base="`$BASENAME "$path"`"
27746        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27747      fi
27748    fi
27749  fi
27750
27751            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27752$as_echo_n "checking for Boot JDK... " >&6; }
27753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27754$as_echo "$BOOT_JDK" >&6; }
27755            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27756$as_echo_n "checking Boot JDK version... " >&6; }
27757            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27759$as_echo "$BOOT_JDK_VERSION" >&6; }
27760          fi # end check jdk version
27761        fi # end check javac
27762      fi # end check java
27763    fi # end check boot jdk found
27764  fi
27765
27766
27767  if test "x$BOOT_JDK_FOUND" = xno; then
27768    # Now execute the test
27769
27770  if test "x$ProgramFiles" != x; then
27771    VIRTUAL_DIR="$ProgramFiles/Java"
27772
27773  windows_path="$VIRTUAL_DIR"
27774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27775    unix_path=`$CYGPATH -u "$windows_path"`
27776    VIRTUAL_DIR="$unix_path"
27777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27779    VIRTUAL_DIR="$unix_path"
27780  fi
27781
27782
27783  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27784  BOOT_JDK_SUFFIX=""
27785  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27786  if test "x$ALL_JDKS_FOUND" != x; then
27787    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27788
27789  if test "x$BOOT_JDK_FOUND" = xno; then
27790    # Now execute the test
27791
27792        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27793        if test -d "$BOOT_JDK"; then
27794          BOOT_JDK_FOUND=maybe
27795          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27796$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27797        fi
27798
27799
27800    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27801    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27802      # Do we have a bin/java?
27803      if test ! -x "$BOOT_JDK/bin/java"; then
27804        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27806        BOOT_JDK_FOUND=no
27807      else
27808        # Do we have a bin/javac?
27809        if test ! -x "$BOOT_JDK/bin/javac"; then
27810          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27812          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27813$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27814          BOOT_JDK_FOUND=no
27815        else
27816          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27817          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27818
27819          # Extra M4 quote needed to protect [] in grep expression.
27820          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27821          if test "x$FOUND_CORRECT_VERSION" = x; then
27822            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27824            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27825$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27826            BOOT_JDK_FOUND=no
27827          else
27828            # We're done! :-)
27829            BOOT_JDK_FOUND=yes
27830
27831  # Only process if variable expands to non-empty
27832
27833  if test "x$BOOT_JDK" != x; then
27834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27835
27836  # Input might be given as Windows format, start by converting to
27837  # unix format.
27838  path="$BOOT_JDK"
27839  new_path=`$CYGPATH -u "$path"`
27840
27841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27844  # "foo.exe" is OK but "foo" is an error.
27845  #
27846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27847  # It is also a way to make sure we got the proper file name for the real test later on.
27848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27849  if test "x$test_shortpath" = x; then
27850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27852    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27853  fi
27854
27855  # Call helper function which possibly converts this using DOS-style short mode.
27856  # If so, the updated path is stored in $new_path.
27857
27858  input_path="$new_path"
27859  # Check if we need to convert this using DOS-style short mode. If the path
27860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27861  # take no chances and rewrite it.
27862  # Note: m4 eats our [], so we need to use [ and ] instead.
27863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27864  if test "x$has_forbidden_chars" != x; then
27865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27869      # Going to short mode and back again did indeed matter. Since short mode is
27870      # case insensitive, let's make it lowercase to improve readability.
27871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27872      # Now convert it back to Unix-style (cygpath)
27873      input_path=`$CYGPATH -u "$shortmode_path"`
27874      new_path="$input_path"
27875    fi
27876  fi
27877
27878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27879  if test "x$test_cygdrive_prefix" = x; then
27880    # As a simple fix, exclude /usr/bin since it's not a real path.
27881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27883      # a path prefixed by /cygdrive for fixpath to work.
27884      new_path="$CYGWIN_ROOT_PATH$input_path"
27885    fi
27886  fi
27887
27888
27889  if test "x$path" != "x$new_path"; then
27890    BOOT_JDK="$new_path"
27891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27893  fi
27894
27895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27896
27897  path="$BOOT_JDK"
27898  has_colon=`$ECHO $path | $GREP ^.:`
27899  new_path="$path"
27900  if test "x$has_colon" = x; then
27901    # Not in mixed or Windows style, start by that.
27902    new_path=`cmd //c echo $path`
27903  fi
27904
27905
27906  input_path="$new_path"
27907  # Check if we need to convert this using DOS-style short mode. If the path
27908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27909  # take no chances and rewrite it.
27910  # Note: m4 eats our [], so we need to use [ and ] instead.
27911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27912  if test "x$has_forbidden_chars" != x; then
27913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27915  fi
27916
27917
27918  windows_path="$new_path"
27919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27920    unix_path=`$CYGPATH -u "$windows_path"`
27921    new_path="$unix_path"
27922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27924    new_path="$unix_path"
27925  fi
27926
27927  if test "x$path" != "x$new_path"; then
27928    BOOT_JDK="$new_path"
27929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27930$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27931  fi
27932
27933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27935
27936    else
27937      # We're on a unix platform. Hooray! :)
27938      path="$BOOT_JDK"
27939      has_space=`$ECHO "$path" | $GREP " "`
27940      if test "x$has_space" != x; then
27941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27942$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27943        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27944      fi
27945
27946      # Use eval to expand a potential ~
27947      eval path="$path"
27948      if test ! -f "$path" && test ! -d "$path"; then
27949        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27950      fi
27951
27952      if test -d "$path"; then
27953        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27954      else
27955        dir="`$DIRNAME "$path"`"
27956        base="`$BASENAME "$path"`"
27957        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27958      fi
27959    fi
27960  fi
27961
27962            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27963$as_echo_n "checking for Boot JDK... " >&6; }
27964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27965$as_echo "$BOOT_JDK" >&6; }
27966            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27967$as_echo_n "checking Boot JDK version... " >&6; }
27968            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27970$as_echo "$BOOT_JDK_VERSION" >&6; }
27971          fi # end check jdk version
27972        fi # end check javac
27973      fi # end check java
27974    fi # end check boot jdk found
27975  fi
27976
27977    done
27978  fi
27979
27980  fi
27981
27982
27983    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27984    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27985      # Do we have a bin/java?
27986      if test ! -x "$BOOT_JDK/bin/java"; then
27987        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27989        BOOT_JDK_FOUND=no
27990      else
27991        # Do we have a bin/javac?
27992        if test ! -x "$BOOT_JDK/bin/javac"; then
27993          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27995          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27996$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27997          BOOT_JDK_FOUND=no
27998        else
27999          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28000          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28001
28002          # Extra M4 quote needed to protect [] in grep expression.
28003          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28004          if test "x$FOUND_CORRECT_VERSION" = x; then
28005            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28007            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28008$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28009            BOOT_JDK_FOUND=no
28010          else
28011            # We're done! :-)
28012            BOOT_JDK_FOUND=yes
28013
28014  # Only process if variable expands to non-empty
28015
28016  if test "x$BOOT_JDK" != x; then
28017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28018
28019  # Input might be given as Windows format, start by converting to
28020  # unix format.
28021  path="$BOOT_JDK"
28022  new_path=`$CYGPATH -u "$path"`
28023
28024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28027  # "foo.exe" is OK but "foo" is an error.
28028  #
28029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28030  # It is also a way to make sure we got the proper file name for the real test later on.
28031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28032  if test "x$test_shortpath" = x; then
28033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28034$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28035    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28036  fi
28037
28038  # Call helper function which possibly converts this using DOS-style short mode.
28039  # If so, the updated path is stored in $new_path.
28040
28041  input_path="$new_path"
28042  # Check if we need to convert this using DOS-style short mode. If the path
28043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28044  # take no chances and rewrite it.
28045  # Note: m4 eats our [], so we need to use [ and ] instead.
28046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28047  if test "x$has_forbidden_chars" != x; then
28048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28052      # Going to short mode and back again did indeed matter. Since short mode is
28053      # case insensitive, let's make it lowercase to improve readability.
28054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28055      # Now convert it back to Unix-style (cygpath)
28056      input_path=`$CYGPATH -u "$shortmode_path"`
28057      new_path="$input_path"
28058    fi
28059  fi
28060
28061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28062  if test "x$test_cygdrive_prefix" = x; then
28063    # As a simple fix, exclude /usr/bin since it's not a real path.
28064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28066      # a path prefixed by /cygdrive for fixpath to work.
28067      new_path="$CYGWIN_ROOT_PATH$input_path"
28068    fi
28069  fi
28070
28071
28072  if test "x$path" != "x$new_path"; then
28073    BOOT_JDK="$new_path"
28074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28076  fi
28077
28078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28079
28080  path="$BOOT_JDK"
28081  has_colon=`$ECHO $path | $GREP ^.:`
28082  new_path="$path"
28083  if test "x$has_colon" = x; then
28084    # Not in mixed or Windows style, start by that.
28085    new_path=`cmd //c echo $path`
28086  fi
28087
28088
28089  input_path="$new_path"
28090  # Check if we need to convert this using DOS-style short mode. If the path
28091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28092  # take no chances and rewrite it.
28093  # Note: m4 eats our [], so we need to use [ and ] instead.
28094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28095  if test "x$has_forbidden_chars" != x; then
28096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28098  fi
28099
28100
28101  windows_path="$new_path"
28102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28103    unix_path=`$CYGPATH -u "$windows_path"`
28104    new_path="$unix_path"
28105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28107    new_path="$unix_path"
28108  fi
28109
28110  if test "x$path" != "x$new_path"; then
28111    BOOT_JDK="$new_path"
28112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28113$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28114  fi
28115
28116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28118
28119    else
28120      # We're on a unix platform. Hooray! :)
28121      path="$BOOT_JDK"
28122      has_space=`$ECHO "$path" | $GREP " "`
28123      if test "x$has_space" != x; then
28124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28125$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28126        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28127      fi
28128
28129      # Use eval to expand a potential ~
28130      eval path="$path"
28131      if test ! -f "$path" && test ! -d "$path"; then
28132        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28133      fi
28134
28135      if test -d "$path"; then
28136        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28137      else
28138        dir="`$DIRNAME "$path"`"
28139        base="`$BASENAME "$path"`"
28140        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28141      fi
28142    fi
28143  fi
28144
28145            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28146$as_echo_n "checking for Boot JDK... " >&6; }
28147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28148$as_echo "$BOOT_JDK" >&6; }
28149            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28150$as_echo_n "checking Boot JDK version... " >&6; }
28151            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28153$as_echo "$BOOT_JDK_VERSION" >&6; }
28154          fi # end check jdk version
28155        fi # end check javac
28156      fi # end check java
28157    fi # end check boot jdk found
28158  fi
28159
28160
28161  if test "x$BOOT_JDK_FOUND" = xno; then
28162    # Now execute the test
28163
28164  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28165  BOOT_JDK_SUFFIX=""
28166  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28167  if test "x$ALL_JDKS_FOUND" != x; then
28168    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28169
28170  if test "x$BOOT_JDK_FOUND" = xno; then
28171    # Now execute the test
28172
28173        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28174        if test -d "$BOOT_JDK"; then
28175          BOOT_JDK_FOUND=maybe
28176          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28177$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28178        fi
28179
28180
28181    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28182    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28183      # Do we have a bin/java?
28184      if test ! -x "$BOOT_JDK/bin/java"; then
28185        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28187        BOOT_JDK_FOUND=no
28188      else
28189        # Do we have a bin/javac?
28190        if test ! -x "$BOOT_JDK/bin/javac"; then
28191          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28193          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28194$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28195          BOOT_JDK_FOUND=no
28196        else
28197          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28198          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28199
28200          # Extra M4 quote needed to protect [] in grep expression.
28201          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28202          if test "x$FOUND_CORRECT_VERSION" = x; then
28203            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28205            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28206$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28207            BOOT_JDK_FOUND=no
28208          else
28209            # We're done! :-)
28210            BOOT_JDK_FOUND=yes
28211
28212  # Only process if variable expands to non-empty
28213
28214  if test "x$BOOT_JDK" != x; then
28215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28216
28217  # Input might be given as Windows format, start by converting to
28218  # unix format.
28219  path="$BOOT_JDK"
28220  new_path=`$CYGPATH -u "$path"`
28221
28222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28225  # "foo.exe" is OK but "foo" is an error.
28226  #
28227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28228  # It is also a way to make sure we got the proper file name for the real test later on.
28229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28230  if test "x$test_shortpath" = x; then
28231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28233    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28234  fi
28235
28236  # Call helper function which possibly converts this using DOS-style short mode.
28237  # If so, the updated path is stored in $new_path.
28238
28239  input_path="$new_path"
28240  # Check if we need to convert this using DOS-style short mode. If the path
28241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28242  # take no chances and rewrite it.
28243  # Note: m4 eats our [], so we need to use [ and ] instead.
28244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28245  if test "x$has_forbidden_chars" != x; then
28246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28250      # Going to short mode and back again did indeed matter. Since short mode is
28251      # case insensitive, let's make it lowercase to improve readability.
28252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28253      # Now convert it back to Unix-style (cygpath)
28254      input_path=`$CYGPATH -u "$shortmode_path"`
28255      new_path="$input_path"
28256    fi
28257  fi
28258
28259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28260  if test "x$test_cygdrive_prefix" = x; then
28261    # As a simple fix, exclude /usr/bin since it's not a real path.
28262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28264      # a path prefixed by /cygdrive for fixpath to work.
28265      new_path="$CYGWIN_ROOT_PATH$input_path"
28266    fi
28267  fi
28268
28269
28270  if test "x$path" != "x$new_path"; then
28271    BOOT_JDK="$new_path"
28272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28274  fi
28275
28276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28277
28278  path="$BOOT_JDK"
28279  has_colon=`$ECHO $path | $GREP ^.:`
28280  new_path="$path"
28281  if test "x$has_colon" = x; then
28282    # Not in mixed or Windows style, start by that.
28283    new_path=`cmd //c echo $path`
28284  fi
28285
28286
28287  input_path="$new_path"
28288  # Check if we need to convert this using DOS-style short mode. If the path
28289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28290  # take no chances and rewrite it.
28291  # Note: m4 eats our [], so we need to use [ and ] instead.
28292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28293  if test "x$has_forbidden_chars" != x; then
28294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28296  fi
28297
28298
28299  windows_path="$new_path"
28300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28301    unix_path=`$CYGPATH -u "$windows_path"`
28302    new_path="$unix_path"
28303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28305    new_path="$unix_path"
28306  fi
28307
28308  if test "x$path" != "x$new_path"; then
28309    BOOT_JDK="$new_path"
28310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28311$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28312  fi
28313
28314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28316
28317    else
28318      # We're on a unix platform. Hooray! :)
28319      path="$BOOT_JDK"
28320      has_space=`$ECHO "$path" | $GREP " "`
28321      if test "x$has_space" != x; then
28322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28325      fi
28326
28327      # Use eval to expand a potential ~
28328      eval path="$path"
28329      if test ! -f "$path" && test ! -d "$path"; then
28330        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28331      fi
28332
28333      if test -d "$path"; then
28334        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28335      else
28336        dir="`$DIRNAME "$path"`"
28337        base="`$BASENAME "$path"`"
28338        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28339      fi
28340    fi
28341  fi
28342
28343            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28344$as_echo_n "checking for Boot JDK... " >&6; }
28345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28346$as_echo "$BOOT_JDK" >&6; }
28347            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28348$as_echo_n "checking Boot JDK version... " >&6; }
28349            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28350            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28351$as_echo "$BOOT_JDK_VERSION" >&6; }
28352          fi # end check jdk version
28353        fi # end check javac
28354      fi # end check java
28355    fi # end check boot jdk found
28356  fi
28357
28358    done
28359  fi
28360
28361
28362    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28363    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28364      # Do we have a bin/java?
28365      if test ! -x "$BOOT_JDK/bin/java"; then
28366        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28368        BOOT_JDK_FOUND=no
28369      else
28370        # Do we have a bin/javac?
28371        if test ! -x "$BOOT_JDK/bin/javac"; then
28372          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28374          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28375$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28376          BOOT_JDK_FOUND=no
28377        else
28378          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28379          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28380
28381          # Extra M4 quote needed to protect [] in grep expression.
28382          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28383          if test "x$FOUND_CORRECT_VERSION" = x; then
28384            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28386            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28387$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28388            BOOT_JDK_FOUND=no
28389          else
28390            # We're done! :-)
28391            BOOT_JDK_FOUND=yes
28392
28393  # Only process if variable expands to non-empty
28394
28395  if test "x$BOOT_JDK" != x; then
28396    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28397
28398  # Input might be given as Windows format, start by converting to
28399  # unix format.
28400  path="$BOOT_JDK"
28401  new_path=`$CYGPATH -u "$path"`
28402
28403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28406  # "foo.exe" is OK but "foo" is an error.
28407  #
28408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28409  # It is also a way to make sure we got the proper file name for the real test later on.
28410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28411  if test "x$test_shortpath" = x; then
28412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28413$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28414    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28415  fi
28416
28417  # Call helper function which possibly converts this using DOS-style short mode.
28418  # If so, the updated path is stored in $new_path.
28419
28420  input_path="$new_path"
28421  # Check if we need to convert this using DOS-style short mode. If the path
28422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28423  # take no chances and rewrite it.
28424  # Note: m4 eats our [], so we need to use [ and ] instead.
28425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28426  if test "x$has_forbidden_chars" != x; then
28427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28431      # Going to short mode and back again did indeed matter. Since short mode is
28432      # case insensitive, let's make it lowercase to improve readability.
28433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28434      # Now convert it back to Unix-style (cygpath)
28435      input_path=`$CYGPATH -u "$shortmode_path"`
28436      new_path="$input_path"
28437    fi
28438  fi
28439
28440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28441  if test "x$test_cygdrive_prefix" = x; then
28442    # As a simple fix, exclude /usr/bin since it's not a real path.
28443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28445      # a path prefixed by /cygdrive for fixpath to work.
28446      new_path="$CYGWIN_ROOT_PATH$input_path"
28447    fi
28448  fi
28449
28450
28451  if test "x$path" != "x$new_path"; then
28452    BOOT_JDK="$new_path"
28453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28454$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28455  fi
28456
28457    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28458
28459  path="$BOOT_JDK"
28460  has_colon=`$ECHO $path | $GREP ^.:`
28461  new_path="$path"
28462  if test "x$has_colon" = x; then
28463    # Not in mixed or Windows style, start by that.
28464    new_path=`cmd //c echo $path`
28465  fi
28466
28467
28468  input_path="$new_path"
28469  # Check if we need to convert this using DOS-style short mode. If the path
28470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28471  # take no chances and rewrite it.
28472  # Note: m4 eats our [], so we need to use [ and ] instead.
28473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28474  if test "x$has_forbidden_chars" != x; then
28475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28477  fi
28478
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  if test "x$path" != "x$new_path"; then
28490    BOOT_JDK="$new_path"
28491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28493  fi
28494
28495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28497
28498    else
28499      # We're on a unix platform. Hooray! :)
28500      path="$BOOT_JDK"
28501      has_space=`$ECHO "$path" | $GREP " "`
28502      if test "x$has_space" != x; then
28503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28504$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28505        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28506      fi
28507
28508      # Use eval to expand a potential ~
28509      eval path="$path"
28510      if test ! -f "$path" && test ! -d "$path"; then
28511        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28512      fi
28513
28514      if test -d "$path"; then
28515        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28516      else
28517        dir="`$DIRNAME "$path"`"
28518        base="`$BASENAME "$path"`"
28519        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28520      fi
28521    fi
28522  fi
28523
28524            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28525$as_echo_n "checking for Boot JDK... " >&6; }
28526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28527$as_echo "$BOOT_JDK" >&6; }
28528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28529$as_echo_n "checking Boot JDK version... " >&6; }
28530            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28531            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28532$as_echo "$BOOT_JDK_VERSION" >&6; }
28533          fi # end check jdk version
28534        fi # end check javac
28535      fi # end check java
28536    fi # end check boot jdk found
28537  fi
28538
28539  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28540
28541  if test "x$BOOT_JDK_FOUND" = xno; then
28542    # Now execute the test
28543
28544  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28545  BOOT_JDK_SUFFIX="/Contents/Home"
28546  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28547  if test "x$ALL_JDKS_FOUND" != x; then
28548    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28549
28550  if test "x$BOOT_JDK_FOUND" = xno; then
28551    # Now execute the test
28552
28553        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28554        if test -d "$BOOT_JDK"; then
28555          BOOT_JDK_FOUND=maybe
28556          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28557$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28558        fi
28559
28560
28561    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28562    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28563      # Do we have a bin/java?
28564      if test ! -x "$BOOT_JDK/bin/java"; then
28565        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28567        BOOT_JDK_FOUND=no
28568      else
28569        # Do we have a bin/javac?
28570        if test ! -x "$BOOT_JDK/bin/javac"; then
28571          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28573          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28574$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28575          BOOT_JDK_FOUND=no
28576        else
28577          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28578          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28579
28580          # Extra M4 quote needed to protect [] in grep expression.
28581          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28582          if test "x$FOUND_CORRECT_VERSION" = x; then
28583            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28584$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28585            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28586$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28587            BOOT_JDK_FOUND=no
28588          else
28589            # We're done! :-)
28590            BOOT_JDK_FOUND=yes
28591
28592  # Only process if variable expands to non-empty
28593
28594  if test "x$BOOT_JDK" != x; then
28595    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28596
28597  # Input might be given as Windows format, start by converting to
28598  # unix format.
28599  path="$BOOT_JDK"
28600  new_path=`$CYGPATH -u "$path"`
28601
28602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28605  # "foo.exe" is OK but "foo" is an error.
28606  #
28607  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28608  # It is also a way to make sure we got the proper file name for the real test later on.
28609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28610  if test "x$test_shortpath" = x; then
28611    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28612$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28613    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28614  fi
28615
28616  # Call helper function which possibly converts this using DOS-style short mode.
28617  # If so, the updated path is stored in $new_path.
28618
28619  input_path="$new_path"
28620  # Check if we need to convert this using DOS-style short mode. If the path
28621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28622  # take no chances and rewrite it.
28623  # Note: m4 eats our [], so we need to use [ and ] instead.
28624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28625  if test "x$has_forbidden_chars" != x; then
28626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28630      # Going to short mode and back again did indeed matter. Since short mode is
28631      # case insensitive, let's make it lowercase to improve readability.
28632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28633      # Now convert it back to Unix-style (cygpath)
28634      input_path=`$CYGPATH -u "$shortmode_path"`
28635      new_path="$input_path"
28636    fi
28637  fi
28638
28639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28640  if test "x$test_cygdrive_prefix" = x; then
28641    # As a simple fix, exclude /usr/bin since it's not a real path.
28642    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28644      # a path prefixed by /cygdrive for fixpath to work.
28645      new_path="$CYGWIN_ROOT_PATH$input_path"
28646    fi
28647  fi
28648
28649
28650  if test "x$path" != "x$new_path"; then
28651    BOOT_JDK="$new_path"
28652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28653$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28654  fi
28655
28656    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28657
28658  path="$BOOT_JDK"
28659  has_colon=`$ECHO $path | $GREP ^.:`
28660  new_path="$path"
28661  if test "x$has_colon" = x; then
28662    # Not in mixed or Windows style, start by that.
28663    new_path=`cmd //c echo $path`
28664  fi
28665
28666
28667  input_path="$new_path"
28668  # Check if we need to convert this using DOS-style short mode. If the path
28669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28670  # take no chances and rewrite it.
28671  # Note: m4 eats our [], so we need to use [ and ] instead.
28672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28673  if test "x$has_forbidden_chars" != x; then
28674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28676  fi
28677
28678
28679  windows_path="$new_path"
28680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28681    unix_path=`$CYGPATH -u "$windows_path"`
28682    new_path="$unix_path"
28683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28685    new_path="$unix_path"
28686  fi
28687
28688  if test "x$path" != "x$new_path"; then
28689    BOOT_JDK="$new_path"
28690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28691$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28692  fi
28693
28694  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28695  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28696
28697    else
28698      # We're on a unix platform. Hooray! :)
28699      path="$BOOT_JDK"
28700      has_space=`$ECHO "$path" | $GREP " "`
28701      if test "x$has_space" != x; then
28702        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28703$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28704        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28705      fi
28706
28707      # Use eval to expand a potential ~
28708      eval path="$path"
28709      if test ! -f "$path" && test ! -d "$path"; then
28710        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28711      fi
28712
28713      if test -d "$path"; then
28714        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28715      else
28716        dir="`$DIRNAME "$path"`"
28717        base="`$BASENAME "$path"`"
28718        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28719      fi
28720    fi
28721  fi
28722
28723            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28724$as_echo_n "checking for Boot JDK... " >&6; }
28725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28726$as_echo "$BOOT_JDK" >&6; }
28727            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28728$as_echo_n "checking Boot JDK version... " >&6; }
28729            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28731$as_echo "$BOOT_JDK_VERSION" >&6; }
28732          fi # end check jdk version
28733        fi # end check javac
28734      fi # end check java
28735    fi # end check boot jdk found
28736  fi
28737
28738    done
28739  fi
28740
28741
28742    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28743    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28744      # Do we have a bin/java?
28745      if test ! -x "$BOOT_JDK/bin/java"; then
28746        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28748        BOOT_JDK_FOUND=no
28749      else
28750        # Do we have a bin/javac?
28751        if test ! -x "$BOOT_JDK/bin/javac"; then
28752          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28754          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28755$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28756          BOOT_JDK_FOUND=no
28757        else
28758          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28759          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28760
28761          # Extra M4 quote needed to protect [] in grep expression.
28762          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28763          if test "x$FOUND_CORRECT_VERSION" = x; then
28764            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28766            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28767$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28768            BOOT_JDK_FOUND=no
28769          else
28770            # We're done! :-)
28771            BOOT_JDK_FOUND=yes
28772
28773  # Only process if variable expands to non-empty
28774
28775  if test "x$BOOT_JDK" != x; then
28776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28777
28778  # Input might be given as Windows format, start by converting to
28779  # unix format.
28780  path="$BOOT_JDK"
28781  new_path=`$CYGPATH -u "$path"`
28782
28783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28786  # "foo.exe" is OK but "foo" is an error.
28787  #
28788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28789  # It is also a way to make sure we got the proper file name for the real test later on.
28790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28791  if test "x$test_shortpath" = x; then
28792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28794    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28795  fi
28796
28797  # Call helper function which possibly converts this using DOS-style short mode.
28798  # If so, the updated path is stored in $new_path.
28799
28800  input_path="$new_path"
28801  # Check if we need to convert this using DOS-style short mode. If the path
28802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28803  # take no chances and rewrite it.
28804  # Note: m4 eats our [], so we need to use [ and ] instead.
28805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28806  if test "x$has_forbidden_chars" != x; then
28807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28811      # Going to short mode and back again did indeed matter. Since short mode is
28812      # case insensitive, let's make it lowercase to improve readability.
28813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28814      # Now convert it back to Unix-style (cygpath)
28815      input_path=`$CYGPATH -u "$shortmode_path"`
28816      new_path="$input_path"
28817    fi
28818  fi
28819
28820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28821  if test "x$test_cygdrive_prefix" = x; then
28822    # As a simple fix, exclude /usr/bin since it's not a real path.
28823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28825      # a path prefixed by /cygdrive for fixpath to work.
28826      new_path="$CYGWIN_ROOT_PATH$input_path"
28827    fi
28828  fi
28829
28830
28831  if test "x$path" != "x$new_path"; then
28832    BOOT_JDK="$new_path"
28833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28835  fi
28836
28837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28838
28839  path="$BOOT_JDK"
28840  has_colon=`$ECHO $path | $GREP ^.:`
28841  new_path="$path"
28842  if test "x$has_colon" = x; then
28843    # Not in mixed or Windows style, start by that.
28844    new_path=`cmd //c echo $path`
28845  fi
28846
28847
28848  input_path="$new_path"
28849  # Check if we need to convert this using DOS-style short mode. If the path
28850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28851  # take no chances and rewrite it.
28852  # Note: m4 eats our [], so we need to use [ and ] instead.
28853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28854  if test "x$has_forbidden_chars" != x; then
28855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28857  fi
28858
28859
28860  windows_path="$new_path"
28861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28862    unix_path=`$CYGPATH -u "$windows_path"`
28863    new_path="$unix_path"
28864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28866    new_path="$unix_path"
28867  fi
28868
28869  if test "x$path" != "x$new_path"; then
28870    BOOT_JDK="$new_path"
28871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28873  fi
28874
28875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28877
28878    else
28879      # We're on a unix platform. Hooray! :)
28880      path="$BOOT_JDK"
28881      has_space=`$ECHO "$path" | $GREP " "`
28882      if test "x$has_space" != x; then
28883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28884$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28886      fi
28887
28888      # Use eval to expand a potential ~
28889      eval path="$path"
28890      if test ! -f "$path" && test ! -d "$path"; then
28891        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28892      fi
28893
28894      if test -d "$path"; then
28895        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28896      else
28897        dir="`$DIRNAME "$path"`"
28898        base="`$BASENAME "$path"`"
28899        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28900      fi
28901    fi
28902  fi
28903
28904            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28905$as_echo_n "checking for Boot JDK... " >&6; }
28906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28907$as_echo "$BOOT_JDK" >&6; }
28908            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28909$as_echo_n "checking Boot JDK version... " >&6; }
28910            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28911            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28912$as_echo "$BOOT_JDK_VERSION" >&6; }
28913          fi # end check jdk version
28914        fi # end check javac
28915      fi # end check java
28916    fi # end check boot jdk found
28917  fi
28918
28919
28920  if test "x$BOOT_JDK_FOUND" = xno; then
28921    # Now execute the test
28922
28923  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28924  BOOT_JDK_SUFFIX="/Contents/Home"
28925  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28926  if test "x$ALL_JDKS_FOUND" != x; then
28927    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28928
28929  if test "x$BOOT_JDK_FOUND" = xno; then
28930    # Now execute the test
28931
28932        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28933        if test -d "$BOOT_JDK"; then
28934          BOOT_JDK_FOUND=maybe
28935          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28936$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28937        fi
28938
28939
28940    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28941    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28942      # Do we have a bin/java?
28943      if test ! -x "$BOOT_JDK/bin/java"; then
28944        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28946        BOOT_JDK_FOUND=no
28947      else
28948        # Do we have a bin/javac?
28949        if test ! -x "$BOOT_JDK/bin/javac"; then
28950          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28952          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28953$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28954          BOOT_JDK_FOUND=no
28955        else
28956          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28957          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28958
28959          # Extra M4 quote needed to protect [] in grep expression.
28960          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28961          if test "x$FOUND_CORRECT_VERSION" = x; then
28962            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28964            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28965$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28966            BOOT_JDK_FOUND=no
28967          else
28968            # We're done! :-)
28969            BOOT_JDK_FOUND=yes
28970
28971  # Only process if variable expands to non-empty
28972
28973  if test "x$BOOT_JDK" != x; then
28974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28975
28976  # Input might be given as Windows format, start by converting to
28977  # unix format.
28978  path="$BOOT_JDK"
28979  new_path=`$CYGPATH -u "$path"`
28980
28981  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28982  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28983  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28984  # "foo.exe" is OK but "foo" is an error.
28985  #
28986  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28987  # It is also a way to make sure we got the proper file name for the real test later on.
28988  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28989  if test "x$test_shortpath" = x; then
28990    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28991$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28992    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28993  fi
28994
28995  # Call helper function which possibly converts this using DOS-style short mode.
28996  # If so, the updated path is stored in $new_path.
28997
28998  input_path="$new_path"
28999  # Check if we need to convert this using DOS-style short mode. If the path
29000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29001  # take no chances and rewrite it.
29002  # Note: m4 eats our [], so we need to use [ and ] instead.
29003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29004  if test "x$has_forbidden_chars" != x; then
29005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29009      # Going to short mode and back again did indeed matter. Since short mode is
29010      # case insensitive, let's make it lowercase to improve readability.
29011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29012      # Now convert it back to Unix-style (cygpath)
29013      input_path=`$CYGPATH -u "$shortmode_path"`
29014      new_path="$input_path"
29015    fi
29016  fi
29017
29018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29019  if test "x$test_cygdrive_prefix" = x; then
29020    # As a simple fix, exclude /usr/bin since it's not a real path.
29021    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29023      # a path prefixed by /cygdrive for fixpath to work.
29024      new_path="$CYGWIN_ROOT_PATH$input_path"
29025    fi
29026  fi
29027
29028
29029  if test "x$path" != "x$new_path"; then
29030    BOOT_JDK="$new_path"
29031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29032$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29033  fi
29034
29035    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29036
29037  path="$BOOT_JDK"
29038  has_colon=`$ECHO $path | $GREP ^.:`
29039  new_path="$path"
29040  if test "x$has_colon" = x; then
29041    # Not in mixed or Windows style, start by that.
29042    new_path=`cmd //c echo $path`
29043  fi
29044
29045
29046  input_path="$new_path"
29047  # Check if we need to convert this using DOS-style short mode. If the path
29048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29049  # take no chances and rewrite it.
29050  # Note: m4 eats our [], so we need to use [ and ] instead.
29051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29052  if test "x$has_forbidden_chars" != x; then
29053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29054    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29055  fi
29056
29057
29058  windows_path="$new_path"
29059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29060    unix_path=`$CYGPATH -u "$windows_path"`
29061    new_path="$unix_path"
29062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29064    new_path="$unix_path"
29065  fi
29066
29067  if test "x$path" != "x$new_path"; then
29068    BOOT_JDK="$new_path"
29069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29071  fi
29072
29073  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29074  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29075
29076    else
29077      # We're on a unix platform. Hooray! :)
29078      path="$BOOT_JDK"
29079      has_space=`$ECHO "$path" | $GREP " "`
29080      if test "x$has_space" != x; then
29081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29082$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29083        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29084      fi
29085
29086      # Use eval to expand a potential ~
29087      eval path="$path"
29088      if test ! -f "$path" && test ! -d "$path"; then
29089        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29090      fi
29091
29092      if test -d "$path"; then
29093        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29094      else
29095        dir="`$DIRNAME "$path"`"
29096        base="`$BASENAME "$path"`"
29097        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29098      fi
29099    fi
29100  fi
29101
29102            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29103$as_echo_n "checking for Boot JDK... " >&6; }
29104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29105$as_echo "$BOOT_JDK" >&6; }
29106            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29107$as_echo_n "checking Boot JDK version... " >&6; }
29108            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29110$as_echo "$BOOT_JDK_VERSION" >&6; }
29111          fi # end check jdk version
29112        fi # end check javac
29113      fi # end check java
29114    fi # end check boot jdk found
29115  fi
29116
29117    done
29118  fi
29119
29120
29121    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29122    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29123      # Do we have a bin/java?
29124      if test ! -x "$BOOT_JDK/bin/java"; then
29125        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29127        BOOT_JDK_FOUND=no
29128      else
29129        # Do we have a bin/javac?
29130        if test ! -x "$BOOT_JDK/bin/javac"; then
29131          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29133          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29134$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29135          BOOT_JDK_FOUND=no
29136        else
29137          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29138          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29139
29140          # Extra M4 quote needed to protect [] in grep expression.
29141          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29142          if test "x$FOUND_CORRECT_VERSION" = x; then
29143            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29145            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29146$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29147            BOOT_JDK_FOUND=no
29148          else
29149            # We're done! :-)
29150            BOOT_JDK_FOUND=yes
29151
29152  # Only process if variable expands to non-empty
29153
29154  if test "x$BOOT_JDK" != x; then
29155    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29156
29157  # Input might be given as Windows format, start by converting to
29158  # unix format.
29159  path="$BOOT_JDK"
29160  new_path=`$CYGPATH -u "$path"`
29161
29162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29165  # "foo.exe" is OK but "foo" is an error.
29166  #
29167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29168  # It is also a way to make sure we got the proper file name for the real test later on.
29169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29170  if test "x$test_shortpath" = x; then
29171    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29172$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29173    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29174  fi
29175
29176  # Call helper function which possibly converts this using DOS-style short mode.
29177  # If so, the updated path is stored in $new_path.
29178
29179  input_path="$new_path"
29180  # Check if we need to convert this using DOS-style short mode. If the path
29181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29182  # take no chances and rewrite it.
29183  # Note: m4 eats our [], so we need to use [ and ] instead.
29184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29185  if test "x$has_forbidden_chars" != x; then
29186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29190      # Going to short mode and back again did indeed matter. Since short mode is
29191      # case insensitive, let's make it lowercase to improve readability.
29192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29193      # Now convert it back to Unix-style (cygpath)
29194      input_path=`$CYGPATH -u "$shortmode_path"`
29195      new_path="$input_path"
29196    fi
29197  fi
29198
29199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29200  if test "x$test_cygdrive_prefix" = x; then
29201    # As a simple fix, exclude /usr/bin since it's not a real path.
29202    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29204      # a path prefixed by /cygdrive for fixpath to work.
29205      new_path="$CYGWIN_ROOT_PATH$input_path"
29206    fi
29207  fi
29208
29209
29210  if test "x$path" != "x$new_path"; then
29211    BOOT_JDK="$new_path"
29212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29213$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29214  fi
29215
29216    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29217
29218  path="$BOOT_JDK"
29219  has_colon=`$ECHO $path | $GREP ^.:`
29220  new_path="$path"
29221  if test "x$has_colon" = x; then
29222    # Not in mixed or Windows style, start by that.
29223    new_path=`cmd //c echo $path`
29224  fi
29225
29226
29227  input_path="$new_path"
29228  # Check if we need to convert this using DOS-style short mode. If the path
29229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29230  # take no chances and rewrite it.
29231  # Note: m4 eats our [], so we need to use [ and ] instead.
29232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29233  if test "x$has_forbidden_chars" != x; then
29234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29236  fi
29237
29238
29239  windows_path="$new_path"
29240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29241    unix_path=`$CYGPATH -u "$windows_path"`
29242    new_path="$unix_path"
29243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29245    new_path="$unix_path"
29246  fi
29247
29248  if test "x$path" != "x$new_path"; then
29249    BOOT_JDK="$new_path"
29250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29251$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29252  fi
29253
29254  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29255  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29256
29257    else
29258      # We're on a unix platform. Hooray! :)
29259      path="$BOOT_JDK"
29260      has_space=`$ECHO "$path" | $GREP " "`
29261      if test "x$has_space" != x; then
29262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29263$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29264        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29265      fi
29266
29267      # Use eval to expand a potential ~
29268      eval path="$path"
29269      if test ! -f "$path" && test ! -d "$path"; then
29270        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29271      fi
29272
29273      if test -d "$path"; then
29274        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29275      else
29276        dir="`$DIRNAME "$path"`"
29277        base="`$BASENAME "$path"`"
29278        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29279      fi
29280    fi
29281  fi
29282
29283            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29284$as_echo_n "checking for Boot JDK... " >&6; }
29285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29286$as_echo "$BOOT_JDK" >&6; }
29287            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29288$as_echo_n "checking Boot JDK version... " >&6; }
29289            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29291$as_echo "$BOOT_JDK_VERSION" >&6; }
29292          fi # end check jdk version
29293        fi # end check javac
29294      fi # end check java
29295    fi # end check boot jdk found
29296  fi
29297
29298  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29299
29300  if test "x$BOOT_JDK_FOUND" = xno; then
29301    # Now execute the test
29302
29303  BOOT_JDK_PREFIX="/usr/lib/jvm"
29304  BOOT_JDK_SUFFIX=""
29305  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29306  if test "x$ALL_JDKS_FOUND" != x; then
29307    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29308
29309  if test "x$BOOT_JDK_FOUND" = xno; then
29310    # Now execute the test
29311
29312        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29313        if test -d "$BOOT_JDK"; then
29314          BOOT_JDK_FOUND=maybe
29315          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29316$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29317        fi
29318
29319
29320    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29321    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29322      # Do we have a bin/java?
29323      if test ! -x "$BOOT_JDK/bin/java"; then
29324        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29326        BOOT_JDK_FOUND=no
29327      else
29328        # Do we have a bin/javac?
29329        if test ! -x "$BOOT_JDK/bin/javac"; then
29330          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29332          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29333$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29334          BOOT_JDK_FOUND=no
29335        else
29336          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29337          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29338
29339          # Extra M4 quote needed to protect [] in grep expression.
29340          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29341          if test "x$FOUND_CORRECT_VERSION" = x; then
29342            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29344            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29345$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29346            BOOT_JDK_FOUND=no
29347          else
29348            # We're done! :-)
29349            BOOT_JDK_FOUND=yes
29350
29351  # Only process if variable expands to non-empty
29352
29353  if test "x$BOOT_JDK" != x; then
29354    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29355
29356  # Input might be given as Windows format, start by converting to
29357  # unix format.
29358  path="$BOOT_JDK"
29359  new_path=`$CYGPATH -u "$path"`
29360
29361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29364  # "foo.exe" is OK but "foo" is an error.
29365  #
29366  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29367  # It is also a way to make sure we got the proper file name for the real test later on.
29368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29369  if test "x$test_shortpath" = x; then
29370    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29371$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29372    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29373  fi
29374
29375  # Call helper function which possibly converts this using DOS-style short mode.
29376  # If so, the updated path is stored in $new_path.
29377
29378  input_path="$new_path"
29379  # Check if we need to convert this using DOS-style short mode. If the path
29380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29381  # take no chances and rewrite it.
29382  # Note: m4 eats our [], so we need to use [ and ] instead.
29383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29384  if test "x$has_forbidden_chars" != x; then
29385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29389      # Going to short mode and back again did indeed matter. Since short mode is
29390      # case insensitive, let's make it lowercase to improve readability.
29391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29392      # Now convert it back to Unix-style (cygpath)
29393      input_path=`$CYGPATH -u "$shortmode_path"`
29394      new_path="$input_path"
29395    fi
29396  fi
29397
29398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29399  if test "x$test_cygdrive_prefix" = x; then
29400    # As a simple fix, exclude /usr/bin since it's not a real path.
29401    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29403      # a path prefixed by /cygdrive for fixpath to work.
29404      new_path="$CYGWIN_ROOT_PATH$input_path"
29405    fi
29406  fi
29407
29408
29409  if test "x$path" != "x$new_path"; then
29410    BOOT_JDK="$new_path"
29411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29412$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29413  fi
29414
29415    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29416
29417  path="$BOOT_JDK"
29418  has_colon=`$ECHO $path | $GREP ^.:`
29419  new_path="$path"
29420  if test "x$has_colon" = x; then
29421    # Not in mixed or Windows style, start by that.
29422    new_path=`cmd //c echo $path`
29423  fi
29424
29425
29426  input_path="$new_path"
29427  # Check if we need to convert this using DOS-style short mode. If the path
29428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29429  # take no chances and rewrite it.
29430  # Note: m4 eats our [], so we need to use [ and ] instead.
29431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29432  if test "x$has_forbidden_chars" != x; then
29433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29435  fi
29436
29437
29438  windows_path="$new_path"
29439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29440    unix_path=`$CYGPATH -u "$windows_path"`
29441    new_path="$unix_path"
29442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29444    new_path="$unix_path"
29445  fi
29446
29447  if test "x$path" != "x$new_path"; then
29448    BOOT_JDK="$new_path"
29449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29450$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29451  fi
29452
29453  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29454  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29455
29456    else
29457      # We're on a unix platform. Hooray! :)
29458      path="$BOOT_JDK"
29459      has_space=`$ECHO "$path" | $GREP " "`
29460      if test "x$has_space" != x; then
29461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29462$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29463        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29464      fi
29465
29466      # Use eval to expand a potential ~
29467      eval path="$path"
29468      if test ! -f "$path" && test ! -d "$path"; then
29469        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29470      fi
29471
29472      if test -d "$path"; then
29473        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29474      else
29475        dir="`$DIRNAME "$path"`"
29476        base="`$BASENAME "$path"`"
29477        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29478      fi
29479    fi
29480  fi
29481
29482            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29483$as_echo_n "checking for Boot JDK... " >&6; }
29484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29485$as_echo "$BOOT_JDK" >&6; }
29486            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29487$as_echo_n "checking Boot JDK version... " >&6; }
29488            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29489            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29490$as_echo "$BOOT_JDK_VERSION" >&6; }
29491          fi # end check jdk version
29492        fi # end check javac
29493      fi # end check java
29494    fi # end check boot jdk found
29495  fi
29496
29497    done
29498  fi
29499
29500
29501    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29502    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29503      # Do we have a bin/java?
29504      if test ! -x "$BOOT_JDK/bin/java"; then
29505        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29507        BOOT_JDK_FOUND=no
29508      else
29509        # Do we have a bin/javac?
29510        if test ! -x "$BOOT_JDK/bin/javac"; then
29511          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29513          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29514$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29515          BOOT_JDK_FOUND=no
29516        else
29517          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29518          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29519
29520          # Extra M4 quote needed to protect [] in grep expression.
29521          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29522          if test "x$FOUND_CORRECT_VERSION" = x; then
29523            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29524$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29525            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29526$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29527            BOOT_JDK_FOUND=no
29528          else
29529            # We're done! :-)
29530            BOOT_JDK_FOUND=yes
29531
29532  # Only process if variable expands to non-empty
29533
29534  if test "x$BOOT_JDK" != x; then
29535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29536
29537  # Input might be given as Windows format, start by converting to
29538  # unix format.
29539  path="$BOOT_JDK"
29540  new_path=`$CYGPATH -u "$path"`
29541
29542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29545  # "foo.exe" is OK but "foo" is an error.
29546  #
29547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29548  # It is also a way to make sure we got the proper file name for the real test later on.
29549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29550  if test "x$test_shortpath" = x; then
29551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29552$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29553    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29554  fi
29555
29556  # Call helper function which possibly converts this using DOS-style short mode.
29557  # If so, the updated path is stored in $new_path.
29558
29559  input_path="$new_path"
29560  # Check if we need to convert this using DOS-style short mode. If the path
29561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29562  # take no chances and rewrite it.
29563  # Note: m4 eats our [], so we need to use [ and ] instead.
29564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29565  if test "x$has_forbidden_chars" != x; then
29566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29570      # Going to short mode and back again did indeed matter. Since short mode is
29571      # case insensitive, let's make it lowercase to improve readability.
29572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29573      # Now convert it back to Unix-style (cygpath)
29574      input_path=`$CYGPATH -u "$shortmode_path"`
29575      new_path="$input_path"
29576    fi
29577  fi
29578
29579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29580  if test "x$test_cygdrive_prefix" = x; then
29581    # As a simple fix, exclude /usr/bin since it's not a real path.
29582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29584      # a path prefixed by /cygdrive for fixpath to work.
29585      new_path="$CYGWIN_ROOT_PATH$input_path"
29586    fi
29587  fi
29588
29589
29590  if test "x$path" != "x$new_path"; then
29591    BOOT_JDK="$new_path"
29592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29593$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29594  fi
29595
29596    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29597
29598  path="$BOOT_JDK"
29599  has_colon=`$ECHO $path | $GREP ^.:`
29600  new_path="$path"
29601  if test "x$has_colon" = x; then
29602    # Not in mixed or Windows style, start by that.
29603    new_path=`cmd //c echo $path`
29604  fi
29605
29606
29607  input_path="$new_path"
29608  # Check if we need to convert this using DOS-style short mode. If the path
29609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29610  # take no chances and rewrite it.
29611  # Note: m4 eats our [], so we need to use [ and ] instead.
29612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29613  if test "x$has_forbidden_chars" != x; then
29614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29616  fi
29617
29618
29619  windows_path="$new_path"
29620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29621    unix_path=`$CYGPATH -u "$windows_path"`
29622    new_path="$unix_path"
29623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29625    new_path="$unix_path"
29626  fi
29627
29628  if test "x$path" != "x$new_path"; then
29629    BOOT_JDK="$new_path"
29630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29631$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29632  fi
29633
29634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29636
29637    else
29638      # We're on a unix platform. Hooray! :)
29639      path="$BOOT_JDK"
29640      has_space=`$ECHO "$path" | $GREP " "`
29641      if test "x$has_space" != x; then
29642        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29643$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29644        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29645      fi
29646
29647      # Use eval to expand a potential ~
29648      eval path="$path"
29649      if test ! -f "$path" && test ! -d "$path"; then
29650        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29651      fi
29652
29653      if test -d "$path"; then
29654        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29655      else
29656        dir="`$DIRNAME "$path"`"
29657        base="`$BASENAME "$path"`"
29658        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29659      fi
29660    fi
29661  fi
29662
29663            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29664$as_echo_n "checking for Boot JDK... " >&6; }
29665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29666$as_echo "$BOOT_JDK" >&6; }
29667            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29668$as_echo_n "checking Boot JDK version... " >&6; }
29669            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29671$as_echo "$BOOT_JDK_VERSION" >&6; }
29672          fi # end check jdk version
29673        fi # end check javac
29674      fi # end check java
29675    fi # end check boot jdk found
29676  fi
29677
29678  fi
29679
29680
29681    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29682    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29683      # Do we have a bin/java?
29684      if test ! -x "$BOOT_JDK/bin/java"; then
29685        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29687        BOOT_JDK_FOUND=no
29688      else
29689        # Do we have a bin/javac?
29690        if test ! -x "$BOOT_JDK/bin/javac"; then
29691          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29693          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29694$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29695          BOOT_JDK_FOUND=no
29696        else
29697          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29698          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29699
29700          # Extra M4 quote needed to protect [] in grep expression.
29701          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29702          if test "x$FOUND_CORRECT_VERSION" = x; then
29703            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29705            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29706$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29707            BOOT_JDK_FOUND=no
29708          else
29709            # We're done! :-)
29710            BOOT_JDK_FOUND=yes
29711
29712  # Only process if variable expands to non-empty
29713
29714  if test "x$BOOT_JDK" != x; then
29715    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29716
29717  # Input might be given as Windows format, start by converting to
29718  # unix format.
29719  path="$BOOT_JDK"
29720  new_path=`$CYGPATH -u "$path"`
29721
29722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29725  # "foo.exe" is OK but "foo" is an error.
29726  #
29727  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29728  # It is also a way to make sure we got the proper file name for the real test later on.
29729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29730  if test "x$test_shortpath" = x; then
29731    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29733    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29734  fi
29735
29736  # Call helper function which possibly converts this using DOS-style short mode.
29737  # If so, the updated path is stored in $new_path.
29738
29739  input_path="$new_path"
29740  # Check if we need to convert this using DOS-style short mode. If the path
29741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29742  # take no chances and rewrite it.
29743  # Note: m4 eats our [], so we need to use [ and ] instead.
29744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29745  if test "x$has_forbidden_chars" != x; then
29746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29750      # Going to short mode and back again did indeed matter. Since short mode is
29751      # case insensitive, let's make it lowercase to improve readability.
29752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29753      # Now convert it back to Unix-style (cygpath)
29754      input_path=`$CYGPATH -u "$shortmode_path"`
29755      new_path="$input_path"
29756    fi
29757  fi
29758
29759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29760  if test "x$test_cygdrive_prefix" = x; then
29761    # As a simple fix, exclude /usr/bin since it's not a real path.
29762    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29764      # a path prefixed by /cygdrive for fixpath to work.
29765      new_path="$CYGWIN_ROOT_PATH$input_path"
29766    fi
29767  fi
29768
29769
29770  if test "x$path" != "x$new_path"; then
29771    BOOT_JDK="$new_path"
29772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29773$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29774  fi
29775
29776    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29777
29778  path="$BOOT_JDK"
29779  has_colon=`$ECHO $path | $GREP ^.:`
29780  new_path="$path"
29781  if test "x$has_colon" = x; then
29782    # Not in mixed or Windows style, start by that.
29783    new_path=`cmd //c echo $path`
29784  fi
29785
29786
29787  input_path="$new_path"
29788  # Check if we need to convert this using DOS-style short mode. If the path
29789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29790  # take no chances and rewrite it.
29791  # Note: m4 eats our [], so we need to use [ and ] instead.
29792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29793  if test "x$has_forbidden_chars" != x; then
29794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29796  fi
29797
29798
29799  windows_path="$new_path"
29800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29801    unix_path=`$CYGPATH -u "$windows_path"`
29802    new_path="$unix_path"
29803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29805    new_path="$unix_path"
29806  fi
29807
29808  if test "x$path" != "x$new_path"; then
29809    BOOT_JDK="$new_path"
29810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29812  fi
29813
29814  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29815  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29816
29817    else
29818      # We're on a unix platform. Hooray! :)
29819      path="$BOOT_JDK"
29820      has_space=`$ECHO "$path" | $GREP " "`
29821      if test "x$has_space" != x; then
29822        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29824        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29825      fi
29826
29827      # Use eval to expand a potential ~
29828      eval path="$path"
29829      if test ! -f "$path" && test ! -d "$path"; then
29830        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29831      fi
29832
29833      if test -d "$path"; then
29834        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29835      else
29836        dir="`$DIRNAME "$path"`"
29837        base="`$BASENAME "$path"`"
29838        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29839      fi
29840    fi
29841  fi
29842
29843            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29844$as_echo_n "checking for Boot JDK... " >&6; }
29845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29846$as_echo "$BOOT_JDK" >&6; }
29847            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29848$as_echo_n "checking Boot JDK version... " >&6; }
29849            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29850            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29851$as_echo "$BOOT_JDK_VERSION" >&6; }
29852          fi # end check jdk version
29853        fi # end check javac
29854      fi # end check java
29855    fi # end check boot jdk found
29856  fi
29857
29858
29859  # If we haven't found anything yet, we've truly lost. Give up.
29860  if test "x$BOOT_JDK_FOUND" = xno; then
29861
29862  # Print a helpful message on how to acquire the necessary build dependency.
29863  # openjdk is the help tag: freetype, cups, alsa etc
29864  MISSING_DEPENDENCY=openjdk
29865
29866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29867    cygwin_help $MISSING_DEPENDENCY
29868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29869    msys_help $MISSING_DEPENDENCY
29870  else
29871    PKGHANDLER_COMMAND=
29872
29873    case $PKGHANDLER in
29874      apt-get)
29875        apt_help     $MISSING_DEPENDENCY ;;
29876      yum)
29877        yum_help     $MISSING_DEPENDENCY ;;
29878      port)
29879        port_help    $MISSING_DEPENDENCY ;;
29880      pkgutil)
29881        pkgutil_help $MISSING_DEPENDENCY ;;
29882      pkgadd)
29883        pkgadd_help  $MISSING_DEPENDENCY ;;
29884    esac
29885
29886    if test "x$PKGHANDLER_COMMAND" != x; then
29887      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29888    fi
29889  fi
29890
29891    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29892$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29893    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29894$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29895    as_fn_error $? "Cannot continue" "$LINENO" 5
29896  fi
29897
29898
29899
29900  # Setup tools from the Boot JDK.
29901
29902  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29903
29904  # Publish this variable in the help.
29905
29906
29907  if [ -z "${JAVA+x}" ]; then
29908    # The variable is not set by user, try to locate tool using the code snippet
29909
29910      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29911$as_echo_n "checking for java in Boot JDK... " >&6; }
29912      JAVA=$BOOT_JDK/bin/java
29913      if test ! -x $JAVA; then
29914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29915$as_echo "not found" >&6; }
29916        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29917$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29918        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29919      fi
29920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29921$as_echo "ok" >&6; }
29922
29923
29924  else
29925    # The variable is set, but is it from the command line or the environment?
29926
29927    # Try to remove the string !JAVA! from our list.
29928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29930      # If it failed, the variable was not from the command line. Ignore it,
29931      # but warn the user (except for BASH, which is always set by the calling BASH).
29932      if test "xJAVA" != xBASH; then
29933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29934$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29935      fi
29936      # Try to locate tool using the code snippet
29937
29938      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29939$as_echo_n "checking for java in Boot JDK... " >&6; }
29940      JAVA=$BOOT_JDK/bin/java
29941      if test ! -x $JAVA; then
29942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29943$as_echo "not found" >&6; }
29944        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29945$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29946        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29947      fi
29948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29949$as_echo "ok" >&6; }
29950
29951
29952    else
29953      # If it succeeded, then it was overridden by the user. We will use it
29954      # for the tool.
29955
29956      # First remove it from the list of overridden variables, so we can test
29957      # for unknown variables in the end.
29958      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29959
29960      # Check if we try to supply an empty value
29961      if test "x$JAVA" = x; then
29962        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29963$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29964        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29965$as_echo_n "checking for JAVA... " >&6; }
29966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29967$as_echo "disabled" >&6; }
29968      else
29969        # Check if the provided tool contains a complete path.
29970        tool_specified="$JAVA"
29971        tool_basename="${tool_specified##*/}"
29972        if test "x$tool_basename" = "x$tool_specified"; then
29973          # A command without a complete path is provided, search $PATH.
29974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29975$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29976          # Extract the first word of "$tool_basename", so it can be a program name with args.
29977set dummy $tool_basename; ac_word=$2
29978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29979$as_echo_n "checking for $ac_word... " >&6; }
29980if ${ac_cv_path_JAVA+:} false; then :
29981  $as_echo_n "(cached) " >&6
29982else
29983  case $JAVA in
29984  [\\/]* | ?:[\\/]*)
29985  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29986  ;;
29987  *)
29988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29989for as_dir in $PATH
29990do
29991  IFS=$as_save_IFS
29992  test -z "$as_dir" && as_dir=.
29993    for ac_exec_ext in '' $ac_executable_extensions; do
29994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29995    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29997    break 2
29998  fi
29999done
30000  done
30001IFS=$as_save_IFS
30002
30003  ;;
30004esac
30005fi
30006JAVA=$ac_cv_path_JAVA
30007if test -n "$JAVA"; then
30008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30009$as_echo "$JAVA" >&6; }
30010else
30011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30012$as_echo "no" >&6; }
30013fi
30014
30015
30016          if test "x$JAVA" = x; then
30017            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30018          fi
30019        else
30020          # Otherwise we believe it is a complete path. Use it as it is.
30021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30022$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30023          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30024$as_echo_n "checking for JAVA... " >&6; }
30025          if test ! -x "$tool_specified"; then
30026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30027$as_echo "not found" >&6; }
30028            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30029          fi
30030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30031$as_echo "$tool_specified" >&6; }
30032        fi
30033      fi
30034    fi
30035
30036  fi
30037
30038
30039
30040  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30041
30042  # Publish this variable in the help.
30043
30044
30045  if [ -z "${JAVAC+x}" ]; then
30046    # The variable is not set by user, try to locate tool using the code snippet
30047
30048      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30049$as_echo_n "checking for javac in Boot JDK... " >&6; }
30050      JAVAC=$BOOT_JDK/bin/javac
30051      if test ! -x $JAVAC; then
30052        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30053$as_echo "not found" >&6; }
30054        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30055$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30056        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30057      fi
30058      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30059$as_echo "ok" >&6; }
30060
30061
30062  else
30063    # The variable is set, but is it from the command line or the environment?
30064
30065    # Try to remove the string !JAVAC! from our list.
30066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30068      # If it failed, the variable was not from the command line. Ignore it,
30069      # but warn the user (except for BASH, which is always set by the calling BASH).
30070      if test "xJAVAC" != xBASH; then
30071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30072$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30073      fi
30074      # Try to locate tool using the code snippet
30075
30076      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30077$as_echo_n "checking for javac in Boot JDK... " >&6; }
30078      JAVAC=$BOOT_JDK/bin/javac
30079      if test ! -x $JAVAC; then
30080        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30081$as_echo "not found" >&6; }
30082        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30083$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30084        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30085      fi
30086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30087$as_echo "ok" >&6; }
30088
30089
30090    else
30091      # If it succeeded, then it was overridden by the user. We will use it
30092      # for the tool.
30093
30094      # First remove it from the list of overridden variables, so we can test
30095      # for unknown variables in the end.
30096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30097
30098      # Check if we try to supply an empty value
30099      if test "x$JAVAC" = x; then
30100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30101$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30103$as_echo_n "checking for JAVAC... " >&6; }
30104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30105$as_echo "disabled" >&6; }
30106      else
30107        # Check if the provided tool contains a complete path.
30108        tool_specified="$JAVAC"
30109        tool_basename="${tool_specified##*/}"
30110        if test "x$tool_basename" = "x$tool_specified"; then
30111          # A command without a complete path is provided, search $PATH.
30112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30113$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30114          # Extract the first word of "$tool_basename", so it can be a program name with args.
30115set dummy $tool_basename; ac_word=$2
30116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30117$as_echo_n "checking for $ac_word... " >&6; }
30118if ${ac_cv_path_JAVAC+:} false; then :
30119  $as_echo_n "(cached) " >&6
30120else
30121  case $JAVAC in
30122  [\\/]* | ?:[\\/]*)
30123  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30124  ;;
30125  *)
30126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30127for as_dir in $PATH
30128do
30129  IFS=$as_save_IFS
30130  test -z "$as_dir" && as_dir=.
30131    for ac_exec_ext in '' $ac_executable_extensions; do
30132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30133    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30135    break 2
30136  fi
30137done
30138  done
30139IFS=$as_save_IFS
30140
30141  ;;
30142esac
30143fi
30144JAVAC=$ac_cv_path_JAVAC
30145if test -n "$JAVAC"; then
30146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30147$as_echo "$JAVAC" >&6; }
30148else
30149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30150$as_echo "no" >&6; }
30151fi
30152
30153
30154          if test "x$JAVAC" = x; then
30155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30156          fi
30157        else
30158          # Otherwise we believe it is a complete path. Use it as it is.
30159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30160$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30162$as_echo_n "checking for JAVAC... " >&6; }
30163          if test ! -x "$tool_specified"; then
30164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30165$as_echo "not found" >&6; }
30166            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30167          fi
30168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30169$as_echo "$tool_specified" >&6; }
30170        fi
30171      fi
30172    fi
30173
30174  fi
30175
30176
30177
30178  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30179
30180  # Publish this variable in the help.
30181
30182
30183  if [ -z "${JAVAH+x}" ]; then
30184    # The variable is not set by user, try to locate tool using the code snippet
30185
30186      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30187$as_echo_n "checking for javah in Boot JDK... " >&6; }
30188      JAVAH=$BOOT_JDK/bin/javah
30189      if test ! -x $JAVAH; then
30190        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30191$as_echo "not found" >&6; }
30192        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30193$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30194        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30195      fi
30196      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30197$as_echo "ok" >&6; }
30198
30199
30200  else
30201    # The variable is set, but is it from the command line or the environment?
30202
30203    # Try to remove the string !JAVAH! from our list.
30204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30206      # If it failed, the variable was not from the command line. Ignore it,
30207      # but warn the user (except for BASH, which is always set by the calling BASH).
30208      if test "xJAVAH" != xBASH; then
30209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30210$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30211      fi
30212      # Try to locate tool using the code snippet
30213
30214      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30215$as_echo_n "checking for javah in Boot JDK... " >&6; }
30216      JAVAH=$BOOT_JDK/bin/javah
30217      if test ! -x $JAVAH; then
30218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30219$as_echo "not found" >&6; }
30220        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30221$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30222        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30223      fi
30224      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30225$as_echo "ok" >&6; }
30226
30227
30228    else
30229      # If it succeeded, then it was overridden by the user. We will use it
30230      # for the tool.
30231
30232      # First remove it from the list of overridden variables, so we can test
30233      # for unknown variables in the end.
30234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30235
30236      # Check if we try to supply an empty value
30237      if test "x$JAVAH" = x; then
30238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30239$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30241$as_echo_n "checking for JAVAH... " >&6; }
30242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30243$as_echo "disabled" >&6; }
30244      else
30245        # Check if the provided tool contains a complete path.
30246        tool_specified="$JAVAH"
30247        tool_basename="${tool_specified##*/}"
30248        if test "x$tool_basename" = "x$tool_specified"; then
30249          # A command without a complete path is provided, search $PATH.
30250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30251$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30252          # Extract the first word of "$tool_basename", so it can be a program name with args.
30253set dummy $tool_basename; ac_word=$2
30254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30255$as_echo_n "checking for $ac_word... " >&6; }
30256if ${ac_cv_path_JAVAH+:} false; then :
30257  $as_echo_n "(cached) " >&6
30258else
30259  case $JAVAH in
30260  [\\/]* | ?:[\\/]*)
30261  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30262  ;;
30263  *)
30264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30265for as_dir in $PATH
30266do
30267  IFS=$as_save_IFS
30268  test -z "$as_dir" && as_dir=.
30269    for ac_exec_ext in '' $ac_executable_extensions; do
30270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30271    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30273    break 2
30274  fi
30275done
30276  done
30277IFS=$as_save_IFS
30278
30279  ;;
30280esac
30281fi
30282JAVAH=$ac_cv_path_JAVAH
30283if test -n "$JAVAH"; then
30284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30285$as_echo "$JAVAH" >&6; }
30286else
30287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30288$as_echo "no" >&6; }
30289fi
30290
30291
30292          if test "x$JAVAH" = x; then
30293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30294          fi
30295        else
30296          # Otherwise we believe it is a complete path. Use it as it is.
30297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30298$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30300$as_echo_n "checking for JAVAH... " >&6; }
30301          if test ! -x "$tool_specified"; then
30302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30303$as_echo "not found" >&6; }
30304            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30305          fi
30306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30307$as_echo "$tool_specified" >&6; }
30308        fi
30309      fi
30310    fi
30311
30312  fi
30313
30314
30315
30316  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30317
30318  # Publish this variable in the help.
30319
30320
30321  if [ -z "${JAR+x}" ]; then
30322    # The variable is not set by user, try to locate tool using the code snippet
30323
30324      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30325$as_echo_n "checking for jar in Boot JDK... " >&6; }
30326      JAR=$BOOT_JDK/bin/jar
30327      if test ! -x $JAR; then
30328        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30329$as_echo "not found" >&6; }
30330        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30331$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30332        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30333      fi
30334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30335$as_echo "ok" >&6; }
30336
30337
30338  else
30339    # The variable is set, but is it from the command line or the environment?
30340
30341    # Try to remove the string !JAR! from our list.
30342    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30343    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30344      # If it failed, the variable was not from the command line. Ignore it,
30345      # but warn the user (except for BASH, which is always set by the calling BASH).
30346      if test "xJAR" != xBASH; then
30347        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30348$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30349      fi
30350      # Try to locate tool using the code snippet
30351
30352      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30353$as_echo_n "checking for jar in Boot JDK... " >&6; }
30354      JAR=$BOOT_JDK/bin/jar
30355      if test ! -x $JAR; then
30356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30357$as_echo "not found" >&6; }
30358        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30359$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30360        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30361      fi
30362      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30363$as_echo "ok" >&6; }
30364
30365
30366    else
30367      # If it succeeded, then it was overridden by the user. We will use it
30368      # for the tool.
30369
30370      # First remove it from the list of overridden variables, so we can test
30371      # for unknown variables in the end.
30372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30373
30374      # Check if we try to supply an empty value
30375      if test "x$JAR" = x; then
30376        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30377$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30379$as_echo_n "checking for JAR... " >&6; }
30380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30381$as_echo "disabled" >&6; }
30382      else
30383        # Check if the provided tool contains a complete path.
30384        tool_specified="$JAR"
30385        tool_basename="${tool_specified##*/}"
30386        if test "x$tool_basename" = "x$tool_specified"; then
30387          # A command without a complete path is provided, search $PATH.
30388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30389$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30390          # Extract the first word of "$tool_basename", so it can be a program name with args.
30391set dummy $tool_basename; ac_word=$2
30392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30393$as_echo_n "checking for $ac_word... " >&6; }
30394if ${ac_cv_path_JAR+:} false; then :
30395  $as_echo_n "(cached) " >&6
30396else
30397  case $JAR in
30398  [\\/]* | ?:[\\/]*)
30399  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30400  ;;
30401  *)
30402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30403for as_dir in $PATH
30404do
30405  IFS=$as_save_IFS
30406  test -z "$as_dir" && as_dir=.
30407    for ac_exec_ext in '' $ac_executable_extensions; do
30408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30409    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30411    break 2
30412  fi
30413done
30414  done
30415IFS=$as_save_IFS
30416
30417  ;;
30418esac
30419fi
30420JAR=$ac_cv_path_JAR
30421if test -n "$JAR"; then
30422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30423$as_echo "$JAR" >&6; }
30424else
30425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30426$as_echo "no" >&6; }
30427fi
30428
30429
30430          if test "x$JAR" = x; then
30431            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30432          fi
30433        else
30434          # Otherwise we believe it is a complete path. Use it as it is.
30435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30436$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30437          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30438$as_echo_n "checking for JAR... " >&6; }
30439          if test ! -x "$tool_specified"; then
30440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30441$as_echo "not found" >&6; }
30442            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30443          fi
30444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30445$as_echo "$tool_specified" >&6; }
30446        fi
30447      fi
30448    fi
30449
30450  fi
30451
30452
30453
30454  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30455
30456  # Publish this variable in the help.
30457
30458
30459  if [ -z "${JARSIGNER+x}" ]; then
30460    # The variable is not set by user, try to locate tool using the code snippet
30461
30462      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30463$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30464      JARSIGNER=$BOOT_JDK/bin/jarsigner
30465      if test ! -x $JARSIGNER; then
30466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30467$as_echo "not found" >&6; }
30468        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30469$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30470        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30471      fi
30472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30473$as_echo "ok" >&6; }
30474
30475
30476  else
30477    # The variable is set, but is it from the command line or the environment?
30478
30479    # Try to remove the string !JARSIGNER! from our list.
30480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30482      # If it failed, the variable was not from the command line. Ignore it,
30483      # but warn the user (except for BASH, which is always set by the calling BASH).
30484      if test "xJARSIGNER" != xBASH; then
30485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30486$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30487      fi
30488      # Try to locate tool using the code snippet
30489
30490      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30491$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30492      JARSIGNER=$BOOT_JDK/bin/jarsigner
30493      if test ! -x $JARSIGNER; then
30494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30495$as_echo "not found" >&6; }
30496        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30497$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30498        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30499      fi
30500      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30501$as_echo "ok" >&6; }
30502
30503
30504    else
30505      # If it succeeded, then it was overridden by the user. We will use it
30506      # for the tool.
30507
30508      # First remove it from the list of overridden variables, so we can test
30509      # for unknown variables in the end.
30510      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30511
30512      # Check if we try to supply an empty value
30513      if test "x$JARSIGNER" = x; then
30514        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30515$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30516        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30517$as_echo_n "checking for JARSIGNER... " >&6; }
30518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30519$as_echo "disabled" >&6; }
30520      else
30521        # Check if the provided tool contains a complete path.
30522        tool_specified="$JARSIGNER"
30523        tool_basename="${tool_specified##*/}"
30524        if test "x$tool_basename" = "x$tool_specified"; then
30525          # A command without a complete path is provided, search $PATH.
30526          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30527$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30528          # Extract the first word of "$tool_basename", so it can be a program name with args.
30529set dummy $tool_basename; ac_word=$2
30530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30531$as_echo_n "checking for $ac_word... " >&6; }
30532if ${ac_cv_path_JARSIGNER+:} false; then :
30533  $as_echo_n "(cached) " >&6
30534else
30535  case $JARSIGNER in
30536  [\\/]* | ?:[\\/]*)
30537  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30538  ;;
30539  *)
30540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30541for as_dir in $PATH
30542do
30543  IFS=$as_save_IFS
30544  test -z "$as_dir" && as_dir=.
30545    for ac_exec_ext in '' $ac_executable_extensions; do
30546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30547    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30549    break 2
30550  fi
30551done
30552  done
30553IFS=$as_save_IFS
30554
30555  ;;
30556esac
30557fi
30558JARSIGNER=$ac_cv_path_JARSIGNER
30559if test -n "$JARSIGNER"; then
30560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30561$as_echo "$JARSIGNER" >&6; }
30562else
30563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30564$as_echo "no" >&6; }
30565fi
30566
30567
30568          if test "x$JARSIGNER" = x; then
30569            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30570          fi
30571        else
30572          # Otherwise we believe it is a complete path. Use it as it is.
30573          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30574$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30575          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30576$as_echo_n "checking for JARSIGNER... " >&6; }
30577          if test ! -x "$tool_specified"; then
30578            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30579$as_echo "not found" >&6; }
30580            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30581          fi
30582          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30583$as_echo "$tool_specified" >&6; }
30584        fi
30585      fi
30586    fi
30587
30588  fi
30589
30590
30591
30592  # Finally, set some other options...
30593
30594  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30595  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30596
30597
30598
30599  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30600  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30601  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30602  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30603  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30604  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30605    dummy="$dummy -Xpatch:foo=bar"
30606    JVM_ARG_OK=true
30607  else
30608    $ECHO "Arg failed:" >&5
30609    $ECHO "$OUTPUT" >&5
30610    JVM_ARG_OK=false
30611  fi
30612
30613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30614$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30615  if test "x$JVM_ARG_OK" = "xtrue"; then
30616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30617$as_echo "yes" >&6; }
30618    BOOT_JDK_MODULAR="true"
30619  else
30620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30621$as_echo "no" >&6; }
30622    BOOT_JDK_MODULAR="false"
30623  fi
30624
30625
30626
30627
30628  # Check if the boot jdk is 32 or 64 bit
30629  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30630    BOOT_JDK_BITS="64"
30631  else
30632    BOOT_JDK_BITS="32"
30633  fi
30634  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30635$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30637$as_echo "$BOOT_JDK_BITS" >&6; }
30638
30639
30640
30641
30642# Check whether --with-build-jdk was given.
30643if test "${with_build_jdk+set}" = set; then :
30644  withval=$with_build_jdk;
30645fi
30646
30647
30648  CREATE_BUILDJDK=false
30649  EXTERNAL_BUILDJDK=false
30650  BUILD_JDK_FOUND="no"
30651  if test "x$with_build_jdk" != "x"; then
30652
30653  if test "x$BUILD_JDK_FOUND" = xno; then
30654    # Execute the test
30655
30656       if test "x$with_build_jdk" != x; then
30657         BUILD_JDK=$with_build_jdk
30658         BUILD_JDK_FOUND=maybe
30659         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30660$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30661       fi
30662
30663    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30664    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30665      # Do we have a bin/java?
30666      if test ! -x "$BUILD_JDK/bin/java"; then
30667        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30668$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30669        BUILD_JDK_FOUND=no
30670      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30671        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30672$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30673        BUILD_JDK_FOUND=no
30674      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30675        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30676$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30677        BUILD_JDK_FOUND=no
30678      elif test ! -x "$BUILD_JDK/bin/javac"; then
30679        # Do we have a bin/javac?
30680        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30681$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30682        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30683$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30684        BUILD_JDK_FOUND=no
30685      else
30686        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30687        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30688
30689        # Extra M4 quote needed to protect [] in grep expression.
30690        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30691        if test "x$FOUND_CORRECT_VERSION" = x; then
30692          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30693$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30694          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30695$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30696          BUILD_JDK_FOUND=no
30697        else
30698          # We're done!
30699          BUILD_JDK_FOUND=yes
30700
30701  # Only process if variable expands to non-empty
30702
30703  if test "x$BUILD_JDK" != x; then
30704    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30705
30706  # Input might be given as Windows format, start by converting to
30707  # unix format.
30708  path="$BUILD_JDK"
30709  new_path=`$CYGPATH -u "$path"`
30710
30711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30714  # "foo.exe" is OK but "foo" is an error.
30715  #
30716  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30717  # It is also a way to make sure we got the proper file name for the real test later on.
30718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30719  if test "x$test_shortpath" = x; then
30720    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30721$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30722    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30723  fi
30724
30725  # Call helper function which possibly converts this using DOS-style short mode.
30726  # If so, the updated path is stored in $new_path.
30727
30728  input_path="$new_path"
30729  # Check if we need to convert this using DOS-style short mode. If the path
30730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30731  # take no chances and rewrite it.
30732  # Note: m4 eats our [], so we need to use [ and ] instead.
30733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30734  if test "x$has_forbidden_chars" != x; then
30735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30739      # Going to short mode and back again did indeed matter. Since short mode is
30740      # case insensitive, let's make it lowercase to improve readability.
30741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30742      # Now convert it back to Unix-style (cygpath)
30743      input_path=`$CYGPATH -u "$shortmode_path"`
30744      new_path="$input_path"
30745    fi
30746  fi
30747
30748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30749  if test "x$test_cygdrive_prefix" = x; then
30750    # As a simple fix, exclude /usr/bin since it's not a real path.
30751    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30753      # a path prefixed by /cygdrive for fixpath to work.
30754      new_path="$CYGWIN_ROOT_PATH$input_path"
30755    fi
30756  fi
30757
30758
30759  if test "x$path" != "x$new_path"; then
30760    BUILD_JDK="$new_path"
30761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30762$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30763  fi
30764
30765    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30766
30767  path="$BUILD_JDK"
30768  has_colon=`$ECHO $path | $GREP ^.:`
30769  new_path="$path"
30770  if test "x$has_colon" = x; then
30771    # Not in mixed or Windows style, start by that.
30772    new_path=`cmd //c echo $path`
30773  fi
30774
30775
30776  input_path="$new_path"
30777  # Check if we need to convert this using DOS-style short mode. If the path
30778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30779  # take no chances and rewrite it.
30780  # Note: m4 eats our [], so we need to use [ and ] instead.
30781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30782  if test "x$has_forbidden_chars" != x; then
30783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30785  fi
30786
30787
30788  windows_path="$new_path"
30789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30790    unix_path=`$CYGPATH -u "$windows_path"`
30791    new_path="$unix_path"
30792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30794    new_path="$unix_path"
30795  fi
30796
30797  if test "x$path" != "x$new_path"; then
30798    BUILD_JDK="$new_path"
30799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30800$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30801  fi
30802
30803  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30804  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30805
30806    else
30807      # We're on a unix platform. Hooray! :)
30808      path="$BUILD_JDK"
30809      has_space=`$ECHO "$path" | $GREP " "`
30810      if test "x$has_space" != x; then
30811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30812$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30813        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30814      fi
30815
30816      # Use eval to expand a potential ~
30817      eval path="$path"
30818      if test ! -f "$path" && test ! -d "$path"; then
30819        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30820      fi
30821
30822      if test -d "$path"; then
30823        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30824      else
30825        dir="`$DIRNAME "$path"`"
30826        base="`$BASENAME "$path"`"
30827        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30828      fi
30829    fi
30830  fi
30831
30832          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30833$as_echo_n "checking for Build JDK... " >&6; }
30834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30835$as_echo "$BUILD_JDK" >&6; }
30836          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30837$as_echo_n "checking Build JDK version... " >&6; }
30838          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30840$as_echo "$BUILD_JDK_VERSION" >&6; }
30841        fi # end check jdk version
30842      fi # end check java
30843    fi # end check build jdk found
30844  fi
30845
30846    EXTERNAL_BUILDJDK=true
30847  else
30848    if test "x$COMPILE_TYPE" = "xcross"; then
30849      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30850      BUILD_JDK_FOUND=yes
30851      CREATE_BUILDJDK=true
30852      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30853$as_echo_n "checking for Build JDK... " >&6; }
30854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30855$as_echo "yes, will build it for the host platform" >&6; }
30856    else
30857      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30858      BUILD_JDK_FOUND=yes
30859      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30860$as_echo_n "checking for Build JDK... " >&6; }
30861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30862$as_echo "yes, will use output dir" >&6; }
30863    fi
30864  fi
30865
30866  JMOD="$BUILD_JDK/bin/jmod"
30867  JLINK="$BUILD_JDK/bin/jlink"
30868
30869
30870
30871  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30873$as_echo_n "checking for Build JDK... " >&6; }
30874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30875$as_echo "no" >&6; }
30876    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30877  fi
30878
30879
30880
30881
30882
30883
30884###############################################################################
30885#
30886# Configure the sources to use. We can add or override individual directories.
30887#
30888###############################################################################
30889
30890
30891  # Where are the sources.
30892  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30893  CORBA_TOPDIR="$SRC_ROOT/corba"
30894  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30895  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30896  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30897  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30898  JDK_TOPDIR="$SRC_ROOT/jdk"
30899
30900
30901
30902
30903
30904
30905
30906
30907
30908  # This feature is no longer supported.
30909
30910
30911
30912# Check whether --with-add-source-root was given.
30913if test "${with_add_source_root+set}" = set; then :
30914  withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
30915$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30916fi
30917
30918
30919
30920
30921# Check whether --with-override-source-root was given.
30922if test "${with_override_source_root+set}" = set; then :
30923  withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
30924$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30925fi
30926
30927
30928
30929
30930# Check whether --with-adds-and-overrides was given.
30931if test "${with_adds_and_overrides+set}" = set; then :
30932  withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
30933$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30934fi
30935
30936
30937
30938
30939# Check whether --with-override-langtools was given.
30940if test "${with_override_langtools+set}" = set; then :
30941  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30942$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30943fi
30944
30945
30946
30947
30948# Check whether --with-override-corba was given.
30949if test "${with_override_corba+set}" = set; then :
30950  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30951$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30952fi
30953
30954
30955
30956
30957# Check whether --with-override-jaxp was given.
30958if test "${with_override_jaxp+set}" = set; then :
30959  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30960$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30961fi
30962
30963
30964
30965
30966# Check whether --with-override-jaxws was given.
30967if test "${with_override_jaxws+set}" = set; then :
30968  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30969$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30970fi
30971
30972
30973
30974
30975# Check whether --with-override-hotspot was given.
30976if test "${with_override_hotspot+set}" = set; then :
30977  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30978$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30979fi
30980
30981
30982
30983
30984# Check whether --with-override-nashorn was given.
30985if test "${with_override_nashorn+set}" = set; then :
30986  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30987$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30988fi
30989
30990
30991
30992
30993# Check whether --with-override-jdk was given.
30994if test "${with_override_jdk+set}" = set; then :
30995  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30996$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30997fi
30998
30999
31000
31001
31002  BUILD_OUTPUT="$OUTPUT_ROOT"
31003
31004
31005  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31006  BUILD_HOTSPOT=true
31007
31008
31009
31010# Check whether --with-import-hotspot was given.
31011if test "${with_import_hotspot+set}" = set; then :
31012  withval=$with_import_hotspot;
31013fi
31014
31015  if test "x$with_import_hotspot" != x; then
31016    CURDIR="$PWD"
31017    cd "$with_import_hotspot"
31018    HOTSPOT_DIST="`pwd`"
31019    cd "$CURDIR"
31020    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31021      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31022    fi
31023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31024$as_echo_n "checking if hotspot should be imported... " >&6; }
31025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31026$as_echo "yes from $HOTSPOT_DIST" >&6; }
31027    BUILD_HOTSPOT=false
31028  fi
31029
31030  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31031
31032
31033
31034
31035# Check whether --with-import-modules was given.
31036if test "${with_import_modules+set}" = set; then :
31037  withval=$with_import_modules;
31038fi
31039
31040
31041  if test "x$with_import_modules" != x \
31042      && test "x$with_import_modules" != "xno"; then
31043    if test -d "$with_import_modules"; then
31044      IMPORT_MODULES_TOPDIR="$with_import_modules"
31045
31046  # Only process if variable expands to non-empty
31047
31048  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31049    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31050
31051  # Input might be given as Windows format, start by converting to
31052  # unix format.
31053  path="$IMPORT_MODULES_TOPDIR"
31054  new_path=`$CYGPATH -u "$path"`
31055
31056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31059  # "foo.exe" is OK but "foo" is an error.
31060  #
31061  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31062  # It is also a way to make sure we got the proper file name for the real test later on.
31063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31064  if test "x$test_shortpath" = x; then
31065    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31066$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31067    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31068  fi
31069
31070  # Call helper function which possibly converts this using DOS-style short mode.
31071  # If so, the updated path is stored in $new_path.
31072
31073  input_path="$new_path"
31074  # Check if we need to convert this using DOS-style short mode. If the path
31075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31076  # take no chances and rewrite it.
31077  # Note: m4 eats our [], so we need to use [ and ] instead.
31078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31079  if test "x$has_forbidden_chars" != x; then
31080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31084      # Going to short mode and back again did indeed matter. Since short mode is
31085      # case insensitive, let's make it lowercase to improve readability.
31086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31087      # Now convert it back to Unix-style (cygpath)
31088      input_path=`$CYGPATH -u "$shortmode_path"`
31089      new_path="$input_path"
31090    fi
31091  fi
31092
31093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31094  if test "x$test_cygdrive_prefix" = x; then
31095    # As a simple fix, exclude /usr/bin since it's not a real path.
31096    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31098      # a path prefixed by /cygdrive for fixpath to work.
31099      new_path="$CYGWIN_ROOT_PATH$input_path"
31100    fi
31101  fi
31102
31103
31104  if test "x$path" != "x$new_path"; then
31105    IMPORT_MODULES_TOPDIR="$new_path"
31106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31107$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31108  fi
31109
31110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31111
31112  path="$IMPORT_MODULES_TOPDIR"
31113  has_colon=`$ECHO $path | $GREP ^.:`
31114  new_path="$path"
31115  if test "x$has_colon" = x; then
31116    # Not in mixed or Windows style, start by that.
31117    new_path=`cmd //c echo $path`
31118  fi
31119
31120
31121  input_path="$new_path"
31122  # Check if we need to convert this using DOS-style short mode. If the path
31123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31124  # take no chances and rewrite it.
31125  # Note: m4 eats our [], so we need to use [ and ] instead.
31126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31127  if test "x$has_forbidden_chars" != x; then
31128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31130  fi
31131
31132
31133  windows_path="$new_path"
31134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31135    unix_path=`$CYGPATH -u "$windows_path"`
31136    new_path="$unix_path"
31137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31139    new_path="$unix_path"
31140  fi
31141
31142  if test "x$path" != "x$new_path"; then
31143    IMPORT_MODULES_TOPDIR="$new_path"
31144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31145$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31146  fi
31147
31148  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31149  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31150
31151    else
31152      # We're on a unix platform. Hooray! :)
31153      path="$IMPORT_MODULES_TOPDIR"
31154      has_space=`$ECHO "$path" | $GREP " "`
31155      if test "x$has_space" != x; then
31156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31157$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31158        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31159      fi
31160
31161      # Use eval to expand a potential ~
31162      eval path="$path"
31163      if test ! -f "$path" && test ! -d "$path"; then
31164        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31165      fi
31166
31167      if test -d "$path"; then
31168        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31169      else
31170        dir="`$DIRNAME "$path"`"
31171        base="`$BASENAME "$path"`"
31172        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31173      fi
31174    fi
31175  fi
31176
31177    elif test -e "$with_import_modules"; then
31178      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31179      $RM -rf "$IMPORT_MODULES_TOPDIR"
31180      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31181      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31182        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31183      fi
31184    else
31185      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31186    fi
31187  fi
31188
31189  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31190    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31191  fi
31192  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31193    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31194  fi
31195  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31196    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31197  fi
31198  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31199    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31200  fi
31201  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31202    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31203  fi
31204  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31205    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31206  fi
31207
31208
31209
31210
31211
31212
31213
31214
31215
31216###############################################################################
31217#
31218# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31219# native code.
31220#
31221###############################################################################
31222
31223# See if we are doing a complete static build or not
31224
31225  # Check whether --enable-static-build was given.
31226if test "${enable_static_build+set}" = set; then :
31227  enableval=$enable_static_build;
31228fi
31229
31230  STATIC_BUILD=false
31231  if test "x$enable_static_build" = "xyes"; then
31232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31233$as_echo_n "checking if static build is enabled... " >&6; }
31234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31235$as_echo "yes" >&6; }
31236    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31237      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31238    fi
31239    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31240    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31241    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31242    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31243    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31244    STATIC_BUILD=true
31245  elif test "x$enable_static_build" = "xno"; then
31246    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31247$as_echo_n "checking if static build is enabled... " >&6; }
31248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31249$as_echo "no" >&6; }
31250  elif test "x$enable_static_build" != "x"; then
31251    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31252  fi
31253
31254
31255
31256
31257# First determine the toolchain type (compiler family)
31258
31259
31260# Check whether --with-toolchain-type was given.
31261if test "${with_toolchain_type+set}" = set; then :
31262  withval=$with_toolchain_type;
31263fi
31264
31265
31266  # Use indirect variable referencing
31267  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31268  VALID_TOOLCHAINS=${!toolchain_var_name}
31269
31270  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31271    if test -n "$XCODEBUILD"; then
31272      # On Mac OS X, default toolchain to clang after Xcode 5
31273      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31274      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31275      if test $? -ne 0; then
31276        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31277      fi
31278      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31279          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31280          $CUT -f 1 -d .`
31281      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31282$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31283      if test $XCODE_MAJOR_VERSION -ge 5; then
31284          DEFAULT_TOOLCHAIN="clang"
31285      else
31286          DEFAULT_TOOLCHAIN="gcc"
31287      fi
31288    else
31289      # If Xcode is not installed, but the command line tools are
31290      # then we can't run xcodebuild. On these systems we should
31291      # default to clang
31292      DEFAULT_TOOLCHAIN="clang"
31293    fi
31294  else
31295    # First toolchain type in the list is the default
31296    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31297  fi
31298
31299  if test "x$with_toolchain_type" = xlist; then
31300    # List all toolchains
31301    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31302$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31303    for toolchain in $VALID_TOOLCHAINS; do
31304      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31305      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31306      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31307    done
31308
31309    exit 0
31310  elif test "x$with_toolchain_type" != x; then
31311    # User override; check that it is valid
31312    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31313      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31314$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31315      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31316$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31317      as_fn_error $? "Cannot continue." "$LINENO" 5
31318    fi
31319    TOOLCHAIN_TYPE=$with_toolchain_type
31320  else
31321    # No flag given, use default
31322    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31323  fi
31324
31325
31326  TOOLCHAIN_CC_BINARY_clang="clang"
31327  TOOLCHAIN_CC_BINARY_gcc="gcc"
31328  TOOLCHAIN_CC_BINARY_microsoft="cl"
31329  TOOLCHAIN_CC_BINARY_solstudio="cc"
31330  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31331
31332  TOOLCHAIN_CXX_BINARY_clang="clang++"
31333  TOOLCHAIN_CXX_BINARY_gcc="g++"
31334  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31335  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31336  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31337
31338  # Use indirect variable referencing
31339  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31340  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31341  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31342  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31343  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31344  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31345  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31346  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31347
31348
31349  # Define filename patterns
31350  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31351    LIBRARY_PREFIX=
31352    SHARED_LIBRARY_SUFFIX='.dll'
31353    STATIC_LIBRARY_SUFFIX='.lib'
31354    SHARED_LIBRARY='$1.dll'
31355    STATIC_LIBRARY='$1.lib'
31356    OBJ_SUFFIX='.obj'
31357    EXE_SUFFIX='.exe'
31358  else
31359    LIBRARY_PREFIX=lib
31360    SHARED_LIBRARY_SUFFIX='.so'
31361    STATIC_LIBRARY_SUFFIX='.a'
31362    SHARED_LIBRARY='lib$1.so'
31363    STATIC_LIBRARY='lib$1.a'
31364    OBJ_SUFFIX='.o'
31365    EXE_SUFFIX=''
31366    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31367      # For full static builds, we're overloading the SHARED_LIBRARY
31368      # variables in order to limit the amount of changes required.
31369      # It would be better to remove SHARED and just use LIBRARY and
31370      # LIBRARY_SUFFIX for libraries that can be built either
31371      # shared or static and use STATIC_* for libraries that are
31372      # always built statically.
31373      if test "x$STATIC_BUILD" = xtrue; then
31374        SHARED_LIBRARY='lib$1.a'
31375        SHARED_LIBRARY_SUFFIX='.a'
31376      else
31377        SHARED_LIBRARY='lib$1.dylib'
31378        SHARED_LIBRARY_SUFFIX='.dylib'
31379      fi
31380    fi
31381  fi
31382
31383
31384
31385
31386
31387
31388
31389
31390
31391
31392  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31393    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31394$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31395  else
31396    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31397$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31398  fi
31399
31400
31401# User supplied flags should be used when configure detects compilers
31402
31403  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31404    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31405$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31406  fi
31407
31408  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31409    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31410$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31411  fi
31412
31413  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31414    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31415$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31416  fi
31417
31418
31419# Check whether --with-extra-cflags was given.
31420if test "${with_extra_cflags+set}" = set; then :
31421  withval=$with_extra_cflags;
31422fi
31423
31424
31425
31426# Check whether --with-extra-cxxflags was given.
31427if test "${with_extra_cxxflags+set}" = set; then :
31428  withval=$with_extra_cxxflags;
31429fi
31430
31431
31432
31433# Check whether --with-extra-ldflags was given.
31434if test "${with_extra_ldflags+set}" = set; then :
31435  withval=$with_extra_ldflags;
31436fi
31437
31438
31439  EXTRA_CFLAGS="$with_extra_cflags"
31440  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31441  EXTRA_LDFLAGS="$with_extra_ldflags"
31442
31443  # Hotspot needs these set in their legacy form
31444  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31445  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31446  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31447
31448
31449
31450
31451
31452
31453
31454
31455
31456  # The global CFLAGS and LDLAGS variables are used by configure tests and
31457  # should include the extra parameters
31458  CFLAGS="$EXTRA_CFLAGS"
31459  CXXFLAGS="$EXTRA_CXXFLAGS"
31460  LDFLAGS="$EXTRA_LDFLAGS"
31461  CPPFLAGS=""
31462
31463# The sysroot cflags are needed for configure to be able to run the compilers
31464
31465  if test "x$SYSROOT" != "x"; then
31466    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31467      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31468        # Solaris Studio does not have a concept of sysroot. Instead we must
31469        # make sure the default include and lib dirs are appended to each
31470        # compile and link command line. Must also add -I-xbuiltin to enable
31471        # inlining of system functions and intrinsics.
31472        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31473        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31474            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
31475            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
31476      fi
31477    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31478      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31479      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31480    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31481      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31482      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31483    fi
31484    # Propagate the sysroot args to hotspot
31485    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31486    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31487    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31488    # The global CFLAGS and LDFLAGS variables need these for configure to function
31489    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31490    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31491    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31492    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31493  fi
31494
31495  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31496    # We also need -iframework<path>/System/Library/Frameworks
31497    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31498    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31499    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31500    # set this here so it doesn't have to be peppered throughout the forest
31501    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31502    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31503  fi
31504
31505
31506
31507
31508
31509# Then detect the actual binaries needed
31510
31511  # FIXME: Is this needed?
31512  ac_ext=cpp
31513ac_cpp='$CXXCPP $CPPFLAGS'
31514ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31515ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31516ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31517
31518
31519  # Store the CFLAGS etc passed to the configure script.
31520  ORG_CFLAGS="$CFLAGS"
31521  ORG_CXXFLAGS="$CXXFLAGS"
31522
31523  # autoconf magic only relies on PATH, so update it if tools dir is specified
31524  OLD_PATH="$PATH"
31525
31526  # On Windows, we need to detect the visual studio installation first.
31527  # This will change the PATH, but we need to keep that new PATH even
31528  # after toolchain detection is done, since the compiler (on x86) uses
31529  # it for DLL resolution in runtime.
31530  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31531      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31532
31533  # Store path to cygwin link.exe to help excluding it when searching for
31534  # VS linker. This must be done before changing the PATH when looking for VS.
31535  # Extract the first word of "link", so it can be a program name with args.
31536set dummy link; ac_word=$2
31537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31538$as_echo_n "checking for $ac_word... " >&6; }
31539if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31540  $as_echo_n "(cached) " >&6
31541else
31542  case $CYGWIN_LINK in
31543  [\\/]* | ?:[\\/]*)
31544  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31545  ;;
31546  *)
31547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31548for as_dir in $PATH
31549do
31550  IFS=$as_save_IFS
31551  test -z "$as_dir" && as_dir=.
31552    for ac_exec_ext in '' $ac_executable_extensions; do
31553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31554    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31556    break 2
31557  fi
31558done
31559  done
31560IFS=$as_save_IFS
31561
31562  ;;
31563esac
31564fi
31565CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31566if test -n "$CYGWIN_LINK"; then
31567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31568$as_echo "$CYGWIN_LINK" >&6; }
31569else
31570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31571$as_echo "no" >&6; }
31572fi
31573
31574
31575  if test "x$CYGWIN_LINK" != x; then
31576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31577$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31578    "$CYGWIN_LINK" --version > /dev/null
31579    if test $? -eq 0 ; then
31580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31581$as_echo "yes" >&6; }
31582    else
31583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31584$as_echo "no" >&6; }
31585      # This might be the VS linker. Don't exclude it later on.
31586      CYGWIN_LINK=""
31587    fi
31588  fi
31589
31590  # First-hand choice is to locate and run the vsvars bat file.
31591
31592
31593# Check whether --with-toolchain-version was given.
31594if test "${with_toolchain_version+set}" = set; then :
31595  withval=$with_toolchain_version;
31596fi
31597
31598
31599  if test "x$with_toolchain_version" = xlist; then
31600    # List all toolchains
31601    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31602$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31603    for version in $VALID_VS_VERSIONS; do
31604      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31605      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31606    done
31607
31608    exit 0
31609  elif test "x$DEVKIT_VS_VERSION" != x; then
31610    VS_VERSION=$DEVKIT_VS_VERSION
31611    TOOLCHAIN_VERSION=$VS_VERSION
31612    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31613    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31614    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31615    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31616    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31617    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31618
31619    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31620    # can still be exported as INCLUDE for compiler invocations without
31621    # SYSROOT_CFLAGS
31622    OLDIFS="$IFS"
31623    IFS=";"
31624    for i in $DEVKIT_VS_INCLUDE; do
31625      ipath=$i
31626
31627  unix_path="$ipath"
31628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31629    windows_path=`$CYGPATH -m "$unix_path"`
31630    ipath="$windows_path"
31631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31632    windows_path=`cmd //c echo $unix_path`
31633    ipath="$windows_path"
31634  fi
31635
31636      VS_INCLUDE="$VS_INCLUDE;$ipath"
31637    done
31638    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31639    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31640    for i in $DEVKIT_VS_LIB; do
31641      libpath=$i
31642
31643  unix_path="$libpath"
31644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31645    windows_path=`$CYGPATH -m "$unix_path"`
31646    libpath="$windows_path"
31647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31648    windows_path=`cmd //c echo $unix_path`
31649    libpath="$windows_path"
31650  fi
31651
31652      VS_LIB="$VS_LIB;$libpath"
31653    done
31654    IFS="$OLDIFS"
31655
31656    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31657$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31658
31659  elif test "x$with_toolchain_version" != x; then
31660    # User override; check that it is valid
31661    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31662      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31663$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31664      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31665$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31666      as_fn_error $? "Cannot continue." "$LINENO" 5
31667    fi
31668    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31669  else
31670    # No flag given, use default
31671    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31672  fi
31673
31674  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31675
31676  VS_VERSION="$VS_VERSION"
31677  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31678  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31679  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31680  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31681
31682  # When using --with-tools-dir, assume it points to the correct and default
31683  # version of Visual Studio or that --with-toolchain-version was also set.
31684  if test "x$with_tools_dir" != x; then
31685
31686  if test "x$VS_ENV_CMD" = x; then
31687    VS_VERSION="${VS_VERSION}"
31688    VS_BASE="$with_tools_dir/../.."
31689    METHOD="--with-tools-dir"
31690
31691    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31692      VCVARSFILE="vc/bin/vcvars32.bat"
31693    else
31694      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31695    fi
31696
31697
31698  windows_path="$VS_BASE"
31699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31700    unix_path=`$CYGPATH -u "$windows_path"`
31701    VS_BASE="$unix_path"
31702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31704    VS_BASE="$unix_path"
31705  fi
31706
31707    if test -d "$VS_BASE"; then
31708      if test -f "$VS_BASE/$VCVARSFILE"; then
31709        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31710$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31711        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31712        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31713        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31714        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31715      else
31716        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31717$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31718        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31719$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31720      fi
31721    fi
31722  fi
31723
31724
31725  if test "x$VS_ENV_CMD" = x; then
31726    VS_VERSION="${VS_VERSION}"
31727    VS_BASE="$with_tools_dir/../../.."
31728    METHOD="--with-tools-dir"
31729
31730    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31731      VCVARSFILE="vc/bin/vcvars32.bat"
31732    else
31733      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31734    fi
31735
31736
31737  windows_path="$VS_BASE"
31738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31739    unix_path=`$CYGPATH -u "$windows_path"`
31740    VS_BASE="$unix_path"
31741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31743    VS_BASE="$unix_path"
31744  fi
31745
31746    if test -d "$VS_BASE"; then
31747      if test -f "$VS_BASE/$VCVARSFILE"; then
31748        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31749$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31750        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31751        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31752        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31753        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31754      else
31755        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31756$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31757        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31758$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31759      fi
31760    fi
31761  fi
31762
31763    if test "x$VS_ENV_CMD" = x; then
31764      # Having specified an argument which is incorrect will produce an instant failure;
31765      # we should not go on looking
31766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31767$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31768      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31769$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31770      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31771$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31772      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31773    fi
31774  fi
31775
31776  VS_ENV_CMD=""
31777  VS_ENV_ARGS=""
31778
31779  if test "x$VS_COMNTOOLS" != x; then
31780
31781  if test "x$VS_ENV_CMD" = x; then
31782    VS_VERSION="${VS_VERSION}"
31783    VS_BASE="$VS_COMNTOOLS/../.."
31784    METHOD="$VS_COMNTOOLS_VAR variable"
31785
31786    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31787      VCVARSFILE="vc/bin/vcvars32.bat"
31788    else
31789      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31790    fi
31791
31792
31793  windows_path="$VS_BASE"
31794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31795    unix_path=`$CYGPATH -u "$windows_path"`
31796    VS_BASE="$unix_path"
31797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31799    VS_BASE="$unix_path"
31800  fi
31801
31802    if test -d "$VS_BASE"; then
31803      if test -f "$VS_BASE/$VCVARSFILE"; then
31804        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31805$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31806        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31807        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31808        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31809        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31810      else
31811        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31812$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31813        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31814$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31815      fi
31816    fi
31817  fi
31818
31819  fi
31820  if test "x$PROGRAMFILES" != x; then
31821
31822  if test "x$VS_ENV_CMD" = x; then
31823    VS_VERSION="${VS_VERSION}"
31824    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31825    METHOD="well-known name"
31826
31827    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31828      VCVARSFILE="vc/bin/vcvars32.bat"
31829    else
31830      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31831    fi
31832
31833
31834  windows_path="$VS_BASE"
31835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31836    unix_path=`$CYGPATH -u "$windows_path"`
31837    VS_BASE="$unix_path"
31838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31840    VS_BASE="$unix_path"
31841  fi
31842
31843    if test -d "$VS_BASE"; then
31844      if test -f "$VS_BASE/$VCVARSFILE"; then
31845        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31846$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31847        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31848        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31849        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31850        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31851      else
31852        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31853$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31854        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31855$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31856      fi
31857    fi
31858  fi
31859
31860  fi
31861  # Work around the insanely named ProgramFiles(x86) env variable
31862  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31863  if test "x$PROGRAMFILES_X86" != x; then
31864
31865  if test "x$VS_ENV_CMD" = x; then
31866    VS_VERSION="${VS_VERSION}"
31867    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31868    METHOD="well-known name"
31869
31870    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31871      VCVARSFILE="vc/bin/vcvars32.bat"
31872    else
31873      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31874    fi
31875
31876
31877  windows_path="$VS_BASE"
31878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31879    unix_path=`$CYGPATH -u "$windows_path"`
31880    VS_BASE="$unix_path"
31881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31883    VS_BASE="$unix_path"
31884  fi
31885
31886    if test -d "$VS_BASE"; then
31887      if test -f "$VS_BASE/$VCVARSFILE"; then
31888        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31889$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31890        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31891        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31892        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31893        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31894      else
31895        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31896$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31897        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31898$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31899      fi
31900    fi
31901  fi
31902
31903  fi
31904
31905  if test "x$VS_ENV_CMD" = x; then
31906    VS_VERSION="${VS_VERSION}"
31907    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31908    METHOD="well-known name"
31909
31910    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31911      VCVARSFILE="vc/bin/vcvars32.bat"
31912    else
31913      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31914    fi
31915
31916
31917  windows_path="$VS_BASE"
31918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31919    unix_path=`$CYGPATH -u "$windows_path"`
31920    VS_BASE="$unix_path"
31921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31923    VS_BASE="$unix_path"
31924  fi
31925
31926    if test -d "$VS_BASE"; then
31927      if test -f "$VS_BASE/$VCVARSFILE"; then
31928        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31929$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31930        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31931        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31932        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31933        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31934      else
31935        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31936$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31937        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31938$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31939      fi
31940    fi
31941  fi
31942
31943
31944  if test "x$VS_ENV_CMD" = x; then
31945    VS_VERSION="${VS_VERSION}"
31946    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31947    METHOD="well-known name"
31948
31949    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31950      VCVARSFILE="vc/bin/vcvars32.bat"
31951    else
31952      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31953    fi
31954
31955
31956  windows_path="$VS_BASE"
31957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31958    unix_path=`$CYGPATH -u "$windows_path"`
31959    VS_BASE="$unix_path"
31960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31962    VS_BASE="$unix_path"
31963  fi
31964
31965    if test -d "$VS_BASE"; then
31966      if test -f "$VS_BASE/$VCVARSFILE"; then
31967        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31968$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31969        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31970        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31971        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31972        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31973      else
31974        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31975$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31976        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31977$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31978      fi
31979    fi
31980  fi
31981
31982
31983  if test "x$SDK_INSTALL_DIR" != x; then
31984    if test "x$ProgramW6432" != x; then
31985
31986  if test "x$VS_ENV_CMD" = x; then
31987    VS_VERSION="${VS_VERSION}"
31988    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31989    METHOD="well-known name"
31990
31991  windows_path="$WIN_SDK_BASE"
31992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31993    unix_path=`$CYGPATH -u "$windows_path"`
31994    WIN_SDK_BASE="$unix_path"
31995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31997    WIN_SDK_BASE="$unix_path"
31998  fi
31999
32000    if test -d "$WIN_SDK_BASE"; then
32001      # There have been cases of partial or broken SDK installations. A missing
32002      # lib dir is not going to work.
32003      if test ! -d "$WIN_SDK_BASE/lib"; then
32004        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32005$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32006        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32007$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32008      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32009        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32010$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32011        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32012        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32013          VS_ENV_ARGS="/x86"
32014        else
32015          VS_ENV_ARGS="/x64"
32016        fi
32017        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32018        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32019        # TODO: improve detection for other versions of SDK
32020        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32021      else
32022        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32023$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32024        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32025$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32026      fi
32027    fi
32028  fi
32029
32030    fi
32031    if test "x$PROGRAMW6432" != x; then
32032
32033  if test "x$VS_ENV_CMD" = x; then
32034    VS_VERSION="${VS_VERSION}"
32035    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32036    METHOD="well-known name"
32037
32038  windows_path="$WIN_SDK_BASE"
32039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32040    unix_path=`$CYGPATH -u "$windows_path"`
32041    WIN_SDK_BASE="$unix_path"
32042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32044    WIN_SDK_BASE="$unix_path"
32045  fi
32046
32047    if test -d "$WIN_SDK_BASE"; then
32048      # There have been cases of partial or broken SDK installations. A missing
32049      # lib dir is not going to work.
32050      if test ! -d "$WIN_SDK_BASE/lib"; then
32051        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32052$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32053        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32054$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32055      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32056        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32057$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32058        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32059        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32060          VS_ENV_ARGS="/x86"
32061        else
32062          VS_ENV_ARGS="/x64"
32063        fi
32064        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32065        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32066        # TODO: improve detection for other versions of SDK
32067        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32068      else
32069        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32070$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32071        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32072$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32073      fi
32074    fi
32075  fi
32076
32077    fi
32078    if test "x$PROGRAMFILES" != x; then
32079
32080  if test "x$VS_ENV_CMD" = x; then
32081    VS_VERSION="${VS_VERSION}"
32082    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32083    METHOD="well-known name"
32084
32085  windows_path="$WIN_SDK_BASE"
32086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32087    unix_path=`$CYGPATH -u "$windows_path"`
32088    WIN_SDK_BASE="$unix_path"
32089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32091    WIN_SDK_BASE="$unix_path"
32092  fi
32093
32094    if test -d "$WIN_SDK_BASE"; then
32095      # There have been cases of partial or broken SDK installations. A missing
32096      # lib dir is not going to work.
32097      if test ! -d "$WIN_SDK_BASE/lib"; then
32098        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32099$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32100        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32101$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32102      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32103        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32104$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32105        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32106        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32107          VS_ENV_ARGS="/x86"
32108        else
32109          VS_ENV_ARGS="/x64"
32110        fi
32111        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32112        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32113        # TODO: improve detection for other versions of SDK
32114        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32115      else
32116        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32117$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32118        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32119$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32120      fi
32121    fi
32122  fi
32123
32124    fi
32125
32126  if test "x$VS_ENV_CMD" = x; then
32127    VS_VERSION="${VS_VERSION}"
32128    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32129    METHOD="well-known name"
32130
32131  windows_path="$WIN_SDK_BASE"
32132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32133    unix_path=`$CYGPATH -u "$windows_path"`
32134    WIN_SDK_BASE="$unix_path"
32135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32137    WIN_SDK_BASE="$unix_path"
32138  fi
32139
32140    if test -d "$WIN_SDK_BASE"; then
32141      # There have been cases of partial or broken SDK installations. A missing
32142      # lib dir is not going to work.
32143      if test ! -d "$WIN_SDK_BASE/lib"; then
32144        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32145$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32146        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32147$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32148      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32149        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32150$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32151        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32152        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32153          VS_ENV_ARGS="/x86"
32154        else
32155          VS_ENV_ARGS="/x64"
32156        fi
32157        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32158        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32159        # TODO: improve detection for other versions of SDK
32160        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32161      else
32162        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32163$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32164        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32165$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32166      fi
32167    fi
32168  fi
32169
32170
32171  if test "x$VS_ENV_CMD" = x; then
32172    VS_VERSION="${VS_VERSION}"
32173    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32174    METHOD="well-known name"
32175
32176  windows_path="$WIN_SDK_BASE"
32177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32178    unix_path=`$CYGPATH -u "$windows_path"`
32179    WIN_SDK_BASE="$unix_path"
32180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32182    WIN_SDK_BASE="$unix_path"
32183  fi
32184
32185    if test -d "$WIN_SDK_BASE"; then
32186      # There have been cases of partial or broken SDK installations. A missing
32187      # lib dir is not going to work.
32188      if test ! -d "$WIN_SDK_BASE/lib"; then
32189        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32190$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32191        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32192$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32193      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32194        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32195$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32196        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32197        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32198          VS_ENV_ARGS="/x86"
32199        else
32200          VS_ENV_ARGS="/x64"
32201        fi
32202        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32203        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32204        # TODO: improve detection for other versions of SDK
32205        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32206      else
32207        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32208$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32209        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32210$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32211      fi
32212    fi
32213  fi
32214
32215  fi
32216
32217    if test "x$VS_ENV_CMD" != x; then
32218      TOOLCHAIN_VERSION=$VS_VERSION
32219      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32220      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32221      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32222      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32223      # The rest of the variables are already evaled while probing
32224      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32225$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32226      break
32227    fi
32228  done
32229
32230
32231  # If we have a devkit, skip all of the below.
32232  if test "x$DEVKIT_VS_VERSION" = x; then
32233    if test "x$VS_ENV_CMD" != x; then
32234      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32235
32236  # Only process if variable expands to non-empty
32237
32238  if test "x$VS_ENV_CMD" != x; then
32239    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32240
32241  # First separate the path from the arguments. This will split at the first
32242  # space.
32243  complete="$VS_ENV_CMD"
32244  path="${complete%% *}"
32245  tmp="$complete EOL"
32246  arguments="${tmp#* }"
32247
32248  # Input might be given as Windows format, start by converting to
32249  # unix format.
32250  new_path=`$CYGPATH -u "$path"`
32251
32252  # Now try to locate executable using which
32253  new_path=`$WHICH "$new_path" 2> /dev/null`
32254  # bat and cmd files are not always considered executable in cygwin causing which
32255  # to not find them
32256  if test "x$new_path" = x \
32257      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32258      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32259    new_path=`$CYGPATH -u "$path"`
32260  fi
32261  if test "x$new_path" = x; then
32262    # Oops. Which didn't find the executable.
32263    # The splitting of arguments from the executable at a space might have been incorrect,
32264    # since paths with space are more likely in Windows. Give it another try with the whole
32265    # argument.
32266    path="$complete"
32267    arguments="EOL"
32268    new_path=`$CYGPATH -u "$path"`
32269    new_path=`$WHICH "$new_path" 2> /dev/null`
32270    # bat and cmd files are not always considered executable in cygwin causing which
32271    # to not find them
32272    if test "x$new_path" = x \
32273        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32274        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32275      new_path=`$CYGPATH -u "$path"`
32276    fi
32277    if test "x$new_path" = x; then
32278      # It's still not found. Now this is an unrecoverable error.
32279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32280$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32281      has_space=`$ECHO "$complete" | $GREP " "`
32282      if test "x$has_space" != x; then
32283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32285      fi
32286      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32287    fi
32288  fi
32289
32290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32293  # "foo.exe" is OK but "foo" is an error.
32294  #
32295  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32296  # It is also a way to make sure we got the proper file name for the real test later on.
32297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32298  if test "x$test_shortpath" = x; then
32299    # Short path failed, file does not exist as specified.
32300    # Try adding .exe or .cmd
32301    if test -f "${new_path}.exe"; then
32302      input_to_shortpath="${new_path}.exe"
32303    elif test -f "${new_path}.cmd"; then
32304      input_to_shortpath="${new_path}.cmd"
32305    else
32306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32307$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32308      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32309$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32310      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32311    fi
32312  else
32313    input_to_shortpath="$new_path"
32314  fi
32315
32316  # Call helper function which possibly converts this using DOS-style short mode.
32317  # If so, the updated path is stored in $new_path.
32318  new_path="$input_to_shortpath"
32319
32320  input_path="$input_to_shortpath"
32321  # Check if we need to convert this using DOS-style short mode. If the path
32322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32323  # take no chances and rewrite it.
32324  # Note: m4 eats our [], so we need to use [ and ] instead.
32325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32326  if test "x$has_forbidden_chars" != x; then
32327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32331      # Going to short mode and back again did indeed matter. Since short mode is
32332      # case insensitive, let's make it lowercase to improve readability.
32333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32334      # Now convert it back to Unix-style (cygpath)
32335      input_path=`$CYGPATH -u "$shortmode_path"`
32336      new_path="$input_path"
32337    fi
32338  fi
32339
32340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32341  if test "x$test_cygdrive_prefix" = x; then
32342    # As a simple fix, exclude /usr/bin since it's not a real path.
32343    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32345      # a path prefixed by /cygdrive for fixpath to work.
32346      new_path="$CYGWIN_ROOT_PATH$input_path"
32347    fi
32348  fi
32349
32350  # remove trailing .exe if any
32351  new_path="${new_path/%.exe/}"
32352
32353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32354
32355  # First separate the path from the arguments. This will split at the first
32356  # space.
32357  complete="$VS_ENV_CMD"
32358  path="${complete%% *}"
32359  tmp="$complete EOL"
32360  arguments="${tmp#* }"
32361
32362  # Input might be given as Windows format, start by converting to
32363  # unix format.
32364  new_path="$path"
32365
32366  windows_path="$new_path"
32367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32368    unix_path=`$CYGPATH -u "$windows_path"`
32369    new_path="$unix_path"
32370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32372    new_path="$unix_path"
32373  fi
32374
32375
32376  # Now try to locate executable using which
32377  new_path=`$WHICH "$new_path" 2> /dev/null`
32378
32379  if test "x$new_path" = x; then
32380    # Oops. Which didn't find the executable.
32381    # The splitting of arguments from the executable at a space might have been incorrect,
32382    # since paths with space are more likely in Windows. Give it another try with the whole
32383    # argument.
32384    path="$complete"
32385    arguments="EOL"
32386    new_path="$path"
32387
32388  windows_path="$new_path"
32389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32390    unix_path=`$CYGPATH -u "$windows_path"`
32391    new_path="$unix_path"
32392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32394    new_path="$unix_path"
32395  fi
32396
32397
32398    new_path=`$WHICH "$new_path" 2> /dev/null`
32399    # bat and cmd files are not always considered executable in MSYS causing which
32400    # to not find them
32401    if test "x$new_path" = x \
32402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32404      new_path="$path"
32405
32406  windows_path="$new_path"
32407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32408    unix_path=`$CYGPATH -u "$windows_path"`
32409    new_path="$unix_path"
32410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32412    new_path="$unix_path"
32413  fi
32414
32415    fi
32416
32417    if test "x$new_path" = x; then
32418      # It's still not found. Now this is an unrecoverable error.
32419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32420$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32421      has_space=`$ECHO "$complete" | $GREP " "`
32422      if test "x$has_space" != x; then
32423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32425      fi
32426      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32427    fi
32428  fi
32429
32430  # Now new_path has a complete unix path to the binary
32431  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32432    # Keep paths in /bin as-is, but remove trailing .exe if any
32433    new_path="${new_path/%.exe/}"
32434    # Do not save /bin paths to all_fixpath_prefixes!
32435  else
32436    # Not in mixed or Windows style, start by that.
32437    new_path=`cmd //c echo $new_path`
32438
32439  input_path="$new_path"
32440  # Check if we need to convert this using DOS-style short mode. If the path
32441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32442  # take no chances and rewrite it.
32443  # Note: m4 eats our [], so we need to use [ and ] instead.
32444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32445  if test "x$has_forbidden_chars" != x; then
32446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32448  fi
32449
32450    # Output is in $new_path
32451
32452  windows_path="$new_path"
32453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32454    unix_path=`$CYGPATH -u "$windows_path"`
32455    new_path="$unix_path"
32456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32458    new_path="$unix_path"
32459  fi
32460
32461    # remove trailing .exe if any
32462    new_path="${new_path/%.exe/}"
32463
32464    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32465    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32466  fi
32467
32468    else
32469      # We're on a unix platform. Hooray! :)
32470      # First separate the path from the arguments. This will split at the first
32471      # space.
32472      complete="$VS_ENV_CMD"
32473      path="${complete%% *}"
32474      tmp="$complete EOL"
32475      arguments="${tmp#* }"
32476
32477      # Cannot rely on the command "which" here since it doesn't always work.
32478      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32479      if test -z "$is_absolute_path"; then
32480        # Path to executable is not absolute. Find it.
32481        IFS_save="$IFS"
32482        IFS=:
32483        for p in $PATH; do
32484          if test -f "$p/$path" && test -x "$p/$path"; then
32485            new_path="$p/$path"
32486            break
32487          fi
32488        done
32489        IFS="$IFS_save"
32490      else
32491        # This is an absolute path, we can use it without further modifications.
32492        new_path="$path"
32493      fi
32494
32495      if test "x$new_path" = x; then
32496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32497$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32498        has_space=`$ECHO "$complete" | $GREP " "`
32499        if test "x$has_space" != x; then
32500          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32501$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32502        fi
32503        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32504      fi
32505    fi
32506
32507    # Now join together the path and the arguments once again
32508    if test "x$arguments" != xEOL; then
32509      new_complete="$new_path ${arguments% *}"
32510    else
32511      new_complete="$new_path"
32512    fi
32513
32514    if test "x$complete" != "x$new_complete"; then
32515      VS_ENV_CMD="$new_complete"
32516      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32517$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32518    fi
32519  fi
32520
32521
32522      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32523      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32524$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32525
32526      # We need to create a couple of temporary files.
32527      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32528      $MKDIR -p $VS_ENV_TMP_DIR
32529
32530      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32531      # Instead create a shell script which will set the relevant variables when run.
32532      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32533
32534  unix_path="$WINPATH_VS_ENV_CMD"
32535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32536    windows_path=`$CYGPATH -m "$unix_path"`
32537    WINPATH_VS_ENV_CMD="$windows_path"
32538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32539    windows_path=`cmd //c echo $unix_path`
32540    WINPATH_VS_ENV_CMD="$windows_path"
32541  fi
32542
32543      WINPATH_BASH="$BASH"
32544
32545  unix_path="$WINPATH_BASH"
32546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32547    windows_path=`$CYGPATH -m "$unix_path"`
32548    WINPATH_BASH="$windows_path"
32549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32550    windows_path=`cmd //c echo $unix_path`
32551    WINPATH_BASH="$windows_path"
32552  fi
32553
32554
32555      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32556      # script (executable by bash) that will setup the important variables.
32557      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32558      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32559      # This will end up something like:
32560      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32561      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32562      # These will end up something like:
32563      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32564      # The trailing space for everyone except PATH is no typo, but is needed due
32565      # to trailing \ in the Windows paths. These will be stripped later.
32566      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32567          >> $EXTRACT_VC_ENV_BAT_FILE
32568      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32569          >> $EXTRACT_VC_ENV_BAT_FILE
32570      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32571          >> $EXTRACT_VC_ENV_BAT_FILE
32572      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32573          >> $EXTRACT_VC_ENV_BAT_FILE
32574      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32575          >> $EXTRACT_VC_ENV_BAT_FILE
32576      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32577          >> $EXTRACT_VC_ENV_BAT_FILE
32578
32579      # Now execute the newly created bat file.
32580      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32581      # Change directory so we don't need to mess with Windows paths in redirects.
32582      cd $VS_ENV_TMP_DIR
32583      cmd /c extract-vs-env.bat | $CAT
32584      cd $CURDIR
32585
32586      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32587        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32588$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32589        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32590$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32591        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32592$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32593        as_fn_error $? "Cannot continue" "$LINENO" 5
32594      fi
32595
32596      # Now set all paths and other env variables. This will allow the rest of
32597      # the configure script to find and run the compiler in the proper way.
32598      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32599$as_echo "$as_me: Setting extracted environment variables" >&6;}
32600      . $VS_ENV_TMP_DIR/set-vs-env.sh
32601      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32602      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32603    else
32604      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32605      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32606$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32607    fi
32608  fi
32609
32610  # At this point, we should have correct variables in the environment, or we can't continue.
32611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32612$as_echo_n "checking for Visual Studio variables... " >&6; }
32613
32614  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32615      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32616    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32618$as_echo "present but broken" >&6; }
32619      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32620    else
32621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32622$as_echo "ok" >&6; }
32623      # Remove any trailing "\" ";" and " " from the variables.
32624      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32625      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32626      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32627      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32628      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32629      # Remove any paths containing # (typically F#) as that messes up make. This
32630      # is needed if visual studio was installed with F# support.
32631      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32632
32633
32634
32635
32636
32637      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32638      OLDIFS="$IFS"
32639      IFS=";"
32640      for i in $VS_INCLUDE; do
32641        ipath=$i
32642        # Only process non-empty elements
32643        if test "x$ipath" != x; then
32644          IFS="$OLDIFS"
32645          # Check that directory exists before calling fixup_path
32646          testpath=$ipath
32647
32648  windows_path="$testpath"
32649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32650    unix_path=`$CYGPATH -u "$windows_path"`
32651    testpath="$unix_path"
32652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32654    testpath="$unix_path"
32655  fi
32656
32657          if test -d "$testpath"; then
32658
32659  # Only process if variable expands to non-empty
32660
32661  if test "x$ipath" != x; then
32662    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32663
32664  # Input might be given as Windows format, start by converting to
32665  # unix format.
32666  path="$ipath"
32667  new_path=`$CYGPATH -u "$path"`
32668
32669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32672  # "foo.exe" is OK but "foo" is an error.
32673  #
32674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32675  # It is also a way to make sure we got the proper file name for the real test later on.
32676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32677  if test "x$test_shortpath" = x; then
32678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32679$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32680    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32681  fi
32682
32683  # Call helper function which possibly converts this using DOS-style short mode.
32684  # If so, the updated path is stored in $new_path.
32685
32686  input_path="$new_path"
32687  # Check if we need to convert this using DOS-style short mode. If the path
32688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32689  # take no chances and rewrite it.
32690  # Note: m4 eats our [], so we need to use [ and ] instead.
32691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32692  if test "x$has_forbidden_chars" != x; then
32693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32697      # Going to short mode and back again did indeed matter. Since short mode is
32698      # case insensitive, let's make it lowercase to improve readability.
32699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32700      # Now convert it back to Unix-style (cygpath)
32701      input_path=`$CYGPATH -u "$shortmode_path"`
32702      new_path="$input_path"
32703    fi
32704  fi
32705
32706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32707  if test "x$test_cygdrive_prefix" = x; then
32708    # As a simple fix, exclude /usr/bin since it's not a real path.
32709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32711      # a path prefixed by /cygdrive for fixpath to work.
32712      new_path="$CYGWIN_ROOT_PATH$input_path"
32713    fi
32714  fi
32715
32716
32717  if test "x$path" != "x$new_path"; then
32718    ipath="$new_path"
32719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32720$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32721  fi
32722
32723    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32724
32725  path="$ipath"
32726  has_colon=`$ECHO $path | $GREP ^.:`
32727  new_path="$path"
32728  if test "x$has_colon" = x; then
32729    # Not in mixed or Windows style, start by that.
32730    new_path=`cmd //c echo $path`
32731  fi
32732
32733
32734  input_path="$new_path"
32735  # Check if we need to convert this using DOS-style short mode. If the path
32736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32737  # take no chances and rewrite it.
32738  # Note: m4 eats our [], so we need to use [ and ] instead.
32739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32740  if test "x$has_forbidden_chars" != x; then
32741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32743  fi
32744
32745
32746  windows_path="$new_path"
32747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32748    unix_path=`$CYGPATH -u "$windows_path"`
32749    new_path="$unix_path"
32750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32752    new_path="$unix_path"
32753  fi
32754
32755  if test "x$path" != "x$new_path"; then
32756    ipath="$new_path"
32757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32758$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32759  fi
32760
32761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32763
32764    else
32765      # We're on a unix platform. Hooray! :)
32766      path="$ipath"
32767      has_space=`$ECHO "$path" | $GREP " "`
32768      if test "x$has_space" != x; then
32769        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32770$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32771        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32772      fi
32773
32774      # Use eval to expand a potential ~
32775      eval path="$path"
32776      if test ! -f "$path" && test ! -d "$path"; then
32777        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32778      fi
32779
32780      if test -d "$path"; then
32781        ipath="`cd "$path"; $THEPWDCMD -L`"
32782      else
32783        dir="`$DIRNAME "$path"`"
32784        base="`$BASENAME "$path"`"
32785        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32786      fi
32787    fi
32788  fi
32789
32790            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32791          fi
32792          IFS=";"
32793        fi
32794      done
32795      # Convert VS_LIB into SYSROOT_LDFLAGS
32796      for i in $VS_LIB; do
32797        libpath=$i
32798        # Only process non-empty elements
32799        if test "x$libpath" != x; then
32800          IFS="$OLDIFS"
32801          # Check that directory exists before calling fixup_path
32802          testpath=$libpath
32803
32804  windows_path="$testpath"
32805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32806    unix_path=`$CYGPATH -u "$windows_path"`
32807    testpath="$unix_path"
32808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32810    testpath="$unix_path"
32811  fi
32812
32813          if test -d "$testpath"; then
32814
32815  # Only process if variable expands to non-empty
32816
32817  if test "x$libpath" != x; then
32818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32819
32820  # Input might be given as Windows format, start by converting to
32821  # unix format.
32822  path="$libpath"
32823  new_path=`$CYGPATH -u "$path"`
32824
32825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32828  # "foo.exe" is OK but "foo" is an error.
32829  #
32830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32831  # It is also a way to make sure we got the proper file name for the real test later on.
32832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32833  if test "x$test_shortpath" = x; then
32834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32835$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32836    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32837  fi
32838
32839  # Call helper function which possibly converts this using DOS-style short mode.
32840  # If so, the updated path is stored in $new_path.
32841
32842  input_path="$new_path"
32843  # Check if we need to convert this using DOS-style short mode. If the path
32844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32845  # take no chances and rewrite it.
32846  # Note: m4 eats our [], so we need to use [ and ] instead.
32847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32848  if test "x$has_forbidden_chars" != x; then
32849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32853      # Going to short mode and back again did indeed matter. Since short mode is
32854      # case insensitive, let's make it lowercase to improve readability.
32855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32856      # Now convert it back to Unix-style (cygpath)
32857      input_path=`$CYGPATH -u "$shortmode_path"`
32858      new_path="$input_path"
32859    fi
32860  fi
32861
32862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32863  if test "x$test_cygdrive_prefix" = x; then
32864    # As a simple fix, exclude /usr/bin since it's not a real path.
32865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32867      # a path prefixed by /cygdrive for fixpath to work.
32868      new_path="$CYGWIN_ROOT_PATH$input_path"
32869    fi
32870  fi
32871
32872
32873  if test "x$path" != "x$new_path"; then
32874    libpath="$new_path"
32875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32876$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32877  fi
32878
32879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32880
32881  path="$libpath"
32882  has_colon=`$ECHO $path | $GREP ^.:`
32883  new_path="$path"
32884  if test "x$has_colon" = x; then
32885    # Not in mixed or Windows style, start by that.
32886    new_path=`cmd //c echo $path`
32887  fi
32888
32889
32890  input_path="$new_path"
32891  # Check if we need to convert this using DOS-style short mode. If the path
32892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32893  # take no chances and rewrite it.
32894  # Note: m4 eats our [], so we need to use [ and ] instead.
32895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32896  if test "x$has_forbidden_chars" != x; then
32897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32899  fi
32900
32901
32902  windows_path="$new_path"
32903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32904    unix_path=`$CYGPATH -u "$windows_path"`
32905    new_path="$unix_path"
32906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32908    new_path="$unix_path"
32909  fi
32910
32911  if test "x$path" != "x$new_path"; then
32912    libpath="$new_path"
32913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32914$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32915  fi
32916
32917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32919
32920    else
32921      # We're on a unix platform. Hooray! :)
32922      path="$libpath"
32923      has_space=`$ECHO "$path" | $GREP " "`
32924      if test "x$has_space" != x; then
32925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32926$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32928      fi
32929
32930      # Use eval to expand a potential ~
32931      eval path="$path"
32932      if test ! -f "$path" && test ! -d "$path"; then
32933        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32934      fi
32935
32936      if test -d "$path"; then
32937        libpath="`cd "$path"; $THEPWDCMD -L`"
32938      else
32939        dir="`$DIRNAME "$path"`"
32940        base="`$BASENAME "$path"`"
32941        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32942      fi
32943    fi
32944  fi
32945
32946            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32947          fi
32948          IFS=";"
32949        fi
32950      done
32951      IFS="$OLDIFS"
32952    fi
32953  else
32954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32955$as_echo "not found" >&6; }
32956
32957    if test "x$VS_ENV_CMD" = x; then
32958      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32959$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32960      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32961$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32962    else
32963      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32964$as_echo "$as_me: Running the extraction script failed." >&6;}
32965    fi
32966    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32967$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32968    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32969$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32970    as_fn_error $? "Cannot continue" "$LINENO" 5
32971  fi
32972
32973    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32974    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32975    PATH="$VS_PATH"
32976    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32977    export INCLUDE="$VS_INCLUDE"
32978    export LIB="$VS_LIB"
32979  else
32980    if test "x$XCODE_VERSION_OUTPUT" != x; then
32981      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32982      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32983      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32984    else
32985      # Currently we do not define this for other toolchains. This might change as the need arise.
32986      TOOLCHAIN_VERSION=
32987    fi
32988  fi
32989
32990
32991  # For solaris we really need solaris tools, and not the GNU equivalent.
32992  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32993  # so add that to path before starting to probe.
32994  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32995  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32996    PATH="/usr/ccs/bin:$PATH"
32997  fi
32998
32999  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33000  # override all other locations.
33001  if test "x$TOOLCHAIN_PATH" != x; then
33002    PATH=$TOOLCHAIN_PATH:$PATH
33003  fi
33004
33005
33006  #
33007  # Setup the compilers (CC and CXX)
33008  #
33009
33010  COMPILER_NAME=C
33011  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33012
33013  if test "x$CC" != x; then
33014    # User has supplied compiler name already, always let that override.
33015    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33016$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33017    if test "x`basename $CC`" = "x$CC"; then
33018      # A command without a complete path is provided, search $PATH.
33019
33020      for ac_prog in $CC
33021do
33022  # Extract the first word of "$ac_prog", so it can be a program name with args.
33023set dummy $ac_prog; ac_word=$2
33024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33025$as_echo_n "checking for $ac_word... " >&6; }
33026if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33027  $as_echo_n "(cached) " >&6
33028else
33029  case $POTENTIAL_CC in
33030  [\\/]* | ?:[\\/]*)
33031  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33032  ;;
33033  *)
33034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33035for as_dir in $PATH
33036do
33037  IFS=$as_save_IFS
33038  test -z "$as_dir" && as_dir=.
33039    for ac_exec_ext in '' $ac_executable_extensions; do
33040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33041    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33043    break 2
33044  fi
33045done
33046  done
33047IFS=$as_save_IFS
33048
33049  ;;
33050esac
33051fi
33052POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33053if test -n "$POTENTIAL_CC"; then
33054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33055$as_echo "$POTENTIAL_CC" >&6; }
33056else
33057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33058$as_echo "no" >&6; }
33059fi
33060
33061
33062  test -n "$POTENTIAL_CC" && break
33063done
33064
33065      if test "x$POTENTIAL_CC" != x; then
33066        CC=$POTENTIAL_CC
33067      else
33068        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33069      fi
33070    else
33071      # Otherwise it might already be a complete path
33072      if test ! -x "$CC"; then
33073        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33074      fi
33075    fi
33076  else
33077    # No user supplied value. Locate compiler ourselves.
33078
33079    # If we are cross compiling, assume cross compilation tools follows the
33080    # cross compilation standard where they are prefixed with the autoconf
33081    # standard name for the target. For example the binary
33082    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33083    # If we are not cross compiling, then the default compiler name will be
33084    # used.
33085
33086    CC=
33087    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33088    # before checking the rest of the PATH.
33089    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33090    # step, this should not be necessary.
33091    if test -n "$TOOLCHAIN_PATH"; then
33092      PATH_save="$PATH"
33093      PATH="$TOOLCHAIN_PATH"
33094      for ac_prog in $SEARCH_LIST
33095do
33096  # Extract the first word of "$ac_prog", so it can be a program name with args.
33097set dummy $ac_prog; ac_word=$2
33098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33099$as_echo_n "checking for $ac_word... " >&6; }
33100if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33101  $as_echo_n "(cached) " >&6
33102else
33103  case $TOOLCHAIN_PATH_CC in
33104  [\\/]* | ?:[\\/]*)
33105  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33106  ;;
33107  *)
33108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33109for as_dir in $PATH
33110do
33111  IFS=$as_save_IFS
33112  test -z "$as_dir" && as_dir=.
33113    for ac_exec_ext in '' $ac_executable_extensions; do
33114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33115    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33117    break 2
33118  fi
33119done
33120  done
33121IFS=$as_save_IFS
33122
33123  ;;
33124esac
33125fi
33126TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33127if test -n "$TOOLCHAIN_PATH_CC"; then
33128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33129$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33130else
33131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33132$as_echo "no" >&6; }
33133fi
33134
33135
33136  test -n "$TOOLCHAIN_PATH_CC" && break
33137done
33138
33139      CC=$TOOLCHAIN_PATH_CC
33140      PATH="$PATH_save"
33141    fi
33142
33143    # AC_PATH_PROGS can't be run multiple times with the same variable,
33144    # so create a new name for this run.
33145    if test "x$CC" = x; then
33146      for ac_prog in $SEARCH_LIST
33147do
33148  # Extract the first word of "$ac_prog", so it can be a program name with args.
33149set dummy $ac_prog; ac_word=$2
33150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33151$as_echo_n "checking for $ac_word... " >&6; }
33152if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33153  $as_echo_n "(cached) " >&6
33154else
33155  case $POTENTIAL_CC in
33156  [\\/]* | ?:[\\/]*)
33157  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33158  ;;
33159  *)
33160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33161for as_dir in $PATH
33162do
33163  IFS=$as_save_IFS
33164  test -z "$as_dir" && as_dir=.
33165    for ac_exec_ext in '' $ac_executable_extensions; do
33166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33167    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33169    break 2
33170  fi
33171done
33172  done
33173IFS=$as_save_IFS
33174
33175  ;;
33176esac
33177fi
33178POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33179if test -n "$POTENTIAL_CC"; then
33180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33181$as_echo "$POTENTIAL_CC" >&6; }
33182else
33183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33184$as_echo "no" >&6; }
33185fi
33186
33187
33188  test -n "$POTENTIAL_CC" && break
33189done
33190
33191      CC=$POTENTIAL_CC
33192    fi
33193
33194    if test "x$CC" = x; then
33195
33196  # Print a helpful message on how to acquire the necessary build dependency.
33197  # devkit is the help tag: freetype, cups, alsa etc
33198  MISSING_DEPENDENCY=devkit
33199
33200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33201    cygwin_help $MISSING_DEPENDENCY
33202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33203    msys_help $MISSING_DEPENDENCY
33204  else
33205    PKGHANDLER_COMMAND=
33206
33207    case $PKGHANDLER in
33208      apt-get)
33209        apt_help     $MISSING_DEPENDENCY ;;
33210      yum)
33211        yum_help     $MISSING_DEPENDENCY ;;
33212      port)
33213        port_help    $MISSING_DEPENDENCY ;;
33214      pkgutil)
33215        pkgutil_help $MISSING_DEPENDENCY ;;
33216      pkgadd)
33217        pkgadd_help  $MISSING_DEPENDENCY ;;
33218    esac
33219
33220    if test "x$PKGHANDLER_COMMAND" != x; then
33221      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33222    fi
33223  fi
33224
33225      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33226    fi
33227  fi
33228
33229  # Now we have a compiler binary in CC. Make sure it's okay.
33230
33231  # Only process if variable expands to non-empty
33232
33233  if test "x$CC" != x; then
33234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33235
33236  # First separate the path from the arguments. This will split at the first
33237  # space.
33238  complete="$CC"
33239  path="${complete%% *}"
33240  tmp="$complete EOL"
33241  arguments="${tmp#* }"
33242
33243  # Input might be given as Windows format, start by converting to
33244  # unix format.
33245  new_path=`$CYGPATH -u "$path"`
33246
33247  # Now try to locate executable using which
33248  new_path=`$WHICH "$new_path" 2> /dev/null`
33249  # bat and cmd files are not always considered executable in cygwin causing which
33250  # to not find them
33251  if test "x$new_path" = x \
33252      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33253      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33254    new_path=`$CYGPATH -u "$path"`
33255  fi
33256  if test "x$new_path" = x; then
33257    # Oops. Which didn't find the executable.
33258    # The splitting of arguments from the executable at a space might have been incorrect,
33259    # since paths with space are more likely in Windows. Give it another try with the whole
33260    # argument.
33261    path="$complete"
33262    arguments="EOL"
33263    new_path=`$CYGPATH -u "$path"`
33264    new_path=`$WHICH "$new_path" 2> /dev/null`
33265    # bat and cmd files are not always considered executable in cygwin causing which
33266    # to not find them
33267    if test "x$new_path" = x \
33268        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33269        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33270      new_path=`$CYGPATH -u "$path"`
33271    fi
33272    if test "x$new_path" = x; then
33273      # It's still not found. Now this is an unrecoverable error.
33274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33275$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33276      has_space=`$ECHO "$complete" | $GREP " "`
33277      if test "x$has_space" != x; then
33278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33280      fi
33281      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33282    fi
33283  fi
33284
33285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33288  # "foo.exe" is OK but "foo" is an error.
33289  #
33290  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33291  # It is also a way to make sure we got the proper file name for the real test later on.
33292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33293  if test "x$test_shortpath" = x; then
33294    # Short path failed, file does not exist as specified.
33295    # Try adding .exe or .cmd
33296    if test -f "${new_path}.exe"; then
33297      input_to_shortpath="${new_path}.exe"
33298    elif test -f "${new_path}.cmd"; then
33299      input_to_shortpath="${new_path}.cmd"
33300    else
33301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33302$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33303      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33304$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33305      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33306    fi
33307  else
33308    input_to_shortpath="$new_path"
33309  fi
33310
33311  # Call helper function which possibly converts this using DOS-style short mode.
33312  # If so, the updated path is stored in $new_path.
33313  new_path="$input_to_shortpath"
33314
33315  input_path="$input_to_shortpath"
33316  # Check if we need to convert this using DOS-style short mode. If the path
33317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33318  # take no chances and rewrite it.
33319  # Note: m4 eats our [], so we need to use [ and ] instead.
33320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33321  if test "x$has_forbidden_chars" != x; then
33322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33326      # Going to short mode and back again did indeed matter. Since short mode is
33327      # case insensitive, let's make it lowercase to improve readability.
33328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33329      # Now convert it back to Unix-style (cygpath)
33330      input_path=`$CYGPATH -u "$shortmode_path"`
33331      new_path="$input_path"
33332    fi
33333  fi
33334
33335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33336  if test "x$test_cygdrive_prefix" = x; then
33337    # As a simple fix, exclude /usr/bin since it's not a real path.
33338    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33340      # a path prefixed by /cygdrive for fixpath to work.
33341      new_path="$CYGWIN_ROOT_PATH$input_path"
33342    fi
33343  fi
33344
33345  # remove trailing .exe if any
33346  new_path="${new_path/%.exe/}"
33347
33348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33349
33350  # First separate the path from the arguments. This will split at the first
33351  # space.
33352  complete="$CC"
33353  path="${complete%% *}"
33354  tmp="$complete EOL"
33355  arguments="${tmp#* }"
33356
33357  # Input might be given as Windows format, start by converting to
33358  # unix format.
33359  new_path="$path"
33360
33361  windows_path="$new_path"
33362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33363    unix_path=`$CYGPATH -u "$windows_path"`
33364    new_path="$unix_path"
33365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33367    new_path="$unix_path"
33368  fi
33369
33370
33371  # Now try to locate executable using which
33372  new_path=`$WHICH "$new_path" 2> /dev/null`
33373
33374  if test "x$new_path" = x; then
33375    # Oops. Which didn't find the executable.
33376    # The splitting of arguments from the executable at a space might have been incorrect,
33377    # since paths with space are more likely in Windows. Give it another try with the whole
33378    # argument.
33379    path="$complete"
33380    arguments="EOL"
33381    new_path="$path"
33382
33383  windows_path="$new_path"
33384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33385    unix_path=`$CYGPATH -u "$windows_path"`
33386    new_path="$unix_path"
33387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33389    new_path="$unix_path"
33390  fi
33391
33392
33393    new_path=`$WHICH "$new_path" 2> /dev/null`
33394    # bat and cmd files are not always considered executable in MSYS causing which
33395    # to not find them
33396    if test "x$new_path" = x \
33397        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33398        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33399      new_path="$path"
33400
33401  windows_path="$new_path"
33402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33403    unix_path=`$CYGPATH -u "$windows_path"`
33404    new_path="$unix_path"
33405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33407    new_path="$unix_path"
33408  fi
33409
33410    fi
33411
33412    if test "x$new_path" = x; then
33413      # It's still not found. Now this is an unrecoverable error.
33414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33415$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33416      has_space=`$ECHO "$complete" | $GREP " "`
33417      if test "x$has_space" != x; then
33418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33420      fi
33421      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33422    fi
33423  fi
33424
33425  # Now new_path has a complete unix path to the binary
33426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33427    # Keep paths in /bin as-is, but remove trailing .exe if any
33428    new_path="${new_path/%.exe/}"
33429    # Do not save /bin paths to all_fixpath_prefixes!
33430  else
33431    # Not in mixed or Windows style, start by that.
33432    new_path=`cmd //c echo $new_path`
33433
33434  input_path="$new_path"
33435  # Check if we need to convert this using DOS-style short mode. If the path
33436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33437  # take no chances and rewrite it.
33438  # Note: m4 eats our [], so we need to use [ and ] instead.
33439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33440  if test "x$has_forbidden_chars" != x; then
33441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33443  fi
33444
33445    # Output is in $new_path
33446
33447  windows_path="$new_path"
33448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33449    unix_path=`$CYGPATH -u "$windows_path"`
33450    new_path="$unix_path"
33451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33453    new_path="$unix_path"
33454  fi
33455
33456    # remove trailing .exe if any
33457    new_path="${new_path/%.exe/}"
33458
33459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33461  fi
33462
33463    else
33464      # We're on a unix platform. Hooray! :)
33465      # First separate the path from the arguments. This will split at the first
33466      # space.
33467      complete="$CC"
33468      path="${complete%% *}"
33469      tmp="$complete EOL"
33470      arguments="${tmp#* }"
33471
33472      # Cannot rely on the command "which" here since it doesn't always work.
33473      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33474      if test -z "$is_absolute_path"; then
33475        # Path to executable is not absolute. Find it.
33476        IFS_save="$IFS"
33477        IFS=:
33478        for p in $PATH; do
33479          if test -f "$p/$path" && test -x "$p/$path"; then
33480            new_path="$p/$path"
33481            break
33482          fi
33483        done
33484        IFS="$IFS_save"
33485      else
33486        # This is an absolute path, we can use it without further modifications.
33487        new_path="$path"
33488      fi
33489
33490      if test "x$new_path" = x; then
33491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33492$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33493        has_space=`$ECHO "$complete" | $GREP " "`
33494        if test "x$has_space" != x; then
33495          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33496$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33497        fi
33498        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33499      fi
33500    fi
33501
33502    # Now join together the path and the arguments once again
33503    if test "x$arguments" != xEOL; then
33504      new_complete="$new_path ${arguments% *}"
33505    else
33506      new_complete="$new_path"
33507    fi
33508
33509    if test "x$complete" != "x$new_complete"; then
33510      CC="$new_complete"
33511      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33512$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33513    fi
33514  fi
33515
33516  TEST_COMPILER="$CC"
33517
33518  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33519$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33520  SYMLINK_ORIGINAL="$TEST_COMPILER"
33521
33522  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33523    # Follow a chain of symbolic links. Use readlink
33524    # where it exists, else fall back to horribly
33525    # complicated shell code.
33526    if test "x$READLINK_TESTED" != yes; then
33527      # On MacOSX there is a readlink tool with a different
33528      # purpose than the GNU readlink tool. Check the found readlink.
33529      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33530      if test "x$ISGNU" = x; then
33531        # A readlink that we do not know how to use.
33532        # Are there other non-GNU readlinks out there?
33533        READLINK_TESTED=yes
33534        READLINK=
33535      fi
33536    fi
33537
33538    if test "x$READLINK" != x; then
33539      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33540    else
33541      # Save the current directory for restoring afterwards
33542      STARTDIR=$PWD
33543      COUNTER=0
33544      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33545      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33546      cd $sym_link_dir
33547      # Use -P flag to resolve symlinks in directories.
33548      cd `$THEPWDCMD -P`
33549      sym_link_dir=`$THEPWDCMD -P`
33550      # Resolve file symlinks
33551      while test $COUNTER -lt 20; do
33552        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33553        if test "x$ISLINK" == x; then
33554          # This is not a symbolic link! We are done!
33555          break
33556        fi
33557        # Again resolve directory symlinks since the target of the just found
33558        # link could be in a different directory
33559        cd `$DIRNAME $ISLINK`
33560        sym_link_dir=`$THEPWDCMD -P`
33561        sym_link_file=`$BASENAME $ISLINK`
33562        let COUNTER=COUNTER+1
33563      done
33564      cd $STARTDIR
33565      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33566    fi
33567  fi
33568
33569  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33570    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33571$as_echo "no symlink" >&6; }
33572  else
33573    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33574$as_echo "$SYMLINK_ORIGINAL" >&6; }
33575
33576    # We can't handle ccache by gcc wrappers, since we need to know if we're
33577    # using ccache. Instead ccache usage must be controlled by a configure option.
33578    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33579    if test "x$COMPILER_BASENAME" = "xccache"; then
33580      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33581$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33582      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33583    fi
33584  fi
33585
33586
33587  COMPILER=$CC
33588  COMPILER_NAME=$COMPILER_NAME
33589
33590  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33591    # cc -V output typically looks like
33592    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33593    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33594    # Check that this is likely to be the Solaris Studio cc.
33595    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33596    if test $? -ne 0; then
33597      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33598      { $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
33599$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33600      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33601$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33602      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33603$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33604      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33605    fi
33606    # Remove usage instructions (if present), and
33607    # collapse compiler output into a single line
33608    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33609        $SED -e 's/ *[Uu]sage:.*//'`
33610    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33611        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33612  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33613    # xlc -qversion output typically looks like
33614    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33615    #     Version: 11.01.0000.0015
33616    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33617    # Check that this is likely to be the IBM XL C compiler.
33618    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33619    if test $? -ne 0; then
33620      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33621      { $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
33622$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33623      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33624$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33625      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33626$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33627      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33628    fi
33629    # Collapse compiler output into a single line
33630    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33631    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33632        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33633  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33634    # There is no specific version flag, but all output starts with a version string.
33635    # First line typically looks something like:
33636    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33637    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33638    # Check that this is likely to be Microsoft CL.EXE.
33639    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33640    if test $? -ne 0; then
33641      { $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
33642$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33643      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33644$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33645      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33646    fi
33647    # Collapse compiler output into a single line
33648    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33649    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33650        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33651  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33652    # gcc --version output typically looks like
33653    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33654    #     Copyright (C) 2013 Free Software Foundation, Inc.
33655    #     This is free software; see the source for copying conditions.  There is NO
33656    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33657    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33658    # Check that this is likely to be GCC.
33659    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33660    if test $? -ne 0; then
33661      { $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
33662$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33663      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33664$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33665      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33666    fi
33667    # Remove Copyright and legalese from version string, and
33668    # collapse into a single line
33669    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33670        $SED -e 's/ *Copyright .*//'`
33671    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33672        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33673  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33674    # clang --version output typically looks like
33675    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33676    #    clang version 3.3 (tags/RELEASE_33/final)
33677    # or
33678    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33679    #    Target: x86_64-pc-linux-gnu
33680    #    Thread model: posix
33681    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33682    # Check that this is likely to be clang
33683    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33684    if test $? -ne 0; then
33685      { $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
33686$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33687      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33688$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33689      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33690    fi
33691    # Collapse compiler output into a single line
33692    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33693    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33694        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33695  else
33696      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33697  fi
33698  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33699  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33700  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33701  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33702
33703  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33704$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33705
33706
33707  # Now that we have resolved CC ourself, let autoconf have its go at it
33708  ac_ext=c
33709ac_cpp='$CPP $CPPFLAGS'
33710ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33711ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33712ac_compiler_gnu=$ac_cv_c_compiler_gnu
33713if test -n "$ac_tool_prefix"; then
33714  for ac_prog in $CC
33715  do
33716    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33717set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33719$as_echo_n "checking for $ac_word... " >&6; }
33720if ${ac_cv_prog_CC+:} false; then :
33721  $as_echo_n "(cached) " >&6
33722else
33723  if test -n "$CC"; then
33724  ac_cv_prog_CC="$CC" # Let the user override the test.
33725else
33726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33727for as_dir in $PATH
33728do
33729  IFS=$as_save_IFS
33730  test -z "$as_dir" && as_dir=.
33731    for ac_exec_ext in '' $ac_executable_extensions; do
33732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33733    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33735    break 2
33736  fi
33737done
33738  done
33739IFS=$as_save_IFS
33740
33741fi
33742fi
33743CC=$ac_cv_prog_CC
33744if test -n "$CC"; then
33745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33746$as_echo "$CC" >&6; }
33747else
33748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33749$as_echo "no" >&6; }
33750fi
33751
33752
33753    test -n "$CC" && break
33754  done
33755fi
33756if test -z "$CC"; then
33757  ac_ct_CC=$CC
33758  for ac_prog in $CC
33759do
33760  # Extract the first word of "$ac_prog", so it can be a program name with args.
33761set dummy $ac_prog; ac_word=$2
33762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33763$as_echo_n "checking for $ac_word... " >&6; }
33764if ${ac_cv_prog_ac_ct_CC+:} false; then :
33765  $as_echo_n "(cached) " >&6
33766else
33767  if test -n "$ac_ct_CC"; then
33768  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33769else
33770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33771for as_dir in $PATH
33772do
33773  IFS=$as_save_IFS
33774  test -z "$as_dir" && as_dir=.
33775    for ac_exec_ext in '' $ac_executable_extensions; do
33776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33777    ac_cv_prog_ac_ct_CC="$ac_prog"
33778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33779    break 2
33780  fi
33781done
33782  done
33783IFS=$as_save_IFS
33784
33785fi
33786fi
33787ac_ct_CC=$ac_cv_prog_ac_ct_CC
33788if test -n "$ac_ct_CC"; then
33789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33790$as_echo "$ac_ct_CC" >&6; }
33791else
33792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33793$as_echo "no" >&6; }
33794fi
33795
33796
33797  test -n "$ac_ct_CC" && break
33798done
33799
33800  if test "x$ac_ct_CC" = x; then
33801    CC=""
33802  else
33803    case $cross_compiling:$ac_tool_warned in
33804yes:)
33805{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33806$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33807ac_tool_warned=yes ;;
33808esac
33809    CC=$ac_ct_CC
33810  fi
33811fi
33812
33813
33814test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33815$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33816as_fn_error $? "no acceptable C compiler found in \$PATH
33817See \`config.log' for more details" "$LINENO" 5; }
33818
33819# Provide some information about the compiler.
33820$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33821set X $ac_compile
33822ac_compiler=$2
33823for ac_option in --version -v -V -qversion; do
33824  { { ac_try="$ac_compiler $ac_option >&5"
33825case "(($ac_try" in
33826  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33827  *) ac_try_echo=$ac_try;;
33828esac
33829eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33830$as_echo "$ac_try_echo"; } >&5
33831  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33832  ac_status=$?
33833  if test -s conftest.err; then
33834    sed '10a\
33835... rest of stderr output deleted ...
33836         10q' conftest.err >conftest.er1
33837    cat conftest.er1 >&5
33838  fi
33839  rm -f conftest.er1 conftest.err
33840  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33841  test $ac_status = 0; }
33842done
33843
33844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33845/* end confdefs.h.  */
33846
33847int
33848main ()
33849{
33850
33851  ;
33852  return 0;
33853}
33854_ACEOF
33855ac_clean_files_save=$ac_clean_files
33856ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33857# Try to create an executable without -o first, disregard a.out.
33858# It will help us diagnose broken compilers, and finding out an intuition
33859# of exeext.
33860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33861$as_echo_n "checking whether the C compiler works... " >&6; }
33862ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33863
33864# The possible output files:
33865ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33866
33867ac_rmfiles=
33868for ac_file in $ac_files
33869do
33870  case $ac_file in
33871    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33872    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33873  esac
33874done
33875rm -f $ac_rmfiles
33876
33877if { { ac_try="$ac_link_default"
33878case "(($ac_try" in
33879  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33880  *) ac_try_echo=$ac_try;;
33881esac
33882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33883$as_echo "$ac_try_echo"; } >&5
33884  (eval "$ac_link_default") 2>&5
33885  ac_status=$?
33886  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33887  test $ac_status = 0; }; then :
33888  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33889# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33890# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33891# so that the user can short-circuit this test for compilers unknown to
33892# Autoconf.
33893for ac_file in $ac_files ''
33894do
33895  test -f "$ac_file" || continue
33896  case $ac_file in
33897    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33898	;;
33899    [ab].out )
33900	# We found the default executable, but exeext='' is most
33901	# certainly right.
33902	break;;
33903    *.* )
33904	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33905	then :; else
33906	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33907	fi
33908	# We set ac_cv_exeext here because the later test for it is not
33909	# safe: cross compilers may not add the suffix if given an `-o'
33910	# argument, so we may need to know it at that point already.
33911	# Even if this section looks crufty: it has the advantage of
33912	# actually working.
33913	break;;
33914    * )
33915	break;;
33916  esac
33917done
33918test "$ac_cv_exeext" = no && ac_cv_exeext=
33919
33920else
33921  ac_file=''
33922fi
33923if test -z "$ac_file"; then :
33924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33925$as_echo "no" >&6; }
33926$as_echo "$as_me: failed program was:" >&5
33927sed 's/^/| /' conftest.$ac_ext >&5
33928
33929{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33930$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33931as_fn_error 77 "C compiler cannot create executables
33932See \`config.log' for more details" "$LINENO" 5; }
33933else
33934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33935$as_echo "yes" >&6; }
33936fi
33937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33938$as_echo_n "checking for C compiler default output file name... " >&6; }
33939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33940$as_echo "$ac_file" >&6; }
33941ac_exeext=$ac_cv_exeext
33942
33943rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33944ac_clean_files=$ac_clean_files_save
33945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33946$as_echo_n "checking for suffix of executables... " >&6; }
33947if { { ac_try="$ac_link"
33948case "(($ac_try" in
33949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33950  *) ac_try_echo=$ac_try;;
33951esac
33952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33953$as_echo "$ac_try_echo"; } >&5
33954  (eval "$ac_link") 2>&5
33955  ac_status=$?
33956  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33957  test $ac_status = 0; }; then :
33958  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33959# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33960# work properly (i.e., refer to `conftest.exe'), while it won't with
33961# `rm'.
33962for ac_file in conftest.exe conftest conftest.*; do
33963  test -f "$ac_file" || continue
33964  case $ac_file in
33965    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33966    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33967	  break;;
33968    * ) break;;
33969  esac
33970done
33971else
33972  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33974as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33975See \`config.log' for more details" "$LINENO" 5; }
33976fi
33977rm -f conftest conftest$ac_cv_exeext
33978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33979$as_echo "$ac_cv_exeext" >&6; }
33980
33981rm -f conftest.$ac_ext
33982EXEEXT=$ac_cv_exeext
33983ac_exeext=$EXEEXT
33984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33985/* end confdefs.h.  */
33986#include <stdio.h>
33987int
33988main ()
33989{
33990FILE *f = fopen ("conftest.out", "w");
33991 return ferror (f) || fclose (f) != 0;
33992
33993  ;
33994  return 0;
33995}
33996_ACEOF
33997ac_clean_files="$ac_clean_files conftest.out"
33998# Check that the compiler produces executables we can run.  If not, either
33999# the compiler is broken, or we cross compile.
34000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34001$as_echo_n "checking whether we are cross compiling... " >&6; }
34002if test "$cross_compiling" != yes; then
34003  { { ac_try="$ac_link"
34004case "(($ac_try" in
34005  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34006  *) ac_try_echo=$ac_try;;
34007esac
34008eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34009$as_echo "$ac_try_echo"; } >&5
34010  (eval "$ac_link") 2>&5
34011  ac_status=$?
34012  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34013  test $ac_status = 0; }
34014  if { ac_try='./conftest$ac_cv_exeext'
34015  { { case "(($ac_try" in
34016  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34017  *) ac_try_echo=$ac_try;;
34018esac
34019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34020$as_echo "$ac_try_echo"; } >&5
34021  (eval "$ac_try") 2>&5
34022  ac_status=$?
34023  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34024  test $ac_status = 0; }; }; then
34025    cross_compiling=no
34026  else
34027    if test "$cross_compiling" = maybe; then
34028	cross_compiling=yes
34029    else
34030	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34032as_fn_error $? "cannot run C compiled programs.
34033If you meant to cross compile, use \`--host'.
34034See \`config.log' for more details" "$LINENO" 5; }
34035    fi
34036  fi
34037fi
34038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34039$as_echo "$cross_compiling" >&6; }
34040
34041rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34042ac_clean_files=$ac_clean_files_save
34043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34044$as_echo_n "checking for suffix of object files... " >&6; }
34045if ${ac_cv_objext+:} false; then :
34046  $as_echo_n "(cached) " >&6
34047else
34048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34049/* end confdefs.h.  */
34050
34051int
34052main ()
34053{
34054
34055  ;
34056  return 0;
34057}
34058_ACEOF
34059rm -f conftest.o conftest.obj
34060if { { ac_try="$ac_compile"
34061case "(($ac_try" in
34062  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34063  *) ac_try_echo=$ac_try;;
34064esac
34065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34066$as_echo "$ac_try_echo"; } >&5
34067  (eval "$ac_compile") 2>&5
34068  ac_status=$?
34069  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34070  test $ac_status = 0; }; then :
34071  for ac_file in conftest.o conftest.obj conftest.*; do
34072  test -f "$ac_file" || continue;
34073  case $ac_file in
34074    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34075    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34076       break;;
34077  esac
34078done
34079else
34080  $as_echo "$as_me: failed program was:" >&5
34081sed 's/^/| /' conftest.$ac_ext >&5
34082
34083{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34085as_fn_error $? "cannot compute suffix of object files: cannot compile
34086See \`config.log' for more details" "$LINENO" 5; }
34087fi
34088rm -f conftest.$ac_cv_objext conftest.$ac_ext
34089fi
34090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34091$as_echo "$ac_cv_objext" >&6; }
34092OBJEXT=$ac_cv_objext
34093ac_objext=$OBJEXT
34094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34095$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34096if ${ac_cv_c_compiler_gnu+:} false; then :
34097  $as_echo_n "(cached) " >&6
34098else
34099  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34100/* end confdefs.h.  */
34101
34102int
34103main ()
34104{
34105#ifndef __GNUC__
34106       choke me
34107#endif
34108
34109  ;
34110  return 0;
34111}
34112_ACEOF
34113if ac_fn_c_try_compile "$LINENO"; then :
34114  ac_compiler_gnu=yes
34115else
34116  ac_compiler_gnu=no
34117fi
34118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34119ac_cv_c_compiler_gnu=$ac_compiler_gnu
34120
34121fi
34122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34123$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34124if test $ac_compiler_gnu = yes; then
34125  GCC=yes
34126else
34127  GCC=
34128fi
34129ac_test_CFLAGS=${CFLAGS+set}
34130ac_save_CFLAGS=$CFLAGS
34131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34132$as_echo_n "checking whether $CC accepts -g... " >&6; }
34133if ${ac_cv_prog_cc_g+:} false; then :
34134  $as_echo_n "(cached) " >&6
34135else
34136  ac_save_c_werror_flag=$ac_c_werror_flag
34137   ac_c_werror_flag=yes
34138   ac_cv_prog_cc_g=no
34139   CFLAGS="-g"
34140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34141/* end confdefs.h.  */
34142
34143int
34144main ()
34145{
34146
34147  ;
34148  return 0;
34149}
34150_ACEOF
34151if ac_fn_c_try_compile "$LINENO"; then :
34152  ac_cv_prog_cc_g=yes
34153else
34154  CFLAGS=""
34155      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34156/* end confdefs.h.  */
34157
34158int
34159main ()
34160{
34161
34162  ;
34163  return 0;
34164}
34165_ACEOF
34166if ac_fn_c_try_compile "$LINENO"; then :
34167
34168else
34169  ac_c_werror_flag=$ac_save_c_werror_flag
34170	 CFLAGS="-g"
34171	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34172/* end confdefs.h.  */
34173
34174int
34175main ()
34176{
34177
34178  ;
34179  return 0;
34180}
34181_ACEOF
34182if ac_fn_c_try_compile "$LINENO"; then :
34183  ac_cv_prog_cc_g=yes
34184fi
34185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34186fi
34187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34188fi
34189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34190   ac_c_werror_flag=$ac_save_c_werror_flag
34191fi
34192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34193$as_echo "$ac_cv_prog_cc_g" >&6; }
34194if test "$ac_test_CFLAGS" = set; then
34195  CFLAGS=$ac_save_CFLAGS
34196elif test $ac_cv_prog_cc_g = yes; then
34197  if test "$GCC" = yes; then
34198    CFLAGS="-g -O2"
34199  else
34200    CFLAGS="-g"
34201  fi
34202else
34203  if test "$GCC" = yes; then
34204    CFLAGS="-O2"
34205  else
34206    CFLAGS=
34207  fi
34208fi
34209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34210$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34211if ${ac_cv_prog_cc_c89+:} false; then :
34212  $as_echo_n "(cached) " >&6
34213else
34214  ac_cv_prog_cc_c89=no
34215ac_save_CC=$CC
34216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34217/* end confdefs.h.  */
34218#include <stdarg.h>
34219#include <stdio.h>
34220struct stat;
34221/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34222struct buf { int x; };
34223FILE * (*rcsopen) (struct buf *, struct stat *, int);
34224static char *e (p, i)
34225     char **p;
34226     int i;
34227{
34228  return p[i];
34229}
34230static char *f (char * (*g) (char **, int), char **p, ...)
34231{
34232  char *s;
34233  va_list v;
34234  va_start (v,p);
34235  s = g (p, va_arg (v,int));
34236  va_end (v);
34237  return s;
34238}
34239
34240/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34241   function prototypes and stuff, but not '\xHH' hex character constants.
34242   These don't provoke an error unfortunately, instead are silently treated
34243   as 'x'.  The following induces an error, until -std is added to get
34244   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34245   array size at least.  It's necessary to write '\x00'==0 to get something
34246   that's true only with -std.  */
34247int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34248
34249/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34250   inside strings and character constants.  */
34251#define FOO(x) 'x'
34252int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34253
34254int test (int i, double x);
34255struct s1 {int (*f) (int a);};
34256struct s2 {int (*f) (double a);};
34257int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34258int argc;
34259char **argv;
34260int
34261main ()
34262{
34263return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34264  ;
34265  return 0;
34266}
34267_ACEOF
34268for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34269	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34270do
34271  CC="$ac_save_CC $ac_arg"
34272  if ac_fn_c_try_compile "$LINENO"; then :
34273  ac_cv_prog_cc_c89=$ac_arg
34274fi
34275rm -f core conftest.err conftest.$ac_objext
34276  test "x$ac_cv_prog_cc_c89" != "xno" && break
34277done
34278rm -f conftest.$ac_ext
34279CC=$ac_save_CC
34280
34281fi
34282# AC_CACHE_VAL
34283case "x$ac_cv_prog_cc_c89" in
34284  x)
34285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34286$as_echo "none needed" >&6; } ;;
34287  xno)
34288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34289$as_echo "unsupported" >&6; } ;;
34290  *)
34291    CC="$CC $ac_cv_prog_cc_c89"
34292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34293$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34294esac
34295if test "x$ac_cv_prog_cc_c89" != xno; then :
34296
34297fi
34298
34299ac_ext=cpp
34300ac_cpp='$CXXCPP $CPPFLAGS'
34301ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34302ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34303ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34304
34305
34306
34307  COMPILER_NAME=C++
34308  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34309
34310  if test "x$CXX" != x; then
34311    # User has supplied compiler name already, always let that override.
34312    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34313$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34314    if test "x`basename $CXX`" = "x$CXX"; then
34315      # A command without a complete path is provided, search $PATH.
34316
34317      for ac_prog in $CXX
34318do
34319  # Extract the first word of "$ac_prog", so it can be a program name with args.
34320set dummy $ac_prog; ac_word=$2
34321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34322$as_echo_n "checking for $ac_word... " >&6; }
34323if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34324  $as_echo_n "(cached) " >&6
34325else
34326  case $POTENTIAL_CXX in
34327  [\\/]* | ?:[\\/]*)
34328  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34329  ;;
34330  *)
34331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34332for as_dir in $PATH
34333do
34334  IFS=$as_save_IFS
34335  test -z "$as_dir" && as_dir=.
34336    for ac_exec_ext in '' $ac_executable_extensions; do
34337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34338    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34340    break 2
34341  fi
34342done
34343  done
34344IFS=$as_save_IFS
34345
34346  ;;
34347esac
34348fi
34349POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34350if test -n "$POTENTIAL_CXX"; then
34351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34352$as_echo "$POTENTIAL_CXX" >&6; }
34353else
34354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34355$as_echo "no" >&6; }
34356fi
34357
34358
34359  test -n "$POTENTIAL_CXX" && break
34360done
34361
34362      if test "x$POTENTIAL_CXX" != x; then
34363        CXX=$POTENTIAL_CXX
34364      else
34365        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34366      fi
34367    else
34368      # Otherwise it might already be a complete path
34369      if test ! -x "$CXX"; then
34370        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34371      fi
34372    fi
34373  else
34374    # No user supplied value. Locate compiler ourselves.
34375
34376    # If we are cross compiling, assume cross compilation tools follows the
34377    # cross compilation standard where they are prefixed with the autoconf
34378    # standard name for the target. For example the binary
34379    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34380    # If we are not cross compiling, then the default compiler name will be
34381    # used.
34382
34383    CXX=
34384    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34385    # before checking the rest of the PATH.
34386    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34387    # step, this should not be necessary.
34388    if test -n "$TOOLCHAIN_PATH"; then
34389      PATH_save="$PATH"
34390      PATH="$TOOLCHAIN_PATH"
34391      for ac_prog in $SEARCH_LIST
34392do
34393  # Extract the first word of "$ac_prog", so it can be a program name with args.
34394set dummy $ac_prog; ac_word=$2
34395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34396$as_echo_n "checking for $ac_word... " >&6; }
34397if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34398  $as_echo_n "(cached) " >&6
34399else
34400  case $TOOLCHAIN_PATH_CXX in
34401  [\\/]* | ?:[\\/]*)
34402  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34403  ;;
34404  *)
34405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34406for as_dir in $PATH
34407do
34408  IFS=$as_save_IFS
34409  test -z "$as_dir" && as_dir=.
34410    for ac_exec_ext in '' $ac_executable_extensions; do
34411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34412    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34414    break 2
34415  fi
34416done
34417  done
34418IFS=$as_save_IFS
34419
34420  ;;
34421esac
34422fi
34423TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34424if test -n "$TOOLCHAIN_PATH_CXX"; then
34425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34426$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34427else
34428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34429$as_echo "no" >&6; }
34430fi
34431
34432
34433  test -n "$TOOLCHAIN_PATH_CXX" && break
34434done
34435
34436      CXX=$TOOLCHAIN_PATH_CXX
34437      PATH="$PATH_save"
34438    fi
34439
34440    # AC_PATH_PROGS can't be run multiple times with the same variable,
34441    # so create a new name for this run.
34442    if test "x$CXX" = x; then
34443      for ac_prog in $SEARCH_LIST
34444do
34445  # Extract the first word of "$ac_prog", so it can be a program name with args.
34446set dummy $ac_prog; ac_word=$2
34447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34448$as_echo_n "checking for $ac_word... " >&6; }
34449if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34450  $as_echo_n "(cached) " >&6
34451else
34452  case $POTENTIAL_CXX in
34453  [\\/]* | ?:[\\/]*)
34454  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34455  ;;
34456  *)
34457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34458for as_dir in $PATH
34459do
34460  IFS=$as_save_IFS
34461  test -z "$as_dir" && as_dir=.
34462    for ac_exec_ext in '' $ac_executable_extensions; do
34463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34464    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34466    break 2
34467  fi
34468done
34469  done
34470IFS=$as_save_IFS
34471
34472  ;;
34473esac
34474fi
34475POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34476if test -n "$POTENTIAL_CXX"; then
34477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34478$as_echo "$POTENTIAL_CXX" >&6; }
34479else
34480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34481$as_echo "no" >&6; }
34482fi
34483
34484
34485  test -n "$POTENTIAL_CXX" && break
34486done
34487
34488      CXX=$POTENTIAL_CXX
34489    fi
34490
34491    if test "x$CXX" = x; then
34492
34493  # Print a helpful message on how to acquire the necessary build dependency.
34494  # devkit is the help tag: freetype, cups, alsa etc
34495  MISSING_DEPENDENCY=devkit
34496
34497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34498    cygwin_help $MISSING_DEPENDENCY
34499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34500    msys_help $MISSING_DEPENDENCY
34501  else
34502    PKGHANDLER_COMMAND=
34503
34504    case $PKGHANDLER in
34505      apt-get)
34506        apt_help     $MISSING_DEPENDENCY ;;
34507      yum)
34508        yum_help     $MISSING_DEPENDENCY ;;
34509      port)
34510        port_help    $MISSING_DEPENDENCY ;;
34511      pkgutil)
34512        pkgutil_help $MISSING_DEPENDENCY ;;
34513      pkgadd)
34514        pkgadd_help  $MISSING_DEPENDENCY ;;
34515    esac
34516
34517    if test "x$PKGHANDLER_COMMAND" != x; then
34518      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34519    fi
34520  fi
34521
34522      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34523    fi
34524  fi
34525
34526  # Now we have a compiler binary in CXX. Make sure it's okay.
34527
34528  # Only process if variable expands to non-empty
34529
34530  if test "x$CXX" != x; then
34531    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34532
34533  # First separate the path from the arguments. This will split at the first
34534  # space.
34535  complete="$CXX"
34536  path="${complete%% *}"
34537  tmp="$complete EOL"
34538  arguments="${tmp#* }"
34539
34540  # Input might be given as Windows format, start by converting to
34541  # unix format.
34542  new_path=`$CYGPATH -u "$path"`
34543
34544  # Now try to locate executable using which
34545  new_path=`$WHICH "$new_path" 2> /dev/null`
34546  # bat and cmd files are not always considered executable in cygwin causing which
34547  # to not find them
34548  if test "x$new_path" = x \
34549      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34550      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34551    new_path=`$CYGPATH -u "$path"`
34552  fi
34553  if test "x$new_path" = x; then
34554    # Oops. Which didn't find the executable.
34555    # The splitting of arguments from the executable at a space might have been incorrect,
34556    # since paths with space are more likely in Windows. Give it another try with the whole
34557    # argument.
34558    path="$complete"
34559    arguments="EOL"
34560    new_path=`$CYGPATH -u "$path"`
34561    new_path=`$WHICH "$new_path" 2> /dev/null`
34562    # bat and cmd files are not always considered executable in cygwin causing which
34563    # to not find them
34564    if test "x$new_path" = x \
34565        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34566        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34567      new_path=`$CYGPATH -u "$path"`
34568    fi
34569    if test "x$new_path" = x; then
34570      # It's still not found. Now this is an unrecoverable error.
34571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34572$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34573      has_space=`$ECHO "$complete" | $GREP " "`
34574      if test "x$has_space" != x; then
34575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34577      fi
34578      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34579    fi
34580  fi
34581
34582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34585  # "foo.exe" is OK but "foo" is an error.
34586  #
34587  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34588  # It is also a way to make sure we got the proper file name for the real test later on.
34589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34590  if test "x$test_shortpath" = x; then
34591    # Short path failed, file does not exist as specified.
34592    # Try adding .exe or .cmd
34593    if test -f "${new_path}.exe"; then
34594      input_to_shortpath="${new_path}.exe"
34595    elif test -f "${new_path}.cmd"; then
34596      input_to_shortpath="${new_path}.cmd"
34597    else
34598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34599$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34600      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34601$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34602      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34603    fi
34604  else
34605    input_to_shortpath="$new_path"
34606  fi
34607
34608  # Call helper function which possibly converts this using DOS-style short mode.
34609  # If so, the updated path is stored in $new_path.
34610  new_path="$input_to_shortpath"
34611
34612  input_path="$input_to_shortpath"
34613  # Check if we need to convert this using DOS-style short mode. If the path
34614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34615  # take no chances and rewrite it.
34616  # Note: m4 eats our [], so we need to use [ and ] instead.
34617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34618  if test "x$has_forbidden_chars" != x; then
34619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34623      # Going to short mode and back again did indeed matter. Since short mode is
34624      # case insensitive, let's make it lowercase to improve readability.
34625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34626      # Now convert it back to Unix-style (cygpath)
34627      input_path=`$CYGPATH -u "$shortmode_path"`
34628      new_path="$input_path"
34629    fi
34630  fi
34631
34632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34633  if test "x$test_cygdrive_prefix" = x; then
34634    # As a simple fix, exclude /usr/bin since it's not a real path.
34635    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34637      # a path prefixed by /cygdrive for fixpath to work.
34638      new_path="$CYGWIN_ROOT_PATH$input_path"
34639    fi
34640  fi
34641
34642  # remove trailing .exe if any
34643  new_path="${new_path/%.exe/}"
34644
34645    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34646
34647  # First separate the path from the arguments. This will split at the first
34648  # space.
34649  complete="$CXX"
34650  path="${complete%% *}"
34651  tmp="$complete EOL"
34652  arguments="${tmp#* }"
34653
34654  # Input might be given as Windows format, start by converting to
34655  # unix format.
34656  new_path="$path"
34657
34658  windows_path="$new_path"
34659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34660    unix_path=`$CYGPATH -u "$windows_path"`
34661    new_path="$unix_path"
34662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34664    new_path="$unix_path"
34665  fi
34666
34667
34668  # Now try to locate executable using which
34669  new_path=`$WHICH "$new_path" 2> /dev/null`
34670
34671  if test "x$new_path" = x; then
34672    # Oops. Which didn't find the executable.
34673    # The splitting of arguments from the executable at a space might have been incorrect,
34674    # since paths with space are more likely in Windows. Give it another try with the whole
34675    # argument.
34676    path="$complete"
34677    arguments="EOL"
34678    new_path="$path"
34679
34680  windows_path="$new_path"
34681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34682    unix_path=`$CYGPATH -u "$windows_path"`
34683    new_path="$unix_path"
34684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34686    new_path="$unix_path"
34687  fi
34688
34689
34690    new_path=`$WHICH "$new_path" 2> /dev/null`
34691    # bat and cmd files are not always considered executable in MSYS causing which
34692    # to not find them
34693    if test "x$new_path" = x \
34694        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34695        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34696      new_path="$path"
34697
34698  windows_path="$new_path"
34699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34700    unix_path=`$CYGPATH -u "$windows_path"`
34701    new_path="$unix_path"
34702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34704    new_path="$unix_path"
34705  fi
34706
34707    fi
34708
34709    if test "x$new_path" = x; then
34710      # It's still not found. Now this is an unrecoverable error.
34711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34712$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34713      has_space=`$ECHO "$complete" | $GREP " "`
34714      if test "x$has_space" != x; then
34715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34717      fi
34718      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34719    fi
34720  fi
34721
34722  # Now new_path has a complete unix path to the binary
34723  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34724    # Keep paths in /bin as-is, but remove trailing .exe if any
34725    new_path="${new_path/%.exe/}"
34726    # Do not save /bin paths to all_fixpath_prefixes!
34727  else
34728    # Not in mixed or Windows style, start by that.
34729    new_path=`cmd //c echo $new_path`
34730
34731  input_path="$new_path"
34732  # Check if we need to convert this using DOS-style short mode. If the path
34733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34734  # take no chances and rewrite it.
34735  # Note: m4 eats our [], so we need to use [ and ] instead.
34736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34737  if test "x$has_forbidden_chars" != x; then
34738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34740  fi
34741
34742    # Output is in $new_path
34743
34744  windows_path="$new_path"
34745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34746    unix_path=`$CYGPATH -u "$windows_path"`
34747    new_path="$unix_path"
34748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34750    new_path="$unix_path"
34751  fi
34752
34753    # remove trailing .exe if any
34754    new_path="${new_path/%.exe/}"
34755
34756    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34757    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34758  fi
34759
34760    else
34761      # We're on a unix platform. Hooray! :)
34762      # First separate the path from the arguments. This will split at the first
34763      # space.
34764      complete="$CXX"
34765      path="${complete%% *}"
34766      tmp="$complete EOL"
34767      arguments="${tmp#* }"
34768
34769      # Cannot rely on the command "which" here since it doesn't always work.
34770      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34771      if test -z "$is_absolute_path"; then
34772        # Path to executable is not absolute. Find it.
34773        IFS_save="$IFS"
34774        IFS=:
34775        for p in $PATH; do
34776          if test -f "$p/$path" && test -x "$p/$path"; then
34777            new_path="$p/$path"
34778            break
34779          fi
34780        done
34781        IFS="$IFS_save"
34782      else
34783        # This is an absolute path, we can use it without further modifications.
34784        new_path="$path"
34785      fi
34786
34787      if test "x$new_path" = x; then
34788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34789$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34790        has_space=`$ECHO "$complete" | $GREP " "`
34791        if test "x$has_space" != x; then
34792          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34793$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34794        fi
34795        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34796      fi
34797    fi
34798
34799    # Now join together the path and the arguments once again
34800    if test "x$arguments" != xEOL; then
34801      new_complete="$new_path ${arguments% *}"
34802    else
34803      new_complete="$new_path"
34804    fi
34805
34806    if test "x$complete" != "x$new_complete"; then
34807      CXX="$new_complete"
34808      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34809$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34810    fi
34811  fi
34812
34813  TEST_COMPILER="$CXX"
34814
34815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34816$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34817  SYMLINK_ORIGINAL="$TEST_COMPILER"
34818
34819  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34820    # Follow a chain of symbolic links. Use readlink
34821    # where it exists, else fall back to horribly
34822    # complicated shell code.
34823    if test "x$READLINK_TESTED" != yes; then
34824      # On MacOSX there is a readlink tool with a different
34825      # purpose than the GNU readlink tool. Check the found readlink.
34826      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34827      if test "x$ISGNU" = x; then
34828        # A readlink that we do not know how to use.
34829        # Are there other non-GNU readlinks out there?
34830        READLINK_TESTED=yes
34831        READLINK=
34832      fi
34833    fi
34834
34835    if test "x$READLINK" != x; then
34836      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34837    else
34838      # Save the current directory for restoring afterwards
34839      STARTDIR=$PWD
34840      COUNTER=0
34841      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34842      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34843      cd $sym_link_dir
34844      # Use -P flag to resolve symlinks in directories.
34845      cd `$THEPWDCMD -P`
34846      sym_link_dir=`$THEPWDCMD -P`
34847      # Resolve file symlinks
34848      while test $COUNTER -lt 20; do
34849        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34850        if test "x$ISLINK" == x; then
34851          # This is not a symbolic link! We are done!
34852          break
34853        fi
34854        # Again resolve directory symlinks since the target of the just found
34855        # link could be in a different directory
34856        cd `$DIRNAME $ISLINK`
34857        sym_link_dir=`$THEPWDCMD -P`
34858        sym_link_file=`$BASENAME $ISLINK`
34859        let COUNTER=COUNTER+1
34860      done
34861      cd $STARTDIR
34862      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34863    fi
34864  fi
34865
34866  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34868$as_echo "no symlink" >&6; }
34869  else
34870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34871$as_echo "$SYMLINK_ORIGINAL" >&6; }
34872
34873    # We can't handle ccache by gcc wrappers, since we need to know if we're
34874    # using ccache. Instead ccache usage must be controlled by a configure option.
34875    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34876    if test "x$COMPILER_BASENAME" = "xccache"; then
34877      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34878$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34879      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34880    fi
34881  fi
34882
34883
34884  COMPILER=$CXX
34885  COMPILER_NAME=$COMPILER_NAME
34886
34887  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34888    # cc -V output typically looks like
34889    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34890    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34891    # Check that this is likely to be the Solaris Studio cc.
34892    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34893    if test $? -ne 0; then
34894      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34895      { $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
34896$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34897      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34898$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34899      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34900$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34901      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34902    fi
34903    # Remove usage instructions (if present), and
34904    # collapse compiler output into a single line
34905    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34906        $SED -e 's/ *[Uu]sage:.*//'`
34907    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34908        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34909  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34910    # xlc -qversion output typically looks like
34911    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34912    #     Version: 11.01.0000.0015
34913    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34914    # Check that this is likely to be the IBM XL C compiler.
34915    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34916    if test $? -ne 0; then
34917      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34918      { $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
34919$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34920      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34921$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34922      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34923$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34924      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34925    fi
34926    # Collapse compiler output into a single line
34927    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34928    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34929        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34930  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34931    # There is no specific version flag, but all output starts with a version string.
34932    # First line typically looks something like:
34933    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34934    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34935    # Check that this is likely to be Microsoft CL.EXE.
34936    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34937    if test $? -ne 0; then
34938      { $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
34939$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34940      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34941$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34942      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34943    fi
34944    # Collapse compiler output into a single line
34945    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34946    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34947        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34948  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34949    # gcc --version output typically looks like
34950    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34951    #     Copyright (C) 2013 Free Software Foundation, Inc.
34952    #     This is free software; see the source for copying conditions.  There is NO
34953    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34954    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34955    # Check that this is likely to be GCC.
34956    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34957    if test $? -ne 0; then
34958      { $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
34959$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34960      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34961$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34962      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34963    fi
34964    # Remove Copyright and legalese from version string, and
34965    # collapse into a single line
34966    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34967        $SED -e 's/ *Copyright .*//'`
34968    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34969        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34970  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34971    # clang --version output typically looks like
34972    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34973    #    clang version 3.3 (tags/RELEASE_33/final)
34974    # or
34975    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34976    #    Target: x86_64-pc-linux-gnu
34977    #    Thread model: posix
34978    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34979    # Check that this is likely to be clang
34980    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34981    if test $? -ne 0; then
34982      { $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
34983$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34984      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34985$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34986      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34987    fi
34988    # Collapse compiler output into a single line
34989    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34990    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34991        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34992  else
34993      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34994  fi
34995  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34996  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34997  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34998  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34999
35000  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35001$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35002
35003
35004  # Now that we have resolved CXX ourself, let autoconf have its go at it
35005  ac_ext=cpp
35006ac_cpp='$CXXCPP $CPPFLAGS'
35007ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35008ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35009ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35010if test -z "$CXX"; then
35011  if test -n "$CCC"; then
35012    CXX=$CCC
35013  else
35014    if test -n "$ac_tool_prefix"; then
35015  for ac_prog in $CXX
35016  do
35017    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35018set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35020$as_echo_n "checking for $ac_word... " >&6; }
35021if ${ac_cv_prog_CXX+:} false; then :
35022  $as_echo_n "(cached) " >&6
35023else
35024  if test -n "$CXX"; then
35025  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35026else
35027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35028for as_dir in $PATH
35029do
35030  IFS=$as_save_IFS
35031  test -z "$as_dir" && as_dir=.
35032    for ac_exec_ext in '' $ac_executable_extensions; do
35033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35034    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35036    break 2
35037  fi
35038done
35039  done
35040IFS=$as_save_IFS
35041
35042fi
35043fi
35044CXX=$ac_cv_prog_CXX
35045if test -n "$CXX"; then
35046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35047$as_echo "$CXX" >&6; }
35048else
35049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35050$as_echo "no" >&6; }
35051fi
35052
35053
35054    test -n "$CXX" && break
35055  done
35056fi
35057if test -z "$CXX"; then
35058  ac_ct_CXX=$CXX
35059  for ac_prog in $CXX
35060do
35061  # Extract the first word of "$ac_prog", so it can be a program name with args.
35062set dummy $ac_prog; ac_word=$2
35063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35064$as_echo_n "checking for $ac_word... " >&6; }
35065if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35066  $as_echo_n "(cached) " >&6
35067else
35068  if test -n "$ac_ct_CXX"; then
35069  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35070else
35071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35072for as_dir in $PATH
35073do
35074  IFS=$as_save_IFS
35075  test -z "$as_dir" && as_dir=.
35076    for ac_exec_ext in '' $ac_executable_extensions; do
35077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35078    ac_cv_prog_ac_ct_CXX="$ac_prog"
35079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35080    break 2
35081  fi
35082done
35083  done
35084IFS=$as_save_IFS
35085
35086fi
35087fi
35088ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35089if test -n "$ac_ct_CXX"; then
35090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35091$as_echo "$ac_ct_CXX" >&6; }
35092else
35093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35094$as_echo "no" >&6; }
35095fi
35096
35097
35098  test -n "$ac_ct_CXX" && break
35099done
35100
35101  if test "x$ac_ct_CXX" = x; then
35102    CXX="g++"
35103  else
35104    case $cross_compiling:$ac_tool_warned in
35105yes:)
35106{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35107$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35108ac_tool_warned=yes ;;
35109esac
35110    CXX=$ac_ct_CXX
35111  fi
35112fi
35113
35114  fi
35115fi
35116# Provide some information about the compiler.
35117$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35118set X $ac_compile
35119ac_compiler=$2
35120for ac_option in --version -v -V -qversion; do
35121  { { ac_try="$ac_compiler $ac_option >&5"
35122case "(($ac_try" in
35123  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35124  *) ac_try_echo=$ac_try;;
35125esac
35126eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35127$as_echo "$ac_try_echo"; } >&5
35128  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35129  ac_status=$?
35130  if test -s conftest.err; then
35131    sed '10a\
35132... rest of stderr output deleted ...
35133         10q' conftest.err >conftest.er1
35134    cat conftest.er1 >&5
35135  fi
35136  rm -f conftest.er1 conftest.err
35137  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35138  test $ac_status = 0; }
35139done
35140
35141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35142$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35143if ${ac_cv_cxx_compiler_gnu+:} false; then :
35144  $as_echo_n "(cached) " >&6
35145else
35146  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35147/* end confdefs.h.  */
35148
35149int
35150main ()
35151{
35152#ifndef __GNUC__
35153       choke me
35154#endif
35155
35156  ;
35157  return 0;
35158}
35159_ACEOF
35160if ac_fn_cxx_try_compile "$LINENO"; then :
35161  ac_compiler_gnu=yes
35162else
35163  ac_compiler_gnu=no
35164fi
35165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35166ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35167
35168fi
35169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35170$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35171if test $ac_compiler_gnu = yes; then
35172  GXX=yes
35173else
35174  GXX=
35175fi
35176ac_test_CXXFLAGS=${CXXFLAGS+set}
35177ac_save_CXXFLAGS=$CXXFLAGS
35178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35179$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35180if ${ac_cv_prog_cxx_g+:} false; then :
35181  $as_echo_n "(cached) " >&6
35182else
35183  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35184   ac_cxx_werror_flag=yes
35185   ac_cv_prog_cxx_g=no
35186   CXXFLAGS="-g"
35187   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35188/* end confdefs.h.  */
35189
35190int
35191main ()
35192{
35193
35194  ;
35195  return 0;
35196}
35197_ACEOF
35198if ac_fn_cxx_try_compile "$LINENO"; then :
35199  ac_cv_prog_cxx_g=yes
35200else
35201  CXXFLAGS=""
35202      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35203/* end confdefs.h.  */
35204
35205int
35206main ()
35207{
35208
35209  ;
35210  return 0;
35211}
35212_ACEOF
35213if ac_fn_cxx_try_compile "$LINENO"; then :
35214
35215else
35216  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35217	 CXXFLAGS="-g"
35218	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35219/* end confdefs.h.  */
35220
35221int
35222main ()
35223{
35224
35225  ;
35226  return 0;
35227}
35228_ACEOF
35229if ac_fn_cxx_try_compile "$LINENO"; then :
35230  ac_cv_prog_cxx_g=yes
35231fi
35232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35233fi
35234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35235fi
35236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35237   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35238fi
35239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35240$as_echo "$ac_cv_prog_cxx_g" >&6; }
35241if test "$ac_test_CXXFLAGS" = set; then
35242  CXXFLAGS=$ac_save_CXXFLAGS
35243elif test $ac_cv_prog_cxx_g = yes; then
35244  if test "$GXX" = yes; then
35245    CXXFLAGS="-g -O2"
35246  else
35247    CXXFLAGS="-g"
35248  fi
35249else
35250  if test "$GXX" = yes; then
35251    CXXFLAGS="-O2"
35252  else
35253    CXXFLAGS=
35254  fi
35255fi
35256ac_ext=cpp
35257ac_cpp='$CXXCPP $CPPFLAGS'
35258ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35259ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35260ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35261
35262
35263  # This is the compiler version number on the form X.Y[.Z]
35264
35265
35266
35267
35268  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35269    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35270$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35271    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35272$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35273  fi
35274
35275  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35276  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35277    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35278$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35279  fi
35280
35281  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35282    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35283$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35284  fi
35285
35286  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35287
35288
35289  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338
35339    # Execute function body
35340
35341  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35342  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35343
35344  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35345    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35346  fi
35347
35348  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35349    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35350  fi
35351
35352  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35353  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35354
35355  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35356    :
35357
35358  else
35359    :
35360
35361          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
35362$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35363
35364
35365  fi
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379
35380  fi
35381
35382  #
35383  # Setup the preprocessor (CPP and CXXCPP)
35384  #
35385  ac_ext=c
35386ac_cpp='$CPP $CPPFLAGS'
35387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35389ac_compiler_gnu=$ac_cv_c_compiler_gnu
35390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35391$as_echo_n "checking how to run the C preprocessor... " >&6; }
35392# On Suns, sometimes $CPP names a directory.
35393if test -n "$CPP" && test -d "$CPP"; then
35394  CPP=
35395fi
35396if test -z "$CPP"; then
35397  if ${ac_cv_prog_CPP+:} false; then :
35398  $as_echo_n "(cached) " >&6
35399else
35400      # Double quotes because CPP needs to be expanded
35401    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35402    do
35403      ac_preproc_ok=false
35404for ac_c_preproc_warn_flag in '' yes
35405do
35406  # Use a header file that comes with gcc, so configuring glibc
35407  # with a fresh cross-compiler works.
35408  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35409  # <limits.h> exists even on freestanding compilers.
35410  # On the NeXT, cc -E runs the code through the compiler's parser,
35411  # not just through cpp. "Syntax error" is here to catch this case.
35412  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35413/* end confdefs.h.  */
35414#ifdef __STDC__
35415# include <limits.h>
35416#else
35417# include <assert.h>
35418#endif
35419		     Syntax error
35420_ACEOF
35421if ac_fn_c_try_cpp "$LINENO"; then :
35422
35423else
35424  # Broken: fails on valid input.
35425continue
35426fi
35427rm -f conftest.err conftest.i conftest.$ac_ext
35428
35429  # OK, works on sane cases.  Now check whether nonexistent headers
35430  # can be detected and how.
35431  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35432/* end confdefs.h.  */
35433#include <ac_nonexistent.h>
35434_ACEOF
35435if ac_fn_c_try_cpp "$LINENO"; then :
35436  # Broken: success on invalid input.
35437continue
35438else
35439  # Passes both tests.
35440ac_preproc_ok=:
35441break
35442fi
35443rm -f conftest.err conftest.i conftest.$ac_ext
35444
35445done
35446# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35447rm -f conftest.i conftest.err conftest.$ac_ext
35448if $ac_preproc_ok; then :
35449  break
35450fi
35451
35452    done
35453    ac_cv_prog_CPP=$CPP
35454
35455fi
35456  CPP=$ac_cv_prog_CPP
35457else
35458  ac_cv_prog_CPP=$CPP
35459fi
35460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35461$as_echo "$CPP" >&6; }
35462ac_preproc_ok=false
35463for ac_c_preproc_warn_flag in '' yes
35464do
35465  # Use a header file that comes with gcc, so configuring glibc
35466  # with a fresh cross-compiler works.
35467  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35468  # <limits.h> exists even on freestanding compilers.
35469  # On the NeXT, cc -E runs the code through the compiler's parser,
35470  # not just through cpp. "Syntax error" is here to catch this case.
35471  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35472/* end confdefs.h.  */
35473#ifdef __STDC__
35474# include <limits.h>
35475#else
35476# include <assert.h>
35477#endif
35478		     Syntax error
35479_ACEOF
35480if ac_fn_c_try_cpp "$LINENO"; then :
35481
35482else
35483  # Broken: fails on valid input.
35484continue
35485fi
35486rm -f conftest.err conftest.i conftest.$ac_ext
35487
35488  # OK, works on sane cases.  Now check whether nonexistent headers
35489  # can be detected and how.
35490  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35491/* end confdefs.h.  */
35492#include <ac_nonexistent.h>
35493_ACEOF
35494if ac_fn_c_try_cpp "$LINENO"; then :
35495  # Broken: success on invalid input.
35496continue
35497else
35498  # Passes both tests.
35499ac_preproc_ok=:
35500break
35501fi
35502rm -f conftest.err conftest.i conftest.$ac_ext
35503
35504done
35505# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35506rm -f conftest.i conftest.err conftest.$ac_ext
35507if $ac_preproc_ok; then :
35508
35509else
35510  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35511$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35512as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35513See \`config.log' for more details" "$LINENO" 5; }
35514fi
35515
35516ac_ext=cpp
35517ac_cpp='$CXXCPP $CPPFLAGS'
35518ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35519ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35520ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35521
35522
35523  # Only process if variable expands to non-empty
35524
35525  if test "x$CPP" != x; then
35526    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35527
35528  # First separate the path from the arguments. This will split at the first
35529  # space.
35530  complete="$CPP"
35531  path="${complete%% *}"
35532  tmp="$complete EOL"
35533  arguments="${tmp#* }"
35534
35535  # Input might be given as Windows format, start by converting to
35536  # unix format.
35537  new_path=`$CYGPATH -u "$path"`
35538
35539  # Now try to locate executable using which
35540  new_path=`$WHICH "$new_path" 2> /dev/null`
35541  # bat and cmd files are not always considered executable in cygwin causing which
35542  # to not find them
35543  if test "x$new_path" = x \
35544      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35545      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35546    new_path=`$CYGPATH -u "$path"`
35547  fi
35548  if test "x$new_path" = x; then
35549    # Oops. Which didn't find the executable.
35550    # The splitting of arguments from the executable at a space might have been incorrect,
35551    # since paths with space are more likely in Windows. Give it another try with the whole
35552    # argument.
35553    path="$complete"
35554    arguments="EOL"
35555    new_path=`$CYGPATH -u "$path"`
35556    new_path=`$WHICH "$new_path" 2> /dev/null`
35557    # bat and cmd files are not always considered executable in cygwin causing which
35558    # to not find them
35559    if test "x$new_path" = x \
35560        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35561        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35562      new_path=`$CYGPATH -u "$path"`
35563    fi
35564    if test "x$new_path" = x; then
35565      # It's still not found. Now this is an unrecoverable error.
35566      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35567$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35568      has_space=`$ECHO "$complete" | $GREP " "`
35569      if test "x$has_space" != x; then
35570        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35571$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35572      fi
35573      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35574    fi
35575  fi
35576
35577  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35578  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35579  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35580  # "foo.exe" is OK but "foo" is an error.
35581  #
35582  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35583  # It is also a way to make sure we got the proper file name for the real test later on.
35584  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35585  if test "x$test_shortpath" = x; then
35586    # Short path failed, file does not exist as specified.
35587    # Try adding .exe or .cmd
35588    if test -f "${new_path}.exe"; then
35589      input_to_shortpath="${new_path}.exe"
35590    elif test -f "${new_path}.cmd"; then
35591      input_to_shortpath="${new_path}.cmd"
35592    else
35593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35594$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35595      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35596$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35597      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35598    fi
35599  else
35600    input_to_shortpath="$new_path"
35601  fi
35602
35603  # Call helper function which possibly converts this using DOS-style short mode.
35604  # If so, the updated path is stored in $new_path.
35605  new_path="$input_to_shortpath"
35606
35607  input_path="$input_to_shortpath"
35608  # Check if we need to convert this using DOS-style short mode. If the path
35609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35610  # take no chances and rewrite it.
35611  # Note: m4 eats our [], so we need to use [ and ] instead.
35612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35613  if test "x$has_forbidden_chars" != x; then
35614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35618      # Going to short mode and back again did indeed matter. Since short mode is
35619      # case insensitive, let's make it lowercase to improve readability.
35620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35621      # Now convert it back to Unix-style (cygpath)
35622      input_path=`$CYGPATH -u "$shortmode_path"`
35623      new_path="$input_path"
35624    fi
35625  fi
35626
35627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35628  if test "x$test_cygdrive_prefix" = x; then
35629    # As a simple fix, exclude /usr/bin since it's not a real path.
35630    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35632      # a path prefixed by /cygdrive for fixpath to work.
35633      new_path="$CYGWIN_ROOT_PATH$input_path"
35634    fi
35635  fi
35636
35637  # remove trailing .exe if any
35638  new_path="${new_path/%.exe/}"
35639
35640    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35641
35642  # First separate the path from the arguments. This will split at the first
35643  # space.
35644  complete="$CPP"
35645  path="${complete%% *}"
35646  tmp="$complete EOL"
35647  arguments="${tmp#* }"
35648
35649  # Input might be given as Windows format, start by converting to
35650  # unix format.
35651  new_path="$path"
35652
35653  windows_path="$new_path"
35654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35655    unix_path=`$CYGPATH -u "$windows_path"`
35656    new_path="$unix_path"
35657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35659    new_path="$unix_path"
35660  fi
35661
35662
35663  # Now try to locate executable using which
35664  new_path=`$WHICH "$new_path" 2> /dev/null`
35665
35666  if test "x$new_path" = x; then
35667    # Oops. Which didn't find the executable.
35668    # The splitting of arguments from the executable at a space might have been incorrect,
35669    # since paths with space are more likely in Windows. Give it another try with the whole
35670    # argument.
35671    path="$complete"
35672    arguments="EOL"
35673    new_path="$path"
35674
35675  windows_path="$new_path"
35676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35677    unix_path=`$CYGPATH -u "$windows_path"`
35678    new_path="$unix_path"
35679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35681    new_path="$unix_path"
35682  fi
35683
35684
35685    new_path=`$WHICH "$new_path" 2> /dev/null`
35686    # bat and cmd files are not always considered executable in MSYS causing which
35687    # to not find them
35688    if test "x$new_path" = x \
35689        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35690        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35691      new_path="$path"
35692
35693  windows_path="$new_path"
35694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35695    unix_path=`$CYGPATH -u "$windows_path"`
35696    new_path="$unix_path"
35697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35699    new_path="$unix_path"
35700  fi
35701
35702    fi
35703
35704    if test "x$new_path" = x; then
35705      # It's still not found. Now this is an unrecoverable error.
35706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35707$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35708      has_space=`$ECHO "$complete" | $GREP " "`
35709      if test "x$has_space" != x; then
35710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35712      fi
35713      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35714    fi
35715  fi
35716
35717  # Now new_path has a complete unix path to the binary
35718  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35719    # Keep paths in /bin as-is, but remove trailing .exe if any
35720    new_path="${new_path/%.exe/}"
35721    # Do not save /bin paths to all_fixpath_prefixes!
35722  else
35723    # Not in mixed or Windows style, start by that.
35724    new_path=`cmd //c echo $new_path`
35725
35726  input_path="$new_path"
35727  # Check if we need to convert this using DOS-style short mode. If the path
35728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35729  # take no chances and rewrite it.
35730  # Note: m4 eats our [], so we need to use [ and ] instead.
35731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35732  if test "x$has_forbidden_chars" != x; then
35733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35735  fi
35736
35737    # Output is in $new_path
35738
35739  windows_path="$new_path"
35740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35741    unix_path=`$CYGPATH -u "$windows_path"`
35742    new_path="$unix_path"
35743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35745    new_path="$unix_path"
35746  fi
35747
35748    # remove trailing .exe if any
35749    new_path="${new_path/%.exe/}"
35750
35751    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35752    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35753  fi
35754
35755    else
35756      # We're on a unix platform. Hooray! :)
35757      # First separate the path from the arguments. This will split at the first
35758      # space.
35759      complete="$CPP"
35760      path="${complete%% *}"
35761      tmp="$complete EOL"
35762      arguments="${tmp#* }"
35763
35764      # Cannot rely on the command "which" here since it doesn't always work.
35765      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35766      if test -z "$is_absolute_path"; then
35767        # Path to executable is not absolute. Find it.
35768        IFS_save="$IFS"
35769        IFS=:
35770        for p in $PATH; do
35771          if test -f "$p/$path" && test -x "$p/$path"; then
35772            new_path="$p/$path"
35773            break
35774          fi
35775        done
35776        IFS="$IFS_save"
35777      else
35778        # This is an absolute path, we can use it without further modifications.
35779        new_path="$path"
35780      fi
35781
35782      if test "x$new_path" = x; then
35783        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35784$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35785        has_space=`$ECHO "$complete" | $GREP " "`
35786        if test "x$has_space" != x; then
35787          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35788$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35789        fi
35790        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35791      fi
35792    fi
35793
35794    # Now join together the path and the arguments once again
35795    if test "x$arguments" != xEOL; then
35796      new_complete="$new_path ${arguments% *}"
35797    else
35798      new_complete="$new_path"
35799    fi
35800
35801    if test "x$complete" != "x$new_complete"; then
35802      CPP="$new_complete"
35803      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35804$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35805    fi
35806  fi
35807
35808  ac_ext=cpp
35809ac_cpp='$CXXCPP $CPPFLAGS'
35810ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35811ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35812ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35814$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35815if test -z "$CXXCPP"; then
35816  if ${ac_cv_prog_CXXCPP+:} false; then :
35817  $as_echo_n "(cached) " >&6
35818else
35819      # Double quotes because CXXCPP needs to be expanded
35820    for CXXCPP in "$CXX -E" "/lib/cpp"
35821    do
35822      ac_preproc_ok=false
35823for ac_cxx_preproc_warn_flag in '' yes
35824do
35825  # Use a header file that comes with gcc, so configuring glibc
35826  # with a fresh cross-compiler works.
35827  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35828  # <limits.h> exists even on freestanding compilers.
35829  # On the NeXT, cc -E runs the code through the compiler's parser,
35830  # not just through cpp. "Syntax error" is here to catch this case.
35831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35832/* end confdefs.h.  */
35833#ifdef __STDC__
35834# include <limits.h>
35835#else
35836# include <assert.h>
35837#endif
35838		     Syntax error
35839_ACEOF
35840if ac_fn_cxx_try_cpp "$LINENO"; then :
35841
35842else
35843  # Broken: fails on valid input.
35844continue
35845fi
35846rm -f conftest.err conftest.i conftest.$ac_ext
35847
35848  # OK, works on sane cases.  Now check whether nonexistent headers
35849  # can be detected and how.
35850  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35851/* end confdefs.h.  */
35852#include <ac_nonexistent.h>
35853_ACEOF
35854if ac_fn_cxx_try_cpp "$LINENO"; then :
35855  # Broken: success on invalid input.
35856continue
35857else
35858  # Passes both tests.
35859ac_preproc_ok=:
35860break
35861fi
35862rm -f conftest.err conftest.i conftest.$ac_ext
35863
35864done
35865# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35866rm -f conftest.i conftest.err conftest.$ac_ext
35867if $ac_preproc_ok; then :
35868  break
35869fi
35870
35871    done
35872    ac_cv_prog_CXXCPP=$CXXCPP
35873
35874fi
35875  CXXCPP=$ac_cv_prog_CXXCPP
35876else
35877  ac_cv_prog_CXXCPP=$CXXCPP
35878fi
35879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35880$as_echo "$CXXCPP" >&6; }
35881ac_preproc_ok=false
35882for ac_cxx_preproc_warn_flag in '' yes
35883do
35884  # Use a header file that comes with gcc, so configuring glibc
35885  # with a fresh cross-compiler works.
35886  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35887  # <limits.h> exists even on freestanding compilers.
35888  # On the NeXT, cc -E runs the code through the compiler's parser,
35889  # not just through cpp. "Syntax error" is here to catch this case.
35890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35891/* end confdefs.h.  */
35892#ifdef __STDC__
35893# include <limits.h>
35894#else
35895# include <assert.h>
35896#endif
35897		     Syntax error
35898_ACEOF
35899if ac_fn_cxx_try_cpp "$LINENO"; then :
35900
35901else
35902  # Broken: fails on valid input.
35903continue
35904fi
35905rm -f conftest.err conftest.i conftest.$ac_ext
35906
35907  # OK, works on sane cases.  Now check whether nonexistent headers
35908  # can be detected and how.
35909  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35910/* end confdefs.h.  */
35911#include <ac_nonexistent.h>
35912_ACEOF
35913if ac_fn_cxx_try_cpp "$LINENO"; then :
35914  # Broken: success on invalid input.
35915continue
35916else
35917  # Passes both tests.
35918ac_preproc_ok=:
35919break
35920fi
35921rm -f conftest.err conftest.i conftest.$ac_ext
35922
35923done
35924# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35925rm -f conftest.i conftest.err conftest.$ac_ext
35926if $ac_preproc_ok; then :
35927
35928else
35929  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35930$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35931as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35932See \`config.log' for more details" "$LINENO" 5; }
35933fi
35934
35935ac_ext=cpp
35936ac_cpp='$CXXCPP $CPPFLAGS'
35937ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35938ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35939ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35940
35941
35942  # Only process if variable expands to non-empty
35943
35944  if test "x$CXXCPP" != x; then
35945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35946
35947  # First separate the path from the arguments. This will split at the first
35948  # space.
35949  complete="$CXXCPP"
35950  path="${complete%% *}"
35951  tmp="$complete EOL"
35952  arguments="${tmp#* }"
35953
35954  # Input might be given as Windows format, start by converting to
35955  # unix format.
35956  new_path=`$CYGPATH -u "$path"`
35957
35958  # Now try to locate executable using which
35959  new_path=`$WHICH "$new_path" 2> /dev/null`
35960  # bat and cmd files are not always considered executable in cygwin causing which
35961  # to not find them
35962  if test "x$new_path" = x \
35963      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35964      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35965    new_path=`$CYGPATH -u "$path"`
35966  fi
35967  if test "x$new_path" = x; then
35968    # Oops. Which didn't find the executable.
35969    # The splitting of arguments from the executable at a space might have been incorrect,
35970    # since paths with space are more likely in Windows. Give it another try with the whole
35971    # argument.
35972    path="$complete"
35973    arguments="EOL"
35974    new_path=`$CYGPATH -u "$path"`
35975    new_path=`$WHICH "$new_path" 2> /dev/null`
35976    # bat and cmd files are not always considered executable in cygwin causing which
35977    # to not find them
35978    if test "x$new_path" = x \
35979        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35980        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35981      new_path=`$CYGPATH -u "$path"`
35982    fi
35983    if test "x$new_path" = x; then
35984      # It's still not found. Now this is an unrecoverable error.
35985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35986$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35987      has_space=`$ECHO "$complete" | $GREP " "`
35988      if test "x$has_space" != x; then
35989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35991      fi
35992      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35993    fi
35994  fi
35995
35996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35999  # "foo.exe" is OK but "foo" is an error.
36000  #
36001  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36002  # It is also a way to make sure we got the proper file name for the real test later on.
36003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36004  if test "x$test_shortpath" = x; then
36005    # Short path failed, file does not exist as specified.
36006    # Try adding .exe or .cmd
36007    if test -f "${new_path}.exe"; then
36008      input_to_shortpath="${new_path}.exe"
36009    elif test -f "${new_path}.cmd"; then
36010      input_to_shortpath="${new_path}.cmd"
36011    else
36012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36013$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36014      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36015$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36016      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36017    fi
36018  else
36019    input_to_shortpath="$new_path"
36020  fi
36021
36022  # Call helper function which possibly converts this using DOS-style short mode.
36023  # If so, the updated path is stored in $new_path.
36024  new_path="$input_to_shortpath"
36025
36026  input_path="$input_to_shortpath"
36027  # Check if we need to convert this using DOS-style short mode. If the path
36028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36029  # take no chances and rewrite it.
36030  # Note: m4 eats our [], so we need to use [ and ] instead.
36031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36032  if test "x$has_forbidden_chars" != x; then
36033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36037      # Going to short mode and back again did indeed matter. Since short mode is
36038      # case insensitive, let's make it lowercase to improve readability.
36039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36040      # Now convert it back to Unix-style (cygpath)
36041      input_path=`$CYGPATH -u "$shortmode_path"`
36042      new_path="$input_path"
36043    fi
36044  fi
36045
36046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36047  if test "x$test_cygdrive_prefix" = x; then
36048    # As a simple fix, exclude /usr/bin since it's not a real path.
36049    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36051      # a path prefixed by /cygdrive for fixpath to work.
36052      new_path="$CYGWIN_ROOT_PATH$input_path"
36053    fi
36054  fi
36055
36056  # remove trailing .exe if any
36057  new_path="${new_path/%.exe/}"
36058
36059    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36060
36061  # First separate the path from the arguments. This will split at the first
36062  # space.
36063  complete="$CXXCPP"
36064  path="${complete%% *}"
36065  tmp="$complete EOL"
36066  arguments="${tmp#* }"
36067
36068  # Input might be given as Windows format, start by converting to
36069  # unix format.
36070  new_path="$path"
36071
36072  windows_path="$new_path"
36073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36074    unix_path=`$CYGPATH -u "$windows_path"`
36075    new_path="$unix_path"
36076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36078    new_path="$unix_path"
36079  fi
36080
36081
36082  # Now try to locate executable using which
36083  new_path=`$WHICH "$new_path" 2> /dev/null`
36084
36085  if test "x$new_path" = x; then
36086    # Oops. Which didn't find the executable.
36087    # The splitting of arguments from the executable at a space might have been incorrect,
36088    # since paths with space are more likely in Windows. Give it another try with the whole
36089    # argument.
36090    path="$complete"
36091    arguments="EOL"
36092    new_path="$path"
36093
36094  windows_path="$new_path"
36095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36096    unix_path=`$CYGPATH -u "$windows_path"`
36097    new_path="$unix_path"
36098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36100    new_path="$unix_path"
36101  fi
36102
36103
36104    new_path=`$WHICH "$new_path" 2> /dev/null`
36105    # bat and cmd files are not always considered executable in MSYS causing which
36106    # to not find them
36107    if test "x$new_path" = x \
36108        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36109        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36110      new_path="$path"
36111
36112  windows_path="$new_path"
36113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36114    unix_path=`$CYGPATH -u "$windows_path"`
36115    new_path="$unix_path"
36116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36118    new_path="$unix_path"
36119  fi
36120
36121    fi
36122
36123    if test "x$new_path" = x; then
36124      # It's still not found. Now this is an unrecoverable error.
36125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36126$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36127      has_space=`$ECHO "$complete" | $GREP " "`
36128      if test "x$has_space" != x; then
36129        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36130$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36131      fi
36132      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36133    fi
36134  fi
36135
36136  # Now new_path has a complete unix path to the binary
36137  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36138    # Keep paths in /bin as-is, but remove trailing .exe if any
36139    new_path="${new_path/%.exe/}"
36140    # Do not save /bin paths to all_fixpath_prefixes!
36141  else
36142    # Not in mixed or Windows style, start by that.
36143    new_path=`cmd //c echo $new_path`
36144
36145  input_path="$new_path"
36146  # Check if we need to convert this using DOS-style short mode. If the path
36147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36148  # take no chances and rewrite it.
36149  # Note: m4 eats our [], so we need to use [ and ] instead.
36150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36151  if test "x$has_forbidden_chars" != x; then
36152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36154  fi
36155
36156    # Output is in $new_path
36157
36158  windows_path="$new_path"
36159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36160    unix_path=`$CYGPATH -u "$windows_path"`
36161    new_path="$unix_path"
36162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36164    new_path="$unix_path"
36165  fi
36166
36167    # remove trailing .exe if any
36168    new_path="${new_path/%.exe/}"
36169
36170    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36171    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36172  fi
36173
36174    else
36175      # We're on a unix platform. Hooray! :)
36176      # First separate the path from the arguments. This will split at the first
36177      # space.
36178      complete="$CXXCPP"
36179      path="${complete%% *}"
36180      tmp="$complete EOL"
36181      arguments="${tmp#* }"
36182
36183      # Cannot rely on the command "which" here since it doesn't always work.
36184      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36185      if test -z "$is_absolute_path"; then
36186        # Path to executable is not absolute. Find it.
36187        IFS_save="$IFS"
36188        IFS=:
36189        for p in $PATH; do
36190          if test -f "$p/$path" && test -x "$p/$path"; then
36191            new_path="$p/$path"
36192            break
36193          fi
36194        done
36195        IFS="$IFS_save"
36196      else
36197        # This is an absolute path, we can use it without further modifications.
36198        new_path="$path"
36199      fi
36200
36201      if test "x$new_path" = x; then
36202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36203$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36204        has_space=`$ECHO "$complete" | $GREP " "`
36205        if test "x$has_space" != x; then
36206          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36207$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36208        fi
36209        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36210      fi
36211    fi
36212
36213    # Now join together the path and the arguments once again
36214    if test "x$arguments" != xEOL; then
36215      new_complete="$new_path ${arguments% *}"
36216    else
36217      new_complete="$new_path"
36218    fi
36219
36220    if test "x$complete" != "x$new_complete"; then
36221      CXXCPP="$new_complete"
36222      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36223$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36224    fi
36225  fi
36226
36227
36228  #
36229  # Setup the linker (LD)
36230  #
36231  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36232    # In the Microsoft toolchain we have a separate LD command "link".
36233    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36234    # a cygwin program for something completely different.
36235    # Extract the first word of "link", so it can be a program name with args.
36236set dummy link; ac_word=$2
36237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36238$as_echo_n "checking for $ac_word... " >&6; }
36239if ${ac_cv_prog_LD+:} false; then :
36240  $as_echo_n "(cached) " >&6
36241else
36242  if test -n "$LD"; then
36243  ac_cv_prog_LD="$LD" # Let the user override the test.
36244else
36245  ac_prog_rejected=no
36246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36247for as_dir in $PATH
36248do
36249  IFS=$as_save_IFS
36250  test -z "$as_dir" && as_dir=.
36251    for ac_exec_ext in '' $ac_executable_extensions; do
36252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36253    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36254       ac_prog_rejected=yes
36255       continue
36256     fi
36257    ac_cv_prog_LD="link"
36258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36259    break 2
36260  fi
36261done
36262  done
36263IFS=$as_save_IFS
36264
36265if test $ac_prog_rejected = yes; then
36266  # We found a bogon in the path, so make sure we never use it.
36267  set dummy $ac_cv_prog_LD
36268  shift
36269  if test $# != 0; then
36270    # We chose a different compiler from the bogus one.
36271    # However, it has the same basename, so the bogon will be chosen
36272    # first if we set LD to just the basename; use the full file name.
36273    shift
36274    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36275  fi
36276fi
36277fi
36278fi
36279LD=$ac_cv_prog_LD
36280if test -n "$LD"; then
36281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36282$as_echo "$LD" >&6; }
36283else
36284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36285$as_echo "no" >&6; }
36286fi
36287
36288
36289
36290  # Only process if variable expands to non-empty
36291
36292  if test "x$LD" != x; then
36293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36294
36295  # First separate the path from the arguments. This will split at the first
36296  # space.
36297  complete="$LD"
36298  path="${complete%% *}"
36299  tmp="$complete EOL"
36300  arguments="${tmp#* }"
36301
36302  # Input might be given as Windows format, start by converting to
36303  # unix format.
36304  new_path=`$CYGPATH -u "$path"`
36305
36306  # Now try to locate executable using which
36307  new_path=`$WHICH "$new_path" 2> /dev/null`
36308  # bat and cmd files are not always considered executable in cygwin causing which
36309  # to not find them
36310  if test "x$new_path" = x \
36311      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36312      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36313    new_path=`$CYGPATH -u "$path"`
36314  fi
36315  if test "x$new_path" = x; then
36316    # Oops. Which didn't find the executable.
36317    # The splitting of arguments from the executable at a space might have been incorrect,
36318    # since paths with space are more likely in Windows. Give it another try with the whole
36319    # argument.
36320    path="$complete"
36321    arguments="EOL"
36322    new_path=`$CYGPATH -u "$path"`
36323    new_path=`$WHICH "$new_path" 2> /dev/null`
36324    # bat and cmd files are not always considered executable in cygwin causing which
36325    # to not find them
36326    if test "x$new_path" = x \
36327        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36328        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36329      new_path=`$CYGPATH -u "$path"`
36330    fi
36331    if test "x$new_path" = x; then
36332      # It's still not found. Now this is an unrecoverable error.
36333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36334$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36335      has_space=`$ECHO "$complete" | $GREP " "`
36336      if test "x$has_space" != x; then
36337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36339      fi
36340      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36341    fi
36342  fi
36343
36344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36347  # "foo.exe" is OK but "foo" is an error.
36348  #
36349  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36350  # It is also a way to make sure we got the proper file name for the real test later on.
36351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36352  if test "x$test_shortpath" = x; then
36353    # Short path failed, file does not exist as specified.
36354    # Try adding .exe or .cmd
36355    if test -f "${new_path}.exe"; then
36356      input_to_shortpath="${new_path}.exe"
36357    elif test -f "${new_path}.cmd"; then
36358      input_to_shortpath="${new_path}.cmd"
36359    else
36360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36361$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36362      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36363$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36364      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36365    fi
36366  else
36367    input_to_shortpath="$new_path"
36368  fi
36369
36370  # Call helper function which possibly converts this using DOS-style short mode.
36371  # If so, the updated path is stored in $new_path.
36372  new_path="$input_to_shortpath"
36373
36374  input_path="$input_to_shortpath"
36375  # Check if we need to convert this using DOS-style short mode. If the path
36376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36377  # take no chances and rewrite it.
36378  # Note: m4 eats our [], so we need to use [ and ] instead.
36379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36380  if test "x$has_forbidden_chars" != x; then
36381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36385      # Going to short mode and back again did indeed matter. Since short mode is
36386      # case insensitive, let's make it lowercase to improve readability.
36387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36388      # Now convert it back to Unix-style (cygpath)
36389      input_path=`$CYGPATH -u "$shortmode_path"`
36390      new_path="$input_path"
36391    fi
36392  fi
36393
36394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36395  if test "x$test_cygdrive_prefix" = x; then
36396    # As a simple fix, exclude /usr/bin since it's not a real path.
36397    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36399      # a path prefixed by /cygdrive for fixpath to work.
36400      new_path="$CYGWIN_ROOT_PATH$input_path"
36401    fi
36402  fi
36403
36404  # remove trailing .exe if any
36405  new_path="${new_path/%.exe/}"
36406
36407    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36408
36409  # First separate the path from the arguments. This will split at the first
36410  # space.
36411  complete="$LD"
36412  path="${complete%% *}"
36413  tmp="$complete EOL"
36414  arguments="${tmp#* }"
36415
36416  # Input might be given as Windows format, start by converting to
36417  # unix format.
36418  new_path="$path"
36419
36420  windows_path="$new_path"
36421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36422    unix_path=`$CYGPATH -u "$windows_path"`
36423    new_path="$unix_path"
36424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36426    new_path="$unix_path"
36427  fi
36428
36429
36430  # Now try to locate executable using which
36431  new_path=`$WHICH "$new_path" 2> /dev/null`
36432
36433  if test "x$new_path" = x; then
36434    # Oops. Which didn't find the executable.
36435    # The splitting of arguments from the executable at a space might have been incorrect,
36436    # since paths with space are more likely in Windows. Give it another try with the whole
36437    # argument.
36438    path="$complete"
36439    arguments="EOL"
36440    new_path="$path"
36441
36442  windows_path="$new_path"
36443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36444    unix_path=`$CYGPATH -u "$windows_path"`
36445    new_path="$unix_path"
36446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36448    new_path="$unix_path"
36449  fi
36450
36451
36452    new_path=`$WHICH "$new_path" 2> /dev/null`
36453    # bat and cmd files are not always considered executable in MSYS causing which
36454    # to not find them
36455    if test "x$new_path" = x \
36456        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36457        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36458      new_path="$path"
36459
36460  windows_path="$new_path"
36461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36462    unix_path=`$CYGPATH -u "$windows_path"`
36463    new_path="$unix_path"
36464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36466    new_path="$unix_path"
36467  fi
36468
36469    fi
36470
36471    if test "x$new_path" = x; then
36472      # It's still not found. Now this is an unrecoverable error.
36473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36474$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36475      has_space=`$ECHO "$complete" | $GREP " "`
36476      if test "x$has_space" != x; then
36477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36479      fi
36480      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36481    fi
36482  fi
36483
36484  # Now new_path has a complete unix path to the binary
36485  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36486    # Keep paths in /bin as-is, but remove trailing .exe if any
36487    new_path="${new_path/%.exe/}"
36488    # Do not save /bin paths to all_fixpath_prefixes!
36489  else
36490    # Not in mixed or Windows style, start by that.
36491    new_path=`cmd //c echo $new_path`
36492
36493  input_path="$new_path"
36494  # Check if we need to convert this using DOS-style short mode. If the path
36495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36496  # take no chances and rewrite it.
36497  # Note: m4 eats our [], so we need to use [ and ] instead.
36498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36499  if test "x$has_forbidden_chars" != x; then
36500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36502  fi
36503
36504    # Output is in $new_path
36505
36506  windows_path="$new_path"
36507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36508    unix_path=`$CYGPATH -u "$windows_path"`
36509    new_path="$unix_path"
36510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36512    new_path="$unix_path"
36513  fi
36514
36515    # remove trailing .exe if any
36516    new_path="${new_path/%.exe/}"
36517
36518    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36519    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36520  fi
36521
36522    else
36523      # We're on a unix platform. Hooray! :)
36524      # First separate the path from the arguments. This will split at the first
36525      # space.
36526      complete="$LD"
36527      path="${complete%% *}"
36528      tmp="$complete EOL"
36529      arguments="${tmp#* }"
36530
36531      # Cannot rely on the command "which" here since it doesn't always work.
36532      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36533      if test -z "$is_absolute_path"; then
36534        # Path to executable is not absolute. Find it.
36535        IFS_save="$IFS"
36536        IFS=:
36537        for p in $PATH; do
36538          if test -f "$p/$path" && test -x "$p/$path"; then
36539            new_path="$p/$path"
36540            break
36541          fi
36542        done
36543        IFS="$IFS_save"
36544      else
36545        # This is an absolute path, we can use it without further modifications.
36546        new_path="$path"
36547      fi
36548
36549      if test "x$new_path" = x; then
36550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36551$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36552        has_space=`$ECHO "$complete" | $GREP " "`
36553        if test "x$has_space" != x; then
36554          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36555$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36556        fi
36557        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36558      fi
36559    fi
36560
36561    # Now join together the path and the arguments once again
36562    if test "x$arguments" != xEOL; then
36563      new_complete="$new_path ${arguments% *}"
36564    else
36565      new_complete="$new_path"
36566    fi
36567
36568    if test "x$complete" != "x$new_complete"; then
36569      LD="$new_complete"
36570      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36571$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36572    fi
36573  fi
36574
36575    # Verify that we indeed succeeded with this trick.
36576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36577$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36578    "$LD" --version > /dev/null
36579    if test $? -eq 0 ; then
36580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36581$as_echo "no" >&6; }
36582      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36583    else
36584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36585$as_echo "yes" >&6; }
36586    fi
36587    LDCXX="$LD"
36588  else
36589    # All other toolchains use the compiler to link.
36590    LD="$CC"
36591    LDCXX="$CXX"
36592  fi
36593
36594  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36595
36596
36597  #
36598  # Setup the assembler (AS)
36599  #
36600  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36601
36602
36603  # Publish this variable in the help.
36604
36605
36606  if [ -z "${AS+x}" ]; then
36607    # The variable is not set by user, try to locate tool using the code snippet
36608    for ac_prog in as
36609do
36610  # Extract the first word of "$ac_prog", so it can be a program name with args.
36611set dummy $ac_prog; ac_word=$2
36612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36613$as_echo_n "checking for $ac_word... " >&6; }
36614if ${ac_cv_path_AS+:} false; then :
36615  $as_echo_n "(cached) " >&6
36616else
36617  case $AS in
36618  [\\/]* | ?:[\\/]*)
36619  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36620  ;;
36621  *)
36622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36623for as_dir in $PATH
36624do
36625  IFS=$as_save_IFS
36626  test -z "$as_dir" && as_dir=.
36627    for ac_exec_ext in '' $ac_executable_extensions; do
36628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36629    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36631    break 2
36632  fi
36633done
36634  done
36635IFS=$as_save_IFS
36636
36637  ;;
36638esac
36639fi
36640AS=$ac_cv_path_AS
36641if test -n "$AS"; then
36642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36643$as_echo "$AS" >&6; }
36644else
36645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36646$as_echo "no" >&6; }
36647fi
36648
36649
36650  test -n "$AS" && break
36651done
36652
36653  else
36654    # The variable is set, but is it from the command line or the environment?
36655
36656    # Try to remove the string !AS! from our list.
36657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36659      # If it failed, the variable was not from the command line. Ignore it,
36660      # but warn the user (except for BASH, which is always set by the calling BASH).
36661      if test "xAS" != xBASH; then
36662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36663$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36664      fi
36665      # Try to locate tool using the code snippet
36666      for ac_prog in as
36667do
36668  # Extract the first word of "$ac_prog", so it can be a program name with args.
36669set dummy $ac_prog; ac_word=$2
36670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36671$as_echo_n "checking for $ac_word... " >&6; }
36672if ${ac_cv_path_AS+:} false; then :
36673  $as_echo_n "(cached) " >&6
36674else
36675  case $AS in
36676  [\\/]* | ?:[\\/]*)
36677  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36678  ;;
36679  *)
36680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36681for as_dir in $PATH
36682do
36683  IFS=$as_save_IFS
36684  test -z "$as_dir" && as_dir=.
36685    for ac_exec_ext in '' $ac_executable_extensions; do
36686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36687    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36689    break 2
36690  fi
36691done
36692  done
36693IFS=$as_save_IFS
36694
36695  ;;
36696esac
36697fi
36698AS=$ac_cv_path_AS
36699if test -n "$AS"; then
36700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36701$as_echo "$AS" >&6; }
36702else
36703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36704$as_echo "no" >&6; }
36705fi
36706
36707
36708  test -n "$AS" && break
36709done
36710
36711    else
36712      # If it succeeded, then it was overridden by the user. We will use it
36713      # for the tool.
36714
36715      # First remove it from the list of overridden variables, so we can test
36716      # for unknown variables in the end.
36717      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36718
36719      # Check if we try to supply an empty value
36720      if test "x$AS" = x; then
36721        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36722$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36723        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36724$as_echo_n "checking for AS... " >&6; }
36725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36726$as_echo "disabled" >&6; }
36727      else
36728        # Check if the provided tool contains a complete path.
36729        tool_specified="$AS"
36730        tool_basename="${tool_specified##*/}"
36731        if test "x$tool_basename" = "x$tool_specified"; then
36732          # A command without a complete path is provided, search $PATH.
36733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36734$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36735          # Extract the first word of "$tool_basename", so it can be a program name with args.
36736set dummy $tool_basename; ac_word=$2
36737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36738$as_echo_n "checking for $ac_word... " >&6; }
36739if ${ac_cv_path_AS+:} false; then :
36740  $as_echo_n "(cached) " >&6
36741else
36742  case $AS in
36743  [\\/]* | ?:[\\/]*)
36744  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36745  ;;
36746  *)
36747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36748for as_dir in $PATH
36749do
36750  IFS=$as_save_IFS
36751  test -z "$as_dir" && as_dir=.
36752    for ac_exec_ext in '' $ac_executable_extensions; do
36753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36754    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36756    break 2
36757  fi
36758done
36759  done
36760IFS=$as_save_IFS
36761
36762  ;;
36763esac
36764fi
36765AS=$ac_cv_path_AS
36766if test -n "$AS"; then
36767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36768$as_echo "$AS" >&6; }
36769else
36770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36771$as_echo "no" >&6; }
36772fi
36773
36774
36775          if test "x$AS" = x; then
36776            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36777          fi
36778        else
36779          # Otherwise we believe it is a complete path. Use it as it is.
36780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36781$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36782          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36783$as_echo_n "checking for AS... " >&6; }
36784          if test ! -x "$tool_specified"; then
36785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36786$as_echo "not found" >&6; }
36787            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36788          fi
36789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36790$as_echo "$tool_specified" >&6; }
36791        fi
36792      fi
36793    fi
36794
36795  fi
36796
36797
36798
36799  # Only process if variable expands to non-empty
36800
36801  if test "x$AS" != x; then
36802    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36803
36804  # First separate the path from the arguments. This will split at the first
36805  # space.
36806  complete="$AS"
36807  path="${complete%% *}"
36808  tmp="$complete EOL"
36809  arguments="${tmp#* }"
36810
36811  # Input might be given as Windows format, start by converting to
36812  # unix format.
36813  new_path=`$CYGPATH -u "$path"`
36814
36815  # Now try to locate executable using which
36816  new_path=`$WHICH "$new_path" 2> /dev/null`
36817  # bat and cmd files are not always considered executable in cygwin causing which
36818  # to not find them
36819  if test "x$new_path" = x \
36820      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36821      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36822    new_path=`$CYGPATH -u "$path"`
36823  fi
36824  if test "x$new_path" = x; then
36825    # Oops. Which didn't find the executable.
36826    # The splitting of arguments from the executable at a space might have been incorrect,
36827    # since paths with space are more likely in Windows. Give it another try with the whole
36828    # argument.
36829    path="$complete"
36830    arguments="EOL"
36831    new_path=`$CYGPATH -u "$path"`
36832    new_path=`$WHICH "$new_path" 2> /dev/null`
36833    # bat and cmd files are not always considered executable in cygwin causing which
36834    # to not find them
36835    if test "x$new_path" = x \
36836        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36837        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36838      new_path=`$CYGPATH -u "$path"`
36839    fi
36840    if test "x$new_path" = x; then
36841      # It's still not found. Now this is an unrecoverable error.
36842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36843$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36844      has_space=`$ECHO "$complete" | $GREP " "`
36845      if test "x$has_space" != x; then
36846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36848      fi
36849      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36850    fi
36851  fi
36852
36853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36856  # "foo.exe" is OK but "foo" is an error.
36857  #
36858  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36859  # It is also a way to make sure we got the proper file name for the real test later on.
36860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36861  if test "x$test_shortpath" = x; then
36862    # Short path failed, file does not exist as specified.
36863    # Try adding .exe or .cmd
36864    if test -f "${new_path}.exe"; then
36865      input_to_shortpath="${new_path}.exe"
36866    elif test -f "${new_path}.cmd"; then
36867      input_to_shortpath="${new_path}.cmd"
36868    else
36869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36870$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36871      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36872$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36873      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36874    fi
36875  else
36876    input_to_shortpath="$new_path"
36877  fi
36878
36879  # Call helper function which possibly converts this using DOS-style short mode.
36880  # If so, the updated path is stored in $new_path.
36881  new_path="$input_to_shortpath"
36882
36883  input_path="$input_to_shortpath"
36884  # Check if we need to convert this using DOS-style short mode. If the path
36885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36886  # take no chances and rewrite it.
36887  # Note: m4 eats our [], so we need to use [ and ] instead.
36888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36889  if test "x$has_forbidden_chars" != x; then
36890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36894      # Going to short mode and back again did indeed matter. Since short mode is
36895      # case insensitive, let's make it lowercase to improve readability.
36896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36897      # Now convert it back to Unix-style (cygpath)
36898      input_path=`$CYGPATH -u "$shortmode_path"`
36899      new_path="$input_path"
36900    fi
36901  fi
36902
36903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36904  if test "x$test_cygdrive_prefix" = x; then
36905    # As a simple fix, exclude /usr/bin since it's not a real path.
36906    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36908      # a path prefixed by /cygdrive for fixpath to work.
36909      new_path="$CYGWIN_ROOT_PATH$input_path"
36910    fi
36911  fi
36912
36913  # remove trailing .exe if any
36914  new_path="${new_path/%.exe/}"
36915
36916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36917
36918  # First separate the path from the arguments. This will split at the first
36919  # space.
36920  complete="$AS"
36921  path="${complete%% *}"
36922  tmp="$complete EOL"
36923  arguments="${tmp#* }"
36924
36925  # Input might be given as Windows format, start by converting to
36926  # unix format.
36927  new_path="$path"
36928
36929  windows_path="$new_path"
36930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36931    unix_path=`$CYGPATH -u "$windows_path"`
36932    new_path="$unix_path"
36933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36935    new_path="$unix_path"
36936  fi
36937
36938
36939  # Now try to locate executable using which
36940  new_path=`$WHICH "$new_path" 2> /dev/null`
36941
36942  if test "x$new_path" = x; then
36943    # Oops. Which didn't find the executable.
36944    # The splitting of arguments from the executable at a space might have been incorrect,
36945    # since paths with space are more likely in Windows. Give it another try with the whole
36946    # argument.
36947    path="$complete"
36948    arguments="EOL"
36949    new_path="$path"
36950
36951  windows_path="$new_path"
36952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36953    unix_path=`$CYGPATH -u "$windows_path"`
36954    new_path="$unix_path"
36955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36957    new_path="$unix_path"
36958  fi
36959
36960
36961    new_path=`$WHICH "$new_path" 2> /dev/null`
36962    # bat and cmd files are not always considered executable in MSYS causing which
36963    # to not find them
36964    if test "x$new_path" = x \
36965        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36966        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36967      new_path="$path"
36968
36969  windows_path="$new_path"
36970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36971    unix_path=`$CYGPATH -u "$windows_path"`
36972    new_path="$unix_path"
36973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36975    new_path="$unix_path"
36976  fi
36977
36978    fi
36979
36980    if test "x$new_path" = x; then
36981      # It's still not found. Now this is an unrecoverable error.
36982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36983$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36984      has_space=`$ECHO "$complete" | $GREP " "`
36985      if test "x$has_space" != x; then
36986        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36987$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36988      fi
36989      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36990    fi
36991  fi
36992
36993  # Now new_path has a complete unix path to the binary
36994  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36995    # Keep paths in /bin as-is, but remove trailing .exe if any
36996    new_path="${new_path/%.exe/}"
36997    # Do not save /bin paths to all_fixpath_prefixes!
36998  else
36999    # Not in mixed or Windows style, start by that.
37000    new_path=`cmd //c echo $new_path`
37001
37002  input_path="$new_path"
37003  # Check if we need to convert this using DOS-style short mode. If the path
37004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37005  # take no chances and rewrite it.
37006  # Note: m4 eats our [], so we need to use [ and ] instead.
37007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37008  if test "x$has_forbidden_chars" != x; then
37009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37011  fi
37012
37013    # Output is in $new_path
37014
37015  windows_path="$new_path"
37016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37017    unix_path=`$CYGPATH -u "$windows_path"`
37018    new_path="$unix_path"
37019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37021    new_path="$unix_path"
37022  fi
37023
37024    # remove trailing .exe if any
37025    new_path="${new_path/%.exe/}"
37026
37027    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37028    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37029  fi
37030
37031    else
37032      # We're on a unix platform. Hooray! :)
37033      # First separate the path from the arguments. This will split at the first
37034      # space.
37035      complete="$AS"
37036      path="${complete%% *}"
37037      tmp="$complete EOL"
37038      arguments="${tmp#* }"
37039
37040      # Cannot rely on the command "which" here since it doesn't always work.
37041      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37042      if test -z "$is_absolute_path"; then
37043        # Path to executable is not absolute. Find it.
37044        IFS_save="$IFS"
37045        IFS=:
37046        for p in $PATH; do
37047          if test -f "$p/$path" && test -x "$p/$path"; then
37048            new_path="$p/$path"
37049            break
37050          fi
37051        done
37052        IFS="$IFS_save"
37053      else
37054        # This is an absolute path, we can use it without further modifications.
37055        new_path="$path"
37056      fi
37057
37058      if test "x$new_path" = x; then
37059        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37060$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37061        has_space=`$ECHO "$complete" | $GREP " "`
37062        if test "x$has_space" != x; then
37063          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37064$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37065        fi
37066        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37067      fi
37068    fi
37069
37070    # Now join together the path and the arguments once again
37071    if test "x$arguments" != xEOL; then
37072      new_complete="$new_path ${arguments% *}"
37073    else
37074      new_complete="$new_path"
37075    fi
37076
37077    if test "x$complete" != "x$new_complete"; then
37078      AS="$new_complete"
37079      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37080$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37081    fi
37082  fi
37083
37084    if test "x$AS" = x; then
37085      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37086    fi
37087  else
37088    # FIXME: is this correct for microsoft?
37089    AS="$CC -c"
37090  fi
37091
37092
37093  #
37094  # Setup the archiver (AR)
37095  #
37096  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37097    # The corresponding ar tool is lib.exe (used to create static libraries)
37098    # Extract the first word of "lib", so it can be a program name with args.
37099set dummy lib; ac_word=$2
37100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37101$as_echo_n "checking for $ac_word... " >&6; }
37102if ${ac_cv_prog_AR+:} false; then :
37103  $as_echo_n "(cached) " >&6
37104else
37105  if test -n "$AR"; then
37106  ac_cv_prog_AR="$AR" # Let the user override the test.
37107else
37108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37109for as_dir in $PATH
37110do
37111  IFS=$as_save_IFS
37112  test -z "$as_dir" && as_dir=.
37113    for ac_exec_ext in '' $ac_executable_extensions; do
37114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37115    ac_cv_prog_AR="lib"
37116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37117    break 2
37118  fi
37119done
37120  done
37121IFS=$as_save_IFS
37122
37123fi
37124fi
37125AR=$ac_cv_prog_AR
37126if test -n "$AR"; then
37127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37128$as_echo "$AR" >&6; }
37129else
37130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37131$as_echo "no" >&6; }
37132fi
37133
37134
37135  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37136
37137
37138  # Publish this variable in the help.
37139
37140
37141  if [ -z "${AR+x}" ]; then
37142    # The variable is not set by user, try to locate tool using the code snippet
37143    if test -n "$ac_tool_prefix"; then
37144  for ac_prog in ar gcc-ar
37145  do
37146    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37147set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37149$as_echo_n "checking for $ac_word... " >&6; }
37150if ${ac_cv_prog_AR+:} false; then :
37151  $as_echo_n "(cached) " >&6
37152else
37153  if test -n "$AR"; then
37154  ac_cv_prog_AR="$AR" # Let the user override the test.
37155else
37156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37157for as_dir in $PATH
37158do
37159  IFS=$as_save_IFS
37160  test -z "$as_dir" && as_dir=.
37161    for ac_exec_ext in '' $ac_executable_extensions; do
37162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37163    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37165    break 2
37166  fi
37167done
37168  done
37169IFS=$as_save_IFS
37170
37171fi
37172fi
37173AR=$ac_cv_prog_AR
37174if test -n "$AR"; then
37175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37176$as_echo "$AR" >&6; }
37177else
37178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37179$as_echo "no" >&6; }
37180fi
37181
37182
37183    test -n "$AR" && break
37184  done
37185fi
37186if test -z "$AR"; then
37187  ac_ct_AR=$AR
37188  for ac_prog in ar gcc-ar
37189do
37190  # Extract the first word of "$ac_prog", so it can be a program name with args.
37191set dummy $ac_prog; ac_word=$2
37192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37193$as_echo_n "checking for $ac_word... " >&6; }
37194if ${ac_cv_prog_ac_ct_AR+:} false; then :
37195  $as_echo_n "(cached) " >&6
37196else
37197  if test -n "$ac_ct_AR"; then
37198  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37199else
37200as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37201for as_dir in $PATH
37202do
37203  IFS=$as_save_IFS
37204  test -z "$as_dir" && as_dir=.
37205    for ac_exec_ext in '' $ac_executable_extensions; do
37206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37207    ac_cv_prog_ac_ct_AR="$ac_prog"
37208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37209    break 2
37210  fi
37211done
37212  done
37213IFS=$as_save_IFS
37214
37215fi
37216fi
37217ac_ct_AR=$ac_cv_prog_ac_ct_AR
37218if test -n "$ac_ct_AR"; then
37219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37220$as_echo "$ac_ct_AR" >&6; }
37221else
37222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37223$as_echo "no" >&6; }
37224fi
37225
37226
37227  test -n "$ac_ct_AR" && break
37228done
37229
37230  if test "x$ac_ct_AR" = x; then
37231    AR=""
37232  else
37233    case $cross_compiling:$ac_tool_warned in
37234yes:)
37235{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37236$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37237ac_tool_warned=yes ;;
37238esac
37239    AR=$ac_ct_AR
37240  fi
37241fi
37242
37243  else
37244    # The variable is set, but is it from the command line or the environment?
37245
37246    # Try to remove the string !AR! from our list.
37247    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37248    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37249      # If it failed, the variable was not from the command line. Ignore it,
37250      # but warn the user (except for BASH, which is always set by the calling BASH).
37251      if test "xAR" != xBASH; then
37252        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37253$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37254      fi
37255      # Try to locate tool using the code snippet
37256      if test -n "$ac_tool_prefix"; then
37257  for ac_prog in ar gcc-ar
37258  do
37259    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37260set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37262$as_echo_n "checking for $ac_word... " >&6; }
37263if ${ac_cv_prog_AR+:} false; then :
37264  $as_echo_n "(cached) " >&6
37265else
37266  if test -n "$AR"; then
37267  ac_cv_prog_AR="$AR" # Let the user override the test.
37268else
37269as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37270for as_dir in $PATH
37271do
37272  IFS=$as_save_IFS
37273  test -z "$as_dir" && as_dir=.
37274    for ac_exec_ext in '' $ac_executable_extensions; do
37275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37276    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37278    break 2
37279  fi
37280done
37281  done
37282IFS=$as_save_IFS
37283
37284fi
37285fi
37286AR=$ac_cv_prog_AR
37287if test -n "$AR"; then
37288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37289$as_echo "$AR" >&6; }
37290else
37291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37292$as_echo "no" >&6; }
37293fi
37294
37295
37296    test -n "$AR" && break
37297  done
37298fi
37299if test -z "$AR"; then
37300  ac_ct_AR=$AR
37301  for ac_prog in ar gcc-ar
37302do
37303  # Extract the first word of "$ac_prog", so it can be a program name with args.
37304set dummy $ac_prog; ac_word=$2
37305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37306$as_echo_n "checking for $ac_word... " >&6; }
37307if ${ac_cv_prog_ac_ct_AR+:} false; then :
37308  $as_echo_n "(cached) " >&6
37309else
37310  if test -n "$ac_ct_AR"; then
37311  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37312else
37313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37314for as_dir in $PATH
37315do
37316  IFS=$as_save_IFS
37317  test -z "$as_dir" && as_dir=.
37318    for ac_exec_ext in '' $ac_executable_extensions; do
37319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37320    ac_cv_prog_ac_ct_AR="$ac_prog"
37321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37322    break 2
37323  fi
37324done
37325  done
37326IFS=$as_save_IFS
37327
37328fi
37329fi
37330ac_ct_AR=$ac_cv_prog_ac_ct_AR
37331if test -n "$ac_ct_AR"; then
37332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37333$as_echo "$ac_ct_AR" >&6; }
37334else
37335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37336$as_echo "no" >&6; }
37337fi
37338
37339
37340  test -n "$ac_ct_AR" && break
37341done
37342
37343  if test "x$ac_ct_AR" = x; then
37344    AR=""
37345  else
37346    case $cross_compiling:$ac_tool_warned in
37347yes:)
37348{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37349$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37350ac_tool_warned=yes ;;
37351esac
37352    AR=$ac_ct_AR
37353  fi
37354fi
37355
37356    else
37357      # If it succeeded, then it was overridden by the user. We will use it
37358      # for the tool.
37359
37360      # First remove it from the list of overridden variables, so we can test
37361      # for unknown variables in the end.
37362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37363
37364      # Check if we try to supply an empty value
37365      if test "x$AR" = x; then
37366        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37367$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37369$as_echo_n "checking for AR... " >&6; }
37370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37371$as_echo "disabled" >&6; }
37372      else
37373        # Check if the provided tool contains a complete path.
37374        tool_specified="$AR"
37375        tool_basename="${tool_specified##*/}"
37376        if test "x$tool_basename" = "x$tool_specified"; then
37377          # A command without a complete path is provided, search $PATH.
37378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37379$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37380          # Extract the first word of "$tool_basename", so it can be a program name with args.
37381set dummy $tool_basename; ac_word=$2
37382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37383$as_echo_n "checking for $ac_word... " >&6; }
37384if ${ac_cv_path_AR+:} false; then :
37385  $as_echo_n "(cached) " >&6
37386else
37387  case $AR in
37388  [\\/]* | ?:[\\/]*)
37389  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37390  ;;
37391  *)
37392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37393for as_dir in $PATH
37394do
37395  IFS=$as_save_IFS
37396  test -z "$as_dir" && as_dir=.
37397    for ac_exec_ext in '' $ac_executable_extensions; do
37398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37399    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37401    break 2
37402  fi
37403done
37404  done
37405IFS=$as_save_IFS
37406
37407  ;;
37408esac
37409fi
37410AR=$ac_cv_path_AR
37411if test -n "$AR"; then
37412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37413$as_echo "$AR" >&6; }
37414else
37415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37416$as_echo "no" >&6; }
37417fi
37418
37419
37420          if test "x$AR" = x; then
37421            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37422          fi
37423        else
37424          # Otherwise we believe it is a complete path. Use it as it is.
37425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37426$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37427          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37428$as_echo_n "checking for AR... " >&6; }
37429          if test ! -x "$tool_specified"; then
37430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37431$as_echo "not found" >&6; }
37432            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37433          fi
37434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37435$as_echo "$tool_specified" >&6; }
37436        fi
37437      fi
37438    fi
37439
37440  fi
37441
37442
37443  else
37444
37445
37446  # Publish this variable in the help.
37447
37448
37449  if [ -z "${AR+x}" ]; then
37450    # The variable is not set by user, try to locate tool using the code snippet
37451    if test -n "$ac_tool_prefix"; then
37452  for ac_prog in ar
37453  do
37454    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37455set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37457$as_echo_n "checking for $ac_word... " >&6; }
37458if ${ac_cv_prog_AR+:} false; then :
37459  $as_echo_n "(cached) " >&6
37460else
37461  if test -n "$AR"; then
37462  ac_cv_prog_AR="$AR" # Let the user override the test.
37463else
37464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37465for as_dir in $PATH
37466do
37467  IFS=$as_save_IFS
37468  test -z "$as_dir" && as_dir=.
37469    for ac_exec_ext in '' $ac_executable_extensions; do
37470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37471    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37473    break 2
37474  fi
37475done
37476  done
37477IFS=$as_save_IFS
37478
37479fi
37480fi
37481AR=$ac_cv_prog_AR
37482if test -n "$AR"; then
37483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37484$as_echo "$AR" >&6; }
37485else
37486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37487$as_echo "no" >&6; }
37488fi
37489
37490
37491    test -n "$AR" && break
37492  done
37493fi
37494if test -z "$AR"; then
37495  ac_ct_AR=$AR
37496  for ac_prog in ar
37497do
37498  # Extract the first word of "$ac_prog", so it can be a program name with args.
37499set dummy $ac_prog; ac_word=$2
37500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37501$as_echo_n "checking for $ac_word... " >&6; }
37502if ${ac_cv_prog_ac_ct_AR+:} false; then :
37503  $as_echo_n "(cached) " >&6
37504else
37505  if test -n "$ac_ct_AR"; then
37506  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37507else
37508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37509for as_dir in $PATH
37510do
37511  IFS=$as_save_IFS
37512  test -z "$as_dir" && as_dir=.
37513    for ac_exec_ext in '' $ac_executable_extensions; do
37514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37515    ac_cv_prog_ac_ct_AR="$ac_prog"
37516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37517    break 2
37518  fi
37519done
37520  done
37521IFS=$as_save_IFS
37522
37523fi
37524fi
37525ac_ct_AR=$ac_cv_prog_ac_ct_AR
37526if test -n "$ac_ct_AR"; then
37527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37528$as_echo "$ac_ct_AR" >&6; }
37529else
37530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37531$as_echo "no" >&6; }
37532fi
37533
37534
37535  test -n "$ac_ct_AR" && break
37536done
37537
37538  if test "x$ac_ct_AR" = x; then
37539    AR=""
37540  else
37541    case $cross_compiling:$ac_tool_warned in
37542yes:)
37543{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37544$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37545ac_tool_warned=yes ;;
37546esac
37547    AR=$ac_ct_AR
37548  fi
37549fi
37550
37551  else
37552    # The variable is set, but is it from the command line or the environment?
37553
37554    # Try to remove the string !AR! from our list.
37555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37556    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37557      # If it failed, the variable was not from the command line. Ignore it,
37558      # but warn the user (except for BASH, which is always set by the calling BASH).
37559      if test "xAR" != xBASH; then
37560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37561$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37562      fi
37563      # Try to locate tool using the code snippet
37564      if test -n "$ac_tool_prefix"; then
37565  for ac_prog in ar
37566  do
37567    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37568set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37570$as_echo_n "checking for $ac_word... " >&6; }
37571if ${ac_cv_prog_AR+:} false; then :
37572  $as_echo_n "(cached) " >&6
37573else
37574  if test -n "$AR"; then
37575  ac_cv_prog_AR="$AR" # Let the user override the test.
37576else
37577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37578for as_dir in $PATH
37579do
37580  IFS=$as_save_IFS
37581  test -z "$as_dir" && as_dir=.
37582    for ac_exec_ext in '' $ac_executable_extensions; do
37583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37584    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37586    break 2
37587  fi
37588done
37589  done
37590IFS=$as_save_IFS
37591
37592fi
37593fi
37594AR=$ac_cv_prog_AR
37595if test -n "$AR"; then
37596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37597$as_echo "$AR" >&6; }
37598else
37599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37600$as_echo "no" >&6; }
37601fi
37602
37603
37604    test -n "$AR" && break
37605  done
37606fi
37607if test -z "$AR"; then
37608  ac_ct_AR=$AR
37609  for ac_prog in ar
37610do
37611  # Extract the first word of "$ac_prog", so it can be a program name with args.
37612set dummy $ac_prog; ac_word=$2
37613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37614$as_echo_n "checking for $ac_word... " >&6; }
37615if ${ac_cv_prog_ac_ct_AR+:} false; then :
37616  $as_echo_n "(cached) " >&6
37617else
37618  if test -n "$ac_ct_AR"; then
37619  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37620else
37621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37622for as_dir in $PATH
37623do
37624  IFS=$as_save_IFS
37625  test -z "$as_dir" && as_dir=.
37626    for ac_exec_ext in '' $ac_executable_extensions; do
37627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37628    ac_cv_prog_ac_ct_AR="$ac_prog"
37629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37630    break 2
37631  fi
37632done
37633  done
37634IFS=$as_save_IFS
37635
37636fi
37637fi
37638ac_ct_AR=$ac_cv_prog_ac_ct_AR
37639if test -n "$ac_ct_AR"; then
37640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37641$as_echo "$ac_ct_AR" >&6; }
37642else
37643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37644$as_echo "no" >&6; }
37645fi
37646
37647
37648  test -n "$ac_ct_AR" && break
37649done
37650
37651  if test "x$ac_ct_AR" = x; then
37652    AR=""
37653  else
37654    case $cross_compiling:$ac_tool_warned in
37655yes:)
37656{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37657$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37658ac_tool_warned=yes ;;
37659esac
37660    AR=$ac_ct_AR
37661  fi
37662fi
37663
37664    else
37665      # If it succeeded, then it was overridden by the user. We will use it
37666      # for the tool.
37667
37668      # First remove it from the list of overridden variables, so we can test
37669      # for unknown variables in the end.
37670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37671
37672      # Check if we try to supply an empty value
37673      if test "x$AR" = x; then
37674        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37675$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37677$as_echo_n "checking for AR... " >&6; }
37678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37679$as_echo "disabled" >&6; }
37680      else
37681        # Check if the provided tool contains a complete path.
37682        tool_specified="$AR"
37683        tool_basename="${tool_specified##*/}"
37684        if test "x$tool_basename" = "x$tool_specified"; then
37685          # A command without a complete path is provided, search $PATH.
37686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37687$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37688          # Extract the first word of "$tool_basename", so it can be a program name with args.
37689set dummy $tool_basename; ac_word=$2
37690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37691$as_echo_n "checking for $ac_word... " >&6; }
37692if ${ac_cv_path_AR+:} false; then :
37693  $as_echo_n "(cached) " >&6
37694else
37695  case $AR in
37696  [\\/]* | ?:[\\/]*)
37697  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37698  ;;
37699  *)
37700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37701for as_dir in $PATH
37702do
37703  IFS=$as_save_IFS
37704  test -z "$as_dir" && as_dir=.
37705    for ac_exec_ext in '' $ac_executable_extensions; do
37706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37707    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37709    break 2
37710  fi
37711done
37712  done
37713IFS=$as_save_IFS
37714
37715  ;;
37716esac
37717fi
37718AR=$ac_cv_path_AR
37719if test -n "$AR"; then
37720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37721$as_echo "$AR" >&6; }
37722else
37723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37724$as_echo "no" >&6; }
37725fi
37726
37727
37728          if test "x$AR" = x; then
37729            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37730          fi
37731        else
37732          # Otherwise we believe it is a complete path. Use it as it is.
37733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37734$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37735          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37736$as_echo_n "checking for AR... " >&6; }
37737          if test ! -x "$tool_specified"; then
37738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37739$as_echo "not found" >&6; }
37740            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37741          fi
37742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37743$as_echo "$tool_specified" >&6; }
37744        fi
37745      fi
37746    fi
37747
37748  fi
37749
37750
37751  fi
37752
37753  # Only process if variable expands to non-empty
37754
37755  if test "x$AR" != x; then
37756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37757
37758  # First separate the path from the arguments. This will split at the first
37759  # space.
37760  complete="$AR"
37761  path="${complete%% *}"
37762  tmp="$complete EOL"
37763  arguments="${tmp#* }"
37764
37765  # Input might be given as Windows format, start by converting to
37766  # unix format.
37767  new_path=`$CYGPATH -u "$path"`
37768
37769  # Now try to locate executable using which
37770  new_path=`$WHICH "$new_path" 2> /dev/null`
37771  # bat and cmd files are not always considered executable in cygwin causing which
37772  # to not find them
37773  if test "x$new_path" = x \
37774      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37775      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37776    new_path=`$CYGPATH -u "$path"`
37777  fi
37778  if test "x$new_path" = x; then
37779    # Oops. Which didn't find the executable.
37780    # The splitting of arguments from the executable at a space might have been incorrect,
37781    # since paths with space are more likely in Windows. Give it another try with the whole
37782    # argument.
37783    path="$complete"
37784    arguments="EOL"
37785    new_path=`$CYGPATH -u "$path"`
37786    new_path=`$WHICH "$new_path" 2> /dev/null`
37787    # bat and cmd files are not always considered executable in cygwin causing which
37788    # to not find them
37789    if test "x$new_path" = x \
37790        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37791        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37792      new_path=`$CYGPATH -u "$path"`
37793    fi
37794    if test "x$new_path" = x; then
37795      # It's still not found. Now this is an unrecoverable error.
37796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37797$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37798      has_space=`$ECHO "$complete" | $GREP " "`
37799      if test "x$has_space" != x; then
37800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37802      fi
37803      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37804    fi
37805  fi
37806
37807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37810  # "foo.exe" is OK but "foo" is an error.
37811  #
37812  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37813  # It is also a way to make sure we got the proper file name for the real test later on.
37814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37815  if test "x$test_shortpath" = x; then
37816    # Short path failed, file does not exist as specified.
37817    # Try adding .exe or .cmd
37818    if test -f "${new_path}.exe"; then
37819      input_to_shortpath="${new_path}.exe"
37820    elif test -f "${new_path}.cmd"; then
37821      input_to_shortpath="${new_path}.cmd"
37822    else
37823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37824$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37825      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37826$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37827      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37828    fi
37829  else
37830    input_to_shortpath="$new_path"
37831  fi
37832
37833  # Call helper function which possibly converts this using DOS-style short mode.
37834  # If so, the updated path is stored in $new_path.
37835  new_path="$input_to_shortpath"
37836
37837  input_path="$input_to_shortpath"
37838  # Check if we need to convert this using DOS-style short mode. If the path
37839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37840  # take no chances and rewrite it.
37841  # Note: m4 eats our [], so we need to use [ and ] instead.
37842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37843  if test "x$has_forbidden_chars" != x; then
37844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37848      # Going to short mode and back again did indeed matter. Since short mode is
37849      # case insensitive, let's make it lowercase to improve readability.
37850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37851      # Now convert it back to Unix-style (cygpath)
37852      input_path=`$CYGPATH -u "$shortmode_path"`
37853      new_path="$input_path"
37854    fi
37855  fi
37856
37857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37858  if test "x$test_cygdrive_prefix" = x; then
37859    # As a simple fix, exclude /usr/bin since it's not a real path.
37860    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37862      # a path prefixed by /cygdrive for fixpath to work.
37863      new_path="$CYGWIN_ROOT_PATH$input_path"
37864    fi
37865  fi
37866
37867  # remove trailing .exe if any
37868  new_path="${new_path/%.exe/}"
37869
37870    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37871
37872  # First separate the path from the arguments. This will split at the first
37873  # space.
37874  complete="$AR"
37875  path="${complete%% *}"
37876  tmp="$complete EOL"
37877  arguments="${tmp#* }"
37878
37879  # Input might be given as Windows format, start by converting to
37880  # unix format.
37881  new_path="$path"
37882
37883  windows_path="$new_path"
37884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37885    unix_path=`$CYGPATH -u "$windows_path"`
37886    new_path="$unix_path"
37887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37889    new_path="$unix_path"
37890  fi
37891
37892
37893  # Now try to locate executable using which
37894  new_path=`$WHICH "$new_path" 2> /dev/null`
37895
37896  if test "x$new_path" = x; then
37897    # Oops. Which didn't find the executable.
37898    # The splitting of arguments from the executable at a space might have been incorrect,
37899    # since paths with space are more likely in Windows. Give it another try with the whole
37900    # argument.
37901    path="$complete"
37902    arguments="EOL"
37903    new_path="$path"
37904
37905  windows_path="$new_path"
37906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37907    unix_path=`$CYGPATH -u "$windows_path"`
37908    new_path="$unix_path"
37909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37911    new_path="$unix_path"
37912  fi
37913
37914
37915    new_path=`$WHICH "$new_path" 2> /dev/null`
37916    # bat and cmd files are not always considered executable in MSYS causing which
37917    # to not find them
37918    if test "x$new_path" = x \
37919        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37920        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37921      new_path="$path"
37922
37923  windows_path="$new_path"
37924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37925    unix_path=`$CYGPATH -u "$windows_path"`
37926    new_path="$unix_path"
37927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37929    new_path="$unix_path"
37930  fi
37931
37932    fi
37933
37934    if test "x$new_path" = x; then
37935      # It's still not found. Now this is an unrecoverable error.
37936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37937$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37938      has_space=`$ECHO "$complete" | $GREP " "`
37939      if test "x$has_space" != x; then
37940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37942      fi
37943      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37944    fi
37945  fi
37946
37947  # Now new_path has a complete unix path to the binary
37948  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37949    # Keep paths in /bin as-is, but remove trailing .exe if any
37950    new_path="${new_path/%.exe/}"
37951    # Do not save /bin paths to all_fixpath_prefixes!
37952  else
37953    # Not in mixed or Windows style, start by that.
37954    new_path=`cmd //c echo $new_path`
37955
37956  input_path="$new_path"
37957  # Check if we need to convert this using DOS-style short mode. If the path
37958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37959  # take no chances and rewrite it.
37960  # Note: m4 eats our [], so we need to use [ and ] instead.
37961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37962  if test "x$has_forbidden_chars" != x; then
37963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37965  fi
37966
37967    # Output is in $new_path
37968
37969  windows_path="$new_path"
37970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37971    unix_path=`$CYGPATH -u "$windows_path"`
37972    new_path="$unix_path"
37973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37975    new_path="$unix_path"
37976  fi
37977
37978    # remove trailing .exe if any
37979    new_path="${new_path/%.exe/}"
37980
37981    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37982    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37983  fi
37984
37985    else
37986      # We're on a unix platform. Hooray! :)
37987      # First separate the path from the arguments. This will split at the first
37988      # space.
37989      complete="$AR"
37990      path="${complete%% *}"
37991      tmp="$complete EOL"
37992      arguments="${tmp#* }"
37993
37994      # Cannot rely on the command "which" here since it doesn't always work.
37995      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37996      if test -z "$is_absolute_path"; then
37997        # Path to executable is not absolute. Find it.
37998        IFS_save="$IFS"
37999        IFS=:
38000        for p in $PATH; do
38001          if test -f "$p/$path" && test -x "$p/$path"; then
38002            new_path="$p/$path"
38003            break
38004          fi
38005        done
38006        IFS="$IFS_save"
38007      else
38008        # This is an absolute path, we can use it without further modifications.
38009        new_path="$path"
38010      fi
38011
38012      if test "x$new_path" = x; then
38013        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38014$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38015        has_space=`$ECHO "$complete" | $GREP " "`
38016        if test "x$has_space" != x; then
38017          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38018$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38019        fi
38020        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38021      fi
38022    fi
38023
38024    # Now join together the path and the arguments once again
38025    if test "x$arguments" != xEOL; then
38026      new_complete="$new_path ${arguments% *}"
38027    else
38028      new_complete="$new_path"
38029    fi
38030
38031    if test "x$complete" != "x$new_complete"; then
38032      AR="$new_complete"
38033      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38034$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38035    fi
38036  fi
38037
38038
38039
38040  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38041
38042
38043  # Publish this variable in the help.
38044
38045
38046  if [ -z "${LIPO+x}" ]; then
38047    # The variable is not set by user, try to locate tool using the code snippet
38048    for ac_prog in lipo
38049do
38050  # Extract the first word of "$ac_prog", so it can be a program name with args.
38051set dummy $ac_prog; ac_word=$2
38052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38053$as_echo_n "checking for $ac_word... " >&6; }
38054if ${ac_cv_path_LIPO+:} false; then :
38055  $as_echo_n "(cached) " >&6
38056else
38057  case $LIPO in
38058  [\\/]* | ?:[\\/]*)
38059  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38060  ;;
38061  *)
38062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38063for as_dir in $PATH
38064do
38065  IFS=$as_save_IFS
38066  test -z "$as_dir" && as_dir=.
38067    for ac_exec_ext in '' $ac_executable_extensions; do
38068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38069    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38071    break 2
38072  fi
38073done
38074  done
38075IFS=$as_save_IFS
38076
38077  ;;
38078esac
38079fi
38080LIPO=$ac_cv_path_LIPO
38081if test -n "$LIPO"; then
38082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38083$as_echo "$LIPO" >&6; }
38084else
38085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38086$as_echo "no" >&6; }
38087fi
38088
38089
38090  test -n "$LIPO" && break
38091done
38092
38093  else
38094    # The variable is set, but is it from the command line or the environment?
38095
38096    # Try to remove the string !LIPO! from our list.
38097    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38098    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38099      # If it failed, the variable was not from the command line. Ignore it,
38100      # but warn the user (except for BASH, which is always set by the calling BASH).
38101      if test "xLIPO" != xBASH; then
38102        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38103$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38104      fi
38105      # Try to locate tool using the code snippet
38106      for ac_prog in lipo
38107do
38108  # Extract the first word of "$ac_prog", so it can be a program name with args.
38109set dummy $ac_prog; ac_word=$2
38110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38111$as_echo_n "checking for $ac_word... " >&6; }
38112if ${ac_cv_path_LIPO+:} false; then :
38113  $as_echo_n "(cached) " >&6
38114else
38115  case $LIPO in
38116  [\\/]* | ?:[\\/]*)
38117  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38118  ;;
38119  *)
38120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38121for as_dir in $PATH
38122do
38123  IFS=$as_save_IFS
38124  test -z "$as_dir" && as_dir=.
38125    for ac_exec_ext in '' $ac_executable_extensions; do
38126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38127    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38129    break 2
38130  fi
38131done
38132  done
38133IFS=$as_save_IFS
38134
38135  ;;
38136esac
38137fi
38138LIPO=$ac_cv_path_LIPO
38139if test -n "$LIPO"; then
38140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38141$as_echo "$LIPO" >&6; }
38142else
38143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38144$as_echo "no" >&6; }
38145fi
38146
38147
38148  test -n "$LIPO" && break
38149done
38150
38151    else
38152      # If it succeeded, then it was overridden by the user. We will use it
38153      # for the tool.
38154
38155      # First remove it from the list of overridden variables, so we can test
38156      # for unknown variables in the end.
38157      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38158
38159      # Check if we try to supply an empty value
38160      if test "x$LIPO" = x; then
38161        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38162$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38163        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38164$as_echo_n "checking for LIPO... " >&6; }
38165        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38166$as_echo "disabled" >&6; }
38167      else
38168        # Check if the provided tool contains a complete path.
38169        tool_specified="$LIPO"
38170        tool_basename="${tool_specified##*/}"
38171        if test "x$tool_basename" = "x$tool_specified"; then
38172          # A command without a complete path is provided, search $PATH.
38173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38174$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38175          # Extract the first word of "$tool_basename", so it can be a program name with args.
38176set dummy $tool_basename; ac_word=$2
38177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38178$as_echo_n "checking for $ac_word... " >&6; }
38179if ${ac_cv_path_LIPO+:} false; then :
38180  $as_echo_n "(cached) " >&6
38181else
38182  case $LIPO in
38183  [\\/]* | ?:[\\/]*)
38184  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38185  ;;
38186  *)
38187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38188for as_dir in $PATH
38189do
38190  IFS=$as_save_IFS
38191  test -z "$as_dir" && as_dir=.
38192    for ac_exec_ext in '' $ac_executable_extensions; do
38193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38194    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38196    break 2
38197  fi
38198done
38199  done
38200IFS=$as_save_IFS
38201
38202  ;;
38203esac
38204fi
38205LIPO=$ac_cv_path_LIPO
38206if test -n "$LIPO"; then
38207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38208$as_echo "$LIPO" >&6; }
38209else
38210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38211$as_echo "no" >&6; }
38212fi
38213
38214
38215          if test "x$LIPO" = x; then
38216            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38217          fi
38218        else
38219          # Otherwise we believe it is a complete path. Use it as it is.
38220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38221$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38222          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38223$as_echo_n "checking for LIPO... " >&6; }
38224          if test ! -x "$tool_specified"; then
38225            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38226$as_echo "not found" >&6; }
38227            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38228          fi
38229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38230$as_echo "$tool_specified" >&6; }
38231        fi
38232      fi
38233    fi
38234
38235  fi
38236
38237
38238
38239  # Only process if variable expands to non-empty
38240
38241  if test "x$LIPO" != x; then
38242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38243
38244  # First separate the path from the arguments. This will split at the first
38245  # space.
38246  complete="$LIPO"
38247  path="${complete%% *}"
38248  tmp="$complete EOL"
38249  arguments="${tmp#* }"
38250
38251  # Input might be given as Windows format, start by converting to
38252  # unix format.
38253  new_path=`$CYGPATH -u "$path"`
38254
38255  # Now try to locate executable using which
38256  new_path=`$WHICH "$new_path" 2> /dev/null`
38257  # bat and cmd files are not always considered executable in cygwin causing which
38258  # to not find them
38259  if test "x$new_path" = x \
38260      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38261      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38262    new_path=`$CYGPATH -u "$path"`
38263  fi
38264  if test "x$new_path" = x; then
38265    # Oops. Which didn't find the executable.
38266    # The splitting of arguments from the executable at a space might have been incorrect,
38267    # since paths with space are more likely in Windows. Give it another try with the whole
38268    # argument.
38269    path="$complete"
38270    arguments="EOL"
38271    new_path=`$CYGPATH -u "$path"`
38272    new_path=`$WHICH "$new_path" 2> /dev/null`
38273    # bat and cmd files are not always considered executable in cygwin causing which
38274    # to not find them
38275    if test "x$new_path" = x \
38276        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38277        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38278      new_path=`$CYGPATH -u "$path"`
38279    fi
38280    if test "x$new_path" = x; then
38281      # It's still not found. Now this is an unrecoverable error.
38282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38283$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38284      has_space=`$ECHO "$complete" | $GREP " "`
38285      if test "x$has_space" != x; then
38286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38288      fi
38289      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38290    fi
38291  fi
38292
38293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38296  # "foo.exe" is OK but "foo" is an error.
38297  #
38298  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38299  # It is also a way to make sure we got the proper file name for the real test later on.
38300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38301  if test "x$test_shortpath" = x; then
38302    # Short path failed, file does not exist as specified.
38303    # Try adding .exe or .cmd
38304    if test -f "${new_path}.exe"; then
38305      input_to_shortpath="${new_path}.exe"
38306    elif test -f "${new_path}.cmd"; then
38307      input_to_shortpath="${new_path}.cmd"
38308    else
38309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38310$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38311      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38312$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38313      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38314    fi
38315  else
38316    input_to_shortpath="$new_path"
38317  fi
38318
38319  # Call helper function which possibly converts this using DOS-style short mode.
38320  # If so, the updated path is stored in $new_path.
38321  new_path="$input_to_shortpath"
38322
38323  input_path="$input_to_shortpath"
38324  # Check if we need to convert this using DOS-style short mode. If the path
38325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38326  # take no chances and rewrite it.
38327  # Note: m4 eats our [], so we need to use [ and ] instead.
38328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38329  if test "x$has_forbidden_chars" != x; then
38330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38334      # Going to short mode and back again did indeed matter. Since short mode is
38335      # case insensitive, let's make it lowercase to improve readability.
38336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38337      # Now convert it back to Unix-style (cygpath)
38338      input_path=`$CYGPATH -u "$shortmode_path"`
38339      new_path="$input_path"
38340    fi
38341  fi
38342
38343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38344  if test "x$test_cygdrive_prefix" = x; then
38345    # As a simple fix, exclude /usr/bin since it's not a real path.
38346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38348      # a path prefixed by /cygdrive for fixpath to work.
38349      new_path="$CYGWIN_ROOT_PATH$input_path"
38350    fi
38351  fi
38352
38353  # remove trailing .exe if any
38354  new_path="${new_path/%.exe/}"
38355
38356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38357
38358  # First separate the path from the arguments. This will split at the first
38359  # space.
38360  complete="$LIPO"
38361  path="${complete%% *}"
38362  tmp="$complete EOL"
38363  arguments="${tmp#* }"
38364
38365  # Input might be given as Windows format, start by converting to
38366  # unix format.
38367  new_path="$path"
38368
38369  windows_path="$new_path"
38370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38371    unix_path=`$CYGPATH -u "$windows_path"`
38372    new_path="$unix_path"
38373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38375    new_path="$unix_path"
38376  fi
38377
38378
38379  # Now try to locate executable using which
38380  new_path=`$WHICH "$new_path" 2> /dev/null`
38381
38382  if test "x$new_path" = x; then
38383    # Oops. Which didn't find the executable.
38384    # The splitting of arguments from the executable at a space might have been incorrect,
38385    # since paths with space are more likely in Windows. Give it another try with the whole
38386    # argument.
38387    path="$complete"
38388    arguments="EOL"
38389    new_path="$path"
38390
38391  windows_path="$new_path"
38392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38393    unix_path=`$CYGPATH -u "$windows_path"`
38394    new_path="$unix_path"
38395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38397    new_path="$unix_path"
38398  fi
38399
38400
38401    new_path=`$WHICH "$new_path" 2> /dev/null`
38402    # bat and cmd files are not always considered executable in MSYS causing which
38403    # to not find them
38404    if test "x$new_path" = x \
38405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38407      new_path="$path"
38408
38409  windows_path="$new_path"
38410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38411    unix_path=`$CYGPATH -u "$windows_path"`
38412    new_path="$unix_path"
38413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38415    new_path="$unix_path"
38416  fi
38417
38418    fi
38419
38420    if test "x$new_path" = x; then
38421      # It's still not found. Now this is an unrecoverable error.
38422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38423$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38424      has_space=`$ECHO "$complete" | $GREP " "`
38425      if test "x$has_space" != x; then
38426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38428      fi
38429      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38430    fi
38431  fi
38432
38433  # Now new_path has a complete unix path to the binary
38434  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38435    # Keep paths in /bin as-is, but remove trailing .exe if any
38436    new_path="${new_path/%.exe/}"
38437    # Do not save /bin paths to all_fixpath_prefixes!
38438  else
38439    # Not in mixed or Windows style, start by that.
38440    new_path=`cmd //c echo $new_path`
38441
38442  input_path="$new_path"
38443  # Check if we need to convert this using DOS-style short mode. If the path
38444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38445  # take no chances and rewrite it.
38446  # Note: m4 eats our [], so we need to use [ and ] instead.
38447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38448  if test "x$has_forbidden_chars" != x; then
38449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38451  fi
38452
38453    # Output is in $new_path
38454
38455  windows_path="$new_path"
38456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38457    unix_path=`$CYGPATH -u "$windows_path"`
38458    new_path="$unix_path"
38459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38461    new_path="$unix_path"
38462  fi
38463
38464    # remove trailing .exe if any
38465    new_path="${new_path/%.exe/}"
38466
38467    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38468    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38469  fi
38470
38471    else
38472      # We're on a unix platform. Hooray! :)
38473      # First separate the path from the arguments. This will split at the first
38474      # space.
38475      complete="$LIPO"
38476      path="${complete%% *}"
38477      tmp="$complete EOL"
38478      arguments="${tmp#* }"
38479
38480      # Cannot rely on the command "which" here since it doesn't always work.
38481      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38482      if test -z "$is_absolute_path"; then
38483        # Path to executable is not absolute. Find it.
38484        IFS_save="$IFS"
38485        IFS=:
38486        for p in $PATH; do
38487          if test -f "$p/$path" && test -x "$p/$path"; then
38488            new_path="$p/$path"
38489            break
38490          fi
38491        done
38492        IFS="$IFS_save"
38493      else
38494        # This is an absolute path, we can use it without further modifications.
38495        new_path="$path"
38496      fi
38497
38498      if test "x$new_path" = x; then
38499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38500$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38501        has_space=`$ECHO "$complete" | $GREP " "`
38502        if test "x$has_space" != x; then
38503          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38504$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38505        fi
38506        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38507      fi
38508    fi
38509
38510    # Now join together the path and the arguments once again
38511    if test "x$arguments" != xEOL; then
38512      new_complete="$new_path ${arguments% *}"
38513    else
38514      new_complete="$new_path"
38515    fi
38516
38517    if test "x$complete" != "x$new_complete"; then
38518      LIPO="$new_complete"
38519      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38520$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38521    fi
38522  fi
38523
38524  fi
38525
38526  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38527    # Extract the first word of "mt", so it can be a program name with args.
38528set dummy mt; ac_word=$2
38529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38530$as_echo_n "checking for $ac_word... " >&6; }
38531if ${ac_cv_prog_MT+:} false; then :
38532  $as_echo_n "(cached) " >&6
38533else
38534  if test -n "$MT"; then
38535  ac_cv_prog_MT="$MT" # Let the user override the test.
38536else
38537  ac_prog_rejected=no
38538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38539for as_dir in $PATH
38540do
38541  IFS=$as_save_IFS
38542  test -z "$as_dir" && as_dir=.
38543    for ac_exec_ext in '' $ac_executable_extensions; do
38544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38545    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38546       ac_prog_rejected=yes
38547       continue
38548     fi
38549    ac_cv_prog_MT="mt"
38550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38551    break 2
38552  fi
38553done
38554  done
38555IFS=$as_save_IFS
38556
38557if test $ac_prog_rejected = yes; then
38558  # We found a bogon in the path, so make sure we never use it.
38559  set dummy $ac_cv_prog_MT
38560  shift
38561  if test $# != 0; then
38562    # We chose a different compiler from the bogus one.
38563    # However, it has the same basename, so the bogon will be chosen
38564    # first if we set MT to just the basename; use the full file name.
38565    shift
38566    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38567  fi
38568fi
38569fi
38570fi
38571MT=$ac_cv_prog_MT
38572if test -n "$MT"; then
38573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38574$as_echo "$MT" >&6; }
38575else
38576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38577$as_echo "no" >&6; }
38578fi
38579
38580
38581
38582  # Only process if variable expands to non-empty
38583
38584  if test "x$MT" != x; then
38585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38586
38587  # First separate the path from the arguments. This will split at the first
38588  # space.
38589  complete="$MT"
38590  path="${complete%% *}"
38591  tmp="$complete EOL"
38592  arguments="${tmp#* }"
38593
38594  # Input might be given as Windows format, start by converting to
38595  # unix format.
38596  new_path=`$CYGPATH -u "$path"`
38597
38598  # Now try to locate executable using which
38599  new_path=`$WHICH "$new_path" 2> /dev/null`
38600  # bat and cmd files are not always considered executable in cygwin causing which
38601  # to not find them
38602  if test "x$new_path" = x \
38603      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38604      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38605    new_path=`$CYGPATH -u "$path"`
38606  fi
38607  if test "x$new_path" = x; then
38608    # Oops. Which didn't find the executable.
38609    # The splitting of arguments from the executable at a space might have been incorrect,
38610    # since paths with space are more likely in Windows. Give it another try with the whole
38611    # argument.
38612    path="$complete"
38613    arguments="EOL"
38614    new_path=`$CYGPATH -u "$path"`
38615    new_path=`$WHICH "$new_path" 2> /dev/null`
38616    # bat and cmd files are not always considered executable in cygwin causing which
38617    # to not find them
38618    if test "x$new_path" = x \
38619        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38620        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38621      new_path=`$CYGPATH -u "$path"`
38622    fi
38623    if test "x$new_path" = x; then
38624      # It's still not found. Now this is an unrecoverable error.
38625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38626$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38627      has_space=`$ECHO "$complete" | $GREP " "`
38628      if test "x$has_space" != x; then
38629        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38630$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38631      fi
38632      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38633    fi
38634  fi
38635
38636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38639  # "foo.exe" is OK but "foo" is an error.
38640  #
38641  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38642  # It is also a way to make sure we got the proper file name for the real test later on.
38643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38644  if test "x$test_shortpath" = x; then
38645    # Short path failed, file does not exist as specified.
38646    # Try adding .exe or .cmd
38647    if test -f "${new_path}.exe"; then
38648      input_to_shortpath="${new_path}.exe"
38649    elif test -f "${new_path}.cmd"; then
38650      input_to_shortpath="${new_path}.cmd"
38651    else
38652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38653$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38654      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38655$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38656      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38657    fi
38658  else
38659    input_to_shortpath="$new_path"
38660  fi
38661
38662  # Call helper function which possibly converts this using DOS-style short mode.
38663  # If so, the updated path is stored in $new_path.
38664  new_path="$input_to_shortpath"
38665
38666  input_path="$input_to_shortpath"
38667  # Check if we need to convert this using DOS-style short mode. If the path
38668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38669  # take no chances and rewrite it.
38670  # Note: m4 eats our [], so we need to use [ and ] instead.
38671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38672  if test "x$has_forbidden_chars" != x; then
38673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38677      # Going to short mode and back again did indeed matter. Since short mode is
38678      # case insensitive, let's make it lowercase to improve readability.
38679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38680      # Now convert it back to Unix-style (cygpath)
38681      input_path=`$CYGPATH -u "$shortmode_path"`
38682      new_path="$input_path"
38683    fi
38684  fi
38685
38686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38687  if test "x$test_cygdrive_prefix" = x; then
38688    # As a simple fix, exclude /usr/bin since it's not a real path.
38689    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38691      # a path prefixed by /cygdrive for fixpath to work.
38692      new_path="$CYGWIN_ROOT_PATH$input_path"
38693    fi
38694  fi
38695
38696  # remove trailing .exe if any
38697  new_path="${new_path/%.exe/}"
38698
38699    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38700
38701  # First separate the path from the arguments. This will split at the first
38702  # space.
38703  complete="$MT"
38704  path="${complete%% *}"
38705  tmp="$complete EOL"
38706  arguments="${tmp#* }"
38707
38708  # Input might be given as Windows format, start by converting to
38709  # unix format.
38710  new_path="$path"
38711
38712  windows_path="$new_path"
38713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38714    unix_path=`$CYGPATH -u "$windows_path"`
38715    new_path="$unix_path"
38716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38718    new_path="$unix_path"
38719  fi
38720
38721
38722  # Now try to locate executable using which
38723  new_path=`$WHICH "$new_path" 2> /dev/null`
38724
38725  if test "x$new_path" = x; then
38726    # Oops. Which didn't find the executable.
38727    # The splitting of arguments from the executable at a space might have been incorrect,
38728    # since paths with space are more likely in Windows. Give it another try with the whole
38729    # argument.
38730    path="$complete"
38731    arguments="EOL"
38732    new_path="$path"
38733
38734  windows_path="$new_path"
38735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38736    unix_path=`$CYGPATH -u "$windows_path"`
38737    new_path="$unix_path"
38738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38740    new_path="$unix_path"
38741  fi
38742
38743
38744    new_path=`$WHICH "$new_path" 2> /dev/null`
38745    # bat and cmd files are not always considered executable in MSYS causing which
38746    # to not find them
38747    if test "x$new_path" = x \
38748        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38749        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38750      new_path="$path"
38751
38752  windows_path="$new_path"
38753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38754    unix_path=`$CYGPATH -u "$windows_path"`
38755    new_path="$unix_path"
38756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38758    new_path="$unix_path"
38759  fi
38760
38761    fi
38762
38763    if test "x$new_path" = x; then
38764      # It's still not found. Now this is an unrecoverable error.
38765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38766$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38767      has_space=`$ECHO "$complete" | $GREP " "`
38768      if test "x$has_space" != x; then
38769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38771      fi
38772      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38773    fi
38774  fi
38775
38776  # Now new_path has a complete unix path to the binary
38777  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38778    # Keep paths in /bin as-is, but remove trailing .exe if any
38779    new_path="${new_path/%.exe/}"
38780    # Do not save /bin paths to all_fixpath_prefixes!
38781  else
38782    # Not in mixed or Windows style, start by that.
38783    new_path=`cmd //c echo $new_path`
38784
38785  input_path="$new_path"
38786  # Check if we need to convert this using DOS-style short mode. If the path
38787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38788  # take no chances and rewrite it.
38789  # Note: m4 eats our [], so we need to use [ and ] instead.
38790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38791  if test "x$has_forbidden_chars" != x; then
38792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38794  fi
38795
38796    # Output is in $new_path
38797
38798  windows_path="$new_path"
38799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38800    unix_path=`$CYGPATH -u "$windows_path"`
38801    new_path="$unix_path"
38802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38804    new_path="$unix_path"
38805  fi
38806
38807    # remove trailing .exe if any
38808    new_path="${new_path/%.exe/}"
38809
38810    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38811    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38812  fi
38813
38814    else
38815      # We're on a unix platform. Hooray! :)
38816      # First separate the path from the arguments. This will split at the first
38817      # space.
38818      complete="$MT"
38819      path="${complete%% *}"
38820      tmp="$complete EOL"
38821      arguments="${tmp#* }"
38822
38823      # Cannot rely on the command "which" here since it doesn't always work.
38824      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38825      if test -z "$is_absolute_path"; then
38826        # Path to executable is not absolute. Find it.
38827        IFS_save="$IFS"
38828        IFS=:
38829        for p in $PATH; do
38830          if test -f "$p/$path" && test -x "$p/$path"; then
38831            new_path="$p/$path"
38832            break
38833          fi
38834        done
38835        IFS="$IFS_save"
38836      else
38837        # This is an absolute path, we can use it without further modifications.
38838        new_path="$path"
38839      fi
38840
38841      if test "x$new_path" = x; then
38842        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38843$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38844        has_space=`$ECHO "$complete" | $GREP " "`
38845        if test "x$has_space" != x; then
38846          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38847$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38848        fi
38849        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38850      fi
38851    fi
38852
38853    # Now join together the path and the arguments once again
38854    if test "x$arguments" != xEOL; then
38855      new_complete="$new_path ${arguments% *}"
38856    else
38857      new_complete="$new_path"
38858    fi
38859
38860    if test "x$complete" != "x$new_complete"; then
38861      MT="$new_complete"
38862      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38863$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38864    fi
38865  fi
38866
38867    # Setup the resource compiler (RC)
38868    # Extract the first word of "rc", so it can be a program name with args.
38869set dummy rc; ac_word=$2
38870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38871$as_echo_n "checking for $ac_word... " >&6; }
38872if ${ac_cv_prog_RC+:} false; then :
38873  $as_echo_n "(cached) " >&6
38874else
38875  if test -n "$RC"; then
38876  ac_cv_prog_RC="$RC" # Let the user override the test.
38877else
38878  ac_prog_rejected=no
38879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38880for as_dir in $PATH
38881do
38882  IFS=$as_save_IFS
38883  test -z "$as_dir" && as_dir=.
38884    for ac_exec_ext in '' $ac_executable_extensions; do
38885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38886    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38887       ac_prog_rejected=yes
38888       continue
38889     fi
38890    ac_cv_prog_RC="rc"
38891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38892    break 2
38893  fi
38894done
38895  done
38896IFS=$as_save_IFS
38897
38898if test $ac_prog_rejected = yes; then
38899  # We found a bogon in the path, so make sure we never use it.
38900  set dummy $ac_cv_prog_RC
38901  shift
38902  if test $# != 0; then
38903    # We chose a different compiler from the bogus one.
38904    # However, it has the same basename, so the bogon will be chosen
38905    # first if we set RC to just the basename; use the full file name.
38906    shift
38907    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38908  fi
38909fi
38910fi
38911fi
38912RC=$ac_cv_prog_RC
38913if test -n "$RC"; then
38914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38915$as_echo "$RC" >&6; }
38916else
38917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38918$as_echo "no" >&6; }
38919fi
38920
38921
38922
38923  # Only process if variable expands to non-empty
38924
38925  if test "x$RC" != x; then
38926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38927
38928  # First separate the path from the arguments. This will split at the first
38929  # space.
38930  complete="$RC"
38931  path="${complete%% *}"
38932  tmp="$complete EOL"
38933  arguments="${tmp#* }"
38934
38935  # Input might be given as Windows format, start by converting to
38936  # unix format.
38937  new_path=`$CYGPATH -u "$path"`
38938
38939  # Now try to locate executable using which
38940  new_path=`$WHICH "$new_path" 2> /dev/null`
38941  # bat and cmd files are not always considered executable in cygwin causing which
38942  # to not find them
38943  if test "x$new_path" = x \
38944      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38945      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38946    new_path=`$CYGPATH -u "$path"`
38947  fi
38948  if test "x$new_path" = x; then
38949    # Oops. Which didn't find the executable.
38950    # The splitting of arguments from the executable at a space might have been incorrect,
38951    # since paths with space are more likely in Windows. Give it another try with the whole
38952    # argument.
38953    path="$complete"
38954    arguments="EOL"
38955    new_path=`$CYGPATH -u "$path"`
38956    new_path=`$WHICH "$new_path" 2> /dev/null`
38957    # bat and cmd files are not always considered executable in cygwin causing which
38958    # to not find them
38959    if test "x$new_path" = x \
38960        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38961        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38962      new_path=`$CYGPATH -u "$path"`
38963    fi
38964    if test "x$new_path" = x; then
38965      # It's still not found. Now this is an unrecoverable error.
38966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38967$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38968      has_space=`$ECHO "$complete" | $GREP " "`
38969      if test "x$has_space" != x; then
38970        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38971$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38972      fi
38973      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38974    fi
38975  fi
38976
38977  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38978  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38979  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38980  # "foo.exe" is OK but "foo" is an error.
38981  #
38982  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38983  # It is also a way to make sure we got the proper file name for the real test later on.
38984  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38985  if test "x$test_shortpath" = x; then
38986    # Short path failed, file does not exist as specified.
38987    # Try adding .exe or .cmd
38988    if test -f "${new_path}.exe"; then
38989      input_to_shortpath="${new_path}.exe"
38990    elif test -f "${new_path}.cmd"; then
38991      input_to_shortpath="${new_path}.cmd"
38992    else
38993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38994$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38995      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38996$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38997      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38998    fi
38999  else
39000    input_to_shortpath="$new_path"
39001  fi
39002
39003  # Call helper function which possibly converts this using DOS-style short mode.
39004  # If so, the updated path is stored in $new_path.
39005  new_path="$input_to_shortpath"
39006
39007  input_path="$input_to_shortpath"
39008  # Check if we need to convert this using DOS-style short mode. If the path
39009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39010  # take no chances and rewrite it.
39011  # Note: m4 eats our [], so we need to use [ and ] instead.
39012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39013  if test "x$has_forbidden_chars" != x; then
39014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39018      # Going to short mode and back again did indeed matter. Since short mode is
39019      # case insensitive, let's make it lowercase to improve readability.
39020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39021      # Now convert it back to Unix-style (cygpath)
39022      input_path=`$CYGPATH -u "$shortmode_path"`
39023      new_path="$input_path"
39024    fi
39025  fi
39026
39027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39028  if test "x$test_cygdrive_prefix" = x; then
39029    # As a simple fix, exclude /usr/bin since it's not a real path.
39030    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39032      # a path prefixed by /cygdrive for fixpath to work.
39033      new_path="$CYGWIN_ROOT_PATH$input_path"
39034    fi
39035  fi
39036
39037  # remove trailing .exe if any
39038  new_path="${new_path/%.exe/}"
39039
39040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39041
39042  # First separate the path from the arguments. This will split at the first
39043  # space.
39044  complete="$RC"
39045  path="${complete%% *}"
39046  tmp="$complete EOL"
39047  arguments="${tmp#* }"
39048
39049  # Input might be given as Windows format, start by converting to
39050  # unix format.
39051  new_path="$path"
39052
39053  windows_path="$new_path"
39054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39055    unix_path=`$CYGPATH -u "$windows_path"`
39056    new_path="$unix_path"
39057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39059    new_path="$unix_path"
39060  fi
39061
39062
39063  # Now try to locate executable using which
39064  new_path=`$WHICH "$new_path" 2> /dev/null`
39065
39066  if test "x$new_path" = x; then
39067    # Oops. Which didn't find the executable.
39068    # The splitting of arguments from the executable at a space might have been incorrect,
39069    # since paths with space are more likely in Windows. Give it another try with the whole
39070    # argument.
39071    path="$complete"
39072    arguments="EOL"
39073    new_path="$path"
39074
39075  windows_path="$new_path"
39076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39077    unix_path=`$CYGPATH -u "$windows_path"`
39078    new_path="$unix_path"
39079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39081    new_path="$unix_path"
39082  fi
39083
39084
39085    new_path=`$WHICH "$new_path" 2> /dev/null`
39086    # bat and cmd files are not always considered executable in MSYS causing which
39087    # to not find them
39088    if test "x$new_path" = x \
39089        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39090        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39091      new_path="$path"
39092
39093  windows_path="$new_path"
39094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39095    unix_path=`$CYGPATH -u "$windows_path"`
39096    new_path="$unix_path"
39097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39099    new_path="$unix_path"
39100  fi
39101
39102    fi
39103
39104    if test "x$new_path" = x; then
39105      # It's still not found. Now this is an unrecoverable error.
39106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39107$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39108      has_space=`$ECHO "$complete" | $GREP " "`
39109      if test "x$has_space" != x; then
39110        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39111$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39112      fi
39113      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39114    fi
39115  fi
39116
39117  # Now new_path has a complete unix path to the binary
39118  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39119    # Keep paths in /bin as-is, but remove trailing .exe if any
39120    new_path="${new_path/%.exe/}"
39121    # Do not save /bin paths to all_fixpath_prefixes!
39122  else
39123    # Not in mixed or Windows style, start by that.
39124    new_path=`cmd //c echo $new_path`
39125
39126  input_path="$new_path"
39127  # Check if we need to convert this using DOS-style short mode. If the path
39128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39129  # take no chances and rewrite it.
39130  # Note: m4 eats our [], so we need to use [ and ] instead.
39131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39132  if test "x$has_forbidden_chars" != x; then
39133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39135  fi
39136
39137    # Output is in $new_path
39138
39139  windows_path="$new_path"
39140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39141    unix_path=`$CYGPATH -u "$windows_path"`
39142    new_path="$unix_path"
39143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39145    new_path="$unix_path"
39146  fi
39147
39148    # remove trailing .exe if any
39149    new_path="${new_path/%.exe/}"
39150
39151    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39152    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39153  fi
39154
39155    else
39156      # We're on a unix platform. Hooray! :)
39157      # First separate the path from the arguments. This will split at the first
39158      # space.
39159      complete="$RC"
39160      path="${complete%% *}"
39161      tmp="$complete EOL"
39162      arguments="${tmp#* }"
39163
39164      # Cannot rely on the command "which" here since it doesn't always work.
39165      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39166      if test -z "$is_absolute_path"; then
39167        # Path to executable is not absolute. Find it.
39168        IFS_save="$IFS"
39169        IFS=:
39170        for p in $PATH; do
39171          if test -f "$p/$path" && test -x "$p/$path"; then
39172            new_path="$p/$path"
39173            break
39174          fi
39175        done
39176        IFS="$IFS_save"
39177      else
39178        # This is an absolute path, we can use it without further modifications.
39179        new_path="$path"
39180      fi
39181
39182      if test "x$new_path" = x; then
39183        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39184$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39185        has_space=`$ECHO "$complete" | $GREP " "`
39186        if test "x$has_space" != x; then
39187          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39188$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39189        fi
39190        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39191      fi
39192    fi
39193
39194    # Now join together the path and the arguments once again
39195    if test "x$arguments" != xEOL; then
39196      new_complete="$new_path ${arguments% *}"
39197    else
39198      new_complete="$new_path"
39199    fi
39200
39201    if test "x$complete" != "x$new_complete"; then
39202      RC="$new_complete"
39203      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39204$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39205    fi
39206  fi
39207
39208    # Extract the first word of "dumpbin", so it can be a program name with args.
39209set dummy dumpbin; ac_word=$2
39210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39211$as_echo_n "checking for $ac_word... " >&6; }
39212if ${ac_cv_prog_DUMPBIN+:} false; then :
39213  $as_echo_n "(cached) " >&6
39214else
39215  if test -n "$DUMPBIN"; then
39216  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39217else
39218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39219for as_dir in $PATH
39220do
39221  IFS=$as_save_IFS
39222  test -z "$as_dir" && as_dir=.
39223    for ac_exec_ext in '' $ac_executable_extensions; do
39224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39225    ac_cv_prog_DUMPBIN="dumpbin"
39226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39227    break 2
39228  fi
39229done
39230  done
39231IFS=$as_save_IFS
39232
39233fi
39234fi
39235DUMPBIN=$ac_cv_prog_DUMPBIN
39236if test -n "$DUMPBIN"; then
39237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39238$as_echo "$DUMPBIN" >&6; }
39239else
39240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39241$as_echo "no" >&6; }
39242fi
39243
39244
39245
39246  # Only process if variable expands to non-empty
39247
39248  if test "x$DUMPBIN" != x; then
39249    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39250
39251  # First separate the path from the arguments. This will split at the first
39252  # space.
39253  complete="$DUMPBIN"
39254  path="${complete%% *}"
39255  tmp="$complete EOL"
39256  arguments="${tmp#* }"
39257
39258  # Input might be given as Windows format, start by converting to
39259  # unix format.
39260  new_path=`$CYGPATH -u "$path"`
39261
39262  # Now try to locate executable using which
39263  new_path=`$WHICH "$new_path" 2> /dev/null`
39264  # bat and cmd files are not always considered executable in cygwin causing which
39265  # to not find them
39266  if test "x$new_path" = x \
39267      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39268      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39269    new_path=`$CYGPATH -u "$path"`
39270  fi
39271  if test "x$new_path" = x; then
39272    # Oops. Which didn't find the executable.
39273    # The splitting of arguments from the executable at a space might have been incorrect,
39274    # since paths with space are more likely in Windows. Give it another try with the whole
39275    # argument.
39276    path="$complete"
39277    arguments="EOL"
39278    new_path=`$CYGPATH -u "$path"`
39279    new_path=`$WHICH "$new_path" 2> /dev/null`
39280    # bat and cmd files are not always considered executable in cygwin causing which
39281    # to not find them
39282    if test "x$new_path" = x \
39283        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39284        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39285      new_path=`$CYGPATH -u "$path"`
39286    fi
39287    if test "x$new_path" = x; then
39288      # It's still not found. Now this is an unrecoverable error.
39289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39290$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39291      has_space=`$ECHO "$complete" | $GREP " "`
39292      if test "x$has_space" != x; then
39293        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39294$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39295      fi
39296      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39297    fi
39298  fi
39299
39300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39303  # "foo.exe" is OK but "foo" is an error.
39304  #
39305  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39306  # It is also a way to make sure we got the proper file name for the real test later on.
39307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39308  if test "x$test_shortpath" = x; then
39309    # Short path failed, file does not exist as specified.
39310    # Try adding .exe or .cmd
39311    if test -f "${new_path}.exe"; then
39312      input_to_shortpath="${new_path}.exe"
39313    elif test -f "${new_path}.cmd"; then
39314      input_to_shortpath="${new_path}.cmd"
39315    else
39316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39317$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39318      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39319$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39320      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39321    fi
39322  else
39323    input_to_shortpath="$new_path"
39324  fi
39325
39326  # Call helper function which possibly converts this using DOS-style short mode.
39327  # If so, the updated path is stored in $new_path.
39328  new_path="$input_to_shortpath"
39329
39330  input_path="$input_to_shortpath"
39331  # Check if we need to convert this using DOS-style short mode. If the path
39332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39333  # take no chances and rewrite it.
39334  # Note: m4 eats our [], so we need to use [ and ] instead.
39335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39336  if test "x$has_forbidden_chars" != x; then
39337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39341      # Going to short mode and back again did indeed matter. Since short mode is
39342      # case insensitive, let's make it lowercase to improve readability.
39343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39344      # Now convert it back to Unix-style (cygpath)
39345      input_path=`$CYGPATH -u "$shortmode_path"`
39346      new_path="$input_path"
39347    fi
39348  fi
39349
39350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39351  if test "x$test_cygdrive_prefix" = x; then
39352    # As a simple fix, exclude /usr/bin since it's not a real path.
39353    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39355      # a path prefixed by /cygdrive for fixpath to work.
39356      new_path="$CYGWIN_ROOT_PATH$input_path"
39357    fi
39358  fi
39359
39360  # remove trailing .exe if any
39361  new_path="${new_path/%.exe/}"
39362
39363    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39364
39365  # First separate the path from the arguments. This will split at the first
39366  # space.
39367  complete="$DUMPBIN"
39368  path="${complete%% *}"
39369  tmp="$complete EOL"
39370  arguments="${tmp#* }"
39371
39372  # Input might be given as Windows format, start by converting to
39373  # unix format.
39374  new_path="$path"
39375
39376  windows_path="$new_path"
39377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39378    unix_path=`$CYGPATH -u "$windows_path"`
39379    new_path="$unix_path"
39380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39382    new_path="$unix_path"
39383  fi
39384
39385
39386  # Now try to locate executable using which
39387  new_path=`$WHICH "$new_path" 2> /dev/null`
39388
39389  if test "x$new_path" = x; then
39390    # Oops. Which didn't find the executable.
39391    # The splitting of arguments from the executable at a space might have been incorrect,
39392    # since paths with space are more likely in Windows. Give it another try with the whole
39393    # argument.
39394    path="$complete"
39395    arguments="EOL"
39396    new_path="$path"
39397
39398  windows_path="$new_path"
39399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39400    unix_path=`$CYGPATH -u "$windows_path"`
39401    new_path="$unix_path"
39402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39404    new_path="$unix_path"
39405  fi
39406
39407
39408    new_path=`$WHICH "$new_path" 2> /dev/null`
39409    # bat and cmd files are not always considered executable in MSYS causing which
39410    # to not find them
39411    if test "x$new_path" = x \
39412        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39413        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39414      new_path="$path"
39415
39416  windows_path="$new_path"
39417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39418    unix_path=`$CYGPATH -u "$windows_path"`
39419    new_path="$unix_path"
39420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39422    new_path="$unix_path"
39423  fi
39424
39425    fi
39426
39427    if test "x$new_path" = x; then
39428      # It's still not found. Now this is an unrecoverable error.
39429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39430$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39431      has_space=`$ECHO "$complete" | $GREP " "`
39432      if test "x$has_space" != x; then
39433        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39435      fi
39436      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39437    fi
39438  fi
39439
39440  # Now new_path has a complete unix path to the binary
39441  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39442    # Keep paths in /bin as-is, but remove trailing .exe if any
39443    new_path="${new_path/%.exe/}"
39444    # Do not save /bin paths to all_fixpath_prefixes!
39445  else
39446    # Not in mixed or Windows style, start by that.
39447    new_path=`cmd //c echo $new_path`
39448
39449  input_path="$new_path"
39450  # Check if we need to convert this using DOS-style short mode. If the path
39451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39452  # take no chances and rewrite it.
39453  # Note: m4 eats our [], so we need to use [ and ] instead.
39454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39455  if test "x$has_forbidden_chars" != x; then
39456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39458  fi
39459
39460    # Output is in $new_path
39461
39462  windows_path="$new_path"
39463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39464    unix_path=`$CYGPATH -u "$windows_path"`
39465    new_path="$unix_path"
39466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39468    new_path="$unix_path"
39469  fi
39470
39471    # remove trailing .exe if any
39472    new_path="${new_path/%.exe/}"
39473
39474    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39475    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39476  fi
39477
39478    else
39479      # We're on a unix platform. Hooray! :)
39480      # First separate the path from the arguments. This will split at the first
39481      # space.
39482      complete="$DUMPBIN"
39483      path="${complete%% *}"
39484      tmp="$complete EOL"
39485      arguments="${tmp#* }"
39486
39487      # Cannot rely on the command "which" here since it doesn't always work.
39488      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39489      if test -z "$is_absolute_path"; then
39490        # Path to executable is not absolute. Find it.
39491        IFS_save="$IFS"
39492        IFS=:
39493        for p in $PATH; do
39494          if test -f "$p/$path" && test -x "$p/$path"; then
39495            new_path="$p/$path"
39496            break
39497          fi
39498        done
39499        IFS="$IFS_save"
39500      else
39501        # This is an absolute path, we can use it without further modifications.
39502        new_path="$path"
39503      fi
39504
39505      if test "x$new_path" = x; then
39506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39507$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39508        has_space=`$ECHO "$complete" | $GREP " "`
39509        if test "x$has_space" != x; then
39510          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39511$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39512        fi
39513        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39514      fi
39515    fi
39516
39517    # Now join together the path and the arguments once again
39518    if test "x$arguments" != xEOL; then
39519      new_complete="$new_path ${arguments% *}"
39520    else
39521      new_complete="$new_path"
39522    fi
39523
39524    if test "x$complete" != "x$new_complete"; then
39525      DUMPBIN="$new_complete"
39526      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39527$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39528    fi
39529  fi
39530
39531    # We need to check for 'msbuild.exe' because at the place where we expect to
39532    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39533    # won't find the 'msbuild.exe' executable in that case (and the
39534    # 'ac_executable_extensions' is unusable due to performance reasons).
39535    # Notice that we intentionally don't fix up the path to MSBUILD because we
39536    # will call it in a DOS shell during freetype detection on Windows (see
39537    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39538    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39539set dummy msbuild.exe; ac_word=$2
39540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39541$as_echo_n "checking for $ac_word... " >&6; }
39542if ${ac_cv_prog_MSBUILD+:} false; then :
39543  $as_echo_n "(cached) " >&6
39544else
39545  if test -n "$MSBUILD"; then
39546  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39547else
39548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39549for as_dir in $PATH
39550do
39551  IFS=$as_save_IFS
39552  test -z "$as_dir" && as_dir=.
39553    for ac_exec_ext in '' $ac_executable_extensions; do
39554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39555    ac_cv_prog_MSBUILD="msbuild.exe"
39556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39557    break 2
39558  fi
39559done
39560  done
39561IFS=$as_save_IFS
39562
39563fi
39564fi
39565MSBUILD=$ac_cv_prog_MSBUILD
39566if test -n "$MSBUILD"; then
39567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39568$as_echo "$MSBUILD" >&6; }
39569else
39570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39571$as_echo "no" >&6; }
39572fi
39573
39574
39575  fi
39576
39577  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39578
39579
39580  # Publish this variable in the help.
39581
39582
39583  if [ -z "${STRIP+x}" ]; then
39584    # The variable is not set by user, try to locate tool using the code snippet
39585    for ac_prog in strip
39586do
39587  # Extract the first word of "$ac_prog", so it can be a program name with args.
39588set dummy $ac_prog; ac_word=$2
39589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39590$as_echo_n "checking for $ac_word... " >&6; }
39591if ${ac_cv_path_STRIP+:} false; then :
39592  $as_echo_n "(cached) " >&6
39593else
39594  case $STRIP in
39595  [\\/]* | ?:[\\/]*)
39596  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39597  ;;
39598  *)
39599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39600for as_dir in $PATH
39601do
39602  IFS=$as_save_IFS
39603  test -z "$as_dir" && as_dir=.
39604    for ac_exec_ext in '' $ac_executable_extensions; do
39605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39606    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39608    break 2
39609  fi
39610done
39611  done
39612IFS=$as_save_IFS
39613
39614  ;;
39615esac
39616fi
39617STRIP=$ac_cv_path_STRIP
39618if test -n "$STRIP"; then
39619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39620$as_echo "$STRIP" >&6; }
39621else
39622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39623$as_echo "no" >&6; }
39624fi
39625
39626
39627  test -n "$STRIP" && break
39628done
39629
39630  else
39631    # The variable is set, but is it from the command line or the environment?
39632
39633    # Try to remove the string !STRIP! from our list.
39634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39636      # If it failed, the variable was not from the command line. Ignore it,
39637      # but warn the user (except for BASH, which is always set by the calling BASH).
39638      if test "xSTRIP" != xBASH; then
39639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39640$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39641      fi
39642      # Try to locate tool using the code snippet
39643      for ac_prog in strip
39644do
39645  # Extract the first word of "$ac_prog", so it can be a program name with args.
39646set dummy $ac_prog; ac_word=$2
39647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39648$as_echo_n "checking for $ac_word... " >&6; }
39649if ${ac_cv_path_STRIP+:} false; then :
39650  $as_echo_n "(cached) " >&6
39651else
39652  case $STRIP in
39653  [\\/]* | ?:[\\/]*)
39654  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39655  ;;
39656  *)
39657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39658for as_dir in $PATH
39659do
39660  IFS=$as_save_IFS
39661  test -z "$as_dir" && as_dir=.
39662    for ac_exec_ext in '' $ac_executable_extensions; do
39663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39664    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39666    break 2
39667  fi
39668done
39669  done
39670IFS=$as_save_IFS
39671
39672  ;;
39673esac
39674fi
39675STRIP=$ac_cv_path_STRIP
39676if test -n "$STRIP"; then
39677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39678$as_echo "$STRIP" >&6; }
39679else
39680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39681$as_echo "no" >&6; }
39682fi
39683
39684
39685  test -n "$STRIP" && break
39686done
39687
39688    else
39689      # If it succeeded, then it was overridden by the user. We will use it
39690      # for the tool.
39691
39692      # First remove it from the list of overridden variables, so we can test
39693      # for unknown variables in the end.
39694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39695
39696      # Check if we try to supply an empty value
39697      if test "x$STRIP" = x; then
39698        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39699$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39701$as_echo_n "checking for STRIP... " >&6; }
39702        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39703$as_echo "disabled" >&6; }
39704      else
39705        # Check if the provided tool contains a complete path.
39706        tool_specified="$STRIP"
39707        tool_basename="${tool_specified##*/}"
39708        if test "x$tool_basename" = "x$tool_specified"; then
39709          # A command without a complete path is provided, search $PATH.
39710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39711$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39712          # Extract the first word of "$tool_basename", so it can be a program name with args.
39713set dummy $tool_basename; ac_word=$2
39714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39715$as_echo_n "checking for $ac_word... " >&6; }
39716if ${ac_cv_path_STRIP+:} false; then :
39717  $as_echo_n "(cached) " >&6
39718else
39719  case $STRIP in
39720  [\\/]* | ?:[\\/]*)
39721  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39722  ;;
39723  *)
39724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39725for as_dir in $PATH
39726do
39727  IFS=$as_save_IFS
39728  test -z "$as_dir" && as_dir=.
39729    for ac_exec_ext in '' $ac_executable_extensions; do
39730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39731    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39733    break 2
39734  fi
39735done
39736  done
39737IFS=$as_save_IFS
39738
39739  ;;
39740esac
39741fi
39742STRIP=$ac_cv_path_STRIP
39743if test -n "$STRIP"; then
39744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39745$as_echo "$STRIP" >&6; }
39746else
39747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39748$as_echo "no" >&6; }
39749fi
39750
39751
39752          if test "x$STRIP" = x; then
39753            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39754          fi
39755        else
39756          # Otherwise we believe it is a complete path. Use it as it is.
39757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39758$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39759          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39760$as_echo_n "checking for STRIP... " >&6; }
39761          if test ! -x "$tool_specified"; then
39762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39763$as_echo "not found" >&6; }
39764            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39765          fi
39766          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39767$as_echo "$tool_specified" >&6; }
39768        fi
39769      fi
39770    fi
39771
39772  fi
39773
39774
39775
39776  # Only process if variable expands to non-empty
39777
39778  if test "x$STRIP" != x; then
39779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39780
39781  # First separate the path from the arguments. This will split at the first
39782  # space.
39783  complete="$STRIP"
39784  path="${complete%% *}"
39785  tmp="$complete EOL"
39786  arguments="${tmp#* }"
39787
39788  # Input might be given as Windows format, start by converting to
39789  # unix format.
39790  new_path=`$CYGPATH -u "$path"`
39791
39792  # Now try to locate executable using which
39793  new_path=`$WHICH "$new_path" 2> /dev/null`
39794  # bat and cmd files are not always considered executable in cygwin causing which
39795  # to not find them
39796  if test "x$new_path" = x \
39797      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39798      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39799    new_path=`$CYGPATH -u "$path"`
39800  fi
39801  if test "x$new_path" = x; then
39802    # Oops. Which didn't find the executable.
39803    # The splitting of arguments from the executable at a space might have been incorrect,
39804    # since paths with space are more likely in Windows. Give it another try with the whole
39805    # argument.
39806    path="$complete"
39807    arguments="EOL"
39808    new_path=`$CYGPATH -u "$path"`
39809    new_path=`$WHICH "$new_path" 2> /dev/null`
39810    # bat and cmd files are not always considered executable in cygwin causing which
39811    # to not find them
39812    if test "x$new_path" = x \
39813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39815      new_path=`$CYGPATH -u "$path"`
39816    fi
39817    if test "x$new_path" = x; then
39818      # It's still not found. Now this is an unrecoverable error.
39819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39820$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39821      has_space=`$ECHO "$complete" | $GREP " "`
39822      if test "x$has_space" != x; then
39823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39825      fi
39826      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39827    fi
39828  fi
39829
39830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39833  # "foo.exe" is OK but "foo" is an error.
39834  #
39835  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39836  # It is also a way to make sure we got the proper file name for the real test later on.
39837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39838  if test "x$test_shortpath" = x; then
39839    # Short path failed, file does not exist as specified.
39840    # Try adding .exe or .cmd
39841    if test -f "${new_path}.exe"; then
39842      input_to_shortpath="${new_path}.exe"
39843    elif test -f "${new_path}.cmd"; then
39844      input_to_shortpath="${new_path}.cmd"
39845    else
39846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39847$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39850      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39851    fi
39852  else
39853    input_to_shortpath="$new_path"
39854  fi
39855
39856  # Call helper function which possibly converts this using DOS-style short mode.
39857  # If so, the updated path is stored in $new_path.
39858  new_path="$input_to_shortpath"
39859
39860  input_path="$input_to_shortpath"
39861  # Check if we need to convert this using DOS-style short mode. If the path
39862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39863  # take no chances and rewrite it.
39864  # Note: m4 eats our [], so we need to use [ and ] instead.
39865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39866  if test "x$has_forbidden_chars" != x; then
39867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39871      # Going to short mode and back again did indeed matter. Since short mode is
39872      # case insensitive, let's make it lowercase to improve readability.
39873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39874      # Now convert it back to Unix-style (cygpath)
39875      input_path=`$CYGPATH -u "$shortmode_path"`
39876      new_path="$input_path"
39877    fi
39878  fi
39879
39880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39881  if test "x$test_cygdrive_prefix" = x; then
39882    # As a simple fix, exclude /usr/bin since it's not a real path.
39883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39885      # a path prefixed by /cygdrive for fixpath to work.
39886      new_path="$CYGWIN_ROOT_PATH$input_path"
39887    fi
39888  fi
39889
39890  # remove trailing .exe if any
39891  new_path="${new_path/%.exe/}"
39892
39893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39894
39895  # First separate the path from the arguments. This will split at the first
39896  # space.
39897  complete="$STRIP"
39898  path="${complete%% *}"
39899  tmp="$complete EOL"
39900  arguments="${tmp#* }"
39901
39902  # Input might be given as Windows format, start by converting to
39903  # unix format.
39904  new_path="$path"
39905
39906  windows_path="$new_path"
39907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39908    unix_path=`$CYGPATH -u "$windows_path"`
39909    new_path="$unix_path"
39910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39912    new_path="$unix_path"
39913  fi
39914
39915
39916  # Now try to locate executable using which
39917  new_path=`$WHICH "$new_path" 2> /dev/null`
39918
39919  if test "x$new_path" = x; then
39920    # Oops. Which didn't find the executable.
39921    # The splitting of arguments from the executable at a space might have been incorrect,
39922    # since paths with space are more likely in Windows. Give it another try with the whole
39923    # argument.
39924    path="$complete"
39925    arguments="EOL"
39926    new_path="$path"
39927
39928  windows_path="$new_path"
39929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39930    unix_path=`$CYGPATH -u "$windows_path"`
39931    new_path="$unix_path"
39932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39934    new_path="$unix_path"
39935  fi
39936
39937
39938    new_path=`$WHICH "$new_path" 2> /dev/null`
39939    # bat and cmd files are not always considered executable in MSYS causing which
39940    # to not find them
39941    if test "x$new_path" = x \
39942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39944      new_path="$path"
39945
39946  windows_path="$new_path"
39947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39948    unix_path=`$CYGPATH -u "$windows_path"`
39949    new_path="$unix_path"
39950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39952    new_path="$unix_path"
39953  fi
39954
39955    fi
39956
39957    if test "x$new_path" = x; then
39958      # It's still not found. Now this is an unrecoverable error.
39959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39960$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39961      has_space=`$ECHO "$complete" | $GREP " "`
39962      if test "x$has_space" != x; then
39963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39965      fi
39966      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39967    fi
39968  fi
39969
39970  # Now new_path has a complete unix path to the binary
39971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39972    # Keep paths in /bin as-is, but remove trailing .exe if any
39973    new_path="${new_path/%.exe/}"
39974    # Do not save /bin paths to all_fixpath_prefixes!
39975  else
39976    # Not in mixed or Windows style, start by that.
39977    new_path=`cmd //c echo $new_path`
39978
39979  input_path="$new_path"
39980  # Check if we need to convert this using DOS-style short mode. If the path
39981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39982  # take no chances and rewrite it.
39983  # Note: m4 eats our [], so we need to use [ and ] instead.
39984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39985  if test "x$has_forbidden_chars" != x; then
39986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39988  fi
39989
39990    # Output is in $new_path
39991
39992  windows_path="$new_path"
39993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39994    unix_path=`$CYGPATH -u "$windows_path"`
39995    new_path="$unix_path"
39996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39998    new_path="$unix_path"
39999  fi
40000
40001    # remove trailing .exe if any
40002    new_path="${new_path/%.exe/}"
40003
40004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40006  fi
40007
40008    else
40009      # We're on a unix platform. Hooray! :)
40010      # First separate the path from the arguments. This will split at the first
40011      # space.
40012      complete="$STRIP"
40013      path="${complete%% *}"
40014      tmp="$complete EOL"
40015      arguments="${tmp#* }"
40016
40017      # Cannot rely on the command "which" here since it doesn't always work.
40018      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40019      if test -z "$is_absolute_path"; then
40020        # Path to executable is not absolute. Find it.
40021        IFS_save="$IFS"
40022        IFS=:
40023        for p in $PATH; do
40024          if test -f "$p/$path" && test -x "$p/$path"; then
40025            new_path="$p/$path"
40026            break
40027          fi
40028        done
40029        IFS="$IFS_save"
40030      else
40031        # This is an absolute path, we can use it without further modifications.
40032        new_path="$path"
40033      fi
40034
40035      if test "x$new_path" = x; then
40036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40037$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40038        has_space=`$ECHO "$complete" | $GREP " "`
40039        if test "x$has_space" != x; then
40040          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40041$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40042        fi
40043        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40044      fi
40045    fi
40046
40047    # Now join together the path and the arguments once again
40048    if test "x$arguments" != xEOL; then
40049      new_complete="$new_path ${arguments% *}"
40050    else
40051      new_complete="$new_path"
40052    fi
40053
40054    if test "x$complete" != "x$new_complete"; then
40055      STRIP="$new_complete"
40056      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40057$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40058    fi
40059  fi
40060
40061
40062
40063  # Publish this variable in the help.
40064
40065
40066  if [ -z "${NM+x}" ]; then
40067    # The variable is not set by user, try to locate tool using the code snippet
40068    for ac_prog in nm
40069do
40070  # Extract the first word of "$ac_prog", so it can be a program name with args.
40071set dummy $ac_prog; ac_word=$2
40072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40073$as_echo_n "checking for $ac_word... " >&6; }
40074if ${ac_cv_path_NM+:} false; then :
40075  $as_echo_n "(cached) " >&6
40076else
40077  case $NM in
40078  [\\/]* | ?:[\\/]*)
40079  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40080  ;;
40081  *)
40082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40083for as_dir in $PATH
40084do
40085  IFS=$as_save_IFS
40086  test -z "$as_dir" && as_dir=.
40087    for ac_exec_ext in '' $ac_executable_extensions; do
40088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40089    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40091    break 2
40092  fi
40093done
40094  done
40095IFS=$as_save_IFS
40096
40097  ;;
40098esac
40099fi
40100NM=$ac_cv_path_NM
40101if test -n "$NM"; then
40102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40103$as_echo "$NM" >&6; }
40104else
40105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40106$as_echo "no" >&6; }
40107fi
40108
40109
40110  test -n "$NM" && break
40111done
40112
40113  else
40114    # The variable is set, but is it from the command line or the environment?
40115
40116    # Try to remove the string !NM! from our list.
40117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40119      # If it failed, the variable was not from the command line. Ignore it,
40120      # but warn the user (except for BASH, which is always set by the calling BASH).
40121      if test "xNM" != xBASH; then
40122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40123$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40124      fi
40125      # Try to locate tool using the code snippet
40126      for ac_prog in nm
40127do
40128  # Extract the first word of "$ac_prog", so it can be a program name with args.
40129set dummy $ac_prog; ac_word=$2
40130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40131$as_echo_n "checking for $ac_word... " >&6; }
40132if ${ac_cv_path_NM+:} false; then :
40133  $as_echo_n "(cached) " >&6
40134else
40135  case $NM in
40136  [\\/]* | ?:[\\/]*)
40137  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40138  ;;
40139  *)
40140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40141for as_dir in $PATH
40142do
40143  IFS=$as_save_IFS
40144  test -z "$as_dir" && as_dir=.
40145    for ac_exec_ext in '' $ac_executable_extensions; do
40146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40147    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40149    break 2
40150  fi
40151done
40152  done
40153IFS=$as_save_IFS
40154
40155  ;;
40156esac
40157fi
40158NM=$ac_cv_path_NM
40159if test -n "$NM"; then
40160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40161$as_echo "$NM" >&6; }
40162else
40163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40164$as_echo "no" >&6; }
40165fi
40166
40167
40168  test -n "$NM" && break
40169done
40170
40171    else
40172      # If it succeeded, then it was overridden by the user. We will use it
40173      # for the tool.
40174
40175      # First remove it from the list of overridden variables, so we can test
40176      # for unknown variables in the end.
40177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40178
40179      # Check if we try to supply an empty value
40180      if test "x$NM" = x; then
40181        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40182$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40183        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40184$as_echo_n "checking for NM... " >&6; }
40185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40186$as_echo "disabled" >&6; }
40187      else
40188        # Check if the provided tool contains a complete path.
40189        tool_specified="$NM"
40190        tool_basename="${tool_specified##*/}"
40191        if test "x$tool_basename" = "x$tool_specified"; then
40192          # A command without a complete path is provided, search $PATH.
40193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40194$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40195          # Extract the first word of "$tool_basename", so it can be a program name with args.
40196set dummy $tool_basename; ac_word=$2
40197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40198$as_echo_n "checking for $ac_word... " >&6; }
40199if ${ac_cv_path_NM+:} false; then :
40200  $as_echo_n "(cached) " >&6
40201else
40202  case $NM in
40203  [\\/]* | ?:[\\/]*)
40204  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40205  ;;
40206  *)
40207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40208for as_dir in $PATH
40209do
40210  IFS=$as_save_IFS
40211  test -z "$as_dir" && as_dir=.
40212    for ac_exec_ext in '' $ac_executable_extensions; do
40213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40214    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40216    break 2
40217  fi
40218done
40219  done
40220IFS=$as_save_IFS
40221
40222  ;;
40223esac
40224fi
40225NM=$ac_cv_path_NM
40226if test -n "$NM"; then
40227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40228$as_echo "$NM" >&6; }
40229else
40230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40231$as_echo "no" >&6; }
40232fi
40233
40234
40235          if test "x$NM" = x; then
40236            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40237          fi
40238        else
40239          # Otherwise we believe it is a complete path. Use it as it is.
40240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40241$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40242          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40243$as_echo_n "checking for NM... " >&6; }
40244          if test ! -x "$tool_specified"; then
40245            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40246$as_echo "not found" >&6; }
40247            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40248          fi
40249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40250$as_echo "$tool_specified" >&6; }
40251        fi
40252      fi
40253    fi
40254
40255  fi
40256
40257
40258
40259  # Only process if variable expands to non-empty
40260
40261  if test "x$NM" != x; then
40262    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40263
40264  # First separate the path from the arguments. This will split at the first
40265  # space.
40266  complete="$NM"
40267  path="${complete%% *}"
40268  tmp="$complete EOL"
40269  arguments="${tmp#* }"
40270
40271  # Input might be given as Windows format, start by converting to
40272  # unix format.
40273  new_path=`$CYGPATH -u "$path"`
40274
40275  # Now try to locate executable using which
40276  new_path=`$WHICH "$new_path" 2> /dev/null`
40277  # bat and cmd files are not always considered executable in cygwin causing which
40278  # to not find them
40279  if test "x$new_path" = x \
40280      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40281      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40282    new_path=`$CYGPATH -u "$path"`
40283  fi
40284  if test "x$new_path" = x; then
40285    # Oops. Which didn't find the executable.
40286    # The splitting of arguments from the executable at a space might have been incorrect,
40287    # since paths with space are more likely in Windows. Give it another try with the whole
40288    # argument.
40289    path="$complete"
40290    arguments="EOL"
40291    new_path=`$CYGPATH -u "$path"`
40292    new_path=`$WHICH "$new_path" 2> /dev/null`
40293    # bat and cmd files are not always considered executable in cygwin causing which
40294    # to not find them
40295    if test "x$new_path" = x \
40296        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40297        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40298      new_path=`$CYGPATH -u "$path"`
40299    fi
40300    if test "x$new_path" = x; then
40301      # It's still not found. Now this is an unrecoverable error.
40302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40303$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40304      has_space=`$ECHO "$complete" | $GREP " "`
40305      if test "x$has_space" != x; then
40306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40308      fi
40309      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40310    fi
40311  fi
40312
40313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40316  # "foo.exe" is OK but "foo" is an error.
40317  #
40318  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40319  # It is also a way to make sure we got the proper file name for the real test later on.
40320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40321  if test "x$test_shortpath" = x; then
40322    # Short path failed, file does not exist as specified.
40323    # Try adding .exe or .cmd
40324    if test -f "${new_path}.exe"; then
40325      input_to_shortpath="${new_path}.exe"
40326    elif test -f "${new_path}.cmd"; then
40327      input_to_shortpath="${new_path}.cmd"
40328    else
40329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40330$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40331      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40332$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40333      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40334    fi
40335  else
40336    input_to_shortpath="$new_path"
40337  fi
40338
40339  # Call helper function which possibly converts this using DOS-style short mode.
40340  # If so, the updated path is stored in $new_path.
40341  new_path="$input_to_shortpath"
40342
40343  input_path="$input_to_shortpath"
40344  # Check if we need to convert this using DOS-style short mode. If the path
40345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40346  # take no chances and rewrite it.
40347  # Note: m4 eats our [], so we need to use [ and ] instead.
40348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40349  if test "x$has_forbidden_chars" != x; then
40350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40354      # Going to short mode and back again did indeed matter. Since short mode is
40355      # case insensitive, let's make it lowercase to improve readability.
40356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40357      # Now convert it back to Unix-style (cygpath)
40358      input_path=`$CYGPATH -u "$shortmode_path"`
40359      new_path="$input_path"
40360    fi
40361  fi
40362
40363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40364  if test "x$test_cygdrive_prefix" = x; then
40365    # As a simple fix, exclude /usr/bin since it's not a real path.
40366    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40368      # a path prefixed by /cygdrive for fixpath to work.
40369      new_path="$CYGWIN_ROOT_PATH$input_path"
40370    fi
40371  fi
40372
40373  # remove trailing .exe if any
40374  new_path="${new_path/%.exe/}"
40375
40376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40377
40378  # First separate the path from the arguments. This will split at the first
40379  # space.
40380  complete="$NM"
40381  path="${complete%% *}"
40382  tmp="$complete EOL"
40383  arguments="${tmp#* }"
40384
40385  # Input might be given as Windows format, start by converting to
40386  # unix format.
40387  new_path="$path"
40388
40389  windows_path="$new_path"
40390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40391    unix_path=`$CYGPATH -u "$windows_path"`
40392    new_path="$unix_path"
40393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40395    new_path="$unix_path"
40396  fi
40397
40398
40399  # Now try to locate executable using which
40400  new_path=`$WHICH "$new_path" 2> /dev/null`
40401
40402  if test "x$new_path" = x; then
40403    # Oops. Which didn't find the executable.
40404    # The splitting of arguments from the executable at a space might have been incorrect,
40405    # since paths with space are more likely in Windows. Give it another try with the whole
40406    # argument.
40407    path="$complete"
40408    arguments="EOL"
40409    new_path="$path"
40410
40411  windows_path="$new_path"
40412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40413    unix_path=`$CYGPATH -u "$windows_path"`
40414    new_path="$unix_path"
40415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40417    new_path="$unix_path"
40418  fi
40419
40420
40421    new_path=`$WHICH "$new_path" 2> /dev/null`
40422    # bat and cmd files are not always considered executable in MSYS causing which
40423    # to not find them
40424    if test "x$new_path" = x \
40425        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40426        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40427      new_path="$path"
40428
40429  windows_path="$new_path"
40430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40431    unix_path=`$CYGPATH -u "$windows_path"`
40432    new_path="$unix_path"
40433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40435    new_path="$unix_path"
40436  fi
40437
40438    fi
40439
40440    if test "x$new_path" = x; then
40441      # It's still not found. Now this is an unrecoverable error.
40442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40443$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40444      has_space=`$ECHO "$complete" | $GREP " "`
40445      if test "x$has_space" != x; then
40446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40448      fi
40449      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40450    fi
40451  fi
40452
40453  # Now new_path has a complete unix path to the binary
40454  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40455    # Keep paths in /bin as-is, but remove trailing .exe if any
40456    new_path="${new_path/%.exe/}"
40457    # Do not save /bin paths to all_fixpath_prefixes!
40458  else
40459    # Not in mixed or Windows style, start by that.
40460    new_path=`cmd //c echo $new_path`
40461
40462  input_path="$new_path"
40463  # Check if we need to convert this using DOS-style short mode. If the path
40464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40465  # take no chances and rewrite it.
40466  # Note: m4 eats our [], so we need to use [ and ] instead.
40467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40468  if test "x$has_forbidden_chars" != x; then
40469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40471  fi
40472
40473    # Output is in $new_path
40474
40475  windows_path="$new_path"
40476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40477    unix_path=`$CYGPATH -u "$windows_path"`
40478    new_path="$unix_path"
40479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40481    new_path="$unix_path"
40482  fi
40483
40484    # remove trailing .exe if any
40485    new_path="${new_path/%.exe/}"
40486
40487    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40488    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40489  fi
40490
40491    else
40492      # We're on a unix platform. Hooray! :)
40493      # First separate the path from the arguments. This will split at the first
40494      # space.
40495      complete="$NM"
40496      path="${complete%% *}"
40497      tmp="$complete EOL"
40498      arguments="${tmp#* }"
40499
40500      # Cannot rely on the command "which" here since it doesn't always work.
40501      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40502      if test -z "$is_absolute_path"; then
40503        # Path to executable is not absolute. Find it.
40504        IFS_save="$IFS"
40505        IFS=:
40506        for p in $PATH; do
40507          if test -f "$p/$path" && test -x "$p/$path"; then
40508            new_path="$p/$path"
40509            break
40510          fi
40511        done
40512        IFS="$IFS_save"
40513      else
40514        # This is an absolute path, we can use it without further modifications.
40515        new_path="$path"
40516      fi
40517
40518      if test "x$new_path" = x; then
40519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40520$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40521        has_space=`$ECHO "$complete" | $GREP " "`
40522        if test "x$has_space" != x; then
40523          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40525        fi
40526        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40527      fi
40528    fi
40529
40530    # Now join together the path and the arguments once again
40531    if test "x$arguments" != xEOL; then
40532      new_complete="$new_path ${arguments% *}"
40533    else
40534      new_complete="$new_path"
40535    fi
40536
40537    if test "x$complete" != "x$new_complete"; then
40538      NM="$new_complete"
40539      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40540$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40541    fi
40542  fi
40543
40544
40545
40546  # Publish this variable in the help.
40547
40548
40549  if [ -z "${GNM+x}" ]; then
40550    # The variable is not set by user, try to locate tool using the code snippet
40551    for ac_prog in gnm
40552do
40553  # Extract the first word of "$ac_prog", so it can be a program name with args.
40554set dummy $ac_prog; ac_word=$2
40555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40556$as_echo_n "checking for $ac_word... " >&6; }
40557if ${ac_cv_path_GNM+:} false; then :
40558  $as_echo_n "(cached) " >&6
40559else
40560  case $GNM in
40561  [\\/]* | ?:[\\/]*)
40562  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40563  ;;
40564  *)
40565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40566for as_dir in $PATH
40567do
40568  IFS=$as_save_IFS
40569  test -z "$as_dir" && as_dir=.
40570    for ac_exec_ext in '' $ac_executable_extensions; do
40571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40572    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40574    break 2
40575  fi
40576done
40577  done
40578IFS=$as_save_IFS
40579
40580  ;;
40581esac
40582fi
40583GNM=$ac_cv_path_GNM
40584if test -n "$GNM"; then
40585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40586$as_echo "$GNM" >&6; }
40587else
40588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40589$as_echo "no" >&6; }
40590fi
40591
40592
40593  test -n "$GNM" && break
40594done
40595
40596  else
40597    # The variable is set, but is it from the command line or the environment?
40598
40599    # Try to remove the string !GNM! from our list.
40600    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40601    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40602      # If it failed, the variable was not from the command line. Ignore it,
40603      # but warn the user (except for BASH, which is always set by the calling BASH).
40604      if test "xGNM" != xBASH; then
40605        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40606$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40607      fi
40608      # Try to locate tool using the code snippet
40609      for ac_prog in gnm
40610do
40611  # Extract the first word of "$ac_prog", so it can be a program name with args.
40612set dummy $ac_prog; ac_word=$2
40613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40614$as_echo_n "checking for $ac_word... " >&6; }
40615if ${ac_cv_path_GNM+:} false; then :
40616  $as_echo_n "(cached) " >&6
40617else
40618  case $GNM in
40619  [\\/]* | ?:[\\/]*)
40620  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40621  ;;
40622  *)
40623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40624for as_dir in $PATH
40625do
40626  IFS=$as_save_IFS
40627  test -z "$as_dir" && as_dir=.
40628    for ac_exec_ext in '' $ac_executable_extensions; do
40629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40630    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40632    break 2
40633  fi
40634done
40635  done
40636IFS=$as_save_IFS
40637
40638  ;;
40639esac
40640fi
40641GNM=$ac_cv_path_GNM
40642if test -n "$GNM"; then
40643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40644$as_echo "$GNM" >&6; }
40645else
40646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40647$as_echo "no" >&6; }
40648fi
40649
40650
40651  test -n "$GNM" && break
40652done
40653
40654    else
40655      # If it succeeded, then it was overridden by the user. We will use it
40656      # for the tool.
40657
40658      # First remove it from the list of overridden variables, so we can test
40659      # for unknown variables in the end.
40660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40661
40662      # Check if we try to supply an empty value
40663      if test "x$GNM" = x; then
40664        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40665$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40667$as_echo_n "checking for GNM... " >&6; }
40668        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40669$as_echo "disabled" >&6; }
40670      else
40671        # Check if the provided tool contains a complete path.
40672        tool_specified="$GNM"
40673        tool_basename="${tool_specified##*/}"
40674        if test "x$tool_basename" = "x$tool_specified"; then
40675          # A command without a complete path is provided, search $PATH.
40676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40677$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40678          # Extract the first word of "$tool_basename", so it can be a program name with args.
40679set dummy $tool_basename; ac_word=$2
40680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40681$as_echo_n "checking for $ac_word... " >&6; }
40682if ${ac_cv_path_GNM+:} false; then :
40683  $as_echo_n "(cached) " >&6
40684else
40685  case $GNM in
40686  [\\/]* | ?:[\\/]*)
40687  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40688  ;;
40689  *)
40690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40691for as_dir in $PATH
40692do
40693  IFS=$as_save_IFS
40694  test -z "$as_dir" && as_dir=.
40695    for ac_exec_ext in '' $ac_executable_extensions; do
40696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40697    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40699    break 2
40700  fi
40701done
40702  done
40703IFS=$as_save_IFS
40704
40705  ;;
40706esac
40707fi
40708GNM=$ac_cv_path_GNM
40709if test -n "$GNM"; then
40710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40711$as_echo "$GNM" >&6; }
40712else
40713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40714$as_echo "no" >&6; }
40715fi
40716
40717
40718          if test "x$GNM" = x; then
40719            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40720          fi
40721        else
40722          # Otherwise we believe it is a complete path. Use it as it is.
40723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40724$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40725          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40726$as_echo_n "checking for GNM... " >&6; }
40727          if test ! -x "$tool_specified"; then
40728            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40729$as_echo "not found" >&6; }
40730            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40731          fi
40732          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40733$as_echo "$tool_specified" >&6; }
40734        fi
40735      fi
40736    fi
40737
40738  fi
40739
40740
40741
40742  # Only process if variable expands to non-empty
40743
40744  if test "x$GNM" != x; then
40745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40746
40747  # First separate the path from the arguments. This will split at the first
40748  # space.
40749  complete="$GNM"
40750  path="${complete%% *}"
40751  tmp="$complete EOL"
40752  arguments="${tmp#* }"
40753
40754  # Input might be given as Windows format, start by converting to
40755  # unix format.
40756  new_path=`$CYGPATH -u "$path"`
40757
40758  # Now try to locate executable using which
40759  new_path=`$WHICH "$new_path" 2> /dev/null`
40760  # bat and cmd files are not always considered executable in cygwin causing which
40761  # to not find them
40762  if test "x$new_path" = x \
40763      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40764      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40765    new_path=`$CYGPATH -u "$path"`
40766  fi
40767  if test "x$new_path" = x; then
40768    # Oops. Which didn't find the executable.
40769    # The splitting of arguments from the executable at a space might have been incorrect,
40770    # since paths with space are more likely in Windows. Give it another try with the whole
40771    # argument.
40772    path="$complete"
40773    arguments="EOL"
40774    new_path=`$CYGPATH -u "$path"`
40775    new_path=`$WHICH "$new_path" 2> /dev/null`
40776    # bat and cmd files are not always considered executable in cygwin causing which
40777    # to not find them
40778    if test "x$new_path" = x \
40779        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40780        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40781      new_path=`$CYGPATH -u "$path"`
40782    fi
40783    if test "x$new_path" = x; then
40784      # It's still not found. Now this is an unrecoverable error.
40785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40786$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40787      has_space=`$ECHO "$complete" | $GREP " "`
40788      if test "x$has_space" != x; then
40789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40791      fi
40792      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40793    fi
40794  fi
40795
40796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40799  # "foo.exe" is OK but "foo" is an error.
40800  #
40801  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40802  # It is also a way to make sure we got the proper file name for the real test later on.
40803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40804  if test "x$test_shortpath" = x; then
40805    # Short path failed, file does not exist as specified.
40806    # Try adding .exe or .cmd
40807    if test -f "${new_path}.exe"; then
40808      input_to_shortpath="${new_path}.exe"
40809    elif test -f "${new_path}.cmd"; then
40810      input_to_shortpath="${new_path}.cmd"
40811    else
40812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40813$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40814      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40815$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40816      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40817    fi
40818  else
40819    input_to_shortpath="$new_path"
40820  fi
40821
40822  # Call helper function which possibly converts this using DOS-style short mode.
40823  # If so, the updated path is stored in $new_path.
40824  new_path="$input_to_shortpath"
40825
40826  input_path="$input_to_shortpath"
40827  # Check if we need to convert this using DOS-style short mode. If the path
40828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40829  # take no chances and rewrite it.
40830  # Note: m4 eats our [], so we need to use [ and ] instead.
40831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40832  if test "x$has_forbidden_chars" != x; then
40833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40837      # Going to short mode and back again did indeed matter. Since short mode is
40838      # case insensitive, let's make it lowercase to improve readability.
40839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40840      # Now convert it back to Unix-style (cygpath)
40841      input_path=`$CYGPATH -u "$shortmode_path"`
40842      new_path="$input_path"
40843    fi
40844  fi
40845
40846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40847  if test "x$test_cygdrive_prefix" = x; then
40848    # As a simple fix, exclude /usr/bin since it's not a real path.
40849    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40851      # a path prefixed by /cygdrive for fixpath to work.
40852      new_path="$CYGWIN_ROOT_PATH$input_path"
40853    fi
40854  fi
40855
40856  # remove trailing .exe if any
40857  new_path="${new_path/%.exe/}"
40858
40859    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40860
40861  # First separate the path from the arguments. This will split at the first
40862  # space.
40863  complete="$GNM"
40864  path="${complete%% *}"
40865  tmp="$complete EOL"
40866  arguments="${tmp#* }"
40867
40868  # Input might be given as Windows format, start by converting to
40869  # unix format.
40870  new_path="$path"
40871
40872  windows_path="$new_path"
40873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40874    unix_path=`$CYGPATH -u "$windows_path"`
40875    new_path="$unix_path"
40876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40878    new_path="$unix_path"
40879  fi
40880
40881
40882  # Now try to locate executable using which
40883  new_path=`$WHICH "$new_path" 2> /dev/null`
40884
40885  if test "x$new_path" = x; then
40886    # Oops. Which didn't find the executable.
40887    # The splitting of arguments from the executable at a space might have been incorrect,
40888    # since paths with space are more likely in Windows. Give it another try with the whole
40889    # argument.
40890    path="$complete"
40891    arguments="EOL"
40892    new_path="$path"
40893
40894  windows_path="$new_path"
40895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40896    unix_path=`$CYGPATH -u "$windows_path"`
40897    new_path="$unix_path"
40898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40900    new_path="$unix_path"
40901  fi
40902
40903
40904    new_path=`$WHICH "$new_path" 2> /dev/null`
40905    # bat and cmd files are not always considered executable in MSYS causing which
40906    # to not find them
40907    if test "x$new_path" = x \
40908        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40909        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40910      new_path="$path"
40911
40912  windows_path="$new_path"
40913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40914    unix_path=`$CYGPATH -u "$windows_path"`
40915    new_path="$unix_path"
40916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40918    new_path="$unix_path"
40919  fi
40920
40921    fi
40922
40923    if test "x$new_path" = x; then
40924      # It's still not found. Now this is an unrecoverable error.
40925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40926$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40927      has_space=`$ECHO "$complete" | $GREP " "`
40928      if test "x$has_space" != x; then
40929        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40930$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40931      fi
40932      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40933    fi
40934  fi
40935
40936  # Now new_path has a complete unix path to the binary
40937  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40938    # Keep paths in /bin as-is, but remove trailing .exe if any
40939    new_path="${new_path/%.exe/}"
40940    # Do not save /bin paths to all_fixpath_prefixes!
40941  else
40942    # Not in mixed or Windows style, start by that.
40943    new_path=`cmd //c echo $new_path`
40944
40945  input_path="$new_path"
40946  # Check if we need to convert this using DOS-style short mode. If the path
40947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40948  # take no chances and rewrite it.
40949  # Note: m4 eats our [], so we need to use [ and ] instead.
40950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40951  if test "x$has_forbidden_chars" != x; then
40952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40954  fi
40955
40956    # Output is in $new_path
40957
40958  windows_path="$new_path"
40959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40960    unix_path=`$CYGPATH -u "$windows_path"`
40961    new_path="$unix_path"
40962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40964    new_path="$unix_path"
40965  fi
40966
40967    # remove trailing .exe if any
40968    new_path="${new_path/%.exe/}"
40969
40970    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40971    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40972  fi
40973
40974    else
40975      # We're on a unix platform. Hooray! :)
40976      # First separate the path from the arguments. This will split at the first
40977      # space.
40978      complete="$GNM"
40979      path="${complete%% *}"
40980      tmp="$complete EOL"
40981      arguments="${tmp#* }"
40982
40983      # Cannot rely on the command "which" here since it doesn't always work.
40984      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40985      if test -z "$is_absolute_path"; then
40986        # Path to executable is not absolute. Find it.
40987        IFS_save="$IFS"
40988        IFS=:
40989        for p in $PATH; do
40990          if test -f "$p/$path" && test -x "$p/$path"; then
40991            new_path="$p/$path"
40992            break
40993          fi
40994        done
40995        IFS="$IFS_save"
40996      else
40997        # This is an absolute path, we can use it without further modifications.
40998        new_path="$path"
40999      fi
41000
41001      if test "x$new_path" = x; then
41002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41003$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41004        has_space=`$ECHO "$complete" | $GREP " "`
41005        if test "x$has_space" != x; then
41006          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41007$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41008        fi
41009        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41010      fi
41011    fi
41012
41013    # Now join together the path and the arguments once again
41014    if test "x$arguments" != xEOL; then
41015      new_complete="$new_path ${arguments% *}"
41016    else
41017      new_complete="$new_path"
41018    fi
41019
41020    if test "x$complete" != "x$new_complete"; then
41021      GNM="$new_complete"
41022      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41023$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41024    fi
41025  fi
41026
41027  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41028    # FIXME: we should unify this with the solaris case above.
41029
41030
41031  # Publish this variable in the help.
41032
41033
41034  if [ -z "${STRIP+x}" ]; then
41035    # The variable is not set by user, try to locate tool using the code snippet
41036    if test -n "$ac_tool_prefix"; then
41037  for ac_prog in strip
41038  do
41039    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41040set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41042$as_echo_n "checking for $ac_word... " >&6; }
41043if ${ac_cv_prog_STRIP+:} false; then :
41044  $as_echo_n "(cached) " >&6
41045else
41046  if test -n "$STRIP"; then
41047  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41048else
41049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41050for as_dir in $PATH
41051do
41052  IFS=$as_save_IFS
41053  test -z "$as_dir" && as_dir=.
41054    for ac_exec_ext in '' $ac_executable_extensions; do
41055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41056    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41058    break 2
41059  fi
41060done
41061  done
41062IFS=$as_save_IFS
41063
41064fi
41065fi
41066STRIP=$ac_cv_prog_STRIP
41067if test -n "$STRIP"; then
41068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41069$as_echo "$STRIP" >&6; }
41070else
41071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41072$as_echo "no" >&6; }
41073fi
41074
41075
41076    test -n "$STRIP" && break
41077  done
41078fi
41079if test -z "$STRIP"; then
41080  ac_ct_STRIP=$STRIP
41081  for ac_prog in strip
41082do
41083  # Extract the first word of "$ac_prog", so it can be a program name with args.
41084set dummy $ac_prog; ac_word=$2
41085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41086$as_echo_n "checking for $ac_word... " >&6; }
41087if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41088  $as_echo_n "(cached) " >&6
41089else
41090  if test -n "$ac_ct_STRIP"; then
41091  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41092else
41093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41094for as_dir in $PATH
41095do
41096  IFS=$as_save_IFS
41097  test -z "$as_dir" && as_dir=.
41098    for ac_exec_ext in '' $ac_executable_extensions; do
41099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41100    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41102    break 2
41103  fi
41104done
41105  done
41106IFS=$as_save_IFS
41107
41108fi
41109fi
41110ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41111if test -n "$ac_ct_STRIP"; then
41112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41113$as_echo "$ac_ct_STRIP" >&6; }
41114else
41115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41116$as_echo "no" >&6; }
41117fi
41118
41119
41120  test -n "$ac_ct_STRIP" && break
41121done
41122
41123  if test "x$ac_ct_STRIP" = x; then
41124    STRIP=""
41125  else
41126    case $cross_compiling:$ac_tool_warned in
41127yes:)
41128{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41129$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41130ac_tool_warned=yes ;;
41131esac
41132    STRIP=$ac_ct_STRIP
41133  fi
41134fi
41135
41136  else
41137    # The variable is set, but is it from the command line or the environment?
41138
41139    # Try to remove the string !STRIP! from our list.
41140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41142      # If it failed, the variable was not from the command line. Ignore it,
41143      # but warn the user (except for BASH, which is always set by the calling BASH).
41144      if test "xSTRIP" != xBASH; then
41145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41146$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41147      fi
41148      # Try to locate tool using the code snippet
41149      if test -n "$ac_tool_prefix"; then
41150  for ac_prog in strip
41151  do
41152    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41153set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41155$as_echo_n "checking for $ac_word... " >&6; }
41156if ${ac_cv_prog_STRIP+:} false; then :
41157  $as_echo_n "(cached) " >&6
41158else
41159  if test -n "$STRIP"; then
41160  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41161else
41162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41163for as_dir in $PATH
41164do
41165  IFS=$as_save_IFS
41166  test -z "$as_dir" && as_dir=.
41167    for ac_exec_ext in '' $ac_executable_extensions; do
41168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41169    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41171    break 2
41172  fi
41173done
41174  done
41175IFS=$as_save_IFS
41176
41177fi
41178fi
41179STRIP=$ac_cv_prog_STRIP
41180if test -n "$STRIP"; then
41181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41182$as_echo "$STRIP" >&6; }
41183else
41184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41185$as_echo "no" >&6; }
41186fi
41187
41188
41189    test -n "$STRIP" && break
41190  done
41191fi
41192if test -z "$STRIP"; then
41193  ac_ct_STRIP=$STRIP
41194  for ac_prog in strip
41195do
41196  # Extract the first word of "$ac_prog", so it can be a program name with args.
41197set dummy $ac_prog; ac_word=$2
41198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41199$as_echo_n "checking for $ac_word... " >&6; }
41200if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41201  $as_echo_n "(cached) " >&6
41202else
41203  if test -n "$ac_ct_STRIP"; then
41204  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41205else
41206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41207for as_dir in $PATH
41208do
41209  IFS=$as_save_IFS
41210  test -z "$as_dir" && as_dir=.
41211    for ac_exec_ext in '' $ac_executable_extensions; do
41212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41213    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41215    break 2
41216  fi
41217done
41218  done
41219IFS=$as_save_IFS
41220
41221fi
41222fi
41223ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41224if test -n "$ac_ct_STRIP"; then
41225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41226$as_echo "$ac_ct_STRIP" >&6; }
41227else
41228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41229$as_echo "no" >&6; }
41230fi
41231
41232
41233  test -n "$ac_ct_STRIP" && break
41234done
41235
41236  if test "x$ac_ct_STRIP" = x; then
41237    STRIP=""
41238  else
41239    case $cross_compiling:$ac_tool_warned in
41240yes:)
41241{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41242$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41243ac_tool_warned=yes ;;
41244esac
41245    STRIP=$ac_ct_STRIP
41246  fi
41247fi
41248
41249    else
41250      # If it succeeded, then it was overridden by the user. We will use it
41251      # for the tool.
41252
41253      # First remove it from the list of overridden variables, so we can test
41254      # for unknown variables in the end.
41255      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41256
41257      # Check if we try to supply an empty value
41258      if test "x$STRIP" = x; then
41259        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41260$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41261        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41262$as_echo_n "checking for STRIP... " >&6; }
41263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41264$as_echo "disabled" >&6; }
41265      else
41266        # Check if the provided tool contains a complete path.
41267        tool_specified="$STRIP"
41268        tool_basename="${tool_specified##*/}"
41269        if test "x$tool_basename" = "x$tool_specified"; then
41270          # A command without a complete path is provided, search $PATH.
41271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41272$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41273          # Extract the first word of "$tool_basename", so it can be a program name with args.
41274set dummy $tool_basename; ac_word=$2
41275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41276$as_echo_n "checking for $ac_word... " >&6; }
41277if ${ac_cv_path_STRIP+:} false; then :
41278  $as_echo_n "(cached) " >&6
41279else
41280  case $STRIP in
41281  [\\/]* | ?:[\\/]*)
41282  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41283  ;;
41284  *)
41285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41286for as_dir in $PATH
41287do
41288  IFS=$as_save_IFS
41289  test -z "$as_dir" && as_dir=.
41290    for ac_exec_ext in '' $ac_executable_extensions; do
41291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41292    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41294    break 2
41295  fi
41296done
41297  done
41298IFS=$as_save_IFS
41299
41300  ;;
41301esac
41302fi
41303STRIP=$ac_cv_path_STRIP
41304if test -n "$STRIP"; then
41305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41306$as_echo "$STRIP" >&6; }
41307else
41308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41309$as_echo "no" >&6; }
41310fi
41311
41312
41313          if test "x$STRIP" = x; then
41314            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41315          fi
41316        else
41317          # Otherwise we believe it is a complete path. Use it as it is.
41318          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41319$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41320          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41321$as_echo_n "checking for STRIP... " >&6; }
41322          if test ! -x "$tool_specified"; then
41323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41324$as_echo "not found" >&6; }
41325            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41326          fi
41327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41328$as_echo "$tool_specified" >&6; }
41329        fi
41330      fi
41331    fi
41332
41333  fi
41334
41335
41336
41337  # Only process if variable expands to non-empty
41338
41339  if test "x$STRIP" != x; then
41340    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41341
41342  # First separate the path from the arguments. This will split at the first
41343  # space.
41344  complete="$STRIP"
41345  path="${complete%% *}"
41346  tmp="$complete EOL"
41347  arguments="${tmp#* }"
41348
41349  # Input might be given as Windows format, start by converting to
41350  # unix format.
41351  new_path=`$CYGPATH -u "$path"`
41352
41353  # Now try to locate executable using which
41354  new_path=`$WHICH "$new_path" 2> /dev/null`
41355  # bat and cmd files are not always considered executable in cygwin causing which
41356  # to not find them
41357  if test "x$new_path" = x \
41358      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41359      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41360    new_path=`$CYGPATH -u "$path"`
41361  fi
41362  if test "x$new_path" = x; then
41363    # Oops. Which didn't find the executable.
41364    # The splitting of arguments from the executable at a space might have been incorrect,
41365    # since paths with space are more likely in Windows. Give it another try with the whole
41366    # argument.
41367    path="$complete"
41368    arguments="EOL"
41369    new_path=`$CYGPATH -u "$path"`
41370    new_path=`$WHICH "$new_path" 2> /dev/null`
41371    # bat and cmd files are not always considered executable in cygwin causing which
41372    # to not find them
41373    if test "x$new_path" = x \
41374        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41375        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41376      new_path=`$CYGPATH -u "$path"`
41377    fi
41378    if test "x$new_path" = x; then
41379      # It's still not found. Now this is an unrecoverable error.
41380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41381$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41382      has_space=`$ECHO "$complete" | $GREP " "`
41383      if test "x$has_space" != x; then
41384        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41385$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41386      fi
41387      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41388    fi
41389  fi
41390
41391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41394  # "foo.exe" is OK but "foo" is an error.
41395  #
41396  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41397  # It is also a way to make sure we got the proper file name for the real test later on.
41398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41399  if test "x$test_shortpath" = x; then
41400    # Short path failed, file does not exist as specified.
41401    # Try adding .exe or .cmd
41402    if test -f "${new_path}.exe"; then
41403      input_to_shortpath="${new_path}.exe"
41404    elif test -f "${new_path}.cmd"; then
41405      input_to_shortpath="${new_path}.cmd"
41406    else
41407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41408$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41409      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41410$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41411      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41412    fi
41413  else
41414    input_to_shortpath="$new_path"
41415  fi
41416
41417  # Call helper function which possibly converts this using DOS-style short mode.
41418  # If so, the updated path is stored in $new_path.
41419  new_path="$input_to_shortpath"
41420
41421  input_path="$input_to_shortpath"
41422  # Check if we need to convert this using DOS-style short mode. If the path
41423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41424  # take no chances and rewrite it.
41425  # Note: m4 eats our [], so we need to use [ and ] instead.
41426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41427  if test "x$has_forbidden_chars" != x; then
41428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41432      # Going to short mode and back again did indeed matter. Since short mode is
41433      # case insensitive, let's make it lowercase to improve readability.
41434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41435      # Now convert it back to Unix-style (cygpath)
41436      input_path=`$CYGPATH -u "$shortmode_path"`
41437      new_path="$input_path"
41438    fi
41439  fi
41440
41441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41442  if test "x$test_cygdrive_prefix" = x; then
41443    # As a simple fix, exclude /usr/bin since it's not a real path.
41444    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41446      # a path prefixed by /cygdrive for fixpath to work.
41447      new_path="$CYGWIN_ROOT_PATH$input_path"
41448    fi
41449  fi
41450
41451  # remove trailing .exe if any
41452  new_path="${new_path/%.exe/}"
41453
41454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41455
41456  # First separate the path from the arguments. This will split at the first
41457  # space.
41458  complete="$STRIP"
41459  path="${complete%% *}"
41460  tmp="$complete EOL"
41461  arguments="${tmp#* }"
41462
41463  # Input might be given as Windows format, start by converting to
41464  # unix format.
41465  new_path="$path"
41466
41467  windows_path="$new_path"
41468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41469    unix_path=`$CYGPATH -u "$windows_path"`
41470    new_path="$unix_path"
41471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41473    new_path="$unix_path"
41474  fi
41475
41476
41477  # Now try to locate executable using which
41478  new_path=`$WHICH "$new_path" 2> /dev/null`
41479
41480  if test "x$new_path" = x; then
41481    # Oops. Which didn't find the executable.
41482    # The splitting of arguments from the executable at a space might have been incorrect,
41483    # since paths with space are more likely in Windows. Give it another try with the whole
41484    # argument.
41485    path="$complete"
41486    arguments="EOL"
41487    new_path="$path"
41488
41489  windows_path="$new_path"
41490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41491    unix_path=`$CYGPATH -u "$windows_path"`
41492    new_path="$unix_path"
41493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41495    new_path="$unix_path"
41496  fi
41497
41498
41499    new_path=`$WHICH "$new_path" 2> /dev/null`
41500    # bat and cmd files are not always considered executable in MSYS causing which
41501    # to not find them
41502    if test "x$new_path" = x \
41503        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41504        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41505      new_path="$path"
41506
41507  windows_path="$new_path"
41508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41509    unix_path=`$CYGPATH -u "$windows_path"`
41510    new_path="$unix_path"
41511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41513    new_path="$unix_path"
41514  fi
41515
41516    fi
41517
41518    if test "x$new_path" = x; then
41519      # It's still not found. Now this is an unrecoverable error.
41520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41521$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41522      has_space=`$ECHO "$complete" | $GREP " "`
41523      if test "x$has_space" != x; then
41524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41526      fi
41527      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41528    fi
41529  fi
41530
41531  # Now new_path has a complete unix path to the binary
41532  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41533    # Keep paths in /bin as-is, but remove trailing .exe if any
41534    new_path="${new_path/%.exe/}"
41535    # Do not save /bin paths to all_fixpath_prefixes!
41536  else
41537    # Not in mixed or Windows style, start by that.
41538    new_path=`cmd //c echo $new_path`
41539
41540  input_path="$new_path"
41541  # Check if we need to convert this using DOS-style short mode. If the path
41542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41543  # take no chances and rewrite it.
41544  # Note: m4 eats our [], so we need to use [ and ] instead.
41545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41546  if test "x$has_forbidden_chars" != x; then
41547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41549  fi
41550
41551    # Output is in $new_path
41552
41553  windows_path="$new_path"
41554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41555    unix_path=`$CYGPATH -u "$windows_path"`
41556    new_path="$unix_path"
41557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41559    new_path="$unix_path"
41560  fi
41561
41562    # remove trailing .exe if any
41563    new_path="${new_path/%.exe/}"
41564
41565    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41566    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41567  fi
41568
41569    else
41570      # We're on a unix platform. Hooray! :)
41571      # First separate the path from the arguments. This will split at the first
41572      # space.
41573      complete="$STRIP"
41574      path="${complete%% *}"
41575      tmp="$complete EOL"
41576      arguments="${tmp#* }"
41577
41578      # Cannot rely on the command "which" here since it doesn't always work.
41579      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41580      if test -z "$is_absolute_path"; then
41581        # Path to executable is not absolute. Find it.
41582        IFS_save="$IFS"
41583        IFS=:
41584        for p in $PATH; do
41585          if test -f "$p/$path" && test -x "$p/$path"; then
41586            new_path="$p/$path"
41587            break
41588          fi
41589        done
41590        IFS="$IFS_save"
41591      else
41592        # This is an absolute path, we can use it without further modifications.
41593        new_path="$path"
41594      fi
41595
41596      if test "x$new_path" = x; then
41597        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41598$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41599        has_space=`$ECHO "$complete" | $GREP " "`
41600        if test "x$has_space" != x; then
41601          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41602$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41603        fi
41604        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41605      fi
41606    fi
41607
41608    # Now join together the path and the arguments once again
41609    if test "x$arguments" != xEOL; then
41610      new_complete="$new_path ${arguments% *}"
41611    else
41612      new_complete="$new_path"
41613    fi
41614
41615    if test "x$complete" != "x$new_complete"; then
41616      STRIP="$new_complete"
41617      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41618$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41619    fi
41620  fi
41621
41622    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41623
41624
41625  # Publish this variable in the help.
41626
41627
41628  if [ -z "${NM+x}" ]; then
41629    # The variable is not set by user, try to locate tool using the code snippet
41630    if test -n "$ac_tool_prefix"; then
41631  for ac_prog in nm gcc-nm
41632  do
41633    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41634set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41636$as_echo_n "checking for $ac_word... " >&6; }
41637if ${ac_cv_prog_NM+:} false; then :
41638  $as_echo_n "(cached) " >&6
41639else
41640  if test -n "$NM"; then
41641  ac_cv_prog_NM="$NM" # Let the user override the test.
41642else
41643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41644for as_dir in $PATH
41645do
41646  IFS=$as_save_IFS
41647  test -z "$as_dir" && as_dir=.
41648    for ac_exec_ext in '' $ac_executable_extensions; do
41649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41650    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41652    break 2
41653  fi
41654done
41655  done
41656IFS=$as_save_IFS
41657
41658fi
41659fi
41660NM=$ac_cv_prog_NM
41661if test -n "$NM"; then
41662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41663$as_echo "$NM" >&6; }
41664else
41665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41666$as_echo "no" >&6; }
41667fi
41668
41669
41670    test -n "$NM" && break
41671  done
41672fi
41673if test -z "$NM"; then
41674  ac_ct_NM=$NM
41675  for ac_prog in nm gcc-nm
41676do
41677  # Extract the first word of "$ac_prog", so it can be a program name with args.
41678set dummy $ac_prog; ac_word=$2
41679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41680$as_echo_n "checking for $ac_word... " >&6; }
41681if ${ac_cv_prog_ac_ct_NM+:} false; then :
41682  $as_echo_n "(cached) " >&6
41683else
41684  if test -n "$ac_ct_NM"; then
41685  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41686else
41687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41688for as_dir in $PATH
41689do
41690  IFS=$as_save_IFS
41691  test -z "$as_dir" && as_dir=.
41692    for ac_exec_ext in '' $ac_executable_extensions; do
41693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41694    ac_cv_prog_ac_ct_NM="$ac_prog"
41695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41696    break 2
41697  fi
41698done
41699  done
41700IFS=$as_save_IFS
41701
41702fi
41703fi
41704ac_ct_NM=$ac_cv_prog_ac_ct_NM
41705if test -n "$ac_ct_NM"; then
41706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41707$as_echo "$ac_ct_NM" >&6; }
41708else
41709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41710$as_echo "no" >&6; }
41711fi
41712
41713
41714  test -n "$ac_ct_NM" && break
41715done
41716
41717  if test "x$ac_ct_NM" = x; then
41718    NM=""
41719  else
41720    case $cross_compiling:$ac_tool_warned in
41721yes:)
41722{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41723$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41724ac_tool_warned=yes ;;
41725esac
41726    NM=$ac_ct_NM
41727  fi
41728fi
41729
41730  else
41731    # The variable is set, but is it from the command line or the environment?
41732
41733    # Try to remove the string !NM! from our list.
41734    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41735    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41736      # If it failed, the variable was not from the command line. Ignore it,
41737      # but warn the user (except for BASH, which is always set by the calling BASH).
41738      if test "xNM" != xBASH; then
41739        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41740$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41741      fi
41742      # Try to locate tool using the code snippet
41743      if test -n "$ac_tool_prefix"; then
41744  for ac_prog in nm gcc-nm
41745  do
41746    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41747set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41749$as_echo_n "checking for $ac_word... " >&6; }
41750if ${ac_cv_prog_NM+:} false; then :
41751  $as_echo_n "(cached) " >&6
41752else
41753  if test -n "$NM"; then
41754  ac_cv_prog_NM="$NM" # Let the user override the test.
41755else
41756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41757for as_dir in $PATH
41758do
41759  IFS=$as_save_IFS
41760  test -z "$as_dir" && as_dir=.
41761    for ac_exec_ext in '' $ac_executable_extensions; do
41762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41763    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41765    break 2
41766  fi
41767done
41768  done
41769IFS=$as_save_IFS
41770
41771fi
41772fi
41773NM=$ac_cv_prog_NM
41774if test -n "$NM"; then
41775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41776$as_echo "$NM" >&6; }
41777else
41778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41779$as_echo "no" >&6; }
41780fi
41781
41782
41783    test -n "$NM" && break
41784  done
41785fi
41786if test -z "$NM"; then
41787  ac_ct_NM=$NM
41788  for ac_prog in nm gcc-nm
41789do
41790  # Extract the first word of "$ac_prog", so it can be a program name with args.
41791set dummy $ac_prog; ac_word=$2
41792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41793$as_echo_n "checking for $ac_word... " >&6; }
41794if ${ac_cv_prog_ac_ct_NM+:} false; then :
41795  $as_echo_n "(cached) " >&6
41796else
41797  if test -n "$ac_ct_NM"; then
41798  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41799else
41800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41801for as_dir in $PATH
41802do
41803  IFS=$as_save_IFS
41804  test -z "$as_dir" && as_dir=.
41805    for ac_exec_ext in '' $ac_executable_extensions; do
41806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41807    ac_cv_prog_ac_ct_NM="$ac_prog"
41808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41809    break 2
41810  fi
41811done
41812  done
41813IFS=$as_save_IFS
41814
41815fi
41816fi
41817ac_ct_NM=$ac_cv_prog_ac_ct_NM
41818if test -n "$ac_ct_NM"; then
41819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41820$as_echo "$ac_ct_NM" >&6; }
41821else
41822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41823$as_echo "no" >&6; }
41824fi
41825
41826
41827  test -n "$ac_ct_NM" && break
41828done
41829
41830  if test "x$ac_ct_NM" = x; then
41831    NM=""
41832  else
41833    case $cross_compiling:$ac_tool_warned in
41834yes:)
41835{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41836$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41837ac_tool_warned=yes ;;
41838esac
41839    NM=$ac_ct_NM
41840  fi
41841fi
41842
41843    else
41844      # If it succeeded, then it was overridden by the user. We will use it
41845      # for the tool.
41846
41847      # First remove it from the list of overridden variables, so we can test
41848      # for unknown variables in the end.
41849      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41850
41851      # Check if we try to supply an empty value
41852      if test "x$NM" = x; then
41853        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41854$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41855        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41856$as_echo_n "checking for NM... " >&6; }
41857        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41858$as_echo "disabled" >&6; }
41859      else
41860        # Check if the provided tool contains a complete path.
41861        tool_specified="$NM"
41862        tool_basename="${tool_specified##*/}"
41863        if test "x$tool_basename" = "x$tool_specified"; then
41864          # A command without a complete path is provided, search $PATH.
41865          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41866$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41867          # Extract the first word of "$tool_basename", so it can be a program name with args.
41868set dummy $tool_basename; ac_word=$2
41869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41870$as_echo_n "checking for $ac_word... " >&6; }
41871if ${ac_cv_path_NM+:} false; then :
41872  $as_echo_n "(cached) " >&6
41873else
41874  case $NM in
41875  [\\/]* | ?:[\\/]*)
41876  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41877  ;;
41878  *)
41879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41880for as_dir in $PATH
41881do
41882  IFS=$as_save_IFS
41883  test -z "$as_dir" && as_dir=.
41884    for ac_exec_ext in '' $ac_executable_extensions; do
41885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41886    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41888    break 2
41889  fi
41890done
41891  done
41892IFS=$as_save_IFS
41893
41894  ;;
41895esac
41896fi
41897NM=$ac_cv_path_NM
41898if test -n "$NM"; then
41899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41900$as_echo "$NM" >&6; }
41901else
41902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41903$as_echo "no" >&6; }
41904fi
41905
41906
41907          if test "x$NM" = x; then
41908            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41909          fi
41910        else
41911          # Otherwise we believe it is a complete path. Use it as it is.
41912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41913$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41914          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41915$as_echo_n "checking for NM... " >&6; }
41916          if test ! -x "$tool_specified"; then
41917            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41918$as_echo "not found" >&6; }
41919            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41920          fi
41921          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41922$as_echo "$tool_specified" >&6; }
41923        fi
41924      fi
41925    fi
41926
41927  fi
41928
41929
41930    else
41931
41932
41933  # Publish this variable in the help.
41934
41935
41936  if [ -z "${NM+x}" ]; then
41937    # The variable is not set by user, try to locate tool using the code snippet
41938    if test -n "$ac_tool_prefix"; then
41939  for ac_prog in nm
41940  do
41941    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41942set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41944$as_echo_n "checking for $ac_word... " >&6; }
41945if ${ac_cv_prog_NM+:} false; then :
41946  $as_echo_n "(cached) " >&6
41947else
41948  if test -n "$NM"; then
41949  ac_cv_prog_NM="$NM" # Let the user override the test.
41950else
41951as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41952for as_dir in $PATH
41953do
41954  IFS=$as_save_IFS
41955  test -z "$as_dir" && as_dir=.
41956    for ac_exec_ext in '' $ac_executable_extensions; do
41957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41958    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41960    break 2
41961  fi
41962done
41963  done
41964IFS=$as_save_IFS
41965
41966fi
41967fi
41968NM=$ac_cv_prog_NM
41969if test -n "$NM"; then
41970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41971$as_echo "$NM" >&6; }
41972else
41973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41974$as_echo "no" >&6; }
41975fi
41976
41977
41978    test -n "$NM" && break
41979  done
41980fi
41981if test -z "$NM"; then
41982  ac_ct_NM=$NM
41983  for ac_prog in nm
41984do
41985  # Extract the first word of "$ac_prog", so it can be a program name with args.
41986set dummy $ac_prog; ac_word=$2
41987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41988$as_echo_n "checking for $ac_word... " >&6; }
41989if ${ac_cv_prog_ac_ct_NM+:} false; then :
41990  $as_echo_n "(cached) " >&6
41991else
41992  if test -n "$ac_ct_NM"; then
41993  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41994else
41995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41996for as_dir in $PATH
41997do
41998  IFS=$as_save_IFS
41999  test -z "$as_dir" && as_dir=.
42000    for ac_exec_ext in '' $ac_executable_extensions; do
42001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42002    ac_cv_prog_ac_ct_NM="$ac_prog"
42003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42004    break 2
42005  fi
42006done
42007  done
42008IFS=$as_save_IFS
42009
42010fi
42011fi
42012ac_ct_NM=$ac_cv_prog_ac_ct_NM
42013if test -n "$ac_ct_NM"; then
42014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42015$as_echo "$ac_ct_NM" >&6; }
42016else
42017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42018$as_echo "no" >&6; }
42019fi
42020
42021
42022  test -n "$ac_ct_NM" && break
42023done
42024
42025  if test "x$ac_ct_NM" = x; then
42026    NM=""
42027  else
42028    case $cross_compiling:$ac_tool_warned in
42029yes:)
42030{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42031$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42032ac_tool_warned=yes ;;
42033esac
42034    NM=$ac_ct_NM
42035  fi
42036fi
42037
42038  else
42039    # The variable is set, but is it from the command line or the environment?
42040
42041    # Try to remove the string !NM! from our list.
42042    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42043    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42044      # If it failed, the variable was not from the command line. Ignore it,
42045      # but warn the user (except for BASH, which is always set by the calling BASH).
42046      if test "xNM" != xBASH; then
42047        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42048$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42049      fi
42050      # Try to locate tool using the code snippet
42051      if test -n "$ac_tool_prefix"; then
42052  for ac_prog in nm
42053  do
42054    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42055set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42057$as_echo_n "checking for $ac_word... " >&6; }
42058if ${ac_cv_prog_NM+:} false; then :
42059  $as_echo_n "(cached) " >&6
42060else
42061  if test -n "$NM"; then
42062  ac_cv_prog_NM="$NM" # Let the user override the test.
42063else
42064as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42065for as_dir in $PATH
42066do
42067  IFS=$as_save_IFS
42068  test -z "$as_dir" && as_dir=.
42069    for ac_exec_ext in '' $ac_executable_extensions; do
42070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42071    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42073    break 2
42074  fi
42075done
42076  done
42077IFS=$as_save_IFS
42078
42079fi
42080fi
42081NM=$ac_cv_prog_NM
42082if test -n "$NM"; then
42083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42084$as_echo "$NM" >&6; }
42085else
42086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42087$as_echo "no" >&6; }
42088fi
42089
42090
42091    test -n "$NM" && break
42092  done
42093fi
42094if test -z "$NM"; then
42095  ac_ct_NM=$NM
42096  for ac_prog in nm
42097do
42098  # Extract the first word of "$ac_prog", so it can be a program name with args.
42099set dummy $ac_prog; ac_word=$2
42100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42101$as_echo_n "checking for $ac_word... " >&6; }
42102if ${ac_cv_prog_ac_ct_NM+:} false; then :
42103  $as_echo_n "(cached) " >&6
42104else
42105  if test -n "$ac_ct_NM"; then
42106  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42107else
42108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42109for as_dir in $PATH
42110do
42111  IFS=$as_save_IFS
42112  test -z "$as_dir" && as_dir=.
42113    for ac_exec_ext in '' $ac_executable_extensions; do
42114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42115    ac_cv_prog_ac_ct_NM="$ac_prog"
42116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42117    break 2
42118  fi
42119done
42120  done
42121IFS=$as_save_IFS
42122
42123fi
42124fi
42125ac_ct_NM=$ac_cv_prog_ac_ct_NM
42126if test -n "$ac_ct_NM"; then
42127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42128$as_echo "$ac_ct_NM" >&6; }
42129else
42130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42131$as_echo "no" >&6; }
42132fi
42133
42134
42135  test -n "$ac_ct_NM" && break
42136done
42137
42138  if test "x$ac_ct_NM" = x; then
42139    NM=""
42140  else
42141    case $cross_compiling:$ac_tool_warned in
42142yes:)
42143{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42144$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42145ac_tool_warned=yes ;;
42146esac
42147    NM=$ac_ct_NM
42148  fi
42149fi
42150
42151    else
42152      # If it succeeded, then it was overridden by the user. We will use it
42153      # for the tool.
42154
42155      # First remove it from the list of overridden variables, so we can test
42156      # for unknown variables in the end.
42157      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42158
42159      # Check if we try to supply an empty value
42160      if test "x$NM" = x; then
42161        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42162$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42163        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42164$as_echo_n "checking for NM... " >&6; }
42165        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42166$as_echo "disabled" >&6; }
42167      else
42168        # Check if the provided tool contains a complete path.
42169        tool_specified="$NM"
42170        tool_basename="${tool_specified##*/}"
42171        if test "x$tool_basename" = "x$tool_specified"; then
42172          # A command without a complete path is provided, search $PATH.
42173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42174$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42175          # Extract the first word of "$tool_basename", so it can be a program name with args.
42176set dummy $tool_basename; ac_word=$2
42177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42178$as_echo_n "checking for $ac_word... " >&6; }
42179if ${ac_cv_path_NM+:} false; then :
42180  $as_echo_n "(cached) " >&6
42181else
42182  case $NM in
42183  [\\/]* | ?:[\\/]*)
42184  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42185  ;;
42186  *)
42187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42188for as_dir in $PATH
42189do
42190  IFS=$as_save_IFS
42191  test -z "$as_dir" && as_dir=.
42192    for ac_exec_ext in '' $ac_executable_extensions; do
42193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42194    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42196    break 2
42197  fi
42198done
42199  done
42200IFS=$as_save_IFS
42201
42202  ;;
42203esac
42204fi
42205NM=$ac_cv_path_NM
42206if test -n "$NM"; then
42207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42208$as_echo "$NM" >&6; }
42209else
42210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42211$as_echo "no" >&6; }
42212fi
42213
42214
42215          if test "x$NM" = x; then
42216            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42217          fi
42218        else
42219          # Otherwise we believe it is a complete path. Use it as it is.
42220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42221$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42222          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42223$as_echo_n "checking for NM... " >&6; }
42224          if test ! -x "$tool_specified"; then
42225            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42226$as_echo "not found" >&6; }
42227            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42228          fi
42229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42230$as_echo "$tool_specified" >&6; }
42231        fi
42232      fi
42233    fi
42234
42235  fi
42236
42237
42238    fi
42239
42240  # Only process if variable expands to non-empty
42241
42242  if test "x$NM" != x; then
42243    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42244
42245  # First separate the path from the arguments. This will split at the first
42246  # space.
42247  complete="$NM"
42248  path="${complete%% *}"
42249  tmp="$complete EOL"
42250  arguments="${tmp#* }"
42251
42252  # Input might be given as Windows format, start by converting to
42253  # unix format.
42254  new_path=`$CYGPATH -u "$path"`
42255
42256  # Now try to locate executable using which
42257  new_path=`$WHICH "$new_path" 2> /dev/null`
42258  # bat and cmd files are not always considered executable in cygwin causing which
42259  # to not find them
42260  if test "x$new_path" = x \
42261      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42262      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42263    new_path=`$CYGPATH -u "$path"`
42264  fi
42265  if test "x$new_path" = x; then
42266    # Oops. Which didn't find the executable.
42267    # The splitting of arguments from the executable at a space might have been incorrect,
42268    # since paths with space are more likely in Windows. Give it another try with the whole
42269    # argument.
42270    path="$complete"
42271    arguments="EOL"
42272    new_path=`$CYGPATH -u "$path"`
42273    new_path=`$WHICH "$new_path" 2> /dev/null`
42274    # bat and cmd files are not always considered executable in cygwin causing which
42275    # to not find them
42276    if test "x$new_path" = x \
42277        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42278        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42279      new_path=`$CYGPATH -u "$path"`
42280    fi
42281    if test "x$new_path" = x; then
42282      # It's still not found. Now this is an unrecoverable error.
42283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42284$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42285      has_space=`$ECHO "$complete" | $GREP " "`
42286      if test "x$has_space" != x; then
42287        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42288$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42289      fi
42290      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42291    fi
42292  fi
42293
42294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42297  # "foo.exe" is OK but "foo" is an error.
42298  #
42299  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42300  # It is also a way to make sure we got the proper file name for the real test later on.
42301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42302  if test "x$test_shortpath" = x; then
42303    # Short path failed, file does not exist as specified.
42304    # Try adding .exe or .cmd
42305    if test -f "${new_path}.exe"; then
42306      input_to_shortpath="${new_path}.exe"
42307    elif test -f "${new_path}.cmd"; then
42308      input_to_shortpath="${new_path}.cmd"
42309    else
42310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42311$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42312      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42313$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42314      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42315    fi
42316  else
42317    input_to_shortpath="$new_path"
42318  fi
42319
42320  # Call helper function which possibly converts this using DOS-style short mode.
42321  # If so, the updated path is stored in $new_path.
42322  new_path="$input_to_shortpath"
42323
42324  input_path="$input_to_shortpath"
42325  # Check if we need to convert this using DOS-style short mode. If the path
42326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42327  # take no chances and rewrite it.
42328  # Note: m4 eats our [], so we need to use [ and ] instead.
42329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42330  if test "x$has_forbidden_chars" != x; then
42331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42335      # Going to short mode and back again did indeed matter. Since short mode is
42336      # case insensitive, let's make it lowercase to improve readability.
42337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42338      # Now convert it back to Unix-style (cygpath)
42339      input_path=`$CYGPATH -u "$shortmode_path"`
42340      new_path="$input_path"
42341    fi
42342  fi
42343
42344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42345  if test "x$test_cygdrive_prefix" = x; then
42346    # As a simple fix, exclude /usr/bin since it's not a real path.
42347    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42349      # a path prefixed by /cygdrive for fixpath to work.
42350      new_path="$CYGWIN_ROOT_PATH$input_path"
42351    fi
42352  fi
42353
42354  # remove trailing .exe if any
42355  new_path="${new_path/%.exe/}"
42356
42357    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42358
42359  # First separate the path from the arguments. This will split at the first
42360  # space.
42361  complete="$NM"
42362  path="${complete%% *}"
42363  tmp="$complete EOL"
42364  arguments="${tmp#* }"
42365
42366  # Input might be given as Windows format, start by converting to
42367  # unix format.
42368  new_path="$path"
42369
42370  windows_path="$new_path"
42371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42372    unix_path=`$CYGPATH -u "$windows_path"`
42373    new_path="$unix_path"
42374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42376    new_path="$unix_path"
42377  fi
42378
42379
42380  # Now try to locate executable using which
42381  new_path=`$WHICH "$new_path" 2> /dev/null`
42382
42383  if test "x$new_path" = x; then
42384    # Oops. Which didn't find the executable.
42385    # The splitting of arguments from the executable at a space might have been incorrect,
42386    # since paths with space are more likely in Windows. Give it another try with the whole
42387    # argument.
42388    path="$complete"
42389    arguments="EOL"
42390    new_path="$path"
42391
42392  windows_path="$new_path"
42393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42394    unix_path=`$CYGPATH -u "$windows_path"`
42395    new_path="$unix_path"
42396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42398    new_path="$unix_path"
42399  fi
42400
42401
42402    new_path=`$WHICH "$new_path" 2> /dev/null`
42403    # bat and cmd files are not always considered executable in MSYS causing which
42404    # to not find them
42405    if test "x$new_path" = x \
42406        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42407        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42408      new_path="$path"
42409
42410  windows_path="$new_path"
42411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42412    unix_path=`$CYGPATH -u "$windows_path"`
42413    new_path="$unix_path"
42414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42416    new_path="$unix_path"
42417  fi
42418
42419    fi
42420
42421    if test "x$new_path" = x; then
42422      # It's still not found. Now this is an unrecoverable error.
42423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42424$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42425      has_space=`$ECHO "$complete" | $GREP " "`
42426      if test "x$has_space" != x; then
42427        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42428$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42429      fi
42430      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42431    fi
42432  fi
42433
42434  # Now new_path has a complete unix path to the binary
42435  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42436    # Keep paths in /bin as-is, but remove trailing .exe if any
42437    new_path="${new_path/%.exe/}"
42438    # Do not save /bin paths to all_fixpath_prefixes!
42439  else
42440    # Not in mixed or Windows style, start by that.
42441    new_path=`cmd //c echo $new_path`
42442
42443  input_path="$new_path"
42444  # Check if we need to convert this using DOS-style short mode. If the path
42445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42446  # take no chances and rewrite it.
42447  # Note: m4 eats our [], so we need to use [ and ] instead.
42448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42449  if test "x$has_forbidden_chars" != x; then
42450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42452  fi
42453
42454    # Output is in $new_path
42455
42456  windows_path="$new_path"
42457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42458    unix_path=`$CYGPATH -u "$windows_path"`
42459    new_path="$unix_path"
42460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42462    new_path="$unix_path"
42463  fi
42464
42465    # remove trailing .exe if any
42466    new_path="${new_path/%.exe/}"
42467
42468    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42469    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42470  fi
42471
42472    else
42473      # We're on a unix platform. Hooray! :)
42474      # First separate the path from the arguments. This will split at the first
42475      # space.
42476      complete="$NM"
42477      path="${complete%% *}"
42478      tmp="$complete EOL"
42479      arguments="${tmp#* }"
42480
42481      # Cannot rely on the command "which" here since it doesn't always work.
42482      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42483      if test -z "$is_absolute_path"; then
42484        # Path to executable is not absolute. Find it.
42485        IFS_save="$IFS"
42486        IFS=:
42487        for p in $PATH; do
42488          if test -f "$p/$path" && test -x "$p/$path"; then
42489            new_path="$p/$path"
42490            break
42491          fi
42492        done
42493        IFS="$IFS_save"
42494      else
42495        # This is an absolute path, we can use it without further modifications.
42496        new_path="$path"
42497      fi
42498
42499      if test "x$new_path" = x; then
42500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42501$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42502        has_space=`$ECHO "$complete" | $GREP " "`
42503        if test "x$has_space" != x; then
42504          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42505$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42506        fi
42507        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42508      fi
42509    fi
42510
42511    # Now join together the path and the arguments once again
42512    if test "x$arguments" != xEOL; then
42513      new_complete="$new_path ${arguments% *}"
42514    else
42515      new_complete="$new_path"
42516    fi
42517
42518    if test "x$complete" != "x$new_complete"; then
42519      NM="$new_complete"
42520      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42521$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42522    fi
42523  fi
42524
42525    GNM="$NM"
42526
42527  fi
42528
42529  # objcopy is used for moving debug symbols to separate files when
42530  # full debug symbols are enabled.
42531  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42532
42533
42534  # Publish this variable in the help.
42535
42536
42537  if [ -z "${OBJCOPY+x}" ]; then
42538    # The variable is not set by user, try to locate tool using the code snippet
42539    if test -n "$ac_tool_prefix"; then
42540  for ac_prog in gobjcopy objcopy
42541  do
42542    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42543set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42545$as_echo_n "checking for $ac_word... " >&6; }
42546if ${ac_cv_prog_OBJCOPY+:} false; then :
42547  $as_echo_n "(cached) " >&6
42548else
42549  if test -n "$OBJCOPY"; then
42550  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42551else
42552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42553for as_dir in $PATH
42554do
42555  IFS=$as_save_IFS
42556  test -z "$as_dir" && as_dir=.
42557    for ac_exec_ext in '' $ac_executable_extensions; do
42558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42559    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42561    break 2
42562  fi
42563done
42564  done
42565IFS=$as_save_IFS
42566
42567fi
42568fi
42569OBJCOPY=$ac_cv_prog_OBJCOPY
42570if test -n "$OBJCOPY"; then
42571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42572$as_echo "$OBJCOPY" >&6; }
42573else
42574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42575$as_echo "no" >&6; }
42576fi
42577
42578
42579    test -n "$OBJCOPY" && break
42580  done
42581fi
42582if test -z "$OBJCOPY"; then
42583  ac_ct_OBJCOPY=$OBJCOPY
42584  for ac_prog in gobjcopy objcopy
42585do
42586  # Extract the first word of "$ac_prog", so it can be a program name with args.
42587set dummy $ac_prog; ac_word=$2
42588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42589$as_echo_n "checking for $ac_word... " >&6; }
42590if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42591  $as_echo_n "(cached) " >&6
42592else
42593  if test -n "$ac_ct_OBJCOPY"; then
42594  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42595else
42596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42597for as_dir in $PATH
42598do
42599  IFS=$as_save_IFS
42600  test -z "$as_dir" && as_dir=.
42601    for ac_exec_ext in '' $ac_executable_extensions; do
42602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42603    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42605    break 2
42606  fi
42607done
42608  done
42609IFS=$as_save_IFS
42610
42611fi
42612fi
42613ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42614if test -n "$ac_ct_OBJCOPY"; then
42615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42616$as_echo "$ac_ct_OBJCOPY" >&6; }
42617else
42618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42619$as_echo "no" >&6; }
42620fi
42621
42622
42623  test -n "$ac_ct_OBJCOPY" && break
42624done
42625
42626  if test "x$ac_ct_OBJCOPY" = x; then
42627    OBJCOPY=""
42628  else
42629    case $cross_compiling:$ac_tool_warned in
42630yes:)
42631{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42632$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42633ac_tool_warned=yes ;;
42634esac
42635    OBJCOPY=$ac_ct_OBJCOPY
42636  fi
42637fi
42638
42639  else
42640    # The variable is set, but is it from the command line or the environment?
42641
42642    # Try to remove the string !OBJCOPY! from our list.
42643    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42644    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42645      # If it failed, the variable was not from the command line. Ignore it,
42646      # but warn the user (except for BASH, which is always set by the calling BASH).
42647      if test "xOBJCOPY" != xBASH; then
42648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42649$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42650      fi
42651      # Try to locate tool using the code snippet
42652      if test -n "$ac_tool_prefix"; then
42653  for ac_prog in gobjcopy objcopy
42654  do
42655    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42656set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42658$as_echo_n "checking for $ac_word... " >&6; }
42659if ${ac_cv_prog_OBJCOPY+:} false; then :
42660  $as_echo_n "(cached) " >&6
42661else
42662  if test -n "$OBJCOPY"; then
42663  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42664else
42665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42666for as_dir in $PATH
42667do
42668  IFS=$as_save_IFS
42669  test -z "$as_dir" && as_dir=.
42670    for ac_exec_ext in '' $ac_executable_extensions; do
42671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42672    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42674    break 2
42675  fi
42676done
42677  done
42678IFS=$as_save_IFS
42679
42680fi
42681fi
42682OBJCOPY=$ac_cv_prog_OBJCOPY
42683if test -n "$OBJCOPY"; then
42684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42685$as_echo "$OBJCOPY" >&6; }
42686else
42687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42688$as_echo "no" >&6; }
42689fi
42690
42691
42692    test -n "$OBJCOPY" && break
42693  done
42694fi
42695if test -z "$OBJCOPY"; then
42696  ac_ct_OBJCOPY=$OBJCOPY
42697  for ac_prog in gobjcopy objcopy
42698do
42699  # Extract the first word of "$ac_prog", so it can be a program name with args.
42700set dummy $ac_prog; ac_word=$2
42701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42702$as_echo_n "checking for $ac_word... " >&6; }
42703if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42704  $as_echo_n "(cached) " >&6
42705else
42706  if test -n "$ac_ct_OBJCOPY"; then
42707  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42708else
42709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42710for as_dir in $PATH
42711do
42712  IFS=$as_save_IFS
42713  test -z "$as_dir" && as_dir=.
42714    for ac_exec_ext in '' $ac_executable_extensions; do
42715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42716    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42718    break 2
42719  fi
42720done
42721  done
42722IFS=$as_save_IFS
42723
42724fi
42725fi
42726ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42727if test -n "$ac_ct_OBJCOPY"; then
42728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42729$as_echo "$ac_ct_OBJCOPY" >&6; }
42730else
42731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42732$as_echo "no" >&6; }
42733fi
42734
42735
42736  test -n "$ac_ct_OBJCOPY" && break
42737done
42738
42739  if test "x$ac_ct_OBJCOPY" = x; then
42740    OBJCOPY=""
42741  else
42742    case $cross_compiling:$ac_tool_warned in
42743yes:)
42744{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42745$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42746ac_tool_warned=yes ;;
42747esac
42748    OBJCOPY=$ac_ct_OBJCOPY
42749  fi
42750fi
42751
42752    else
42753      # If it succeeded, then it was overridden by the user. We will use it
42754      # for the tool.
42755
42756      # First remove it from the list of overridden variables, so we can test
42757      # for unknown variables in the end.
42758      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42759
42760      # Check if we try to supply an empty value
42761      if test "x$OBJCOPY" = x; then
42762        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42763$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42764        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42765$as_echo_n "checking for OBJCOPY... " >&6; }
42766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42767$as_echo "disabled" >&6; }
42768      else
42769        # Check if the provided tool contains a complete path.
42770        tool_specified="$OBJCOPY"
42771        tool_basename="${tool_specified##*/}"
42772        if test "x$tool_basename" = "x$tool_specified"; then
42773          # A command without a complete path is provided, search $PATH.
42774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42775$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42776          # Extract the first word of "$tool_basename", so it can be a program name with args.
42777set dummy $tool_basename; ac_word=$2
42778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42779$as_echo_n "checking for $ac_word... " >&6; }
42780if ${ac_cv_path_OBJCOPY+:} false; then :
42781  $as_echo_n "(cached) " >&6
42782else
42783  case $OBJCOPY in
42784  [\\/]* | ?:[\\/]*)
42785  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42786  ;;
42787  *)
42788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42789for as_dir in $PATH
42790do
42791  IFS=$as_save_IFS
42792  test -z "$as_dir" && as_dir=.
42793    for ac_exec_ext in '' $ac_executable_extensions; do
42794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42795    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42797    break 2
42798  fi
42799done
42800  done
42801IFS=$as_save_IFS
42802
42803  ;;
42804esac
42805fi
42806OBJCOPY=$ac_cv_path_OBJCOPY
42807if test -n "$OBJCOPY"; then
42808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42809$as_echo "$OBJCOPY" >&6; }
42810else
42811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42812$as_echo "no" >&6; }
42813fi
42814
42815
42816          if test "x$OBJCOPY" = x; then
42817            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42818          fi
42819        else
42820          # Otherwise we believe it is a complete path. Use it as it is.
42821          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42822$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42823          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42824$as_echo_n "checking for OBJCOPY... " >&6; }
42825          if test ! -x "$tool_specified"; then
42826            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42827$as_echo "not found" >&6; }
42828            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42829          fi
42830          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42831$as_echo "$tool_specified" >&6; }
42832        fi
42833      fi
42834    fi
42835
42836  fi
42837
42838
42839    # Only call fixup if objcopy was found.
42840    if test -n "$OBJCOPY"; then
42841
42842  # Only process if variable expands to non-empty
42843
42844  if test "x$OBJCOPY" != x; then
42845    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42846
42847  # First separate the path from the arguments. This will split at the first
42848  # space.
42849  complete="$OBJCOPY"
42850  path="${complete%% *}"
42851  tmp="$complete EOL"
42852  arguments="${tmp#* }"
42853
42854  # Input might be given as Windows format, start by converting to
42855  # unix format.
42856  new_path=`$CYGPATH -u "$path"`
42857
42858  # Now try to locate executable using which
42859  new_path=`$WHICH "$new_path" 2> /dev/null`
42860  # bat and cmd files are not always considered executable in cygwin causing which
42861  # to not find them
42862  if test "x$new_path" = x \
42863      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42864      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42865    new_path=`$CYGPATH -u "$path"`
42866  fi
42867  if test "x$new_path" = x; then
42868    # Oops. Which didn't find the executable.
42869    # The splitting of arguments from the executable at a space might have been incorrect,
42870    # since paths with space are more likely in Windows. Give it another try with the whole
42871    # argument.
42872    path="$complete"
42873    arguments="EOL"
42874    new_path=`$CYGPATH -u "$path"`
42875    new_path=`$WHICH "$new_path" 2> /dev/null`
42876    # bat and cmd files are not always considered executable in cygwin causing which
42877    # to not find them
42878    if test "x$new_path" = x \
42879        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42880        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42881      new_path=`$CYGPATH -u "$path"`
42882    fi
42883    if test "x$new_path" = x; then
42884      # It's still not found. Now this is an unrecoverable error.
42885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42886$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42887      has_space=`$ECHO "$complete" | $GREP " "`
42888      if test "x$has_space" != x; then
42889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42891      fi
42892      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42893    fi
42894  fi
42895
42896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42899  # "foo.exe" is OK but "foo" is an error.
42900  #
42901  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42902  # It is also a way to make sure we got the proper file name for the real test later on.
42903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42904  if test "x$test_shortpath" = x; then
42905    # Short path failed, file does not exist as specified.
42906    # Try adding .exe or .cmd
42907    if test -f "${new_path}.exe"; then
42908      input_to_shortpath="${new_path}.exe"
42909    elif test -f "${new_path}.cmd"; then
42910      input_to_shortpath="${new_path}.cmd"
42911    else
42912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42913$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42914      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42915$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42916      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42917    fi
42918  else
42919    input_to_shortpath="$new_path"
42920  fi
42921
42922  # Call helper function which possibly converts this using DOS-style short mode.
42923  # If so, the updated path is stored in $new_path.
42924  new_path="$input_to_shortpath"
42925
42926  input_path="$input_to_shortpath"
42927  # Check if we need to convert this using DOS-style short mode. If the path
42928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42929  # take no chances and rewrite it.
42930  # Note: m4 eats our [], so we need to use [ and ] instead.
42931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42932  if test "x$has_forbidden_chars" != x; then
42933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42934    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42935    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42936    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42937      # Going to short mode and back again did indeed matter. Since short mode is
42938      # case insensitive, let's make it lowercase to improve readability.
42939      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42940      # Now convert it back to Unix-style (cygpath)
42941      input_path=`$CYGPATH -u "$shortmode_path"`
42942      new_path="$input_path"
42943    fi
42944  fi
42945
42946  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42947  if test "x$test_cygdrive_prefix" = x; then
42948    # As a simple fix, exclude /usr/bin since it's not a real path.
42949    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42950      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42951      # a path prefixed by /cygdrive for fixpath to work.
42952      new_path="$CYGWIN_ROOT_PATH$input_path"
42953    fi
42954  fi
42955
42956  # remove trailing .exe if any
42957  new_path="${new_path/%.exe/}"
42958
42959    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42960
42961  # First separate the path from the arguments. This will split at the first
42962  # space.
42963  complete="$OBJCOPY"
42964  path="${complete%% *}"
42965  tmp="$complete EOL"
42966  arguments="${tmp#* }"
42967
42968  # Input might be given as Windows format, start by converting to
42969  # unix format.
42970  new_path="$path"
42971
42972  windows_path="$new_path"
42973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42974    unix_path=`$CYGPATH -u "$windows_path"`
42975    new_path="$unix_path"
42976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42978    new_path="$unix_path"
42979  fi
42980
42981
42982  # Now try to locate executable using which
42983  new_path=`$WHICH "$new_path" 2> /dev/null`
42984
42985  if test "x$new_path" = x; then
42986    # Oops. Which didn't find the executable.
42987    # The splitting of arguments from the executable at a space might have been incorrect,
42988    # since paths with space are more likely in Windows. Give it another try with the whole
42989    # argument.
42990    path="$complete"
42991    arguments="EOL"
42992    new_path="$path"
42993
42994  windows_path="$new_path"
42995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42996    unix_path=`$CYGPATH -u "$windows_path"`
42997    new_path="$unix_path"
42998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43000    new_path="$unix_path"
43001  fi
43002
43003
43004    new_path=`$WHICH "$new_path" 2> /dev/null`
43005    # bat and cmd files are not always considered executable in MSYS causing which
43006    # to not find them
43007    if test "x$new_path" = x \
43008        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43009        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43010      new_path="$path"
43011
43012  windows_path="$new_path"
43013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43014    unix_path=`$CYGPATH -u "$windows_path"`
43015    new_path="$unix_path"
43016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43018    new_path="$unix_path"
43019  fi
43020
43021    fi
43022
43023    if test "x$new_path" = x; then
43024      # It's still not found. Now this is an unrecoverable error.
43025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43026$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43027      has_space=`$ECHO "$complete" | $GREP " "`
43028      if test "x$has_space" != x; then
43029        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43030$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43031      fi
43032      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43033    fi
43034  fi
43035
43036  # Now new_path has a complete unix path to the binary
43037  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43038    # Keep paths in /bin as-is, but remove trailing .exe if any
43039    new_path="${new_path/%.exe/}"
43040    # Do not save /bin paths to all_fixpath_prefixes!
43041  else
43042    # Not in mixed or Windows style, start by that.
43043    new_path=`cmd //c echo $new_path`
43044
43045  input_path="$new_path"
43046  # Check if we need to convert this using DOS-style short mode. If the path
43047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43048  # take no chances and rewrite it.
43049  # Note: m4 eats our [], so we need to use [ and ] instead.
43050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43051  if test "x$has_forbidden_chars" != x; then
43052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43054  fi
43055
43056    # Output is in $new_path
43057
43058  windows_path="$new_path"
43059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43060    unix_path=`$CYGPATH -u "$windows_path"`
43061    new_path="$unix_path"
43062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43064    new_path="$unix_path"
43065  fi
43066
43067    # remove trailing .exe if any
43068    new_path="${new_path/%.exe/}"
43069
43070    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43071    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43072  fi
43073
43074    else
43075      # We're on a unix platform. Hooray! :)
43076      # First separate the path from the arguments. This will split at the first
43077      # space.
43078      complete="$OBJCOPY"
43079      path="${complete%% *}"
43080      tmp="$complete EOL"
43081      arguments="${tmp#* }"
43082
43083      # Cannot rely on the command "which" here since it doesn't always work.
43084      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43085      if test -z "$is_absolute_path"; then
43086        # Path to executable is not absolute. Find it.
43087        IFS_save="$IFS"
43088        IFS=:
43089        for p in $PATH; do
43090          if test -f "$p/$path" && test -x "$p/$path"; then
43091            new_path="$p/$path"
43092            break
43093          fi
43094        done
43095        IFS="$IFS_save"
43096      else
43097        # This is an absolute path, we can use it without further modifications.
43098        new_path="$path"
43099      fi
43100
43101      if test "x$new_path" = x; then
43102        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43103$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43104        has_space=`$ECHO "$complete" | $GREP " "`
43105        if test "x$has_space" != x; then
43106          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43107$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43108        fi
43109        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43110      fi
43111    fi
43112
43113    # Now join together the path and the arguments once again
43114    if test "x$arguments" != xEOL; then
43115      new_complete="$new_path ${arguments% *}"
43116    else
43117      new_complete="$new_path"
43118    fi
43119
43120    if test "x$complete" != "x$new_complete"; then
43121      OBJCOPY="$new_complete"
43122      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43123$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43124    fi
43125  fi
43126
43127      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43128        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43129        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43130        # - version number is last blank separate word on first line
43131        # - version number formats that have been seen:
43132        #   - <major>.<minor>
43133        #   - <major>.<minor>.<micro>
43134        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43135        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43136         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43137              -e 's/.* //' \
43138              -e '/^[01]\./b bad' \
43139              -e '/^2\./{' \
43140              -e '  s/^2\.//' \
43141              -e '  /^[0-9]$/b bad' \
43142              -e '  /^[0-9]\./b bad' \
43143              -e '  /^1[0-9]$/b bad' \
43144              -e '  /^1[0-9]\./b bad' \
43145              -e '  /^20\./b bad' \
43146              -e '  /^21\.0$/b bad' \
43147              -e '  /^21\.0\./b bad' \
43148              -e '}' \
43149              -e ':good' \
43150              -e 's/.*/VALID_VERSION/p' \
43151              -e 'q' \
43152              -e ':bad' \
43153              -e 's/.*/BAD_VERSION/p' \
43154              -e 'q'`
43155        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43156          OBJCOPY=
43157          { $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
43158$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43159          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43160$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43161          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43162$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43163          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43164$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43165          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43166$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43167        fi
43168      fi
43169    fi
43170  fi
43171
43172
43173
43174  # Publish this variable in the help.
43175
43176
43177  if [ -z "${OBJDUMP+x}" ]; then
43178    # The variable is not set by user, try to locate tool using the code snippet
43179    if test -n "$ac_tool_prefix"; then
43180  for ac_prog in gobjdump objdump
43181  do
43182    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43183set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43185$as_echo_n "checking for $ac_word... " >&6; }
43186if ${ac_cv_prog_OBJDUMP+:} false; then :
43187  $as_echo_n "(cached) " >&6
43188else
43189  if test -n "$OBJDUMP"; then
43190  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43191else
43192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43193for as_dir in $PATH
43194do
43195  IFS=$as_save_IFS
43196  test -z "$as_dir" && as_dir=.
43197    for ac_exec_ext in '' $ac_executable_extensions; do
43198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43199    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43201    break 2
43202  fi
43203done
43204  done
43205IFS=$as_save_IFS
43206
43207fi
43208fi
43209OBJDUMP=$ac_cv_prog_OBJDUMP
43210if test -n "$OBJDUMP"; then
43211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43212$as_echo "$OBJDUMP" >&6; }
43213else
43214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43215$as_echo "no" >&6; }
43216fi
43217
43218
43219    test -n "$OBJDUMP" && break
43220  done
43221fi
43222if test -z "$OBJDUMP"; then
43223  ac_ct_OBJDUMP=$OBJDUMP
43224  for ac_prog in gobjdump objdump
43225do
43226  # Extract the first word of "$ac_prog", so it can be a program name with args.
43227set dummy $ac_prog; ac_word=$2
43228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43229$as_echo_n "checking for $ac_word... " >&6; }
43230if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43231  $as_echo_n "(cached) " >&6
43232else
43233  if test -n "$ac_ct_OBJDUMP"; then
43234  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43235else
43236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43237for as_dir in $PATH
43238do
43239  IFS=$as_save_IFS
43240  test -z "$as_dir" && as_dir=.
43241    for ac_exec_ext in '' $ac_executable_extensions; do
43242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43243    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43245    break 2
43246  fi
43247done
43248  done
43249IFS=$as_save_IFS
43250
43251fi
43252fi
43253ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43254if test -n "$ac_ct_OBJDUMP"; then
43255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43256$as_echo "$ac_ct_OBJDUMP" >&6; }
43257else
43258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43259$as_echo "no" >&6; }
43260fi
43261
43262
43263  test -n "$ac_ct_OBJDUMP" && break
43264done
43265
43266  if test "x$ac_ct_OBJDUMP" = x; then
43267    OBJDUMP=""
43268  else
43269    case $cross_compiling:$ac_tool_warned in
43270yes:)
43271{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43272$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43273ac_tool_warned=yes ;;
43274esac
43275    OBJDUMP=$ac_ct_OBJDUMP
43276  fi
43277fi
43278
43279  else
43280    # The variable is set, but is it from the command line or the environment?
43281
43282    # Try to remove the string !OBJDUMP! from our list.
43283    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43284    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43285      # If it failed, the variable was not from the command line. Ignore it,
43286      # but warn the user (except for BASH, which is always set by the calling BASH).
43287      if test "xOBJDUMP" != xBASH; then
43288        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43289$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43290      fi
43291      # Try to locate tool using the code snippet
43292      if test -n "$ac_tool_prefix"; then
43293  for ac_prog in gobjdump objdump
43294  do
43295    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43296set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43298$as_echo_n "checking for $ac_word... " >&6; }
43299if ${ac_cv_prog_OBJDUMP+:} false; then :
43300  $as_echo_n "(cached) " >&6
43301else
43302  if test -n "$OBJDUMP"; then
43303  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43304else
43305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43306for as_dir in $PATH
43307do
43308  IFS=$as_save_IFS
43309  test -z "$as_dir" && as_dir=.
43310    for ac_exec_ext in '' $ac_executable_extensions; do
43311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43312    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43314    break 2
43315  fi
43316done
43317  done
43318IFS=$as_save_IFS
43319
43320fi
43321fi
43322OBJDUMP=$ac_cv_prog_OBJDUMP
43323if test -n "$OBJDUMP"; then
43324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43325$as_echo "$OBJDUMP" >&6; }
43326else
43327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43328$as_echo "no" >&6; }
43329fi
43330
43331
43332    test -n "$OBJDUMP" && break
43333  done
43334fi
43335if test -z "$OBJDUMP"; then
43336  ac_ct_OBJDUMP=$OBJDUMP
43337  for ac_prog in gobjdump objdump
43338do
43339  # Extract the first word of "$ac_prog", so it can be a program name with args.
43340set dummy $ac_prog; ac_word=$2
43341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43342$as_echo_n "checking for $ac_word... " >&6; }
43343if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43344  $as_echo_n "(cached) " >&6
43345else
43346  if test -n "$ac_ct_OBJDUMP"; then
43347  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43348else
43349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43350for as_dir in $PATH
43351do
43352  IFS=$as_save_IFS
43353  test -z "$as_dir" && as_dir=.
43354    for ac_exec_ext in '' $ac_executable_extensions; do
43355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43356    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43358    break 2
43359  fi
43360done
43361  done
43362IFS=$as_save_IFS
43363
43364fi
43365fi
43366ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43367if test -n "$ac_ct_OBJDUMP"; then
43368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43369$as_echo "$ac_ct_OBJDUMP" >&6; }
43370else
43371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43372$as_echo "no" >&6; }
43373fi
43374
43375
43376  test -n "$ac_ct_OBJDUMP" && break
43377done
43378
43379  if test "x$ac_ct_OBJDUMP" = x; then
43380    OBJDUMP=""
43381  else
43382    case $cross_compiling:$ac_tool_warned in
43383yes:)
43384{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43385$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43386ac_tool_warned=yes ;;
43387esac
43388    OBJDUMP=$ac_ct_OBJDUMP
43389  fi
43390fi
43391
43392    else
43393      # If it succeeded, then it was overridden by the user. We will use it
43394      # for the tool.
43395
43396      # First remove it from the list of overridden variables, so we can test
43397      # for unknown variables in the end.
43398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43399
43400      # Check if we try to supply an empty value
43401      if test "x$OBJDUMP" = x; then
43402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43403$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43405$as_echo_n "checking for OBJDUMP... " >&6; }
43406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43407$as_echo "disabled" >&6; }
43408      else
43409        # Check if the provided tool contains a complete path.
43410        tool_specified="$OBJDUMP"
43411        tool_basename="${tool_specified##*/}"
43412        if test "x$tool_basename" = "x$tool_specified"; then
43413          # A command without a complete path is provided, search $PATH.
43414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43415$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43416          # Extract the first word of "$tool_basename", so it can be a program name with args.
43417set dummy $tool_basename; ac_word=$2
43418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43419$as_echo_n "checking for $ac_word... " >&6; }
43420if ${ac_cv_path_OBJDUMP+:} false; then :
43421  $as_echo_n "(cached) " >&6
43422else
43423  case $OBJDUMP in
43424  [\\/]* | ?:[\\/]*)
43425  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43426  ;;
43427  *)
43428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43429for as_dir in $PATH
43430do
43431  IFS=$as_save_IFS
43432  test -z "$as_dir" && as_dir=.
43433    for ac_exec_ext in '' $ac_executable_extensions; do
43434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43435    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43437    break 2
43438  fi
43439done
43440  done
43441IFS=$as_save_IFS
43442
43443  ;;
43444esac
43445fi
43446OBJDUMP=$ac_cv_path_OBJDUMP
43447if test -n "$OBJDUMP"; then
43448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43449$as_echo "$OBJDUMP" >&6; }
43450else
43451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43452$as_echo "no" >&6; }
43453fi
43454
43455
43456          if test "x$OBJDUMP" = x; then
43457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43458          fi
43459        else
43460          # Otherwise we believe it is a complete path. Use it as it is.
43461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43462$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43464$as_echo_n "checking for OBJDUMP... " >&6; }
43465          if test ! -x "$tool_specified"; then
43466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43467$as_echo "not found" >&6; }
43468            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43469          fi
43470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43471$as_echo "$tool_specified" >&6; }
43472        fi
43473      fi
43474    fi
43475
43476  fi
43477
43478
43479  if test "x$OBJDUMP" != x; then
43480    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43481    # bails if argument is missing.
43482
43483  # Only process if variable expands to non-empty
43484
43485  if test "x$OBJDUMP" != x; then
43486    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43487
43488  # First separate the path from the arguments. This will split at the first
43489  # space.
43490  complete="$OBJDUMP"
43491  path="${complete%% *}"
43492  tmp="$complete EOL"
43493  arguments="${tmp#* }"
43494
43495  # Input might be given as Windows format, start by converting to
43496  # unix format.
43497  new_path=`$CYGPATH -u "$path"`
43498
43499  # Now try to locate executable using which
43500  new_path=`$WHICH "$new_path" 2> /dev/null`
43501  # bat and cmd files are not always considered executable in cygwin causing which
43502  # to not find them
43503  if test "x$new_path" = x \
43504      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43505      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43506    new_path=`$CYGPATH -u "$path"`
43507  fi
43508  if test "x$new_path" = x; then
43509    # Oops. Which didn't find the executable.
43510    # The splitting of arguments from the executable at a space might have been incorrect,
43511    # since paths with space are more likely in Windows. Give it another try with the whole
43512    # argument.
43513    path="$complete"
43514    arguments="EOL"
43515    new_path=`$CYGPATH -u "$path"`
43516    new_path=`$WHICH "$new_path" 2> /dev/null`
43517    # bat and cmd files are not always considered executable in cygwin causing which
43518    # to not find them
43519    if test "x$new_path" = x \
43520        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43521        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43522      new_path=`$CYGPATH -u "$path"`
43523    fi
43524    if test "x$new_path" = x; then
43525      # It's still not found. Now this is an unrecoverable error.
43526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43527$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43528      has_space=`$ECHO "$complete" | $GREP " "`
43529      if test "x$has_space" != x; then
43530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43532      fi
43533      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43534    fi
43535  fi
43536
43537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43540  # "foo.exe" is OK but "foo" is an error.
43541  #
43542  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43543  # It is also a way to make sure we got the proper file name for the real test later on.
43544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43545  if test "x$test_shortpath" = x; then
43546    # Short path failed, file does not exist as specified.
43547    # Try adding .exe or .cmd
43548    if test -f "${new_path}.exe"; then
43549      input_to_shortpath="${new_path}.exe"
43550    elif test -f "${new_path}.cmd"; then
43551      input_to_shortpath="${new_path}.cmd"
43552    else
43553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43554$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43555      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43556$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43557      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43558    fi
43559  else
43560    input_to_shortpath="$new_path"
43561  fi
43562
43563  # Call helper function which possibly converts this using DOS-style short mode.
43564  # If so, the updated path is stored in $new_path.
43565  new_path="$input_to_shortpath"
43566
43567  input_path="$input_to_shortpath"
43568  # Check if we need to convert this using DOS-style short mode. If the path
43569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43570  # take no chances and rewrite it.
43571  # Note: m4 eats our [], so we need to use [ and ] instead.
43572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43573  if test "x$has_forbidden_chars" != x; then
43574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43578      # Going to short mode and back again did indeed matter. Since short mode is
43579      # case insensitive, let's make it lowercase to improve readability.
43580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43581      # Now convert it back to Unix-style (cygpath)
43582      input_path=`$CYGPATH -u "$shortmode_path"`
43583      new_path="$input_path"
43584    fi
43585  fi
43586
43587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43588  if test "x$test_cygdrive_prefix" = x; then
43589    # As a simple fix, exclude /usr/bin since it's not a real path.
43590    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43592      # a path prefixed by /cygdrive for fixpath to work.
43593      new_path="$CYGWIN_ROOT_PATH$input_path"
43594    fi
43595  fi
43596
43597  # remove trailing .exe if any
43598  new_path="${new_path/%.exe/}"
43599
43600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43601
43602  # First separate the path from the arguments. This will split at the first
43603  # space.
43604  complete="$OBJDUMP"
43605  path="${complete%% *}"
43606  tmp="$complete EOL"
43607  arguments="${tmp#* }"
43608
43609  # Input might be given as Windows format, start by converting to
43610  # unix format.
43611  new_path="$path"
43612
43613  windows_path="$new_path"
43614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43615    unix_path=`$CYGPATH -u "$windows_path"`
43616    new_path="$unix_path"
43617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43619    new_path="$unix_path"
43620  fi
43621
43622
43623  # Now try to locate executable using which
43624  new_path=`$WHICH "$new_path" 2> /dev/null`
43625
43626  if test "x$new_path" = x; then
43627    # Oops. Which didn't find the executable.
43628    # The splitting of arguments from the executable at a space might have been incorrect,
43629    # since paths with space are more likely in Windows. Give it another try with the whole
43630    # argument.
43631    path="$complete"
43632    arguments="EOL"
43633    new_path="$path"
43634
43635  windows_path="$new_path"
43636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43637    unix_path=`$CYGPATH -u "$windows_path"`
43638    new_path="$unix_path"
43639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43641    new_path="$unix_path"
43642  fi
43643
43644
43645    new_path=`$WHICH "$new_path" 2> /dev/null`
43646    # bat and cmd files are not always considered executable in MSYS causing which
43647    # to not find them
43648    if test "x$new_path" = x \
43649        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43650        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43651      new_path="$path"
43652
43653  windows_path="$new_path"
43654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43655    unix_path=`$CYGPATH -u "$windows_path"`
43656    new_path="$unix_path"
43657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43659    new_path="$unix_path"
43660  fi
43661
43662    fi
43663
43664    if test "x$new_path" = x; then
43665      # It's still not found. Now this is an unrecoverable error.
43666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43667$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43668      has_space=`$ECHO "$complete" | $GREP " "`
43669      if test "x$has_space" != x; then
43670        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43671$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43672      fi
43673      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43674    fi
43675  fi
43676
43677  # Now new_path has a complete unix path to the binary
43678  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43679    # Keep paths in /bin as-is, but remove trailing .exe if any
43680    new_path="${new_path/%.exe/}"
43681    # Do not save /bin paths to all_fixpath_prefixes!
43682  else
43683    # Not in mixed or Windows style, start by that.
43684    new_path=`cmd //c echo $new_path`
43685
43686  input_path="$new_path"
43687  # Check if we need to convert this using DOS-style short mode. If the path
43688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43689  # take no chances and rewrite it.
43690  # Note: m4 eats our [], so we need to use [ and ] instead.
43691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43692  if test "x$has_forbidden_chars" != x; then
43693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43695  fi
43696
43697    # Output is in $new_path
43698
43699  windows_path="$new_path"
43700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43701    unix_path=`$CYGPATH -u "$windows_path"`
43702    new_path="$unix_path"
43703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43705    new_path="$unix_path"
43706  fi
43707
43708    # remove trailing .exe if any
43709    new_path="${new_path/%.exe/}"
43710
43711    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43712    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43713  fi
43714
43715    else
43716      # We're on a unix platform. Hooray! :)
43717      # First separate the path from the arguments. This will split at the first
43718      # space.
43719      complete="$OBJDUMP"
43720      path="${complete%% *}"
43721      tmp="$complete EOL"
43722      arguments="${tmp#* }"
43723
43724      # Cannot rely on the command "which" here since it doesn't always work.
43725      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43726      if test -z "$is_absolute_path"; then
43727        # Path to executable is not absolute. Find it.
43728        IFS_save="$IFS"
43729        IFS=:
43730        for p in $PATH; do
43731          if test -f "$p/$path" && test -x "$p/$path"; then
43732            new_path="$p/$path"
43733            break
43734          fi
43735        done
43736        IFS="$IFS_save"
43737      else
43738        # This is an absolute path, we can use it without further modifications.
43739        new_path="$path"
43740      fi
43741
43742      if test "x$new_path" = x; then
43743        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43744$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43745        has_space=`$ECHO "$complete" | $GREP " "`
43746        if test "x$has_space" != x; then
43747          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43748$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43749        fi
43750        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43751      fi
43752    fi
43753
43754    # Now join together the path and the arguments once again
43755    if test "x$arguments" != xEOL; then
43756      new_complete="$new_path ${arguments% *}"
43757    else
43758      new_complete="$new_path"
43759    fi
43760
43761    if test "x$complete" != "x$new_complete"; then
43762      OBJDUMP="$new_complete"
43763      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43764$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43765    fi
43766  fi
43767
43768  fi
43769
43770
43771  # Restore old path.
43772  PATH="$OLD_PATH"
43773
43774  # Restore the flags to the user specified values.
43775  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43776  CFLAGS="$ORG_CFLAGS"
43777  CXXFLAGS="$ORG_CXXFLAGS"
43778
43779
43780# Finally do some processing after the detection phase
43781
43782  if test "x$COMPILE_TYPE" = "xcross"; then
43783    # Now we need to find a C/C++ compiler that can build executables for the
43784    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43785    # used once. Also, we need to do this without adding a tools dir to the
43786    # path, otherwise we might pick up cross-compilers which don't use standard
43787    # naming.
43788
43789    OLDPATH="$PATH"
43790
43791
43792# Check whether --with-build-devkit was given.
43793if test "${with_build_devkit+set}" = set; then :
43794  withval=$with_build_devkit;
43795fi
43796
43797    if test "x$with_build_devkit" = "xyes"; then
43798      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43799    elif test -n "$with_build_devkit"; then
43800      if test ! -d "$with_build_devkit"; then
43801        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43802      else
43803
43804  # Only process if variable expands to non-empty
43805
43806  if test "x$with_build_devkit" != x; then
43807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43808
43809  # Input might be given as Windows format, start by converting to
43810  # unix format.
43811  path="$with_build_devkit"
43812  new_path=`$CYGPATH -u "$path"`
43813
43814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43817  # "foo.exe" is OK but "foo" is an error.
43818  #
43819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43820  # It is also a way to make sure we got the proper file name for the real test later on.
43821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43822  if test "x$test_shortpath" = x; then
43823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43824$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43825    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43826  fi
43827
43828  # Call helper function which possibly converts this using DOS-style short mode.
43829  # If so, the updated path is stored in $new_path.
43830
43831  input_path="$new_path"
43832  # Check if we need to convert this using DOS-style short mode. If the path
43833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43834  # take no chances and rewrite it.
43835  # Note: m4 eats our [], so we need to use [ and ] instead.
43836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43837  if test "x$has_forbidden_chars" != x; then
43838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43842      # Going to short mode and back again did indeed matter. Since short mode is
43843      # case insensitive, let's make it lowercase to improve readability.
43844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43845      # Now convert it back to Unix-style (cygpath)
43846      input_path=`$CYGPATH -u "$shortmode_path"`
43847      new_path="$input_path"
43848    fi
43849  fi
43850
43851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43852  if test "x$test_cygdrive_prefix" = x; then
43853    # As a simple fix, exclude /usr/bin since it's not a real path.
43854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43856      # a path prefixed by /cygdrive for fixpath to work.
43857      new_path="$CYGWIN_ROOT_PATH$input_path"
43858    fi
43859  fi
43860
43861
43862  if test "x$path" != "x$new_path"; then
43863    with_build_devkit="$new_path"
43864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43865$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43866  fi
43867
43868    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43869
43870  path="$with_build_devkit"
43871  has_colon=`$ECHO $path | $GREP ^.:`
43872  new_path="$path"
43873  if test "x$has_colon" = x; then
43874    # Not in mixed or Windows style, start by that.
43875    new_path=`cmd //c echo $path`
43876  fi
43877
43878
43879  input_path="$new_path"
43880  # Check if we need to convert this using DOS-style short mode. If the path
43881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43882  # take no chances and rewrite it.
43883  # Note: m4 eats our [], so we need to use [ and ] instead.
43884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43885  if test "x$has_forbidden_chars" != x; then
43886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43888  fi
43889
43890
43891  windows_path="$new_path"
43892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43893    unix_path=`$CYGPATH -u "$windows_path"`
43894    new_path="$unix_path"
43895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43897    new_path="$unix_path"
43898  fi
43899
43900  if test "x$path" != "x$new_path"; then
43901    with_build_devkit="$new_path"
43902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43903$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43904  fi
43905
43906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43908
43909    else
43910      # We're on a unix platform. Hooray! :)
43911      path="$with_build_devkit"
43912      has_space=`$ECHO "$path" | $GREP " "`
43913      if test "x$has_space" != x; then
43914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43915$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43916        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43917      fi
43918
43919      # Use eval to expand a potential ~
43920      eval path="$path"
43921      if test ! -f "$path" && test ! -d "$path"; then
43922        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43923      fi
43924
43925      if test -d "$path"; then
43926        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43927      else
43928        dir="`$DIRNAME "$path"`"
43929        base="`$BASENAME "$path"`"
43930        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43931      fi
43932    fi
43933  fi
43934
43935        BUILD_DEVKIT_ROOT="$with_build_devkit"
43936        # Check for a meta data info file in the root of the devkit
43937        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43938          # Process devkit.info so that existing devkit variables are not
43939          # modified by this
43940          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43941              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43942              -e "s/\$host/\$build/g" \
43943              $BUILD_DEVKIT_ROOT/devkit.info \
43944              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43945          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43946          # This potentially sets the following:
43947          # A descriptive name of the devkit
43948
43949  if test "x$BUILD_DEVKIT_NAME" = x; then
43950    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43951  fi
43952
43953          # Corresponds to --with-extra-path
43954
43955  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43956    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43957  fi
43958
43959          # Corresponds to --with-toolchain-path
43960
43961  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43962    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43963  fi
43964
43965          # Corresponds to --with-sysroot
43966
43967  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43968    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43969  fi
43970
43971          # Skip the Window specific parts
43972        fi
43973
43974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43975$as_echo_n "checking for build platform devkit... " >&6; }
43976        if test "x$BUILD_DEVKIT_NAME" != x; then
43977          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43978$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43979        else
43980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43981$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43982        fi
43983
43984        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43985
43986  if test "x$BUILD_SYSROOT" != "x"; then
43987    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43988      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43989        # Solaris Studio does not have a concept of sysroot. Instead we must
43990        # make sure the default include and lib dirs are appended to each
43991        # compile and link command line. Must also add -I-xbuiltin to enable
43992        # inlining of system functions and intrinsics.
43993        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43994        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43995            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43996            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43997      fi
43998    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43999      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44000      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44001    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44002      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44003      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44004    fi
44005    # Propagate the sysroot args to hotspot
44006    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44007    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44008    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44009    # The global CFLAGS and LDFLAGS variables need these for configure to function
44010    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44011    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44012    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44013    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44014  fi
44015
44016  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44017    # We also need -iframework<path>/System/Library/Frameworks
44018    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44019    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44020    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44021    # set this here so it doesn't have to be peppered throughout the forest
44022    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44023    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44024  fi
44025
44026
44027
44028
44029
44030         # Fallback default of just /bin if DEVKIT_PATH is not defined
44031        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44032          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44033        fi
44034        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44035      fi
44036    fi
44037
44038    # FIXME: we should list the discovered compilers as an exclude pattern!
44039    # If we do that, we can do this detection before POST_DETECTION, and still
44040    # find the build compilers in the tools dir, if needed.
44041
44042
44043
44044  # Publish this variable in the help.
44045
44046
44047  if [ -z "${BUILD_CC+x}" ]; then
44048    # The variable is not set by user, try to locate tool using the code snippet
44049    for ac_prog in cl cc gcc
44050do
44051  # Extract the first word of "$ac_prog", so it can be a program name with args.
44052set dummy $ac_prog; ac_word=$2
44053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44054$as_echo_n "checking for $ac_word... " >&6; }
44055if ${ac_cv_path_BUILD_CC+:} false; then :
44056  $as_echo_n "(cached) " >&6
44057else
44058  case $BUILD_CC in
44059  [\\/]* | ?:[\\/]*)
44060  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44061  ;;
44062  *)
44063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44064for as_dir in $PATH
44065do
44066  IFS=$as_save_IFS
44067  test -z "$as_dir" && as_dir=.
44068    for ac_exec_ext in '' $ac_executable_extensions; do
44069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44070    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44072    break 2
44073  fi
44074done
44075  done
44076IFS=$as_save_IFS
44077
44078  ;;
44079esac
44080fi
44081BUILD_CC=$ac_cv_path_BUILD_CC
44082if test -n "$BUILD_CC"; then
44083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44084$as_echo "$BUILD_CC" >&6; }
44085else
44086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44087$as_echo "no" >&6; }
44088fi
44089
44090
44091  test -n "$BUILD_CC" && break
44092done
44093
44094  else
44095    # The variable is set, but is it from the command line or the environment?
44096
44097    # Try to remove the string !BUILD_CC! from our list.
44098    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44099    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44100      # If it failed, the variable was not from the command line. Ignore it,
44101      # but warn the user (except for BASH, which is always set by the calling BASH).
44102      if test "xBUILD_CC" != xBASH; then
44103        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44104$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44105      fi
44106      # Try to locate tool using the code snippet
44107      for ac_prog in cl cc gcc
44108do
44109  # Extract the first word of "$ac_prog", so it can be a program name with args.
44110set dummy $ac_prog; ac_word=$2
44111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44112$as_echo_n "checking for $ac_word... " >&6; }
44113if ${ac_cv_path_BUILD_CC+:} false; then :
44114  $as_echo_n "(cached) " >&6
44115else
44116  case $BUILD_CC in
44117  [\\/]* | ?:[\\/]*)
44118  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44119  ;;
44120  *)
44121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44122for as_dir in $PATH
44123do
44124  IFS=$as_save_IFS
44125  test -z "$as_dir" && as_dir=.
44126    for ac_exec_ext in '' $ac_executable_extensions; do
44127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44128    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44130    break 2
44131  fi
44132done
44133  done
44134IFS=$as_save_IFS
44135
44136  ;;
44137esac
44138fi
44139BUILD_CC=$ac_cv_path_BUILD_CC
44140if test -n "$BUILD_CC"; then
44141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44142$as_echo "$BUILD_CC" >&6; }
44143else
44144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44145$as_echo "no" >&6; }
44146fi
44147
44148
44149  test -n "$BUILD_CC" && break
44150done
44151
44152    else
44153      # If it succeeded, then it was overridden by the user. We will use it
44154      # for the tool.
44155
44156      # First remove it from the list of overridden variables, so we can test
44157      # for unknown variables in the end.
44158      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44159
44160      # Check if we try to supply an empty value
44161      if test "x$BUILD_CC" = x; then
44162        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44163$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44164        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44165$as_echo_n "checking for BUILD_CC... " >&6; }
44166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44167$as_echo "disabled" >&6; }
44168      else
44169        # Check if the provided tool contains a complete path.
44170        tool_specified="$BUILD_CC"
44171        tool_basename="${tool_specified##*/}"
44172        if test "x$tool_basename" = "x$tool_specified"; then
44173          # A command without a complete path is provided, search $PATH.
44174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44175$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44176          # Extract the first word of "$tool_basename", so it can be a program name with args.
44177set dummy $tool_basename; ac_word=$2
44178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44179$as_echo_n "checking for $ac_word... " >&6; }
44180if ${ac_cv_path_BUILD_CC+:} false; then :
44181  $as_echo_n "(cached) " >&6
44182else
44183  case $BUILD_CC in
44184  [\\/]* | ?:[\\/]*)
44185  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44186  ;;
44187  *)
44188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44189for as_dir in $PATH
44190do
44191  IFS=$as_save_IFS
44192  test -z "$as_dir" && as_dir=.
44193    for ac_exec_ext in '' $ac_executable_extensions; do
44194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44195    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44197    break 2
44198  fi
44199done
44200  done
44201IFS=$as_save_IFS
44202
44203  ;;
44204esac
44205fi
44206BUILD_CC=$ac_cv_path_BUILD_CC
44207if test -n "$BUILD_CC"; then
44208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44209$as_echo "$BUILD_CC" >&6; }
44210else
44211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44212$as_echo "no" >&6; }
44213fi
44214
44215
44216          if test "x$BUILD_CC" = x; then
44217            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44218          fi
44219        else
44220          # Otherwise we believe it is a complete path. Use it as it is.
44221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44222$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44223          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44224$as_echo_n "checking for BUILD_CC... " >&6; }
44225          if test ! -x "$tool_specified"; then
44226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44227$as_echo "not found" >&6; }
44228            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44229          fi
44230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44231$as_echo "$tool_specified" >&6; }
44232        fi
44233      fi
44234    fi
44235
44236  fi
44237
44238
44239
44240  if test "x$BUILD_CC" = x; then
44241    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44242  fi
44243
44244
44245
44246  # Only process if variable expands to non-empty
44247
44248  if test "x$BUILD_CC" != x; then
44249    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44250
44251  # First separate the path from the arguments. This will split at the first
44252  # space.
44253  complete="$BUILD_CC"
44254  path="${complete%% *}"
44255  tmp="$complete EOL"
44256  arguments="${tmp#* }"
44257
44258  # Input might be given as Windows format, start by converting to
44259  # unix format.
44260  new_path=`$CYGPATH -u "$path"`
44261
44262  # Now try to locate executable using which
44263  new_path=`$WHICH "$new_path" 2> /dev/null`
44264  # bat and cmd files are not always considered executable in cygwin causing which
44265  # to not find them
44266  if test "x$new_path" = x \
44267      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44268      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44269    new_path=`$CYGPATH -u "$path"`
44270  fi
44271  if test "x$new_path" = x; then
44272    # Oops. Which didn't find the executable.
44273    # The splitting of arguments from the executable at a space might have been incorrect,
44274    # since paths with space are more likely in Windows. Give it another try with the whole
44275    # argument.
44276    path="$complete"
44277    arguments="EOL"
44278    new_path=`$CYGPATH -u "$path"`
44279    new_path=`$WHICH "$new_path" 2> /dev/null`
44280    # bat and cmd files are not always considered executable in cygwin causing which
44281    # to not find them
44282    if test "x$new_path" = x \
44283        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44284        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44285      new_path=`$CYGPATH -u "$path"`
44286    fi
44287    if test "x$new_path" = x; then
44288      # It's still not found. Now this is an unrecoverable error.
44289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44290$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44291      has_space=`$ECHO "$complete" | $GREP " "`
44292      if test "x$has_space" != x; then
44293        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44294$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44295      fi
44296      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44297    fi
44298  fi
44299
44300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44303  # "foo.exe" is OK but "foo" is an error.
44304  #
44305  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44306  # It is also a way to make sure we got the proper file name for the real test later on.
44307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44308  if test "x$test_shortpath" = x; then
44309    # Short path failed, file does not exist as specified.
44310    # Try adding .exe or .cmd
44311    if test -f "${new_path}.exe"; then
44312      input_to_shortpath="${new_path}.exe"
44313    elif test -f "${new_path}.cmd"; then
44314      input_to_shortpath="${new_path}.cmd"
44315    else
44316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44317$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44318      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44319$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44320      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44321    fi
44322  else
44323    input_to_shortpath="$new_path"
44324  fi
44325
44326  # Call helper function which possibly converts this using DOS-style short mode.
44327  # If so, the updated path is stored in $new_path.
44328  new_path="$input_to_shortpath"
44329
44330  input_path="$input_to_shortpath"
44331  # Check if we need to convert this using DOS-style short mode. If the path
44332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44333  # take no chances and rewrite it.
44334  # Note: m4 eats our [], so we need to use [ and ] instead.
44335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44336  if test "x$has_forbidden_chars" != x; then
44337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44341      # Going to short mode and back again did indeed matter. Since short mode is
44342      # case insensitive, let's make it lowercase to improve readability.
44343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44344      # Now convert it back to Unix-style (cygpath)
44345      input_path=`$CYGPATH -u "$shortmode_path"`
44346      new_path="$input_path"
44347    fi
44348  fi
44349
44350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44351  if test "x$test_cygdrive_prefix" = x; then
44352    # As a simple fix, exclude /usr/bin since it's not a real path.
44353    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44355      # a path prefixed by /cygdrive for fixpath to work.
44356      new_path="$CYGWIN_ROOT_PATH$input_path"
44357    fi
44358  fi
44359
44360  # remove trailing .exe if any
44361  new_path="${new_path/%.exe/}"
44362
44363    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44364
44365  # First separate the path from the arguments. This will split at the first
44366  # space.
44367  complete="$BUILD_CC"
44368  path="${complete%% *}"
44369  tmp="$complete EOL"
44370  arguments="${tmp#* }"
44371
44372  # Input might be given as Windows format, start by converting to
44373  # unix format.
44374  new_path="$path"
44375
44376  windows_path="$new_path"
44377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44378    unix_path=`$CYGPATH -u "$windows_path"`
44379    new_path="$unix_path"
44380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44382    new_path="$unix_path"
44383  fi
44384
44385
44386  # Now try to locate executable using which
44387  new_path=`$WHICH "$new_path" 2> /dev/null`
44388
44389  if test "x$new_path" = x; then
44390    # Oops. Which didn't find the executable.
44391    # The splitting of arguments from the executable at a space might have been incorrect,
44392    # since paths with space are more likely in Windows. Give it another try with the whole
44393    # argument.
44394    path="$complete"
44395    arguments="EOL"
44396    new_path="$path"
44397
44398  windows_path="$new_path"
44399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44400    unix_path=`$CYGPATH -u "$windows_path"`
44401    new_path="$unix_path"
44402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44404    new_path="$unix_path"
44405  fi
44406
44407
44408    new_path=`$WHICH "$new_path" 2> /dev/null`
44409    # bat and cmd files are not always considered executable in MSYS causing which
44410    # to not find them
44411    if test "x$new_path" = x \
44412        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44413        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44414      new_path="$path"
44415
44416  windows_path="$new_path"
44417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44418    unix_path=`$CYGPATH -u "$windows_path"`
44419    new_path="$unix_path"
44420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44422    new_path="$unix_path"
44423  fi
44424
44425    fi
44426
44427    if test "x$new_path" = x; then
44428      # It's still not found. Now this is an unrecoverable error.
44429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44430$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44431      has_space=`$ECHO "$complete" | $GREP " "`
44432      if test "x$has_space" != x; then
44433        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44435      fi
44436      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44437    fi
44438  fi
44439
44440  # Now new_path has a complete unix path to the binary
44441  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44442    # Keep paths in /bin as-is, but remove trailing .exe if any
44443    new_path="${new_path/%.exe/}"
44444    # Do not save /bin paths to all_fixpath_prefixes!
44445  else
44446    # Not in mixed or Windows style, start by that.
44447    new_path=`cmd //c echo $new_path`
44448
44449  input_path="$new_path"
44450  # Check if we need to convert this using DOS-style short mode. If the path
44451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44452  # take no chances and rewrite it.
44453  # Note: m4 eats our [], so we need to use [ and ] instead.
44454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44455  if test "x$has_forbidden_chars" != x; then
44456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44458  fi
44459
44460    # Output is in $new_path
44461
44462  windows_path="$new_path"
44463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44464    unix_path=`$CYGPATH -u "$windows_path"`
44465    new_path="$unix_path"
44466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44468    new_path="$unix_path"
44469  fi
44470
44471    # remove trailing .exe if any
44472    new_path="${new_path/%.exe/}"
44473
44474    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44475    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44476  fi
44477
44478    else
44479      # We're on a unix platform. Hooray! :)
44480      # First separate the path from the arguments. This will split at the first
44481      # space.
44482      complete="$BUILD_CC"
44483      path="${complete%% *}"
44484      tmp="$complete EOL"
44485      arguments="${tmp#* }"
44486
44487      # Cannot rely on the command "which" here since it doesn't always work.
44488      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44489      if test -z "$is_absolute_path"; then
44490        # Path to executable is not absolute. Find it.
44491        IFS_save="$IFS"
44492        IFS=:
44493        for p in $PATH; do
44494          if test -f "$p/$path" && test -x "$p/$path"; then
44495            new_path="$p/$path"
44496            break
44497          fi
44498        done
44499        IFS="$IFS_save"
44500      else
44501        # This is an absolute path, we can use it without further modifications.
44502        new_path="$path"
44503      fi
44504
44505      if test "x$new_path" = x; then
44506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44507$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44508        has_space=`$ECHO "$complete" | $GREP " "`
44509        if test "x$has_space" != x; then
44510          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44511$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44512        fi
44513        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44514      fi
44515    fi
44516
44517    # Now join together the path and the arguments once again
44518    if test "x$arguments" != xEOL; then
44519      new_complete="$new_path ${arguments% *}"
44520    else
44521      new_complete="$new_path"
44522    fi
44523
44524    if test "x$complete" != "x$new_complete"; then
44525      BUILD_CC="$new_complete"
44526      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44527$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44528    fi
44529  fi
44530
44531
44532
44533
44534  # Publish this variable in the help.
44535
44536
44537  if [ -z "${BUILD_CXX+x}" ]; then
44538    # The variable is not set by user, try to locate tool using the code snippet
44539    for ac_prog in cl CC g++
44540do
44541  # Extract the first word of "$ac_prog", so it can be a program name with args.
44542set dummy $ac_prog; ac_word=$2
44543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44544$as_echo_n "checking for $ac_word... " >&6; }
44545if ${ac_cv_path_BUILD_CXX+:} false; then :
44546  $as_echo_n "(cached) " >&6
44547else
44548  case $BUILD_CXX in
44549  [\\/]* | ?:[\\/]*)
44550  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44551  ;;
44552  *)
44553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44554for as_dir in $PATH
44555do
44556  IFS=$as_save_IFS
44557  test -z "$as_dir" && as_dir=.
44558    for ac_exec_ext in '' $ac_executable_extensions; do
44559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44560    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44562    break 2
44563  fi
44564done
44565  done
44566IFS=$as_save_IFS
44567
44568  ;;
44569esac
44570fi
44571BUILD_CXX=$ac_cv_path_BUILD_CXX
44572if test -n "$BUILD_CXX"; then
44573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44574$as_echo "$BUILD_CXX" >&6; }
44575else
44576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44577$as_echo "no" >&6; }
44578fi
44579
44580
44581  test -n "$BUILD_CXX" && break
44582done
44583
44584  else
44585    # The variable is set, but is it from the command line or the environment?
44586
44587    # Try to remove the string !BUILD_CXX! from our list.
44588    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44589    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44590      # If it failed, the variable was not from the command line. Ignore it,
44591      # but warn the user (except for BASH, which is always set by the calling BASH).
44592      if test "xBUILD_CXX" != xBASH; then
44593        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44594$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44595      fi
44596      # Try to locate tool using the code snippet
44597      for ac_prog in cl CC g++
44598do
44599  # Extract the first word of "$ac_prog", so it can be a program name with args.
44600set dummy $ac_prog; ac_word=$2
44601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44602$as_echo_n "checking for $ac_word... " >&6; }
44603if ${ac_cv_path_BUILD_CXX+:} false; then :
44604  $as_echo_n "(cached) " >&6
44605else
44606  case $BUILD_CXX in
44607  [\\/]* | ?:[\\/]*)
44608  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44609  ;;
44610  *)
44611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44612for as_dir in $PATH
44613do
44614  IFS=$as_save_IFS
44615  test -z "$as_dir" && as_dir=.
44616    for ac_exec_ext in '' $ac_executable_extensions; do
44617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44618    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44620    break 2
44621  fi
44622done
44623  done
44624IFS=$as_save_IFS
44625
44626  ;;
44627esac
44628fi
44629BUILD_CXX=$ac_cv_path_BUILD_CXX
44630if test -n "$BUILD_CXX"; then
44631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44632$as_echo "$BUILD_CXX" >&6; }
44633else
44634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44635$as_echo "no" >&6; }
44636fi
44637
44638
44639  test -n "$BUILD_CXX" && break
44640done
44641
44642    else
44643      # If it succeeded, then it was overridden by the user. We will use it
44644      # for the tool.
44645
44646      # First remove it from the list of overridden variables, so we can test
44647      # for unknown variables in the end.
44648      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44649
44650      # Check if we try to supply an empty value
44651      if test "x$BUILD_CXX" = x; then
44652        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44653$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44654        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44655$as_echo_n "checking for BUILD_CXX... " >&6; }
44656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44657$as_echo "disabled" >&6; }
44658      else
44659        # Check if the provided tool contains a complete path.
44660        tool_specified="$BUILD_CXX"
44661        tool_basename="${tool_specified##*/}"
44662        if test "x$tool_basename" = "x$tool_specified"; then
44663          # A command without a complete path is provided, search $PATH.
44664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44665$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44666          # Extract the first word of "$tool_basename", so it can be a program name with args.
44667set dummy $tool_basename; ac_word=$2
44668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44669$as_echo_n "checking for $ac_word... " >&6; }
44670if ${ac_cv_path_BUILD_CXX+:} false; then :
44671  $as_echo_n "(cached) " >&6
44672else
44673  case $BUILD_CXX in
44674  [\\/]* | ?:[\\/]*)
44675  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44676  ;;
44677  *)
44678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44679for as_dir in $PATH
44680do
44681  IFS=$as_save_IFS
44682  test -z "$as_dir" && as_dir=.
44683    for ac_exec_ext in '' $ac_executable_extensions; do
44684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44685    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44687    break 2
44688  fi
44689done
44690  done
44691IFS=$as_save_IFS
44692
44693  ;;
44694esac
44695fi
44696BUILD_CXX=$ac_cv_path_BUILD_CXX
44697if test -n "$BUILD_CXX"; then
44698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44699$as_echo "$BUILD_CXX" >&6; }
44700else
44701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44702$as_echo "no" >&6; }
44703fi
44704
44705
44706          if test "x$BUILD_CXX" = x; then
44707            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44708          fi
44709        else
44710          # Otherwise we believe it is a complete path. Use it as it is.
44711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44712$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44713          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44714$as_echo_n "checking for BUILD_CXX... " >&6; }
44715          if test ! -x "$tool_specified"; then
44716            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44717$as_echo "not found" >&6; }
44718            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44719          fi
44720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44721$as_echo "$tool_specified" >&6; }
44722        fi
44723      fi
44724    fi
44725
44726  fi
44727
44728
44729
44730  if test "x$BUILD_CXX" = x; then
44731    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44732  fi
44733
44734
44735
44736  # Only process if variable expands to non-empty
44737
44738  if test "x$BUILD_CXX" != x; then
44739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44740
44741  # First separate the path from the arguments. This will split at the first
44742  # space.
44743  complete="$BUILD_CXX"
44744  path="${complete%% *}"
44745  tmp="$complete EOL"
44746  arguments="${tmp#* }"
44747
44748  # Input might be given as Windows format, start by converting to
44749  # unix format.
44750  new_path=`$CYGPATH -u "$path"`
44751
44752  # Now try to locate executable using which
44753  new_path=`$WHICH "$new_path" 2> /dev/null`
44754  # bat and cmd files are not always considered executable in cygwin causing which
44755  # to not find them
44756  if test "x$new_path" = x \
44757      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44758      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44759    new_path=`$CYGPATH -u "$path"`
44760  fi
44761  if test "x$new_path" = x; then
44762    # Oops. Which didn't find the executable.
44763    # The splitting of arguments from the executable at a space might have been incorrect,
44764    # since paths with space are more likely in Windows. Give it another try with the whole
44765    # argument.
44766    path="$complete"
44767    arguments="EOL"
44768    new_path=`$CYGPATH -u "$path"`
44769    new_path=`$WHICH "$new_path" 2> /dev/null`
44770    # bat and cmd files are not always considered executable in cygwin causing which
44771    # to not find them
44772    if test "x$new_path" = x \
44773        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44774        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44775      new_path=`$CYGPATH -u "$path"`
44776    fi
44777    if test "x$new_path" = x; then
44778      # It's still not found. Now this is an unrecoverable error.
44779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44780$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44781      has_space=`$ECHO "$complete" | $GREP " "`
44782      if test "x$has_space" != x; then
44783        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44784$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44785      fi
44786      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44787    fi
44788  fi
44789
44790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44793  # "foo.exe" is OK but "foo" is an error.
44794  #
44795  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44796  # It is also a way to make sure we got the proper file name for the real test later on.
44797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44798  if test "x$test_shortpath" = x; then
44799    # Short path failed, file does not exist as specified.
44800    # Try adding .exe or .cmd
44801    if test -f "${new_path}.exe"; then
44802      input_to_shortpath="${new_path}.exe"
44803    elif test -f "${new_path}.cmd"; then
44804      input_to_shortpath="${new_path}.cmd"
44805    else
44806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44807$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44808      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44809$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44810      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44811    fi
44812  else
44813    input_to_shortpath="$new_path"
44814  fi
44815
44816  # Call helper function which possibly converts this using DOS-style short mode.
44817  # If so, the updated path is stored in $new_path.
44818  new_path="$input_to_shortpath"
44819
44820  input_path="$input_to_shortpath"
44821  # Check if we need to convert this using DOS-style short mode. If the path
44822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44823  # take no chances and rewrite it.
44824  # Note: m4 eats our [], so we need to use [ and ] instead.
44825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44826  if test "x$has_forbidden_chars" != x; then
44827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44831      # Going to short mode and back again did indeed matter. Since short mode is
44832      # case insensitive, let's make it lowercase to improve readability.
44833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44834      # Now convert it back to Unix-style (cygpath)
44835      input_path=`$CYGPATH -u "$shortmode_path"`
44836      new_path="$input_path"
44837    fi
44838  fi
44839
44840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44841  if test "x$test_cygdrive_prefix" = x; then
44842    # As a simple fix, exclude /usr/bin since it's not a real path.
44843    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44845      # a path prefixed by /cygdrive for fixpath to work.
44846      new_path="$CYGWIN_ROOT_PATH$input_path"
44847    fi
44848  fi
44849
44850  # remove trailing .exe if any
44851  new_path="${new_path/%.exe/}"
44852
44853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44854
44855  # First separate the path from the arguments. This will split at the first
44856  # space.
44857  complete="$BUILD_CXX"
44858  path="${complete%% *}"
44859  tmp="$complete EOL"
44860  arguments="${tmp#* }"
44861
44862  # Input might be given as Windows format, start by converting to
44863  # unix format.
44864  new_path="$path"
44865
44866  windows_path="$new_path"
44867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44868    unix_path=`$CYGPATH -u "$windows_path"`
44869    new_path="$unix_path"
44870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44872    new_path="$unix_path"
44873  fi
44874
44875
44876  # Now try to locate executable using which
44877  new_path=`$WHICH "$new_path" 2> /dev/null`
44878
44879  if test "x$new_path" = x; then
44880    # Oops. Which didn't find the executable.
44881    # The splitting of arguments from the executable at a space might have been incorrect,
44882    # since paths with space are more likely in Windows. Give it another try with the whole
44883    # argument.
44884    path="$complete"
44885    arguments="EOL"
44886    new_path="$path"
44887
44888  windows_path="$new_path"
44889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44890    unix_path=`$CYGPATH -u "$windows_path"`
44891    new_path="$unix_path"
44892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44894    new_path="$unix_path"
44895  fi
44896
44897
44898    new_path=`$WHICH "$new_path" 2> /dev/null`
44899    # bat and cmd files are not always considered executable in MSYS causing which
44900    # to not find them
44901    if test "x$new_path" = x \
44902        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44903        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44904      new_path="$path"
44905
44906  windows_path="$new_path"
44907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44908    unix_path=`$CYGPATH -u "$windows_path"`
44909    new_path="$unix_path"
44910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44912    new_path="$unix_path"
44913  fi
44914
44915    fi
44916
44917    if test "x$new_path" = x; then
44918      # It's still not found. Now this is an unrecoverable error.
44919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44920$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44921      has_space=`$ECHO "$complete" | $GREP " "`
44922      if test "x$has_space" != x; then
44923        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44924$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44925      fi
44926      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44927    fi
44928  fi
44929
44930  # Now new_path has a complete unix path to the binary
44931  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44932    # Keep paths in /bin as-is, but remove trailing .exe if any
44933    new_path="${new_path/%.exe/}"
44934    # Do not save /bin paths to all_fixpath_prefixes!
44935  else
44936    # Not in mixed or Windows style, start by that.
44937    new_path=`cmd //c echo $new_path`
44938
44939  input_path="$new_path"
44940  # Check if we need to convert this using DOS-style short mode. If the path
44941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44942  # take no chances and rewrite it.
44943  # Note: m4 eats our [], so we need to use [ and ] instead.
44944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44945  if test "x$has_forbidden_chars" != x; then
44946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44948  fi
44949
44950    # Output is in $new_path
44951
44952  windows_path="$new_path"
44953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44954    unix_path=`$CYGPATH -u "$windows_path"`
44955    new_path="$unix_path"
44956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44958    new_path="$unix_path"
44959  fi
44960
44961    # remove trailing .exe if any
44962    new_path="${new_path/%.exe/}"
44963
44964    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44965    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44966  fi
44967
44968    else
44969      # We're on a unix platform. Hooray! :)
44970      # First separate the path from the arguments. This will split at the first
44971      # space.
44972      complete="$BUILD_CXX"
44973      path="${complete%% *}"
44974      tmp="$complete EOL"
44975      arguments="${tmp#* }"
44976
44977      # Cannot rely on the command "which" here since it doesn't always work.
44978      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44979      if test -z "$is_absolute_path"; then
44980        # Path to executable is not absolute. Find it.
44981        IFS_save="$IFS"
44982        IFS=:
44983        for p in $PATH; do
44984          if test -f "$p/$path" && test -x "$p/$path"; then
44985            new_path="$p/$path"
44986            break
44987          fi
44988        done
44989        IFS="$IFS_save"
44990      else
44991        # This is an absolute path, we can use it without further modifications.
44992        new_path="$path"
44993      fi
44994
44995      if test "x$new_path" = x; then
44996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44997$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44998        has_space=`$ECHO "$complete" | $GREP " "`
44999        if test "x$has_space" != x; then
45000          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45001$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45002        fi
45003        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45004      fi
45005    fi
45006
45007    # Now join together the path and the arguments once again
45008    if test "x$arguments" != xEOL; then
45009      new_complete="$new_path ${arguments% *}"
45010    else
45011      new_complete="$new_path"
45012    fi
45013
45014    if test "x$complete" != "x$new_complete"; then
45015      BUILD_CXX="$new_complete"
45016      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45017$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45018    fi
45019  fi
45020
45021
45022
45023  # Publish this variable in the help.
45024
45025
45026  if [ -z "${BUILD_NM+x}" ]; then
45027    # The variable is not set by user, try to locate tool using the code snippet
45028    for ac_prog in nm gcc-nm
45029do
45030  # Extract the first word of "$ac_prog", so it can be a program name with args.
45031set dummy $ac_prog; ac_word=$2
45032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45033$as_echo_n "checking for $ac_word... " >&6; }
45034if ${ac_cv_path_BUILD_NM+:} false; then :
45035  $as_echo_n "(cached) " >&6
45036else
45037  case $BUILD_NM in
45038  [\\/]* | ?:[\\/]*)
45039  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45040  ;;
45041  *)
45042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45043for as_dir in $PATH
45044do
45045  IFS=$as_save_IFS
45046  test -z "$as_dir" && as_dir=.
45047    for ac_exec_ext in '' $ac_executable_extensions; do
45048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45049    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45051    break 2
45052  fi
45053done
45054  done
45055IFS=$as_save_IFS
45056
45057  ;;
45058esac
45059fi
45060BUILD_NM=$ac_cv_path_BUILD_NM
45061if test -n "$BUILD_NM"; then
45062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45063$as_echo "$BUILD_NM" >&6; }
45064else
45065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45066$as_echo "no" >&6; }
45067fi
45068
45069
45070  test -n "$BUILD_NM" && break
45071done
45072
45073  else
45074    # The variable is set, but is it from the command line or the environment?
45075
45076    # Try to remove the string !BUILD_NM! from our list.
45077    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45078    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45079      # If it failed, the variable was not from the command line. Ignore it,
45080      # but warn the user (except for BASH, which is always set by the calling BASH).
45081      if test "xBUILD_NM" != xBASH; then
45082        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45083$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45084      fi
45085      # Try to locate tool using the code snippet
45086      for ac_prog in nm gcc-nm
45087do
45088  # Extract the first word of "$ac_prog", so it can be a program name with args.
45089set dummy $ac_prog; ac_word=$2
45090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45091$as_echo_n "checking for $ac_word... " >&6; }
45092if ${ac_cv_path_BUILD_NM+:} false; then :
45093  $as_echo_n "(cached) " >&6
45094else
45095  case $BUILD_NM in
45096  [\\/]* | ?:[\\/]*)
45097  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45098  ;;
45099  *)
45100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45101for as_dir in $PATH
45102do
45103  IFS=$as_save_IFS
45104  test -z "$as_dir" && as_dir=.
45105    for ac_exec_ext in '' $ac_executable_extensions; do
45106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45107    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45109    break 2
45110  fi
45111done
45112  done
45113IFS=$as_save_IFS
45114
45115  ;;
45116esac
45117fi
45118BUILD_NM=$ac_cv_path_BUILD_NM
45119if test -n "$BUILD_NM"; then
45120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45121$as_echo "$BUILD_NM" >&6; }
45122else
45123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45124$as_echo "no" >&6; }
45125fi
45126
45127
45128  test -n "$BUILD_NM" && break
45129done
45130
45131    else
45132      # If it succeeded, then it was overridden by the user. We will use it
45133      # for the tool.
45134
45135      # First remove it from the list of overridden variables, so we can test
45136      # for unknown variables in the end.
45137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45138
45139      # Check if we try to supply an empty value
45140      if test "x$BUILD_NM" = x; then
45141        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45142$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45143        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45144$as_echo_n "checking for BUILD_NM... " >&6; }
45145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45146$as_echo "disabled" >&6; }
45147      else
45148        # Check if the provided tool contains a complete path.
45149        tool_specified="$BUILD_NM"
45150        tool_basename="${tool_specified##*/}"
45151        if test "x$tool_basename" = "x$tool_specified"; then
45152          # A command without a complete path is provided, search $PATH.
45153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45154$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45155          # Extract the first word of "$tool_basename", so it can be a program name with args.
45156set dummy $tool_basename; ac_word=$2
45157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45158$as_echo_n "checking for $ac_word... " >&6; }
45159if ${ac_cv_path_BUILD_NM+:} false; then :
45160  $as_echo_n "(cached) " >&6
45161else
45162  case $BUILD_NM in
45163  [\\/]* | ?:[\\/]*)
45164  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45165  ;;
45166  *)
45167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45168for as_dir in $PATH
45169do
45170  IFS=$as_save_IFS
45171  test -z "$as_dir" && as_dir=.
45172    for ac_exec_ext in '' $ac_executable_extensions; do
45173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45174    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45176    break 2
45177  fi
45178done
45179  done
45180IFS=$as_save_IFS
45181
45182  ;;
45183esac
45184fi
45185BUILD_NM=$ac_cv_path_BUILD_NM
45186if test -n "$BUILD_NM"; then
45187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45188$as_echo "$BUILD_NM" >&6; }
45189else
45190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45191$as_echo "no" >&6; }
45192fi
45193
45194
45195          if test "x$BUILD_NM" = x; then
45196            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45197          fi
45198        else
45199          # Otherwise we believe it is a complete path. Use it as it is.
45200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45201$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45202          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45203$as_echo_n "checking for BUILD_NM... " >&6; }
45204          if test ! -x "$tool_specified"; then
45205            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45206$as_echo "not found" >&6; }
45207            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45208          fi
45209          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45210$as_echo "$tool_specified" >&6; }
45211        fi
45212      fi
45213    fi
45214
45215  fi
45216
45217
45218
45219  # Only process if variable expands to non-empty
45220
45221  if test "x$BUILD_NM" != x; then
45222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45223
45224  # First separate the path from the arguments. This will split at the first
45225  # space.
45226  complete="$BUILD_NM"
45227  path="${complete%% *}"
45228  tmp="$complete EOL"
45229  arguments="${tmp#* }"
45230
45231  # Input might be given as Windows format, start by converting to
45232  # unix format.
45233  new_path=`$CYGPATH -u "$path"`
45234
45235  # Now try to locate executable using which
45236  new_path=`$WHICH "$new_path" 2> /dev/null`
45237  # bat and cmd files are not always considered executable in cygwin causing which
45238  # to not find them
45239  if test "x$new_path" = x \
45240      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45241      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45242    new_path=`$CYGPATH -u "$path"`
45243  fi
45244  if test "x$new_path" = x; then
45245    # Oops. Which didn't find the executable.
45246    # The splitting of arguments from the executable at a space might have been incorrect,
45247    # since paths with space are more likely in Windows. Give it another try with the whole
45248    # argument.
45249    path="$complete"
45250    arguments="EOL"
45251    new_path=`$CYGPATH -u "$path"`
45252    new_path=`$WHICH "$new_path" 2> /dev/null`
45253    # bat and cmd files are not always considered executable in cygwin causing which
45254    # to not find them
45255    if test "x$new_path" = x \
45256        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45257        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45258      new_path=`$CYGPATH -u "$path"`
45259    fi
45260    if test "x$new_path" = x; then
45261      # It's still not found. Now this is an unrecoverable error.
45262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45263$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45264      has_space=`$ECHO "$complete" | $GREP " "`
45265      if test "x$has_space" != x; then
45266        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45267$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45268      fi
45269      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45270    fi
45271  fi
45272
45273  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45274  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45275  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45276  # "foo.exe" is OK but "foo" is an error.
45277  #
45278  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45279  # It is also a way to make sure we got the proper file name for the real test later on.
45280  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45281  if test "x$test_shortpath" = x; then
45282    # Short path failed, file does not exist as specified.
45283    # Try adding .exe or .cmd
45284    if test -f "${new_path}.exe"; then
45285      input_to_shortpath="${new_path}.exe"
45286    elif test -f "${new_path}.cmd"; then
45287      input_to_shortpath="${new_path}.cmd"
45288    else
45289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45290$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45291      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45292$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45293      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45294    fi
45295  else
45296    input_to_shortpath="$new_path"
45297  fi
45298
45299  # Call helper function which possibly converts this using DOS-style short mode.
45300  # If so, the updated path is stored in $new_path.
45301  new_path="$input_to_shortpath"
45302
45303  input_path="$input_to_shortpath"
45304  # Check if we need to convert this using DOS-style short mode. If the path
45305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45306  # take no chances and rewrite it.
45307  # Note: m4 eats our [], so we need to use [ and ] instead.
45308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45309  if test "x$has_forbidden_chars" != x; then
45310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45314      # Going to short mode and back again did indeed matter. Since short mode is
45315      # case insensitive, let's make it lowercase to improve readability.
45316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45317      # Now convert it back to Unix-style (cygpath)
45318      input_path=`$CYGPATH -u "$shortmode_path"`
45319      new_path="$input_path"
45320    fi
45321  fi
45322
45323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45324  if test "x$test_cygdrive_prefix" = x; then
45325    # As a simple fix, exclude /usr/bin since it's not a real path.
45326    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45328      # a path prefixed by /cygdrive for fixpath to work.
45329      new_path="$CYGWIN_ROOT_PATH$input_path"
45330    fi
45331  fi
45332
45333  # remove trailing .exe if any
45334  new_path="${new_path/%.exe/}"
45335
45336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45337
45338  # First separate the path from the arguments. This will split at the first
45339  # space.
45340  complete="$BUILD_NM"
45341  path="${complete%% *}"
45342  tmp="$complete EOL"
45343  arguments="${tmp#* }"
45344
45345  # Input might be given as Windows format, start by converting to
45346  # unix format.
45347  new_path="$path"
45348
45349  windows_path="$new_path"
45350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45351    unix_path=`$CYGPATH -u "$windows_path"`
45352    new_path="$unix_path"
45353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45355    new_path="$unix_path"
45356  fi
45357
45358
45359  # Now try to locate executable using which
45360  new_path=`$WHICH "$new_path" 2> /dev/null`
45361
45362  if test "x$new_path" = x; then
45363    # Oops. Which didn't find the executable.
45364    # The splitting of arguments from the executable at a space might have been incorrect,
45365    # since paths with space are more likely in Windows. Give it another try with the whole
45366    # argument.
45367    path="$complete"
45368    arguments="EOL"
45369    new_path="$path"
45370
45371  windows_path="$new_path"
45372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45373    unix_path=`$CYGPATH -u "$windows_path"`
45374    new_path="$unix_path"
45375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45377    new_path="$unix_path"
45378  fi
45379
45380
45381    new_path=`$WHICH "$new_path" 2> /dev/null`
45382    # bat and cmd files are not always considered executable in MSYS causing which
45383    # to not find them
45384    if test "x$new_path" = x \
45385        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45386        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45387      new_path="$path"
45388
45389  windows_path="$new_path"
45390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45391    unix_path=`$CYGPATH -u "$windows_path"`
45392    new_path="$unix_path"
45393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45395    new_path="$unix_path"
45396  fi
45397
45398    fi
45399
45400    if test "x$new_path" = x; then
45401      # It's still not found. Now this is an unrecoverable error.
45402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45403$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45404      has_space=`$ECHO "$complete" | $GREP " "`
45405      if test "x$has_space" != x; then
45406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45408      fi
45409      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45410    fi
45411  fi
45412
45413  # Now new_path has a complete unix path to the binary
45414  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45415    # Keep paths in /bin as-is, but remove trailing .exe if any
45416    new_path="${new_path/%.exe/}"
45417    # Do not save /bin paths to all_fixpath_prefixes!
45418  else
45419    # Not in mixed or Windows style, start by that.
45420    new_path=`cmd //c echo $new_path`
45421
45422  input_path="$new_path"
45423  # Check if we need to convert this using DOS-style short mode. If the path
45424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45425  # take no chances and rewrite it.
45426  # Note: m4 eats our [], so we need to use [ and ] instead.
45427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45428  if test "x$has_forbidden_chars" != x; then
45429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45431  fi
45432
45433    # Output is in $new_path
45434
45435  windows_path="$new_path"
45436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45437    unix_path=`$CYGPATH -u "$windows_path"`
45438    new_path="$unix_path"
45439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45441    new_path="$unix_path"
45442  fi
45443
45444    # remove trailing .exe if any
45445    new_path="${new_path/%.exe/}"
45446
45447    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45448    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45449  fi
45450
45451    else
45452      # We're on a unix platform. Hooray! :)
45453      # First separate the path from the arguments. This will split at the first
45454      # space.
45455      complete="$BUILD_NM"
45456      path="${complete%% *}"
45457      tmp="$complete EOL"
45458      arguments="${tmp#* }"
45459
45460      # Cannot rely on the command "which" here since it doesn't always work.
45461      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45462      if test -z "$is_absolute_path"; then
45463        # Path to executable is not absolute. Find it.
45464        IFS_save="$IFS"
45465        IFS=:
45466        for p in $PATH; do
45467          if test -f "$p/$path" && test -x "$p/$path"; then
45468            new_path="$p/$path"
45469            break
45470          fi
45471        done
45472        IFS="$IFS_save"
45473      else
45474        # This is an absolute path, we can use it without further modifications.
45475        new_path="$path"
45476      fi
45477
45478      if test "x$new_path" = x; then
45479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45480$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45481        has_space=`$ECHO "$complete" | $GREP " "`
45482        if test "x$has_space" != x; then
45483          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45484$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45485        fi
45486        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45487      fi
45488    fi
45489
45490    # Now join together the path and the arguments once again
45491    if test "x$arguments" != xEOL; then
45492      new_complete="$new_path ${arguments% *}"
45493    else
45494      new_complete="$new_path"
45495    fi
45496
45497    if test "x$complete" != "x$new_complete"; then
45498      BUILD_NM="$new_complete"
45499      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45500$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45501    fi
45502  fi
45503
45504
45505
45506  # Publish this variable in the help.
45507
45508
45509  if [ -z "${BUILD_AR+x}" ]; then
45510    # The variable is not set by user, try to locate tool using the code snippet
45511    for ac_prog in ar gcc-ar
45512do
45513  # Extract the first word of "$ac_prog", so it can be a program name with args.
45514set dummy $ac_prog; ac_word=$2
45515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45516$as_echo_n "checking for $ac_word... " >&6; }
45517if ${ac_cv_path_BUILD_AR+:} false; then :
45518  $as_echo_n "(cached) " >&6
45519else
45520  case $BUILD_AR in
45521  [\\/]* | ?:[\\/]*)
45522  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45523  ;;
45524  *)
45525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45526for as_dir in $PATH
45527do
45528  IFS=$as_save_IFS
45529  test -z "$as_dir" && as_dir=.
45530    for ac_exec_ext in '' $ac_executable_extensions; do
45531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45532    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45534    break 2
45535  fi
45536done
45537  done
45538IFS=$as_save_IFS
45539
45540  ;;
45541esac
45542fi
45543BUILD_AR=$ac_cv_path_BUILD_AR
45544if test -n "$BUILD_AR"; then
45545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45546$as_echo "$BUILD_AR" >&6; }
45547else
45548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45549$as_echo "no" >&6; }
45550fi
45551
45552
45553  test -n "$BUILD_AR" && break
45554done
45555
45556  else
45557    # The variable is set, but is it from the command line or the environment?
45558
45559    # Try to remove the string !BUILD_AR! from our list.
45560    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45561    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45562      # If it failed, the variable was not from the command line. Ignore it,
45563      # but warn the user (except for BASH, which is always set by the calling BASH).
45564      if test "xBUILD_AR" != xBASH; then
45565        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45566$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45567      fi
45568      # Try to locate tool using the code snippet
45569      for ac_prog in ar gcc-ar
45570do
45571  # Extract the first word of "$ac_prog", so it can be a program name with args.
45572set dummy $ac_prog; ac_word=$2
45573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45574$as_echo_n "checking for $ac_word... " >&6; }
45575if ${ac_cv_path_BUILD_AR+:} false; then :
45576  $as_echo_n "(cached) " >&6
45577else
45578  case $BUILD_AR in
45579  [\\/]* | ?:[\\/]*)
45580  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45581  ;;
45582  *)
45583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45584for as_dir in $PATH
45585do
45586  IFS=$as_save_IFS
45587  test -z "$as_dir" && as_dir=.
45588    for ac_exec_ext in '' $ac_executable_extensions; do
45589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45590    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45592    break 2
45593  fi
45594done
45595  done
45596IFS=$as_save_IFS
45597
45598  ;;
45599esac
45600fi
45601BUILD_AR=$ac_cv_path_BUILD_AR
45602if test -n "$BUILD_AR"; then
45603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45604$as_echo "$BUILD_AR" >&6; }
45605else
45606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45607$as_echo "no" >&6; }
45608fi
45609
45610
45611  test -n "$BUILD_AR" && break
45612done
45613
45614    else
45615      # If it succeeded, then it was overridden by the user. We will use it
45616      # for the tool.
45617
45618      # First remove it from the list of overridden variables, so we can test
45619      # for unknown variables in the end.
45620      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45621
45622      # Check if we try to supply an empty value
45623      if test "x$BUILD_AR" = x; then
45624        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45625$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45626        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45627$as_echo_n "checking for BUILD_AR... " >&6; }
45628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45629$as_echo "disabled" >&6; }
45630      else
45631        # Check if the provided tool contains a complete path.
45632        tool_specified="$BUILD_AR"
45633        tool_basename="${tool_specified##*/}"
45634        if test "x$tool_basename" = "x$tool_specified"; then
45635          # A command without a complete path is provided, search $PATH.
45636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45637$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45638          # Extract the first word of "$tool_basename", so it can be a program name with args.
45639set dummy $tool_basename; ac_word=$2
45640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45641$as_echo_n "checking for $ac_word... " >&6; }
45642if ${ac_cv_path_BUILD_AR+:} false; then :
45643  $as_echo_n "(cached) " >&6
45644else
45645  case $BUILD_AR in
45646  [\\/]* | ?:[\\/]*)
45647  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45648  ;;
45649  *)
45650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45651for as_dir in $PATH
45652do
45653  IFS=$as_save_IFS
45654  test -z "$as_dir" && as_dir=.
45655    for ac_exec_ext in '' $ac_executable_extensions; do
45656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45657    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45659    break 2
45660  fi
45661done
45662  done
45663IFS=$as_save_IFS
45664
45665  ;;
45666esac
45667fi
45668BUILD_AR=$ac_cv_path_BUILD_AR
45669if test -n "$BUILD_AR"; then
45670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45671$as_echo "$BUILD_AR" >&6; }
45672else
45673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45674$as_echo "no" >&6; }
45675fi
45676
45677
45678          if test "x$BUILD_AR" = x; then
45679            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45680          fi
45681        else
45682          # Otherwise we believe it is a complete path. Use it as it is.
45683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45684$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45685          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45686$as_echo_n "checking for BUILD_AR... " >&6; }
45687          if test ! -x "$tool_specified"; then
45688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45689$as_echo "not found" >&6; }
45690            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45691          fi
45692          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45693$as_echo "$tool_specified" >&6; }
45694        fi
45695      fi
45696    fi
45697
45698  fi
45699
45700
45701
45702  # Only process if variable expands to non-empty
45703
45704  if test "x$BUILD_AR" != x; then
45705    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45706
45707  # First separate the path from the arguments. This will split at the first
45708  # space.
45709  complete="$BUILD_AR"
45710  path="${complete%% *}"
45711  tmp="$complete EOL"
45712  arguments="${tmp#* }"
45713
45714  # Input might be given as Windows format, start by converting to
45715  # unix format.
45716  new_path=`$CYGPATH -u "$path"`
45717
45718  # Now try to locate executable using which
45719  new_path=`$WHICH "$new_path" 2> /dev/null`
45720  # bat and cmd files are not always considered executable in cygwin causing which
45721  # to not find them
45722  if test "x$new_path" = x \
45723      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45724      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45725    new_path=`$CYGPATH -u "$path"`
45726  fi
45727  if test "x$new_path" = x; then
45728    # Oops. Which didn't find the executable.
45729    # The splitting of arguments from the executable at a space might have been incorrect,
45730    # since paths with space are more likely in Windows. Give it another try with the whole
45731    # argument.
45732    path="$complete"
45733    arguments="EOL"
45734    new_path=`$CYGPATH -u "$path"`
45735    new_path=`$WHICH "$new_path" 2> /dev/null`
45736    # bat and cmd files are not always considered executable in cygwin causing which
45737    # to not find them
45738    if test "x$new_path" = x \
45739        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45740        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45741      new_path=`$CYGPATH -u "$path"`
45742    fi
45743    if test "x$new_path" = x; then
45744      # It's still not found. Now this is an unrecoverable error.
45745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45746$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45747      has_space=`$ECHO "$complete" | $GREP " "`
45748      if test "x$has_space" != x; then
45749        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45750$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45751      fi
45752      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45753    fi
45754  fi
45755
45756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45759  # "foo.exe" is OK but "foo" is an error.
45760  #
45761  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45762  # It is also a way to make sure we got the proper file name for the real test later on.
45763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45764  if test "x$test_shortpath" = x; then
45765    # Short path failed, file does not exist as specified.
45766    # Try adding .exe or .cmd
45767    if test -f "${new_path}.exe"; then
45768      input_to_shortpath="${new_path}.exe"
45769    elif test -f "${new_path}.cmd"; then
45770      input_to_shortpath="${new_path}.cmd"
45771    else
45772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45773$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45774      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45775$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45776      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45777    fi
45778  else
45779    input_to_shortpath="$new_path"
45780  fi
45781
45782  # Call helper function which possibly converts this using DOS-style short mode.
45783  # If so, the updated path is stored in $new_path.
45784  new_path="$input_to_shortpath"
45785
45786  input_path="$input_to_shortpath"
45787  # Check if we need to convert this using DOS-style short mode. If the path
45788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45789  # take no chances and rewrite it.
45790  # Note: m4 eats our [], so we need to use [ and ] instead.
45791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45792  if test "x$has_forbidden_chars" != x; then
45793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45797      # Going to short mode and back again did indeed matter. Since short mode is
45798      # case insensitive, let's make it lowercase to improve readability.
45799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45800      # Now convert it back to Unix-style (cygpath)
45801      input_path=`$CYGPATH -u "$shortmode_path"`
45802      new_path="$input_path"
45803    fi
45804  fi
45805
45806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45807  if test "x$test_cygdrive_prefix" = x; then
45808    # As a simple fix, exclude /usr/bin since it's not a real path.
45809    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45811      # a path prefixed by /cygdrive for fixpath to work.
45812      new_path="$CYGWIN_ROOT_PATH$input_path"
45813    fi
45814  fi
45815
45816  # remove trailing .exe if any
45817  new_path="${new_path/%.exe/}"
45818
45819    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45820
45821  # First separate the path from the arguments. This will split at the first
45822  # space.
45823  complete="$BUILD_AR"
45824  path="${complete%% *}"
45825  tmp="$complete EOL"
45826  arguments="${tmp#* }"
45827
45828  # Input might be given as Windows format, start by converting to
45829  # unix format.
45830  new_path="$path"
45831
45832  windows_path="$new_path"
45833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45834    unix_path=`$CYGPATH -u "$windows_path"`
45835    new_path="$unix_path"
45836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45838    new_path="$unix_path"
45839  fi
45840
45841
45842  # Now try to locate executable using which
45843  new_path=`$WHICH "$new_path" 2> /dev/null`
45844
45845  if test "x$new_path" = x; then
45846    # Oops. Which didn't find the executable.
45847    # The splitting of arguments from the executable at a space might have been incorrect,
45848    # since paths with space are more likely in Windows. Give it another try with the whole
45849    # argument.
45850    path="$complete"
45851    arguments="EOL"
45852    new_path="$path"
45853
45854  windows_path="$new_path"
45855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45856    unix_path=`$CYGPATH -u "$windows_path"`
45857    new_path="$unix_path"
45858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45860    new_path="$unix_path"
45861  fi
45862
45863
45864    new_path=`$WHICH "$new_path" 2> /dev/null`
45865    # bat and cmd files are not always considered executable in MSYS causing which
45866    # to not find them
45867    if test "x$new_path" = x \
45868        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45869        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45870      new_path="$path"
45871
45872  windows_path="$new_path"
45873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45874    unix_path=`$CYGPATH -u "$windows_path"`
45875    new_path="$unix_path"
45876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45878    new_path="$unix_path"
45879  fi
45880
45881    fi
45882
45883    if test "x$new_path" = x; then
45884      # It's still not found. Now this is an unrecoverable error.
45885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45886$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45887      has_space=`$ECHO "$complete" | $GREP " "`
45888      if test "x$has_space" != x; then
45889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45891      fi
45892      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45893    fi
45894  fi
45895
45896  # Now new_path has a complete unix path to the binary
45897  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45898    # Keep paths in /bin as-is, but remove trailing .exe if any
45899    new_path="${new_path/%.exe/}"
45900    # Do not save /bin paths to all_fixpath_prefixes!
45901  else
45902    # Not in mixed or Windows style, start by that.
45903    new_path=`cmd //c echo $new_path`
45904
45905  input_path="$new_path"
45906  # Check if we need to convert this using DOS-style short mode. If the path
45907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45908  # take no chances and rewrite it.
45909  # Note: m4 eats our [], so we need to use [ and ] instead.
45910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45911  if test "x$has_forbidden_chars" != x; then
45912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45914  fi
45915
45916    # Output is in $new_path
45917
45918  windows_path="$new_path"
45919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45920    unix_path=`$CYGPATH -u "$windows_path"`
45921    new_path="$unix_path"
45922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45924    new_path="$unix_path"
45925  fi
45926
45927    # remove trailing .exe if any
45928    new_path="${new_path/%.exe/}"
45929
45930    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45931    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45932  fi
45933
45934    else
45935      # We're on a unix platform. Hooray! :)
45936      # First separate the path from the arguments. This will split at the first
45937      # space.
45938      complete="$BUILD_AR"
45939      path="${complete%% *}"
45940      tmp="$complete EOL"
45941      arguments="${tmp#* }"
45942
45943      # Cannot rely on the command "which" here since it doesn't always work.
45944      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45945      if test -z "$is_absolute_path"; then
45946        # Path to executable is not absolute. Find it.
45947        IFS_save="$IFS"
45948        IFS=:
45949        for p in $PATH; do
45950          if test -f "$p/$path" && test -x "$p/$path"; then
45951            new_path="$p/$path"
45952            break
45953          fi
45954        done
45955        IFS="$IFS_save"
45956      else
45957        # This is an absolute path, we can use it without further modifications.
45958        new_path="$path"
45959      fi
45960
45961      if test "x$new_path" = x; then
45962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45963$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45964        has_space=`$ECHO "$complete" | $GREP " "`
45965        if test "x$has_space" != x; then
45966          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45967$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45968        fi
45969        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45970      fi
45971    fi
45972
45973    # Now join together the path and the arguments once again
45974    if test "x$arguments" != xEOL; then
45975      new_complete="$new_path ${arguments% *}"
45976    else
45977      new_complete="$new_path"
45978    fi
45979
45980    if test "x$complete" != "x$new_complete"; then
45981      BUILD_AR="$new_complete"
45982      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45983$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45984    fi
45985  fi
45986
45987
45988
45989  # Publish this variable in the help.
45990
45991
45992  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45993    # The variable is not set by user, try to locate tool using the code snippet
45994    for ac_prog in objcopy
45995do
45996  # Extract the first word of "$ac_prog", so it can be a program name with args.
45997set dummy $ac_prog; ac_word=$2
45998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45999$as_echo_n "checking for $ac_word... " >&6; }
46000if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46001  $as_echo_n "(cached) " >&6
46002else
46003  case $BUILD_OBJCOPY in
46004  [\\/]* | ?:[\\/]*)
46005  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46006  ;;
46007  *)
46008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46009for as_dir in $PATH
46010do
46011  IFS=$as_save_IFS
46012  test -z "$as_dir" && as_dir=.
46013    for ac_exec_ext in '' $ac_executable_extensions; do
46014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46015    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46017    break 2
46018  fi
46019done
46020  done
46021IFS=$as_save_IFS
46022
46023  ;;
46024esac
46025fi
46026BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46027if test -n "$BUILD_OBJCOPY"; then
46028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46029$as_echo "$BUILD_OBJCOPY" >&6; }
46030else
46031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46032$as_echo "no" >&6; }
46033fi
46034
46035
46036  test -n "$BUILD_OBJCOPY" && break
46037done
46038
46039  else
46040    # The variable is set, but is it from the command line or the environment?
46041
46042    # Try to remove the string !BUILD_OBJCOPY! from our list.
46043    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46044    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46045      # If it failed, the variable was not from the command line. Ignore it,
46046      # but warn the user (except for BASH, which is always set by the calling BASH).
46047      if test "xBUILD_OBJCOPY" != xBASH; then
46048        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46049$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46050      fi
46051      # Try to locate tool using the code snippet
46052      for ac_prog in objcopy
46053do
46054  # Extract the first word of "$ac_prog", so it can be a program name with args.
46055set dummy $ac_prog; ac_word=$2
46056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46057$as_echo_n "checking for $ac_word... " >&6; }
46058if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46059  $as_echo_n "(cached) " >&6
46060else
46061  case $BUILD_OBJCOPY in
46062  [\\/]* | ?:[\\/]*)
46063  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46064  ;;
46065  *)
46066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46067for as_dir in $PATH
46068do
46069  IFS=$as_save_IFS
46070  test -z "$as_dir" && as_dir=.
46071    for ac_exec_ext in '' $ac_executable_extensions; do
46072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46073    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46075    break 2
46076  fi
46077done
46078  done
46079IFS=$as_save_IFS
46080
46081  ;;
46082esac
46083fi
46084BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46085if test -n "$BUILD_OBJCOPY"; then
46086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46087$as_echo "$BUILD_OBJCOPY" >&6; }
46088else
46089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46090$as_echo "no" >&6; }
46091fi
46092
46093
46094  test -n "$BUILD_OBJCOPY" && break
46095done
46096
46097    else
46098      # If it succeeded, then it was overridden by the user. We will use it
46099      # for the tool.
46100
46101      # First remove it from the list of overridden variables, so we can test
46102      # for unknown variables in the end.
46103      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46104
46105      # Check if we try to supply an empty value
46106      if test "x$BUILD_OBJCOPY" = x; then
46107        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46108$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46109        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46110$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46112$as_echo "disabled" >&6; }
46113      else
46114        # Check if the provided tool contains a complete path.
46115        tool_specified="$BUILD_OBJCOPY"
46116        tool_basename="${tool_specified##*/}"
46117        if test "x$tool_basename" = "x$tool_specified"; then
46118          # A command without a complete path is provided, search $PATH.
46119          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46120$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46121          # Extract the first word of "$tool_basename", so it can be a program name with args.
46122set dummy $tool_basename; ac_word=$2
46123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46124$as_echo_n "checking for $ac_word... " >&6; }
46125if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46126  $as_echo_n "(cached) " >&6
46127else
46128  case $BUILD_OBJCOPY in
46129  [\\/]* | ?:[\\/]*)
46130  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46131  ;;
46132  *)
46133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46134for as_dir in $PATH
46135do
46136  IFS=$as_save_IFS
46137  test -z "$as_dir" && as_dir=.
46138    for ac_exec_ext in '' $ac_executable_extensions; do
46139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46140    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46142    break 2
46143  fi
46144done
46145  done
46146IFS=$as_save_IFS
46147
46148  ;;
46149esac
46150fi
46151BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46152if test -n "$BUILD_OBJCOPY"; then
46153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46154$as_echo "$BUILD_OBJCOPY" >&6; }
46155else
46156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46157$as_echo "no" >&6; }
46158fi
46159
46160
46161          if test "x$BUILD_OBJCOPY" = x; then
46162            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46163          fi
46164        else
46165          # Otherwise we believe it is a complete path. Use it as it is.
46166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46167$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46168          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46169$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46170          if test ! -x "$tool_specified"; then
46171            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46172$as_echo "not found" >&6; }
46173            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46174          fi
46175          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46176$as_echo "$tool_specified" >&6; }
46177        fi
46178      fi
46179    fi
46180
46181  fi
46182
46183
46184
46185  # Only process if variable expands to non-empty
46186
46187  if test "x$BUILD_OBJCOPY" != x; then
46188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46189
46190  # First separate the path from the arguments. This will split at the first
46191  # space.
46192  complete="$BUILD_OBJCOPY"
46193  path="${complete%% *}"
46194  tmp="$complete EOL"
46195  arguments="${tmp#* }"
46196
46197  # Input might be given as Windows format, start by converting to
46198  # unix format.
46199  new_path=`$CYGPATH -u "$path"`
46200
46201  # Now try to locate executable using which
46202  new_path=`$WHICH "$new_path" 2> /dev/null`
46203  # bat and cmd files are not always considered executable in cygwin causing which
46204  # to not find them
46205  if test "x$new_path" = x \
46206      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46207      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46208    new_path=`$CYGPATH -u "$path"`
46209  fi
46210  if test "x$new_path" = x; then
46211    # Oops. Which didn't find the executable.
46212    # The splitting of arguments from the executable at a space might have been incorrect,
46213    # since paths with space are more likely in Windows. Give it another try with the whole
46214    # argument.
46215    path="$complete"
46216    arguments="EOL"
46217    new_path=`$CYGPATH -u "$path"`
46218    new_path=`$WHICH "$new_path" 2> /dev/null`
46219    # bat and cmd files are not always considered executable in cygwin causing which
46220    # to not find them
46221    if test "x$new_path" = x \
46222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46224      new_path=`$CYGPATH -u "$path"`
46225    fi
46226    if test "x$new_path" = x; then
46227      # It's still not found. Now this is an unrecoverable error.
46228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46229$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46230      has_space=`$ECHO "$complete" | $GREP " "`
46231      if test "x$has_space" != x; then
46232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46234      fi
46235      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46236    fi
46237  fi
46238
46239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46242  # "foo.exe" is OK but "foo" is an error.
46243  #
46244  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46245  # It is also a way to make sure we got the proper file name for the real test later on.
46246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46247  if test "x$test_shortpath" = x; then
46248    # Short path failed, file does not exist as specified.
46249    # Try adding .exe or .cmd
46250    if test -f "${new_path}.exe"; then
46251      input_to_shortpath="${new_path}.exe"
46252    elif test -f "${new_path}.cmd"; then
46253      input_to_shortpath="${new_path}.cmd"
46254    else
46255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46256$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46257      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46258$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46259      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46260    fi
46261  else
46262    input_to_shortpath="$new_path"
46263  fi
46264
46265  # Call helper function which possibly converts this using DOS-style short mode.
46266  # If so, the updated path is stored in $new_path.
46267  new_path="$input_to_shortpath"
46268
46269  input_path="$input_to_shortpath"
46270  # Check if we need to convert this using DOS-style short mode. If the path
46271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46272  # take no chances and rewrite it.
46273  # Note: m4 eats our [], so we need to use [ and ] instead.
46274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46275  if test "x$has_forbidden_chars" != x; then
46276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46280      # Going to short mode and back again did indeed matter. Since short mode is
46281      # case insensitive, let's make it lowercase to improve readability.
46282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46283      # Now convert it back to Unix-style (cygpath)
46284      input_path=`$CYGPATH -u "$shortmode_path"`
46285      new_path="$input_path"
46286    fi
46287  fi
46288
46289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46290  if test "x$test_cygdrive_prefix" = x; then
46291    # As a simple fix, exclude /usr/bin since it's not a real path.
46292    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46294      # a path prefixed by /cygdrive for fixpath to work.
46295      new_path="$CYGWIN_ROOT_PATH$input_path"
46296    fi
46297  fi
46298
46299  # remove trailing .exe if any
46300  new_path="${new_path/%.exe/}"
46301
46302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46303
46304  # First separate the path from the arguments. This will split at the first
46305  # space.
46306  complete="$BUILD_OBJCOPY"
46307  path="${complete%% *}"
46308  tmp="$complete EOL"
46309  arguments="${tmp#* }"
46310
46311  # Input might be given as Windows format, start by converting to
46312  # unix format.
46313  new_path="$path"
46314
46315  windows_path="$new_path"
46316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46317    unix_path=`$CYGPATH -u "$windows_path"`
46318    new_path="$unix_path"
46319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46321    new_path="$unix_path"
46322  fi
46323
46324
46325  # Now try to locate executable using which
46326  new_path=`$WHICH "$new_path" 2> /dev/null`
46327
46328  if test "x$new_path" = x; then
46329    # Oops. Which didn't find the executable.
46330    # The splitting of arguments from the executable at a space might have been incorrect,
46331    # since paths with space are more likely in Windows. Give it another try with the whole
46332    # argument.
46333    path="$complete"
46334    arguments="EOL"
46335    new_path="$path"
46336
46337  windows_path="$new_path"
46338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46339    unix_path=`$CYGPATH -u "$windows_path"`
46340    new_path="$unix_path"
46341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46343    new_path="$unix_path"
46344  fi
46345
46346
46347    new_path=`$WHICH "$new_path" 2> /dev/null`
46348    # bat and cmd files are not always considered executable in MSYS causing which
46349    # to not find them
46350    if test "x$new_path" = x \
46351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46353      new_path="$path"
46354
46355  windows_path="$new_path"
46356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46357    unix_path=`$CYGPATH -u "$windows_path"`
46358    new_path="$unix_path"
46359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46361    new_path="$unix_path"
46362  fi
46363
46364    fi
46365
46366    if test "x$new_path" = x; then
46367      # It's still not found. Now this is an unrecoverable error.
46368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46369$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46370      has_space=`$ECHO "$complete" | $GREP " "`
46371      if test "x$has_space" != x; then
46372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46374      fi
46375      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46376    fi
46377  fi
46378
46379  # Now new_path has a complete unix path to the binary
46380  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46381    # Keep paths in /bin as-is, but remove trailing .exe if any
46382    new_path="${new_path/%.exe/}"
46383    # Do not save /bin paths to all_fixpath_prefixes!
46384  else
46385    # Not in mixed or Windows style, start by that.
46386    new_path=`cmd //c echo $new_path`
46387
46388  input_path="$new_path"
46389  # Check if we need to convert this using DOS-style short mode. If the path
46390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46391  # take no chances and rewrite it.
46392  # Note: m4 eats our [], so we need to use [ and ] instead.
46393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46394  if test "x$has_forbidden_chars" != x; then
46395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46397  fi
46398
46399    # Output is in $new_path
46400
46401  windows_path="$new_path"
46402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46403    unix_path=`$CYGPATH -u "$windows_path"`
46404    new_path="$unix_path"
46405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46407    new_path="$unix_path"
46408  fi
46409
46410    # remove trailing .exe if any
46411    new_path="${new_path/%.exe/}"
46412
46413    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46414    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46415  fi
46416
46417    else
46418      # We're on a unix platform. Hooray! :)
46419      # First separate the path from the arguments. This will split at the first
46420      # space.
46421      complete="$BUILD_OBJCOPY"
46422      path="${complete%% *}"
46423      tmp="$complete EOL"
46424      arguments="${tmp#* }"
46425
46426      # Cannot rely on the command "which" here since it doesn't always work.
46427      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46428      if test -z "$is_absolute_path"; then
46429        # Path to executable is not absolute. Find it.
46430        IFS_save="$IFS"
46431        IFS=:
46432        for p in $PATH; do
46433          if test -f "$p/$path" && test -x "$p/$path"; then
46434            new_path="$p/$path"
46435            break
46436          fi
46437        done
46438        IFS="$IFS_save"
46439      else
46440        # This is an absolute path, we can use it without further modifications.
46441        new_path="$path"
46442      fi
46443
46444      if test "x$new_path" = x; then
46445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46446$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46447        has_space=`$ECHO "$complete" | $GREP " "`
46448        if test "x$has_space" != x; then
46449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46451        fi
46452        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46453      fi
46454    fi
46455
46456    # Now join together the path and the arguments once again
46457    if test "x$arguments" != xEOL; then
46458      new_complete="$new_path ${arguments% *}"
46459    else
46460      new_complete="$new_path"
46461    fi
46462
46463    if test "x$complete" != "x$new_complete"; then
46464      BUILD_OBJCOPY="$new_complete"
46465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46466$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46467    fi
46468  fi
46469
46470
46471
46472  # Publish this variable in the help.
46473
46474
46475  if [ -z "${BUILD_STRIP+x}" ]; then
46476    # The variable is not set by user, try to locate tool using the code snippet
46477    for ac_prog in strip
46478do
46479  # Extract the first word of "$ac_prog", so it can be a program name with args.
46480set dummy $ac_prog; ac_word=$2
46481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46482$as_echo_n "checking for $ac_word... " >&6; }
46483if ${ac_cv_path_BUILD_STRIP+:} false; then :
46484  $as_echo_n "(cached) " >&6
46485else
46486  case $BUILD_STRIP in
46487  [\\/]* | ?:[\\/]*)
46488  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46489  ;;
46490  *)
46491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46492for as_dir in $PATH
46493do
46494  IFS=$as_save_IFS
46495  test -z "$as_dir" && as_dir=.
46496    for ac_exec_ext in '' $ac_executable_extensions; do
46497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46498    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46500    break 2
46501  fi
46502done
46503  done
46504IFS=$as_save_IFS
46505
46506  ;;
46507esac
46508fi
46509BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46510if test -n "$BUILD_STRIP"; then
46511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46512$as_echo "$BUILD_STRIP" >&6; }
46513else
46514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46515$as_echo "no" >&6; }
46516fi
46517
46518
46519  test -n "$BUILD_STRIP" && break
46520done
46521
46522  else
46523    # The variable is set, but is it from the command line or the environment?
46524
46525    # Try to remove the string !BUILD_STRIP! from our list.
46526    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46527    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46528      # If it failed, the variable was not from the command line. Ignore it,
46529      # but warn the user (except for BASH, which is always set by the calling BASH).
46530      if test "xBUILD_STRIP" != xBASH; then
46531        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46532$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46533      fi
46534      # Try to locate tool using the code snippet
46535      for ac_prog in strip
46536do
46537  # Extract the first word of "$ac_prog", so it can be a program name with args.
46538set dummy $ac_prog; ac_word=$2
46539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46540$as_echo_n "checking for $ac_word... " >&6; }
46541if ${ac_cv_path_BUILD_STRIP+:} false; then :
46542  $as_echo_n "(cached) " >&6
46543else
46544  case $BUILD_STRIP in
46545  [\\/]* | ?:[\\/]*)
46546  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46547  ;;
46548  *)
46549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46550for as_dir in $PATH
46551do
46552  IFS=$as_save_IFS
46553  test -z "$as_dir" && as_dir=.
46554    for ac_exec_ext in '' $ac_executable_extensions; do
46555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46556    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46558    break 2
46559  fi
46560done
46561  done
46562IFS=$as_save_IFS
46563
46564  ;;
46565esac
46566fi
46567BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46568if test -n "$BUILD_STRIP"; then
46569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46570$as_echo "$BUILD_STRIP" >&6; }
46571else
46572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46573$as_echo "no" >&6; }
46574fi
46575
46576
46577  test -n "$BUILD_STRIP" && break
46578done
46579
46580    else
46581      # If it succeeded, then it was overridden by the user. We will use it
46582      # for the tool.
46583
46584      # First remove it from the list of overridden variables, so we can test
46585      # for unknown variables in the end.
46586      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46587
46588      # Check if we try to supply an empty value
46589      if test "x$BUILD_STRIP" = x; then
46590        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46591$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46592        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46593$as_echo_n "checking for BUILD_STRIP... " >&6; }
46594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46595$as_echo "disabled" >&6; }
46596      else
46597        # Check if the provided tool contains a complete path.
46598        tool_specified="$BUILD_STRIP"
46599        tool_basename="${tool_specified##*/}"
46600        if test "x$tool_basename" = "x$tool_specified"; then
46601          # A command without a complete path is provided, search $PATH.
46602          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46603$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46604          # Extract the first word of "$tool_basename", so it can be a program name with args.
46605set dummy $tool_basename; ac_word=$2
46606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46607$as_echo_n "checking for $ac_word... " >&6; }
46608if ${ac_cv_path_BUILD_STRIP+:} false; then :
46609  $as_echo_n "(cached) " >&6
46610else
46611  case $BUILD_STRIP in
46612  [\\/]* | ?:[\\/]*)
46613  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46614  ;;
46615  *)
46616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46617for as_dir in $PATH
46618do
46619  IFS=$as_save_IFS
46620  test -z "$as_dir" && as_dir=.
46621    for ac_exec_ext in '' $ac_executable_extensions; do
46622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46623    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46625    break 2
46626  fi
46627done
46628  done
46629IFS=$as_save_IFS
46630
46631  ;;
46632esac
46633fi
46634BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46635if test -n "$BUILD_STRIP"; then
46636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46637$as_echo "$BUILD_STRIP" >&6; }
46638else
46639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46640$as_echo "no" >&6; }
46641fi
46642
46643
46644          if test "x$BUILD_STRIP" = x; then
46645            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46646          fi
46647        else
46648          # Otherwise we believe it is a complete path. Use it as it is.
46649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46650$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46651          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46652$as_echo_n "checking for BUILD_STRIP... " >&6; }
46653          if test ! -x "$tool_specified"; then
46654            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46655$as_echo "not found" >&6; }
46656            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46657          fi
46658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46659$as_echo "$tool_specified" >&6; }
46660        fi
46661      fi
46662    fi
46663
46664  fi
46665
46666
46667
46668  # Only process if variable expands to non-empty
46669
46670  if test "x$BUILD_STRIP" != x; then
46671    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46672
46673  # First separate the path from the arguments. This will split at the first
46674  # space.
46675  complete="$BUILD_STRIP"
46676  path="${complete%% *}"
46677  tmp="$complete EOL"
46678  arguments="${tmp#* }"
46679
46680  # Input might be given as Windows format, start by converting to
46681  # unix format.
46682  new_path=`$CYGPATH -u "$path"`
46683
46684  # Now try to locate executable using which
46685  new_path=`$WHICH "$new_path" 2> /dev/null`
46686  # bat and cmd files are not always considered executable in cygwin causing which
46687  # to not find them
46688  if test "x$new_path" = x \
46689      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46690      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46691    new_path=`$CYGPATH -u "$path"`
46692  fi
46693  if test "x$new_path" = x; then
46694    # Oops. Which didn't find the executable.
46695    # The splitting of arguments from the executable at a space might have been incorrect,
46696    # since paths with space are more likely in Windows. Give it another try with the whole
46697    # argument.
46698    path="$complete"
46699    arguments="EOL"
46700    new_path=`$CYGPATH -u "$path"`
46701    new_path=`$WHICH "$new_path" 2> /dev/null`
46702    # bat and cmd files are not always considered executable in cygwin causing which
46703    # to not find them
46704    if test "x$new_path" = x \
46705        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46706        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46707      new_path=`$CYGPATH -u "$path"`
46708    fi
46709    if test "x$new_path" = x; then
46710      # It's still not found. Now this is an unrecoverable error.
46711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46712$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46713      has_space=`$ECHO "$complete" | $GREP " "`
46714      if test "x$has_space" != x; then
46715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46717      fi
46718      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46719    fi
46720  fi
46721
46722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46725  # "foo.exe" is OK but "foo" is an error.
46726  #
46727  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46728  # It is also a way to make sure we got the proper file name for the real test later on.
46729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46730  if test "x$test_shortpath" = x; then
46731    # Short path failed, file does not exist as specified.
46732    # Try adding .exe or .cmd
46733    if test -f "${new_path}.exe"; then
46734      input_to_shortpath="${new_path}.exe"
46735    elif test -f "${new_path}.cmd"; then
46736      input_to_shortpath="${new_path}.cmd"
46737    else
46738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46739$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46740      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46741$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46742      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46743    fi
46744  else
46745    input_to_shortpath="$new_path"
46746  fi
46747
46748  # Call helper function which possibly converts this using DOS-style short mode.
46749  # If so, the updated path is stored in $new_path.
46750  new_path="$input_to_shortpath"
46751
46752  input_path="$input_to_shortpath"
46753  # Check if we need to convert this using DOS-style short mode. If the path
46754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46755  # take no chances and rewrite it.
46756  # Note: m4 eats our [], so we need to use [ and ] instead.
46757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46758  if test "x$has_forbidden_chars" != x; then
46759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46763      # Going to short mode and back again did indeed matter. Since short mode is
46764      # case insensitive, let's make it lowercase to improve readability.
46765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46766      # Now convert it back to Unix-style (cygpath)
46767      input_path=`$CYGPATH -u "$shortmode_path"`
46768      new_path="$input_path"
46769    fi
46770  fi
46771
46772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46773  if test "x$test_cygdrive_prefix" = x; then
46774    # As a simple fix, exclude /usr/bin since it's not a real path.
46775    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46777      # a path prefixed by /cygdrive for fixpath to work.
46778      new_path="$CYGWIN_ROOT_PATH$input_path"
46779    fi
46780  fi
46781
46782  # remove trailing .exe if any
46783  new_path="${new_path/%.exe/}"
46784
46785    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46786
46787  # First separate the path from the arguments. This will split at the first
46788  # space.
46789  complete="$BUILD_STRIP"
46790  path="${complete%% *}"
46791  tmp="$complete EOL"
46792  arguments="${tmp#* }"
46793
46794  # Input might be given as Windows format, start by converting to
46795  # unix format.
46796  new_path="$path"
46797
46798  windows_path="$new_path"
46799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46800    unix_path=`$CYGPATH -u "$windows_path"`
46801    new_path="$unix_path"
46802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46804    new_path="$unix_path"
46805  fi
46806
46807
46808  # Now try to locate executable using which
46809  new_path=`$WHICH "$new_path" 2> /dev/null`
46810
46811  if test "x$new_path" = x; then
46812    # Oops. Which didn't find the executable.
46813    # The splitting of arguments from the executable at a space might have been incorrect,
46814    # since paths with space are more likely in Windows. Give it another try with the whole
46815    # argument.
46816    path="$complete"
46817    arguments="EOL"
46818    new_path="$path"
46819
46820  windows_path="$new_path"
46821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46822    unix_path=`$CYGPATH -u "$windows_path"`
46823    new_path="$unix_path"
46824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46826    new_path="$unix_path"
46827  fi
46828
46829
46830    new_path=`$WHICH "$new_path" 2> /dev/null`
46831    # bat and cmd files are not always considered executable in MSYS causing which
46832    # to not find them
46833    if test "x$new_path" = x \
46834        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46835        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46836      new_path="$path"
46837
46838  windows_path="$new_path"
46839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46840    unix_path=`$CYGPATH -u "$windows_path"`
46841    new_path="$unix_path"
46842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46844    new_path="$unix_path"
46845  fi
46846
46847    fi
46848
46849    if test "x$new_path" = x; then
46850      # It's still not found. Now this is an unrecoverable error.
46851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46852$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46853      has_space=`$ECHO "$complete" | $GREP " "`
46854      if test "x$has_space" != x; then
46855        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46856$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46857      fi
46858      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46859    fi
46860  fi
46861
46862  # Now new_path has a complete unix path to the binary
46863  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46864    # Keep paths in /bin as-is, but remove trailing .exe if any
46865    new_path="${new_path/%.exe/}"
46866    # Do not save /bin paths to all_fixpath_prefixes!
46867  else
46868    # Not in mixed or Windows style, start by that.
46869    new_path=`cmd //c echo $new_path`
46870
46871  input_path="$new_path"
46872  # Check if we need to convert this using DOS-style short mode. If the path
46873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46874  # take no chances and rewrite it.
46875  # Note: m4 eats our [], so we need to use [ and ] instead.
46876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46877  if test "x$has_forbidden_chars" != x; then
46878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46880  fi
46881
46882    # Output is in $new_path
46883
46884  windows_path="$new_path"
46885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46886    unix_path=`$CYGPATH -u "$windows_path"`
46887    new_path="$unix_path"
46888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46890    new_path="$unix_path"
46891  fi
46892
46893    # remove trailing .exe if any
46894    new_path="${new_path/%.exe/}"
46895
46896    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46897    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46898  fi
46899
46900    else
46901      # We're on a unix platform. Hooray! :)
46902      # First separate the path from the arguments. This will split at the first
46903      # space.
46904      complete="$BUILD_STRIP"
46905      path="${complete%% *}"
46906      tmp="$complete EOL"
46907      arguments="${tmp#* }"
46908
46909      # Cannot rely on the command "which" here since it doesn't always work.
46910      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46911      if test -z "$is_absolute_path"; then
46912        # Path to executable is not absolute. Find it.
46913        IFS_save="$IFS"
46914        IFS=:
46915        for p in $PATH; do
46916          if test -f "$p/$path" && test -x "$p/$path"; then
46917            new_path="$p/$path"
46918            break
46919          fi
46920        done
46921        IFS="$IFS_save"
46922      else
46923        # This is an absolute path, we can use it without further modifications.
46924        new_path="$path"
46925      fi
46926
46927      if test "x$new_path" = x; then
46928        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46929$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46930        has_space=`$ECHO "$complete" | $GREP " "`
46931        if test "x$has_space" != x; then
46932          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46933$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46934        fi
46935        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46936      fi
46937    fi
46938
46939    # Now join together the path and the arguments once again
46940    if test "x$arguments" != xEOL; then
46941      new_complete="$new_path ${arguments% *}"
46942    else
46943      new_complete="$new_path"
46944    fi
46945
46946    if test "x$complete" != "x$new_complete"; then
46947      BUILD_STRIP="$new_complete"
46948      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46949$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46950    fi
46951  fi
46952
46953    # Assume the C compiler is the assembler
46954    BUILD_AS="$BUILD_CC -c"
46955    # Just like for the target compiler, use the compiler as linker
46956    BUILD_LD="$BUILD_CC"
46957    BUILD_LDCXX="$BUILD_CXX"
46958
46959    PATH="$OLDPATH"
46960
46961
46962  COMPILER=$BUILD_CC
46963  COMPILER_NAME=BuildC
46964
46965  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46966    # cc -V output typically looks like
46967    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46968    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46969    # Check that this is likely to be the Solaris Studio cc.
46970    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46971    if test $? -ne 0; then
46972      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46973      { $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
46974$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46975      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46976$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46977      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46978$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46979      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46980    fi
46981    # Remove usage instructions (if present), and
46982    # collapse compiler output into a single line
46983    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46984        $SED -e 's/ *[Uu]sage:.*//'`
46985    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46986        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46987  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46988    # xlc -qversion output typically looks like
46989    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46990    #     Version: 11.01.0000.0015
46991    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46992    # Check that this is likely to be the IBM XL C compiler.
46993    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46994    if test $? -ne 0; then
46995      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46996      { $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
46997$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46998      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46999$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47000      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47001$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47002      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47003    fi
47004    # Collapse compiler output into a single line
47005    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47006    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47007        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47008  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47009    # There is no specific version flag, but all output starts with a version string.
47010    # First line typically looks something like:
47011    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47012    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47013    # Check that this is likely to be Microsoft CL.EXE.
47014    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47015    if test $? -ne 0; then
47016      { $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
47017$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47018      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47019$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47020      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47021    fi
47022    # Collapse compiler output into a single line
47023    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47024    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47025        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47026  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47027    # gcc --version output typically looks like
47028    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47029    #     Copyright (C) 2013 Free Software Foundation, Inc.
47030    #     This is free software; see the source for copying conditions.  There is NO
47031    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47032    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47033    # Check that this is likely to be GCC.
47034    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47035    if test $? -ne 0; then
47036      { $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
47037$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47038      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47039$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47040      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47041    fi
47042    # Remove Copyright and legalese from version string, and
47043    # collapse into a single line
47044    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47045        $SED -e 's/ *Copyright .*//'`
47046    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47047        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47048  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47049    # clang --version output typically looks like
47050    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47051    #    clang version 3.3 (tags/RELEASE_33/final)
47052    # or
47053    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47054    #    Target: x86_64-pc-linux-gnu
47055    #    Thread model: posix
47056    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47057    # Check that this is likely to be clang
47058    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47059    if test $? -ne 0; then
47060      { $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
47061$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47062      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47063$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47064      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47065    fi
47066    # Collapse compiler output into a single line
47067    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47068    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47069        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47070  else
47071      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47072  fi
47073  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47074  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47075  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47076  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47077
47078  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47079$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47080
47081
47082  COMPILER=$BUILD_CXX
47083  COMPILER_NAME=BuildC++
47084
47085  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47086    # cc -V output typically looks like
47087    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47088    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47089    # Check that this is likely to be the Solaris Studio cc.
47090    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47091    if test $? -ne 0; then
47092      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47093      { $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
47094$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47095      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47096$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47097      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47098$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47099      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47100    fi
47101    # Remove usage instructions (if present), and
47102    # collapse compiler output into a single line
47103    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47104        $SED -e 's/ *[Uu]sage:.*//'`
47105    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47106        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47107  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47108    # xlc -qversion output typically looks like
47109    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47110    #     Version: 11.01.0000.0015
47111    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47112    # Check that this is likely to be the IBM XL C compiler.
47113    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47114    if test $? -ne 0; then
47115      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47116      { $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
47117$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47118      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47119$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47120      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47121$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47122      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47123    fi
47124    # Collapse compiler output into a single line
47125    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47126    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47127        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47128  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47129    # There is no specific version flag, but all output starts with a version string.
47130    # First line typically looks something like:
47131    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47132    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47133    # Check that this is likely to be Microsoft CL.EXE.
47134    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47135    if test $? -ne 0; then
47136      { $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
47137$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47138      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47139$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47140      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47141    fi
47142    # Collapse compiler output into a single line
47143    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47144    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47145        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47146  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47147    # gcc --version output typically looks like
47148    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47149    #     Copyright (C) 2013 Free Software Foundation, Inc.
47150    #     This is free software; see the source for copying conditions.  There is NO
47151    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47152    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47153    # Check that this is likely to be GCC.
47154    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47155    if test $? -ne 0; then
47156      { $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
47157$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47158      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47159$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47160      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47161    fi
47162    # Remove Copyright and legalese from version string, and
47163    # collapse into a single line
47164    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47165        $SED -e 's/ *Copyright .*//'`
47166    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47167        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47168  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47169    # clang --version output typically looks like
47170    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47171    #    clang version 3.3 (tags/RELEASE_33/final)
47172    # or
47173    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47174    #    Target: x86_64-pc-linux-gnu
47175    #    Thread model: posix
47176    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47177    # Check that this is likely to be clang
47178    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47179    if test $? -ne 0; then
47180      { $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
47181$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47182      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47183$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47184      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47185    fi
47186    # Collapse compiler output into a single line
47187    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47188    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47189        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47190  else
47191      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47192  fi
47193  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47194  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47195  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47196  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47197
47198  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47199$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47200
47201
47202  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47203    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
47204$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47205    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47206$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47207  fi
47208
47209  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47210  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47211    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47212$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47213  fi
47214
47215  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47216    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47217$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47218  fi
47219
47220  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47221
47222  else
47223    # If we are not cross compiling, use the normal target compilers for
47224    # building the build platform executables.
47225    BUILD_CC="$CC"
47226    BUILD_CXX="$CXX"
47227    BUILD_LD="$LD"
47228    BUILD_LDCXX="$LDCXX"
47229    BUILD_NM="$NM"
47230    BUILD_AS="$AS"
47231    BUILD_OBJCOPY="$OBJCOPY"
47232    BUILD_STRIP="$STRIP"
47233    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47234    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47235    BUILD_AR="$AR"
47236
47237
47238  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47239    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47240$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47241    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47242$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47243  fi
47244
47245  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47246  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47247    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47248$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47249  fi
47250
47251  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47252    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47253$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47254  fi
47255
47256  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47257
47258  fi
47259
47260
47261
47262
47263
47264
47265
47266
47267
47268
47269
47270
47271  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47272    # For hotspot, we need these in Windows mixed path,
47273    # so rewrite them all. Need added .exe suffix.
47274    HOTSPOT_CXX="$CXX.exe"
47275    HOTSPOT_LD="$LD.exe"
47276    HOTSPOT_MT="$MT.exe"
47277    HOTSPOT_RC="$RC.exe"
47278
47279  unix_path="$HOTSPOT_CXX"
47280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47281    windows_path=`$CYGPATH -m "$unix_path"`
47282    HOTSPOT_CXX="$windows_path"
47283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47284    windows_path=`cmd //c echo $unix_path`
47285    HOTSPOT_CXX="$windows_path"
47286  fi
47287
47288
47289  unix_path="$HOTSPOT_LD"
47290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47291    windows_path=`$CYGPATH -m "$unix_path"`
47292    HOTSPOT_LD="$windows_path"
47293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47294    windows_path=`cmd //c echo $unix_path`
47295    HOTSPOT_LD="$windows_path"
47296  fi
47297
47298
47299  unix_path="$HOTSPOT_MT"
47300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47301    windows_path=`$CYGPATH -m "$unix_path"`
47302    HOTSPOT_MT="$windows_path"
47303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47304    windows_path=`cmd //c echo $unix_path`
47305    HOTSPOT_MT="$windows_path"
47306  fi
47307
47308
47309  unix_path="$HOTSPOT_RC"
47310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47311    windows_path=`$CYGPATH -m "$unix_path"`
47312    HOTSPOT_RC="$windows_path"
47313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47314    windows_path=`cmd //c echo $unix_path`
47315    HOTSPOT_RC="$windows_path"
47316  fi
47317
47318
47319
47320  else
47321    HOTSPOT_CXX="$CXX"
47322    HOTSPOT_LD="$LD"
47323  fi
47324
47325
47326
47327  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47328    USE_CLANG=true
47329  fi
47330
47331
47332
47333
47334
47335  # The package path is used only on macosx?
47336  # FIXME: clean this up, and/or move it elsewhere.
47337  PACKAGE_PATH=/opt/local
47338
47339
47340  # Check for extra potential brokenness.
47341  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47342    # On Windows, double-check that we got the right compiler.
47343    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47344    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47345    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47346      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47347        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
47348      fi
47349    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47350      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47351        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47352      fi
47353    fi
47354  fi
47355
47356  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47357    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47358    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47359    # This is later checked when setting flags.
47360
47361    # "-Og" suppported for GCC 4.8 and later
47362    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410    # Execute function body
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459    # Execute function body
47460
47461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47462$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47463  supports=yes
47464
47465  saved_cflags="$CFLAGS"
47466  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47467  ac_ext=c
47468ac_cpp='$CPP $CPPFLAGS'
47469ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47470ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47471ac_compiler_gnu=$ac_cv_c_compiler_gnu
47472
47473  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47474/* end confdefs.h.  */
47475int i;
47476_ACEOF
47477if ac_fn_c_try_compile "$LINENO"; then :
47478
47479else
47480  supports=no
47481fi
47482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47483  ac_ext=cpp
47484ac_cpp='$CXXCPP $CPPFLAGS'
47485ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47486ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47487ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47488
47489  CFLAGS="$saved_cflags"
47490
47491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47492$as_echo "$supports" >&6; }
47493  if test "x$supports" = "xyes" ; then
47494    :
47495    C_COMP_SUPPORTS="yes"
47496  else
47497    :
47498    C_COMP_SUPPORTS="no"
47499  fi
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554
47555
47556
47557
47558
47559    # Execute function body
47560
47561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47562$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47563  supports=yes
47564
47565  saved_cxxflags="$CXXFLAGS"
47566  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47567  ac_ext=cpp
47568ac_cpp='$CXXCPP $CPPFLAGS'
47569ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47570ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47571ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47572
47573  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47574/* end confdefs.h.  */
47575int i;
47576_ACEOF
47577if ac_fn_cxx_try_compile "$LINENO"; then :
47578
47579else
47580  supports=no
47581fi
47582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47583  ac_ext=cpp
47584ac_cpp='$CXXCPP $CPPFLAGS'
47585ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47586ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47587ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47588
47589  CXXFLAGS="$saved_cxxflags"
47590
47591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47592$as_echo "$supports" >&6; }
47593  if test "x$supports" = "xyes" ; then
47594    :
47595    CXX_COMP_SUPPORTS="yes"
47596  else
47597    :
47598    CXX_COMP_SUPPORTS="no"
47599  fi
47600
47601
47602
47603
47604
47605
47606
47607
47608
47609
47610
47611
47612
47613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47614$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47615  supports=no
47616  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47617
47618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47619$as_echo "$supports" >&6; }
47620  if test "x$supports" = "xyes" ; then
47621    :
47622    HAS_CFLAG_OPTIMIZE_DEBUG=true
47623  else
47624    :
47625    HAS_CFLAG_OPTIMIZE_DEBUG=false
47626  fi
47627
47628
47629
47630
47631
47632
47633
47634    # "-z relro" supported in GNU binutils 2.17 and later
47635    LINKER_RELRO_FLAG="-Wl,-z,relro"
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683    # Execute function body
47684
47685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47686$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47687  supports=yes
47688
47689  saved_ldflags="$LDFLAGS"
47690  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47691  ac_ext=c
47692ac_cpp='$CPP $CPPFLAGS'
47693ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47694ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47695ac_compiler_gnu=$ac_cv_c_compiler_gnu
47696
47697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47698/* end confdefs.h.  */
47699
47700int
47701main ()
47702{
47703
47704  ;
47705  return 0;
47706}
47707_ACEOF
47708if ac_fn_c_try_link "$LINENO"; then :
47709
47710else
47711  supports=no
47712fi
47713rm -f core conftest.err conftest.$ac_objext \
47714    conftest$ac_exeext conftest.$ac_ext
47715  ac_ext=cpp
47716ac_cpp='$CXXCPP $CPPFLAGS'
47717ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47718ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47719ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47720
47721  LDFLAGS="$saved_ldflags"
47722
47723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47724$as_echo "$supports" >&6; }
47725  if test "x$supports" = "xyes" ; then
47726    :
47727    HAS_LINKER_RELRO=true
47728  else
47729    :
47730    HAS_LINKER_RELRO=false
47731  fi
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745    # "-z now" supported in GNU binutils 2.11 and later
47746    LINKER_NOW_FLAG="-Wl,-z,now"
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789
47790
47791
47792
47793
47794    # Execute function body
47795
47796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47797$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47798  supports=yes
47799
47800  saved_ldflags="$LDFLAGS"
47801  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47802  ac_ext=c
47803ac_cpp='$CPP $CPPFLAGS'
47804ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47805ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47806ac_compiler_gnu=$ac_cv_c_compiler_gnu
47807
47808  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47809/* end confdefs.h.  */
47810
47811int
47812main ()
47813{
47814
47815  ;
47816  return 0;
47817}
47818_ACEOF
47819if ac_fn_c_try_link "$LINENO"; then :
47820
47821else
47822  supports=no
47823fi
47824rm -f core conftest.err conftest.$ac_objext \
47825    conftest$ac_exeext conftest.$ac_ext
47826  ac_ext=cpp
47827ac_cpp='$CXXCPP $CPPFLAGS'
47828ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47829ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47830ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47831
47832  LDFLAGS="$saved_ldflags"
47833
47834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47835$as_echo "$supports" >&6; }
47836  if test "x$supports" = "xyes" ; then
47837    :
47838    HAS_LINKER_NOW=true
47839  else
47840    :
47841    HAS_LINKER_NOW=false
47842  fi
47843
47844
47845
47846
47847
47848
47849
47850
47851
47852
47853
47854
47855  fi
47856
47857  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47858  # in executable.'
47859  USING_BROKEN_SUSE_LD=no
47860  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47862$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47863    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47864    $ECHO "int main() { }" > main.c
47865    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47867$as_echo "no" >&6; }
47868      USING_BROKEN_SUSE_LD=no
47869    else
47870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47871$as_echo "yes" >&6; }
47872      USING_BROKEN_SUSE_LD=yes
47873    fi
47874    $RM version-script.map main.c a.out
47875  fi
47876
47877
47878  # Setup hotspot lecagy names for toolchains
47879  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47880  if test "x$TOOLCHAIN_TYPE" = xclang; then
47881    HOTSPOT_TOOLCHAIN_TYPE=gcc
47882  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47883    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47884  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47885    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47886  fi
47887
47888
47889
47890# Setup the JTReg Regression Test Harness.
47891
47892
47893# Check whether --with-jtreg was given.
47894if test "${with_jtreg+set}" = set; then :
47895  withval=$with_jtreg;
47896else
47897  with_jtreg=no
47898fi
47899
47900
47901  if test "x$with_jtreg" = xno; then
47902    # jtreg disabled
47903    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47904$as_echo_n "checking for jtreg... " >&6; }
47905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47906$as_echo "no" >&6; }
47907  else
47908    if test "x$with_jtreg" != xyes; then
47909      # with path specified.
47910      JT_HOME="$with_jtreg"
47911    fi
47912
47913    if test "x$JT_HOME" != x; then
47914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47915$as_echo_n "checking for jtreg... " >&6; }
47916
47917      # use JT_HOME enviroment var.
47918
47919  # Only process if variable expands to non-empty
47920
47921  if test "x$JT_HOME" != x; then
47922    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47923
47924  # Input might be given as Windows format, start by converting to
47925  # unix format.
47926  path="$JT_HOME"
47927  new_path=`$CYGPATH -u "$path"`
47928
47929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47932  # "foo.exe" is OK but "foo" is an error.
47933  #
47934  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47935  # It is also a way to make sure we got the proper file name for the real test later on.
47936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47937  if test "x$test_shortpath" = x; then
47938    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47939$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47940    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47941  fi
47942
47943  # Call helper function which possibly converts this using DOS-style short mode.
47944  # If so, the updated path is stored in $new_path.
47945
47946  input_path="$new_path"
47947  # Check if we need to convert this using DOS-style short mode. If the path
47948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47949  # take no chances and rewrite it.
47950  # Note: m4 eats our [], so we need to use [ and ] instead.
47951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47952  if test "x$has_forbidden_chars" != x; then
47953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47957      # Going to short mode and back again did indeed matter. Since short mode is
47958      # case insensitive, let's make it lowercase to improve readability.
47959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47960      # Now convert it back to Unix-style (cygpath)
47961      input_path=`$CYGPATH -u "$shortmode_path"`
47962      new_path="$input_path"
47963    fi
47964  fi
47965
47966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47967  if test "x$test_cygdrive_prefix" = x; then
47968    # As a simple fix, exclude /usr/bin since it's not a real path.
47969    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47971      # a path prefixed by /cygdrive for fixpath to work.
47972      new_path="$CYGWIN_ROOT_PATH$input_path"
47973    fi
47974  fi
47975
47976
47977  if test "x$path" != "x$new_path"; then
47978    JT_HOME="$new_path"
47979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47980$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47981  fi
47982
47983    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47984
47985  path="$JT_HOME"
47986  has_colon=`$ECHO $path | $GREP ^.:`
47987  new_path="$path"
47988  if test "x$has_colon" = x; then
47989    # Not in mixed or Windows style, start by that.
47990    new_path=`cmd //c echo $path`
47991  fi
47992
47993
47994  input_path="$new_path"
47995  # Check if we need to convert this using DOS-style short mode. If the path
47996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47997  # take no chances and rewrite it.
47998  # Note: m4 eats our [], so we need to use [ and ] instead.
47999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48000  if test "x$has_forbidden_chars" != x; then
48001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48003  fi
48004
48005
48006  windows_path="$new_path"
48007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48008    unix_path=`$CYGPATH -u "$windows_path"`
48009    new_path="$unix_path"
48010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48012    new_path="$unix_path"
48013  fi
48014
48015  if test "x$path" != "x$new_path"; then
48016    JT_HOME="$new_path"
48017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48018$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48019  fi
48020
48021  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48022  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48023
48024    else
48025      # We're on a unix platform. Hooray! :)
48026      path="$JT_HOME"
48027      has_space=`$ECHO "$path" | $GREP " "`
48028      if test "x$has_space" != x; then
48029        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48030$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48031        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48032      fi
48033
48034      # Use eval to expand a potential ~
48035      eval path="$path"
48036      if test ! -f "$path" && test ! -d "$path"; then
48037        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48038      fi
48039
48040      if test -d "$path"; then
48041        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48042      else
48043        dir="`$DIRNAME "$path"`"
48044        base="`$BASENAME "$path"`"
48045        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48046      fi
48047    fi
48048  fi
48049
48050
48051      # jtreg win32 script works for everybody
48052      JTREGEXE="$JT_HOME/bin/jtreg"
48053
48054      if test ! -f "$JTREGEXE"; then
48055        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48056      fi
48057
48058      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48059$as_echo "$JTREGEXE" >&6; }
48060    else
48061      # try to find jtreg on path
48062
48063
48064
48065  # Publish this variable in the help.
48066
48067
48068  if [ -z "${JTREGEXE+x}" ]; then
48069    # The variable is not set by user, try to locate tool using the code snippet
48070    for ac_prog in jtreg
48071do
48072  # Extract the first word of "$ac_prog", so it can be a program name with args.
48073set dummy $ac_prog; ac_word=$2
48074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48075$as_echo_n "checking for $ac_word... " >&6; }
48076if ${ac_cv_path_JTREGEXE+:} false; then :
48077  $as_echo_n "(cached) " >&6
48078else
48079  case $JTREGEXE in
48080  [\\/]* | ?:[\\/]*)
48081  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48082  ;;
48083  *)
48084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48085for as_dir in $PATH
48086do
48087  IFS=$as_save_IFS
48088  test -z "$as_dir" && as_dir=.
48089    for ac_exec_ext in '' $ac_executable_extensions; do
48090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48091    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48093    break 2
48094  fi
48095done
48096  done
48097IFS=$as_save_IFS
48098
48099  ;;
48100esac
48101fi
48102JTREGEXE=$ac_cv_path_JTREGEXE
48103if test -n "$JTREGEXE"; then
48104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48105$as_echo "$JTREGEXE" >&6; }
48106else
48107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48108$as_echo "no" >&6; }
48109fi
48110
48111
48112  test -n "$JTREGEXE" && break
48113done
48114
48115  else
48116    # The variable is set, but is it from the command line or the environment?
48117
48118    # Try to remove the string !JTREGEXE! from our list.
48119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48121      # If it failed, the variable was not from the command line. Ignore it,
48122      # but warn the user (except for BASH, which is always set by the calling BASH).
48123      if test "xJTREGEXE" != xBASH; then
48124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48125$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48126      fi
48127      # Try to locate tool using the code snippet
48128      for ac_prog in jtreg
48129do
48130  # Extract the first word of "$ac_prog", so it can be a program name with args.
48131set dummy $ac_prog; ac_word=$2
48132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48133$as_echo_n "checking for $ac_word... " >&6; }
48134if ${ac_cv_path_JTREGEXE+:} false; then :
48135  $as_echo_n "(cached) " >&6
48136else
48137  case $JTREGEXE in
48138  [\\/]* | ?:[\\/]*)
48139  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48140  ;;
48141  *)
48142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48143for as_dir in $PATH
48144do
48145  IFS=$as_save_IFS
48146  test -z "$as_dir" && as_dir=.
48147    for ac_exec_ext in '' $ac_executable_extensions; do
48148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48149    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48151    break 2
48152  fi
48153done
48154  done
48155IFS=$as_save_IFS
48156
48157  ;;
48158esac
48159fi
48160JTREGEXE=$ac_cv_path_JTREGEXE
48161if test -n "$JTREGEXE"; then
48162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48163$as_echo "$JTREGEXE" >&6; }
48164else
48165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48166$as_echo "no" >&6; }
48167fi
48168
48169
48170  test -n "$JTREGEXE" && break
48171done
48172
48173    else
48174      # If it succeeded, then it was overridden by the user. We will use it
48175      # for the tool.
48176
48177      # First remove it from the list of overridden variables, so we can test
48178      # for unknown variables in the end.
48179      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48180
48181      # Check if we try to supply an empty value
48182      if test "x$JTREGEXE" = x; then
48183        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48184$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48186$as_echo_n "checking for JTREGEXE... " >&6; }
48187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48188$as_echo "disabled" >&6; }
48189      else
48190        # Check if the provided tool contains a complete path.
48191        tool_specified="$JTREGEXE"
48192        tool_basename="${tool_specified##*/}"
48193        if test "x$tool_basename" = "x$tool_specified"; then
48194          # A command without a complete path is provided, search $PATH.
48195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48196$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48197          # Extract the first word of "$tool_basename", so it can be a program name with args.
48198set dummy $tool_basename; ac_word=$2
48199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48200$as_echo_n "checking for $ac_word... " >&6; }
48201if ${ac_cv_path_JTREGEXE+:} false; then :
48202  $as_echo_n "(cached) " >&6
48203else
48204  case $JTREGEXE in
48205  [\\/]* | ?:[\\/]*)
48206  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48207  ;;
48208  *)
48209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48210for as_dir in $PATH
48211do
48212  IFS=$as_save_IFS
48213  test -z "$as_dir" && as_dir=.
48214    for ac_exec_ext in '' $ac_executable_extensions; do
48215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48216    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48218    break 2
48219  fi
48220done
48221  done
48222IFS=$as_save_IFS
48223
48224  ;;
48225esac
48226fi
48227JTREGEXE=$ac_cv_path_JTREGEXE
48228if test -n "$JTREGEXE"; then
48229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48230$as_echo "$JTREGEXE" >&6; }
48231else
48232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48233$as_echo "no" >&6; }
48234fi
48235
48236
48237          if test "x$JTREGEXE" = x; then
48238            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48239          fi
48240        else
48241          # Otherwise we believe it is a complete path. Use it as it is.
48242          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48243$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48244          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48245$as_echo_n "checking for JTREGEXE... " >&6; }
48246          if test ! -x "$tool_specified"; then
48247            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48248$as_echo "not found" >&6; }
48249            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48250          fi
48251          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48252$as_echo "$tool_specified" >&6; }
48253        fi
48254      fi
48255    fi
48256
48257  fi
48258
48259
48260
48261  if test "x$JTREGEXE" = x; then
48262    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48263  fi
48264
48265
48266      JT_HOME="`$DIRNAME $JTREGEXE`"
48267    fi
48268  fi
48269
48270
48271
48272
48273
48274
48275  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48276  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48277  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48278  #                              commands produced by the link step (currently AIX only)
48279  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48280    COMPILER_TARGET_BITS_FLAG="-q"
48281    COMPILER_COMMAND_FILE_FLAG="-f"
48282    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48283  else
48284    COMPILER_TARGET_BITS_FLAG="-m"
48285    COMPILER_COMMAND_FILE_FLAG="@"
48286    COMPILER_BINDCMD_FILE_FLAG=""
48287
48288    # The solstudio linker does not support @-files.
48289    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48290      COMPILER_COMMAND_FILE_FLAG=
48291    fi
48292
48293    # Check if @file is supported by gcc
48294    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48295      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48296$as_echo_n "checking if @file is supported by gcc... " >&6; }
48297      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48298      $ECHO "" "--version" > command.file
48299      if $CXX @command.file 2>&5 >&5; then
48300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48301$as_echo "yes" >&6; }
48302        COMPILER_COMMAND_FILE_FLAG="@"
48303      else
48304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48305$as_echo "no" >&6; }
48306        COMPILER_COMMAND_FILE_FLAG=
48307      fi
48308      $RM command.file
48309    fi
48310  fi
48311
48312
48313
48314
48315  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48316  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48317    ARFLAGS="-r"
48318  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48319    ARFLAGS="-X64"
48320  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48321    # lib.exe is used as AR to create static libraries.
48322    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48323  else
48324    ARFLAGS=""
48325  fi
48326
48327
48328  ## Setup strip.
48329  # FIXME: should this really be per platform, or should it be per toolchain type?
48330  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48331  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48332  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48333    STRIPFLAGS="-g"
48334  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48335    STRIPFLAGS="-x"
48336  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48337    STRIPFLAGS="-S"
48338  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48339    STRIPFLAGS="-X32_64"
48340  fi
48341
48342
48343
48344  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48345    CC_OUT_OPTION=-Fo
48346    EXE_OUT_OPTION=-out:
48347    LD_OUT_OPTION=-out:
48348    AR_OUT_OPTION=-out:
48349  else
48350    # The option used to specify the target .o,.a or .so file.
48351    # When compiling, how to specify the to be created object file.
48352    CC_OUT_OPTION='-o$(SPACE)'
48353    # When linking, how to specify the to be created executable.
48354    EXE_OUT_OPTION='-o$(SPACE)'
48355    # When linking, how to specify the to be created dynamically linkable library.
48356    LD_OUT_OPTION='-o$(SPACE)'
48357    # When archiving, how to specify the to be create static archive for object files.
48358    AR_OUT_OPTION='rcs$(SPACE)'
48359  fi
48360
48361
48362
48363
48364
48365  # On Windows, we need to set RC flags.
48366  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48367    RC_FLAGS="-nologo -l0x409"
48368    JVM_RCFLAGS="-nologo"
48369    if test "x$DEBUG_LEVEL" = xrelease; then
48370      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48371      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48372    fi
48373
48374    # The version variables used to create RC_FLAGS may be overridden
48375    # in a custom configure script, or possibly the command line.
48376    # Let those variables be expanded at make time in spec.gmk.
48377    # The \$ are escaped to the shell, and the $(...) variables
48378    # are evaluated by make.
48379    RC_FLAGS="$RC_FLAGS \
48380        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48381        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48382        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48383        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48384        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48385        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48386        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48387
48388    JVM_RCFLAGS="$JVM_RCFLAGS \
48389        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48390        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48391        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48392        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48393        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48394        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48395        -D\"HS_FNAME=jvm.dll\" \
48396        -D\"HS_INTERNAL_NAME=jvm\""
48397  fi
48398
48399
48400
48401  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48402    # silence copyright notice and other headers.
48403    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48404  fi
48405
48406
48407# Now we can test some aspects on the target using configure macros.
48408
48409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48410$as_echo_n "checking for ANSI C header files... " >&6; }
48411if ${ac_cv_header_stdc+:} false; then :
48412  $as_echo_n "(cached) " >&6
48413else
48414  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48415/* end confdefs.h.  */
48416#include <stdlib.h>
48417#include <stdarg.h>
48418#include <string.h>
48419#include <float.h>
48420
48421int
48422main ()
48423{
48424
48425  ;
48426  return 0;
48427}
48428_ACEOF
48429if ac_fn_cxx_try_compile "$LINENO"; then :
48430  ac_cv_header_stdc=yes
48431else
48432  ac_cv_header_stdc=no
48433fi
48434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48435
48436if test $ac_cv_header_stdc = yes; then
48437  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48438  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48439/* end confdefs.h.  */
48440#include <string.h>
48441
48442_ACEOF
48443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48444  $EGREP "memchr" >/dev/null 2>&1; then :
48445
48446else
48447  ac_cv_header_stdc=no
48448fi
48449rm -f conftest*
48450
48451fi
48452
48453if test $ac_cv_header_stdc = yes; then
48454  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48455  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48456/* end confdefs.h.  */
48457#include <stdlib.h>
48458
48459_ACEOF
48460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48461  $EGREP "free" >/dev/null 2>&1; then :
48462
48463else
48464  ac_cv_header_stdc=no
48465fi
48466rm -f conftest*
48467
48468fi
48469
48470if test $ac_cv_header_stdc = yes; then
48471  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48472  if test "$cross_compiling" = yes; then :
48473  :
48474else
48475  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48476/* end confdefs.h.  */
48477#include <ctype.h>
48478#include <stdlib.h>
48479#if ((' ' & 0x0FF) == 0x020)
48480# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48481# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48482#else
48483# define ISLOWER(c) \
48484		   (('a' <= (c) && (c) <= 'i') \
48485		     || ('j' <= (c) && (c) <= 'r') \
48486		     || ('s' <= (c) && (c) <= 'z'))
48487# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48488#endif
48489
48490#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48491int
48492main ()
48493{
48494  int i;
48495  for (i = 0; i < 256; i++)
48496    if (XOR (islower (i), ISLOWER (i))
48497	|| toupper (i) != TOUPPER (i))
48498      return 2;
48499  return 0;
48500}
48501_ACEOF
48502if ac_fn_cxx_try_run "$LINENO"; then :
48503
48504else
48505  ac_cv_header_stdc=no
48506fi
48507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48508  conftest.$ac_objext conftest.beam conftest.$ac_ext
48509fi
48510
48511fi
48512fi
48513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48514$as_echo "$ac_cv_header_stdc" >&6; }
48515if test $ac_cv_header_stdc = yes; then
48516
48517$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48518
48519fi
48520
48521# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48522for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48523		  inttypes.h stdint.h unistd.h
48524do :
48525  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48526ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48527"
48528if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48529  cat >>confdefs.h <<_ACEOF
48530#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48531_ACEOF
48532
48533fi
48534
48535done
48536
48537
48538
48539  ###############################################################################
48540  #
48541  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48542  # (The JVM can use 32 or 64 bit Java pointers but that decision
48543  # is made at runtime.)
48544  #
48545
48546  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48547    # Always specify -m flag on Solaris
48548    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48549
48550  # When we add flags to the "official" CFLAGS etc, we need to
48551  # keep track of these additions in ADDED_CFLAGS etc. These
48552  # will later be checked to make sure only controlled additions
48553  # have been made to CFLAGS etc.
48554  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48555  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48556  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48557
48558  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48559  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48560  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48561
48562  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48563  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48564  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48565
48566  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48567  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48568  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48569
48570  elif test "x$COMPILE_TYPE" = xreduced; then
48571    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48572      # Specify -m if running reduced on unix platforms
48573
48574  # When we add flags to the "official" CFLAGS etc, we need to
48575  # keep track of these additions in ADDED_CFLAGS etc. These
48576  # will later be checked to make sure only controlled additions
48577  # have been made to CFLAGS etc.
48578  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48579  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48580  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48581
48582  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48583  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48584  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48585
48586  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48587  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48588  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48589
48590  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48591  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48592  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48593
48594    fi
48595  fi
48596  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48597    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48598    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48599    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48600  fi
48601
48602  # Make compilation sanity check
48603  for ac_header in stdio.h
48604do :
48605  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48606if test "x$ac_cv_header_stdio_h" = xyes; then :
48607  cat >>confdefs.h <<_ACEOF
48608#define HAVE_STDIO_H 1
48609_ACEOF
48610
48611else
48612
48613    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48614$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48615    if test "x$COMPILE_TYPE" = xreduced; then
48616
48617  # Print a helpful message on how to acquire the necessary build dependency.
48618  # reduced is the help tag: freetype, cups, alsa etc
48619  MISSING_DEPENDENCY=reduced
48620
48621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48622    cygwin_help $MISSING_DEPENDENCY
48623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48624    msys_help $MISSING_DEPENDENCY
48625  else
48626    PKGHANDLER_COMMAND=
48627
48628    case $PKGHANDLER in
48629      apt-get)
48630        apt_help     $MISSING_DEPENDENCY ;;
48631      yum)
48632        yum_help     $MISSING_DEPENDENCY ;;
48633      port)
48634        port_help    $MISSING_DEPENDENCY ;;
48635      pkgutil)
48636        pkgutil_help $MISSING_DEPENDENCY ;;
48637      pkgadd)
48638        pkgadd_help  $MISSING_DEPENDENCY ;;
48639    esac
48640
48641    if test "x$PKGHANDLER_COMMAND" != x; then
48642      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48643    fi
48644  fi
48645
48646      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48647$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48648    elif test "x$COMPILE_TYPE" = xcross; then
48649      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48650$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48651    fi
48652    as_fn_error $? "Cannot continue." "$LINENO" 5
48653
48654fi
48655
48656done
48657
48658
48659  # The cast to long int works around a bug in the HP C Compiler
48660# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48661# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48662# This bug is HP SR number 8606223364.
48663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48664$as_echo_n "checking size of int *... " >&6; }
48665if ${ac_cv_sizeof_int_p+:} false; then :
48666  $as_echo_n "(cached) " >&6
48667else
48668  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48669
48670else
48671  if test "$ac_cv_type_int_p" = yes; then
48672     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48674as_fn_error 77 "cannot compute sizeof (int *)
48675See \`config.log' for more details" "$LINENO" 5; }
48676   else
48677     ac_cv_sizeof_int_p=0
48678   fi
48679fi
48680
48681fi
48682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48683$as_echo "$ac_cv_sizeof_int_p" >&6; }
48684
48685
48686
48687cat >>confdefs.h <<_ACEOF
48688#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48689_ACEOF
48690
48691
48692
48693  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48694  if test "x$ac_cv_sizeof_int_p" = x; then
48695    # The test failed, lets stick to the assumed value.
48696    { $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
48697$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48698  else
48699    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48700
48701    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48702      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48703      # Let's try to implicitely set the compilers target architecture and retry the test
48704      { $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
48705$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;}
48706      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48707$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48708
48709  # When we add flags to the "official" CFLAGS etc, we need to
48710  # keep track of these additions in ADDED_CFLAGS etc. These
48711  # will later be checked to make sure only controlled additions
48712  # have been made to CFLAGS etc.
48713  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48714  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48715  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48716
48717  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48718  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48719  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48720
48721  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48722  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48723  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48724
48725  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48726  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48727  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48728
48729
48730      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48731      unset ac_cv_sizeof_int_p
48732      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48733      cat >>confdefs.h <<_ACEOF
48734#undef SIZEOF_INT_P
48735_ACEOF
48736
48737      # The cast to long int works around a bug in the HP C Compiler
48738# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48739# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48740# This bug is HP SR number 8606223364.
48741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48742$as_echo_n "checking size of int *... " >&6; }
48743if ${ac_cv_sizeof_int_p+:} false; then :
48744  $as_echo_n "(cached) " >&6
48745else
48746  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48747
48748else
48749  if test "$ac_cv_type_int_p" = yes; then
48750     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48751$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48752as_fn_error 77 "cannot compute sizeof (int *)
48753See \`config.log' for more details" "$LINENO" 5; }
48754   else
48755     ac_cv_sizeof_int_p=0
48756   fi
48757fi
48758
48759fi
48760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48761$as_echo "$ac_cv_sizeof_int_p" >&6; }
48762
48763
48764
48765cat >>confdefs.h <<_ACEOF
48766#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48767_ACEOF
48768
48769
48770
48771      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48772
48773      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48774        { $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
48775$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;}
48776        if test "x$COMPILE_TYPE" = xreduced; then
48777
48778  # Print a helpful message on how to acquire the necessary build dependency.
48779  # reduced is the help tag: freetype, cups, alsa etc
48780  MISSING_DEPENDENCY=reduced
48781
48782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48783    cygwin_help $MISSING_DEPENDENCY
48784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48785    msys_help $MISSING_DEPENDENCY
48786  else
48787    PKGHANDLER_COMMAND=
48788
48789    case $PKGHANDLER in
48790      apt-get)
48791        apt_help     $MISSING_DEPENDENCY ;;
48792      yum)
48793        yum_help     $MISSING_DEPENDENCY ;;
48794      port)
48795        port_help    $MISSING_DEPENDENCY ;;
48796      pkgutil)
48797        pkgutil_help $MISSING_DEPENDENCY ;;
48798      pkgadd)
48799        pkgadd_help  $MISSING_DEPENDENCY ;;
48800    esac
48801
48802    if test "x$PKGHANDLER_COMMAND" != x; then
48803      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48804    fi
48805  fi
48806
48807          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48808$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48809        elif test "x$COMPILE_TYPE" = xcross; then
48810          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48811$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48812        fi
48813        as_fn_error $? "Cannot continue." "$LINENO" 5
48814      fi
48815    fi
48816  fi
48817
48818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48819$as_echo_n "checking for target address size... " >&6; }
48820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48821$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48822
48823
48824  ###############################################################################
48825  #
48826  # Is the target little of big endian?
48827  #
48828   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48829$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48830if ${ac_cv_c_bigendian+:} false; then :
48831  $as_echo_n "(cached) " >&6
48832else
48833  ac_cv_c_bigendian=unknown
48834    # See if we're dealing with a universal compiler.
48835    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48836/* end confdefs.h.  */
48837#ifndef __APPLE_CC__
48838	       not a universal capable compiler
48839	     #endif
48840	     typedef int dummy;
48841
48842_ACEOF
48843if ac_fn_cxx_try_compile "$LINENO"; then :
48844
48845	# Check for potential -arch flags.  It is not universal unless
48846	# there are at least two -arch flags with different values.
48847	ac_arch=
48848	ac_prev=
48849	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48850	 if test -n "$ac_prev"; then
48851	   case $ac_word in
48852	     i?86 | x86_64 | ppc | ppc64)
48853	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48854		 ac_arch=$ac_word
48855	       else
48856		 ac_cv_c_bigendian=universal
48857		 break
48858	       fi
48859	       ;;
48860	   esac
48861	   ac_prev=
48862	 elif test "x$ac_word" = "x-arch"; then
48863	   ac_prev=arch
48864	 fi
48865       done
48866fi
48867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48868    if test $ac_cv_c_bigendian = unknown; then
48869      # See if sys/param.h defines the BYTE_ORDER macro.
48870      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48871/* end confdefs.h.  */
48872#include <sys/types.h>
48873	     #include <sys/param.h>
48874
48875int
48876main ()
48877{
48878#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48879		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48880		     && LITTLE_ENDIAN)
48881	      bogus endian macros
48882	     #endif
48883
48884  ;
48885  return 0;
48886}
48887_ACEOF
48888if ac_fn_cxx_try_compile "$LINENO"; then :
48889  # It does; now see whether it defined to BIG_ENDIAN or not.
48890	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48891/* end confdefs.h.  */
48892#include <sys/types.h>
48893		#include <sys/param.h>
48894
48895int
48896main ()
48897{
48898#if BYTE_ORDER != BIG_ENDIAN
48899		 not big endian
48900		#endif
48901
48902  ;
48903  return 0;
48904}
48905_ACEOF
48906if ac_fn_cxx_try_compile "$LINENO"; then :
48907  ac_cv_c_bigendian=yes
48908else
48909  ac_cv_c_bigendian=no
48910fi
48911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48912fi
48913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48914    fi
48915    if test $ac_cv_c_bigendian = unknown; then
48916      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48917      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48918/* end confdefs.h.  */
48919#include <limits.h>
48920
48921int
48922main ()
48923{
48924#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48925	      bogus endian macros
48926	     #endif
48927
48928  ;
48929  return 0;
48930}
48931_ACEOF
48932if ac_fn_cxx_try_compile "$LINENO"; then :
48933  # It does; now see whether it defined to _BIG_ENDIAN or not.
48934	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48935/* end confdefs.h.  */
48936#include <limits.h>
48937
48938int
48939main ()
48940{
48941#ifndef _BIG_ENDIAN
48942		 not big endian
48943		#endif
48944
48945  ;
48946  return 0;
48947}
48948_ACEOF
48949if ac_fn_cxx_try_compile "$LINENO"; then :
48950  ac_cv_c_bigendian=yes
48951else
48952  ac_cv_c_bigendian=no
48953fi
48954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48955fi
48956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48957    fi
48958    if test $ac_cv_c_bigendian = unknown; then
48959      # Compile a test program.
48960      if test "$cross_compiling" = yes; then :
48961  # Try to guess by grepping values from an object file.
48962	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48963/* end confdefs.h.  */
48964short int ascii_mm[] =
48965		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48966		short int ascii_ii[] =
48967		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48968		int use_ascii (int i) {
48969		  return ascii_mm[i] + ascii_ii[i];
48970		}
48971		short int ebcdic_ii[] =
48972		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48973		short int ebcdic_mm[] =
48974		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48975		int use_ebcdic (int i) {
48976		  return ebcdic_mm[i] + ebcdic_ii[i];
48977		}
48978		extern int foo;
48979
48980int
48981main ()
48982{
48983return use_ascii (foo) == use_ebcdic (foo);
48984  ;
48985  return 0;
48986}
48987_ACEOF
48988if ac_fn_cxx_try_compile "$LINENO"; then :
48989  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48990	      ac_cv_c_bigendian=yes
48991	    fi
48992	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48993	      if test "$ac_cv_c_bigendian" = unknown; then
48994		ac_cv_c_bigendian=no
48995	      else
48996		# finding both strings is unlikely to happen, but who knows?
48997		ac_cv_c_bigendian=unknown
48998	      fi
48999	    fi
49000fi
49001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49002else
49003  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49004/* end confdefs.h.  */
49005$ac_includes_default
49006int
49007main ()
49008{
49009
49010	     /* Are we little or big endian?  From Harbison&Steele.  */
49011	     union
49012	     {
49013	       long int l;
49014	       char c[sizeof (long int)];
49015	     } u;
49016	     u.l = 1;
49017	     return u.c[sizeof (long int) - 1] == 1;
49018
49019  ;
49020  return 0;
49021}
49022_ACEOF
49023if ac_fn_cxx_try_run "$LINENO"; then :
49024  ac_cv_c_bigendian=no
49025else
49026  ac_cv_c_bigendian=yes
49027fi
49028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49029  conftest.$ac_objext conftest.beam conftest.$ac_ext
49030fi
49031
49032    fi
49033fi
49034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49035$as_echo "$ac_cv_c_bigendian" >&6; }
49036 case $ac_cv_c_bigendian in #(
49037   yes)
49038     ENDIAN="big";; #(
49039   no)
49040     ENDIAN="little" ;; #(
49041   universal)
49042     ENDIAN="universal_endianness"
49043     ;; #(
49044   *)
49045     ENDIAN="unknown" ;;
49046 esac
49047
49048
49049  if test "x$ENDIAN" = xuniversal_endianness; then
49050    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49051  fi
49052  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49053    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
49054  fi
49055
49056
49057# Configure flags for the tools
49058
49059  ###############################################################################
49060  #
49061  # How to compile shared libraries.
49062  #
49063
49064  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49065    PICFLAG="-fPIC"
49066    C_FLAG_REORDER=''
49067    CXX_FLAG_REORDER=''
49068
49069    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49070      # Linking is different on MacOSX
49071      if test "x$STATIC_BUILD" = xtrue; then
49072        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49073      else
49074        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49075        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49076      fi
49077      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49078      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49079      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49080      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49081    else
49082      # Default works for linux, might work on other platforms as well.
49083      SHARED_LIBRARY_FLAGS='-shared'
49084      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49085      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49086      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49087      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49088    fi
49089  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49090    C_FLAG_REORDER=''
49091    CXX_FLAG_REORDER=''
49092
49093    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49094      # Linking is different on MacOSX
49095      PICFLAG=''
49096      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49097      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49098      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49099      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49100      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49101
49102      if test "x$STATIC_BUILD" = xfalse; then
49103        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49104      fi
49105    else
49106      # Default works for linux, might work on other platforms as well.
49107      PICFLAG='-fPIC'
49108      SHARED_LIBRARY_FLAGS='-shared'
49109      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49110      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49111      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49112      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49113    fi
49114  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49115    PICFLAG="-KPIC"
49116    C_FLAG_REORDER='-xF'
49117    CXX_FLAG_REORDER='-xF'
49118    SHARED_LIBRARY_FLAGS="-G"
49119    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49120    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49121    SET_SHARED_LIBRARY_NAME='-h $1'
49122    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49123  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49124    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49125    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49126    # will have to patch this single instruction with a call to some out-of-order code which
49127    # does the load from the TOC. This is of course slow. But in that case we also would have
49128    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49129    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49130    # can be patched directly by the linker and does not require a jump to out-of-order code.
49131    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49132    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49133    # loads for accessing a global variable). But there are rumors that this may be seen as a
49134    # 'performance feature' because of improved code locality of the symbols used in a
49135    # compilation unit.
49136    PICFLAG="-qpic"
49137    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49138    C_FLAG_REORDER=''
49139    CXX_FLAG_REORDER=''
49140    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49141    SET_EXECUTABLE_ORIGIN=""
49142    SET_SHARED_LIBRARY_ORIGIN=''
49143    SET_SHARED_LIBRARY_NAME=''
49144    SET_SHARED_LIBRARY_MAPFILE=''
49145  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49146    PICFLAG=""
49147    C_FLAG_REORDER=''
49148    CXX_FLAG_REORDER=''
49149    SHARED_LIBRARY_FLAGS="-dll"
49150    SET_EXECUTABLE_ORIGIN=''
49151    SET_SHARED_LIBRARY_ORIGIN=''
49152    SET_SHARED_LIBRARY_NAME=''
49153    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49154  fi
49155
49156
49157
49158
49159
49160
49161
49162
49163
49164  # The (cross) compiler is now configured, we can now test capabilities
49165  # of the target platform.
49166
49167
49168
49169  ###############################################################################
49170  #
49171  # Setup the opt flags for different compilers
49172  # and different operating systems.
49173  #
49174
49175  # FIXME: this was indirectly the old default, but just inherited.
49176  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49177  #   C_FLAG_DEPS="-MMD -MF"
49178  # fi
49179
49180  # Generate make dependency files
49181  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49182    C_FLAG_DEPS="-MMD -MF"
49183  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49184    C_FLAG_DEPS="-MMD -MF"
49185  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49186    C_FLAG_DEPS="-xMMD -xMF"
49187  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49188    C_FLAG_DEPS="-qmakedep=gcc -MF"
49189  fi
49190  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49191
49192
49193
49194  # Debug symbols
49195  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49196    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49197      # reduce from default "-g2" option to save space
49198      CFLAGS_DEBUG_SYMBOLS="-g1"
49199      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49200    else
49201      CFLAGS_DEBUG_SYMBOLS="-g"
49202      CXXFLAGS_DEBUG_SYMBOLS="-g"
49203    fi
49204  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49205    CFLAGS_DEBUG_SYMBOLS="-g"
49206    CXXFLAGS_DEBUG_SYMBOLS="-g"
49207  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49208    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49209    # -g0 enables debug symbols without disabling inlining.
49210    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49211  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49212    CFLAGS_DEBUG_SYMBOLS="-g"
49213    CXXFLAGS_DEBUG_SYMBOLS="-g"
49214  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49215    CFLAGS_DEBUG_SYMBOLS="-Zi"
49216    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49217  fi
49218
49219
49220
49221  # Debug symbols for JVM_CFLAGS
49222  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49223    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49224    if test "x$DEBUG_LEVEL" = xslowdebug; then
49225      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49226    else
49227      # -g0 does not disable inlining, which -g does.
49228      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49229    fi
49230  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49231    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49232  else
49233    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49234  fi
49235
49236
49237  # bounds, memory and behavior checking options
49238  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49239    case $DEBUG_LEVEL in
49240    release )
49241      # no adjustment
49242      ;;
49243    fastdebug )
49244      # no adjustment
49245      ;;
49246    slowdebug )
49247      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49248      # get's added conditionally on whether we produce debug symbols or not.
49249      # This is most likely not really correct.
49250
49251      # Add runtime stack smashing and undefined behavior checks.
49252      # Not all versions of gcc support -fstack-protector
49253      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296    # Execute function body
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343
49344
49345    # Execute function body
49346
49347  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49348$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49349  supports=yes
49350
49351  saved_cflags="$CFLAGS"
49352  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49353  ac_ext=c
49354ac_cpp='$CPP $CPPFLAGS'
49355ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49356ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49357ac_compiler_gnu=$ac_cv_c_compiler_gnu
49358
49359  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49360/* end confdefs.h.  */
49361int i;
49362_ACEOF
49363if ac_fn_c_try_compile "$LINENO"; then :
49364
49365else
49366  supports=no
49367fi
49368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49369  ac_ext=cpp
49370ac_cpp='$CXXCPP $CPPFLAGS'
49371ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49372ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49373ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49374
49375  CFLAGS="$saved_cflags"
49376
49377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49378$as_echo "$supports" >&6; }
49379  if test "x$supports" = "xyes" ; then
49380    :
49381    C_COMP_SUPPORTS="yes"
49382  else
49383    :
49384    C_COMP_SUPPORTS="no"
49385  fi
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445    # Execute function body
49446
49447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49448$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49449  supports=yes
49450
49451  saved_cxxflags="$CXXFLAGS"
49452  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49453  ac_ext=cpp
49454ac_cpp='$CXXCPP $CPPFLAGS'
49455ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49456ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49457ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49458
49459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49460/* end confdefs.h.  */
49461int i;
49462_ACEOF
49463if ac_fn_cxx_try_compile "$LINENO"; then :
49464
49465else
49466  supports=no
49467fi
49468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49469  ac_ext=cpp
49470ac_cpp='$CXXCPP $CPPFLAGS'
49471ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49472ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49473ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49474
49475  CXXFLAGS="$saved_cxxflags"
49476
49477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49478$as_echo "$supports" >&6; }
49479  if test "x$supports" = "xyes" ; then
49480    :
49481    CXX_COMP_SUPPORTS="yes"
49482  else
49483    :
49484    CXX_COMP_SUPPORTS="no"
49485  fi
49486
49487
49488
49489
49490
49491
49492
49493
49494
49495
49496
49497
49498
49499  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49500$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49501  supports=no
49502  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49503
49504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49505$as_echo "$supports" >&6; }
49506  if test "x$supports" = "xyes" ; then
49507    :
49508
49509  else
49510    :
49511    STACK_PROTECTOR_CFLAG=""
49512  fi
49513
49514
49515
49516
49517
49518
49519
49520      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49521      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49522      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49523        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49524      fi
49525      ;;
49526    esac
49527  fi
49528
49529  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49530    if test "x$DEBUG_LEVEL" != xrelease; then
49531      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49532        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49533      fi
49534    fi
49535  fi
49536
49537  # Optimization levels
49538  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49539    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49540
49541    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49542      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49543      C_O_FLAG_HIGHEST_JVM="-xO4"
49544      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49545      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49546      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49547      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49548      C_O_FLAG_DEBUG_JVM=""
49549      C_O_FLAG_NONE="-xregs=no%frameptr"
49550      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49551      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49552      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49553      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49554      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49555      CXX_O_FLAG_DEBUG_JVM=""
49556      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49557      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49558        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49559        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49560      fi
49561    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49562      C_O_FLAG_HIGHEST_JVM="-xO4"
49563      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49564      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49565      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49566      C_O_FLAG_DEBUG=""
49567      C_O_FLAG_DEBUG_JVM=""
49568      C_O_FLAG_NONE=""
49569      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49570      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49571      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49572      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49573      CXX_O_FLAG_DEBUG=""
49574      CXX_O_FLAG_DEBUG_JVM=""
49575      CXX_O_FLAG_NONE=""
49576    fi
49577  else
49578    # The remaining toolchains share opt flags between CC and CXX;
49579    # setup for C and duplicate afterwards.
49580    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49581      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49582        # On MacOSX we optimize for size, something
49583        # we should do for all platforms?
49584        C_O_FLAG_HIGHEST_JVM="-Os"
49585        C_O_FLAG_HIGHEST="-Os"
49586        C_O_FLAG_HI="-Os"
49587        C_O_FLAG_NORM="-Os"
49588        C_O_FLAG_SIZE="-Os"
49589      else
49590        C_O_FLAG_HIGHEST_JVM="-O3"
49591        C_O_FLAG_HIGHEST="-O3"
49592        C_O_FLAG_HI="-O3"
49593        C_O_FLAG_NORM="-O2"
49594        C_O_FLAG_SIZE="-Os"
49595      fi
49596      C_O_FLAG_DEBUG="-O0"
49597      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49598        C_O_FLAG_DEBUG_JVM=""
49599      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49600        C_O_FLAG_DEBUG_JVM="-O0"
49601      fi
49602      C_O_FLAG_NONE="-O0"
49603    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49604      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49605        # On MacOSX we optimize for size, something
49606        # we should do for all platforms?
49607        C_O_FLAG_HIGHEST_JVM="-Os"
49608        C_O_FLAG_HIGHEST="-Os"
49609        C_O_FLAG_HI="-Os"
49610        C_O_FLAG_NORM="-Os"
49611        C_O_FLAG_SIZE="-Os"
49612      else
49613        C_O_FLAG_HIGHEST_JVM="-O3"
49614        C_O_FLAG_HIGHEST="-O3"
49615        C_O_FLAG_HI="-O3"
49616        C_O_FLAG_NORM="-O2"
49617        C_O_FLAG_SIZE="-Os"
49618      fi
49619      C_O_FLAG_DEBUG="-O0"
49620      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49621        C_O_FLAG_DEBUG_JVM=""
49622      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49623        C_O_FLAG_DEBUG_JVM="-O0"
49624      fi
49625      C_O_FLAG_NONE="-O0"
49626    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49627      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49628      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49629      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49630      C_O_FLAG_NORM="-O2"
49631      C_O_FLAG_DEBUG="-qnoopt"
49632      # FIXME: Value below not verified.
49633      C_O_FLAG_DEBUG_JVM=""
49634      C_O_FLAG_NONE="-qnoopt"
49635    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49636      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49637      C_O_FLAG_HIGHEST="-O2"
49638      C_O_FLAG_HI="-O1"
49639      C_O_FLAG_NORM="-O1"
49640      C_O_FLAG_DEBUG="-Od"
49641      C_O_FLAG_DEBUG_JVM=""
49642      C_O_FLAG_NONE="-Od"
49643      C_O_FLAG_SIZE="-Os"
49644    fi
49645    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49646    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49647    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49648    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49649    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49650    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49651    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49652    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49653  fi
49654
49655  # Adjust optimization flags according to debug level.
49656  case $DEBUG_LEVEL in
49657    release )
49658      # no adjustment
49659      ;;
49660    fastdebug )
49661      # Not quite so much optimization
49662      C_O_FLAG_HI="$C_O_FLAG_NORM"
49663      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49664      ;;
49665    slowdebug )
49666      # Disable optimization
49667      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49668      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49669      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49670      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49671      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49672      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49673      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49674      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49675      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49676      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49677      ;;
49678  esac
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697
49698  # Special extras...
49699  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49700    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49701      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49702      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49703    fi
49704    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49705    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49706  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49707    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49708    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49709  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49710    CXXSTD_CXXFLAG="-std=gnu++98"
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744
49745
49746
49747
49748
49749
49750
49751
49752
49753    # Execute function body
49754
49755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49756$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49757  supports=yes
49758
49759  saved_cxxflags="$CXXFLAGS"
49760  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49761  ac_ext=cpp
49762ac_cpp='$CXXCPP $CPPFLAGS'
49763ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49764ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49765ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49766
49767  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49768/* end confdefs.h.  */
49769int i;
49770_ACEOF
49771if ac_fn_cxx_try_compile "$LINENO"; then :
49772
49773else
49774  supports=no
49775fi
49776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49777  ac_ext=cpp
49778ac_cpp='$CXXCPP $CPPFLAGS'
49779ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49780ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49781ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49782
49783  CXXFLAGS="$saved_cxxflags"
49784
49785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49786$as_echo "$supports" >&6; }
49787  if test "x$supports" = "xyes" ; then
49788    :
49789
49790  else
49791    :
49792    CXXSTD_CXXFLAG=""
49793  fi
49794
49795
49796
49797
49798
49799
49800
49801
49802
49803
49804
49805
49806    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49807    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49808
49809  fi
49810  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49811    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49812    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49813  fi
49814
49815  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49816    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49817    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49818  fi
49819
49820  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49821  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49822  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49823
49824  ###############################################################################
49825  #
49826  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49827  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49828  #
49829
49830  # Setup compiler/platform specific flags into
49831  #    CFLAGS_JDK    - C Compiler flags
49832  #    CXXFLAGS_JDK  - C++ Compiler flags
49833  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49834  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49835    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49836    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49837    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49838    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49839      # Force compatibility with i586 on 32 bit intel platforms.
49840      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49841      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49842    fi
49843    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49844        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49845    case $OPENJDK_TARGET_CPU_ARCH in
49846      arm )
49847        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49848        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49849        ;;
49850      ppc )
49851        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49852        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49853        ;;
49854      * )
49855        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49856        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49857        ;;
49858    esac
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913    # Execute function body
49914
49915  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49916  REFERENCE_VERSION=6
49917
49918  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49919    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49920  fi
49921
49922  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49923    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49924  fi
49925
49926  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49927  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49928
49929  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49930    :
49931
49932  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49933  # runs afoul of the more aggressive versions of these optimisations.
49934  # Notably, value range propagation now assumes that the this pointer of C++
49935  # member functions is non-null.
49936  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49937        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49938        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49939$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49940  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49941  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49942
49943  else
49944    :
49945
49946  fi
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960
49961  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49962    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49963
49964    # Restrict the debug information created by Clang to avoid
49965    # too big object files and speed the build up a little bit
49966    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49967    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49968    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49969      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49970        # Force compatibility with i586 on 32 bit intel platforms.
49971        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49972        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49973      fi
49974      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49975      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49976          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49977      case $OPENJDK_TARGET_CPU_ARCH in
49978        ppc )
49979          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49980          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49981          ;;
49982        * )
49983          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49984          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49985          ;;
49986      esac
49987    fi
49988  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49989    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49990    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49991    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49992      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49993    fi
49994
49995    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49996    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49997  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49998    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49999    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50000    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50001  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50002    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50003        -MD -Zc:wchar_t- -W3 -wd4800 \
50004        -DWIN32_LEAN_AND_MEAN \
50005        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50006        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50007        -DWIN32 -DIAL"
50008    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50009      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50010    else
50011      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50012    fi
50013    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50014    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50015    # studio.
50016    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50017      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50018      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50019      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50020    fi
50021  fi
50022
50023  ###############################################################################
50024
50025  # Adjust flags according to debug level.
50026  case $DEBUG_LEVEL in
50027    fastdebug | slowdebug )
50028      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50029      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50030      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50031      ;;
50032    release )
50033      ;;
50034    * )
50035      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50036      ;;
50037  esac
50038
50039  # Set some common defines. These works for all compilers, but assume
50040  # -D is universally accepted.
50041
50042  # Setup endianness
50043  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50044    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50045    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50046    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50047    #   Note: -Dmacro         is the same as    #define macro 1
50048    #         -Dmacro=        is the same as    #define macro
50049    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50050      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50051    else
50052      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50053    fi
50054  else
50055    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50056    # are defined in the system?
50057    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50058      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50059    else
50060      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50061    fi
50062  fi
50063
50064  # Setup target OS define. Use OS target name but in upper case.
50065  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50066  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50067
50068  # Setup target CPU
50069  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50070      $OPENJDK_TARGET_ADD_LP64 \
50071      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50072
50073  # Setup debug/release defines
50074  if test "x$DEBUG_LEVEL" = xrelease; then
50075    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50076    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50077      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50078    fi
50079  else
50080    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50081  fi
50082
50083  # Set some additional per-OS defines.
50084  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50085    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50086    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50087        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50088  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50089    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50090    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50091        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50092  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50093    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50094    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50095    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50096    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50097        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50098        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50099        -fno-omit-frame-pointer"
50100  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50101    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50102    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50103    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50104        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50105        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50106  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50107    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50108  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50109    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50110    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50111  fi
50112
50113  # Set some additional per-CPU defines.
50114  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50115    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50116  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50117    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50118  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50119    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50120      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50121      # fixes `relocation truncated to fit' error for gcc 4.1.
50122      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50123      # Use ppc64 instructions, but schedule for power5
50124      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50125    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50126      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50127    fi
50128  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50129    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50130      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50131      # Little endian machine uses ELFv2 ABI.
50132      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50133      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50134      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50135    fi
50136  fi
50137
50138  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50139    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50140  fi
50141
50142  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50143    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50144      # Solaris does not have _LP64=1 in the old build.
50145      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50146      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50147    fi
50148  fi
50149
50150  # Set JVM_CFLAGS warning handling
50151  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50152    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50153        -Wunused-value -Woverloaded-virtual"
50154
50155    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50156
50157
50158
50159
50160
50161
50162
50163
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209
50210    # Execute function body
50211
50212  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50213  REFERENCE_VERSION=4.8
50214
50215  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50216    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50217  fi
50218
50219  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50220    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50221  fi
50222
50223  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50224  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50225
50226  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50227    :
50228
50229            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50230            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50231
50232
50233  else
50234    :
50235
50236  fi
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251    fi
50252    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50253      # Non-zero builds have stricter warnings
50254      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50255    else
50256      if test "x$TOOLCHAIN_TYPE" = xclang; then
50257        # Some versions of llvm do not like -Wundef
50258        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50259      fi
50260    fi
50261  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50262    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50263        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50264  fi
50265
50266  # Additional macosx handling
50267  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50268    # Setting these parameters makes it an error to link to macosx APIs that are
50269    # newer than the given OS version and makes the linked binaries compatible
50270    # even if built on a newer version of the OS.
50271    # The expected format is X.Y.Z
50272    MACOSX_VERSION_MIN=10.7.0
50273
50274
50275    # The macro takes the version with no dots, ex: 1070
50276    # Let the flags variables get resolved in make for easier override on make
50277    # command line.
50278    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50279    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50280  fi
50281
50282  # Setup some hard coded includes
50283  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50284      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50285      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50286      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50287      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50288      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50289
50290  # The shared libraries are compiled using the picflag.
50291  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50292      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50293  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50294      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50295
50296  # Executable flags
50297  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50298  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50299
50300
50301
50302
50303
50304
50305  # Setup LDFLAGS et al.
50306  #
50307
50308  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50309    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50310    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50311    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50312    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50313      LDFLAGS_SAFESH="-safeseh"
50314      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50315      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50316      # NOTE: Old build added -machine. Probably not needed.
50317      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50318    else
50319      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50320    fi
50321  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50322      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50323      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50324        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50325        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50326    fi
50327  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50328    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50329    # We have previously set HAS_GNU_HASH if this is the case
50330    if test -n "$HAS_GNU_HASH"; then
50331      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50332      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50333      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50334    fi
50335      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50336        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50337    fi
50338    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50339      # And since we now know that the linker is gnu, then add -z defs, to forbid
50340      # undefined symbols in object files.
50341      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50342      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50343      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50344      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50345      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50346      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50347        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50348      fi
50349      case $DEBUG_LEVEL in
50350        release )
50351          # tell linker to optimize libraries.
50352          # Should this be supplied to the OSS linker as well?
50353          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50354          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50355          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50356          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50357            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50358          fi
50359          ;;
50360        slowdebug )
50361          # Hotspot always let the linker optimize
50362          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50363          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50364            # do relocations at load
50365            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50366            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50367            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50368          fi
50369          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50370            # mark relocations read only
50371            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50372            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50373            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50374          fi
50375          ;;
50376        fastdebug )
50377          # Hotspot always let the linker optimize
50378          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50379          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50380            # mark relocations read only
50381            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50382            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50383            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50384          fi
50385          ;;
50386        * )
50387          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50388          ;;
50389        esac
50390    fi
50391  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50392    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50393    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50394    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50395    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50396    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50397    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50398      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50399    fi
50400  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50401    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50402    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50403    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50404  fi
50405
50406  # Customize LDFLAGS for executables
50407
50408  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50409
50410  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50411    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50412      LDFLAGS_STACK_SIZE=1048576
50413    else
50414      LDFLAGS_STACK_SIZE=327680
50415    fi
50416    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50417  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50418    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50419  fi
50420
50421  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50422
50423  # Customize LDFLAGS for libs
50424  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50425
50426  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50427  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50428    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50429        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50430    JDKLIB_LIBS=""
50431  else
50432    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50433        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50434
50435    if test "xTARGET" = "xTARGET"; then
50436    # On some platforms (mac) the linker warns about non existing -L dirs.
50437    # Add server first if available. Linking aginst client does not always produce the same results.
50438      # Only add client/minimal dir if client/minimal is being built.
50439    # Default to server for other variants.
50440      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50441        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50442      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50443        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50444      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50445        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50446    else
50447        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50448    fi
50449    elif test "xTARGET" = "xBUILD"; then
50450      # When building a buildjdk, it's always only the server variant
50451      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50452          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50453    fi
50454
50455    JDKLIB_LIBS="-ljava -ljvm"
50456    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50457      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50458    fi
50459
50460  fi
50461
50462LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50463
50464  # Set JVM_LIBS (per os)
50465  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50466    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50467  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50468    # FIXME: This hard-coded path is not really proper.
50469    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50470      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50471    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50472      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50473    fi
50474    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50475        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50476  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50477    JVM_LIBS="$JVM_LIBS -lm"
50478  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50479    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50480  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50481    JVM_LIBS="$JVM_LIBS -lm"
50482  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50483    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50484        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50485        wsock32.lib winmm.lib version.lib psapi.lib"
50486    fi
50487
50488  # Set JVM_ASFLAGS
50489  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50490    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50491      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50492    fi
50493  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50494    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50495  fi
50496
50497  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50498
50499
50500
50501
50502
50503
50504
50505
50506
50507
50508
50509
50510
50511
50512
50513  # Special extras...
50514  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50515    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50516      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50517      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50518    fi
50519    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50520    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50521  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50522    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50523    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50524  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50525    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558
50559
50560
50561
50562
50563
50564
50565
50566
50567
50568    # Execute function body
50569
50570  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50571$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50572  supports=yes
50573
50574  saved_cxxflags="$CXXFLAGS"
50575  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50576  ac_ext=cpp
50577ac_cpp='$CXXCPP $CPPFLAGS'
50578ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50579ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50580ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50581
50582  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50583/* end confdefs.h.  */
50584int i;
50585_ACEOF
50586if ac_fn_cxx_try_compile "$LINENO"; then :
50587
50588else
50589  supports=no
50590fi
50591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50592  ac_ext=cpp
50593ac_cpp='$CXXCPP $CPPFLAGS'
50594ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50595ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50596ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50597
50598  CXXFLAGS="$saved_cxxflags"
50599
50600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50601$as_echo "$supports" >&6; }
50602  if test "x$supports" = "xyes" ; then
50603    :
50604
50605  else
50606    :
50607    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50608  fi
50609
50610
50611
50612
50613
50614
50615
50616
50617
50618
50619
50620
50621    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50622    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50623
50624  fi
50625  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50626    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50627    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50628  fi
50629
50630  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50631    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50632    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50633  fi
50634
50635  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50636  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50637  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50638
50639  ###############################################################################
50640  #
50641  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50642  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50643  #
50644
50645  # Setup compiler/platform specific flags into
50646  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50647  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50648  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50649  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50650    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50651    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50652    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50653    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50654      # Force compatibility with i586 on 32 bit intel platforms.
50655      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50656      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50657    fi
50658    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50659        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50660    case $OPENJDK_BUILD_CPU_ARCH in
50661      arm )
50662        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50663        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50664        ;;
50665      ppc )
50666        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50667        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50668        ;;
50669      * )
50670        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50671        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50672        ;;
50673    esac
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728    # Execute function body
50729
50730  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50731  REFERENCE_VERSION=6
50732
50733  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50734    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50735  fi
50736
50737  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50738    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50739  fi
50740
50741  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50742  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50743
50744  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50745    :
50746
50747  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50748  # runs afoul of the more aggressive versions of these optimisations.
50749  # Notably, value range propagation now assumes that the this pointer of C++
50750  # member functions is non-null.
50751  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50752        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50753        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50754$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50755  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50756  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50757
50758  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50759  # runs afoul of the more aggressive versions of these optimisations.
50760  # Notably, value range propagation now assumes that the this pointer of C++
50761  # member functions is non-null.
50762  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50763        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50764        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50765$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50766  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50767  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50768
50769  else
50770    :
50771
50772  fi
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784
50785
50786
50787  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50788    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50789
50790    # Restrict the debug information created by Clang to avoid
50791    # too big object files and speed the build up a little bit
50792    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50793    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50794    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50795      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50796        # Force compatibility with i586 on 32 bit intel platforms.
50797        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50798        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50799      fi
50800      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50801      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50802          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50803      case $OPENJDK_BUILD_CPU_ARCH in
50804        ppc )
50805          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50806          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50807          ;;
50808        * )
50809          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50810          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50811          ;;
50812      esac
50813    fi
50814  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50815    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50816    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50817    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50818      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50819    fi
50820
50821    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50822    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50823  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50824    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50825    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50826    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50827  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50828    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50829        -MD -Zc:wchar_t- -W3 -wd4800 \
50830        -DWIN32_LEAN_AND_MEAN \
50831        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50832        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50833        -DWIN32 -DIAL"
50834    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50835      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50836    else
50837      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50838    fi
50839    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50840    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50841    # studio.
50842    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50843      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50844      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50845      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50846    fi
50847  fi
50848
50849  ###############################################################################
50850
50851  # Adjust flags according to debug level.
50852  case $DEBUG_LEVEL in
50853    fastdebug | slowdebug )
50854      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50855      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50856      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50857      ;;
50858    release )
50859      ;;
50860    * )
50861      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50862      ;;
50863  esac
50864
50865  # Set some common defines. These works for all compilers, but assume
50866  # -D is universally accepted.
50867
50868  # Setup endianness
50869  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50870    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50871    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50872    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50873    #   Note: -Dmacro         is the same as    #define macro 1
50874    #         -Dmacro=        is the same as    #define macro
50875    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50876      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50877    else
50878      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50879    fi
50880  else
50881    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50882    # are defined in the system?
50883    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50884      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50885    else
50886      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50887    fi
50888  fi
50889
50890  # Setup target OS define. Use OS target name but in upper case.
50891  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50892  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50893
50894  # Setup target CPU
50895  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50896      $OPENJDK_BUILD_ADD_LP64 \
50897      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50898
50899  # Setup debug/release defines
50900  if test "x$DEBUG_LEVEL" = xrelease; then
50901    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50902    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50903      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50904    fi
50905  else
50906    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50907  fi
50908
50909  # Set some additional per-OS defines.
50910  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50911    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50912    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50913        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50914  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50915    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50916    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50917        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50918  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50919    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50920    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50921    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50922    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50923        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50924        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50925        -fno-omit-frame-pointer"
50926  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50927    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50928    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50929    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50930        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50931        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50932  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50933    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50934  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50935    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50936    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50937  fi
50938
50939  # Set some additional per-CPU defines.
50940  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50941    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50942  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50943    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50944  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50945    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50946      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50947      # fixes `relocation truncated to fit' error for gcc 4.1.
50948      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50949      # Use ppc64 instructions, but schedule for power5
50950      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50951    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50952      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50953    fi
50954  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50955    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50956      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50957      # Little endian machine uses ELFv2 ABI.
50958      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50959      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50960      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50961    fi
50962  fi
50963
50964  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50965    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50966  fi
50967
50968  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50969    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50970      # Solaris does not have _LP64=1 in the old build.
50971      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50972      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50973    fi
50974  fi
50975
50976  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50977  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50978    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50979        -Wunused-value -Woverloaded-virtual"
50980
50981    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035
51036    # Execute function body
51037
51038  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51039  REFERENCE_VERSION=4.8
51040
51041  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51042    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51043  fi
51044
51045  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51046    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51047  fi
51048
51049  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51050  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51051
51052  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51053    :
51054
51055            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51056            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51057
51058
51059  else
51060    :
51061
51062  fi
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077    fi
51078    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51079      # Non-zero builds have stricter warnings
51080      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51081    else
51082      if test "x$TOOLCHAIN_TYPE" = xclang; then
51083        # Some versions of llvm do not like -Wundef
51084        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51085      fi
51086    fi
51087  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51088    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51089        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51090  fi
51091
51092  # Additional macosx handling
51093  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51094    # Setting these parameters makes it an error to link to macosx APIs that are
51095    # newer than the given OS version and makes the linked binaries compatible
51096    # even if built on a newer version of the OS.
51097    # The expected format is X.Y.Z
51098    MACOSX_VERSION_MIN=10.7.0
51099
51100
51101    # The macro takes the version with no dots, ex: 1070
51102    # Let the flags variables get resolved in make for easier override on make
51103    # command line.
51104    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51105    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51106  fi
51107
51108  # Setup some hard coded includes
51109  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51110      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51111      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51112      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51113      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51114      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51115
51116  # The shared libraries are compiled using the picflag.
51117  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51118      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51119  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51120      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51121
51122  # Executable flags
51123  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51124  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51125
51126
51127
51128
51129
51130
51131  # Setup LDFLAGS et al.
51132  #
51133
51134  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51135    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51136    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51137    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51138    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51139      LDFLAGS_SAFESH="-safeseh"
51140      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51141      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51142      # NOTE: Old build added -machine. Probably not needed.
51143      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51144    else
51145      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51146    fi
51147  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51148      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51149      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51150        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51151        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51152    fi
51153  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51154    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51155    # We have previously set HAS_GNU_HASH if this is the case
51156    if test -n "$HAS_GNU_HASH"; then
51157      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51158      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51159      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51160    fi
51161      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51162        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51163    fi
51164    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51165      # And since we now know that the linker is gnu, then add -z defs, to forbid
51166      # undefined symbols in object files.
51167      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51168      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51169      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51170      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51171      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51172      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51173        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51174      fi
51175      case $DEBUG_LEVEL in
51176        release )
51177          # tell linker to optimize libraries.
51178          # Should this be supplied to the OSS linker as well?
51179          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51180          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51181          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51182          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51183            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51184          fi
51185          ;;
51186        slowdebug )
51187          # Hotspot always let the linker optimize
51188          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51189          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51190            # do relocations at load
51191            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51192            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51193            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51194          fi
51195          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51196            # mark relocations read only
51197            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51198            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51199            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51200          fi
51201          ;;
51202        fastdebug )
51203          # Hotspot always let the linker optimize
51204          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51205          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51206            # mark relocations read only
51207            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51208            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51209            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51210          fi
51211          ;;
51212        * )
51213          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51214          ;;
51215        esac
51216    fi
51217  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51218    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51219    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51220    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51221    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51222    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51223    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51224      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51225    fi
51226  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51227    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51228    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51229    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51230  fi
51231
51232  # Customize LDFLAGS for executables
51233
51234  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51235
51236  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51237    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51238      LDFLAGS_STACK_SIZE=1048576
51239    else
51240      LDFLAGS_STACK_SIZE=327680
51241    fi
51242    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51243  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51244    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51245  fi
51246
51247  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51248
51249  # Customize LDFLAGS for libs
51250  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51251
51252  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51253  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51254    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51255        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51256    OPENJDK_BUILD_JDKLIB_LIBS=""
51257  else
51258    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51259        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51260
51261    if test "xBUILD" = "xTARGET"; then
51262    # On some platforms (mac) the linker warns about non existing -L dirs.
51263    # Add server first if available. Linking aginst client does not always produce the same results.
51264      # Only add client/minimal dir if client/minimal is being built.
51265    # Default to server for other variants.
51266      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51267        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51268      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51269        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51270      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51271        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51272    else
51273        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51274    fi
51275    elif test "xBUILD" = "xBUILD"; then
51276      # When building a buildjdk, it's always only the server variant
51277      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51278          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51279    fi
51280
51281    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51282    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51283      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51284    fi
51285
51286  fi
51287
51288OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51289
51290  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51291  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51292    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51293  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51294    # FIXME: This hard-coded path is not really proper.
51295    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51296      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51297    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51298      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51299    fi
51300    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51301        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51302  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51303    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51304  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51305    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51306  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51307    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51308  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51309    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51310        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51311        wsock32.lib winmm.lib version.lib psapi.lib"
51312    fi
51313
51314  # Set OPENJDK_BUILD_JVM_ASFLAGS
51315  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51316    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51317      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51318    fi
51319  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51320    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51321  fi
51322
51323  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339  # Tests are only ever compiled for TARGET
51340  # Flags for compiling test libraries
51341  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51342  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51343
51344  # Flags for compiling test executables
51345  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51346  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51347
51348
51349
51350
51351
51352
51353  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51354  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51355
51356
51357
51358
51359
51360
51361  # Some Zero and Shark settings.
51362  # ZERO_ARCHFLAG tells the compiler which mode to build for
51363  case "${OPENJDK_TARGET_CPU}" in
51364    s390)
51365      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51366      ;;
51367    *)
51368      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51369  esac
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412    # Execute function body
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461    # Execute function body
51462
51463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51464$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51465  supports=yes
51466
51467  saved_cflags="$CFLAGS"
51468  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51469  ac_ext=c
51470ac_cpp='$CPP $CPPFLAGS'
51471ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51472ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51473ac_compiler_gnu=$ac_cv_c_compiler_gnu
51474
51475  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51476/* end confdefs.h.  */
51477int i;
51478_ACEOF
51479if ac_fn_c_try_compile "$LINENO"; then :
51480
51481else
51482  supports=no
51483fi
51484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51485  ac_ext=cpp
51486ac_cpp='$CXXCPP $CPPFLAGS'
51487ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51488ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51489ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51490
51491  CFLAGS="$saved_cflags"
51492
51493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51494$as_echo "$supports" >&6; }
51495  if test "x$supports" = "xyes" ; then
51496    :
51497    C_COMP_SUPPORTS="yes"
51498  else
51499    :
51500    C_COMP_SUPPORTS="no"
51501  fi
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561    # Execute function body
51562
51563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51564$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51565  supports=yes
51566
51567  saved_cxxflags="$CXXFLAGS"
51568  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51569  ac_ext=cpp
51570ac_cpp='$CXXCPP $CPPFLAGS'
51571ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51572ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51573ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51574
51575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51576/* end confdefs.h.  */
51577int i;
51578_ACEOF
51579if ac_fn_cxx_try_compile "$LINENO"; then :
51580
51581else
51582  supports=no
51583fi
51584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51585  ac_ext=cpp
51586ac_cpp='$CXXCPP $CPPFLAGS'
51587ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51588ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51589ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51590
51591  CXXFLAGS="$saved_cxxflags"
51592
51593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51594$as_echo "$supports" >&6; }
51595  if test "x$supports" = "xyes" ; then
51596    :
51597    CXX_COMP_SUPPORTS="yes"
51598  else
51599    :
51600    CXX_COMP_SUPPORTS="no"
51601  fi
51602
51603
51604
51605
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51616$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51617  supports=no
51618  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51619
51620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51621$as_echo "$supports" >&6; }
51622  if test "x$supports" = "xyes" ; then
51623    :
51624
51625  else
51626    :
51627    ZERO_ARCHFLAG=""
51628  fi
51629
51630
51631
51632
51633
51634
51635
51636
51637  # Check that the compiler supports -mX (or -qX on AIX) flags
51638  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686    # Execute function body
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735    # Execute function body
51736
51737  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51738$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51739  supports=yes
51740
51741  saved_cflags="$CFLAGS"
51742  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51743  ac_ext=c
51744ac_cpp='$CPP $CPPFLAGS'
51745ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51746ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51747ac_compiler_gnu=$ac_cv_c_compiler_gnu
51748
51749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51750/* end confdefs.h.  */
51751int i;
51752_ACEOF
51753if ac_fn_c_try_compile "$LINENO"; then :
51754
51755else
51756  supports=no
51757fi
51758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51759  ac_ext=cpp
51760ac_cpp='$CXXCPP $CPPFLAGS'
51761ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51762ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51763ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51764
51765  CFLAGS="$saved_cflags"
51766
51767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51768$as_echo "$supports" >&6; }
51769  if test "x$supports" = "xyes" ; then
51770    :
51771    C_COMP_SUPPORTS="yes"
51772  else
51773    :
51774    C_COMP_SUPPORTS="no"
51775  fi
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835    # Execute function body
51836
51837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51838$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51839  supports=yes
51840
51841  saved_cxxflags="$CXXFLAGS"
51842  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51843  ac_ext=cpp
51844ac_cpp='$CXXCPP $CPPFLAGS'
51845ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51846ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51847ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51848
51849  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51850/* end confdefs.h.  */
51851int i;
51852_ACEOF
51853if ac_fn_cxx_try_compile "$LINENO"; then :
51854
51855else
51856  supports=no
51857fi
51858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51859  ac_ext=cpp
51860ac_cpp='$CXXCPP $CPPFLAGS'
51861ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51862ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51863ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51864
51865  CXXFLAGS="$saved_cxxflags"
51866
51867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51868$as_echo "$supports" >&6; }
51869  if test "x$supports" = "xyes" ; then
51870    :
51871    CXX_COMP_SUPPORTS="yes"
51872  else
51873    :
51874    CXX_COMP_SUPPORTS="no"
51875  fi
51876
51877
51878
51879
51880
51881
51882
51883
51884
51885
51886
51887
51888
51889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51890$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51891  supports=no
51892  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51893
51894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51895$as_echo "$supports" >&6; }
51896  if test "x$supports" = "xyes" ; then
51897    :
51898    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51899  else
51900    :
51901    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51902  fi
51903
51904
51905
51906
51907
51908
51909
51910
51911  # Check whether --enable-warnings-as-errors was given.
51912if test "${enable_warnings_as_errors+set}" = set; then :
51913  enableval=$enable_warnings_as_errors;
51914fi
51915
51916
51917  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51918$as_echo_n "checking if native warnings are errors... " >&6; }
51919  if test "x$enable_warnings_as_errors" = "xyes"; then
51920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51921$as_echo "yes (explicitely set)" >&6; }
51922    WARNINGS_AS_ERRORS=true
51923  elif test "x$enable_warnings_as_errors" = "xno"; then
51924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51925$as_echo "no" >&6; }
51926    WARNINGS_AS_ERRORS=false
51927  elif test "x$enable_warnings_as_errors" = "x"; then
51928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51929$as_echo "yes (default)" >&6; }
51930    WARNINGS_AS_ERRORS=true
51931  else
51932    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51933  fi
51934
51935  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51936    # Set legacy hotspot variable
51937    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51938  else
51939    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51940  fi
51941
51942
51943
51944
51945  case "${TOOLCHAIN_TYPE}" in
51946    microsoft)
51947      DISABLE_WARNING_PREFIX="-wd"
51948      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51949      ;;
51950    solstudio)
51951      DISABLE_WARNING_PREFIX="-erroff="
51952      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51953      ;;
51954    gcc)
51955      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003    # Execute function body
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052    # Execute function body
52053
52054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52055$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52056  supports=yes
52057
52058  saved_cflags="$CFLAGS"
52059  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52060  ac_ext=c
52061ac_cpp='$CPP $CPPFLAGS'
52062ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52063ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52064ac_compiler_gnu=$ac_cv_c_compiler_gnu
52065
52066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52067/* end confdefs.h.  */
52068int i;
52069_ACEOF
52070if ac_fn_c_try_compile "$LINENO"; then :
52071
52072else
52073  supports=no
52074fi
52075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52076  ac_ext=cpp
52077ac_cpp='$CXXCPP $CPPFLAGS'
52078ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52079ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52080ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52081
52082  CFLAGS="$saved_cflags"
52083
52084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52085$as_echo "$supports" >&6; }
52086  if test "x$supports" = "xyes" ; then
52087    :
52088    C_COMP_SUPPORTS="yes"
52089  else
52090    :
52091    C_COMP_SUPPORTS="no"
52092  fi
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152    # Execute function body
52153
52154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52155$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52156  supports=yes
52157
52158  saved_cxxflags="$CXXFLAGS"
52159  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52160  ac_ext=cpp
52161ac_cpp='$CXXCPP $CPPFLAGS'
52162ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52163ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52164ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52165
52166  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52167/* end confdefs.h.  */
52168int i;
52169_ACEOF
52170if ac_fn_cxx_try_compile "$LINENO"; then :
52171
52172else
52173  supports=no
52174fi
52175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52176  ac_ext=cpp
52177ac_cpp='$CXXCPP $CPPFLAGS'
52178ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52179ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52180ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52181
52182  CXXFLAGS="$saved_cxxflags"
52183
52184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52185$as_echo "$supports" >&6; }
52186  if test "x$supports" = "xyes" ; then
52187    :
52188    CXX_COMP_SUPPORTS="yes"
52189  else
52190    :
52191    CXX_COMP_SUPPORTS="no"
52192  fi
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52207$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52208  supports=no
52209  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52210
52211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52212$as_echo "$supports" >&6; }
52213  if test "x$supports" = "xyes" ; then
52214    :
52215    GCC_CAN_DISABLE_WARNINGS=true
52216  else
52217    :
52218    GCC_CAN_DISABLE_WARNINGS=false
52219
52220  fi
52221
52222
52223
52224
52225
52226
52227      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52228        DISABLE_WARNING_PREFIX="-Wno-"
52229      else
52230        DISABLE_WARNING_PREFIX=
52231      fi
52232      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52233      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52234      # CFLAGS since any target specific flags will likely not work with the
52235      # build compiler
52236      CC_OLD="$CC"
52237      CXX_OLD="$CXX"
52238      CC="$BUILD_CC"
52239      CXX="$BUILD_CXX"
52240      CFLAGS_OLD="$CFLAGS"
52241      CFLAGS=""
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289    # Execute function body
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338    # Execute function body
52339
52340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52341$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52342  supports=yes
52343
52344  saved_cflags="$CFLAGS"
52345  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52346  ac_ext=c
52347ac_cpp='$CPP $CPPFLAGS'
52348ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52349ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52350ac_compiler_gnu=$ac_cv_c_compiler_gnu
52351
52352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52353/* end confdefs.h.  */
52354int i;
52355_ACEOF
52356if ac_fn_c_try_compile "$LINENO"; then :
52357
52358else
52359  supports=no
52360fi
52361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52362  ac_ext=cpp
52363ac_cpp='$CXXCPP $CPPFLAGS'
52364ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52365ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52366ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52367
52368  CFLAGS="$saved_cflags"
52369
52370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52371$as_echo "$supports" >&6; }
52372  if test "x$supports" = "xyes" ; then
52373    :
52374    C_COMP_SUPPORTS="yes"
52375  else
52376    :
52377    C_COMP_SUPPORTS="no"
52378  fi
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438    # Execute function body
52439
52440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52441$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52442  supports=yes
52443
52444  saved_cxxflags="$CXXFLAGS"
52445  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52446  ac_ext=cpp
52447ac_cpp='$CXXCPP $CPPFLAGS'
52448ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52449ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52450ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52451
52452  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52453/* end confdefs.h.  */
52454int i;
52455_ACEOF
52456if ac_fn_cxx_try_compile "$LINENO"; then :
52457
52458else
52459  supports=no
52460fi
52461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52462  ac_ext=cpp
52463ac_cpp='$CXXCPP $CPPFLAGS'
52464ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52465ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52466ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52467
52468  CXXFLAGS="$saved_cxxflags"
52469
52470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52471$as_echo "$supports" >&6; }
52472  if test "x$supports" = "xyes" ; then
52473    :
52474    CXX_COMP_SUPPORTS="yes"
52475  else
52476    :
52477    CXX_COMP_SUPPORTS="no"
52478  fi
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52493$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52494  supports=no
52495  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52496
52497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52498$as_echo "$supports" >&6; }
52499  if test "x$supports" = "xyes" ; then
52500    :
52501    BUILD_CC_CAN_DISABLE_WARNINGS=true
52502  else
52503    :
52504    BUILD_CC_CAN_DISABLE_WARNINGS=false
52505
52506  fi
52507
52508
52509
52510
52511
52512
52513      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52514        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52515      else
52516        BUILD_CC_DISABLE_WARNING_PREFIX=
52517      fi
52518      CC="$CC_OLD"
52519      CXX="$CXX_OLD"
52520      CFLAGS="$CFLAGS_OLD"
52521      ;;
52522    clang)
52523      DISABLE_WARNING_PREFIX="-Wno-"
52524      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52525      ;;
52526    xlc)
52527      DISABLE_WARNING_PREFIX="-qsuppress="
52528      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52529      ;;
52530  esac
52531
52532
52533
52534
52535
52536# Setup debug symbols (need objcopy from the toolchain for that)
52537
52538  #
52539  # NATIVE_DEBUG_SYMBOLS
52540  # This must be done after the toolchain is setup, since we're looking at objcopy.
52541  #
52542  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52543$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52544
52545# Check whether --with-native-debug-symbols was given.
52546if test "${with_native_debug_symbols+set}" = set; then :
52547  withval=$with_native_debug_symbols;
52548        if test "x$OPENJDK_TARGET_OS" = xaix; then
52549          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52550            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52551          fi
52552        fi
52553
52554else
52555
52556        if test "x$OPENJDK_TARGET_OS" = xaix; then
52557          # AIX doesn't support 'zipped' so use 'internal' as default
52558          with_native_debug_symbols="internal"
52559        else
52560          if test "x$STATIC_BUILD" = xtrue; then
52561            with_native_debug_symbols="none"
52562          else
52563            with_native_debug_symbols="zipped"
52564          fi
52565        fi
52566
52567fi
52568
52569  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52571$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52572
52573  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52574
52575    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52576      if test "x$OBJCOPY" = x; then
52577        # enabling of enable-debug-symbols and can't find objcopy
52578        # this is an error
52579        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52580      fi
52581    fi
52582
52583    COMPILE_WITH_DEBUG_SYMBOLS=true
52584    COPY_DEBUG_SYMBOLS=true
52585    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52586
52587    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52588    DEBUG_BINARIES=false
52589    STRIP_POLICY=min_strip
52590
52591  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52592    COMPILE_WITH_DEBUG_SYMBOLS=false
52593    COPY_DEBUG_SYMBOLS=false
52594    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52595
52596    DEBUG_BINARIES=false
52597    STRIP_POLICY=no_strip
52598  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52599    COMPILE_WITH_DEBUG_SYMBOLS=true
52600    COPY_DEBUG_SYMBOLS=false
52601    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52602
52603    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52604    DEBUG_BINARIES=true
52605    STRIP_POLICY=no_strip
52606    STRIP=""
52607
52608  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52609
52610    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52611      if test "x$OBJCOPY" = x; then
52612        # enabling of enable-debug-symbols and can't find objcopy
52613        # this is an error
52614        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52615      fi
52616    fi
52617
52618    COMPILE_WITH_DEBUG_SYMBOLS=true
52619    COPY_DEBUG_SYMBOLS=true
52620    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52621
52622    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52623    DEBUG_BINARIES=false
52624    STRIP_POLICY=min_strip
52625  else
52626    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52627  fi
52628
52629  # --enable-debug-symbols is deprecated.
52630  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52631
52632  # Check whether --enable-debug-symbols was given.
52633if test "${enable_debug_symbols+set}" = set; then :
52634  enableval=$enable_debug_symbols;
52635fi
52636
52637  if test "x$enable_debug_symbols" != x; then
52638    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52639$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52640
52641    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52642      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52643$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52644    fi
52645
52646  fi
52647
52648
52649  # --enable-zip-debug-info is deprecated.
52650  # Please use --with-native-debug-symbols=zipped .
52651
52652  # Check whether --enable-zip-debug-info was given.
52653if test "${enable_zip_debug_info+set}" = set; then :
52654  enableval=$enable_zip_debug_info;
52655fi
52656
52657  if test "x$enable_zip_debug_info" != x; then
52658    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52659$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52660
52661    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52662      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52663$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52664    fi
52665
52666  fi
52667
52668
52669
52670
52671
52672
52673  # Legacy values
52674
52675
52676
52677
52678  # Check whether --enable-native-coverage was given.
52679if test "${enable_native_coverage+set}" = set; then :
52680  enableval=$enable_native_coverage;
52681fi
52682
52683  GCOV_ENABLED="false"
52684  if test "x$enable_native_coverage" = "xyes"; then
52685    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52686      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52687$as_echo_n "checking if native coverage is enabled... " >&6; }
52688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52689$as_echo "yes" >&6; }
52690      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52691      GCOV_LDFLAGS="-fprofile-arcs"
52692      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52693      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52694      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52695      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52696      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52697      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52698      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52699      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52700      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52701      GCOV_ENABLED="true"
52702    else
52703      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52704    fi
52705  elif test "x$enable_native_coverage" = "xno"; then
52706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52707$as_echo_n "checking if native coverage is enabled... " >&6; }
52708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52709$as_echo "no" >&6; }
52710  elif test "x$enable_native_coverage" != "x"; then
52711    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52712  fi
52713
52714
52715
52716
52717# Need toolchain to setup dtrace
52718
52719  # Test for dtrace dependencies
52720  # Check whether --enable-dtrace was given.
52721if test "${enable_dtrace+set}" = set; then :
52722  enableval=$enable_dtrace;
52723fi
52724
52725
52726  DTRACE_DEP_MISSING=false
52727
52728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52729$as_echo_n "checking for dtrace tool... " >&6; }
52730  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52732$as_echo "$DTRACE" >&6; }
52733  else
52734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52735$as_echo "not found, cannot build dtrace" >&6; }
52736    DTRACE_DEP_MISSING=true
52737  fi
52738
52739  for ac_header in sys/sdt.h
52740do :
52741  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52742if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52743  cat >>confdefs.h <<_ACEOF
52744#define HAVE_SYS_SDT_H 1
52745_ACEOF
52746 DTRACE_HEADERS_OK=yes
52747else
52748  DTRACE_HEADERS_OK=no
52749fi
52750
52751done
52752
52753  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52754    DTRACE_DEP_MISSING=true
52755  fi
52756
52757  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52758$as_echo_n "checking if dtrace should be built... " >&6; }
52759  if test "x$enable_dtrace" = "xyes"; then
52760    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52761      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52762$as_echo "no, missing dependencies" >&6; }
52763
52764  # Print a helpful message on how to acquire the necessary build dependency.
52765  # dtrace is the help tag: freetype, cups, alsa etc
52766  MISSING_DEPENDENCY=dtrace
52767
52768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52769    cygwin_help $MISSING_DEPENDENCY
52770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52771    msys_help $MISSING_DEPENDENCY
52772  else
52773    PKGHANDLER_COMMAND=
52774
52775    case $PKGHANDLER in
52776      apt-get)
52777        apt_help     $MISSING_DEPENDENCY ;;
52778      yum)
52779        yum_help     $MISSING_DEPENDENCY ;;
52780      port)
52781        port_help    $MISSING_DEPENDENCY ;;
52782      pkgutil)
52783        pkgutil_help $MISSING_DEPENDENCY ;;
52784      pkgadd)
52785        pkgadd_help  $MISSING_DEPENDENCY ;;
52786    esac
52787
52788    if test "x$PKGHANDLER_COMMAND" != x; then
52789      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52790    fi
52791  fi
52792
52793      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52794    else
52795      INCLUDE_DTRACE=true
52796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52797$as_echo "yes, forced" >&6; }
52798    fi
52799  elif test "x$enable_dtrace" = "xno"; then
52800    INCLUDE_DTRACE=false
52801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52802$as_echo "no, forced" >&6; }
52803  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52804    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52805      INCLUDE_DTRACE=false
52806      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52807$as_echo "no, missing dependencies" >&6; }
52808    else
52809      INCLUDE_DTRACE=true
52810      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52811$as_echo "yes, dependencies present" >&6; }
52812    fi
52813  else
52814    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52815  fi
52816
52817
52818
52819  # The user can in some cases supply additional jvm features. For the custom
52820  # variant, this defines the entire variant.
52821
52822# Check whether --with-jvm-features was given.
52823if test "${with_jvm_features+set}" = set; then :
52824  withval=$with_jvm_features;
52825fi
52826
52827  if test "x$with_jvm_features" != x; then
52828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52829$as_echo_n "checking additional JVM features... " >&6; }
52830    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52832$as_echo "$JVM_FEATURES" >&6; }
52833  fi
52834
52835  # Verify that dependencies are met for explicitly set features.
52836  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52837    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52838  fi
52839
52840  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52841    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52842  fi
52843
52844  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
52845    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
52846  fi
52847
52848  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52849    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52850  fi
52851
52852  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52853    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52854  fi
52855
52856  # Turn on additional features based on other parts of configure
52857  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52858    JVM_FEATURES="$JVM_FEATURES dtrace"
52859  else
52860    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52861      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52862    fi
52863  fi
52864
52865  if test "x$STATIC_BUILD" = "xtrue"; then
52866    JVM_FEATURES="$JVM_FEATURES static-build"
52867  else
52868    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52869      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52870    fi
52871  fi
52872
52873  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52874    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52875      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52876    fi
52877  fi
52878
52879  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52880    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52881      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52882    fi
52883  fi
52884
52885  # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
52886  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52887      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52888      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52889    JVM_FEATURES_jvmci="jvmci"
52890  else
52891    JVM_FEATURES_jvmci=""
52892  fi
52893
52894  # All variants but minimal (and custom) get these features
52895  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52896
52897  # Enable features depending on variant.
52898  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52899  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
52900  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52901  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52902  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52903  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52904  JVM_FEATURES_custom="$JVM_FEATURES"
52905
52906
52907
52908
52909
52910
52911
52912
52913
52914  # Used for verification of Makefiles by check-jvm-feature
52915
52916
52917  # We don't support --with-jvm-interpreter anymore, use zero instead.
52918
52919
52920# Check whether --with-jvm-interpreter was given.
52921if test "${with_jvm_interpreter+set}" = set; then :
52922  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52923$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52924fi
52925
52926
52927
52928
52929  # Check whether --enable-hotspot-gtest was given.
52930if test "${enable_hotspot_gtest+set}" = set; then :
52931  enableval=$enable_hotspot_gtest;
52932fi
52933
52934
52935  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52936    GTEST_DIR_EXISTS="true"
52937  else
52938    GTEST_DIR_EXISTS="false"
52939  fi
52940
52941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52942$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52943  if test "x$enable_hotspot_gtest" = "xyes"; then
52944    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52945      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52946$as_echo "yes, forced" >&6; }
52947      BUILD_GTEST="true"
52948    else
52949      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52950    fi
52951  elif test "x$enable_hotspot_gtest" = "xno"; then
52952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52953$as_echo "no, forced" >&6; }
52954    BUILD_GTEST="false"
52955  elif test "x$enable_hotspot_gtest" = "x"; then
52956    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52957      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52958$as_echo "yes" >&6; }
52959      BUILD_GTEST="true"
52960    else
52961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52962$as_echo "no" >&6; }
52963      BUILD_GTEST="false"
52964    fi
52965  else
52966    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52967  fi
52968
52969
52970
52971
52972###############################################################################
52973#
52974# Check dependencies for external and internal libraries.
52975#
52976###############################################################################
52977
52978# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52979
52980  # When using cygwin or msys, we need a wrapper binary that renames
52981  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52982  # @files and rewrites these too! This wrapper binary is
52983  # called fixpath.
52984  FIXPATH=
52985  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52987$as_echo_n "checking if fixpath can be created... " >&6; }
52988    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52989    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52990    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52991    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52992      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52993      FIXPATH="$FIXPATH_BIN -c"
52994    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52995      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52996      # @ was chosen as separator to minimize risk of other tools messing around with it
52997      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52998          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52999      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53000      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53001    fi
53002    FIXPATH_SRC_W="$FIXPATH_SRC"
53003    FIXPATH_BIN_W="$FIXPATH_BIN"
53004
53005  unix_path="$FIXPATH_SRC_W"
53006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53007    windows_path=`$CYGPATH -m "$unix_path"`
53008    FIXPATH_SRC_W="$windows_path"
53009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53010    windows_path=`cmd //c echo $unix_path`
53011    FIXPATH_SRC_W="$windows_path"
53012  fi
53013
53014
53015  unix_path="$FIXPATH_BIN_W"
53016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53017    windows_path=`$CYGPATH -m "$unix_path"`
53018    FIXPATH_BIN_W="$windows_path"
53019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53020    windows_path=`cmd //c echo $unix_path`
53021    FIXPATH_BIN_W="$windows_path"
53022  fi
53023
53024    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53025    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53026    cd $FIXPATH_DIR
53027    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53028    cd $CURDIR
53029
53030    if test ! -x $FIXPATH_BIN; then
53031      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53032$as_echo "no" >&6; }
53033      cat $FIXPATH_DIR/fixpath1.log
53034      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53035    fi
53036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53037$as_echo "yes" >&6; }
53038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53039$as_echo_n "checking if fixpath.exe works... " >&6; }
53040    cd $FIXPATH_DIR
53041    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53042        > $FIXPATH_DIR/fixpath2.log 2>&1
53043    cd $CURDIR
53044    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53045      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53046$as_echo "no" >&6; }
53047      cat $FIXPATH_DIR/fixpath2.log
53048      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53049    fi
53050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53051$as_echo "yes" >&6; }
53052
53053    FIXPATH_DETACH_FLAG="--detach"
53054  fi
53055
53056
53057
53058
53059
53060
53061  # Check if X11 is needed
53062  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53063    # No X11 support on windows or macosx
53064    NEEDS_LIB_X11=false
53065  else
53066    if test "x$SUPPORT_HEADFUL" = xno; then
53067      # No X11 support if building headless-only
53068      NEEDS_LIB_X11=false
53069    else
53070      # All other instances need X11
53071      NEEDS_LIB_X11=true
53072    fi
53073  fi
53074
53075  # Check if cups is needed
53076  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53077    # Windows have a separate print system
53078    NEEDS_LIB_CUPS=false
53079  else
53080    NEEDS_LIB_CUPS=true
53081  fi
53082
53083  # A custom hook may have set this already
53084  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53085    NEEDS_LIB_FREETYPE=true
53086  fi
53087
53088  # Check if alsa is needed
53089  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53090    NEEDS_LIB_ALSA=true
53091  else
53092    NEEDS_LIB_ALSA=false
53093  fi
53094
53095  # Check if ffi is needed
53096  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53097    NEEDS_LIB_FFI=true
53098  else
53099    NEEDS_LIB_FFI=false
53100  fi
53101
53102
53103  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53104  # dynamic build is configured on command line.
53105
53106# Check whether --with-stdc++lib was given.
53107if test "${with_stdc__lib+set}" = set; then :
53108  withval=$with_stdc__lib;
53109        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53110                && test "x$with_stdc__lib" != xdefault; then
53111          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53112        fi
53113
53114else
53115  with_stdc__lib=default
53116
53117fi
53118
53119
53120  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53121    # Test if -lstdc++ works.
53122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
53123$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
53124    ac_ext=cpp
53125ac_cpp='$CXXCPP $CPPFLAGS'
53126ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53127ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53128ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53129
53130    OLD_CXXFLAGS="$CXXFLAGS"
53131    CXXFLAGS="$CXXFLAGS -lstdc++"
53132    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53133/* end confdefs.h.  */
53134
53135int
53136main ()
53137{
53138return 0;
53139  ;
53140  return 0;
53141}
53142_ACEOF
53143if ac_fn_cxx_try_link "$LINENO"; then :
53144  has_dynamic_libstdcxx=yes
53145else
53146  has_dynamic_libstdcxx=no
53147fi
53148rm -f core conftest.err conftest.$ac_objext \
53149    conftest$ac_exeext conftest.$ac_ext
53150    CXXFLAGS="$OLD_CXXFLAGS"
53151    ac_ext=cpp
53152ac_cpp='$CXXCPP $CPPFLAGS'
53153ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53154ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53155ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53156
53157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
53158$as_echo "$has_dynamic_libstdcxx" >&6; }
53159
53160    # Test if stdc++ can be linked statically.
53161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53162$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53163    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
53164    ac_ext=cpp
53165ac_cpp='$CXXCPP $CPPFLAGS'
53166ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53167ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53168ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53169
53170    OLD_LIBS="$LIBS"
53171    OLD_CXX="$CXX"
53172    LIBS="$STATIC_STDCXX_FLAGS"
53173    CXX="$CC"
53174    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53175/* end confdefs.h.  */
53176
53177int
53178main ()
53179{
53180return 0;
53181  ;
53182  return 0;
53183}
53184_ACEOF
53185if ac_fn_cxx_try_link "$LINENO"; then :
53186  has_static_libstdcxx=yes
53187else
53188  has_static_libstdcxx=no
53189fi
53190rm -f core conftest.err conftest.$ac_objext \
53191    conftest$ac_exeext conftest.$ac_ext
53192    LIBS="$OLD_LIBS"
53193    CXX="$OLD_CXX"
53194    ac_ext=cpp
53195ac_cpp='$CXXCPP $CPPFLAGS'
53196ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53197ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53198ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53199
53200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53201$as_echo "$has_static_libstdcxx" >&6; }
53202
53203    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
53204      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
53205    fi
53206
53207    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53208      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53209    fi
53210
53211    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
53212      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
53213    fi
53214
53215    # If dynamic was requested, it's available since it would fail above otherwise.
53216    # If dynamic wasn't requested, go with static unless it isn't available.
53217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53218$as_echo_n "checking how to link with libstdc++... " >&6; }
53219    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53220      LIBCXX="$LIBCXX -lstdc++"
53221      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53222      JVM_LIBS="-lstdc++ $JVM_LIBS"
53223      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53224      # just use the same setting as for the TARGET toolchain.
53225      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
53226      LDCXX="$CXX"
53227      STATIC_CXX_SETTING="STATIC_CXX=false"
53228      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53229$as_echo "dynamic" >&6; }
53230    else
53231      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53232      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
53233      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53234      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
53235      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53236      # just use the same setting as for the TARGET toolchain.
53237      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
53238      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
53239      LDCXX="$CC"
53240      STATIC_CXX_SETTING="STATIC_CXX=true"
53241      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53242$as_echo "static" >&6; }
53243    fi
53244  fi
53245
53246
53247  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53248  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53249    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53250  fi
53251
53252  # TODO better (platform agnostic) test
53253  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
53254    LIBCXX="-lstdc++"
53255  fi
53256
53257
53258  # Setup Windows runtime dlls
53259  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53260
53261
53262# Check whether --with-msvcr-dll was given.
53263if test "${with_msvcr_dll+set}" = set; then :
53264  withval=$with_msvcr_dll;
53265fi
53266
53267
53268  if test "x$with_msvcr_dll" != x; then
53269    # If given explicitely by user, do not probe. If not present, fail directly.
53270
53271  DLL_NAME="$MSVCR_NAME"
53272  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53273  METHOD="--with-msvcr-dll"
53274  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53275    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53276$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53277
53278    # Need to check if the found msvcr is correct architecture
53279    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53280$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53281    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53283      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53284      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53285      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53286        CORRECT_MSVCR_ARCH="PE32 executable"
53287      else
53288        CORRECT_MSVCR_ARCH="PE32+ executable"
53289      fi
53290    else
53291      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53292        CORRECT_MSVCR_ARCH=386
53293      else
53294        CORRECT_MSVCR_ARCH=x86-64
53295      fi
53296    fi
53297    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53298      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53299$as_echo "ok" >&6; }
53300      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53301
53302  # Only process if variable expands to non-empty
53303
53304  if test "x$MSVC_DLL" != x; then
53305    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53306
53307  # Input might be given as Windows format, start by converting to
53308  # unix format.
53309  path="$MSVC_DLL"
53310  new_path=`$CYGPATH -u "$path"`
53311
53312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53315  # "foo.exe" is OK but "foo" is an error.
53316  #
53317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53318  # It is also a way to make sure we got the proper file name for the real test later on.
53319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53320  if test "x$test_shortpath" = x; then
53321    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53322$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53323    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53324  fi
53325
53326  # Call helper function which possibly converts this using DOS-style short mode.
53327  # If so, the updated path is stored in $new_path.
53328
53329  input_path="$new_path"
53330  # Check if we need to convert this using DOS-style short mode. If the path
53331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53332  # take no chances and rewrite it.
53333  # Note: m4 eats our [], so we need to use [ and ] instead.
53334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53335  if test "x$has_forbidden_chars" != x; then
53336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53340      # Going to short mode and back again did indeed matter. Since short mode is
53341      # case insensitive, let's make it lowercase to improve readability.
53342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53343      # Now convert it back to Unix-style (cygpath)
53344      input_path=`$CYGPATH -u "$shortmode_path"`
53345      new_path="$input_path"
53346    fi
53347  fi
53348
53349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53350  if test "x$test_cygdrive_prefix" = x; then
53351    # As a simple fix, exclude /usr/bin since it's not a real path.
53352    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53354      # a path prefixed by /cygdrive for fixpath to work.
53355      new_path="$CYGWIN_ROOT_PATH$input_path"
53356    fi
53357  fi
53358
53359
53360  if test "x$path" != "x$new_path"; then
53361    MSVC_DLL="$new_path"
53362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53363$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53364  fi
53365
53366    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53367
53368  path="$MSVC_DLL"
53369  has_colon=`$ECHO $path | $GREP ^.:`
53370  new_path="$path"
53371  if test "x$has_colon" = x; then
53372    # Not in mixed or Windows style, start by that.
53373    new_path=`cmd //c echo $path`
53374  fi
53375
53376
53377  input_path="$new_path"
53378  # Check if we need to convert this using DOS-style short mode. If the path
53379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53380  # take no chances and rewrite it.
53381  # Note: m4 eats our [], so we need to use [ and ] instead.
53382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53383  if test "x$has_forbidden_chars" != x; then
53384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53386  fi
53387
53388
53389  windows_path="$new_path"
53390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53391    unix_path=`$CYGPATH -u "$windows_path"`
53392    new_path="$unix_path"
53393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53395    new_path="$unix_path"
53396  fi
53397
53398  if test "x$path" != "x$new_path"; then
53399    MSVC_DLL="$new_path"
53400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53401$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53402  fi
53403
53404  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53405  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53406
53407    else
53408      # We're on a unix platform. Hooray! :)
53409      path="$MSVC_DLL"
53410      has_space=`$ECHO "$path" | $GREP " "`
53411      if test "x$has_space" != x; then
53412        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53413$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53414        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53415      fi
53416
53417      # Use eval to expand a potential ~
53418      eval path="$path"
53419      if test ! -f "$path" && test ! -d "$path"; then
53420        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53421      fi
53422
53423      if test -d "$path"; then
53424        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53425      else
53426        dir="`$DIRNAME "$path"`"
53427        base="`$BASENAME "$path"`"
53428        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53429      fi
53430    fi
53431  fi
53432
53433      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53434$as_echo_n "checking for $DLL_NAME... " >&6; }
53435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53436$as_echo "$MSVC_DLL" >&6; }
53437    else
53438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53439$as_echo "incorrect, ignoring" >&6; }
53440      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53441$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53442    fi
53443  fi
53444
53445    if test "x$MSVC_DLL" = x; then
53446      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53447    fi
53448    MSVCR_DLL="$MSVC_DLL"
53449  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53450
53451  DLL_NAME="$MSVCR_NAME"
53452  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53453  METHOD="devkit"
53454  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53455    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53456$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53457
53458    # Need to check if the found msvcr is correct architecture
53459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53460$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53461    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53462    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53463      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53464      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53465      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53466        CORRECT_MSVCR_ARCH="PE32 executable"
53467      else
53468        CORRECT_MSVCR_ARCH="PE32+ executable"
53469      fi
53470    else
53471      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53472        CORRECT_MSVCR_ARCH=386
53473      else
53474        CORRECT_MSVCR_ARCH=x86-64
53475      fi
53476    fi
53477    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53478      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53479$as_echo "ok" >&6; }
53480      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53481
53482  # Only process if variable expands to non-empty
53483
53484  if test "x$MSVC_DLL" != x; then
53485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53486
53487  # Input might be given as Windows format, start by converting to
53488  # unix format.
53489  path="$MSVC_DLL"
53490  new_path=`$CYGPATH -u "$path"`
53491
53492  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53493  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53494  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53495  # "foo.exe" is OK but "foo" is an error.
53496  #
53497  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53498  # It is also a way to make sure we got the proper file name for the real test later on.
53499  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53500  if test "x$test_shortpath" = x; then
53501    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53502$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53503    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53504  fi
53505
53506  # Call helper function which possibly converts this using DOS-style short mode.
53507  # If so, the updated path is stored in $new_path.
53508
53509  input_path="$new_path"
53510  # Check if we need to convert this using DOS-style short mode. If the path
53511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53512  # take no chances and rewrite it.
53513  # Note: m4 eats our [], so we need to use [ and ] instead.
53514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53515  if test "x$has_forbidden_chars" != x; then
53516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53520      # Going to short mode and back again did indeed matter. Since short mode is
53521      # case insensitive, let's make it lowercase to improve readability.
53522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53523      # Now convert it back to Unix-style (cygpath)
53524      input_path=`$CYGPATH -u "$shortmode_path"`
53525      new_path="$input_path"
53526    fi
53527  fi
53528
53529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53530  if test "x$test_cygdrive_prefix" = x; then
53531    # As a simple fix, exclude /usr/bin since it's not a real path.
53532    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53534      # a path prefixed by /cygdrive for fixpath to work.
53535      new_path="$CYGWIN_ROOT_PATH$input_path"
53536    fi
53537  fi
53538
53539
53540  if test "x$path" != "x$new_path"; then
53541    MSVC_DLL="$new_path"
53542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53543$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53544  fi
53545
53546    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53547
53548  path="$MSVC_DLL"
53549  has_colon=`$ECHO $path | $GREP ^.:`
53550  new_path="$path"
53551  if test "x$has_colon" = x; then
53552    # Not in mixed or Windows style, start by that.
53553    new_path=`cmd //c echo $path`
53554  fi
53555
53556
53557  input_path="$new_path"
53558  # Check if we need to convert this using DOS-style short mode. If the path
53559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53560  # take no chances and rewrite it.
53561  # Note: m4 eats our [], so we need to use [ and ] instead.
53562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53563  if test "x$has_forbidden_chars" != x; then
53564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53566  fi
53567
53568
53569  windows_path="$new_path"
53570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53571    unix_path=`$CYGPATH -u "$windows_path"`
53572    new_path="$unix_path"
53573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53575    new_path="$unix_path"
53576  fi
53577
53578  if test "x$path" != "x$new_path"; then
53579    MSVC_DLL="$new_path"
53580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53581$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53582  fi
53583
53584  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53585  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53586
53587    else
53588      # We're on a unix platform. Hooray! :)
53589      path="$MSVC_DLL"
53590      has_space=`$ECHO "$path" | $GREP " "`
53591      if test "x$has_space" != x; then
53592        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53593$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53594        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53595      fi
53596
53597      # Use eval to expand a potential ~
53598      eval path="$path"
53599      if test ! -f "$path" && test ! -d "$path"; then
53600        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53601      fi
53602
53603      if test -d "$path"; then
53604        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53605      else
53606        dir="`$DIRNAME "$path"`"
53607        base="`$BASENAME "$path"`"
53608        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53609      fi
53610    fi
53611  fi
53612
53613      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53614$as_echo_n "checking for $DLL_NAME... " >&6; }
53615      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53616$as_echo "$MSVC_DLL" >&6; }
53617    else
53618      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53619$as_echo "incorrect, ignoring" >&6; }
53620      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53621$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53622    fi
53623  fi
53624
53625    if test "x$MSVC_DLL" = x; then
53626      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53627    fi
53628    MSVCR_DLL="$MSVC_DLL"
53629  else
53630
53631  DLL_NAME="${MSVCR_NAME}"
53632  MSVC_DLL=
53633
53634  if test "x$MSVC_DLL" = x; then
53635    # Probe: Using well-known location from Visual Studio 10.0
53636    if test "x$VCINSTALLDIR" != x; then
53637      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53638
53639  windows_path="$CYGWIN_VC_INSTALL_DIR"
53640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53641    unix_path=`$CYGPATH -u "$windows_path"`
53642    CYGWIN_VC_INSTALL_DIR="$unix_path"
53643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53645    CYGWIN_VC_INSTALL_DIR="$unix_path"
53646  fi
53647
53648      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53649        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53650      else
53651        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53652      fi
53653      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53654
53655  DLL_NAME="$DLL_NAME"
53656  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53657  METHOD="well-known location in VCINSTALLDIR"
53658  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53659    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53660$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53661
53662    # Need to check if the found msvcr is correct architecture
53663    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53664$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53665    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53666    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53667      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53668      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53669      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53670        CORRECT_MSVCR_ARCH="PE32 executable"
53671      else
53672        CORRECT_MSVCR_ARCH="PE32+ executable"
53673      fi
53674    else
53675      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53676        CORRECT_MSVCR_ARCH=386
53677      else
53678        CORRECT_MSVCR_ARCH=x86-64
53679      fi
53680    fi
53681    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53682      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53683$as_echo "ok" >&6; }
53684      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53685
53686  # Only process if variable expands to non-empty
53687
53688  if test "x$MSVC_DLL" != x; then
53689    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53690
53691  # Input might be given as Windows format, start by converting to
53692  # unix format.
53693  path="$MSVC_DLL"
53694  new_path=`$CYGPATH -u "$path"`
53695
53696  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53697  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53698  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53699  # "foo.exe" is OK but "foo" is an error.
53700  #
53701  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53702  # It is also a way to make sure we got the proper file name for the real test later on.
53703  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53704  if test "x$test_shortpath" = x; then
53705    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53706$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53707    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53708  fi
53709
53710  # Call helper function which possibly converts this using DOS-style short mode.
53711  # If so, the updated path is stored in $new_path.
53712
53713  input_path="$new_path"
53714  # Check if we need to convert this using DOS-style short mode. If the path
53715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53716  # take no chances and rewrite it.
53717  # Note: m4 eats our [], so we need to use [ and ] instead.
53718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53719  if test "x$has_forbidden_chars" != x; then
53720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53724      # Going to short mode and back again did indeed matter. Since short mode is
53725      # case insensitive, let's make it lowercase to improve readability.
53726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53727      # Now convert it back to Unix-style (cygpath)
53728      input_path=`$CYGPATH -u "$shortmode_path"`
53729      new_path="$input_path"
53730    fi
53731  fi
53732
53733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53734  if test "x$test_cygdrive_prefix" = x; then
53735    # As a simple fix, exclude /usr/bin since it's not a real path.
53736    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53738      # a path prefixed by /cygdrive for fixpath to work.
53739      new_path="$CYGWIN_ROOT_PATH$input_path"
53740    fi
53741  fi
53742
53743
53744  if test "x$path" != "x$new_path"; then
53745    MSVC_DLL="$new_path"
53746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53747$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53748  fi
53749
53750    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53751
53752  path="$MSVC_DLL"
53753  has_colon=`$ECHO $path | $GREP ^.:`
53754  new_path="$path"
53755  if test "x$has_colon" = x; then
53756    # Not in mixed or Windows style, start by that.
53757    new_path=`cmd //c echo $path`
53758  fi
53759
53760
53761  input_path="$new_path"
53762  # Check if we need to convert this using DOS-style short mode. If the path
53763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53764  # take no chances and rewrite it.
53765  # Note: m4 eats our [], so we need to use [ and ] instead.
53766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53767  if test "x$has_forbidden_chars" != x; then
53768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53770  fi
53771
53772
53773  windows_path="$new_path"
53774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53775    unix_path=`$CYGPATH -u "$windows_path"`
53776    new_path="$unix_path"
53777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53779    new_path="$unix_path"
53780  fi
53781
53782  if test "x$path" != "x$new_path"; then
53783    MSVC_DLL="$new_path"
53784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53785$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53786  fi
53787
53788  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53789  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53790
53791    else
53792      # We're on a unix platform. Hooray! :)
53793      path="$MSVC_DLL"
53794      has_space=`$ECHO "$path" | $GREP " "`
53795      if test "x$has_space" != x; then
53796        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53797$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53798        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53799      fi
53800
53801      # Use eval to expand a potential ~
53802      eval path="$path"
53803      if test ! -f "$path" && test ! -d "$path"; then
53804        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53805      fi
53806
53807      if test -d "$path"; then
53808        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53809      else
53810        dir="`$DIRNAME "$path"`"
53811        base="`$BASENAME "$path"`"
53812        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53813      fi
53814    fi
53815  fi
53816
53817      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53818$as_echo_n "checking for $DLL_NAME... " >&6; }
53819      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53820$as_echo "$MSVC_DLL" >&6; }
53821    else
53822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53823$as_echo "incorrect, ignoring" >&6; }
53824      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53825$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53826    fi
53827  fi
53828
53829    fi
53830  fi
53831
53832  if test "x$MSVC_DLL" = x; then
53833    # Probe: Check in the Boot JDK directory.
53834    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53835
53836  DLL_NAME="$DLL_NAME"
53837  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53838  METHOD="well-known location in Boot JDK"
53839  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53840    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53841$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53842
53843    # Need to check if the found msvcr is correct architecture
53844    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53845$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53846    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53848      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53849      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53850      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53851        CORRECT_MSVCR_ARCH="PE32 executable"
53852      else
53853        CORRECT_MSVCR_ARCH="PE32+ executable"
53854      fi
53855    else
53856      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53857        CORRECT_MSVCR_ARCH=386
53858      else
53859        CORRECT_MSVCR_ARCH=x86-64
53860      fi
53861    fi
53862    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53863      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53864$as_echo "ok" >&6; }
53865      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53866
53867  # Only process if variable expands to non-empty
53868
53869  if test "x$MSVC_DLL" != x; then
53870    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53871
53872  # Input might be given as Windows format, start by converting to
53873  # unix format.
53874  path="$MSVC_DLL"
53875  new_path=`$CYGPATH -u "$path"`
53876
53877  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53878  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53879  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53880  # "foo.exe" is OK but "foo" is an error.
53881  #
53882  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53883  # It is also a way to make sure we got the proper file name for the real test later on.
53884  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53885  if test "x$test_shortpath" = x; then
53886    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53887$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53888    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53889  fi
53890
53891  # Call helper function which possibly converts this using DOS-style short mode.
53892  # If so, the updated path is stored in $new_path.
53893
53894  input_path="$new_path"
53895  # Check if we need to convert this using DOS-style short mode. If the path
53896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53897  # take no chances and rewrite it.
53898  # Note: m4 eats our [], so we need to use [ and ] instead.
53899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53900  if test "x$has_forbidden_chars" != x; then
53901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53902    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53903    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53904    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53905      # Going to short mode and back again did indeed matter. Since short mode is
53906      # case insensitive, let's make it lowercase to improve readability.
53907      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53908      # Now convert it back to Unix-style (cygpath)
53909      input_path=`$CYGPATH -u "$shortmode_path"`
53910      new_path="$input_path"
53911    fi
53912  fi
53913
53914  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53915  if test "x$test_cygdrive_prefix" = x; then
53916    # As a simple fix, exclude /usr/bin since it's not a real path.
53917    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53918      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53919      # a path prefixed by /cygdrive for fixpath to work.
53920      new_path="$CYGWIN_ROOT_PATH$input_path"
53921    fi
53922  fi
53923
53924
53925  if test "x$path" != "x$new_path"; then
53926    MSVC_DLL="$new_path"
53927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53928$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53929  fi
53930
53931    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53932
53933  path="$MSVC_DLL"
53934  has_colon=`$ECHO $path | $GREP ^.:`
53935  new_path="$path"
53936  if test "x$has_colon" = x; then
53937    # Not in mixed or Windows style, start by that.
53938    new_path=`cmd //c echo $path`
53939  fi
53940
53941
53942  input_path="$new_path"
53943  # Check if we need to convert this using DOS-style short mode. If the path
53944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53945  # take no chances and rewrite it.
53946  # Note: m4 eats our [], so we need to use [ and ] instead.
53947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53948  if test "x$has_forbidden_chars" != x; then
53949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53950    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53951  fi
53952
53953
53954  windows_path="$new_path"
53955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53956    unix_path=`$CYGPATH -u "$windows_path"`
53957    new_path="$unix_path"
53958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53960    new_path="$unix_path"
53961  fi
53962
53963  if test "x$path" != "x$new_path"; then
53964    MSVC_DLL="$new_path"
53965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53966$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53967  fi
53968
53969  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53970  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53971
53972    else
53973      # We're on a unix platform. Hooray! :)
53974      path="$MSVC_DLL"
53975      has_space=`$ECHO "$path" | $GREP " "`
53976      if test "x$has_space" != x; then
53977        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53978$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53979        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53980      fi
53981
53982      # Use eval to expand a potential ~
53983      eval path="$path"
53984      if test ! -f "$path" && test ! -d "$path"; then
53985        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53986      fi
53987
53988      if test -d "$path"; then
53989        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53990      else
53991        dir="`$DIRNAME "$path"`"
53992        base="`$BASENAME "$path"`"
53993        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53994      fi
53995    fi
53996  fi
53997
53998      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53999$as_echo_n "checking for $DLL_NAME... " >&6; }
54000      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54001$as_echo "$MSVC_DLL" >&6; }
54002    else
54003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54004$as_echo "incorrect, ignoring" >&6; }
54005      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54006$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54007    fi
54008  fi
54009
54010  fi
54011
54012  if test "x$MSVC_DLL" = x; then
54013    # Probe: Look in the Windows system32 directory
54014    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54015
54016  windows_path="$CYGWIN_SYSTEMROOT"
54017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54018    unix_path=`$CYGPATH -u "$windows_path"`
54019    CYGWIN_SYSTEMROOT="$unix_path"
54020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54022    CYGWIN_SYSTEMROOT="$unix_path"
54023  fi
54024
54025    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54026
54027  DLL_NAME="$DLL_NAME"
54028  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54029  METHOD="well-known location in SYSTEMROOT"
54030  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54031    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54032$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54033
54034    # Need to check if the found msvcr is correct architecture
54035    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54036$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54037    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54038    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54039      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54040      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54041      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54042        CORRECT_MSVCR_ARCH="PE32 executable"
54043      else
54044        CORRECT_MSVCR_ARCH="PE32+ executable"
54045      fi
54046    else
54047      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54048        CORRECT_MSVCR_ARCH=386
54049      else
54050        CORRECT_MSVCR_ARCH=x86-64
54051      fi
54052    fi
54053    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54054      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54055$as_echo "ok" >&6; }
54056      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54057
54058  # Only process if variable expands to non-empty
54059
54060  if test "x$MSVC_DLL" != x; then
54061    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54062
54063  # Input might be given as Windows format, start by converting to
54064  # unix format.
54065  path="$MSVC_DLL"
54066  new_path=`$CYGPATH -u "$path"`
54067
54068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54071  # "foo.exe" is OK but "foo" is an error.
54072  #
54073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54074  # It is also a way to make sure we got the proper file name for the real test later on.
54075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54076  if test "x$test_shortpath" = x; then
54077    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54078$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54079    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54080  fi
54081
54082  # Call helper function which possibly converts this using DOS-style short mode.
54083  # If so, the updated path is stored in $new_path.
54084
54085  input_path="$new_path"
54086  # Check if we need to convert this using DOS-style short mode. If the path
54087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54088  # take no chances and rewrite it.
54089  # Note: m4 eats our [], so we need to use [ and ] instead.
54090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54091  if test "x$has_forbidden_chars" != x; then
54092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54096      # Going to short mode and back again did indeed matter. Since short mode is
54097      # case insensitive, let's make it lowercase to improve readability.
54098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54099      # Now convert it back to Unix-style (cygpath)
54100      input_path=`$CYGPATH -u "$shortmode_path"`
54101      new_path="$input_path"
54102    fi
54103  fi
54104
54105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54106  if test "x$test_cygdrive_prefix" = x; then
54107    # As a simple fix, exclude /usr/bin since it's not a real path.
54108    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54110      # a path prefixed by /cygdrive for fixpath to work.
54111      new_path="$CYGWIN_ROOT_PATH$input_path"
54112    fi
54113  fi
54114
54115
54116  if test "x$path" != "x$new_path"; then
54117    MSVC_DLL="$new_path"
54118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54119$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54120  fi
54121
54122    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54123
54124  path="$MSVC_DLL"
54125  has_colon=`$ECHO $path | $GREP ^.:`
54126  new_path="$path"
54127  if test "x$has_colon" = x; then
54128    # Not in mixed or Windows style, start by that.
54129    new_path=`cmd //c echo $path`
54130  fi
54131
54132
54133  input_path="$new_path"
54134  # Check if we need to convert this using DOS-style short mode. If the path
54135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54136  # take no chances and rewrite it.
54137  # Note: m4 eats our [], so we need to use [ and ] instead.
54138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54139  if test "x$has_forbidden_chars" != x; then
54140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54142  fi
54143
54144
54145  windows_path="$new_path"
54146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54147    unix_path=`$CYGPATH -u "$windows_path"`
54148    new_path="$unix_path"
54149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54151    new_path="$unix_path"
54152  fi
54153
54154  if test "x$path" != "x$new_path"; then
54155    MSVC_DLL="$new_path"
54156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54157$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54158  fi
54159
54160  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54161  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54162
54163    else
54164      # We're on a unix platform. Hooray! :)
54165      path="$MSVC_DLL"
54166      has_space=`$ECHO "$path" | $GREP " "`
54167      if test "x$has_space" != x; then
54168        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54169$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54170        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54171      fi
54172
54173      # Use eval to expand a potential ~
54174      eval path="$path"
54175      if test ! -f "$path" && test ! -d "$path"; then
54176        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54177      fi
54178
54179      if test -d "$path"; then
54180        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54181      else
54182        dir="`$DIRNAME "$path"`"
54183        base="`$BASENAME "$path"`"
54184        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54185      fi
54186    fi
54187  fi
54188
54189      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54190$as_echo_n "checking for $DLL_NAME... " >&6; }
54191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54192$as_echo "$MSVC_DLL" >&6; }
54193    else
54194      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54195$as_echo "incorrect, ignoring" >&6; }
54196      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54197$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54198    fi
54199  fi
54200
54201  fi
54202
54203  if test "x$MSVC_DLL" = x; then
54204    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54205    if test "x$VS100COMNTOOLS" != x; then
54206      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54207
54208  windows_path="$CYGWIN_VS_TOOLS_DIR"
54209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54210    unix_path=`$CYGPATH -u "$windows_path"`
54211    CYGWIN_VS_TOOLS_DIR="$unix_path"
54212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54214    CYGWIN_VS_TOOLS_DIR="$unix_path"
54215  fi
54216
54217      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54218        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54219	    | $GREP -i /x64/ | $HEAD --lines 1`
54220      else
54221        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54222	    | $GREP -i /x86/ | $HEAD --lines 1`
54223      fi
54224
54225  DLL_NAME="$DLL_NAME"
54226  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54227  METHOD="search of VS100COMNTOOLS"
54228  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54229    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54230$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54231
54232    # Need to check if the found msvcr is correct architecture
54233    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54234$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54235    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54237      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54238      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54239      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54240        CORRECT_MSVCR_ARCH="PE32 executable"
54241      else
54242        CORRECT_MSVCR_ARCH="PE32+ executable"
54243      fi
54244    else
54245      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54246        CORRECT_MSVCR_ARCH=386
54247      else
54248        CORRECT_MSVCR_ARCH=x86-64
54249      fi
54250    fi
54251    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54252      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54253$as_echo "ok" >&6; }
54254      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54255
54256  # Only process if variable expands to non-empty
54257
54258  if test "x$MSVC_DLL" != x; then
54259    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54260
54261  # Input might be given as Windows format, start by converting to
54262  # unix format.
54263  path="$MSVC_DLL"
54264  new_path=`$CYGPATH -u "$path"`
54265
54266  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54267  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54268  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54269  # "foo.exe" is OK but "foo" is an error.
54270  #
54271  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54272  # It is also a way to make sure we got the proper file name for the real test later on.
54273  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54274  if test "x$test_shortpath" = x; then
54275    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54276$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54277    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54278  fi
54279
54280  # Call helper function which possibly converts this using DOS-style short mode.
54281  # If so, the updated path is stored in $new_path.
54282
54283  input_path="$new_path"
54284  # Check if we need to convert this using DOS-style short mode. If the path
54285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54286  # take no chances and rewrite it.
54287  # Note: m4 eats our [], so we need to use [ and ] instead.
54288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54289  if test "x$has_forbidden_chars" != x; then
54290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54294      # Going to short mode and back again did indeed matter. Since short mode is
54295      # case insensitive, let's make it lowercase to improve readability.
54296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54297      # Now convert it back to Unix-style (cygpath)
54298      input_path=`$CYGPATH -u "$shortmode_path"`
54299      new_path="$input_path"
54300    fi
54301  fi
54302
54303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54304  if test "x$test_cygdrive_prefix" = x; then
54305    # As a simple fix, exclude /usr/bin since it's not a real path.
54306    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54308      # a path prefixed by /cygdrive for fixpath to work.
54309      new_path="$CYGWIN_ROOT_PATH$input_path"
54310    fi
54311  fi
54312
54313
54314  if test "x$path" != "x$new_path"; then
54315    MSVC_DLL="$new_path"
54316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54317$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54318  fi
54319
54320    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54321
54322  path="$MSVC_DLL"
54323  has_colon=`$ECHO $path | $GREP ^.:`
54324  new_path="$path"
54325  if test "x$has_colon" = x; then
54326    # Not in mixed or Windows style, start by that.
54327    new_path=`cmd //c echo $path`
54328  fi
54329
54330
54331  input_path="$new_path"
54332  # Check if we need to convert this using DOS-style short mode. If the path
54333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54334  # take no chances and rewrite it.
54335  # Note: m4 eats our [], so we need to use [ and ] instead.
54336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54337  if test "x$has_forbidden_chars" != x; then
54338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54340  fi
54341
54342
54343  windows_path="$new_path"
54344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54345    unix_path=`$CYGPATH -u "$windows_path"`
54346    new_path="$unix_path"
54347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54349    new_path="$unix_path"
54350  fi
54351
54352  if test "x$path" != "x$new_path"; then
54353    MSVC_DLL="$new_path"
54354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54355$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54356  fi
54357
54358  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54359  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54360
54361    else
54362      # We're on a unix platform. Hooray! :)
54363      path="$MSVC_DLL"
54364      has_space=`$ECHO "$path" | $GREP " "`
54365      if test "x$has_space" != x; then
54366        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54367$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54368        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54369      fi
54370
54371      # Use eval to expand a potential ~
54372      eval path="$path"
54373      if test ! -f "$path" && test ! -d "$path"; then
54374        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54375      fi
54376
54377      if test -d "$path"; then
54378        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54379      else
54380        dir="`$DIRNAME "$path"`"
54381        base="`$BASENAME "$path"`"
54382        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54383      fi
54384    fi
54385  fi
54386
54387      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54388$as_echo_n "checking for $DLL_NAME... " >&6; }
54389      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54390$as_echo "$MSVC_DLL" >&6; }
54391    else
54392      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54393$as_echo "incorrect, ignoring" >&6; }
54394      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54395$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54396    fi
54397  fi
54398
54399    fi
54400  fi
54401
54402  if test "x$MSVC_DLL" = x; then
54403    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54404    # (This was the original behaviour; kept since it might turn something up)
54405    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54406      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54407        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54408	    | $GREP x64 | $HEAD --lines 1`
54409      else
54410        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54411	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54412        if test "x$POSSIBLE_MSVC_DLL" = x; then
54413          # We're grasping at straws now...
54414          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54415	      | $HEAD --lines 1`
54416        fi
54417      fi
54418
54419
54420  DLL_NAME="$DLL_NAME"
54421  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54422  METHOD="search of VCINSTALLDIR"
54423  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54424    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54425$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54426
54427    # Need to check if the found msvcr is correct architecture
54428    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54429$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54430    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54431    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54432      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54433      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54434      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54435        CORRECT_MSVCR_ARCH="PE32 executable"
54436      else
54437        CORRECT_MSVCR_ARCH="PE32+ executable"
54438      fi
54439    else
54440      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54441        CORRECT_MSVCR_ARCH=386
54442      else
54443        CORRECT_MSVCR_ARCH=x86-64
54444      fi
54445    fi
54446    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54447      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54448$as_echo "ok" >&6; }
54449      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54450
54451  # Only process if variable expands to non-empty
54452
54453  if test "x$MSVC_DLL" != x; then
54454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54455
54456  # Input might be given as Windows format, start by converting to
54457  # unix format.
54458  path="$MSVC_DLL"
54459  new_path=`$CYGPATH -u "$path"`
54460
54461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54464  # "foo.exe" is OK but "foo" is an error.
54465  #
54466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54467  # It is also a way to make sure we got the proper file name for the real test later on.
54468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54469  if test "x$test_shortpath" = x; then
54470    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54471$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54472    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54473  fi
54474
54475  # Call helper function which possibly converts this using DOS-style short mode.
54476  # If so, the updated path is stored in $new_path.
54477
54478  input_path="$new_path"
54479  # Check if we need to convert this using DOS-style short mode. If the path
54480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54481  # take no chances and rewrite it.
54482  # Note: m4 eats our [], so we need to use [ and ] instead.
54483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54484  if test "x$has_forbidden_chars" != x; then
54485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54489      # Going to short mode and back again did indeed matter. Since short mode is
54490      # case insensitive, let's make it lowercase to improve readability.
54491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54492      # Now convert it back to Unix-style (cygpath)
54493      input_path=`$CYGPATH -u "$shortmode_path"`
54494      new_path="$input_path"
54495    fi
54496  fi
54497
54498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54499  if test "x$test_cygdrive_prefix" = x; then
54500    # As a simple fix, exclude /usr/bin since it's not a real path.
54501    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54503      # a path prefixed by /cygdrive for fixpath to work.
54504      new_path="$CYGWIN_ROOT_PATH$input_path"
54505    fi
54506  fi
54507
54508
54509  if test "x$path" != "x$new_path"; then
54510    MSVC_DLL="$new_path"
54511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54512$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54513  fi
54514
54515    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54516
54517  path="$MSVC_DLL"
54518  has_colon=`$ECHO $path | $GREP ^.:`
54519  new_path="$path"
54520  if test "x$has_colon" = x; then
54521    # Not in mixed or Windows style, start by that.
54522    new_path=`cmd //c echo $path`
54523  fi
54524
54525
54526  input_path="$new_path"
54527  # Check if we need to convert this using DOS-style short mode. If the path
54528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54529  # take no chances and rewrite it.
54530  # Note: m4 eats our [], so we need to use [ and ] instead.
54531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54532  if test "x$has_forbidden_chars" != x; then
54533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54535  fi
54536
54537
54538  windows_path="$new_path"
54539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54540    unix_path=`$CYGPATH -u "$windows_path"`
54541    new_path="$unix_path"
54542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54544    new_path="$unix_path"
54545  fi
54546
54547  if test "x$path" != "x$new_path"; then
54548    MSVC_DLL="$new_path"
54549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54550$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54551  fi
54552
54553  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54554  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54555
54556    else
54557      # We're on a unix platform. Hooray! :)
54558      path="$MSVC_DLL"
54559      has_space=`$ECHO "$path" | $GREP " "`
54560      if test "x$has_space" != x; then
54561        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54562$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54563        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54564      fi
54565
54566      # Use eval to expand a potential ~
54567      eval path="$path"
54568      if test ! -f "$path" && test ! -d "$path"; then
54569        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54570      fi
54571
54572      if test -d "$path"; then
54573        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54574      else
54575        dir="`$DIRNAME "$path"`"
54576        base="`$BASENAME "$path"`"
54577        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54578      fi
54579    fi
54580  fi
54581
54582      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54583$as_echo_n "checking for $DLL_NAME... " >&6; }
54584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54585$as_echo "$MSVC_DLL" >&6; }
54586    else
54587      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54588$as_echo "incorrect, ignoring" >&6; }
54589      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54590$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54591    fi
54592  fi
54593
54594    fi
54595  fi
54596
54597  if test "x$MSVC_DLL" = x; then
54598    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54599$as_echo_n "checking for $DLL_NAME... " >&6; }
54600    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54601$as_echo "no" >&6; }
54602    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54603  fi
54604
54605    MSVCR_DLL="$MSVC_DLL"
54606  fi
54607
54608
54609
54610# Check whether --with-msvcp-dll was given.
54611if test "${with_msvcp_dll+set}" = set; then :
54612  withval=$with_msvcp_dll;
54613fi
54614
54615
54616  if test "x$MSVCP_NAME" != "x"; then
54617    if test "x$with_msvcp_dll" != x; then
54618      # If given explicitely by user, do not probe. If not present, fail directly.
54619
54620  DLL_NAME="$MSVCP_NAME"
54621  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54622  METHOD="--with-msvcp-dll"
54623  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54624    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54625$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54626
54627    # Need to check if the found msvcr is correct architecture
54628    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54629$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54630    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54631    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54632      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54633      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54634      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54635        CORRECT_MSVCR_ARCH="PE32 executable"
54636      else
54637        CORRECT_MSVCR_ARCH="PE32+ executable"
54638      fi
54639    else
54640      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54641        CORRECT_MSVCR_ARCH=386
54642      else
54643        CORRECT_MSVCR_ARCH=x86-64
54644      fi
54645    fi
54646    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54648$as_echo "ok" >&6; }
54649      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54650
54651  # Only process if variable expands to non-empty
54652
54653  if test "x$MSVC_DLL" != x; then
54654    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54655
54656  # Input might be given as Windows format, start by converting to
54657  # unix format.
54658  path="$MSVC_DLL"
54659  new_path=`$CYGPATH -u "$path"`
54660
54661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54664  # "foo.exe" is OK but "foo" is an error.
54665  #
54666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54667  # It is also a way to make sure we got the proper file name for the real test later on.
54668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54669  if test "x$test_shortpath" = x; then
54670    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54671$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54672    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54673  fi
54674
54675  # Call helper function which possibly converts this using DOS-style short mode.
54676  # If so, the updated path is stored in $new_path.
54677
54678  input_path="$new_path"
54679  # Check if we need to convert this using DOS-style short mode. If the path
54680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54681  # take no chances and rewrite it.
54682  # Note: m4 eats our [], so we need to use [ and ] instead.
54683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54684  if test "x$has_forbidden_chars" != x; then
54685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54689      # Going to short mode and back again did indeed matter. Since short mode is
54690      # case insensitive, let's make it lowercase to improve readability.
54691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54692      # Now convert it back to Unix-style (cygpath)
54693      input_path=`$CYGPATH -u "$shortmode_path"`
54694      new_path="$input_path"
54695    fi
54696  fi
54697
54698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54699  if test "x$test_cygdrive_prefix" = x; then
54700    # As a simple fix, exclude /usr/bin since it's not a real path.
54701    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54703      # a path prefixed by /cygdrive for fixpath to work.
54704      new_path="$CYGWIN_ROOT_PATH$input_path"
54705    fi
54706  fi
54707
54708
54709  if test "x$path" != "x$new_path"; then
54710    MSVC_DLL="$new_path"
54711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54712$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54713  fi
54714
54715    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54716
54717  path="$MSVC_DLL"
54718  has_colon=`$ECHO $path | $GREP ^.:`
54719  new_path="$path"
54720  if test "x$has_colon" = x; then
54721    # Not in mixed or Windows style, start by that.
54722    new_path=`cmd //c echo $path`
54723  fi
54724
54725
54726  input_path="$new_path"
54727  # Check if we need to convert this using DOS-style short mode. If the path
54728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54729  # take no chances and rewrite it.
54730  # Note: m4 eats our [], so we need to use [ and ] instead.
54731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54732  if test "x$has_forbidden_chars" != x; then
54733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54735  fi
54736
54737
54738  windows_path="$new_path"
54739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54740    unix_path=`$CYGPATH -u "$windows_path"`
54741    new_path="$unix_path"
54742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54744    new_path="$unix_path"
54745  fi
54746
54747  if test "x$path" != "x$new_path"; then
54748    MSVC_DLL="$new_path"
54749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54750$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54751  fi
54752
54753  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54754  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54755
54756    else
54757      # We're on a unix platform. Hooray! :)
54758      path="$MSVC_DLL"
54759      has_space=`$ECHO "$path" | $GREP " "`
54760      if test "x$has_space" != x; then
54761        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54762$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54763        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54764      fi
54765
54766      # Use eval to expand a potential ~
54767      eval path="$path"
54768      if test ! -f "$path" && test ! -d "$path"; then
54769        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54770      fi
54771
54772      if test -d "$path"; then
54773        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54774      else
54775        dir="`$DIRNAME "$path"`"
54776        base="`$BASENAME "$path"`"
54777        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54778      fi
54779    fi
54780  fi
54781
54782      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54783$as_echo_n "checking for $DLL_NAME... " >&6; }
54784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54785$as_echo "$MSVC_DLL" >&6; }
54786    else
54787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54788$as_echo "incorrect, ignoring" >&6; }
54789      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54790$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54791    fi
54792  fi
54793
54794      if test "x$MSVC_DLL" = x; then
54795        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54796      fi
54797      MSVCP_DLL="$MSVC_DLL"
54798    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54799
54800  DLL_NAME="$MSVCP_NAME"
54801  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54802  METHOD="devkit"
54803  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54804    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54805$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54806
54807    # Need to check if the found msvcr is correct architecture
54808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54809$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54810    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54812      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54813      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54814      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54815        CORRECT_MSVCR_ARCH="PE32 executable"
54816      else
54817        CORRECT_MSVCR_ARCH="PE32+ executable"
54818      fi
54819    else
54820      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54821        CORRECT_MSVCR_ARCH=386
54822      else
54823        CORRECT_MSVCR_ARCH=x86-64
54824      fi
54825    fi
54826    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54827      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54828$as_echo "ok" >&6; }
54829      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54830
54831  # Only process if variable expands to non-empty
54832
54833  if test "x$MSVC_DLL" != x; then
54834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54835
54836  # Input might be given as Windows format, start by converting to
54837  # unix format.
54838  path="$MSVC_DLL"
54839  new_path=`$CYGPATH -u "$path"`
54840
54841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54844  # "foo.exe" is OK but "foo" is an error.
54845  #
54846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54847  # It is also a way to make sure we got the proper file name for the real test later on.
54848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54849  if test "x$test_shortpath" = x; then
54850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54851$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54852    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54853  fi
54854
54855  # Call helper function which possibly converts this using DOS-style short mode.
54856  # If so, the updated path is stored in $new_path.
54857
54858  input_path="$new_path"
54859  # Check if we need to convert this using DOS-style short mode. If the path
54860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54861  # take no chances and rewrite it.
54862  # Note: m4 eats our [], so we need to use [ and ] instead.
54863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54864  if test "x$has_forbidden_chars" != x; then
54865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54869      # Going to short mode and back again did indeed matter. Since short mode is
54870      # case insensitive, let's make it lowercase to improve readability.
54871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54872      # Now convert it back to Unix-style (cygpath)
54873      input_path=`$CYGPATH -u "$shortmode_path"`
54874      new_path="$input_path"
54875    fi
54876  fi
54877
54878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54879  if test "x$test_cygdrive_prefix" = x; then
54880    # As a simple fix, exclude /usr/bin since it's not a real path.
54881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54883      # a path prefixed by /cygdrive for fixpath to work.
54884      new_path="$CYGWIN_ROOT_PATH$input_path"
54885    fi
54886  fi
54887
54888
54889  if test "x$path" != "x$new_path"; then
54890    MSVC_DLL="$new_path"
54891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54892$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54893  fi
54894
54895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54896
54897  path="$MSVC_DLL"
54898  has_colon=`$ECHO $path | $GREP ^.:`
54899  new_path="$path"
54900  if test "x$has_colon" = x; then
54901    # Not in mixed or Windows style, start by that.
54902    new_path=`cmd //c echo $path`
54903  fi
54904
54905
54906  input_path="$new_path"
54907  # Check if we need to convert this using DOS-style short mode. If the path
54908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54909  # take no chances and rewrite it.
54910  # Note: m4 eats our [], so we need to use [ and ] instead.
54911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54912  if test "x$has_forbidden_chars" != x; then
54913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54915  fi
54916
54917
54918  windows_path="$new_path"
54919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54920    unix_path=`$CYGPATH -u "$windows_path"`
54921    new_path="$unix_path"
54922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54924    new_path="$unix_path"
54925  fi
54926
54927  if test "x$path" != "x$new_path"; then
54928    MSVC_DLL="$new_path"
54929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54930$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54931  fi
54932
54933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54935
54936    else
54937      # We're on a unix platform. Hooray! :)
54938      path="$MSVC_DLL"
54939      has_space=`$ECHO "$path" | $GREP " "`
54940      if test "x$has_space" != x; then
54941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54942$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54943        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54944      fi
54945
54946      # Use eval to expand a potential ~
54947      eval path="$path"
54948      if test ! -f "$path" && test ! -d "$path"; then
54949        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54950      fi
54951
54952      if test -d "$path"; then
54953        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54954      else
54955        dir="`$DIRNAME "$path"`"
54956        base="`$BASENAME "$path"`"
54957        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54958      fi
54959    fi
54960  fi
54961
54962      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54963$as_echo_n "checking for $DLL_NAME... " >&6; }
54964      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54965$as_echo "$MSVC_DLL" >&6; }
54966    else
54967      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54968$as_echo "incorrect, ignoring" >&6; }
54969      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54970$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54971    fi
54972  fi
54973
54974      if test "x$MSVC_DLL" = x; then
54975        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54976      fi
54977      MSVCP_DLL="$MSVC_DLL"
54978    else
54979
54980  DLL_NAME="${MSVCP_NAME}"
54981  MSVC_DLL=
54982
54983  if test "x$MSVC_DLL" = x; then
54984    # Probe: Using well-known location from Visual Studio 10.0
54985    if test "x$VCINSTALLDIR" != x; then
54986      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54987
54988  windows_path="$CYGWIN_VC_INSTALL_DIR"
54989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54990    unix_path=`$CYGPATH -u "$windows_path"`
54991    CYGWIN_VC_INSTALL_DIR="$unix_path"
54992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54994    CYGWIN_VC_INSTALL_DIR="$unix_path"
54995  fi
54996
54997      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54998        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54999      else
55000        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55001      fi
55002      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55003
55004  DLL_NAME="$DLL_NAME"
55005  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55006  METHOD="well-known location in VCINSTALLDIR"
55007  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55008    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55009$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55010
55011    # Need to check if the found msvcr is correct architecture
55012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55013$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55014    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55016      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55017      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55018      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55019        CORRECT_MSVCR_ARCH="PE32 executable"
55020      else
55021        CORRECT_MSVCR_ARCH="PE32+ executable"
55022      fi
55023    else
55024      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55025        CORRECT_MSVCR_ARCH=386
55026      else
55027        CORRECT_MSVCR_ARCH=x86-64
55028      fi
55029    fi
55030    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55031      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55032$as_echo "ok" >&6; }
55033      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55034
55035  # Only process if variable expands to non-empty
55036
55037  if test "x$MSVC_DLL" != x; then
55038    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55039
55040  # Input might be given as Windows format, start by converting to
55041  # unix format.
55042  path="$MSVC_DLL"
55043  new_path=`$CYGPATH -u "$path"`
55044
55045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55048  # "foo.exe" is OK but "foo" is an error.
55049  #
55050  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55051  # It is also a way to make sure we got the proper file name for the real test later on.
55052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55053  if test "x$test_shortpath" = x; then
55054    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55055$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55056    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55057  fi
55058
55059  # Call helper function which possibly converts this using DOS-style short mode.
55060  # If so, the updated path is stored in $new_path.
55061
55062  input_path="$new_path"
55063  # Check if we need to convert this using DOS-style short mode. If the path
55064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55065  # take no chances and rewrite it.
55066  # Note: m4 eats our [], so we need to use [ and ] instead.
55067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55068  if test "x$has_forbidden_chars" != x; then
55069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55073      # Going to short mode and back again did indeed matter. Since short mode is
55074      # case insensitive, let's make it lowercase to improve readability.
55075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55076      # Now convert it back to Unix-style (cygpath)
55077      input_path=`$CYGPATH -u "$shortmode_path"`
55078      new_path="$input_path"
55079    fi
55080  fi
55081
55082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55083  if test "x$test_cygdrive_prefix" = x; then
55084    # As a simple fix, exclude /usr/bin since it's not a real path.
55085    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55087      # a path prefixed by /cygdrive for fixpath to work.
55088      new_path="$CYGWIN_ROOT_PATH$input_path"
55089    fi
55090  fi
55091
55092
55093  if test "x$path" != "x$new_path"; then
55094    MSVC_DLL="$new_path"
55095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55096$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55097  fi
55098
55099    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55100
55101  path="$MSVC_DLL"
55102  has_colon=`$ECHO $path | $GREP ^.:`
55103  new_path="$path"
55104  if test "x$has_colon" = x; then
55105    # Not in mixed or Windows style, start by that.
55106    new_path=`cmd //c echo $path`
55107  fi
55108
55109
55110  input_path="$new_path"
55111  # Check if we need to convert this using DOS-style short mode. If the path
55112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55113  # take no chances and rewrite it.
55114  # Note: m4 eats our [], so we need to use [ and ] instead.
55115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55116  if test "x$has_forbidden_chars" != x; then
55117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55118    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55119  fi
55120
55121
55122  windows_path="$new_path"
55123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55124    unix_path=`$CYGPATH -u "$windows_path"`
55125    new_path="$unix_path"
55126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55128    new_path="$unix_path"
55129  fi
55130
55131  if test "x$path" != "x$new_path"; then
55132    MSVC_DLL="$new_path"
55133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55134$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55135  fi
55136
55137  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55138  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55139
55140    else
55141      # We're on a unix platform. Hooray! :)
55142      path="$MSVC_DLL"
55143      has_space=`$ECHO "$path" | $GREP " "`
55144      if test "x$has_space" != x; then
55145        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55146$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55147        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55148      fi
55149
55150      # Use eval to expand a potential ~
55151      eval path="$path"
55152      if test ! -f "$path" && test ! -d "$path"; then
55153        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55154      fi
55155
55156      if test -d "$path"; then
55157        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55158      else
55159        dir="`$DIRNAME "$path"`"
55160        base="`$BASENAME "$path"`"
55161        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55162      fi
55163    fi
55164  fi
55165
55166      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55167$as_echo_n "checking for $DLL_NAME... " >&6; }
55168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55169$as_echo "$MSVC_DLL" >&6; }
55170    else
55171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55172$as_echo "incorrect, ignoring" >&6; }
55173      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55174$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55175    fi
55176  fi
55177
55178    fi
55179  fi
55180
55181  if test "x$MSVC_DLL" = x; then
55182    # Probe: Check in the Boot JDK directory.
55183    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55184
55185  DLL_NAME="$DLL_NAME"
55186  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55187  METHOD="well-known location in Boot JDK"
55188  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55189    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55190$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55191
55192    # Need to check if the found msvcr is correct architecture
55193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55194$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55195    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55197      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55198      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55199      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55200        CORRECT_MSVCR_ARCH="PE32 executable"
55201      else
55202        CORRECT_MSVCR_ARCH="PE32+ executable"
55203      fi
55204    else
55205      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55206        CORRECT_MSVCR_ARCH=386
55207      else
55208        CORRECT_MSVCR_ARCH=x86-64
55209      fi
55210    fi
55211    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55212      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55213$as_echo "ok" >&6; }
55214      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55215
55216  # Only process if variable expands to non-empty
55217
55218  if test "x$MSVC_DLL" != x; then
55219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55220
55221  # Input might be given as Windows format, start by converting to
55222  # unix format.
55223  path="$MSVC_DLL"
55224  new_path=`$CYGPATH -u "$path"`
55225
55226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55229  # "foo.exe" is OK but "foo" is an error.
55230  #
55231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55232  # It is also a way to make sure we got the proper file name for the real test later on.
55233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55234  if test "x$test_shortpath" = x; then
55235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55236$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55237    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55238  fi
55239
55240  # Call helper function which possibly converts this using DOS-style short mode.
55241  # If so, the updated path is stored in $new_path.
55242
55243  input_path="$new_path"
55244  # Check if we need to convert this using DOS-style short mode. If the path
55245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55246  # take no chances and rewrite it.
55247  # Note: m4 eats our [], so we need to use [ and ] instead.
55248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55249  if test "x$has_forbidden_chars" != x; then
55250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55254      # Going to short mode and back again did indeed matter. Since short mode is
55255      # case insensitive, let's make it lowercase to improve readability.
55256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55257      # Now convert it back to Unix-style (cygpath)
55258      input_path=`$CYGPATH -u "$shortmode_path"`
55259      new_path="$input_path"
55260    fi
55261  fi
55262
55263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55264  if test "x$test_cygdrive_prefix" = x; then
55265    # As a simple fix, exclude /usr/bin since it's not a real path.
55266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55268      # a path prefixed by /cygdrive for fixpath to work.
55269      new_path="$CYGWIN_ROOT_PATH$input_path"
55270    fi
55271  fi
55272
55273
55274  if test "x$path" != "x$new_path"; then
55275    MSVC_DLL="$new_path"
55276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55277$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55278  fi
55279
55280    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55281
55282  path="$MSVC_DLL"
55283  has_colon=`$ECHO $path | $GREP ^.:`
55284  new_path="$path"
55285  if test "x$has_colon" = x; then
55286    # Not in mixed or Windows style, start by that.
55287    new_path=`cmd //c echo $path`
55288  fi
55289
55290
55291  input_path="$new_path"
55292  # Check if we need to convert this using DOS-style short mode. If the path
55293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55294  # take no chances and rewrite it.
55295  # Note: m4 eats our [], so we need to use [ and ] instead.
55296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55297  if test "x$has_forbidden_chars" != x; then
55298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55300  fi
55301
55302
55303  windows_path="$new_path"
55304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55305    unix_path=`$CYGPATH -u "$windows_path"`
55306    new_path="$unix_path"
55307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55309    new_path="$unix_path"
55310  fi
55311
55312  if test "x$path" != "x$new_path"; then
55313    MSVC_DLL="$new_path"
55314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55315$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55316  fi
55317
55318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55320
55321    else
55322      # We're on a unix platform. Hooray! :)
55323      path="$MSVC_DLL"
55324      has_space=`$ECHO "$path" | $GREP " "`
55325      if test "x$has_space" != x; then
55326        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55327$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55328        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55329      fi
55330
55331      # Use eval to expand a potential ~
55332      eval path="$path"
55333      if test ! -f "$path" && test ! -d "$path"; then
55334        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55335      fi
55336
55337      if test -d "$path"; then
55338        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55339      else
55340        dir="`$DIRNAME "$path"`"
55341        base="`$BASENAME "$path"`"
55342        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55343      fi
55344    fi
55345  fi
55346
55347      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55348$as_echo_n "checking for $DLL_NAME... " >&6; }
55349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55350$as_echo "$MSVC_DLL" >&6; }
55351    else
55352      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55353$as_echo "incorrect, ignoring" >&6; }
55354      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55355$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55356    fi
55357  fi
55358
55359  fi
55360
55361  if test "x$MSVC_DLL" = x; then
55362    # Probe: Look in the Windows system32 directory
55363    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55364
55365  windows_path="$CYGWIN_SYSTEMROOT"
55366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55367    unix_path=`$CYGPATH -u "$windows_path"`
55368    CYGWIN_SYSTEMROOT="$unix_path"
55369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55371    CYGWIN_SYSTEMROOT="$unix_path"
55372  fi
55373
55374    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55375
55376  DLL_NAME="$DLL_NAME"
55377  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55378  METHOD="well-known location in SYSTEMROOT"
55379  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55380    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55381$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55382
55383    # Need to check if the found msvcr is correct architecture
55384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55385$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55386    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55387    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55388      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55389      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55390      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55391        CORRECT_MSVCR_ARCH="PE32 executable"
55392      else
55393        CORRECT_MSVCR_ARCH="PE32+ executable"
55394      fi
55395    else
55396      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55397        CORRECT_MSVCR_ARCH=386
55398      else
55399        CORRECT_MSVCR_ARCH=x86-64
55400      fi
55401    fi
55402    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55403      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55404$as_echo "ok" >&6; }
55405      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55406
55407  # Only process if variable expands to non-empty
55408
55409  if test "x$MSVC_DLL" != x; then
55410    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55411
55412  # Input might be given as Windows format, start by converting to
55413  # unix format.
55414  path="$MSVC_DLL"
55415  new_path=`$CYGPATH -u "$path"`
55416
55417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55420  # "foo.exe" is OK but "foo" is an error.
55421  #
55422  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55423  # It is also a way to make sure we got the proper file name for the real test later on.
55424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55425  if test "x$test_shortpath" = x; then
55426    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55427$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55428    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55429  fi
55430
55431  # Call helper function which possibly converts this using DOS-style short mode.
55432  # If so, the updated path is stored in $new_path.
55433
55434  input_path="$new_path"
55435  # Check if we need to convert this using DOS-style short mode. If the path
55436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55437  # take no chances and rewrite it.
55438  # Note: m4 eats our [], so we need to use [ and ] instead.
55439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55440  if test "x$has_forbidden_chars" != x; then
55441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55445      # Going to short mode and back again did indeed matter. Since short mode is
55446      # case insensitive, let's make it lowercase to improve readability.
55447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55448      # Now convert it back to Unix-style (cygpath)
55449      input_path=`$CYGPATH -u "$shortmode_path"`
55450      new_path="$input_path"
55451    fi
55452  fi
55453
55454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55455  if test "x$test_cygdrive_prefix" = x; then
55456    # As a simple fix, exclude /usr/bin since it's not a real path.
55457    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55459      # a path prefixed by /cygdrive for fixpath to work.
55460      new_path="$CYGWIN_ROOT_PATH$input_path"
55461    fi
55462  fi
55463
55464
55465  if test "x$path" != "x$new_path"; then
55466    MSVC_DLL="$new_path"
55467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55468$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55469  fi
55470
55471    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55472
55473  path="$MSVC_DLL"
55474  has_colon=`$ECHO $path | $GREP ^.:`
55475  new_path="$path"
55476  if test "x$has_colon" = x; then
55477    # Not in mixed or Windows style, start by that.
55478    new_path=`cmd //c echo $path`
55479  fi
55480
55481
55482  input_path="$new_path"
55483  # Check if we need to convert this using DOS-style short mode. If the path
55484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55485  # take no chances and rewrite it.
55486  # Note: m4 eats our [], so we need to use [ and ] instead.
55487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55488  if test "x$has_forbidden_chars" != x; then
55489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55491  fi
55492
55493
55494  windows_path="$new_path"
55495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55496    unix_path=`$CYGPATH -u "$windows_path"`
55497    new_path="$unix_path"
55498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55500    new_path="$unix_path"
55501  fi
55502
55503  if test "x$path" != "x$new_path"; then
55504    MSVC_DLL="$new_path"
55505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55506$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55507  fi
55508
55509  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55510  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55511
55512    else
55513      # We're on a unix platform. Hooray! :)
55514      path="$MSVC_DLL"
55515      has_space=`$ECHO "$path" | $GREP " "`
55516      if test "x$has_space" != x; then
55517        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55518$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55519        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55520      fi
55521
55522      # Use eval to expand a potential ~
55523      eval path="$path"
55524      if test ! -f "$path" && test ! -d "$path"; then
55525        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55526      fi
55527
55528      if test -d "$path"; then
55529        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55530      else
55531        dir="`$DIRNAME "$path"`"
55532        base="`$BASENAME "$path"`"
55533        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55534      fi
55535    fi
55536  fi
55537
55538      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55539$as_echo_n "checking for $DLL_NAME... " >&6; }
55540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55541$as_echo "$MSVC_DLL" >&6; }
55542    else
55543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55544$as_echo "incorrect, ignoring" >&6; }
55545      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55546$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55547    fi
55548  fi
55549
55550  fi
55551
55552  if test "x$MSVC_DLL" = x; then
55553    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55554    if test "x$VS100COMNTOOLS" != x; then
55555      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55556
55557  windows_path="$CYGWIN_VS_TOOLS_DIR"
55558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55559    unix_path=`$CYGPATH -u "$windows_path"`
55560    CYGWIN_VS_TOOLS_DIR="$unix_path"
55561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55563    CYGWIN_VS_TOOLS_DIR="$unix_path"
55564  fi
55565
55566      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55567        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55568	    | $GREP -i /x64/ | $HEAD --lines 1`
55569      else
55570        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55571	    | $GREP -i /x86/ | $HEAD --lines 1`
55572      fi
55573
55574  DLL_NAME="$DLL_NAME"
55575  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55576  METHOD="search of VS100COMNTOOLS"
55577  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55578    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55579$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55580
55581    # Need to check if the found msvcr is correct architecture
55582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55583$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55584    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55586      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55587      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55588      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55589        CORRECT_MSVCR_ARCH="PE32 executable"
55590      else
55591        CORRECT_MSVCR_ARCH="PE32+ executable"
55592      fi
55593    else
55594      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55595        CORRECT_MSVCR_ARCH=386
55596      else
55597        CORRECT_MSVCR_ARCH=x86-64
55598      fi
55599    fi
55600    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55601      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55602$as_echo "ok" >&6; }
55603      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55604
55605  # Only process if variable expands to non-empty
55606
55607  if test "x$MSVC_DLL" != x; then
55608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55609
55610  # Input might be given as Windows format, start by converting to
55611  # unix format.
55612  path="$MSVC_DLL"
55613  new_path=`$CYGPATH -u "$path"`
55614
55615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55618  # "foo.exe" is OK but "foo" is an error.
55619  #
55620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55621  # It is also a way to make sure we got the proper file name for the real test later on.
55622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55623  if test "x$test_shortpath" = x; then
55624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55625$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55626    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55627  fi
55628
55629  # Call helper function which possibly converts this using DOS-style short mode.
55630  # If so, the updated path is stored in $new_path.
55631
55632  input_path="$new_path"
55633  # Check if we need to convert this using DOS-style short mode. If the path
55634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55635  # take no chances and rewrite it.
55636  # Note: m4 eats our [], so we need to use [ and ] instead.
55637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55638  if test "x$has_forbidden_chars" != x; then
55639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55643      # Going to short mode and back again did indeed matter. Since short mode is
55644      # case insensitive, let's make it lowercase to improve readability.
55645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55646      # Now convert it back to Unix-style (cygpath)
55647      input_path=`$CYGPATH -u "$shortmode_path"`
55648      new_path="$input_path"
55649    fi
55650  fi
55651
55652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55653  if test "x$test_cygdrive_prefix" = x; then
55654    # As a simple fix, exclude /usr/bin since it's not a real path.
55655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55657      # a path prefixed by /cygdrive for fixpath to work.
55658      new_path="$CYGWIN_ROOT_PATH$input_path"
55659    fi
55660  fi
55661
55662
55663  if test "x$path" != "x$new_path"; then
55664    MSVC_DLL="$new_path"
55665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55666$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55667  fi
55668
55669    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55670
55671  path="$MSVC_DLL"
55672  has_colon=`$ECHO $path | $GREP ^.:`
55673  new_path="$path"
55674  if test "x$has_colon" = x; then
55675    # Not in mixed or Windows style, start by that.
55676    new_path=`cmd //c echo $path`
55677  fi
55678
55679
55680  input_path="$new_path"
55681  # Check if we need to convert this using DOS-style short mode. If the path
55682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55683  # take no chances and rewrite it.
55684  # Note: m4 eats our [], so we need to use [ and ] instead.
55685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55686  if test "x$has_forbidden_chars" != x; then
55687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55689  fi
55690
55691
55692  windows_path="$new_path"
55693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55694    unix_path=`$CYGPATH -u "$windows_path"`
55695    new_path="$unix_path"
55696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55698    new_path="$unix_path"
55699  fi
55700
55701  if test "x$path" != "x$new_path"; then
55702    MSVC_DLL="$new_path"
55703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55704$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55705  fi
55706
55707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55709
55710    else
55711      # We're on a unix platform. Hooray! :)
55712      path="$MSVC_DLL"
55713      has_space=`$ECHO "$path" | $GREP " "`
55714      if test "x$has_space" != x; then
55715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55716$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55717        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55718      fi
55719
55720      # Use eval to expand a potential ~
55721      eval path="$path"
55722      if test ! -f "$path" && test ! -d "$path"; then
55723        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55724      fi
55725
55726      if test -d "$path"; then
55727        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55728      else
55729        dir="`$DIRNAME "$path"`"
55730        base="`$BASENAME "$path"`"
55731        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55732      fi
55733    fi
55734  fi
55735
55736      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55737$as_echo_n "checking for $DLL_NAME... " >&6; }
55738      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55739$as_echo "$MSVC_DLL" >&6; }
55740    else
55741      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55742$as_echo "incorrect, ignoring" >&6; }
55743      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55744$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55745    fi
55746  fi
55747
55748    fi
55749  fi
55750
55751  if test "x$MSVC_DLL" = x; then
55752    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55753    # (This was the original behaviour; kept since it might turn something up)
55754    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55755      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55756        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55757	    | $GREP x64 | $HEAD --lines 1`
55758      else
55759        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55760	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55761        if test "x$POSSIBLE_MSVC_DLL" = x; then
55762          # We're grasping at straws now...
55763          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55764	      | $HEAD --lines 1`
55765        fi
55766      fi
55767
55768
55769  DLL_NAME="$DLL_NAME"
55770  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55771  METHOD="search of VCINSTALLDIR"
55772  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55773    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55774$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55775
55776    # Need to check if the found msvcr is correct architecture
55777    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55778$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55779    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55781      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55782      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55783      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55784        CORRECT_MSVCR_ARCH="PE32 executable"
55785      else
55786        CORRECT_MSVCR_ARCH="PE32+ executable"
55787      fi
55788    else
55789      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55790        CORRECT_MSVCR_ARCH=386
55791      else
55792        CORRECT_MSVCR_ARCH=x86-64
55793      fi
55794    fi
55795    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55797$as_echo "ok" >&6; }
55798      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55799
55800  # Only process if variable expands to non-empty
55801
55802  if test "x$MSVC_DLL" != x; then
55803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55804
55805  # Input might be given as Windows format, start by converting to
55806  # unix format.
55807  path="$MSVC_DLL"
55808  new_path=`$CYGPATH -u "$path"`
55809
55810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55813  # "foo.exe" is OK but "foo" is an error.
55814  #
55815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55816  # It is also a way to make sure we got the proper file name for the real test later on.
55817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55818  if test "x$test_shortpath" = x; then
55819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55820$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55821    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55822  fi
55823
55824  # Call helper function which possibly converts this using DOS-style short mode.
55825  # If so, the updated path is stored in $new_path.
55826
55827  input_path="$new_path"
55828  # Check if we need to convert this using DOS-style short mode. If the path
55829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55830  # take no chances and rewrite it.
55831  # Note: m4 eats our [], so we need to use [ and ] instead.
55832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55833  if test "x$has_forbidden_chars" != x; then
55834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55838      # Going to short mode and back again did indeed matter. Since short mode is
55839      # case insensitive, let's make it lowercase to improve readability.
55840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55841      # Now convert it back to Unix-style (cygpath)
55842      input_path=`$CYGPATH -u "$shortmode_path"`
55843      new_path="$input_path"
55844    fi
55845  fi
55846
55847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55848  if test "x$test_cygdrive_prefix" = x; then
55849    # As a simple fix, exclude /usr/bin since it's not a real path.
55850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55852      # a path prefixed by /cygdrive for fixpath to work.
55853      new_path="$CYGWIN_ROOT_PATH$input_path"
55854    fi
55855  fi
55856
55857
55858  if test "x$path" != "x$new_path"; then
55859    MSVC_DLL="$new_path"
55860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55861$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55862  fi
55863
55864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55865
55866  path="$MSVC_DLL"
55867  has_colon=`$ECHO $path | $GREP ^.:`
55868  new_path="$path"
55869  if test "x$has_colon" = x; then
55870    # Not in mixed or Windows style, start by that.
55871    new_path=`cmd //c echo $path`
55872  fi
55873
55874
55875  input_path="$new_path"
55876  # Check if we need to convert this using DOS-style short mode. If the path
55877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55878  # take no chances and rewrite it.
55879  # Note: m4 eats our [], so we need to use [ and ] instead.
55880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55881  if test "x$has_forbidden_chars" != x; then
55882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55884  fi
55885
55886
55887  windows_path="$new_path"
55888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55889    unix_path=`$CYGPATH -u "$windows_path"`
55890    new_path="$unix_path"
55891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55893    new_path="$unix_path"
55894  fi
55895
55896  if test "x$path" != "x$new_path"; then
55897    MSVC_DLL="$new_path"
55898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55899$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55900  fi
55901
55902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55904
55905    else
55906      # We're on a unix platform. Hooray! :)
55907      path="$MSVC_DLL"
55908      has_space=`$ECHO "$path" | $GREP " "`
55909      if test "x$has_space" != x; then
55910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55911$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55912        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55913      fi
55914
55915      # Use eval to expand a potential ~
55916      eval path="$path"
55917      if test ! -f "$path" && test ! -d "$path"; then
55918        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55919      fi
55920
55921      if test -d "$path"; then
55922        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55923      else
55924        dir="`$DIRNAME "$path"`"
55925        base="`$BASENAME "$path"`"
55926        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55927      fi
55928    fi
55929  fi
55930
55931      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55932$as_echo_n "checking for $DLL_NAME... " >&6; }
55933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55934$as_echo "$MSVC_DLL" >&6; }
55935    else
55936      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55937$as_echo "incorrect, ignoring" >&6; }
55938      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55939$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55940    fi
55941  fi
55942
55943    fi
55944  fi
55945
55946  if test "x$MSVC_DLL" = x; then
55947    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55948$as_echo_n "checking for $DLL_NAME... " >&6; }
55949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55950$as_echo "no" >&6; }
55951    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55952  fi
55953
55954      MSVCP_DLL="$MSVC_DLL"
55955    fi
55956
55957  fi
55958
55959  fi
55960
55961
55962  if test "x$NEEDS_LIB_X11" = xfalse; then
55963    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55964      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55965$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55966    fi
55967    X_CFLAGS=
55968    X_LIBS=
55969  else
55970
55971    if test "x${with_x}" = xno; then
55972      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55973    fi
55974
55975    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55976      # The user has specified a X11 base directory. Use it for includes and
55977      # libraries, unless explicitely overridden.
55978      if test "x$x_includes" = xNONE; then
55979        x_includes="${with_x}/include"
55980      fi
55981      if test "x$x_libraries" = xNONE; then
55982        x_libraries="${with_x}/lib"
55983      fi
55984    else
55985      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55986      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55987      # --x-libraries for the sysroot, if that seems to be correct.
55988      if test "x$SYSROOT" != "x"; then
55989        if test "x$x_includes" = xNONE; then
55990          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55991            x_includes="$SYSROOT/usr/X11R6/include"
55992          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55993            x_includes="$SYSROOT/usr/include"
55994          fi
55995        fi
55996        if test "x$x_libraries" = xNONE; then
55997          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55998            x_libraries="$SYSROOT/usr/X11R6/lib"
55999          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56000            x_libraries="$SYSROOT/usr/lib64"
56001          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56002            x_libraries="$SYSROOT/usr/lib"
56003          fi
56004        fi
56005      fi
56006    fi
56007
56008    # Now let autoconf do it's magic
56009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56010$as_echo_n "checking for X... " >&6; }
56011
56012
56013# Check whether --with-x was given.
56014if test "${with_x+set}" = set; then :
56015  withval=$with_x;
56016fi
56017
56018# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56019if test "x$with_x" = xno; then
56020  # The user explicitly disabled X.
56021  have_x=disabled
56022else
56023  case $x_includes,$x_libraries in #(
56024    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56025    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56026  $as_echo_n "(cached) " >&6
56027else
56028  # One or both of the vars are not set, and there is no cached value.
56029ac_x_includes=no ac_x_libraries=no
56030rm -f -r conftest.dir
56031if mkdir conftest.dir; then
56032  cd conftest.dir
56033  cat >Imakefile <<'_ACEOF'
56034incroot:
56035	@echo incroot='${INCROOT}'
56036usrlibdir:
56037	@echo usrlibdir='${USRLIBDIR}'
56038libdir:
56039	@echo libdir='${LIBDIR}'
56040_ACEOF
56041  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56042    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56043    for ac_var in incroot usrlibdir libdir; do
56044      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56045    done
56046    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56047    for ac_extension in a so sl dylib la dll; do
56048      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56049	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56050	ac_im_usrlibdir=$ac_im_libdir; break
56051      fi
56052    done
56053    # Screen out bogus values from the imake configuration.  They are
56054    # bogus both because they are the default anyway, and because
56055    # using them would break gcc on systems where it needs fixed includes.
56056    case $ac_im_incroot in
56057	/usr/include) ac_x_includes= ;;
56058	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56059    esac
56060    case $ac_im_usrlibdir in
56061	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56062	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56063    esac
56064  fi
56065  cd ..
56066  rm -f -r conftest.dir
56067fi
56068
56069# Standard set of common directories for X headers.
56070# Check X11 before X11Rn because it is often a symlink to the current release.
56071ac_x_header_dirs='
56072/usr/X11/include
56073/usr/X11R7/include
56074/usr/X11R6/include
56075/usr/X11R5/include
56076/usr/X11R4/include
56077
56078/usr/include/X11
56079/usr/include/X11R7
56080/usr/include/X11R6
56081/usr/include/X11R5
56082/usr/include/X11R4
56083
56084/usr/local/X11/include
56085/usr/local/X11R7/include
56086/usr/local/X11R6/include
56087/usr/local/X11R5/include
56088/usr/local/X11R4/include
56089
56090/usr/local/include/X11
56091/usr/local/include/X11R7
56092/usr/local/include/X11R6
56093/usr/local/include/X11R5
56094/usr/local/include/X11R4
56095
56096/usr/X386/include
56097/usr/x386/include
56098/usr/XFree86/include/X11
56099
56100/usr/include
56101/usr/local/include
56102/usr/unsupported/include
56103/usr/athena/include
56104/usr/local/x11r5/include
56105/usr/lpp/Xamples/include
56106
56107/usr/openwin/include
56108/usr/openwin/share/include'
56109
56110if test "$ac_x_includes" = no; then
56111  # Guess where to find include files, by looking for Xlib.h.
56112  # First, try using that file with no special directory specified.
56113  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56114/* end confdefs.h.  */
56115#include <X11/Xlib.h>
56116_ACEOF
56117if ac_fn_cxx_try_cpp "$LINENO"; then :
56118  # We can compile using X headers with no special include directory.
56119ac_x_includes=
56120else
56121  for ac_dir in $ac_x_header_dirs; do
56122  if test -r "$ac_dir/X11/Xlib.h"; then
56123    ac_x_includes=$ac_dir
56124    break
56125  fi
56126done
56127fi
56128rm -f conftest.err conftest.i conftest.$ac_ext
56129fi # $ac_x_includes = no
56130
56131if test "$ac_x_libraries" = no; then
56132  # Check for the libraries.
56133  # See if we find them without any special options.
56134  # Don't add to $LIBS permanently.
56135  ac_save_LIBS=$LIBS
56136  LIBS="-lX11 $LIBS"
56137  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56138/* end confdefs.h.  */
56139#include <X11/Xlib.h>
56140int
56141main ()
56142{
56143XrmInitialize ()
56144  ;
56145  return 0;
56146}
56147_ACEOF
56148if ac_fn_cxx_try_link "$LINENO"; then :
56149  LIBS=$ac_save_LIBS
56150# We can link X programs with no special library path.
56151ac_x_libraries=
56152else
56153  LIBS=$ac_save_LIBS
56154for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56155do
56156  # Don't even attempt the hair of trying to link an X program!
56157  for ac_extension in a so sl dylib la dll; do
56158    if test -r "$ac_dir/libX11.$ac_extension"; then
56159      ac_x_libraries=$ac_dir
56160      break 2
56161    fi
56162  done
56163done
56164fi
56165rm -f core conftest.err conftest.$ac_objext \
56166    conftest$ac_exeext conftest.$ac_ext
56167fi # $ac_x_libraries = no
56168
56169case $ac_x_includes,$ac_x_libraries in #(
56170  no,* | *,no | *\'*)
56171    # Didn't find X, or a directory has "'" in its name.
56172    ac_cv_have_x="have_x=no";; #(
56173  *)
56174    # Record where we found X for the cache.
56175    ac_cv_have_x="have_x=yes\
56176	ac_x_includes='$ac_x_includes'\
56177	ac_x_libraries='$ac_x_libraries'"
56178esac
56179fi
56180;; #(
56181    *) have_x=yes;;
56182  esac
56183  eval "$ac_cv_have_x"
56184fi # $with_x != no
56185
56186if test "$have_x" != yes; then
56187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56188$as_echo "$have_x" >&6; }
56189  no_x=yes
56190else
56191  # If each of the values was on the command line, it overrides each guess.
56192  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56193  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56194  # Update the cache value to reflect the command line values.
56195  ac_cv_have_x="have_x=yes\
56196	ac_x_includes='$x_includes'\
56197	ac_x_libraries='$x_libraries'"
56198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56199$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56200fi
56201
56202    if test "$no_x" = yes; then
56203  # Not all programs may use this symbol, but it does not hurt to define it.
56204
56205$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56206
56207  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56208else
56209  if test -n "$x_includes"; then
56210    X_CFLAGS="$X_CFLAGS -I$x_includes"
56211  fi
56212
56213  # It would also be nice to do this for all -L options, not just this one.
56214  if test -n "$x_libraries"; then
56215    X_LIBS="$X_LIBS -L$x_libraries"
56216    # For Solaris; some versions of Sun CC require a space after -R and
56217    # others require no space.  Words are not sufficient . . . .
56218    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56219$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56220    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56221    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56222    ac_cxx_werror_flag=yes
56223    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56224/* end confdefs.h.  */
56225
56226int
56227main ()
56228{
56229
56230  ;
56231  return 0;
56232}
56233_ACEOF
56234if ac_fn_cxx_try_link "$LINENO"; then :
56235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56236$as_echo "no" >&6; }
56237       X_LIBS="$X_LIBS -R$x_libraries"
56238else
56239  LIBS="$ac_xsave_LIBS -R $x_libraries"
56240       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56241/* end confdefs.h.  */
56242
56243int
56244main ()
56245{
56246
56247  ;
56248  return 0;
56249}
56250_ACEOF
56251if ac_fn_cxx_try_link "$LINENO"; then :
56252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56253$as_echo "yes" >&6; }
56254	  X_LIBS="$X_LIBS -R $x_libraries"
56255else
56256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56257$as_echo "neither works" >&6; }
56258fi
56259rm -f core conftest.err conftest.$ac_objext \
56260    conftest$ac_exeext conftest.$ac_ext
56261fi
56262rm -f core conftest.err conftest.$ac_objext \
56263    conftest$ac_exeext conftest.$ac_ext
56264    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56265    LIBS=$ac_xsave_LIBS
56266  fi
56267
56268  # Check for system-dependent libraries X programs must link with.
56269  # Do this before checking for the system-independent R6 libraries
56270  # (-lICE), since we may need -lsocket or whatever for X linking.
56271
56272  if test "$ISC" = yes; then
56273    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56274  else
56275    # Martyn Johnson says this is needed for Ultrix, if the X
56276    # libraries were built with DECnet support.  And Karl Berry says
56277    # the Alpha needs dnet_stub (dnet does not exist).
56278    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56279    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56280/* end confdefs.h.  */
56281
56282/* Override any GCC internal prototype to avoid an error.
56283   Use char because int might match the return type of a GCC
56284   builtin and then its argument prototype would still apply.  */
56285#ifdef __cplusplus
56286extern "C"
56287#endif
56288char XOpenDisplay ();
56289int
56290main ()
56291{
56292return XOpenDisplay ();
56293  ;
56294  return 0;
56295}
56296_ACEOF
56297if ac_fn_cxx_try_link "$LINENO"; then :
56298
56299else
56300  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56301$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56302if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56303  $as_echo_n "(cached) " >&6
56304else
56305  ac_check_lib_save_LIBS=$LIBS
56306LIBS="-ldnet  $LIBS"
56307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56308/* end confdefs.h.  */
56309
56310/* Override any GCC internal prototype to avoid an error.
56311   Use char because int might match the return type of a GCC
56312   builtin and then its argument prototype would still apply.  */
56313#ifdef __cplusplus
56314extern "C"
56315#endif
56316char dnet_ntoa ();
56317int
56318main ()
56319{
56320return dnet_ntoa ();
56321  ;
56322  return 0;
56323}
56324_ACEOF
56325if ac_fn_cxx_try_link "$LINENO"; then :
56326  ac_cv_lib_dnet_dnet_ntoa=yes
56327else
56328  ac_cv_lib_dnet_dnet_ntoa=no
56329fi
56330rm -f core conftest.err conftest.$ac_objext \
56331    conftest$ac_exeext conftest.$ac_ext
56332LIBS=$ac_check_lib_save_LIBS
56333fi
56334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56335$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56336if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56337  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56338fi
56339
56340    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56341      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56342$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56343if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56344  $as_echo_n "(cached) " >&6
56345else
56346  ac_check_lib_save_LIBS=$LIBS
56347LIBS="-ldnet_stub  $LIBS"
56348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56349/* end confdefs.h.  */
56350
56351/* Override any GCC internal prototype to avoid an error.
56352   Use char because int might match the return type of a GCC
56353   builtin and then its argument prototype would still apply.  */
56354#ifdef __cplusplus
56355extern "C"
56356#endif
56357char dnet_ntoa ();
56358int
56359main ()
56360{
56361return dnet_ntoa ();
56362  ;
56363  return 0;
56364}
56365_ACEOF
56366if ac_fn_cxx_try_link "$LINENO"; then :
56367  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56368else
56369  ac_cv_lib_dnet_stub_dnet_ntoa=no
56370fi
56371rm -f core conftest.err conftest.$ac_objext \
56372    conftest$ac_exeext conftest.$ac_ext
56373LIBS=$ac_check_lib_save_LIBS
56374fi
56375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56376$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56377if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56378  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56379fi
56380
56381    fi
56382fi
56383rm -f core conftest.err conftest.$ac_objext \
56384    conftest$ac_exeext conftest.$ac_ext
56385    LIBS="$ac_xsave_LIBS"
56386
56387    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56388    # to get the SysV transport functions.
56389    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56390    # needs -lnsl.
56391    # The nsl library prevents programs from opening the X display
56392    # on Irix 5.2, according to T.E. Dickey.
56393    # The functions gethostbyname, getservbyname, and inet_addr are
56394    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56395    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56396if test "x$ac_cv_func_gethostbyname" = xyes; then :
56397
56398fi
56399
56400    if test $ac_cv_func_gethostbyname = no; then
56401      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56402$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56403if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56404  $as_echo_n "(cached) " >&6
56405else
56406  ac_check_lib_save_LIBS=$LIBS
56407LIBS="-lnsl  $LIBS"
56408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56409/* end confdefs.h.  */
56410
56411/* Override any GCC internal prototype to avoid an error.
56412   Use char because int might match the return type of a GCC
56413   builtin and then its argument prototype would still apply.  */
56414#ifdef __cplusplus
56415extern "C"
56416#endif
56417char gethostbyname ();
56418int
56419main ()
56420{
56421return gethostbyname ();
56422  ;
56423  return 0;
56424}
56425_ACEOF
56426if ac_fn_cxx_try_link "$LINENO"; then :
56427  ac_cv_lib_nsl_gethostbyname=yes
56428else
56429  ac_cv_lib_nsl_gethostbyname=no
56430fi
56431rm -f core conftest.err conftest.$ac_objext \
56432    conftest$ac_exeext conftest.$ac_ext
56433LIBS=$ac_check_lib_save_LIBS
56434fi
56435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56436$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56437if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56438  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56439fi
56440
56441      if test $ac_cv_lib_nsl_gethostbyname = no; then
56442	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56443$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56444if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56445  $as_echo_n "(cached) " >&6
56446else
56447  ac_check_lib_save_LIBS=$LIBS
56448LIBS="-lbsd  $LIBS"
56449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56450/* end confdefs.h.  */
56451
56452/* Override any GCC internal prototype to avoid an error.
56453   Use char because int might match the return type of a GCC
56454   builtin and then its argument prototype would still apply.  */
56455#ifdef __cplusplus
56456extern "C"
56457#endif
56458char gethostbyname ();
56459int
56460main ()
56461{
56462return gethostbyname ();
56463  ;
56464  return 0;
56465}
56466_ACEOF
56467if ac_fn_cxx_try_link "$LINENO"; then :
56468  ac_cv_lib_bsd_gethostbyname=yes
56469else
56470  ac_cv_lib_bsd_gethostbyname=no
56471fi
56472rm -f core conftest.err conftest.$ac_objext \
56473    conftest$ac_exeext conftest.$ac_ext
56474LIBS=$ac_check_lib_save_LIBS
56475fi
56476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56477$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56478if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56479  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56480fi
56481
56482      fi
56483    fi
56484
56485    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56486    # socket/setsockopt and other routines are undefined under SCO ODT
56487    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56488    # on later versions), says Simon Leinen: it contains gethostby*
56489    # variants that don't use the name server (or something).  -lsocket
56490    # must be given before -lnsl if both are needed.  We assume that
56491    # if connect needs -lnsl, so does gethostbyname.
56492    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56493if test "x$ac_cv_func_connect" = xyes; then :
56494
56495fi
56496
56497    if test $ac_cv_func_connect = no; then
56498      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56499$as_echo_n "checking for connect in -lsocket... " >&6; }
56500if ${ac_cv_lib_socket_connect+:} false; then :
56501  $as_echo_n "(cached) " >&6
56502else
56503  ac_check_lib_save_LIBS=$LIBS
56504LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56506/* end confdefs.h.  */
56507
56508/* Override any GCC internal prototype to avoid an error.
56509   Use char because int might match the return type of a GCC
56510   builtin and then its argument prototype would still apply.  */
56511#ifdef __cplusplus
56512extern "C"
56513#endif
56514char connect ();
56515int
56516main ()
56517{
56518return connect ();
56519  ;
56520  return 0;
56521}
56522_ACEOF
56523if ac_fn_cxx_try_link "$LINENO"; then :
56524  ac_cv_lib_socket_connect=yes
56525else
56526  ac_cv_lib_socket_connect=no
56527fi
56528rm -f core conftest.err conftest.$ac_objext \
56529    conftest$ac_exeext conftest.$ac_ext
56530LIBS=$ac_check_lib_save_LIBS
56531fi
56532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56533$as_echo "$ac_cv_lib_socket_connect" >&6; }
56534if test "x$ac_cv_lib_socket_connect" = xyes; then :
56535  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56536fi
56537
56538    fi
56539
56540    # Guillermo Gomez says -lposix is necessary on A/UX.
56541    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56542if test "x$ac_cv_func_remove" = xyes; then :
56543
56544fi
56545
56546    if test $ac_cv_func_remove = no; then
56547      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56548$as_echo_n "checking for remove in -lposix... " >&6; }
56549if ${ac_cv_lib_posix_remove+:} false; then :
56550  $as_echo_n "(cached) " >&6
56551else
56552  ac_check_lib_save_LIBS=$LIBS
56553LIBS="-lposix  $LIBS"
56554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56555/* end confdefs.h.  */
56556
56557/* Override any GCC internal prototype to avoid an error.
56558   Use char because int might match the return type of a GCC
56559   builtin and then its argument prototype would still apply.  */
56560#ifdef __cplusplus
56561extern "C"
56562#endif
56563char remove ();
56564int
56565main ()
56566{
56567return remove ();
56568  ;
56569  return 0;
56570}
56571_ACEOF
56572if ac_fn_cxx_try_link "$LINENO"; then :
56573  ac_cv_lib_posix_remove=yes
56574else
56575  ac_cv_lib_posix_remove=no
56576fi
56577rm -f core conftest.err conftest.$ac_objext \
56578    conftest$ac_exeext conftest.$ac_ext
56579LIBS=$ac_check_lib_save_LIBS
56580fi
56581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56582$as_echo "$ac_cv_lib_posix_remove" >&6; }
56583if test "x$ac_cv_lib_posix_remove" = xyes; then :
56584  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56585fi
56586
56587    fi
56588
56589    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56590    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56591if test "x$ac_cv_func_shmat" = xyes; then :
56592
56593fi
56594
56595    if test $ac_cv_func_shmat = no; then
56596      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56597$as_echo_n "checking for shmat in -lipc... " >&6; }
56598if ${ac_cv_lib_ipc_shmat+:} false; then :
56599  $as_echo_n "(cached) " >&6
56600else
56601  ac_check_lib_save_LIBS=$LIBS
56602LIBS="-lipc  $LIBS"
56603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56604/* end confdefs.h.  */
56605
56606/* Override any GCC internal prototype to avoid an error.
56607   Use char because int might match the return type of a GCC
56608   builtin and then its argument prototype would still apply.  */
56609#ifdef __cplusplus
56610extern "C"
56611#endif
56612char shmat ();
56613int
56614main ()
56615{
56616return shmat ();
56617  ;
56618  return 0;
56619}
56620_ACEOF
56621if ac_fn_cxx_try_link "$LINENO"; then :
56622  ac_cv_lib_ipc_shmat=yes
56623else
56624  ac_cv_lib_ipc_shmat=no
56625fi
56626rm -f core conftest.err conftest.$ac_objext \
56627    conftest$ac_exeext conftest.$ac_ext
56628LIBS=$ac_check_lib_save_LIBS
56629fi
56630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56631$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56632if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56633  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56634fi
56635
56636    fi
56637  fi
56638
56639  # Check for libraries that X11R6 Xt/Xaw programs need.
56640  ac_save_LDFLAGS=$LDFLAGS
56641  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56642  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56643  # check for ICE first), but we must link in the order -lSM -lICE or
56644  # we get undefined symbols.  So assume we have SM if we have ICE.
56645  # These have to be linked with before -lX11, unlike the other
56646  # libraries we check for below, so use a different variable.
56647  # John Interrante, Karl Berry
56648  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56649$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56650if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56651  $as_echo_n "(cached) " >&6
56652else
56653  ac_check_lib_save_LIBS=$LIBS
56654LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56656/* end confdefs.h.  */
56657
56658/* Override any GCC internal prototype to avoid an error.
56659   Use char because int might match the return type of a GCC
56660   builtin and then its argument prototype would still apply.  */
56661#ifdef __cplusplus
56662extern "C"
56663#endif
56664char IceConnectionNumber ();
56665int
56666main ()
56667{
56668return IceConnectionNumber ();
56669  ;
56670  return 0;
56671}
56672_ACEOF
56673if ac_fn_cxx_try_link "$LINENO"; then :
56674  ac_cv_lib_ICE_IceConnectionNumber=yes
56675else
56676  ac_cv_lib_ICE_IceConnectionNumber=no
56677fi
56678rm -f core conftest.err conftest.$ac_objext \
56679    conftest$ac_exeext conftest.$ac_ext
56680LIBS=$ac_check_lib_save_LIBS
56681fi
56682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56683$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56684if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56685  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56686fi
56687
56688  LDFLAGS=$ac_save_LDFLAGS
56689
56690fi
56691
56692
56693    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56694    # this doesn't make sense so we remove it.
56695    if test "x$COMPILE_TYPE" = xcross; then
56696      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56697    fi
56698
56699    if test "x$no_x" = xyes; then
56700
56701  # Print a helpful message on how to acquire the necessary build dependency.
56702  # x11 is the help tag: freetype, cups, alsa etc
56703  MISSING_DEPENDENCY=x11
56704
56705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56706    cygwin_help $MISSING_DEPENDENCY
56707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56708    msys_help $MISSING_DEPENDENCY
56709  else
56710    PKGHANDLER_COMMAND=
56711
56712    case $PKGHANDLER in
56713      apt-get)
56714        apt_help     $MISSING_DEPENDENCY ;;
56715      yum)
56716        yum_help     $MISSING_DEPENDENCY ;;
56717      port)
56718        port_help    $MISSING_DEPENDENCY ;;
56719      pkgutil)
56720        pkgutil_help $MISSING_DEPENDENCY ;;
56721      pkgadd)
56722        pkgadd_help  $MISSING_DEPENDENCY ;;
56723    esac
56724
56725    if test "x$PKGHANDLER_COMMAND" != x; then
56726      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56727    fi
56728  fi
56729
56730      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56731    fi
56732
56733    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56734      OPENWIN_HOME="/usr/openwin"
56735      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56736      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56737          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56738          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56739          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56740    fi
56741
56742    ac_ext=c
56743ac_cpp='$CPP $CPPFLAGS'
56744ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56745ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56746ac_compiler_gnu=$ac_cv_c_compiler_gnu
56747
56748    OLD_CFLAGS="$CFLAGS"
56749    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56750
56751    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56752    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56753do :
56754  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56755ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56756          # include <X11/Xlib.h>
56757          # include <X11/Xutil.h>
56758
56759
56760"
56761if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56762  cat >>confdefs.h <<_ACEOF
56763#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56764_ACEOF
56765 X11_HEADERS_OK=yes
56766else
56767  X11_HEADERS_OK=no; break
56768fi
56769
56770done
56771
56772
56773    if test "x$X11_HEADERS_OK" = xno; then
56774
56775  # Print a helpful message on how to acquire the necessary build dependency.
56776  # x11 is the help tag: freetype, cups, alsa etc
56777  MISSING_DEPENDENCY=x11
56778
56779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56780    cygwin_help $MISSING_DEPENDENCY
56781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56782    msys_help $MISSING_DEPENDENCY
56783  else
56784    PKGHANDLER_COMMAND=
56785
56786    case $PKGHANDLER in
56787      apt-get)
56788        apt_help     $MISSING_DEPENDENCY ;;
56789      yum)
56790        yum_help     $MISSING_DEPENDENCY ;;
56791      port)
56792        port_help    $MISSING_DEPENDENCY ;;
56793      pkgutil)
56794        pkgutil_help $MISSING_DEPENDENCY ;;
56795      pkgadd)
56796        pkgadd_help  $MISSING_DEPENDENCY ;;
56797    esac
56798
56799    if test "x$PKGHANDLER_COMMAND" != x; then
56800      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56801    fi
56802  fi
56803
56804      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56805    fi
56806
56807    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56808    # defined in libawt_xawt.
56809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56810$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56811    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56812/* end confdefs.h.  */
56813#include <X11/extensions/Xrender.h>
56814int
56815main ()
56816{
56817XLinearGradient x;
56818  ;
56819  return 0;
56820}
56821_ACEOF
56822if ac_fn_c_try_compile "$LINENO"; then :
56823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56824$as_echo "yes" >&6; }
56825else
56826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56827$as_echo "no" >&6; }
56828         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56829fi
56830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56831
56832    CFLAGS="$OLD_CFLAGS"
56833    ac_ext=cpp
56834ac_cpp='$CXXCPP $CPPFLAGS'
56835ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56836ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56837ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56838
56839  fi # NEEDS_LIB_X11
56840
56841
56842
56843
56844
56845
56846# Check whether --with-cups was given.
56847if test "${with_cups+set}" = set; then :
56848  withval=$with_cups;
56849fi
56850
56851
56852# Check whether --with-cups-include was given.
56853if test "${with_cups_include+set}" = set; then :
56854  withval=$with_cups_include;
56855fi
56856
56857
56858  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56859    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56860        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56861      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56862$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56863    fi
56864    CUPS_CFLAGS=
56865  else
56866    CUPS_FOUND=no
56867
56868    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56869      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56870    fi
56871
56872    if test "x${with_cups}" != x; then
56873      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56874$as_echo_n "checking for cups headers... " >&6; }
56875      if test -s "${with_cups}/include/cups/cups.h"; then
56876        CUPS_CFLAGS="-I${with_cups}/include"
56877        CUPS_FOUND=yes
56878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56879$as_echo "$CUPS_FOUND" >&6; }
56880      else
56881        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56882      fi
56883    fi
56884    if test "x${with_cups_include}" != x; then
56885      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56886$as_echo_n "checking for cups headers... " >&6; }
56887      if test -s "${with_cups_include}/cups/cups.h"; then
56888        CUPS_CFLAGS="-I${with_cups_include}"
56889        CUPS_FOUND=yes
56890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56891$as_echo "$CUPS_FOUND" >&6; }
56892      else
56893        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56894      fi
56895    fi
56896    if test "x$CUPS_FOUND" = xno; then
56897      # Are the cups headers installed in the default /usr/include location?
56898      for ac_header in cups/cups.h cups/ppd.h
56899do :
56900  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56901ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56902if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56903  cat >>confdefs.h <<_ACEOF
56904#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56905_ACEOF
56906
56907          CUPS_FOUND=yes
56908          CUPS_CFLAGS=
56909          DEFAULT_CUPS=yes
56910
56911fi
56912
56913done
56914
56915    fi
56916    if test "x$CUPS_FOUND" = xno; then
56917      # Getting nervous now? Lets poke around for standard Solaris third-party
56918      # package installation locations.
56919      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56920$as_echo_n "checking for cups headers... " >&6; }
56921      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
56922        # An SFW package seems to be installed!
56923        CUPS_FOUND=yes
56924        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
56925      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
56926        # A CSW package seems to be installed!
56927        CUPS_FOUND=yes
56928        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
56929      fi
56930      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56931$as_echo "$CUPS_FOUND" >&6; }
56932    fi
56933    if test "x$CUPS_FOUND" = xno; then
56934
56935  # Print a helpful message on how to acquire the necessary build dependency.
56936  # cups is the help tag: freetype, cups, alsa etc
56937  MISSING_DEPENDENCY=cups
56938
56939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56940    cygwin_help $MISSING_DEPENDENCY
56941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56942    msys_help $MISSING_DEPENDENCY
56943  else
56944    PKGHANDLER_COMMAND=
56945
56946    case $PKGHANDLER in
56947      apt-get)
56948        apt_help     $MISSING_DEPENDENCY ;;
56949      yum)
56950        yum_help     $MISSING_DEPENDENCY ;;
56951      port)
56952        port_help    $MISSING_DEPENDENCY ;;
56953      pkgutil)
56954        pkgutil_help $MISSING_DEPENDENCY ;;
56955      pkgadd)
56956        pkgadd_help  $MISSING_DEPENDENCY ;;
56957    esac
56958
56959    if test "x$PKGHANDLER_COMMAND" != x; then
56960      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56961    fi
56962  fi
56963
56964      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56965    fi
56966  fi
56967
56968
56969
56970
56971
56972# Check whether --with-freetype was given.
56973if test "${with_freetype+set}" = set; then :
56974  withval=$with_freetype;
56975fi
56976
56977
56978# Check whether --with-freetype-include was given.
56979if test "${with_freetype_include+set}" = set; then :
56980  withval=$with_freetype_include;
56981fi
56982
56983
56984# Check whether --with-freetype-lib was given.
56985if test "${with_freetype_lib+set}" = set; then :
56986  withval=$with_freetype_lib;
56987fi
56988
56989
56990# Check whether --with-freetype-src was given.
56991if test "${with_freetype_src+set}" = set; then :
56992  withval=$with_freetype_src;
56993fi
56994
56995  # Check whether --enable-freetype-bundling was given.
56996if test "${enable_freetype_bundling+set}" = set; then :
56997  enableval=$enable_freetype_bundling;
56998fi
56999
57000
57001  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57002  FREETYPE_BASE_NAME=freetype
57003  FREETYPE_CFLAGS=
57004  FREETYPE_LIBS=
57005  FREETYPE_BUNDLE_LIB_PATH=
57006
57007  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57008    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57009        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57010        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57011        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57012      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57013$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57014    fi
57015    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57016      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57017$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57018    fi
57019  else
57020    # freetype is needed to build; go get it!
57021
57022    BUNDLE_FREETYPE="$enable_freetype_bundling"
57023
57024    if  test "x$with_freetype_src" != x; then
57025      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57026        # Try to build freetype if --with-freetype-src was given on Windows
57027
57028  FREETYPE_SRC_PATH="$with_freetype_src"
57029  BUILD_FREETYPE=yes
57030
57031  # Check if the freetype sources are acessible..
57032  if ! test -d $FREETYPE_SRC_PATH; then
57033    { $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
57034$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57035    BUILD_FREETYPE=no
57036  fi
57037  # ..and contain a vc2010 project file
57038  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57039  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57040    { $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
57041$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57042    BUILD_FREETYPE=no
57043  fi
57044  # Now check if configure found a version of 'msbuild.exe'
57045  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57046    { $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
57047$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;}
57048    BUILD_FREETYPE=no
57049  fi
57050
57051  # Ready to go..
57052  if test "x$BUILD_FREETYPE" = xyes; then
57053    # msbuild requires trailing slashes for output directories
57054    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57055    freetype_lib_path_unix="$freetype_lib_path"
57056    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57057
57058  unix_path="$vcxproj_path"
57059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57060    windows_path=`$CYGPATH -m "$unix_path"`
57061    vcxproj_path="$windows_path"
57062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57063    windows_path=`cmd //c echo $unix_path`
57064    vcxproj_path="$windows_path"
57065  fi
57066
57067
57068  unix_path="$freetype_lib_path"
57069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57070    windows_path=`$CYGPATH -m "$unix_path"`
57071    freetype_lib_path="$windows_path"
57072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57073    windows_path=`cmd //c echo $unix_path`
57074    freetype_lib_path="$windows_path"
57075  fi
57076
57077
57078  unix_path="$freetype_obj_path"
57079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57080    windows_path=`$CYGPATH -m "$unix_path"`
57081    freetype_obj_path="$windows_path"
57082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57083    windows_path=`cmd //c echo $unix_path`
57084    freetype_obj_path="$windows_path"
57085  fi
57086
57087    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57088      freetype_platform=x64
57089    else
57090      freetype_platform=win32
57091    fi
57092
57093    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57094    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57095    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57096    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57097    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57098$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57099
57100    # First we try to build the freetype.dll
57101    $ECHO -e "@echo off\n"\
57102        "$MSBUILD $vcxproj_path "\
57103        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57104        "/p:Configuration=\"Release Multithreaded\" "\
57105        "/p:Platform=$freetype_platform "\
57106        "/p:ConfigurationType=DynamicLibrary "\
57107        "/p:TargetName=freetype "\
57108        "/p:OutDir=\"$freetype_lib_path\" "\
57109        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57110    cmd /c freetype.bat
57111
57112    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57113      # If that succeeds we also build freetype.lib
57114      $ECHO -e "@echo off\n"\
57115          "$MSBUILD $vcxproj_path "\
57116          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57117          "/p:Configuration=\"Release Multithreaded\" "\
57118          "/p:Platform=$freetype_platform "\
57119          "/p:ConfigurationType=StaticLibrary "\
57120          "/p:TargetName=freetype "\
57121          "/p:OutDir=\"$freetype_lib_path\" "\
57122          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57123      cmd /c freetype.bat
57124
57125      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57126        # Once we build both, lib and dll, set freetype lib and include path appropriately
57127        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57128        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57129        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57130$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57131      else
57132        BUILD_FREETYPE=no
57133      fi
57134    else
57135      BUILD_FREETYPE=no
57136    fi
57137  fi
57138
57139        if test "x$BUILD_FREETYPE" = xyes; then
57140          # Okay, we built it. Check that it works.
57141
57142  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57143  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57144  METHOD="--with-freetype-src"
57145
57146  # Let's start with an optimistic view of the world :-)
57147  FOUND_FREETYPE=yes
57148
57149  # First look for the canonical freetype main include file ft2build.h.
57150  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57151    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57152    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57153    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57154      # Fail.
57155      FOUND_FREETYPE=no
57156    fi
57157  fi
57158
57159  if test "x$FOUND_FREETYPE" = xyes; then
57160    # Include file found, let's continue the sanity check.
57161    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57162$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57163
57164    # Reset to default value
57165    FREETYPE_BASE_NAME=freetype
57166    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57167    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57168      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57169          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57170        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57171        # for the .6 version explicitly.
57172        FREETYPE_BASE_NAME=freetype.6
57173        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57174        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57175$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57176      else
57177        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57178$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57179        FOUND_FREETYPE=no
57180      fi
57181    else
57182      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57183        # On Windows, we will need both .lib and .dll file.
57184        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57185          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57186$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57187          FOUND_FREETYPE=no
57188        fi
57189      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57190          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57191        # Found lib in isa dir, use that instead.
57192        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57193        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57194$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57195      fi
57196    fi
57197  fi
57198
57199  if test "x$FOUND_FREETYPE" = xyes; then
57200
57201  # Only process if variable expands to non-empty
57202
57203  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57204    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57205
57206  # Input might be given as Windows format, start by converting to
57207  # unix format.
57208  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57209  new_path=`$CYGPATH -u "$path"`
57210
57211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57214  # "foo.exe" is OK but "foo" is an error.
57215  #
57216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57217  # It is also a way to make sure we got the proper file name for the real test later on.
57218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57219  if test "x$test_shortpath" = x; then
57220    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57221$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57222    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57223  fi
57224
57225  # Call helper function which possibly converts this using DOS-style short mode.
57226  # If so, the updated path is stored in $new_path.
57227
57228  input_path="$new_path"
57229  # Check if we need to convert this using DOS-style short mode. If the path
57230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57231  # take no chances and rewrite it.
57232  # Note: m4 eats our [], so we need to use [ and ] instead.
57233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57234  if test "x$has_forbidden_chars" != x; then
57235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57239      # Going to short mode and back again did indeed matter. Since short mode is
57240      # case insensitive, let's make it lowercase to improve readability.
57241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57242      # Now convert it back to Unix-style (cygpath)
57243      input_path=`$CYGPATH -u "$shortmode_path"`
57244      new_path="$input_path"
57245    fi
57246  fi
57247
57248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57249  if test "x$test_cygdrive_prefix" = x; then
57250    # As a simple fix, exclude /usr/bin since it's not a real path.
57251    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57253      # a path prefixed by /cygdrive for fixpath to work.
57254      new_path="$CYGWIN_ROOT_PATH$input_path"
57255    fi
57256  fi
57257
57258
57259  if test "x$path" != "x$new_path"; then
57260    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57262$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57263  fi
57264
57265    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57266
57267  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57268  has_colon=`$ECHO $path | $GREP ^.:`
57269  new_path="$path"
57270  if test "x$has_colon" = x; then
57271    # Not in mixed or Windows style, start by that.
57272    new_path=`cmd //c echo $path`
57273  fi
57274
57275
57276  input_path="$new_path"
57277  # Check if we need to convert this using DOS-style short mode. If the path
57278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57279  # take no chances and rewrite it.
57280  # Note: m4 eats our [], so we need to use [ and ] instead.
57281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57282  if test "x$has_forbidden_chars" != x; then
57283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57285  fi
57286
57287
57288  windows_path="$new_path"
57289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57290    unix_path=`$CYGPATH -u "$windows_path"`
57291    new_path="$unix_path"
57292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57294    new_path="$unix_path"
57295  fi
57296
57297  if test "x$path" != "x$new_path"; then
57298    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57300$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57301  fi
57302
57303  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57304  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57305
57306    else
57307      # We're on a unix platform. Hooray! :)
57308      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57309      has_space=`$ECHO "$path" | $GREP " "`
57310      if test "x$has_space" != x; then
57311        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57312$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57313        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57314      fi
57315
57316      # Use eval to expand a potential ~
57317      eval path="$path"
57318      if test ! -f "$path" && test ! -d "$path"; then
57319        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57320      fi
57321
57322      if test -d "$path"; then
57323        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57324      else
57325        dir="`$DIRNAME "$path"`"
57326        base="`$BASENAME "$path"`"
57327        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57328      fi
57329    fi
57330  fi
57331
57332
57333  # Only process if variable expands to non-empty
57334
57335  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57336    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57337
57338  # Input might be given as Windows format, start by converting to
57339  # unix format.
57340  path="$POTENTIAL_FREETYPE_LIB_PATH"
57341  new_path=`$CYGPATH -u "$path"`
57342
57343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57346  # "foo.exe" is OK but "foo" is an error.
57347  #
57348  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57349  # It is also a way to make sure we got the proper file name for the real test later on.
57350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57351  if test "x$test_shortpath" = x; then
57352    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57353$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57354    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57355  fi
57356
57357  # Call helper function which possibly converts this using DOS-style short mode.
57358  # If so, the updated path is stored in $new_path.
57359
57360  input_path="$new_path"
57361  # Check if we need to convert this using DOS-style short mode. If the path
57362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57363  # take no chances and rewrite it.
57364  # Note: m4 eats our [], so we need to use [ and ] instead.
57365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57366  if test "x$has_forbidden_chars" != x; then
57367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57371      # Going to short mode and back again did indeed matter. Since short mode is
57372      # case insensitive, let's make it lowercase to improve readability.
57373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57374      # Now convert it back to Unix-style (cygpath)
57375      input_path=`$CYGPATH -u "$shortmode_path"`
57376      new_path="$input_path"
57377    fi
57378  fi
57379
57380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57381  if test "x$test_cygdrive_prefix" = x; then
57382    # As a simple fix, exclude /usr/bin since it's not a real path.
57383    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57385      # a path prefixed by /cygdrive for fixpath to work.
57386      new_path="$CYGWIN_ROOT_PATH$input_path"
57387    fi
57388  fi
57389
57390
57391  if test "x$path" != "x$new_path"; then
57392    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57394$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57395  fi
57396
57397    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57398
57399  path="$POTENTIAL_FREETYPE_LIB_PATH"
57400  has_colon=`$ECHO $path | $GREP ^.:`
57401  new_path="$path"
57402  if test "x$has_colon" = x; then
57403    # Not in mixed or Windows style, start by that.
57404    new_path=`cmd //c echo $path`
57405  fi
57406
57407
57408  input_path="$new_path"
57409  # Check if we need to convert this using DOS-style short mode. If the path
57410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57411  # take no chances and rewrite it.
57412  # Note: m4 eats our [], so we need to use [ and ] instead.
57413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57414  if test "x$has_forbidden_chars" != x; then
57415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57417  fi
57418
57419
57420  windows_path="$new_path"
57421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57422    unix_path=`$CYGPATH -u "$windows_path"`
57423    new_path="$unix_path"
57424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57426    new_path="$unix_path"
57427  fi
57428
57429  if test "x$path" != "x$new_path"; then
57430    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57432$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57433  fi
57434
57435  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57436  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57437
57438    else
57439      # We're on a unix platform. Hooray! :)
57440      path="$POTENTIAL_FREETYPE_LIB_PATH"
57441      has_space=`$ECHO "$path" | $GREP " "`
57442      if test "x$has_space" != x; then
57443        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57444$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57445        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57446      fi
57447
57448      # Use eval to expand a potential ~
57449      eval path="$path"
57450      if test ! -f "$path" && test ! -d "$path"; then
57451        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57452      fi
57453
57454      if test -d "$path"; then
57455        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57456      else
57457        dir="`$DIRNAME "$path"`"
57458        base="`$BASENAME "$path"`"
57459        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57460      fi
57461    fi
57462  fi
57463
57464
57465    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57466    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57467$as_echo_n "checking for freetype includes... " >&6; }
57468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57469$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57470    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57472$as_echo_n "checking for freetype libraries... " >&6; }
57473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57474$as_echo "$FREETYPE_LIB_PATH" >&6; }
57475  fi
57476
57477          if test "x$FOUND_FREETYPE" != xyes; then
57478            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57479          fi
57480        else
57481          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57482$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57483          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57484        fi
57485      else
57486        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57487$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57488      fi
57489    fi
57490
57491    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57492      # User has specified settings
57493
57494      if test "x$BUNDLE_FREETYPE" = x; then
57495        # If not specified, default is to bundle freetype
57496        BUNDLE_FREETYPE=yes
57497      fi
57498
57499      if test "x$with_freetype" != x; then
57500        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57501        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57502      fi
57503
57504      # Allow --with-freetype-lib and --with-freetype-include to override
57505      if test "x$with_freetype_include" != x; then
57506        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57507      fi
57508      if test "x$with_freetype_lib" != x; then
57509        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57510      fi
57511
57512      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57513        # Okay, we got it. Check that it works.
57514
57515  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57516  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57517  METHOD="--with-freetype"
57518
57519  # Let's start with an optimistic view of the world :-)
57520  FOUND_FREETYPE=yes
57521
57522  # First look for the canonical freetype main include file ft2build.h.
57523  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57524    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57525    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57526    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57527      # Fail.
57528      FOUND_FREETYPE=no
57529    fi
57530  fi
57531
57532  if test "x$FOUND_FREETYPE" = xyes; then
57533    # Include file found, let's continue the sanity check.
57534    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57535$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57536
57537    # Reset to default value
57538    FREETYPE_BASE_NAME=freetype
57539    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57540    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57541      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57542          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57543        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57544        # for the .6 version explicitly.
57545        FREETYPE_BASE_NAME=freetype.6
57546        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57547        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57548$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57549      else
57550        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57551$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57552        FOUND_FREETYPE=no
57553      fi
57554    else
57555      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57556        # On Windows, we will need both .lib and .dll file.
57557        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57558          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57559$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57560          FOUND_FREETYPE=no
57561        fi
57562      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57563          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57564        # Found lib in isa dir, use that instead.
57565        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57566        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57567$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57568      fi
57569    fi
57570  fi
57571
57572  if test "x$FOUND_FREETYPE" = xyes; then
57573
57574  # Only process if variable expands to non-empty
57575
57576  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57577    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57578
57579  # Input might be given as Windows format, start by converting to
57580  # unix format.
57581  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57582  new_path=`$CYGPATH -u "$path"`
57583
57584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57587  # "foo.exe" is OK but "foo" is an error.
57588  #
57589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57590  # It is also a way to make sure we got the proper file name for the real test later on.
57591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57592  if test "x$test_shortpath" = x; then
57593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57594$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57595    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57596  fi
57597
57598  # Call helper function which possibly converts this using DOS-style short mode.
57599  # If so, the updated path is stored in $new_path.
57600
57601  input_path="$new_path"
57602  # Check if we need to convert this using DOS-style short mode. If the path
57603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57604  # take no chances and rewrite it.
57605  # Note: m4 eats our [], so we need to use [ and ] instead.
57606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57607  if test "x$has_forbidden_chars" != x; then
57608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57612      # Going to short mode and back again did indeed matter. Since short mode is
57613      # case insensitive, let's make it lowercase to improve readability.
57614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57615      # Now convert it back to Unix-style (cygpath)
57616      input_path=`$CYGPATH -u "$shortmode_path"`
57617      new_path="$input_path"
57618    fi
57619  fi
57620
57621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57622  if test "x$test_cygdrive_prefix" = x; then
57623    # As a simple fix, exclude /usr/bin since it's not a real path.
57624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57626      # a path prefixed by /cygdrive for fixpath to work.
57627      new_path="$CYGWIN_ROOT_PATH$input_path"
57628    fi
57629  fi
57630
57631
57632  if test "x$path" != "x$new_path"; then
57633    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57635$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57636  fi
57637
57638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57639
57640  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57641  has_colon=`$ECHO $path | $GREP ^.:`
57642  new_path="$path"
57643  if test "x$has_colon" = x; then
57644    # Not in mixed or Windows style, start by that.
57645    new_path=`cmd //c echo $path`
57646  fi
57647
57648
57649  input_path="$new_path"
57650  # Check if we need to convert this using DOS-style short mode. If the path
57651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57652  # take no chances and rewrite it.
57653  # Note: m4 eats our [], so we need to use [ and ] instead.
57654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57655  if test "x$has_forbidden_chars" != x; then
57656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57658  fi
57659
57660
57661  windows_path="$new_path"
57662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57663    unix_path=`$CYGPATH -u "$windows_path"`
57664    new_path="$unix_path"
57665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57667    new_path="$unix_path"
57668  fi
57669
57670  if test "x$path" != "x$new_path"; then
57671    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57673$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57674  fi
57675
57676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57678
57679    else
57680      # We're on a unix platform. Hooray! :)
57681      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57682      has_space=`$ECHO "$path" | $GREP " "`
57683      if test "x$has_space" != x; then
57684        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57685$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57686        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57687      fi
57688
57689      # Use eval to expand a potential ~
57690      eval path="$path"
57691      if test ! -f "$path" && test ! -d "$path"; then
57692        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57693      fi
57694
57695      if test -d "$path"; then
57696        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57697      else
57698        dir="`$DIRNAME "$path"`"
57699        base="`$BASENAME "$path"`"
57700        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57701      fi
57702    fi
57703  fi
57704
57705
57706  # Only process if variable expands to non-empty
57707
57708  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57709    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57710
57711  # Input might be given as Windows format, start by converting to
57712  # unix format.
57713  path="$POTENTIAL_FREETYPE_LIB_PATH"
57714  new_path=`$CYGPATH -u "$path"`
57715
57716  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57717  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57718  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57719  # "foo.exe" is OK but "foo" is an error.
57720  #
57721  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57722  # It is also a way to make sure we got the proper file name for the real test later on.
57723  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57724  if test "x$test_shortpath" = x; then
57725    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57726$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57727    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57728  fi
57729
57730  # Call helper function which possibly converts this using DOS-style short mode.
57731  # If so, the updated path is stored in $new_path.
57732
57733  input_path="$new_path"
57734  # Check if we need to convert this using DOS-style short mode. If the path
57735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57736  # take no chances and rewrite it.
57737  # Note: m4 eats our [], so we need to use [ and ] instead.
57738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57739  if test "x$has_forbidden_chars" != x; then
57740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57744      # Going to short mode and back again did indeed matter. Since short mode is
57745      # case insensitive, let's make it lowercase to improve readability.
57746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57747      # Now convert it back to Unix-style (cygpath)
57748      input_path=`$CYGPATH -u "$shortmode_path"`
57749      new_path="$input_path"
57750    fi
57751  fi
57752
57753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57754  if test "x$test_cygdrive_prefix" = x; then
57755    # As a simple fix, exclude /usr/bin since it's not a real path.
57756    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57758      # a path prefixed by /cygdrive for fixpath to work.
57759      new_path="$CYGWIN_ROOT_PATH$input_path"
57760    fi
57761  fi
57762
57763
57764  if test "x$path" != "x$new_path"; then
57765    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57767$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57768  fi
57769
57770    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57771
57772  path="$POTENTIAL_FREETYPE_LIB_PATH"
57773  has_colon=`$ECHO $path | $GREP ^.:`
57774  new_path="$path"
57775  if test "x$has_colon" = x; then
57776    # Not in mixed or Windows style, start by that.
57777    new_path=`cmd //c echo $path`
57778  fi
57779
57780
57781  input_path="$new_path"
57782  # Check if we need to convert this using DOS-style short mode. If the path
57783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57784  # take no chances and rewrite it.
57785  # Note: m4 eats our [], so we need to use [ and ] instead.
57786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57787  if test "x$has_forbidden_chars" != x; then
57788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57790  fi
57791
57792
57793  windows_path="$new_path"
57794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57795    unix_path=`$CYGPATH -u "$windows_path"`
57796    new_path="$unix_path"
57797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57799    new_path="$unix_path"
57800  fi
57801
57802  if test "x$path" != "x$new_path"; then
57803    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57805$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57806  fi
57807
57808  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57809  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57810
57811    else
57812      # We're on a unix platform. Hooray! :)
57813      path="$POTENTIAL_FREETYPE_LIB_PATH"
57814      has_space=`$ECHO "$path" | $GREP " "`
57815      if test "x$has_space" != x; then
57816        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57817$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57818        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57819      fi
57820
57821      # Use eval to expand a potential ~
57822      eval path="$path"
57823      if test ! -f "$path" && test ! -d "$path"; then
57824        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57825      fi
57826
57827      if test -d "$path"; then
57828        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57829      else
57830        dir="`$DIRNAME "$path"`"
57831        base="`$BASENAME "$path"`"
57832        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57833      fi
57834    fi
57835  fi
57836
57837
57838    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57840$as_echo_n "checking for freetype includes... " >&6; }
57841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57842$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57843    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57844    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57845$as_echo_n "checking for freetype libraries... " >&6; }
57846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57847$as_echo "$FREETYPE_LIB_PATH" >&6; }
57848  fi
57849
57850        if test "x$FOUND_FREETYPE" != xyes; then
57851          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57852        fi
57853      else
57854        # User specified only one of lib or include. This is an error.
57855        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57856          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57857$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57858          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57859        else
57860          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57861$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57862          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57863        fi
57864      fi
57865    else
57866      # User did not specify settings, but we need freetype. Try to locate it.
57867
57868      if test "x$BUNDLE_FREETYPE" = x; then
57869        # If not specified, default is to bundle freetype only on windows
57870        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57871          BUNDLE_FREETYPE=yes
57872        else
57873          BUNDLE_FREETYPE=no
57874        fi
57875      fi
57876
57877      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57878      if test "x$SYSROOT" = x; then
57879        if test "x$FOUND_FREETYPE" != xyes; then
57880          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57881          if test "x$PKG_CONFIG" != x; then
57882
57883pkg_failed=no
57884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57885$as_echo_n "checking for FREETYPE... " >&6; }
57886
57887if test -n "$FREETYPE_CFLAGS"; then
57888    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57889 elif test -n "$PKG_CONFIG"; then
57890    if test -n "$PKG_CONFIG" && \
57891    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57892  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57893  ac_status=$?
57894  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57895  test $ac_status = 0; }; then
57896  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57897else
57898  pkg_failed=yes
57899fi
57900 else
57901    pkg_failed=untried
57902fi
57903if test -n "$FREETYPE_LIBS"; then
57904    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57905 elif test -n "$PKG_CONFIG"; then
57906    if test -n "$PKG_CONFIG" && \
57907    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57908  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57909  ac_status=$?
57910  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57911  test $ac_status = 0; }; then
57912  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57913else
57914  pkg_failed=yes
57915fi
57916 else
57917    pkg_failed=untried
57918fi
57919
57920
57921
57922if test $pkg_failed = yes; then
57923
57924if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57925        _pkg_short_errors_supported=yes
57926else
57927        _pkg_short_errors_supported=no
57928fi
57929        if test $_pkg_short_errors_supported = yes; then
57930	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57931        else
57932	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57933        fi
57934	# Put the nasty error message in config.log where it belongs
57935	echo "$FREETYPE_PKG_ERRORS" >&5
57936
57937	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57938$as_echo "no" >&6; }
57939                FOUND_FREETYPE=no
57940elif test $pkg_failed = untried; then
57941	FOUND_FREETYPE=no
57942else
57943	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57944	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57946$as_echo "yes" >&6; }
57947	FOUND_FREETYPE=yes
57948fi
57949            if test "x$FOUND_FREETYPE" = xyes; then
57950              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57951              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57952              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57953              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57954                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57955              fi
57956              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57957              if test "x$BUNDLE_FREETYPE" = xyes; then
57958                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57959$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57960                FOUND_FREETYPE=no
57961              else
57962                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57963$as_echo_n "checking for freetype... " >&6; }
57964                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57965$as_echo "yes (using pkg-config)" >&6; }
57966              fi
57967            fi
57968          fi
57969        fi
57970      fi
57971
57972      if test "x$FOUND_FREETYPE" != xyes; then
57973        # Check in well-known locations
57974        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57975          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57976
57977  windows_path="$FREETYPE_BASE_DIR"
57978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57979    unix_path=`$CYGPATH -u "$windows_path"`
57980    FREETYPE_BASE_DIR="$unix_path"
57981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57983    FREETYPE_BASE_DIR="$unix_path"
57984  fi
57985
57986
57987  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57988  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57989  METHOD="well-known location"
57990
57991  # Let's start with an optimistic view of the world :-)
57992  FOUND_FREETYPE=yes
57993
57994  # First look for the canonical freetype main include file ft2build.h.
57995  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57996    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57997    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57998    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57999      # Fail.
58000      FOUND_FREETYPE=no
58001    fi
58002  fi
58003
58004  if test "x$FOUND_FREETYPE" = xyes; then
58005    # Include file found, let's continue the sanity check.
58006    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58007$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58008
58009    # Reset to default value
58010    FREETYPE_BASE_NAME=freetype
58011    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58012    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58013      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58014          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58015        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58016        # for the .6 version explicitly.
58017        FREETYPE_BASE_NAME=freetype.6
58018        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58019        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58020$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58021      else
58022        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58023$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58024        FOUND_FREETYPE=no
58025      fi
58026    else
58027      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58028        # On Windows, we will need both .lib and .dll file.
58029        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58030          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58031$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58032          FOUND_FREETYPE=no
58033        fi
58034      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58035          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58036        # Found lib in isa dir, use that instead.
58037        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58038        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58039$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58040      fi
58041    fi
58042  fi
58043
58044  if test "x$FOUND_FREETYPE" = xyes; then
58045
58046  # Only process if variable expands to non-empty
58047
58048  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58049    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58050
58051  # Input might be given as Windows format, start by converting to
58052  # unix format.
58053  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58054  new_path=`$CYGPATH -u "$path"`
58055
58056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58059  # "foo.exe" is OK but "foo" is an error.
58060  #
58061  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58062  # It is also a way to make sure we got the proper file name for the real test later on.
58063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58064  if test "x$test_shortpath" = x; then
58065    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58066$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58067    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58068  fi
58069
58070  # Call helper function which possibly converts this using DOS-style short mode.
58071  # If so, the updated path is stored in $new_path.
58072
58073  input_path="$new_path"
58074  # Check if we need to convert this using DOS-style short mode. If the path
58075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58076  # take no chances and rewrite it.
58077  # Note: m4 eats our [], so we need to use [ and ] instead.
58078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58079  if test "x$has_forbidden_chars" != x; then
58080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58084      # Going to short mode and back again did indeed matter. Since short mode is
58085      # case insensitive, let's make it lowercase to improve readability.
58086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58087      # Now convert it back to Unix-style (cygpath)
58088      input_path=`$CYGPATH -u "$shortmode_path"`
58089      new_path="$input_path"
58090    fi
58091  fi
58092
58093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58094  if test "x$test_cygdrive_prefix" = x; then
58095    # As a simple fix, exclude /usr/bin since it's not a real path.
58096    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58098      # a path prefixed by /cygdrive for fixpath to work.
58099      new_path="$CYGWIN_ROOT_PATH$input_path"
58100    fi
58101  fi
58102
58103
58104  if test "x$path" != "x$new_path"; then
58105    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58107$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58108  fi
58109
58110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58111
58112  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58113  has_colon=`$ECHO $path | $GREP ^.:`
58114  new_path="$path"
58115  if test "x$has_colon" = x; then
58116    # Not in mixed or Windows style, start by that.
58117    new_path=`cmd //c echo $path`
58118  fi
58119
58120
58121  input_path="$new_path"
58122  # Check if we need to convert this using DOS-style short mode. If the path
58123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58124  # take no chances and rewrite it.
58125  # Note: m4 eats our [], so we need to use [ and ] instead.
58126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58127  if test "x$has_forbidden_chars" != x; then
58128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58130  fi
58131
58132
58133  windows_path="$new_path"
58134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58135    unix_path=`$CYGPATH -u "$windows_path"`
58136    new_path="$unix_path"
58137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58139    new_path="$unix_path"
58140  fi
58141
58142  if test "x$path" != "x$new_path"; then
58143    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58145$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58146  fi
58147
58148  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58149  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58150
58151    else
58152      # We're on a unix platform. Hooray! :)
58153      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58154      has_space=`$ECHO "$path" | $GREP " "`
58155      if test "x$has_space" != x; then
58156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58157$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58158        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58159      fi
58160
58161      # Use eval to expand a potential ~
58162      eval path="$path"
58163      if test ! -f "$path" && test ! -d "$path"; then
58164        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58165      fi
58166
58167      if test -d "$path"; then
58168        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58169      else
58170        dir="`$DIRNAME "$path"`"
58171        base="`$BASENAME "$path"`"
58172        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58173      fi
58174    fi
58175  fi
58176
58177
58178  # Only process if variable expands to non-empty
58179
58180  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58182
58183  # Input might be given as Windows format, start by converting to
58184  # unix format.
58185  path="$POTENTIAL_FREETYPE_LIB_PATH"
58186  new_path=`$CYGPATH -u "$path"`
58187
58188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58191  # "foo.exe" is OK but "foo" is an error.
58192  #
58193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58194  # It is also a way to make sure we got the proper file name for the real test later on.
58195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58196  if test "x$test_shortpath" = x; then
58197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58198$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58199    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58200  fi
58201
58202  # Call helper function which possibly converts this using DOS-style short mode.
58203  # If so, the updated path is stored in $new_path.
58204
58205  input_path="$new_path"
58206  # Check if we need to convert this using DOS-style short mode. If the path
58207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58208  # take no chances and rewrite it.
58209  # Note: m4 eats our [], so we need to use [ and ] instead.
58210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58211  if test "x$has_forbidden_chars" != x; then
58212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58216      # Going to short mode and back again did indeed matter. Since short mode is
58217      # case insensitive, let's make it lowercase to improve readability.
58218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58219      # Now convert it back to Unix-style (cygpath)
58220      input_path=`$CYGPATH -u "$shortmode_path"`
58221      new_path="$input_path"
58222    fi
58223  fi
58224
58225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58226  if test "x$test_cygdrive_prefix" = x; then
58227    # As a simple fix, exclude /usr/bin since it's not a real path.
58228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58230      # a path prefixed by /cygdrive for fixpath to work.
58231      new_path="$CYGWIN_ROOT_PATH$input_path"
58232    fi
58233  fi
58234
58235
58236  if test "x$path" != "x$new_path"; then
58237    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58239$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58240  fi
58241
58242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58243
58244  path="$POTENTIAL_FREETYPE_LIB_PATH"
58245  has_colon=`$ECHO $path | $GREP ^.:`
58246  new_path="$path"
58247  if test "x$has_colon" = x; then
58248    # Not in mixed or Windows style, start by that.
58249    new_path=`cmd //c echo $path`
58250  fi
58251
58252
58253  input_path="$new_path"
58254  # Check if we need to convert this using DOS-style short mode. If the path
58255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58256  # take no chances and rewrite it.
58257  # Note: m4 eats our [], so we need to use [ and ] instead.
58258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58259  if test "x$has_forbidden_chars" != x; then
58260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58262  fi
58263
58264
58265  windows_path="$new_path"
58266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58267    unix_path=`$CYGPATH -u "$windows_path"`
58268    new_path="$unix_path"
58269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58271    new_path="$unix_path"
58272  fi
58273
58274  if test "x$path" != "x$new_path"; then
58275    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58277$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58278  fi
58279
58280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58282
58283    else
58284      # We're on a unix platform. Hooray! :)
58285      path="$POTENTIAL_FREETYPE_LIB_PATH"
58286      has_space=`$ECHO "$path" | $GREP " "`
58287      if test "x$has_space" != x; then
58288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58289$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58290        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58291      fi
58292
58293      # Use eval to expand a potential ~
58294      eval path="$path"
58295      if test ! -f "$path" && test ! -d "$path"; then
58296        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58297      fi
58298
58299      if test -d "$path"; then
58300        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58301      else
58302        dir="`$DIRNAME "$path"`"
58303        base="`$BASENAME "$path"`"
58304        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58305      fi
58306    fi
58307  fi
58308
58309
58310    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58312$as_echo_n "checking for freetype includes... " >&6; }
58313    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58314$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58315    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58317$as_echo_n "checking for freetype libraries... " >&6; }
58318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58319$as_echo "$FREETYPE_LIB_PATH" >&6; }
58320  fi
58321
58322          if test "x$FOUND_FREETYPE" != xyes; then
58323            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58324
58325  windows_path="$FREETYPE_BASE_DIR"
58326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58327    unix_path=`$CYGPATH -u "$windows_path"`
58328    FREETYPE_BASE_DIR="$unix_path"
58329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58331    FREETYPE_BASE_DIR="$unix_path"
58332  fi
58333
58334
58335  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58336  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58337  METHOD="well-known location"
58338
58339  # Let's start with an optimistic view of the world :-)
58340  FOUND_FREETYPE=yes
58341
58342  # First look for the canonical freetype main include file ft2build.h.
58343  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58344    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58345    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58346    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58347      # Fail.
58348      FOUND_FREETYPE=no
58349    fi
58350  fi
58351
58352  if test "x$FOUND_FREETYPE" = xyes; then
58353    # Include file found, let's continue the sanity check.
58354    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58355$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58356
58357    # Reset to default value
58358    FREETYPE_BASE_NAME=freetype
58359    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58360    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58361      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58362          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58363        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58364        # for the .6 version explicitly.
58365        FREETYPE_BASE_NAME=freetype.6
58366        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58367        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58368$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58369      else
58370        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58371$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58372        FOUND_FREETYPE=no
58373      fi
58374    else
58375      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58376        # On Windows, we will need both .lib and .dll file.
58377        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58378          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58379$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58380          FOUND_FREETYPE=no
58381        fi
58382      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58383          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58384        # Found lib in isa dir, use that instead.
58385        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58386        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58387$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58388      fi
58389    fi
58390  fi
58391
58392  if test "x$FOUND_FREETYPE" = xyes; then
58393
58394  # Only process if variable expands to non-empty
58395
58396  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58398
58399  # Input might be given as Windows format, start by converting to
58400  # unix format.
58401  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58402  new_path=`$CYGPATH -u "$path"`
58403
58404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58407  # "foo.exe" is OK but "foo" is an error.
58408  #
58409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58410  # It is also a way to make sure we got the proper file name for the real test later on.
58411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58412  if test "x$test_shortpath" = x; then
58413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58414$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58415    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58416  fi
58417
58418  # Call helper function which possibly converts this using DOS-style short mode.
58419  # If so, the updated path is stored in $new_path.
58420
58421  input_path="$new_path"
58422  # Check if we need to convert this using DOS-style short mode. If the path
58423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58424  # take no chances and rewrite it.
58425  # Note: m4 eats our [], so we need to use [ and ] instead.
58426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58427  if test "x$has_forbidden_chars" != x; then
58428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58432      # Going to short mode and back again did indeed matter. Since short mode is
58433      # case insensitive, let's make it lowercase to improve readability.
58434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58435      # Now convert it back to Unix-style (cygpath)
58436      input_path=`$CYGPATH -u "$shortmode_path"`
58437      new_path="$input_path"
58438    fi
58439  fi
58440
58441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58442  if test "x$test_cygdrive_prefix" = x; then
58443    # As a simple fix, exclude /usr/bin since it's not a real path.
58444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58446      # a path prefixed by /cygdrive for fixpath to work.
58447      new_path="$CYGWIN_ROOT_PATH$input_path"
58448    fi
58449  fi
58450
58451
58452  if test "x$path" != "x$new_path"; then
58453    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58455$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58456  fi
58457
58458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58459
58460  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58461  has_colon=`$ECHO $path | $GREP ^.:`
58462  new_path="$path"
58463  if test "x$has_colon" = x; then
58464    # Not in mixed or Windows style, start by that.
58465    new_path=`cmd //c echo $path`
58466  fi
58467
58468
58469  input_path="$new_path"
58470  # Check if we need to convert this using DOS-style short mode. If the path
58471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58472  # take no chances and rewrite it.
58473  # Note: m4 eats our [], so we need to use [ and ] instead.
58474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58475  if test "x$has_forbidden_chars" != x; then
58476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58478  fi
58479
58480
58481  windows_path="$new_path"
58482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58483    unix_path=`$CYGPATH -u "$windows_path"`
58484    new_path="$unix_path"
58485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58487    new_path="$unix_path"
58488  fi
58489
58490  if test "x$path" != "x$new_path"; then
58491    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58493$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58494  fi
58495
58496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58498
58499    else
58500      # We're on a unix platform. Hooray! :)
58501      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58502      has_space=`$ECHO "$path" | $GREP " "`
58503      if test "x$has_space" != x; then
58504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58505$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58506        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58507      fi
58508
58509      # Use eval to expand a potential ~
58510      eval path="$path"
58511      if test ! -f "$path" && test ! -d "$path"; then
58512        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58513      fi
58514
58515      if test -d "$path"; then
58516        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58517      else
58518        dir="`$DIRNAME "$path"`"
58519        base="`$BASENAME "$path"`"
58520        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58521      fi
58522    fi
58523  fi
58524
58525
58526  # Only process if variable expands to non-empty
58527
58528  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58529    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58530
58531  # Input might be given as Windows format, start by converting to
58532  # unix format.
58533  path="$POTENTIAL_FREETYPE_LIB_PATH"
58534  new_path=`$CYGPATH -u "$path"`
58535
58536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58539  # "foo.exe" is OK but "foo" is an error.
58540  #
58541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58542  # It is also a way to make sure we got the proper file name for the real test later on.
58543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58544  if test "x$test_shortpath" = x; then
58545    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58546$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58547    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58548  fi
58549
58550  # Call helper function which possibly converts this using DOS-style short mode.
58551  # If so, the updated path is stored in $new_path.
58552
58553  input_path="$new_path"
58554  # Check if we need to convert this using DOS-style short mode. If the path
58555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58556  # take no chances and rewrite it.
58557  # Note: m4 eats our [], so we need to use [ and ] instead.
58558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58559  if test "x$has_forbidden_chars" != x; then
58560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58564      # Going to short mode and back again did indeed matter. Since short mode is
58565      # case insensitive, let's make it lowercase to improve readability.
58566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58567      # Now convert it back to Unix-style (cygpath)
58568      input_path=`$CYGPATH -u "$shortmode_path"`
58569      new_path="$input_path"
58570    fi
58571  fi
58572
58573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58574  if test "x$test_cygdrive_prefix" = x; then
58575    # As a simple fix, exclude /usr/bin since it's not a real path.
58576    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58578      # a path prefixed by /cygdrive for fixpath to work.
58579      new_path="$CYGWIN_ROOT_PATH$input_path"
58580    fi
58581  fi
58582
58583
58584  if test "x$path" != "x$new_path"; then
58585    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58587$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58588  fi
58589
58590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58591
58592  path="$POTENTIAL_FREETYPE_LIB_PATH"
58593  has_colon=`$ECHO $path | $GREP ^.:`
58594  new_path="$path"
58595  if test "x$has_colon" = x; then
58596    # Not in mixed or Windows style, start by that.
58597    new_path=`cmd //c echo $path`
58598  fi
58599
58600
58601  input_path="$new_path"
58602  # Check if we need to convert this using DOS-style short mode. If the path
58603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58604  # take no chances and rewrite it.
58605  # Note: m4 eats our [], so we need to use [ and ] instead.
58606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58607  if test "x$has_forbidden_chars" != x; then
58608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58610  fi
58611
58612
58613  windows_path="$new_path"
58614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58615    unix_path=`$CYGPATH -u "$windows_path"`
58616    new_path="$unix_path"
58617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58619    new_path="$unix_path"
58620  fi
58621
58622  if test "x$path" != "x$new_path"; then
58623    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58625$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58626  fi
58627
58628  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58629  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58630
58631    else
58632      # We're on a unix platform. Hooray! :)
58633      path="$POTENTIAL_FREETYPE_LIB_PATH"
58634      has_space=`$ECHO "$path" | $GREP " "`
58635      if test "x$has_space" != x; then
58636        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58637$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58638        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58639      fi
58640
58641      # Use eval to expand a potential ~
58642      eval path="$path"
58643      if test ! -f "$path" && test ! -d "$path"; then
58644        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58645      fi
58646
58647      if test -d "$path"; then
58648        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58649      else
58650        dir="`$DIRNAME "$path"`"
58651        base="`$BASENAME "$path"`"
58652        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58653      fi
58654    fi
58655  fi
58656
58657
58658    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58660$as_echo_n "checking for freetype includes... " >&6; }
58661    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58662$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58663    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58664    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58665$as_echo_n "checking for freetype libraries... " >&6; }
58666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58667$as_echo "$FREETYPE_LIB_PATH" >&6; }
58668  fi
58669
58670          fi
58671          if test "x$FOUND_FREETYPE" != xyes; then
58672            FREETYPE_BASE_DIR="$HOME/freetype"
58673
58674  windows_path="$FREETYPE_BASE_DIR"
58675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58676    unix_path=`$CYGPATH -u "$windows_path"`
58677    FREETYPE_BASE_DIR="$unix_path"
58678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58680    FREETYPE_BASE_DIR="$unix_path"
58681  fi
58682
58683            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58684
58685  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58686  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58687  METHOD="well-known location"
58688
58689  # Let's start with an optimistic view of the world :-)
58690  FOUND_FREETYPE=yes
58691
58692  # First look for the canonical freetype main include file ft2build.h.
58693  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58694    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58695    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58696    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58697      # Fail.
58698      FOUND_FREETYPE=no
58699    fi
58700  fi
58701
58702  if test "x$FOUND_FREETYPE" = xyes; then
58703    # Include file found, let's continue the sanity check.
58704    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58705$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58706
58707    # Reset to default value
58708    FREETYPE_BASE_NAME=freetype
58709    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58710    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58711      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58712          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58713        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58714        # for the .6 version explicitly.
58715        FREETYPE_BASE_NAME=freetype.6
58716        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58717        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58718$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58719      else
58720        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58721$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58722        FOUND_FREETYPE=no
58723      fi
58724    else
58725      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58726        # On Windows, we will need both .lib and .dll file.
58727        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58728          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58729$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58730          FOUND_FREETYPE=no
58731        fi
58732      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58733          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58734        # Found lib in isa dir, use that instead.
58735        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58736        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58737$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58738      fi
58739    fi
58740  fi
58741
58742  if test "x$FOUND_FREETYPE" = xyes; then
58743
58744  # Only process if variable expands to non-empty
58745
58746  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58747    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58748
58749  # Input might be given as Windows format, start by converting to
58750  # unix format.
58751  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58752  new_path=`$CYGPATH -u "$path"`
58753
58754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58757  # "foo.exe" is OK but "foo" is an error.
58758  #
58759  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58760  # It is also a way to make sure we got the proper file name for the real test later on.
58761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58762  if test "x$test_shortpath" = x; then
58763    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58764$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58765    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58766  fi
58767
58768  # Call helper function which possibly converts this using DOS-style short mode.
58769  # If so, the updated path is stored in $new_path.
58770
58771  input_path="$new_path"
58772  # Check if we need to convert this using DOS-style short mode. If the path
58773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58774  # take no chances and rewrite it.
58775  # Note: m4 eats our [], so we need to use [ and ] instead.
58776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58777  if test "x$has_forbidden_chars" != x; then
58778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58782      # Going to short mode and back again did indeed matter. Since short mode is
58783      # case insensitive, let's make it lowercase to improve readability.
58784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58785      # Now convert it back to Unix-style (cygpath)
58786      input_path=`$CYGPATH -u "$shortmode_path"`
58787      new_path="$input_path"
58788    fi
58789  fi
58790
58791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58792  if test "x$test_cygdrive_prefix" = x; then
58793    # As a simple fix, exclude /usr/bin since it's not a real path.
58794    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58796      # a path prefixed by /cygdrive for fixpath to work.
58797      new_path="$CYGWIN_ROOT_PATH$input_path"
58798    fi
58799  fi
58800
58801
58802  if test "x$path" != "x$new_path"; then
58803    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58805$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58806  fi
58807
58808    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58809
58810  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58811  has_colon=`$ECHO $path | $GREP ^.:`
58812  new_path="$path"
58813  if test "x$has_colon" = x; then
58814    # Not in mixed or Windows style, start by that.
58815    new_path=`cmd //c echo $path`
58816  fi
58817
58818
58819  input_path="$new_path"
58820  # Check if we need to convert this using DOS-style short mode. If the path
58821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58822  # take no chances and rewrite it.
58823  # Note: m4 eats our [], so we need to use [ and ] instead.
58824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58825  if test "x$has_forbidden_chars" != x; then
58826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58828  fi
58829
58830
58831  windows_path="$new_path"
58832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58833    unix_path=`$CYGPATH -u "$windows_path"`
58834    new_path="$unix_path"
58835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58837    new_path="$unix_path"
58838  fi
58839
58840  if test "x$path" != "x$new_path"; then
58841    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58843$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58844  fi
58845
58846  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58847  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58848
58849    else
58850      # We're on a unix platform. Hooray! :)
58851      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58852      has_space=`$ECHO "$path" | $GREP " "`
58853      if test "x$has_space" != x; then
58854        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58855$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58856        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58857      fi
58858
58859      # Use eval to expand a potential ~
58860      eval path="$path"
58861      if test ! -f "$path" && test ! -d "$path"; then
58862        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58863      fi
58864
58865      if test -d "$path"; then
58866        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58867      else
58868        dir="`$DIRNAME "$path"`"
58869        base="`$BASENAME "$path"`"
58870        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58871      fi
58872    fi
58873  fi
58874
58875
58876  # Only process if variable expands to non-empty
58877
58878  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58879    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58880
58881  # Input might be given as Windows format, start by converting to
58882  # unix format.
58883  path="$POTENTIAL_FREETYPE_LIB_PATH"
58884  new_path=`$CYGPATH -u "$path"`
58885
58886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58889  # "foo.exe" is OK but "foo" is an error.
58890  #
58891  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58892  # It is also a way to make sure we got the proper file name for the real test later on.
58893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58894  if test "x$test_shortpath" = x; then
58895    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58896$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58897    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58898  fi
58899
58900  # Call helper function which possibly converts this using DOS-style short mode.
58901  # If so, the updated path is stored in $new_path.
58902
58903  input_path="$new_path"
58904  # Check if we need to convert this using DOS-style short mode. If the path
58905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58906  # take no chances and rewrite it.
58907  # Note: m4 eats our [], so we need to use [ and ] instead.
58908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58909  if test "x$has_forbidden_chars" != x; then
58910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58914      # Going to short mode and back again did indeed matter. Since short mode is
58915      # case insensitive, let's make it lowercase to improve readability.
58916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58917      # Now convert it back to Unix-style (cygpath)
58918      input_path=`$CYGPATH -u "$shortmode_path"`
58919      new_path="$input_path"
58920    fi
58921  fi
58922
58923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58924  if test "x$test_cygdrive_prefix" = x; then
58925    # As a simple fix, exclude /usr/bin since it's not a real path.
58926    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58928      # a path prefixed by /cygdrive for fixpath to work.
58929      new_path="$CYGWIN_ROOT_PATH$input_path"
58930    fi
58931  fi
58932
58933
58934  if test "x$path" != "x$new_path"; then
58935    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58937$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58938  fi
58939
58940    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58941
58942  path="$POTENTIAL_FREETYPE_LIB_PATH"
58943  has_colon=`$ECHO $path | $GREP ^.:`
58944  new_path="$path"
58945  if test "x$has_colon" = x; then
58946    # Not in mixed or Windows style, start by that.
58947    new_path=`cmd //c echo $path`
58948  fi
58949
58950
58951  input_path="$new_path"
58952  # Check if we need to convert this using DOS-style short mode. If the path
58953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58954  # take no chances and rewrite it.
58955  # Note: m4 eats our [], so we need to use [ and ] instead.
58956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58957  if test "x$has_forbidden_chars" != x; then
58958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58960  fi
58961
58962
58963  windows_path="$new_path"
58964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58965    unix_path=`$CYGPATH -u "$windows_path"`
58966    new_path="$unix_path"
58967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58969    new_path="$unix_path"
58970  fi
58971
58972  if test "x$path" != "x$new_path"; then
58973    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58975$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58976  fi
58977
58978  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58979  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58980
58981    else
58982      # We're on a unix platform. Hooray! :)
58983      path="$POTENTIAL_FREETYPE_LIB_PATH"
58984      has_space=`$ECHO "$path" | $GREP " "`
58985      if test "x$has_space" != x; then
58986        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58987$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58988        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58989      fi
58990
58991      # Use eval to expand a potential ~
58992      eval path="$path"
58993      if test ! -f "$path" && test ! -d "$path"; then
58994        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58995      fi
58996
58997      if test -d "$path"; then
58998        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58999      else
59000        dir="`$DIRNAME "$path"`"
59001        base="`$BASENAME "$path"`"
59002        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59003      fi
59004    fi
59005  fi
59006
59007
59008    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59010$as_echo_n "checking for freetype includes... " >&6; }
59011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59012$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59013    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59014    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59015$as_echo_n "checking for freetype libraries... " >&6; }
59016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59017$as_echo "$FREETYPE_LIB_PATH" >&6; }
59018  fi
59019
59020            else
59021
59022  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59023  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59024  METHOD="well-known location"
59025
59026  # Let's start with an optimistic view of the world :-)
59027  FOUND_FREETYPE=yes
59028
59029  # First look for the canonical freetype main include file ft2build.h.
59030  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59031    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59032    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59033    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59034      # Fail.
59035      FOUND_FREETYPE=no
59036    fi
59037  fi
59038
59039  if test "x$FOUND_FREETYPE" = xyes; then
59040    # Include file found, let's continue the sanity check.
59041    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59042$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59043
59044    # Reset to default value
59045    FREETYPE_BASE_NAME=freetype
59046    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59047    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59048      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59049          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59050        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59051        # for the .6 version explicitly.
59052        FREETYPE_BASE_NAME=freetype.6
59053        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59054        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59055$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59056      else
59057        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59058$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59059        FOUND_FREETYPE=no
59060      fi
59061    else
59062      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59063        # On Windows, we will need both .lib and .dll file.
59064        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59065          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59066$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59067          FOUND_FREETYPE=no
59068        fi
59069      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59070          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59071        # Found lib in isa dir, use that instead.
59072        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59073        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59074$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59075      fi
59076    fi
59077  fi
59078
59079  if test "x$FOUND_FREETYPE" = xyes; then
59080
59081  # Only process if variable expands to non-empty
59082
59083  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59084    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59085
59086  # Input might be given as Windows format, start by converting to
59087  # unix format.
59088  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59089  new_path=`$CYGPATH -u "$path"`
59090
59091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59094  # "foo.exe" is OK but "foo" is an error.
59095  #
59096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59097  # It is also a way to make sure we got the proper file name for the real test later on.
59098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59099  if test "x$test_shortpath" = x; then
59100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59101$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59102    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59103  fi
59104
59105  # Call helper function which possibly converts this using DOS-style short mode.
59106  # If so, the updated path is stored in $new_path.
59107
59108  input_path="$new_path"
59109  # Check if we need to convert this using DOS-style short mode. If the path
59110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59111  # take no chances and rewrite it.
59112  # Note: m4 eats our [], so we need to use [ and ] instead.
59113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59114  if test "x$has_forbidden_chars" != x; then
59115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59119      # Going to short mode and back again did indeed matter. Since short mode is
59120      # case insensitive, let's make it lowercase to improve readability.
59121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59122      # Now convert it back to Unix-style (cygpath)
59123      input_path=`$CYGPATH -u "$shortmode_path"`
59124      new_path="$input_path"
59125    fi
59126  fi
59127
59128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59129  if test "x$test_cygdrive_prefix" = x; then
59130    # As a simple fix, exclude /usr/bin since it's not a real path.
59131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59133      # a path prefixed by /cygdrive for fixpath to work.
59134      new_path="$CYGWIN_ROOT_PATH$input_path"
59135    fi
59136  fi
59137
59138
59139  if test "x$path" != "x$new_path"; then
59140    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59142$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59143  fi
59144
59145    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59146
59147  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59148  has_colon=`$ECHO $path | $GREP ^.:`
59149  new_path="$path"
59150  if test "x$has_colon" = x; then
59151    # Not in mixed or Windows style, start by that.
59152    new_path=`cmd //c echo $path`
59153  fi
59154
59155
59156  input_path="$new_path"
59157  # Check if we need to convert this using DOS-style short mode. If the path
59158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59159  # take no chances and rewrite it.
59160  # Note: m4 eats our [], so we need to use [ and ] instead.
59161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59162  if test "x$has_forbidden_chars" != x; then
59163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59165  fi
59166
59167
59168  windows_path="$new_path"
59169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59170    unix_path=`$CYGPATH -u "$windows_path"`
59171    new_path="$unix_path"
59172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59174    new_path="$unix_path"
59175  fi
59176
59177  if test "x$path" != "x$new_path"; then
59178    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59180$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59181  fi
59182
59183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59185
59186    else
59187      # We're on a unix platform. Hooray! :)
59188      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59189      has_space=`$ECHO "$path" | $GREP " "`
59190      if test "x$has_space" != x; then
59191        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59192$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59193        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59194      fi
59195
59196      # Use eval to expand a potential ~
59197      eval path="$path"
59198      if test ! -f "$path" && test ! -d "$path"; then
59199        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59200      fi
59201
59202      if test -d "$path"; then
59203        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59204      else
59205        dir="`$DIRNAME "$path"`"
59206        base="`$BASENAME "$path"`"
59207        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59208      fi
59209    fi
59210  fi
59211
59212
59213  # Only process if variable expands to non-empty
59214
59215  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59217
59218  # Input might be given as Windows format, start by converting to
59219  # unix format.
59220  path="$POTENTIAL_FREETYPE_LIB_PATH"
59221  new_path=`$CYGPATH -u "$path"`
59222
59223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59226  # "foo.exe" is OK but "foo" is an error.
59227  #
59228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59229  # It is also a way to make sure we got the proper file name for the real test later on.
59230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59231  if test "x$test_shortpath" = x; then
59232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59233$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59234    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59235  fi
59236
59237  # Call helper function which possibly converts this using DOS-style short mode.
59238  # If so, the updated path is stored in $new_path.
59239
59240  input_path="$new_path"
59241  # Check if we need to convert this using DOS-style short mode. If the path
59242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59243  # take no chances and rewrite it.
59244  # Note: m4 eats our [], so we need to use [ and ] instead.
59245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59246  if test "x$has_forbidden_chars" != x; then
59247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59251      # Going to short mode and back again did indeed matter. Since short mode is
59252      # case insensitive, let's make it lowercase to improve readability.
59253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59254      # Now convert it back to Unix-style (cygpath)
59255      input_path=`$CYGPATH -u "$shortmode_path"`
59256      new_path="$input_path"
59257    fi
59258  fi
59259
59260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59261  if test "x$test_cygdrive_prefix" = x; then
59262    # As a simple fix, exclude /usr/bin since it's not a real path.
59263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59265      # a path prefixed by /cygdrive for fixpath to work.
59266      new_path="$CYGWIN_ROOT_PATH$input_path"
59267    fi
59268  fi
59269
59270
59271  if test "x$path" != "x$new_path"; then
59272    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59274$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59275  fi
59276
59277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59278
59279  path="$POTENTIAL_FREETYPE_LIB_PATH"
59280  has_colon=`$ECHO $path | $GREP ^.:`
59281  new_path="$path"
59282  if test "x$has_colon" = x; then
59283    # Not in mixed or Windows style, start by that.
59284    new_path=`cmd //c echo $path`
59285  fi
59286
59287
59288  input_path="$new_path"
59289  # Check if we need to convert this using DOS-style short mode. If the path
59290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59291  # take no chances and rewrite it.
59292  # Note: m4 eats our [], so we need to use [ and ] instead.
59293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59294  if test "x$has_forbidden_chars" != x; then
59295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59297  fi
59298
59299
59300  windows_path="$new_path"
59301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59302    unix_path=`$CYGPATH -u "$windows_path"`
59303    new_path="$unix_path"
59304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59306    new_path="$unix_path"
59307  fi
59308
59309  if test "x$path" != "x$new_path"; then
59310    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59312$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59313  fi
59314
59315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59317
59318    else
59319      # We're on a unix platform. Hooray! :)
59320      path="$POTENTIAL_FREETYPE_LIB_PATH"
59321      has_space=`$ECHO "$path" | $GREP " "`
59322      if test "x$has_space" != x; then
59323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59324$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59325        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59326      fi
59327
59328      # Use eval to expand a potential ~
59329      eval path="$path"
59330      if test ! -f "$path" && test ! -d "$path"; then
59331        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59332      fi
59333
59334      if test -d "$path"; then
59335        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59336      else
59337        dir="`$DIRNAME "$path"`"
59338        base="`$BASENAME "$path"`"
59339        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59340      fi
59341    fi
59342  fi
59343
59344
59345    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59347$as_echo_n "checking for freetype includes... " >&6; }
59348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59349$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59350    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59351    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59352$as_echo_n "checking for freetype libraries... " >&6; }
59353    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59354$as_echo "$FREETYPE_LIB_PATH" >&6; }
59355  fi
59356
59357            fi
59358            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59359                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59360              # Source is available, as a last resort try to build freetype in default location
59361
59362  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59363  BUILD_FREETYPE=yes
59364
59365  # Check if the freetype sources are acessible..
59366  if ! test -d $FREETYPE_SRC_PATH; then
59367    { $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
59368$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59369    BUILD_FREETYPE=no
59370  fi
59371  # ..and contain a vc2010 project file
59372  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59373  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59374    { $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
59375$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59376    BUILD_FREETYPE=no
59377  fi
59378  # Now check if configure found a version of 'msbuild.exe'
59379  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59380    { $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
59381$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;}
59382    BUILD_FREETYPE=no
59383  fi
59384
59385  # Ready to go..
59386  if test "x$BUILD_FREETYPE" = xyes; then
59387    # msbuild requires trailing slashes for output directories
59388    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59389    freetype_lib_path_unix="$freetype_lib_path"
59390    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59391
59392  unix_path="$vcxproj_path"
59393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59394    windows_path=`$CYGPATH -m "$unix_path"`
59395    vcxproj_path="$windows_path"
59396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59397    windows_path=`cmd //c echo $unix_path`
59398    vcxproj_path="$windows_path"
59399  fi
59400
59401
59402  unix_path="$freetype_lib_path"
59403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59404    windows_path=`$CYGPATH -m "$unix_path"`
59405    freetype_lib_path="$windows_path"
59406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59407    windows_path=`cmd //c echo $unix_path`
59408    freetype_lib_path="$windows_path"
59409  fi
59410
59411
59412  unix_path="$freetype_obj_path"
59413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59414    windows_path=`$CYGPATH -m "$unix_path"`
59415    freetype_obj_path="$windows_path"
59416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59417    windows_path=`cmd //c echo $unix_path`
59418    freetype_obj_path="$windows_path"
59419  fi
59420
59421    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59422      freetype_platform=x64
59423    else
59424      freetype_platform=win32
59425    fi
59426
59427    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59428    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59429    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59430    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59431    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59432$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59433
59434    # First we try to build the freetype.dll
59435    $ECHO -e "@echo off\n"\
59436        "$MSBUILD $vcxproj_path "\
59437        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59438        "/p:Configuration=\"Release Multithreaded\" "\
59439        "/p:Platform=$freetype_platform "\
59440        "/p:ConfigurationType=DynamicLibrary "\
59441        "/p:TargetName=freetype "\
59442        "/p:OutDir=\"$freetype_lib_path\" "\
59443        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59444    cmd /c freetype.bat
59445
59446    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59447      # If that succeeds we also build freetype.lib
59448      $ECHO -e "@echo off\n"\
59449          "$MSBUILD $vcxproj_path "\
59450          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59451          "/p:Configuration=\"Release Multithreaded\" "\
59452          "/p:Platform=$freetype_platform "\
59453          "/p:ConfigurationType=StaticLibrary "\
59454          "/p:TargetName=freetype "\
59455          "/p:OutDir=\"$freetype_lib_path\" "\
59456          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59457      cmd /c freetype.bat
59458
59459      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59460        # Once we build both, lib and dll, set freetype lib and include path appropriately
59461        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59462        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59463        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59464$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59465      else
59466        BUILD_FREETYPE=no
59467      fi
59468    else
59469      BUILD_FREETYPE=no
59470    fi
59471  fi
59472
59473              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59474
59475  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59476  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59477  METHOD="well-known location"
59478
59479  # Let's start with an optimistic view of the world :-)
59480  FOUND_FREETYPE=yes
59481
59482  # First look for the canonical freetype main include file ft2build.h.
59483  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59484    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59485    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59486    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59487      # Fail.
59488      FOUND_FREETYPE=no
59489    fi
59490  fi
59491
59492  if test "x$FOUND_FREETYPE" = xyes; then
59493    # Include file found, let's continue the sanity check.
59494    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59495$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59496
59497    # Reset to default value
59498    FREETYPE_BASE_NAME=freetype
59499    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59500    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59501      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59502          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59503        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59504        # for the .6 version explicitly.
59505        FREETYPE_BASE_NAME=freetype.6
59506        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59507        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59508$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59509      else
59510        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59511$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59512        FOUND_FREETYPE=no
59513      fi
59514    else
59515      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59516        # On Windows, we will need both .lib and .dll file.
59517        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59518          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59519$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59520          FOUND_FREETYPE=no
59521        fi
59522      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59523          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59524        # Found lib in isa dir, use that instead.
59525        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59526        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59527$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59528      fi
59529    fi
59530  fi
59531
59532  if test "x$FOUND_FREETYPE" = xyes; then
59533
59534  # Only process if variable expands to non-empty
59535
59536  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59538
59539  # Input might be given as Windows format, start by converting to
59540  # unix format.
59541  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59542  new_path=`$CYGPATH -u "$path"`
59543
59544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59547  # "foo.exe" is OK but "foo" is an error.
59548  #
59549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59550  # It is also a way to make sure we got the proper file name for the real test later on.
59551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59552  if test "x$test_shortpath" = x; then
59553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59554$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59555    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59556  fi
59557
59558  # Call helper function which possibly converts this using DOS-style short mode.
59559  # If so, the updated path is stored in $new_path.
59560
59561  input_path="$new_path"
59562  # Check if we need to convert this using DOS-style short mode. If the path
59563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59564  # take no chances and rewrite it.
59565  # Note: m4 eats our [], so we need to use [ and ] instead.
59566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59567  if test "x$has_forbidden_chars" != x; then
59568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59572      # Going to short mode and back again did indeed matter. Since short mode is
59573      # case insensitive, let's make it lowercase to improve readability.
59574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59575      # Now convert it back to Unix-style (cygpath)
59576      input_path=`$CYGPATH -u "$shortmode_path"`
59577      new_path="$input_path"
59578    fi
59579  fi
59580
59581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59582  if test "x$test_cygdrive_prefix" = x; then
59583    # As a simple fix, exclude /usr/bin since it's not a real path.
59584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59586      # a path prefixed by /cygdrive for fixpath to work.
59587      new_path="$CYGWIN_ROOT_PATH$input_path"
59588    fi
59589  fi
59590
59591
59592  if test "x$path" != "x$new_path"; then
59593    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59595$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59596  fi
59597
59598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59599
59600  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59601  has_colon=`$ECHO $path | $GREP ^.:`
59602  new_path="$path"
59603  if test "x$has_colon" = x; then
59604    # Not in mixed or Windows style, start by that.
59605    new_path=`cmd //c echo $path`
59606  fi
59607
59608
59609  input_path="$new_path"
59610  # Check if we need to convert this using DOS-style short mode. If the path
59611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59612  # take no chances and rewrite it.
59613  # Note: m4 eats our [], so we need to use [ and ] instead.
59614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59615  if test "x$has_forbidden_chars" != x; then
59616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59618  fi
59619
59620
59621  windows_path="$new_path"
59622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59623    unix_path=`$CYGPATH -u "$windows_path"`
59624    new_path="$unix_path"
59625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59627    new_path="$unix_path"
59628  fi
59629
59630  if test "x$path" != "x$new_path"; then
59631    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59633$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59634  fi
59635
59636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59638
59639    else
59640      # We're on a unix platform. Hooray! :)
59641      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59642      has_space=`$ECHO "$path" | $GREP " "`
59643      if test "x$has_space" != x; then
59644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59645$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59646        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59647      fi
59648
59649      # Use eval to expand a potential ~
59650      eval path="$path"
59651      if test ! -f "$path" && test ! -d "$path"; then
59652        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59653      fi
59654
59655      if test -d "$path"; then
59656        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59657      else
59658        dir="`$DIRNAME "$path"`"
59659        base="`$BASENAME "$path"`"
59660        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59661      fi
59662    fi
59663  fi
59664
59665
59666  # Only process if variable expands to non-empty
59667
59668  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59669    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59670
59671  # Input might be given as Windows format, start by converting to
59672  # unix format.
59673  path="$POTENTIAL_FREETYPE_LIB_PATH"
59674  new_path=`$CYGPATH -u "$path"`
59675
59676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59679  # "foo.exe" is OK but "foo" is an error.
59680  #
59681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59682  # It is also a way to make sure we got the proper file name for the real test later on.
59683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59684  if test "x$test_shortpath" = x; then
59685    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59686$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59687    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59688  fi
59689
59690  # Call helper function which possibly converts this using DOS-style short mode.
59691  # If so, the updated path is stored in $new_path.
59692
59693  input_path="$new_path"
59694  # Check if we need to convert this using DOS-style short mode. If the path
59695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59696  # take no chances and rewrite it.
59697  # Note: m4 eats our [], so we need to use [ and ] instead.
59698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59699  if test "x$has_forbidden_chars" != x; then
59700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59704      # Going to short mode and back again did indeed matter. Since short mode is
59705      # case insensitive, let's make it lowercase to improve readability.
59706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59707      # Now convert it back to Unix-style (cygpath)
59708      input_path=`$CYGPATH -u "$shortmode_path"`
59709      new_path="$input_path"
59710    fi
59711  fi
59712
59713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59714  if test "x$test_cygdrive_prefix" = x; then
59715    # As a simple fix, exclude /usr/bin since it's not a real path.
59716    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59718      # a path prefixed by /cygdrive for fixpath to work.
59719      new_path="$CYGWIN_ROOT_PATH$input_path"
59720    fi
59721  fi
59722
59723
59724  if test "x$path" != "x$new_path"; then
59725    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59727$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59728  fi
59729
59730    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59731
59732  path="$POTENTIAL_FREETYPE_LIB_PATH"
59733  has_colon=`$ECHO $path | $GREP ^.:`
59734  new_path="$path"
59735  if test "x$has_colon" = x; then
59736    # Not in mixed or Windows style, start by that.
59737    new_path=`cmd //c echo $path`
59738  fi
59739
59740
59741  input_path="$new_path"
59742  # Check if we need to convert this using DOS-style short mode. If the path
59743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59744  # take no chances and rewrite it.
59745  # Note: m4 eats our [], so we need to use [ and ] instead.
59746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59747  if test "x$has_forbidden_chars" != x; then
59748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59750  fi
59751
59752
59753  windows_path="$new_path"
59754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59755    unix_path=`$CYGPATH -u "$windows_path"`
59756    new_path="$unix_path"
59757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59759    new_path="$unix_path"
59760  fi
59761
59762  if test "x$path" != "x$new_path"; then
59763    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59765$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59766  fi
59767
59768  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59769  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59770
59771    else
59772      # We're on a unix platform. Hooray! :)
59773      path="$POTENTIAL_FREETYPE_LIB_PATH"
59774      has_space=`$ECHO "$path" | $GREP " "`
59775      if test "x$has_space" != x; then
59776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59777$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59778        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59779      fi
59780
59781      # Use eval to expand a potential ~
59782      eval path="$path"
59783      if test ! -f "$path" && test ! -d "$path"; then
59784        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59785      fi
59786
59787      if test -d "$path"; then
59788        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59789      else
59790        dir="`$DIRNAME "$path"`"
59791        base="`$BASENAME "$path"`"
59792        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59793      fi
59794    fi
59795  fi
59796
59797
59798    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59800$as_echo_n "checking for freetype includes... " >&6; }
59801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59802$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59803    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59804    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59805$as_echo_n "checking for freetype libraries... " >&6; }
59806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59807$as_echo "$FREETYPE_LIB_PATH" >&6; }
59808  fi
59809
59810              else
59811
59812  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59813  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59814  METHOD="well-known location"
59815
59816  # Let's start with an optimistic view of the world :-)
59817  FOUND_FREETYPE=yes
59818
59819  # First look for the canonical freetype main include file ft2build.h.
59820  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59821    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59822    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59823    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59824      # Fail.
59825      FOUND_FREETYPE=no
59826    fi
59827  fi
59828
59829  if test "x$FOUND_FREETYPE" = xyes; then
59830    # Include file found, let's continue the sanity check.
59831    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59832$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59833
59834    # Reset to default value
59835    FREETYPE_BASE_NAME=freetype
59836    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59837    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59838      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59839          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59840        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59841        # for the .6 version explicitly.
59842        FREETYPE_BASE_NAME=freetype.6
59843        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59844        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59845$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59846      else
59847        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59848$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59849        FOUND_FREETYPE=no
59850      fi
59851    else
59852      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59853        # On Windows, we will need both .lib and .dll file.
59854        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59855          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59856$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59857          FOUND_FREETYPE=no
59858        fi
59859      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59860          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59861        # Found lib in isa dir, use that instead.
59862        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59863        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59864$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59865      fi
59866    fi
59867  fi
59868
59869  if test "x$FOUND_FREETYPE" = xyes; then
59870
59871  # Only process if variable expands to non-empty
59872
59873  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59875
59876  # Input might be given as Windows format, start by converting to
59877  # unix format.
59878  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59879  new_path=`$CYGPATH -u "$path"`
59880
59881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59884  # "foo.exe" is OK but "foo" is an error.
59885  #
59886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59887  # It is also a way to make sure we got the proper file name for the real test later on.
59888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59889  if test "x$test_shortpath" = x; then
59890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59891$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59892    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59893  fi
59894
59895  # Call helper function which possibly converts this using DOS-style short mode.
59896  # If so, the updated path is stored in $new_path.
59897
59898  input_path="$new_path"
59899  # Check if we need to convert this using DOS-style short mode. If the path
59900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59901  # take no chances and rewrite it.
59902  # Note: m4 eats our [], so we need to use [ and ] instead.
59903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59904  if test "x$has_forbidden_chars" != x; then
59905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59909      # Going to short mode and back again did indeed matter. Since short mode is
59910      # case insensitive, let's make it lowercase to improve readability.
59911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59912      # Now convert it back to Unix-style (cygpath)
59913      input_path=`$CYGPATH -u "$shortmode_path"`
59914      new_path="$input_path"
59915    fi
59916  fi
59917
59918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59919  if test "x$test_cygdrive_prefix" = x; then
59920    # As a simple fix, exclude /usr/bin since it's not a real path.
59921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59923      # a path prefixed by /cygdrive for fixpath to work.
59924      new_path="$CYGWIN_ROOT_PATH$input_path"
59925    fi
59926  fi
59927
59928
59929  if test "x$path" != "x$new_path"; then
59930    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59932$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59933  fi
59934
59935    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59936
59937  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59938  has_colon=`$ECHO $path | $GREP ^.:`
59939  new_path="$path"
59940  if test "x$has_colon" = x; then
59941    # Not in mixed or Windows style, start by that.
59942    new_path=`cmd //c echo $path`
59943  fi
59944
59945
59946  input_path="$new_path"
59947  # Check if we need to convert this using DOS-style short mode. If the path
59948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59949  # take no chances and rewrite it.
59950  # Note: m4 eats our [], so we need to use [ and ] instead.
59951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59952  if test "x$has_forbidden_chars" != x; then
59953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59955  fi
59956
59957
59958  windows_path="$new_path"
59959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59960    unix_path=`$CYGPATH -u "$windows_path"`
59961    new_path="$unix_path"
59962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59964    new_path="$unix_path"
59965  fi
59966
59967  if test "x$path" != "x$new_path"; then
59968    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59970$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59971  fi
59972
59973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59975
59976    else
59977      # We're on a unix platform. Hooray! :)
59978      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59979      has_space=`$ECHO "$path" | $GREP " "`
59980      if test "x$has_space" != x; then
59981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59982$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59983        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59984      fi
59985
59986      # Use eval to expand a potential ~
59987      eval path="$path"
59988      if test ! -f "$path" && test ! -d "$path"; then
59989        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59990      fi
59991
59992      if test -d "$path"; then
59993        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59994      else
59995        dir="`$DIRNAME "$path"`"
59996        base="`$BASENAME "$path"`"
59997        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59998      fi
59999    fi
60000  fi
60001
60002
60003  # Only process if variable expands to non-empty
60004
60005  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60006    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60007
60008  # Input might be given as Windows format, start by converting to
60009  # unix format.
60010  path="$POTENTIAL_FREETYPE_LIB_PATH"
60011  new_path=`$CYGPATH -u "$path"`
60012
60013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60016  # "foo.exe" is OK but "foo" is an error.
60017  #
60018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60019  # It is also a way to make sure we got the proper file name for the real test later on.
60020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60021  if test "x$test_shortpath" = x; then
60022    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60023$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60024    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60025  fi
60026
60027  # Call helper function which possibly converts this using DOS-style short mode.
60028  # If so, the updated path is stored in $new_path.
60029
60030  input_path="$new_path"
60031  # Check if we need to convert this using DOS-style short mode. If the path
60032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60033  # take no chances and rewrite it.
60034  # Note: m4 eats our [], so we need to use [ and ] instead.
60035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60036  if test "x$has_forbidden_chars" != x; then
60037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60041      # Going to short mode and back again did indeed matter. Since short mode is
60042      # case insensitive, let's make it lowercase to improve readability.
60043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60044      # Now convert it back to Unix-style (cygpath)
60045      input_path=`$CYGPATH -u "$shortmode_path"`
60046      new_path="$input_path"
60047    fi
60048  fi
60049
60050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60051  if test "x$test_cygdrive_prefix" = x; then
60052    # As a simple fix, exclude /usr/bin since it's not a real path.
60053    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60055      # a path prefixed by /cygdrive for fixpath to work.
60056      new_path="$CYGWIN_ROOT_PATH$input_path"
60057    fi
60058  fi
60059
60060
60061  if test "x$path" != "x$new_path"; then
60062    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60064$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60065  fi
60066
60067    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60068
60069  path="$POTENTIAL_FREETYPE_LIB_PATH"
60070  has_colon=`$ECHO $path | $GREP ^.:`
60071  new_path="$path"
60072  if test "x$has_colon" = x; then
60073    # Not in mixed or Windows style, start by that.
60074    new_path=`cmd //c echo $path`
60075  fi
60076
60077
60078  input_path="$new_path"
60079  # Check if we need to convert this using DOS-style short mode. If the path
60080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60081  # take no chances and rewrite it.
60082  # Note: m4 eats our [], so we need to use [ and ] instead.
60083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60084  if test "x$has_forbidden_chars" != x; then
60085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60087  fi
60088
60089
60090  windows_path="$new_path"
60091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60092    unix_path=`$CYGPATH -u "$windows_path"`
60093    new_path="$unix_path"
60094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60096    new_path="$unix_path"
60097  fi
60098
60099  if test "x$path" != "x$new_path"; then
60100    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60102$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60103  fi
60104
60105  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60106  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60107
60108    else
60109      # We're on a unix platform. Hooray! :)
60110      path="$POTENTIAL_FREETYPE_LIB_PATH"
60111      has_space=`$ECHO "$path" | $GREP " "`
60112      if test "x$has_space" != x; then
60113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60114$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60115        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60116      fi
60117
60118      # Use eval to expand a potential ~
60119      eval path="$path"
60120      if test ! -f "$path" && test ! -d "$path"; then
60121        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60122      fi
60123
60124      if test -d "$path"; then
60125        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60126      else
60127        dir="`$DIRNAME "$path"`"
60128        base="`$BASENAME "$path"`"
60129        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60130      fi
60131    fi
60132  fi
60133
60134
60135    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60136    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60137$as_echo_n "checking for freetype includes... " >&6; }
60138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60139$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60140    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60142$as_echo_n "checking for freetype libraries... " >&6; }
60143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60144$as_echo "$FREETYPE_LIB_PATH" >&6; }
60145  fi
60146
60147              fi
60148            fi
60149          fi
60150        else
60151          FREETYPE_BASE_DIR="$SYSROOT/usr"
60152
60153  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60154  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60155  METHOD="well-known location"
60156
60157  # Let's start with an optimistic view of the world :-)
60158  FOUND_FREETYPE=yes
60159
60160  # First look for the canonical freetype main include file ft2build.h.
60161  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60162    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60163    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60164    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60165      # Fail.
60166      FOUND_FREETYPE=no
60167    fi
60168  fi
60169
60170  if test "x$FOUND_FREETYPE" = xyes; then
60171    # Include file found, let's continue the sanity check.
60172    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60173$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60174
60175    # Reset to default value
60176    FREETYPE_BASE_NAME=freetype
60177    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60178    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60179      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60180          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60181        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60182        # for the .6 version explicitly.
60183        FREETYPE_BASE_NAME=freetype.6
60184        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60185        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60186$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60187      else
60188        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60189$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60190        FOUND_FREETYPE=no
60191      fi
60192    else
60193      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60194        # On Windows, we will need both .lib and .dll file.
60195        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60196          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60197$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60198          FOUND_FREETYPE=no
60199        fi
60200      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60201          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60202        # Found lib in isa dir, use that instead.
60203        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60204        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60205$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60206      fi
60207    fi
60208  fi
60209
60210  if test "x$FOUND_FREETYPE" = xyes; then
60211
60212  # Only process if variable expands to non-empty
60213
60214  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60216
60217  # Input might be given as Windows format, start by converting to
60218  # unix format.
60219  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60220  new_path=`$CYGPATH -u "$path"`
60221
60222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60225  # "foo.exe" is OK but "foo" is an error.
60226  #
60227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60228  # It is also a way to make sure we got the proper file name for the real test later on.
60229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60230  if test "x$test_shortpath" = x; then
60231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60232$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60233    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60234  fi
60235
60236  # Call helper function which possibly converts this using DOS-style short mode.
60237  # If so, the updated path is stored in $new_path.
60238
60239  input_path="$new_path"
60240  # Check if we need to convert this using DOS-style short mode. If the path
60241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60242  # take no chances and rewrite it.
60243  # Note: m4 eats our [], so we need to use [ and ] instead.
60244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60245  if test "x$has_forbidden_chars" != x; then
60246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60250      # Going to short mode and back again did indeed matter. Since short mode is
60251      # case insensitive, let's make it lowercase to improve readability.
60252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60253      # Now convert it back to Unix-style (cygpath)
60254      input_path=`$CYGPATH -u "$shortmode_path"`
60255      new_path="$input_path"
60256    fi
60257  fi
60258
60259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60260  if test "x$test_cygdrive_prefix" = x; then
60261    # As a simple fix, exclude /usr/bin since it's not a real path.
60262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60264      # a path prefixed by /cygdrive for fixpath to work.
60265      new_path="$CYGWIN_ROOT_PATH$input_path"
60266    fi
60267  fi
60268
60269
60270  if test "x$path" != "x$new_path"; then
60271    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60273$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60274  fi
60275
60276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60277
60278  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60279  has_colon=`$ECHO $path | $GREP ^.:`
60280  new_path="$path"
60281  if test "x$has_colon" = x; then
60282    # Not in mixed or Windows style, start by that.
60283    new_path=`cmd //c echo $path`
60284  fi
60285
60286
60287  input_path="$new_path"
60288  # Check if we need to convert this using DOS-style short mode. If the path
60289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60290  # take no chances and rewrite it.
60291  # Note: m4 eats our [], so we need to use [ and ] instead.
60292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60293  if test "x$has_forbidden_chars" != x; then
60294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60296  fi
60297
60298
60299  windows_path="$new_path"
60300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60301    unix_path=`$CYGPATH -u "$windows_path"`
60302    new_path="$unix_path"
60303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60305    new_path="$unix_path"
60306  fi
60307
60308  if test "x$path" != "x$new_path"; then
60309    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60311$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60312  fi
60313
60314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60316
60317    else
60318      # We're on a unix platform. Hooray! :)
60319      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60320      has_space=`$ECHO "$path" | $GREP " "`
60321      if test "x$has_space" != x; then
60322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60323$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60325      fi
60326
60327      # Use eval to expand a potential ~
60328      eval path="$path"
60329      if test ! -f "$path" && test ! -d "$path"; then
60330        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60331      fi
60332
60333      if test -d "$path"; then
60334        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60335      else
60336        dir="`$DIRNAME "$path"`"
60337        base="`$BASENAME "$path"`"
60338        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60339      fi
60340    fi
60341  fi
60342
60343
60344  # Only process if variable expands to non-empty
60345
60346  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60347    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60348
60349  # Input might be given as Windows format, start by converting to
60350  # unix format.
60351  path="$POTENTIAL_FREETYPE_LIB_PATH"
60352  new_path=`$CYGPATH -u "$path"`
60353
60354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60357  # "foo.exe" is OK but "foo" is an error.
60358  #
60359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60360  # It is also a way to make sure we got the proper file name for the real test later on.
60361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60362  if test "x$test_shortpath" = x; then
60363    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60364$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60365    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60366  fi
60367
60368  # Call helper function which possibly converts this using DOS-style short mode.
60369  # If so, the updated path is stored in $new_path.
60370
60371  input_path="$new_path"
60372  # Check if we need to convert this using DOS-style short mode. If the path
60373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60374  # take no chances and rewrite it.
60375  # Note: m4 eats our [], so we need to use [ and ] instead.
60376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60377  if test "x$has_forbidden_chars" != x; then
60378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60382      # Going to short mode and back again did indeed matter. Since short mode is
60383      # case insensitive, let's make it lowercase to improve readability.
60384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60385      # Now convert it back to Unix-style (cygpath)
60386      input_path=`$CYGPATH -u "$shortmode_path"`
60387      new_path="$input_path"
60388    fi
60389  fi
60390
60391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60392  if test "x$test_cygdrive_prefix" = x; then
60393    # As a simple fix, exclude /usr/bin since it's not a real path.
60394    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60396      # a path prefixed by /cygdrive for fixpath to work.
60397      new_path="$CYGWIN_ROOT_PATH$input_path"
60398    fi
60399  fi
60400
60401
60402  if test "x$path" != "x$new_path"; then
60403    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60405$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60406  fi
60407
60408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60409
60410  path="$POTENTIAL_FREETYPE_LIB_PATH"
60411  has_colon=`$ECHO $path | $GREP ^.:`
60412  new_path="$path"
60413  if test "x$has_colon" = x; then
60414    # Not in mixed or Windows style, start by that.
60415    new_path=`cmd //c echo $path`
60416  fi
60417
60418
60419  input_path="$new_path"
60420  # Check if we need to convert this using DOS-style short mode. If the path
60421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60422  # take no chances and rewrite it.
60423  # Note: m4 eats our [], so we need to use [ and ] instead.
60424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60425  if test "x$has_forbidden_chars" != x; then
60426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60428  fi
60429
60430
60431  windows_path="$new_path"
60432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60433    unix_path=`$CYGPATH -u "$windows_path"`
60434    new_path="$unix_path"
60435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60437    new_path="$unix_path"
60438  fi
60439
60440  if test "x$path" != "x$new_path"; then
60441    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60443$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60444  fi
60445
60446  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60447  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60448
60449    else
60450      # We're on a unix platform. Hooray! :)
60451      path="$POTENTIAL_FREETYPE_LIB_PATH"
60452      has_space=`$ECHO "$path" | $GREP " "`
60453      if test "x$has_space" != x; then
60454        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60455$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60456        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60457      fi
60458
60459      # Use eval to expand a potential ~
60460      eval path="$path"
60461      if test ! -f "$path" && test ! -d "$path"; then
60462        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60463      fi
60464
60465      if test -d "$path"; then
60466        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60467      else
60468        dir="`$DIRNAME "$path"`"
60469        base="`$BASENAME "$path"`"
60470        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60471      fi
60472    fi
60473  fi
60474
60475
60476    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60478$as_echo_n "checking for freetype includes... " >&6; }
60479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60480$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60481    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60482    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60483$as_echo_n "checking for freetype libraries... " >&6; }
60484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60485$as_echo "$FREETYPE_LIB_PATH" >&6; }
60486  fi
60487
60488
60489          if test "x$FOUND_FREETYPE" != xyes; then
60490            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60491
60492  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60493  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60494  METHOD="well-known location"
60495
60496  # Let's start with an optimistic view of the world :-)
60497  FOUND_FREETYPE=yes
60498
60499  # First look for the canonical freetype main include file ft2build.h.
60500  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60501    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60502    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60503    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60504      # Fail.
60505      FOUND_FREETYPE=no
60506    fi
60507  fi
60508
60509  if test "x$FOUND_FREETYPE" = xyes; then
60510    # Include file found, let's continue the sanity check.
60511    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60512$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60513
60514    # Reset to default value
60515    FREETYPE_BASE_NAME=freetype
60516    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60517    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60518      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60519          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60520        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60521        # for the .6 version explicitly.
60522        FREETYPE_BASE_NAME=freetype.6
60523        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60524        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60525$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60526      else
60527        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60528$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60529        FOUND_FREETYPE=no
60530      fi
60531    else
60532      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60533        # On Windows, we will need both .lib and .dll file.
60534        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60535          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60536$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60537          FOUND_FREETYPE=no
60538        fi
60539      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60540          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60541        # Found lib in isa dir, use that instead.
60542        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60543        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60544$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60545      fi
60546    fi
60547  fi
60548
60549  if test "x$FOUND_FREETYPE" = xyes; then
60550
60551  # Only process if variable expands to non-empty
60552
60553  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60555
60556  # Input might be given as Windows format, start by converting to
60557  # unix format.
60558  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60559  new_path=`$CYGPATH -u "$path"`
60560
60561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60564  # "foo.exe" is OK but "foo" is an error.
60565  #
60566  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60567  # It is also a way to make sure we got the proper file name for the real test later on.
60568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60569  if test "x$test_shortpath" = x; then
60570    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60571$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60572    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60573  fi
60574
60575  # Call helper function which possibly converts this using DOS-style short mode.
60576  # If so, the updated path is stored in $new_path.
60577
60578  input_path="$new_path"
60579  # Check if we need to convert this using DOS-style short mode. If the path
60580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60581  # take no chances and rewrite it.
60582  # Note: m4 eats our [], so we need to use [ and ] instead.
60583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60584  if test "x$has_forbidden_chars" != x; then
60585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60589      # Going to short mode and back again did indeed matter. Since short mode is
60590      # case insensitive, let's make it lowercase to improve readability.
60591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60592      # Now convert it back to Unix-style (cygpath)
60593      input_path=`$CYGPATH -u "$shortmode_path"`
60594      new_path="$input_path"
60595    fi
60596  fi
60597
60598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60599  if test "x$test_cygdrive_prefix" = x; then
60600    # As a simple fix, exclude /usr/bin since it's not a real path.
60601    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60603      # a path prefixed by /cygdrive for fixpath to work.
60604      new_path="$CYGWIN_ROOT_PATH$input_path"
60605    fi
60606  fi
60607
60608
60609  if test "x$path" != "x$new_path"; then
60610    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60612$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60613  fi
60614
60615    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60616
60617  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60618  has_colon=`$ECHO $path | $GREP ^.:`
60619  new_path="$path"
60620  if test "x$has_colon" = x; then
60621    # Not in mixed or Windows style, start by that.
60622    new_path=`cmd //c echo $path`
60623  fi
60624
60625
60626  input_path="$new_path"
60627  # Check if we need to convert this using DOS-style short mode. If the path
60628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60629  # take no chances and rewrite it.
60630  # Note: m4 eats our [], so we need to use [ and ] instead.
60631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60632  if test "x$has_forbidden_chars" != x; then
60633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60635  fi
60636
60637
60638  windows_path="$new_path"
60639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60640    unix_path=`$CYGPATH -u "$windows_path"`
60641    new_path="$unix_path"
60642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60644    new_path="$unix_path"
60645  fi
60646
60647  if test "x$path" != "x$new_path"; then
60648    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60650$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60651  fi
60652
60653  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60654  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60655
60656    else
60657      # We're on a unix platform. Hooray! :)
60658      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60659      has_space=`$ECHO "$path" | $GREP " "`
60660      if test "x$has_space" != x; then
60661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60662$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60663        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60664      fi
60665
60666      # Use eval to expand a potential ~
60667      eval path="$path"
60668      if test ! -f "$path" && test ! -d "$path"; then
60669        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60670      fi
60671
60672      if test -d "$path"; then
60673        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60674      else
60675        dir="`$DIRNAME "$path"`"
60676        base="`$BASENAME "$path"`"
60677        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60678      fi
60679    fi
60680  fi
60681
60682
60683  # Only process if variable expands to non-empty
60684
60685  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60687
60688  # Input might be given as Windows format, start by converting to
60689  # unix format.
60690  path="$POTENTIAL_FREETYPE_LIB_PATH"
60691  new_path=`$CYGPATH -u "$path"`
60692
60693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60696  # "foo.exe" is OK but "foo" is an error.
60697  #
60698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60699  # It is also a way to make sure we got the proper file name for the real test later on.
60700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60701  if test "x$test_shortpath" = x; then
60702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60703$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60704    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60705  fi
60706
60707  # Call helper function which possibly converts this using DOS-style short mode.
60708  # If so, the updated path is stored in $new_path.
60709
60710  input_path="$new_path"
60711  # Check if we need to convert this using DOS-style short mode. If the path
60712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60713  # take no chances and rewrite it.
60714  # Note: m4 eats our [], so we need to use [ and ] instead.
60715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60716  if test "x$has_forbidden_chars" != x; then
60717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60721      # Going to short mode and back again did indeed matter. Since short mode is
60722      # case insensitive, let's make it lowercase to improve readability.
60723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60724      # Now convert it back to Unix-style (cygpath)
60725      input_path=`$CYGPATH -u "$shortmode_path"`
60726      new_path="$input_path"
60727    fi
60728  fi
60729
60730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60731  if test "x$test_cygdrive_prefix" = x; then
60732    # As a simple fix, exclude /usr/bin since it's not a real path.
60733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60735      # a path prefixed by /cygdrive for fixpath to work.
60736      new_path="$CYGWIN_ROOT_PATH$input_path"
60737    fi
60738  fi
60739
60740
60741  if test "x$path" != "x$new_path"; then
60742    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60744$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60745  fi
60746
60747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60748
60749  path="$POTENTIAL_FREETYPE_LIB_PATH"
60750  has_colon=`$ECHO $path | $GREP ^.:`
60751  new_path="$path"
60752  if test "x$has_colon" = x; then
60753    # Not in mixed or Windows style, start by that.
60754    new_path=`cmd //c echo $path`
60755  fi
60756
60757
60758  input_path="$new_path"
60759  # Check if we need to convert this using DOS-style short mode. If the path
60760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60761  # take no chances and rewrite it.
60762  # Note: m4 eats our [], so we need to use [ and ] instead.
60763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60764  if test "x$has_forbidden_chars" != x; then
60765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60767  fi
60768
60769
60770  windows_path="$new_path"
60771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60772    unix_path=`$CYGPATH -u "$windows_path"`
60773    new_path="$unix_path"
60774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60776    new_path="$unix_path"
60777  fi
60778
60779  if test "x$path" != "x$new_path"; then
60780    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60782$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60783  fi
60784
60785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60787
60788    else
60789      # We're on a unix platform. Hooray! :)
60790      path="$POTENTIAL_FREETYPE_LIB_PATH"
60791      has_space=`$ECHO "$path" | $GREP " "`
60792      if test "x$has_space" != x; then
60793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60794$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60795        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60796      fi
60797
60798      # Use eval to expand a potential ~
60799      eval path="$path"
60800      if test ! -f "$path" && test ! -d "$path"; then
60801        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60802      fi
60803
60804      if test -d "$path"; then
60805        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60806      else
60807        dir="`$DIRNAME "$path"`"
60808        base="`$BASENAME "$path"`"
60809        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60810      fi
60811    fi
60812  fi
60813
60814
60815    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60817$as_echo_n "checking for freetype includes... " >&6; }
60818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60819$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60820    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60822$as_echo_n "checking for freetype libraries... " >&6; }
60823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60824$as_echo "$FREETYPE_LIB_PATH" >&6; }
60825  fi
60826
60827          fi
60828
60829          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60830            if test "x$FOUND_FREETYPE" != xyes; then
60831              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60832              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60833
60834  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60835  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60836  METHOD="well-known location"
60837
60838  # Let's start with an optimistic view of the world :-)
60839  FOUND_FREETYPE=yes
60840
60841  # First look for the canonical freetype main include file ft2build.h.
60842  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60843    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60844    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60845    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60846      # Fail.
60847      FOUND_FREETYPE=no
60848    fi
60849  fi
60850
60851  if test "x$FOUND_FREETYPE" = xyes; then
60852    # Include file found, let's continue the sanity check.
60853    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60854$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60855
60856    # Reset to default value
60857    FREETYPE_BASE_NAME=freetype
60858    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60859    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60860      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60861          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60862        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60863        # for the .6 version explicitly.
60864        FREETYPE_BASE_NAME=freetype.6
60865        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60866        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60867$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60868      else
60869        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60870$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60871        FOUND_FREETYPE=no
60872      fi
60873    else
60874      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60875        # On Windows, we will need both .lib and .dll file.
60876        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60877          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60878$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60879          FOUND_FREETYPE=no
60880        fi
60881      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60882          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60883        # Found lib in isa dir, use that instead.
60884        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60885        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60886$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60887      fi
60888    fi
60889  fi
60890
60891  if test "x$FOUND_FREETYPE" = xyes; then
60892
60893  # Only process if variable expands to non-empty
60894
60895  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60897
60898  # Input might be given as Windows format, start by converting to
60899  # unix format.
60900  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60901  new_path=`$CYGPATH -u "$path"`
60902
60903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60906  # "foo.exe" is OK but "foo" is an error.
60907  #
60908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60909  # It is also a way to make sure we got the proper file name for the real test later on.
60910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60911  if test "x$test_shortpath" = x; then
60912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60913$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60914    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60915  fi
60916
60917  # Call helper function which possibly converts this using DOS-style short mode.
60918  # If so, the updated path is stored in $new_path.
60919
60920  input_path="$new_path"
60921  # Check if we need to convert this using DOS-style short mode. If the path
60922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60923  # take no chances and rewrite it.
60924  # Note: m4 eats our [], so we need to use [ and ] instead.
60925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60926  if test "x$has_forbidden_chars" != x; then
60927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60931      # Going to short mode and back again did indeed matter. Since short mode is
60932      # case insensitive, let's make it lowercase to improve readability.
60933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60934      # Now convert it back to Unix-style (cygpath)
60935      input_path=`$CYGPATH -u "$shortmode_path"`
60936      new_path="$input_path"
60937    fi
60938  fi
60939
60940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60941  if test "x$test_cygdrive_prefix" = x; then
60942    # As a simple fix, exclude /usr/bin since it's not a real path.
60943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60945      # a path prefixed by /cygdrive for fixpath to work.
60946      new_path="$CYGWIN_ROOT_PATH$input_path"
60947    fi
60948  fi
60949
60950
60951  if test "x$path" != "x$new_path"; then
60952    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60954$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60955  fi
60956
60957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60958
60959  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60960  has_colon=`$ECHO $path | $GREP ^.:`
60961  new_path="$path"
60962  if test "x$has_colon" = x; then
60963    # Not in mixed or Windows style, start by that.
60964    new_path=`cmd //c echo $path`
60965  fi
60966
60967
60968  input_path="$new_path"
60969  # Check if we need to convert this using DOS-style short mode. If the path
60970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60971  # take no chances and rewrite it.
60972  # Note: m4 eats our [], so we need to use [ and ] instead.
60973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60974  if test "x$has_forbidden_chars" != x; then
60975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60977  fi
60978
60979
60980  windows_path="$new_path"
60981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60982    unix_path=`$CYGPATH -u "$windows_path"`
60983    new_path="$unix_path"
60984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60986    new_path="$unix_path"
60987  fi
60988
60989  if test "x$path" != "x$new_path"; then
60990    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60992$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60993  fi
60994
60995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60997
60998    else
60999      # We're on a unix platform. Hooray! :)
61000      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61001      has_space=`$ECHO "$path" | $GREP " "`
61002      if test "x$has_space" != x; then
61003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61004$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61005        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61006      fi
61007
61008      # Use eval to expand a potential ~
61009      eval path="$path"
61010      if test ! -f "$path" && test ! -d "$path"; then
61011        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61012      fi
61013
61014      if test -d "$path"; then
61015        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61016      else
61017        dir="`$DIRNAME "$path"`"
61018        base="`$BASENAME "$path"`"
61019        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61020      fi
61021    fi
61022  fi
61023
61024
61025  # Only process if variable expands to non-empty
61026
61027  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61029
61030  # Input might be given as Windows format, start by converting to
61031  # unix format.
61032  path="$POTENTIAL_FREETYPE_LIB_PATH"
61033  new_path=`$CYGPATH -u "$path"`
61034
61035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61038  # "foo.exe" is OK but "foo" is an error.
61039  #
61040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61041  # It is also a way to make sure we got the proper file name for the real test later on.
61042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61043  if test "x$test_shortpath" = x; then
61044    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61045$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61046    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61047  fi
61048
61049  # Call helper function which possibly converts this using DOS-style short mode.
61050  # If so, the updated path is stored in $new_path.
61051
61052  input_path="$new_path"
61053  # Check if we need to convert this using DOS-style short mode. If the path
61054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61055  # take no chances and rewrite it.
61056  # Note: m4 eats our [], so we need to use [ and ] instead.
61057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61058  if test "x$has_forbidden_chars" != x; then
61059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61063      # Going to short mode and back again did indeed matter. Since short mode is
61064      # case insensitive, let's make it lowercase to improve readability.
61065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61066      # Now convert it back to Unix-style (cygpath)
61067      input_path=`$CYGPATH -u "$shortmode_path"`
61068      new_path="$input_path"
61069    fi
61070  fi
61071
61072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61073  if test "x$test_cygdrive_prefix" = x; then
61074    # As a simple fix, exclude /usr/bin since it's not a real path.
61075    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61077      # a path prefixed by /cygdrive for fixpath to work.
61078      new_path="$CYGWIN_ROOT_PATH$input_path"
61079    fi
61080  fi
61081
61082
61083  if test "x$path" != "x$new_path"; then
61084    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61086$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61087  fi
61088
61089    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61090
61091  path="$POTENTIAL_FREETYPE_LIB_PATH"
61092  has_colon=`$ECHO $path | $GREP ^.:`
61093  new_path="$path"
61094  if test "x$has_colon" = x; then
61095    # Not in mixed or Windows style, start by that.
61096    new_path=`cmd //c echo $path`
61097  fi
61098
61099
61100  input_path="$new_path"
61101  # Check if we need to convert this using DOS-style short mode. If the path
61102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61103  # take no chances and rewrite it.
61104  # Note: m4 eats our [], so we need to use [ and ] instead.
61105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61106  if test "x$has_forbidden_chars" != x; then
61107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61109  fi
61110
61111
61112  windows_path="$new_path"
61113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61114    unix_path=`$CYGPATH -u "$windows_path"`
61115    new_path="$unix_path"
61116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61118    new_path="$unix_path"
61119  fi
61120
61121  if test "x$path" != "x$new_path"; then
61122    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61124$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61125  fi
61126
61127  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61128  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61129
61130    else
61131      # We're on a unix platform. Hooray! :)
61132      path="$POTENTIAL_FREETYPE_LIB_PATH"
61133      has_space=`$ECHO "$path" | $GREP " "`
61134      if test "x$has_space" != x; then
61135        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61136$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61137        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61138      fi
61139
61140      # Use eval to expand a potential ~
61141      eval path="$path"
61142      if test ! -f "$path" && test ! -d "$path"; then
61143        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61144      fi
61145
61146      if test -d "$path"; then
61147        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61148      else
61149        dir="`$DIRNAME "$path"`"
61150        base="`$BASENAME "$path"`"
61151        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61152      fi
61153    fi
61154  fi
61155
61156
61157    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61159$as_echo_n "checking for freetype includes... " >&6; }
61160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61161$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61162    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61164$as_echo_n "checking for freetype libraries... " >&6; }
61165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61166$as_echo "$FREETYPE_LIB_PATH" >&6; }
61167  fi
61168
61169            fi
61170          fi
61171
61172          if test "x$FOUND_FREETYPE" != xyes; then
61173            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
61174
61175  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61176  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61177  METHOD="well-known location"
61178
61179  # Let's start with an optimistic view of the world :-)
61180  FOUND_FREETYPE=yes
61181
61182  # First look for the canonical freetype main include file ft2build.h.
61183  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61184    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61185    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61186    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61187      # Fail.
61188      FOUND_FREETYPE=no
61189    fi
61190  fi
61191
61192  if test "x$FOUND_FREETYPE" = xyes; then
61193    # Include file found, let's continue the sanity check.
61194    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61195$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61196
61197    # Reset to default value
61198    FREETYPE_BASE_NAME=freetype
61199    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61200    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61201      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61202          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61203        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61204        # for the .6 version explicitly.
61205        FREETYPE_BASE_NAME=freetype.6
61206        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61207        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61208$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61209      else
61210        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61211$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61212        FOUND_FREETYPE=no
61213      fi
61214    else
61215      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61216        # On Windows, we will need both .lib and .dll file.
61217        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61218          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61219$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61220          FOUND_FREETYPE=no
61221        fi
61222      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61223          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61224        # Found lib in isa dir, use that instead.
61225        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61226        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61227$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61228      fi
61229    fi
61230  fi
61231
61232  if test "x$FOUND_FREETYPE" = xyes; then
61233
61234  # Only process if variable expands to non-empty
61235
61236  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61238
61239  # Input might be given as Windows format, start by converting to
61240  # unix format.
61241  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61242  new_path=`$CYGPATH -u "$path"`
61243
61244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61247  # "foo.exe" is OK but "foo" is an error.
61248  #
61249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61250  # It is also a way to make sure we got the proper file name for the real test later on.
61251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61252  if test "x$test_shortpath" = x; then
61253    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61254$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61255    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61256  fi
61257
61258  # Call helper function which possibly converts this using DOS-style short mode.
61259  # If so, the updated path is stored in $new_path.
61260
61261  input_path="$new_path"
61262  # Check if we need to convert this using DOS-style short mode. If the path
61263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61264  # take no chances and rewrite it.
61265  # Note: m4 eats our [], so we need to use [ and ] instead.
61266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61267  if test "x$has_forbidden_chars" != x; then
61268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61272      # Going to short mode and back again did indeed matter. Since short mode is
61273      # case insensitive, let's make it lowercase to improve readability.
61274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61275      # Now convert it back to Unix-style (cygpath)
61276      input_path=`$CYGPATH -u "$shortmode_path"`
61277      new_path="$input_path"
61278    fi
61279  fi
61280
61281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61282  if test "x$test_cygdrive_prefix" = x; then
61283    # As a simple fix, exclude /usr/bin since it's not a real path.
61284    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61286      # a path prefixed by /cygdrive for fixpath to work.
61287      new_path="$CYGWIN_ROOT_PATH$input_path"
61288    fi
61289  fi
61290
61291
61292  if test "x$path" != "x$new_path"; then
61293    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61295$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61296  fi
61297
61298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61299
61300  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61301  has_colon=`$ECHO $path | $GREP ^.:`
61302  new_path="$path"
61303  if test "x$has_colon" = x; then
61304    # Not in mixed or Windows style, start by that.
61305    new_path=`cmd //c echo $path`
61306  fi
61307
61308
61309  input_path="$new_path"
61310  # Check if we need to convert this using DOS-style short mode. If the path
61311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61312  # take no chances and rewrite it.
61313  # Note: m4 eats our [], so we need to use [ and ] instead.
61314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61315  if test "x$has_forbidden_chars" != x; then
61316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61318  fi
61319
61320
61321  windows_path="$new_path"
61322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61323    unix_path=`$CYGPATH -u "$windows_path"`
61324    new_path="$unix_path"
61325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61327    new_path="$unix_path"
61328  fi
61329
61330  if test "x$path" != "x$new_path"; then
61331    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61333$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61334  fi
61335
61336  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61337  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61338
61339    else
61340      # We're on a unix platform. Hooray! :)
61341      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61342      has_space=`$ECHO "$path" | $GREP " "`
61343      if test "x$has_space" != x; then
61344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61345$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61346        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61347      fi
61348
61349      # Use eval to expand a potential ~
61350      eval path="$path"
61351      if test ! -f "$path" && test ! -d "$path"; then
61352        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61353      fi
61354
61355      if test -d "$path"; then
61356        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61357      else
61358        dir="`$DIRNAME "$path"`"
61359        base="`$BASENAME "$path"`"
61360        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61361      fi
61362    fi
61363  fi
61364
61365
61366  # Only process if variable expands to non-empty
61367
61368  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61369    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61370
61371  # Input might be given as Windows format, start by converting to
61372  # unix format.
61373  path="$POTENTIAL_FREETYPE_LIB_PATH"
61374  new_path=`$CYGPATH -u "$path"`
61375
61376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61379  # "foo.exe" is OK but "foo" is an error.
61380  #
61381  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61382  # It is also a way to make sure we got the proper file name for the real test later on.
61383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61384  if test "x$test_shortpath" = x; then
61385    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61386$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61387    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61388  fi
61389
61390  # Call helper function which possibly converts this using DOS-style short mode.
61391  # If so, the updated path is stored in $new_path.
61392
61393  input_path="$new_path"
61394  # Check if we need to convert this using DOS-style short mode. If the path
61395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61396  # take no chances and rewrite it.
61397  # Note: m4 eats our [], so we need to use [ and ] instead.
61398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61399  if test "x$has_forbidden_chars" != x; then
61400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61404      # Going to short mode and back again did indeed matter. Since short mode is
61405      # case insensitive, let's make it lowercase to improve readability.
61406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61407      # Now convert it back to Unix-style (cygpath)
61408      input_path=`$CYGPATH -u "$shortmode_path"`
61409      new_path="$input_path"
61410    fi
61411  fi
61412
61413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61414  if test "x$test_cygdrive_prefix" = x; then
61415    # As a simple fix, exclude /usr/bin since it's not a real path.
61416    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61418      # a path prefixed by /cygdrive for fixpath to work.
61419      new_path="$CYGWIN_ROOT_PATH$input_path"
61420    fi
61421  fi
61422
61423
61424  if test "x$path" != "x$new_path"; then
61425    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61427$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61428  fi
61429
61430    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61431
61432  path="$POTENTIAL_FREETYPE_LIB_PATH"
61433  has_colon=`$ECHO $path | $GREP ^.:`
61434  new_path="$path"
61435  if test "x$has_colon" = x; then
61436    # Not in mixed or Windows style, start by that.
61437    new_path=`cmd //c echo $path`
61438  fi
61439
61440
61441  input_path="$new_path"
61442  # Check if we need to convert this using DOS-style short mode. If the path
61443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61444  # take no chances and rewrite it.
61445  # Note: m4 eats our [], so we need to use [ and ] instead.
61446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61447  if test "x$has_forbidden_chars" != x; then
61448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61450  fi
61451
61452
61453  windows_path="$new_path"
61454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61455    unix_path=`$CYGPATH -u "$windows_path"`
61456    new_path="$unix_path"
61457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61459    new_path="$unix_path"
61460  fi
61461
61462  if test "x$path" != "x$new_path"; then
61463    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61465$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61466  fi
61467
61468  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61469  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61470
61471    else
61472      # We're on a unix platform. Hooray! :)
61473      path="$POTENTIAL_FREETYPE_LIB_PATH"
61474      has_space=`$ECHO "$path" | $GREP " "`
61475      if test "x$has_space" != x; then
61476        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61477$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61478        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61479      fi
61480
61481      # Use eval to expand a potential ~
61482      eval path="$path"
61483      if test ! -f "$path" && test ! -d "$path"; then
61484        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61485      fi
61486
61487      if test -d "$path"; then
61488        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61489      else
61490        dir="`$DIRNAME "$path"`"
61491        base="`$BASENAME "$path"`"
61492        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61493      fi
61494    fi
61495  fi
61496
61497
61498    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61500$as_echo_n "checking for freetype includes... " >&6; }
61501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61502$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61503    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61505$as_echo_n "checking for freetype libraries... " >&6; }
61506    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61507$as_echo "$FREETYPE_LIB_PATH" >&6; }
61508  fi
61509
61510          fi
61511
61512          if test "x$FOUND_FREETYPE" != xyes; then
61513            FREETYPE_BASE_DIR="$SYSROOT/usr"
61514            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61515
61516  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61517  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61518  METHOD="well-known location"
61519
61520  # Let's start with an optimistic view of the world :-)
61521  FOUND_FREETYPE=yes
61522
61523  # First look for the canonical freetype main include file ft2build.h.
61524  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61525    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61526    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61527    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61528      # Fail.
61529      FOUND_FREETYPE=no
61530    fi
61531  fi
61532
61533  if test "x$FOUND_FREETYPE" = xyes; then
61534    # Include file found, let's continue the sanity check.
61535    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61536$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61537
61538    # Reset to default value
61539    FREETYPE_BASE_NAME=freetype
61540    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61541    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61542      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61543          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61544        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61545        # for the .6 version explicitly.
61546        FREETYPE_BASE_NAME=freetype.6
61547        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61548        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61549$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61550      else
61551        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61552$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61553        FOUND_FREETYPE=no
61554      fi
61555    else
61556      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61557        # On Windows, we will need both .lib and .dll file.
61558        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61559          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61560$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61561          FOUND_FREETYPE=no
61562        fi
61563      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61564          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61565        # Found lib in isa dir, use that instead.
61566        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61567        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61568$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61569      fi
61570    fi
61571  fi
61572
61573  if test "x$FOUND_FREETYPE" = xyes; then
61574
61575  # Only process if variable expands to non-empty
61576
61577  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61578    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61579
61580  # Input might be given as Windows format, start by converting to
61581  # unix format.
61582  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61583  new_path=`$CYGPATH -u "$path"`
61584
61585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61588  # "foo.exe" is OK but "foo" is an error.
61589  #
61590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61591  # It is also a way to make sure we got the proper file name for the real test later on.
61592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61593  if test "x$test_shortpath" = x; then
61594    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61595$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61596    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61597  fi
61598
61599  # Call helper function which possibly converts this using DOS-style short mode.
61600  # If so, the updated path is stored in $new_path.
61601
61602  input_path="$new_path"
61603  # Check if we need to convert this using DOS-style short mode. If the path
61604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61605  # take no chances and rewrite it.
61606  # Note: m4 eats our [], so we need to use [ and ] instead.
61607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61608  if test "x$has_forbidden_chars" != x; then
61609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61613      # Going to short mode and back again did indeed matter. Since short mode is
61614      # case insensitive, let's make it lowercase to improve readability.
61615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61616      # Now convert it back to Unix-style (cygpath)
61617      input_path=`$CYGPATH -u "$shortmode_path"`
61618      new_path="$input_path"
61619    fi
61620  fi
61621
61622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61623  if test "x$test_cygdrive_prefix" = x; then
61624    # As a simple fix, exclude /usr/bin since it's not a real path.
61625    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61627      # a path prefixed by /cygdrive for fixpath to work.
61628      new_path="$CYGWIN_ROOT_PATH$input_path"
61629    fi
61630  fi
61631
61632
61633  if test "x$path" != "x$new_path"; then
61634    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61636$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61637  fi
61638
61639    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61640
61641  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61642  has_colon=`$ECHO $path | $GREP ^.:`
61643  new_path="$path"
61644  if test "x$has_colon" = x; then
61645    # Not in mixed or Windows style, start by that.
61646    new_path=`cmd //c echo $path`
61647  fi
61648
61649
61650  input_path="$new_path"
61651  # Check if we need to convert this using DOS-style short mode. If the path
61652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61653  # take no chances and rewrite it.
61654  # Note: m4 eats our [], so we need to use [ and ] instead.
61655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61656  if test "x$has_forbidden_chars" != x; then
61657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61659  fi
61660
61661
61662  windows_path="$new_path"
61663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61664    unix_path=`$CYGPATH -u "$windows_path"`
61665    new_path="$unix_path"
61666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61668    new_path="$unix_path"
61669  fi
61670
61671  if test "x$path" != "x$new_path"; then
61672    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61674$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61675  fi
61676
61677  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61678  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61679
61680    else
61681      # We're on a unix platform. Hooray! :)
61682      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61683      has_space=`$ECHO "$path" | $GREP " "`
61684      if test "x$has_space" != x; then
61685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61686$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61687        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61688      fi
61689
61690      # Use eval to expand a potential ~
61691      eval path="$path"
61692      if test ! -f "$path" && test ! -d "$path"; then
61693        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61694      fi
61695
61696      if test -d "$path"; then
61697        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61698      else
61699        dir="`$DIRNAME "$path"`"
61700        base="`$BASENAME "$path"`"
61701        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61702      fi
61703    fi
61704  fi
61705
61706
61707  # Only process if variable expands to non-empty
61708
61709  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61710    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61711
61712  # Input might be given as Windows format, start by converting to
61713  # unix format.
61714  path="$POTENTIAL_FREETYPE_LIB_PATH"
61715  new_path=`$CYGPATH -u "$path"`
61716
61717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61720  # "foo.exe" is OK but "foo" is an error.
61721  #
61722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61723  # It is also a way to make sure we got the proper file name for the real test later on.
61724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61725  if test "x$test_shortpath" = x; then
61726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61727$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61728    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61729  fi
61730
61731  # Call helper function which possibly converts this using DOS-style short mode.
61732  # If so, the updated path is stored in $new_path.
61733
61734  input_path="$new_path"
61735  # Check if we need to convert this using DOS-style short mode. If the path
61736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61737  # take no chances and rewrite it.
61738  # Note: m4 eats our [], so we need to use [ and ] instead.
61739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61740  if test "x$has_forbidden_chars" != x; then
61741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61745      # Going to short mode and back again did indeed matter. Since short mode is
61746      # case insensitive, let's make it lowercase to improve readability.
61747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61748      # Now convert it back to Unix-style (cygpath)
61749      input_path=`$CYGPATH -u "$shortmode_path"`
61750      new_path="$input_path"
61751    fi
61752  fi
61753
61754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61755  if test "x$test_cygdrive_prefix" = x; then
61756    # As a simple fix, exclude /usr/bin since it's not a real path.
61757    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61759      # a path prefixed by /cygdrive for fixpath to work.
61760      new_path="$CYGWIN_ROOT_PATH$input_path"
61761    fi
61762  fi
61763
61764
61765  if test "x$path" != "x$new_path"; then
61766    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61768$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61769  fi
61770
61771    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61772
61773  path="$POTENTIAL_FREETYPE_LIB_PATH"
61774  has_colon=`$ECHO $path | $GREP ^.:`
61775  new_path="$path"
61776  if test "x$has_colon" = x; then
61777    # Not in mixed or Windows style, start by that.
61778    new_path=`cmd //c echo $path`
61779  fi
61780
61781
61782  input_path="$new_path"
61783  # Check if we need to convert this using DOS-style short mode. If the path
61784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61785  # take no chances and rewrite it.
61786  # Note: m4 eats our [], so we need to use [ and ] instead.
61787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61788  if test "x$has_forbidden_chars" != x; then
61789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61791  fi
61792
61793
61794  windows_path="$new_path"
61795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61796    unix_path=`$CYGPATH -u "$windows_path"`
61797    new_path="$unix_path"
61798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61800    new_path="$unix_path"
61801  fi
61802
61803  if test "x$path" != "x$new_path"; then
61804    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61806$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61807  fi
61808
61809  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61810  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61811
61812    else
61813      # We're on a unix platform. Hooray! :)
61814      path="$POTENTIAL_FREETYPE_LIB_PATH"
61815      has_space=`$ECHO "$path" | $GREP " "`
61816      if test "x$has_space" != x; then
61817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61818$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61819        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61820      fi
61821
61822      # Use eval to expand a potential ~
61823      eval path="$path"
61824      if test ! -f "$path" && test ! -d "$path"; then
61825        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61826      fi
61827
61828      if test -d "$path"; then
61829        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61830      else
61831        dir="`$DIRNAME "$path"`"
61832        base="`$BASENAME "$path"`"
61833        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61834      fi
61835    fi
61836  fi
61837
61838
61839    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61841$as_echo_n "checking for freetype includes... " >&6; }
61842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61843$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61844    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61845    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61846$as_echo_n "checking for freetype libraries... " >&6; }
61847    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61848$as_echo "$FREETYPE_LIB_PATH" >&6; }
61849  fi
61850
61851            else
61852
61853  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61854  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61855  METHOD="well-known location"
61856
61857  # Let's start with an optimistic view of the world :-)
61858  FOUND_FREETYPE=yes
61859
61860  # First look for the canonical freetype main include file ft2build.h.
61861  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61862    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61863    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61864    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61865      # Fail.
61866      FOUND_FREETYPE=no
61867    fi
61868  fi
61869
61870  if test "x$FOUND_FREETYPE" = xyes; then
61871    # Include file found, let's continue the sanity check.
61872    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61873$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61874
61875    # Reset to default value
61876    FREETYPE_BASE_NAME=freetype
61877    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61878    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61879      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61880          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61881        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61882        # for the .6 version explicitly.
61883        FREETYPE_BASE_NAME=freetype.6
61884        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61885        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61886$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61887      else
61888        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61889$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61890        FOUND_FREETYPE=no
61891      fi
61892    else
61893      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61894        # On Windows, we will need both .lib and .dll file.
61895        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61896          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61897$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61898          FOUND_FREETYPE=no
61899        fi
61900      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61901          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61902        # Found lib in isa dir, use that instead.
61903        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61904        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61905$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61906      fi
61907    fi
61908  fi
61909
61910  if test "x$FOUND_FREETYPE" = xyes; then
61911
61912  # Only process if variable expands to non-empty
61913
61914  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61916
61917  # Input might be given as Windows format, start by converting to
61918  # unix format.
61919  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61920  new_path=`$CYGPATH -u "$path"`
61921
61922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61925  # "foo.exe" is OK but "foo" is an error.
61926  #
61927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61928  # It is also a way to make sure we got the proper file name for the real test later on.
61929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61930  if test "x$test_shortpath" = x; then
61931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61932$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61933    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61934  fi
61935
61936  # Call helper function which possibly converts this using DOS-style short mode.
61937  # If so, the updated path is stored in $new_path.
61938
61939  input_path="$new_path"
61940  # Check if we need to convert this using DOS-style short mode. If the path
61941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61942  # take no chances and rewrite it.
61943  # Note: m4 eats our [], so we need to use [ and ] instead.
61944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61945  if test "x$has_forbidden_chars" != x; then
61946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61950      # Going to short mode and back again did indeed matter. Since short mode is
61951      # case insensitive, let's make it lowercase to improve readability.
61952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61953      # Now convert it back to Unix-style (cygpath)
61954      input_path=`$CYGPATH -u "$shortmode_path"`
61955      new_path="$input_path"
61956    fi
61957  fi
61958
61959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61960  if test "x$test_cygdrive_prefix" = x; then
61961    # As a simple fix, exclude /usr/bin since it's not a real path.
61962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61964      # a path prefixed by /cygdrive for fixpath to work.
61965      new_path="$CYGWIN_ROOT_PATH$input_path"
61966    fi
61967  fi
61968
61969
61970  if test "x$path" != "x$new_path"; then
61971    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61973$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61974  fi
61975
61976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61977
61978  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61979  has_colon=`$ECHO $path | $GREP ^.:`
61980  new_path="$path"
61981  if test "x$has_colon" = x; then
61982    # Not in mixed or Windows style, start by that.
61983    new_path=`cmd //c echo $path`
61984  fi
61985
61986
61987  input_path="$new_path"
61988  # Check if we need to convert this using DOS-style short mode. If the path
61989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61990  # take no chances and rewrite it.
61991  # Note: m4 eats our [], so we need to use [ and ] instead.
61992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61993  if test "x$has_forbidden_chars" != x; then
61994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61996  fi
61997
61998
61999  windows_path="$new_path"
62000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62001    unix_path=`$CYGPATH -u "$windows_path"`
62002    new_path="$unix_path"
62003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62005    new_path="$unix_path"
62006  fi
62007
62008  if test "x$path" != "x$new_path"; then
62009    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62011$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62012  fi
62013
62014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62016
62017    else
62018      # We're on a unix platform. Hooray! :)
62019      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62020      has_space=`$ECHO "$path" | $GREP " "`
62021      if test "x$has_space" != x; then
62022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62023$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62025      fi
62026
62027      # Use eval to expand a potential ~
62028      eval path="$path"
62029      if test ! -f "$path" && test ! -d "$path"; then
62030        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62031      fi
62032
62033      if test -d "$path"; then
62034        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62035      else
62036        dir="`$DIRNAME "$path"`"
62037        base="`$BASENAME "$path"`"
62038        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62039      fi
62040    fi
62041  fi
62042
62043
62044  # Only process if variable expands to non-empty
62045
62046  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62047    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62048
62049  # Input might be given as Windows format, start by converting to
62050  # unix format.
62051  path="$POTENTIAL_FREETYPE_LIB_PATH"
62052  new_path=`$CYGPATH -u "$path"`
62053
62054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62057  # "foo.exe" is OK but "foo" is an error.
62058  #
62059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62060  # It is also a way to make sure we got the proper file name for the real test later on.
62061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62062  if test "x$test_shortpath" = x; then
62063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62064$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62065    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62066  fi
62067
62068  # Call helper function which possibly converts this using DOS-style short mode.
62069  # If so, the updated path is stored in $new_path.
62070
62071  input_path="$new_path"
62072  # Check if we need to convert this using DOS-style short mode. If the path
62073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62074  # take no chances and rewrite it.
62075  # Note: m4 eats our [], so we need to use [ and ] instead.
62076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62077  if test "x$has_forbidden_chars" != x; then
62078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62082      # Going to short mode and back again did indeed matter. Since short mode is
62083      # case insensitive, let's make it lowercase to improve readability.
62084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62085      # Now convert it back to Unix-style (cygpath)
62086      input_path=`$CYGPATH -u "$shortmode_path"`
62087      new_path="$input_path"
62088    fi
62089  fi
62090
62091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62092  if test "x$test_cygdrive_prefix" = x; then
62093    # As a simple fix, exclude /usr/bin since it's not a real path.
62094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62096      # a path prefixed by /cygdrive for fixpath to work.
62097      new_path="$CYGWIN_ROOT_PATH$input_path"
62098    fi
62099  fi
62100
62101
62102  if test "x$path" != "x$new_path"; then
62103    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62105$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62106  fi
62107
62108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62109
62110  path="$POTENTIAL_FREETYPE_LIB_PATH"
62111  has_colon=`$ECHO $path | $GREP ^.:`
62112  new_path="$path"
62113  if test "x$has_colon" = x; then
62114    # Not in mixed or Windows style, start by that.
62115    new_path=`cmd //c echo $path`
62116  fi
62117
62118
62119  input_path="$new_path"
62120  # Check if we need to convert this using DOS-style short mode. If the path
62121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62122  # take no chances and rewrite it.
62123  # Note: m4 eats our [], so we need to use [ and ] instead.
62124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62125  if test "x$has_forbidden_chars" != x; then
62126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62128  fi
62129
62130
62131  windows_path="$new_path"
62132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62133    unix_path=`$CYGPATH -u "$windows_path"`
62134    new_path="$unix_path"
62135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62137    new_path="$unix_path"
62138  fi
62139
62140  if test "x$path" != "x$new_path"; then
62141    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62143$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62144  fi
62145
62146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62148
62149    else
62150      # We're on a unix platform. Hooray! :)
62151      path="$POTENTIAL_FREETYPE_LIB_PATH"
62152      has_space=`$ECHO "$path" | $GREP " "`
62153      if test "x$has_space" != x; then
62154        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62155$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62156        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62157      fi
62158
62159      # Use eval to expand a potential ~
62160      eval path="$path"
62161      if test ! -f "$path" && test ! -d "$path"; then
62162        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62163      fi
62164
62165      if test -d "$path"; then
62166        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62167      else
62168        dir="`$DIRNAME "$path"`"
62169        base="`$BASENAME "$path"`"
62170        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62171      fi
62172    fi
62173  fi
62174
62175
62176    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62177    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62178$as_echo_n "checking for freetype includes... " >&6; }
62179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62180$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62181    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62182    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62183$as_echo_n "checking for freetype libraries... " >&6; }
62184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62185$as_echo "$FREETYPE_LIB_PATH" >&6; }
62186  fi
62187
62188              if test "x$FOUND_FREETYPE" != xyes; then
62189
62190  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62191  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62192  METHOD="well-known location"
62193
62194  # Let's start with an optimistic view of the world :-)
62195  FOUND_FREETYPE=yes
62196
62197  # First look for the canonical freetype main include file ft2build.h.
62198  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62199    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62200    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62201    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62202      # Fail.
62203      FOUND_FREETYPE=no
62204    fi
62205  fi
62206
62207  if test "x$FOUND_FREETYPE" = xyes; then
62208    # Include file found, let's continue the sanity check.
62209    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62210$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62211
62212    # Reset to default value
62213    FREETYPE_BASE_NAME=freetype
62214    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62215    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62216      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62217          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62218        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62219        # for the .6 version explicitly.
62220        FREETYPE_BASE_NAME=freetype.6
62221        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62222        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62223$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62224      else
62225        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62226$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62227        FOUND_FREETYPE=no
62228      fi
62229    else
62230      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62231        # On Windows, we will need both .lib and .dll file.
62232        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62233          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62234$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62235          FOUND_FREETYPE=no
62236        fi
62237      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62238          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62239        # Found lib in isa dir, use that instead.
62240        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62241        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62242$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62243      fi
62244    fi
62245  fi
62246
62247  if test "x$FOUND_FREETYPE" = xyes; then
62248
62249  # Only process if variable expands to non-empty
62250
62251  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62253
62254  # Input might be given as Windows format, start by converting to
62255  # unix format.
62256  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62257  new_path=`$CYGPATH -u "$path"`
62258
62259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62262  # "foo.exe" is OK but "foo" is an error.
62263  #
62264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62265  # It is also a way to make sure we got the proper file name for the real test later on.
62266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62267  if test "x$test_shortpath" = x; then
62268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62269$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62270    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62271  fi
62272
62273  # Call helper function which possibly converts this using DOS-style short mode.
62274  # If so, the updated path is stored in $new_path.
62275
62276  input_path="$new_path"
62277  # Check if we need to convert this using DOS-style short mode. If the path
62278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62279  # take no chances and rewrite it.
62280  # Note: m4 eats our [], so we need to use [ and ] instead.
62281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62282  if test "x$has_forbidden_chars" != x; then
62283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62287      # Going to short mode and back again did indeed matter. Since short mode is
62288      # case insensitive, let's make it lowercase to improve readability.
62289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62290      # Now convert it back to Unix-style (cygpath)
62291      input_path=`$CYGPATH -u "$shortmode_path"`
62292      new_path="$input_path"
62293    fi
62294  fi
62295
62296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62297  if test "x$test_cygdrive_prefix" = x; then
62298    # As a simple fix, exclude /usr/bin since it's not a real path.
62299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62301      # a path prefixed by /cygdrive for fixpath to work.
62302      new_path="$CYGWIN_ROOT_PATH$input_path"
62303    fi
62304  fi
62305
62306
62307  if test "x$path" != "x$new_path"; then
62308    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62310$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62311  fi
62312
62313    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62314
62315  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62316  has_colon=`$ECHO $path | $GREP ^.:`
62317  new_path="$path"
62318  if test "x$has_colon" = x; then
62319    # Not in mixed or Windows style, start by that.
62320    new_path=`cmd //c echo $path`
62321  fi
62322
62323
62324  input_path="$new_path"
62325  # Check if we need to convert this using DOS-style short mode. If the path
62326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62327  # take no chances and rewrite it.
62328  # Note: m4 eats our [], so we need to use [ and ] instead.
62329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62330  if test "x$has_forbidden_chars" != x; then
62331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62333  fi
62334
62335
62336  windows_path="$new_path"
62337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62338    unix_path=`$CYGPATH -u "$windows_path"`
62339    new_path="$unix_path"
62340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62342    new_path="$unix_path"
62343  fi
62344
62345  if test "x$path" != "x$new_path"; then
62346    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62348$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62349  fi
62350
62351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62353
62354    else
62355      # We're on a unix platform. Hooray! :)
62356      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62357      has_space=`$ECHO "$path" | $GREP " "`
62358      if test "x$has_space" != x; then
62359        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62360$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62361        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62362      fi
62363
62364      # Use eval to expand a potential ~
62365      eval path="$path"
62366      if test ! -f "$path" && test ! -d "$path"; then
62367        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62368      fi
62369
62370      if test -d "$path"; then
62371        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62372      else
62373        dir="`$DIRNAME "$path"`"
62374        base="`$BASENAME "$path"`"
62375        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62376      fi
62377    fi
62378  fi
62379
62380
62381  # Only process if variable expands to non-empty
62382
62383  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62384    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62385
62386  # Input might be given as Windows format, start by converting to
62387  # unix format.
62388  path="$POTENTIAL_FREETYPE_LIB_PATH"
62389  new_path=`$CYGPATH -u "$path"`
62390
62391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62394  # "foo.exe" is OK but "foo" is an error.
62395  #
62396  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62397  # It is also a way to make sure we got the proper file name for the real test later on.
62398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62399  if test "x$test_shortpath" = x; then
62400    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62401$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62402    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62403  fi
62404
62405  # Call helper function which possibly converts this using DOS-style short mode.
62406  # If so, the updated path is stored in $new_path.
62407
62408  input_path="$new_path"
62409  # Check if we need to convert this using DOS-style short mode. If the path
62410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62411  # take no chances and rewrite it.
62412  # Note: m4 eats our [], so we need to use [ and ] instead.
62413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62414  if test "x$has_forbidden_chars" != x; then
62415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62419      # Going to short mode and back again did indeed matter. Since short mode is
62420      # case insensitive, let's make it lowercase to improve readability.
62421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62422      # Now convert it back to Unix-style (cygpath)
62423      input_path=`$CYGPATH -u "$shortmode_path"`
62424      new_path="$input_path"
62425    fi
62426  fi
62427
62428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62429  if test "x$test_cygdrive_prefix" = x; then
62430    # As a simple fix, exclude /usr/bin since it's not a real path.
62431    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62433      # a path prefixed by /cygdrive for fixpath to work.
62434      new_path="$CYGWIN_ROOT_PATH$input_path"
62435    fi
62436  fi
62437
62438
62439  if test "x$path" != "x$new_path"; then
62440    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62442$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62443  fi
62444
62445    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62446
62447  path="$POTENTIAL_FREETYPE_LIB_PATH"
62448  has_colon=`$ECHO $path | $GREP ^.:`
62449  new_path="$path"
62450  if test "x$has_colon" = x; then
62451    # Not in mixed or Windows style, start by that.
62452    new_path=`cmd //c echo $path`
62453  fi
62454
62455
62456  input_path="$new_path"
62457  # Check if we need to convert this using DOS-style short mode. If the path
62458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62459  # take no chances and rewrite it.
62460  # Note: m4 eats our [], so we need to use [ and ] instead.
62461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62462  if test "x$has_forbidden_chars" != x; then
62463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62465  fi
62466
62467
62468  windows_path="$new_path"
62469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62470    unix_path=`$CYGPATH -u "$windows_path"`
62471    new_path="$unix_path"
62472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62474    new_path="$unix_path"
62475  fi
62476
62477  if test "x$path" != "x$new_path"; then
62478    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62479    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62480$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62481  fi
62482
62483  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62484  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62485
62486    else
62487      # We're on a unix platform. Hooray! :)
62488      path="$POTENTIAL_FREETYPE_LIB_PATH"
62489      has_space=`$ECHO "$path" | $GREP " "`
62490      if test "x$has_space" != x; then
62491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62492$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62493        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62494      fi
62495
62496      # Use eval to expand a potential ~
62497      eval path="$path"
62498      if test ! -f "$path" && test ! -d "$path"; then
62499        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62500      fi
62501
62502      if test -d "$path"; then
62503        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62504      else
62505        dir="`$DIRNAME "$path"`"
62506        base="`$BASENAME "$path"`"
62507        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62508      fi
62509    fi
62510  fi
62511
62512
62513    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62515$as_echo_n "checking for freetype includes... " >&6; }
62516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62517$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62518    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62520$as_echo_n "checking for freetype libraries... " >&6; }
62521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62522$as_echo "$FREETYPE_LIB_PATH" >&6; }
62523  fi
62524
62525              fi
62526            fi
62527          fi
62528        fi
62529      fi # end check in well-known locations
62530
62531      if test "x$FOUND_FREETYPE" != xyes; then
62532
62533  # Print a helpful message on how to acquire the necessary build dependency.
62534  # freetype is the help tag: freetype, cups, alsa etc
62535  MISSING_DEPENDENCY=freetype
62536
62537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62538    cygwin_help $MISSING_DEPENDENCY
62539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62540    msys_help $MISSING_DEPENDENCY
62541  else
62542    PKGHANDLER_COMMAND=
62543
62544    case $PKGHANDLER in
62545      apt-get)
62546        apt_help     $MISSING_DEPENDENCY ;;
62547      yum)
62548        yum_help     $MISSING_DEPENDENCY ;;
62549      port)
62550        port_help    $MISSING_DEPENDENCY ;;
62551      pkgutil)
62552        pkgutil_help $MISSING_DEPENDENCY ;;
62553      pkgadd)
62554        pkgadd_help  $MISSING_DEPENDENCY ;;
62555    esac
62556
62557    if test "x$PKGHANDLER_COMMAND" != x; then
62558      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62559    fi
62560  fi
62561
62562        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62563      fi
62564    fi # end user specified settings
62565
62566    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62567    if test "x$FREETYPE_CFLAGS" = x; then
62568
62569  # Only process if variable expands to non-empty
62570
62571  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62573
62574  # Input might be given as Windows format, start by converting to
62575  # unix format.
62576  path="$FREETYPE_INCLUDE_PATH"
62577  new_path=`$CYGPATH -u "$path"`
62578
62579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62582  # "foo.exe" is OK but "foo" is an error.
62583  #
62584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62585  # It is also a way to make sure we got the proper file name for the real test later on.
62586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62587  if test "x$test_shortpath" = x; then
62588    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62589$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62590    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62591  fi
62592
62593  # Call helper function which possibly converts this using DOS-style short mode.
62594  # If so, the updated path is stored in $new_path.
62595
62596  input_path="$new_path"
62597  # Check if we need to convert this using DOS-style short mode. If the path
62598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62599  # take no chances and rewrite it.
62600  # Note: m4 eats our [], so we need to use [ and ] instead.
62601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62602  if test "x$has_forbidden_chars" != x; then
62603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62607      # Going to short mode and back again did indeed matter. Since short mode is
62608      # case insensitive, let's make it lowercase to improve readability.
62609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62610      # Now convert it back to Unix-style (cygpath)
62611      input_path=`$CYGPATH -u "$shortmode_path"`
62612      new_path="$input_path"
62613    fi
62614  fi
62615
62616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62617  if test "x$test_cygdrive_prefix" = x; then
62618    # As a simple fix, exclude /usr/bin since it's not a real path.
62619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62621      # a path prefixed by /cygdrive for fixpath to work.
62622      new_path="$CYGWIN_ROOT_PATH$input_path"
62623    fi
62624  fi
62625
62626
62627  if test "x$path" != "x$new_path"; then
62628    FREETYPE_INCLUDE_PATH="$new_path"
62629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62630$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62631  fi
62632
62633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62634
62635  path="$FREETYPE_INCLUDE_PATH"
62636  has_colon=`$ECHO $path | $GREP ^.:`
62637  new_path="$path"
62638  if test "x$has_colon" = x; then
62639    # Not in mixed or Windows style, start by that.
62640    new_path=`cmd //c echo $path`
62641  fi
62642
62643
62644  input_path="$new_path"
62645  # Check if we need to convert this using DOS-style short mode. If the path
62646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62647  # take no chances and rewrite it.
62648  # Note: m4 eats our [], so we need to use [ and ] instead.
62649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62650  if test "x$has_forbidden_chars" != x; then
62651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62653  fi
62654
62655
62656  windows_path="$new_path"
62657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62658    unix_path=`$CYGPATH -u "$windows_path"`
62659    new_path="$unix_path"
62660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62662    new_path="$unix_path"
62663  fi
62664
62665  if test "x$path" != "x$new_path"; then
62666    FREETYPE_INCLUDE_PATH="$new_path"
62667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62668$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62669  fi
62670
62671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62673
62674    else
62675      # We're on a unix platform. Hooray! :)
62676      path="$FREETYPE_INCLUDE_PATH"
62677      has_space=`$ECHO "$path" | $GREP " "`
62678      if test "x$has_space" != x; then
62679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62680$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62681        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62682      fi
62683
62684      # Use eval to expand a potential ~
62685      eval path="$path"
62686      if test ! -f "$path" && test ! -d "$path"; then
62687        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62688      fi
62689
62690      if test -d "$path"; then
62691        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62692      else
62693        dir="`$DIRNAME "$path"`"
62694        base="`$BASENAME "$path"`"
62695        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62696      fi
62697    fi
62698  fi
62699
62700      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62701        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62702      else
62703        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62704      fi
62705    fi
62706
62707    if test "x$FREETYPE_LIBS" = x; then
62708
62709  # Only process if variable expands to non-empty
62710
62711  if test "x$FREETYPE_LIB_PATH" != x; then
62712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62713
62714  # Input might be given as Windows format, start by converting to
62715  # unix format.
62716  path="$FREETYPE_LIB_PATH"
62717  new_path=`$CYGPATH -u "$path"`
62718
62719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62722  # "foo.exe" is OK but "foo" is an error.
62723  #
62724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62725  # It is also a way to make sure we got the proper file name for the real test later on.
62726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62727  if test "x$test_shortpath" = x; then
62728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62729$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62730    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62731  fi
62732
62733  # Call helper function which possibly converts this using DOS-style short mode.
62734  # If so, the updated path is stored in $new_path.
62735
62736  input_path="$new_path"
62737  # Check if we need to convert this using DOS-style short mode. If the path
62738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62739  # take no chances and rewrite it.
62740  # Note: m4 eats our [], so we need to use [ and ] instead.
62741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62742  if test "x$has_forbidden_chars" != x; then
62743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62747      # Going to short mode and back again did indeed matter. Since short mode is
62748      # case insensitive, let's make it lowercase to improve readability.
62749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62750      # Now convert it back to Unix-style (cygpath)
62751      input_path=`$CYGPATH -u "$shortmode_path"`
62752      new_path="$input_path"
62753    fi
62754  fi
62755
62756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62757  if test "x$test_cygdrive_prefix" = x; then
62758    # As a simple fix, exclude /usr/bin since it's not a real path.
62759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62761      # a path prefixed by /cygdrive for fixpath to work.
62762      new_path="$CYGWIN_ROOT_PATH$input_path"
62763    fi
62764  fi
62765
62766
62767  if test "x$path" != "x$new_path"; then
62768    FREETYPE_LIB_PATH="$new_path"
62769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62770$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62771  fi
62772
62773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62774
62775  path="$FREETYPE_LIB_PATH"
62776  has_colon=`$ECHO $path | $GREP ^.:`
62777  new_path="$path"
62778  if test "x$has_colon" = x; then
62779    # Not in mixed or Windows style, start by that.
62780    new_path=`cmd //c echo $path`
62781  fi
62782
62783
62784  input_path="$new_path"
62785  # Check if we need to convert this using DOS-style short mode. If the path
62786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62787  # take no chances and rewrite it.
62788  # Note: m4 eats our [], so we need to use [ and ] instead.
62789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62790  if test "x$has_forbidden_chars" != x; then
62791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62793  fi
62794
62795
62796  windows_path="$new_path"
62797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62798    unix_path=`$CYGPATH -u "$windows_path"`
62799    new_path="$unix_path"
62800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62802    new_path="$unix_path"
62803  fi
62804
62805  if test "x$path" != "x$new_path"; then
62806    FREETYPE_LIB_PATH="$new_path"
62807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62808$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62809  fi
62810
62811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62813
62814    else
62815      # We're on a unix platform. Hooray! :)
62816      path="$FREETYPE_LIB_PATH"
62817      has_space=`$ECHO "$path" | $GREP " "`
62818      if test "x$has_space" != x; then
62819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62820$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62821        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62822      fi
62823
62824      # Use eval to expand a potential ~
62825      eval path="$path"
62826      if test ! -f "$path" && test ! -d "$path"; then
62827        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62828      fi
62829
62830      if test -d "$path"; then
62831        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62832      else
62833        dir="`$DIRNAME "$path"`"
62834        base="`$BASENAME "$path"`"
62835        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62836      fi
62837    fi
62838  fi
62839
62840      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62841        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62842      else
62843        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62844      fi
62845    fi
62846
62847    # Try to compile it
62848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62849$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62850    ac_ext=cpp
62851ac_cpp='$CXXCPP $CPPFLAGS'
62852ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62853ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62854ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62855
62856    PREV_CXXCFLAGS="$CXXFLAGS"
62857    PREV_LIBS="$LIBS"
62858    PREV_CXX="$CXX"
62859    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62860    LIBS="$LIBS $FREETYPE_LIBS"
62861    CXX="$FIXPATH $CXX"
62862    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62863/* end confdefs.h.  */
62864
62865          #include<ft2build.h>
62866          #include FT_FREETYPE_H
62867          int main () {
62868            FT_Init_FreeType(NULL);
62869            return 0;
62870          }
62871
62872_ACEOF
62873if ac_fn_cxx_try_link "$LINENO"; then :
62874
62875          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62876$as_echo "yes" >&6; }
62877
62878else
62879
62880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62881$as_echo "no" >&6; }
62882          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62883$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62884          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62885$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62886
62887
62888  # Print a helpful message on how to acquire the necessary build dependency.
62889  # freetype is the help tag: freetype, cups, alsa etc
62890  MISSING_DEPENDENCY=freetype
62891
62892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62893    cygwin_help $MISSING_DEPENDENCY
62894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62895    msys_help $MISSING_DEPENDENCY
62896  else
62897    PKGHANDLER_COMMAND=
62898
62899    case $PKGHANDLER in
62900      apt-get)
62901        apt_help     $MISSING_DEPENDENCY ;;
62902      yum)
62903        yum_help     $MISSING_DEPENDENCY ;;
62904      port)
62905        port_help    $MISSING_DEPENDENCY ;;
62906      pkgutil)
62907        pkgutil_help $MISSING_DEPENDENCY ;;
62908      pkgadd)
62909        pkgadd_help  $MISSING_DEPENDENCY ;;
62910    esac
62911
62912    if test "x$PKGHANDLER_COMMAND" != x; then
62913      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62914    fi
62915  fi
62916
62917
62918          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62919
62920
62921fi
62922rm -f core conftest.err conftest.$ac_objext \
62923    conftest$ac_exeext conftest.$ac_ext
62924    CXXCFLAGS="$PREV_CXXFLAGS"
62925    LIBS="$PREV_LIBS"
62926    CXX="$PREV_CXX"
62927    ac_ext=cpp
62928ac_cpp='$CXXCPP $CPPFLAGS'
62929ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62930ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62931ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62932
62933
62934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62935$as_echo_n "checking if we should bundle freetype... " >&6; }
62936    if test "x$BUNDLE_FREETYPE" = xyes; then
62937      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62938    fi
62939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62940$as_echo "$BUNDLE_FREETYPE" >&6; }
62941
62942  fi # end freetype needed
62943
62944
62945
62946
62947
62948
62949
62950# Check whether --with-alsa was given.
62951if test "${with_alsa+set}" = set; then :
62952  withval=$with_alsa;
62953fi
62954
62955
62956# Check whether --with-alsa-include was given.
62957if test "${with_alsa_include+set}" = set; then :
62958  withval=$with_alsa_include;
62959fi
62960
62961
62962# Check whether --with-alsa-lib was given.
62963if test "${with_alsa_lib+set}" = set; then :
62964  withval=$with_alsa_lib;
62965fi
62966
62967
62968  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62969    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62970        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62971        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62972      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62973$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62974    fi
62975    ALSA_CFLAGS=
62976    ALSA_LIBS=
62977  else
62978    ALSA_FOUND=no
62979
62980    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62981      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62982    fi
62983
62984    if test "x${with_alsa}" != x; then
62985      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62986      ALSA_CFLAGS="-I${with_alsa}/include"
62987      ALSA_FOUND=yes
62988    fi
62989    if test "x${with_alsa_include}" != x; then
62990      ALSA_CFLAGS="-I${with_alsa_include}"
62991      ALSA_FOUND=yes
62992    fi
62993    if test "x${with_alsa_lib}" != x; then
62994      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62995      ALSA_FOUND=yes
62996    fi
62997    # Do not try pkg-config if we have a sysroot set.
62998    if test "x$SYSROOT" = x; then
62999      if test "x$ALSA_FOUND" = xno; then
63000
63001pkg_failed=no
63002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63003$as_echo_n "checking for ALSA... " >&6; }
63004
63005if test -n "$ALSA_CFLAGS"; then
63006    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63007 elif test -n "$PKG_CONFIG"; then
63008    if test -n "$PKG_CONFIG" && \
63009    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63010  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63011  ac_status=$?
63012  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63013  test $ac_status = 0; }; then
63014  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63015else
63016  pkg_failed=yes
63017fi
63018 else
63019    pkg_failed=untried
63020fi
63021if test -n "$ALSA_LIBS"; then
63022    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63023 elif test -n "$PKG_CONFIG"; then
63024    if test -n "$PKG_CONFIG" && \
63025    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63026  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63027  ac_status=$?
63028  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63029  test $ac_status = 0; }; then
63030  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63031else
63032  pkg_failed=yes
63033fi
63034 else
63035    pkg_failed=untried
63036fi
63037
63038
63039
63040if test $pkg_failed = yes; then
63041
63042if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63043        _pkg_short_errors_supported=yes
63044else
63045        _pkg_short_errors_supported=no
63046fi
63047        if test $_pkg_short_errors_supported = yes; then
63048	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63049        else
63050	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63051        fi
63052	# Put the nasty error message in config.log where it belongs
63053	echo "$ALSA_PKG_ERRORS" >&5
63054
63055	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63056$as_echo "no" >&6; }
63057                ALSA_FOUND=no
63058elif test $pkg_failed = untried; then
63059	ALSA_FOUND=no
63060else
63061	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63062	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63063        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63064$as_echo "yes" >&6; }
63065	ALSA_FOUND=yes
63066fi
63067      fi
63068    fi
63069    if test "x$ALSA_FOUND" = xno; then
63070      for ac_header in alsa/asoundlib.h
63071do :
63072  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63073if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63074  cat >>confdefs.h <<_ACEOF
63075#define HAVE_ALSA_ASOUNDLIB_H 1
63076_ACEOF
63077
63078            ALSA_FOUND=yes
63079            ALSA_CFLAGS=-Iignoreme
63080            ALSA_LIBS=-lasound
63081            DEFAULT_ALSA=yes
63082
63083else
63084  ALSA_FOUND=no
63085
63086fi
63087
63088done
63089
63090    fi
63091    if test "x$ALSA_FOUND" = xno; then
63092
63093  # Print a helpful message on how to acquire the necessary build dependency.
63094  # alsa is the help tag: freetype, cups, alsa etc
63095  MISSING_DEPENDENCY=alsa
63096
63097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63098    cygwin_help $MISSING_DEPENDENCY
63099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63100    msys_help $MISSING_DEPENDENCY
63101  else
63102    PKGHANDLER_COMMAND=
63103
63104    case $PKGHANDLER in
63105      apt-get)
63106        apt_help     $MISSING_DEPENDENCY ;;
63107      yum)
63108        yum_help     $MISSING_DEPENDENCY ;;
63109      port)
63110        port_help    $MISSING_DEPENDENCY ;;
63111      pkgutil)
63112        pkgutil_help $MISSING_DEPENDENCY ;;
63113      pkgadd)
63114        pkgadd_help  $MISSING_DEPENDENCY ;;
63115    esac
63116
63117    if test "x$PKGHANDLER_COMMAND" != x; then
63118      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63119    fi
63120  fi
63121
63122      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63123    fi
63124  fi
63125
63126
63127
63128
63129
63130
63131# Check whether --with-libffi was given.
63132if test "${with_libffi+set}" = set; then :
63133  withval=$with_libffi;
63134fi
63135
63136
63137# Check whether --with-libffi-include was given.
63138if test "${with_libffi_include+set}" = set; then :
63139  withval=$with_libffi_include;
63140fi
63141
63142
63143# Check whether --with-libffi-lib was given.
63144if test "${with_libffi_lib+set}" = set; then :
63145  withval=$with_libffi_lib;
63146fi
63147
63148
63149  if test "x$NEEDS_LIB_FFI" = xfalse; then
63150    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63151        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63152        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63153      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63154$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63155    fi
63156    LIBFFI_CFLAGS=
63157    LIBFFI_LIBS=
63158  else
63159    LIBFFI_FOUND=no
63160
63161    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63162      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63163    fi
63164
63165    if test "x${with_libffi}" != x; then
63166      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63167      LIBFFI_CFLAGS="-I${with_libffi}/include"
63168      LIBFFI_FOUND=yes
63169    fi
63170    if test "x${with_libffi_include}" != x; then
63171      LIBFFI_CFLAGS="-I${with_libffi_include}"
63172      LIBFFI_FOUND=yes
63173    fi
63174    if test "x${with_libffi_lib}" != x; then
63175      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63176      LIBFFI_FOUND=yes
63177    fi
63178    # Do not try pkg-config if we have a sysroot set.
63179    if test "x$SYSROOT" = x; then
63180      if test "x$LIBFFI_FOUND" = xno; then
63181        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63182
63183pkg_failed=no
63184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63185$as_echo_n "checking for LIBFFI... " >&6; }
63186
63187if test -n "$LIBFFI_CFLAGS"; then
63188    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63189 elif test -n "$PKG_CONFIG"; then
63190    if test -n "$PKG_CONFIG" && \
63191    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63192  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63193  ac_status=$?
63194  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63195  test $ac_status = 0; }; then
63196  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63197else
63198  pkg_failed=yes
63199fi
63200 else
63201    pkg_failed=untried
63202fi
63203if test -n "$LIBFFI_LIBS"; then
63204    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63205 elif test -n "$PKG_CONFIG"; then
63206    if test -n "$PKG_CONFIG" && \
63207    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63208  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63209  ac_status=$?
63210  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63211  test $ac_status = 0; }; then
63212  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63213else
63214  pkg_failed=yes
63215fi
63216 else
63217    pkg_failed=untried
63218fi
63219
63220
63221
63222if test $pkg_failed = yes; then
63223
63224if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63225        _pkg_short_errors_supported=yes
63226else
63227        _pkg_short_errors_supported=no
63228fi
63229        if test $_pkg_short_errors_supported = yes; then
63230	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63231        else
63232	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63233        fi
63234	# Put the nasty error message in config.log where it belongs
63235	echo "$LIBFFI_PKG_ERRORS" >&5
63236
63237	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63238$as_echo "no" >&6; }
63239                LIBFFI_FOUND=no
63240elif test $pkg_failed = untried; then
63241	LIBFFI_FOUND=no
63242else
63243	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63244	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63245        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63246$as_echo "yes" >&6; }
63247	LIBFFI_FOUND=yes
63248fi
63249      fi
63250    fi
63251    if test "x$LIBFFI_FOUND" = xno; then
63252      for ac_header in ffi.h
63253do :
63254  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63255if test "x$ac_cv_header_ffi_h" = xyes; then :
63256  cat >>confdefs.h <<_ACEOF
63257#define HAVE_FFI_H 1
63258_ACEOF
63259
63260            LIBFFI_FOUND=yes
63261            LIBFFI_CFLAGS=
63262            LIBFFI_LIBS=-lffi
63263
63264else
63265  LIBFFI_FOUND=no
63266
63267fi
63268
63269done
63270
63271    fi
63272    if test "x$LIBFFI_FOUND" = xno; then
63273
63274  # Print a helpful message on how to acquire the necessary build dependency.
63275  # ffi is the help tag: freetype, cups, alsa etc
63276  MISSING_DEPENDENCY=ffi
63277
63278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63279    cygwin_help $MISSING_DEPENDENCY
63280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63281    msys_help $MISSING_DEPENDENCY
63282  else
63283    PKGHANDLER_COMMAND=
63284
63285    case $PKGHANDLER in
63286      apt-get)
63287        apt_help     $MISSING_DEPENDENCY ;;
63288      yum)
63289        yum_help     $MISSING_DEPENDENCY ;;
63290      port)
63291        port_help    $MISSING_DEPENDENCY ;;
63292      pkgutil)
63293        pkgutil_help $MISSING_DEPENDENCY ;;
63294      pkgadd)
63295        pkgadd_help  $MISSING_DEPENDENCY ;;
63296    esac
63297
63298    if test "x$PKGHANDLER_COMMAND" != x; then
63299      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63300    fi
63301  fi
63302
63303      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63304    fi
63305
63306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63307$as_echo_n "checking if libffi works... " >&6; }
63308    ac_ext=c
63309ac_cpp='$CPP $CPPFLAGS'
63310ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63311ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63312ac_compiler_gnu=$ac_cv_c_compiler_gnu
63313
63314    OLD_CFLAGS="$CFLAGS"
63315    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63316    OLD_LIBS="$LIBS"
63317    LIBS="$LIBS $LIBFFI_LIBS"
63318    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63319/* end confdefs.h.  */
63320#include <ffi.h>
63321int
63322main ()
63323{
63324
63325          ffi_call(NULL, NULL, NULL, NULL);
63326          return 0;
63327
63328  ;
63329  return 0;
63330}
63331_ACEOF
63332if ac_fn_c_try_link "$LINENO"; then :
63333  LIBFFI_WORKS=yes
63334else
63335  LIBFFI_WORKS=no
63336
63337fi
63338rm -f core conftest.err conftest.$ac_objext \
63339    conftest$ac_exeext conftest.$ac_ext
63340    CFLAGS="$OLD_CFLAGS"
63341    LIBS="$OLD_LIBS"
63342    ac_ext=cpp
63343ac_cpp='$CXXCPP $CPPFLAGS'
63344ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63345ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63346ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63347
63348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63349$as_echo "$LIBFFI_WORKS" >&6; }
63350
63351    if test "x$LIBFFI_WORKS" = xno; then
63352
63353  # Print a helpful message on how to acquire the necessary build dependency.
63354  # ffi is the help tag: freetype, cups, alsa etc
63355  MISSING_DEPENDENCY=ffi
63356
63357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63358    cygwin_help $MISSING_DEPENDENCY
63359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63360    msys_help $MISSING_DEPENDENCY
63361  else
63362    PKGHANDLER_COMMAND=
63363
63364    case $PKGHANDLER in
63365      apt-get)
63366        apt_help     $MISSING_DEPENDENCY ;;
63367      yum)
63368        yum_help     $MISSING_DEPENDENCY ;;
63369      port)
63370        port_help    $MISSING_DEPENDENCY ;;
63371      pkgutil)
63372        pkgutil_help $MISSING_DEPENDENCY ;;
63373      pkgadd)
63374        pkgadd_help  $MISSING_DEPENDENCY ;;
63375    esac
63376
63377    if test "x$PKGHANDLER_COMMAND" != x; then
63378      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63379    fi
63380  fi
63381
63382      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63383    fi
63384  fi
63385
63386
63387
63388
63389
63390  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63391    # Extract the first word of "llvm-config", so it can be a program name with args.
63392set dummy llvm-config; ac_word=$2
63393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63394$as_echo_n "checking for $ac_word... " >&6; }
63395if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63396  $as_echo_n "(cached) " >&6
63397else
63398  if test -n "$LLVM_CONFIG"; then
63399  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63400else
63401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63402for as_dir in $PATH
63403do
63404  IFS=$as_save_IFS
63405  test -z "$as_dir" && as_dir=.
63406    for ac_exec_ext in '' $ac_executable_extensions; do
63407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63408    ac_cv_prog_LLVM_CONFIG="llvm-config"
63409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63410    break 2
63411  fi
63412done
63413  done
63414IFS=$as_save_IFS
63415
63416fi
63417fi
63418LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63419if test -n "$LLVM_CONFIG"; then
63420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63421$as_echo "$LLVM_CONFIG" >&6; }
63422else
63423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63424$as_echo "no" >&6; }
63425fi
63426
63427
63428
63429    if test "x$LLVM_CONFIG" != xllvm-config; then
63430      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63431    fi
63432
63433    llvm_components="jit mcjit engine nativecodegen native"
63434    unset LLVM_CFLAGS
63435    for flag in $("$LLVM_CONFIG" --cxxflags); do
63436      if echo "${flag}" | grep -q '^-[ID]'; then
63437        if test "${flag}" != "-D_DEBUG" ; then
63438          if test "${LLVM_CFLAGS}" != "" ; then
63439            LLVM_CFLAGS="${LLVM_CFLAGS} "
63440          fi
63441          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63442        fi
63443      fi
63444    done
63445    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63446    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63447
63448    unset LLVM_LDFLAGS
63449    for flag in $("${LLVM_CONFIG}" --ldflags); do
63450      if echo "${flag}" | grep -q '^-L'; then
63451        if test "${LLVM_LDFLAGS}" != ""; then
63452          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63453        fi
63454        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63455      fi
63456    done
63457
63458    unset LLVM_LIBS
63459    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63460      if echo "${flag}" | grep -q '^-l'; then
63461        if test "${LLVM_LIBS}" != ""; then
63462          LLVM_LIBS="${LLVM_LIBS} "
63463        fi
63464        LLVM_LIBS="${LLVM_LIBS}${flag}"
63465      fi
63466    done
63467
63468    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63469    # always properly detect -ltinfo
63470    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63471
63472
63473
63474
63475  fi
63476
63477
63478
63479# Check whether --with-libjpeg was given.
63480if test "${with_libjpeg+set}" = set; then :
63481  withval=$with_libjpeg;
63482fi
63483
63484
63485  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63486$as_echo_n "checking for which libjpeg to use... " >&6; }
63487  # default is bundled
63488  DEFAULT_LIBJPEG=bundled
63489  # if user didn't specify, use DEFAULT_LIBJPEG
63490  if test "x${with_libjpeg}" = "x"; then
63491    with_libjpeg=${DEFAULT_LIBJPEG}
63492  fi
63493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63494$as_echo "${with_libjpeg}" >&6; }
63495
63496  if test "x${with_libjpeg}" = "xbundled"; then
63497    USE_EXTERNAL_LIBJPEG=false
63498  elif test "x${with_libjpeg}" = "xsystem"; then
63499    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63500if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63501
63502else
63503   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63504fi
63505
63506
63507    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63508$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63509if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63510  $as_echo_n "(cached) " >&6
63511else
63512  ac_check_lib_save_LIBS=$LIBS
63513LIBS="-ljpeg  $LIBS"
63514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63515/* end confdefs.h.  */
63516
63517/* Override any GCC internal prototype to avoid an error.
63518   Use char because int might match the return type of a GCC
63519   builtin and then its argument prototype would still apply.  */
63520#ifdef __cplusplus
63521extern "C"
63522#endif
63523char jpeg_CreateDecompress ();
63524int
63525main ()
63526{
63527return jpeg_CreateDecompress ();
63528  ;
63529  return 0;
63530}
63531_ACEOF
63532if ac_fn_cxx_try_link "$LINENO"; then :
63533  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63534else
63535  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63536fi
63537rm -f core conftest.err conftest.$ac_objext \
63538    conftest$ac_exeext conftest.$ac_ext
63539LIBS=$ac_check_lib_save_LIBS
63540fi
63541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63542$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63543if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63544  cat >>confdefs.h <<_ACEOF
63545#define HAVE_LIBJPEG 1
63546_ACEOF
63547
63548  LIBS="-ljpeg $LIBS"
63549
63550else
63551   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63552fi
63553
63554
63555    USE_EXTERNAL_LIBJPEG=true
63556  else
63557    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63558  fi
63559
63560
63561
63562
63563
63564# Check whether --with-giflib was given.
63565if test "${with_giflib+set}" = set; then :
63566  withval=$with_giflib;
63567fi
63568
63569
63570  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63571$as_echo_n "checking for which giflib to use... " >&6; }
63572  # default is bundled
63573  DEFAULT_GIFLIB=bundled
63574  # if user didn't specify, use DEFAULT_GIFLIB
63575  if test "x${with_giflib}" = "x"; then
63576    with_giflib=${DEFAULT_GIFLIB}
63577  fi
63578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63579$as_echo "${with_giflib}" >&6; }
63580
63581  if test "x${with_giflib}" = "xbundled"; then
63582    USE_EXTERNAL_LIBGIF=false
63583  elif test "x${with_giflib}" = "xsystem"; then
63584    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63585if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63586
63587else
63588   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63589fi
63590
63591
63592    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63593$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63594if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63595  $as_echo_n "(cached) " >&6
63596else
63597  ac_check_lib_save_LIBS=$LIBS
63598LIBS="-lgif  $LIBS"
63599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63600/* end confdefs.h.  */
63601
63602/* Override any GCC internal prototype to avoid an error.
63603   Use char because int might match the return type of a GCC
63604   builtin and then its argument prototype would still apply.  */
63605#ifdef __cplusplus
63606extern "C"
63607#endif
63608char DGifGetCode ();
63609int
63610main ()
63611{
63612return DGifGetCode ();
63613  ;
63614  return 0;
63615}
63616_ACEOF
63617if ac_fn_cxx_try_link "$LINENO"; then :
63618  ac_cv_lib_gif_DGifGetCode=yes
63619else
63620  ac_cv_lib_gif_DGifGetCode=no
63621fi
63622rm -f core conftest.err conftest.$ac_objext \
63623    conftest$ac_exeext conftest.$ac_ext
63624LIBS=$ac_check_lib_save_LIBS
63625fi
63626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63627$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63628if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63629  cat >>confdefs.h <<_ACEOF
63630#define HAVE_LIBGIF 1
63631_ACEOF
63632
63633  LIBS="-lgif $LIBS"
63634
63635else
63636   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63637fi
63638
63639
63640    USE_EXTERNAL_LIBGIF=true
63641  else
63642    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63643  fi
63644
63645
63646
63647
63648
63649# Check whether --with-libpng was given.
63650if test "${with_libpng+set}" = set; then :
63651  withval=$with_libpng;
63652fi
63653
63654
63655  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63656$as_echo_n "checking for which libpng to use... " >&6; }
63657
63658  # default is bundled
63659  DEFAULT_LIBPNG=bundled
63660  # if user didn't specify, use DEFAULT_LIBPNG
63661  if test "x${with_libpng}" = "x"; then
63662      with_libpng=${DEFAULT_LIBPNG}
63663  fi
63664
63665  if test "x${with_libpng}" = "xbundled"; then
63666      USE_EXTERNAL_LIBPNG=false
63667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63668$as_echo "bundled" >&6; }
63669  elif test "x${with_libpng}" = "xsystem"; then
63670
63671pkg_failed=no
63672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63673$as_echo_n "checking for PNG... " >&6; }
63674
63675if test -n "$PNG_CFLAGS"; then
63676    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63677 elif test -n "$PKG_CONFIG"; then
63678    if test -n "$PKG_CONFIG" && \
63679    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63680  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63681  ac_status=$?
63682  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63683  test $ac_status = 0; }; then
63684  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63685else
63686  pkg_failed=yes
63687fi
63688 else
63689    pkg_failed=untried
63690fi
63691if test -n "$PNG_LIBS"; then
63692    pkg_cv_PNG_LIBS="$PNG_LIBS"
63693 elif test -n "$PKG_CONFIG"; then
63694    if test -n "$PKG_CONFIG" && \
63695    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63696  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63697  ac_status=$?
63698  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63699  test $ac_status = 0; }; then
63700  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63701else
63702  pkg_failed=yes
63703fi
63704 else
63705    pkg_failed=untried
63706fi
63707
63708
63709
63710if test $pkg_failed = yes; then
63711
63712if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63713        _pkg_short_errors_supported=yes
63714else
63715        _pkg_short_errors_supported=no
63716fi
63717        if test $_pkg_short_errors_supported = yes; then
63718	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63719        else
63720	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63721        fi
63722	# Put the nasty error message in config.log where it belongs
63723	echo "$PNG_PKG_ERRORS" >&5
63724
63725	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63726$as_echo "no" >&6; }
63727                 LIBPNG_FOUND=no
63728elif test $pkg_failed = untried; then
63729	 LIBPNG_FOUND=no
63730else
63731	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63732	PNG_LIBS=$pkg_cv_PNG_LIBS
63733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63734$as_echo "yes" >&6; }
63735	 LIBPNG_FOUND=yes
63736fi
63737      if test "x${LIBPNG_FOUND}" = "xyes"; then
63738          USE_EXTERNAL_LIBPNG=true
63739          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63740$as_echo "system" >&6; }
63741      else
63742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63743$as_echo "system not found" >&6; }
63744          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63745      fi
63746  else
63747      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63748  fi
63749
63750
63751
63752
63753
63754# Check whether --with-zlib was given.
63755if test "${with_zlib+set}" = set; then :
63756  withval=$with_zlib;
63757fi
63758
63759
63760  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63761$as_echo_n "checking for compress in -lz... " >&6; }
63762if ${ac_cv_lib_z_compress+:} false; then :
63763  $as_echo_n "(cached) " >&6
63764else
63765  ac_check_lib_save_LIBS=$LIBS
63766LIBS="-lz  $LIBS"
63767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63768/* end confdefs.h.  */
63769
63770/* Override any GCC internal prototype to avoid an error.
63771   Use char because int might match the return type of a GCC
63772   builtin and then its argument prototype would still apply.  */
63773#ifdef __cplusplus
63774extern "C"
63775#endif
63776char compress ();
63777int
63778main ()
63779{
63780return compress ();
63781  ;
63782  return 0;
63783}
63784_ACEOF
63785if ac_fn_cxx_try_link "$LINENO"; then :
63786  ac_cv_lib_z_compress=yes
63787else
63788  ac_cv_lib_z_compress=no
63789fi
63790rm -f core conftest.err conftest.$ac_objext \
63791    conftest$ac_exeext conftest.$ac_ext
63792LIBS=$ac_check_lib_save_LIBS
63793fi
63794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63795$as_echo "$ac_cv_lib_z_compress" >&6; }
63796if test "x$ac_cv_lib_z_compress" = xyes; then :
63797   ZLIB_FOUND=yes
63798else
63799   ZLIB_FOUND=no
63800fi
63801
63802
63803  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63804$as_echo_n "checking for which zlib to use... " >&6; }
63805
63806  DEFAULT_ZLIB=system
63807  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63808    # On windows default is bundled...on others default is system
63809    DEFAULT_ZLIB=bundled
63810  fi
63811
63812  if test "x${ZLIB_FOUND}" != "xyes"; then
63813    # If we don't find any system...set default to bundled
63814    DEFAULT_ZLIB=bundled
63815  fi
63816
63817  # If user didn't specify, use DEFAULT_ZLIB
63818  if test "x${with_zlib}" = "x"; then
63819    with_zlib=${DEFAULT_ZLIB}
63820  fi
63821
63822  if test "x${with_zlib}" = "xbundled"; then
63823    USE_EXTERNAL_LIBZ=false
63824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63825$as_echo "bundled" >&6; }
63826  elif test "x${with_zlib}" = "xsystem"; then
63827    if test "x${ZLIB_FOUND}" = "xyes"; then
63828      USE_EXTERNAL_LIBZ=true
63829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63830$as_echo "system" >&6; }
63831    else
63832      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63833$as_echo "system not found" >&6; }
63834      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63835    fi
63836  else
63837    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63838  fi
63839
63840
63841
63842
63843
63844# Check whether --with-lcms was given.
63845if test "${with_lcms+set}" = set; then :
63846  withval=$with_lcms;
63847fi
63848
63849
63850  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63851$as_echo_n "checking for which lcms to use... " >&6; }
63852
63853  DEFAULT_LCMS=bundled
63854  # If user didn't specify, use DEFAULT_LCMS
63855  if test "x${with_lcms}" = "x"; then
63856      with_lcms=${DEFAULT_LCMS}
63857  fi
63858
63859  if test "x${with_lcms}" = "xbundled"; then
63860    USE_EXTERNAL_LCMS=false
63861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63862$as_echo "bundled" >&6; }
63863  elif test "x${with_lcms}" = "xsystem"; then
63864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63865$as_echo "system" >&6; }
63866
63867pkg_failed=no
63868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63869$as_echo_n "checking for LCMS... " >&6; }
63870
63871if test -n "$LCMS_CFLAGS"; then
63872    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63873 elif test -n "$PKG_CONFIG"; then
63874    if test -n "$PKG_CONFIG" && \
63875    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63876  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63877  ac_status=$?
63878  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63879  test $ac_status = 0; }; then
63880  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63881else
63882  pkg_failed=yes
63883fi
63884 else
63885    pkg_failed=untried
63886fi
63887if test -n "$LCMS_LIBS"; then
63888    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63889 elif test -n "$PKG_CONFIG"; then
63890    if test -n "$PKG_CONFIG" && \
63891    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63892  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63893  ac_status=$?
63894  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63895  test $ac_status = 0; }; then
63896  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63897else
63898  pkg_failed=yes
63899fi
63900 else
63901    pkg_failed=untried
63902fi
63903
63904
63905
63906if test $pkg_failed = yes; then
63907
63908if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63909        _pkg_short_errors_supported=yes
63910else
63911        _pkg_short_errors_supported=no
63912fi
63913        if test $_pkg_short_errors_supported = yes; then
63914	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63915        else
63916	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63917        fi
63918	# Put the nasty error message in config.log where it belongs
63919	echo "$LCMS_PKG_ERRORS" >&5
63920
63921	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63922$as_echo "no" >&6; }
63923                LCMS_FOUND=no
63924elif test $pkg_failed = untried; then
63925	LCMS_FOUND=no
63926else
63927	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63928	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63930$as_echo "yes" >&6; }
63931	LCMS_FOUND=yes
63932fi
63933    if test "x${LCMS_FOUND}" = "xyes"; then
63934      USE_EXTERNAL_LCMS=true
63935    else
63936      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63937    fi
63938  else
63939    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63940  fi
63941
63942
63943
63944
63945
63946
63947
63948
63949
63950
63951
63952  # Setup libm (the maths library)
63953  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63955$as_echo_n "checking for cos in -lm... " >&6; }
63956if ${ac_cv_lib_m_cos+:} false; then :
63957  $as_echo_n "(cached) " >&6
63958else
63959  ac_check_lib_save_LIBS=$LIBS
63960LIBS="-lm  $LIBS"
63961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63962/* end confdefs.h.  */
63963
63964/* Override any GCC internal prototype to avoid an error.
63965   Use char because int might match the return type of a GCC
63966   builtin and then its argument prototype would still apply.  */
63967#ifdef __cplusplus
63968extern "C"
63969#endif
63970char cos ();
63971int
63972main ()
63973{
63974return cos ();
63975  ;
63976  return 0;
63977}
63978_ACEOF
63979if ac_fn_cxx_try_link "$LINENO"; then :
63980  ac_cv_lib_m_cos=yes
63981else
63982  ac_cv_lib_m_cos=no
63983fi
63984rm -f core conftest.err conftest.$ac_objext \
63985    conftest$ac_exeext conftest.$ac_ext
63986LIBS=$ac_check_lib_save_LIBS
63987fi
63988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63989$as_echo "$ac_cv_lib_m_cos" >&6; }
63990if test "x$ac_cv_lib_m_cos" = xyes; then :
63991  cat >>confdefs.h <<_ACEOF
63992#define HAVE_LIBM 1
63993_ACEOF
63994
63995  LIBS="-lm $LIBS"
63996
63997else
63998
63999        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64000$as_echo "$as_me: Maths library was not found" >&6;}
64001
64002fi
64003
64004    LIBM="-lm"
64005  else
64006    LIBM=""
64007  fi
64008
64009
64010  # Setup libdl (for dynamic library loading)
64011  save_LIBS="$LIBS"
64012  LIBS=""
64013  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64014$as_echo_n "checking for dlopen in -ldl... " >&6; }
64015if ${ac_cv_lib_dl_dlopen+:} false; then :
64016  $as_echo_n "(cached) " >&6
64017else
64018  ac_check_lib_save_LIBS=$LIBS
64019LIBS="-ldl  $LIBS"
64020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64021/* end confdefs.h.  */
64022
64023/* Override any GCC internal prototype to avoid an error.
64024   Use char because int might match the return type of a GCC
64025   builtin and then its argument prototype would still apply.  */
64026#ifdef __cplusplus
64027extern "C"
64028#endif
64029char dlopen ();
64030int
64031main ()
64032{
64033return dlopen ();
64034  ;
64035  return 0;
64036}
64037_ACEOF
64038if ac_fn_cxx_try_link "$LINENO"; then :
64039  ac_cv_lib_dl_dlopen=yes
64040else
64041  ac_cv_lib_dl_dlopen=no
64042fi
64043rm -f core conftest.err conftest.$ac_objext \
64044    conftest$ac_exeext conftest.$ac_ext
64045LIBS=$ac_check_lib_save_LIBS
64046fi
64047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64048$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64049if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64050  cat >>confdefs.h <<_ACEOF
64051#define HAVE_LIBDL 1
64052_ACEOF
64053
64054  LIBS="-ldl $LIBS"
64055
64056fi
64057
64058  LIBDL="$LIBS"
64059
64060  LIBS="$save_LIBS"
64061
64062  # Deprecated libraries, keep the flags for backwards compatibility
64063  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64064
64065
64066# Check whether --with-dxsdk was given.
64067if test "${with_dxsdk+set}" = set; then :
64068  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64069$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64070fi
64071
64072
64073
64074
64075# Check whether --with-dxsdk-lib was given.
64076if test "${with_dxsdk_lib+set}" = set; then :
64077  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64078$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64079fi
64080
64081
64082
64083
64084# Check whether --with-dxsdk-include was given.
64085if test "${with_dxsdk_include+set}" = set; then :
64086  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64087$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64088fi
64089
64090
64091  fi
64092
64093  # Control if libzip can use mmap. Available for purposes of overriding.
64094  LIBZIP_CAN_USE_MMAP=true
64095
64096
64097
64098  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64099    # Find the root of the Solaris Studio installation from the compiler path
64100    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64101    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64103$as_echo_n "checking for libstlport.so.1... " >&6; }
64104    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64105      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64106      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64107    fi
64108    if test -f "$STLPORT_LIB"; then
64109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64110$as_echo "yes, $STLPORT_LIB" >&6; }
64111
64112  # Only process if variable expands to non-empty
64113
64114  if test "x$STLPORT_LIB" != x; then
64115    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64116
64117  # Input might be given as Windows format, start by converting to
64118  # unix format.
64119  path="$STLPORT_LIB"
64120  new_path=`$CYGPATH -u "$path"`
64121
64122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64125  # "foo.exe" is OK but "foo" is an error.
64126  #
64127  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64128  # It is also a way to make sure we got the proper file name for the real test later on.
64129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64130  if test "x$test_shortpath" = x; then
64131    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64132$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64133    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64134  fi
64135
64136  # Call helper function which possibly converts this using DOS-style short mode.
64137  # If so, the updated path is stored in $new_path.
64138
64139  input_path="$new_path"
64140  # Check if we need to convert this using DOS-style short mode. If the path
64141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64142  # take no chances and rewrite it.
64143  # Note: m4 eats our [], so we need to use [ and ] instead.
64144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64145  if test "x$has_forbidden_chars" != x; then
64146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64150      # Going to short mode and back again did indeed matter. Since short mode is
64151      # case insensitive, let's make it lowercase to improve readability.
64152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64153      # Now convert it back to Unix-style (cygpath)
64154      input_path=`$CYGPATH -u "$shortmode_path"`
64155      new_path="$input_path"
64156    fi
64157  fi
64158
64159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64160  if test "x$test_cygdrive_prefix" = x; then
64161    # As a simple fix, exclude /usr/bin since it's not a real path.
64162    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64164      # a path prefixed by /cygdrive for fixpath to work.
64165      new_path="$CYGWIN_ROOT_PATH$input_path"
64166    fi
64167  fi
64168
64169
64170  if test "x$path" != "x$new_path"; then
64171    STLPORT_LIB="$new_path"
64172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64173$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64174  fi
64175
64176    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64177
64178  path="$STLPORT_LIB"
64179  has_colon=`$ECHO $path | $GREP ^.:`
64180  new_path="$path"
64181  if test "x$has_colon" = x; then
64182    # Not in mixed or Windows style, start by that.
64183    new_path=`cmd //c echo $path`
64184  fi
64185
64186
64187  input_path="$new_path"
64188  # Check if we need to convert this using DOS-style short mode. If the path
64189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64190  # take no chances and rewrite it.
64191  # Note: m4 eats our [], so we need to use [ and ] instead.
64192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64193  if test "x$has_forbidden_chars" != x; then
64194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64196  fi
64197
64198
64199  windows_path="$new_path"
64200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64201    unix_path=`$CYGPATH -u "$windows_path"`
64202    new_path="$unix_path"
64203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64205    new_path="$unix_path"
64206  fi
64207
64208  if test "x$path" != "x$new_path"; then
64209    STLPORT_LIB="$new_path"
64210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64211$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64212  fi
64213
64214  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64215  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64216
64217    else
64218      # We're on a unix platform. Hooray! :)
64219      path="$STLPORT_LIB"
64220      has_space=`$ECHO "$path" | $GREP " "`
64221      if test "x$has_space" != x; then
64222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64223$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64224        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64225      fi
64226
64227      # Use eval to expand a potential ~
64228      eval path="$path"
64229      if test ! -f "$path" && test ! -d "$path"; then
64230        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64231      fi
64232
64233      if test -d "$path"; then
64234        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64235      else
64236        dir="`$DIRNAME "$path"`"
64237        base="`$BASENAME "$path"`"
64238        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64239      fi
64240    fi
64241  fi
64242
64243    else
64244      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64245$as_echo "no, not found at $STLPORT_LIB" >&6; }
64246      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64247    fi
64248
64249  fi
64250
64251
64252
64253
64254
64255
64256
64257
64258
64259
64260
64261
64262
64263
64264###############################################################################
64265#
64266# We need to do some final tweaking, when everything else is done.
64267#
64268###############################################################################
64269
64270
64271  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64272$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64273
64274  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64275    ENABLE_INTREE_EC=yes
64276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64277$as_echo "yes" >&6; }
64278  else
64279    ENABLE_INTREE_EC=no
64280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64281$as_echo "no" >&6; }
64282  fi
64283
64284
64285
64286
64287  # Check whether --enable-jtreg-failure-handler was given.
64288if test "${enable_jtreg_failure_handler+set}" = set; then :
64289  enableval=$enable_jtreg_failure_handler;
64290fi
64291
64292
64293  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64294$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64295
64296  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64297    if test "x$JT_HOME" = "x"; then
64298      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64299    else
64300      BUILD_FAILURE_HANDLER=true
64301      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64302$as_echo "yes, forced" >&6; }
64303    fi
64304  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64305    BUILD_FAILURE_HANDLER=false
64306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64307$as_echo "no, forced" >&6; }
64308  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64309      || test "x$enable_jtreg_failure_handler" = "x"; then
64310    if test "x$JT_HOME" = "x"; then
64311      BUILD_FAILURE_HANDLER=false
64312      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64313$as_echo "no, missing jtreg" >&6; }
64314    else
64315      BUILD_FAILURE_HANDLER=true
64316      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64317$as_echo "yes, jtreg present" >&6; }
64318    fi
64319  else
64320    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64321  fi
64322
64323
64324
64325
64326  # Check whether --enable-generate-classlist was given.
64327if test "${enable_generate_classlist+set}" = set; then :
64328  enableval=$enable_generate_classlist;
64329fi
64330
64331
64332  # Check if it's likely that it's possible to generate the classlist. Depending
64333  # on exact jvm configuration it could be possible anyway.
64334  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64335    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64336  else
64337    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64338  fi
64339
64340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64341$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64342  if test "x$enable_generate_classlist" = "xyes"; then
64343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64344$as_echo "yes, forced" >&6; }
64345    ENABLE_GENERATE_CLASSLIST="true"
64346    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64347      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64348$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64349    fi
64350  elif test "x$enable_generate_classlist" = "xno"; then
64351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64352$as_echo "no, forced" >&6; }
64353    ENABLE_GENERATE_CLASSLIST="false"
64354  elif test "x$enable_generate_classlist" = "x"; then
64355    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64356      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64357$as_echo "yes" >&6; }
64358      ENABLE_GENERATE_CLASSLIST="true"
64359    else
64360      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64361$as_echo "no" >&6; }
64362      ENABLE_GENERATE_CLASSLIST="false"
64363    fi
64364  else
64365    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64366  fi
64367
64368
64369
64370
64371###############################################################################
64372#
64373# Configure parts of the build that only affect the build performance,
64374# not the result.
64375#
64376###############################################################################
64377
64378
64379  # How many cores do we have on this build system?
64380
64381# Check whether --with-num-cores was given.
64382if test "${with_num_cores+set}" = set; then :
64383  withval=$with_num_cores;
64384fi
64385
64386  if test "x$with_num_cores" = x; then
64387    # The number of cores were not specified, try to probe them.
64388
64389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64390$as_echo_n "checking for number of cores... " >&6; }
64391  NUM_CORES=1
64392  FOUND_CORES=no
64393
64394  if test -f /proc/cpuinfo; then
64395    # Looks like a Linux (or cygwin) system
64396    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64397    FOUND_CORES=yes
64398  elif test -x /usr/sbin/psrinfo; then
64399    # Looks like a Solaris system
64400    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64401    FOUND_CORES=yes
64402  elif test -x /usr/sbin/sysctl; then
64403    # Looks like a MacOSX system
64404    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64405    FOUND_CORES=yes
64406  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64407    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64408    FOUND_CORES=yes
64409  elif test -n "$NUMBER_OF_PROCESSORS"; then
64410    # On windows, look in the env
64411    NUM_CORES=$NUMBER_OF_PROCESSORS
64412    FOUND_CORES=yes
64413  fi
64414
64415  if test "x$FOUND_CORES" = xyes; then
64416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64417$as_echo "$NUM_CORES" >&6; }
64418  else
64419    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64420$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64421    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64422$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64423  fi
64424
64425  else
64426    NUM_CORES=$with_num_cores
64427  fi
64428
64429
64430
64431  # How much memory do we have on this build system?
64432
64433# Check whether --with-memory-size was given.
64434if test "${with_memory_size+set}" = set; then :
64435  withval=$with_memory_size;
64436fi
64437
64438  if test "x$with_memory_size" = x; then
64439    # The memory size was not specified, try to probe it.
64440
64441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64442$as_echo_n "checking for memory size... " >&6; }
64443  # Default to 1024 MB
64444  MEMORY_SIZE=1024
64445  FOUND_MEM=no
64446
64447  if test -f /proc/meminfo; then
64448    # Looks like a Linux (or cygwin) system
64449    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64450    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64451    FOUND_MEM=yes
64452  elif test -x /usr/sbin/prtconf; then
64453    # Looks like a Solaris or AIX system
64454    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64455    FOUND_MEM=yes
64456  elif test -x /usr/sbin/sysctl; then
64457    # Looks like a MacOSX system
64458    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64459    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64460    FOUND_MEM=yes
64461  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64462    # Windows, but without cygwin
64463    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64464    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64465    FOUND_MEM=yes
64466  fi
64467
64468  if test "x$FOUND_MEM" = xyes; then
64469    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64470$as_echo "$MEMORY_SIZE MB" >&6; }
64471  else
64472    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64473$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64474    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64475$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64476  fi
64477
64478  else
64479    MEMORY_SIZE=$with_memory_size
64480  fi
64481
64482
64483
64484  # Provide a decent default number of parallel jobs for make depending on
64485  # number of cores, amount of memory and machine architecture.
64486
64487# Check whether --with-jobs was given.
64488if test "${with_jobs+set}" = set; then :
64489  withval=$with_jobs;
64490fi
64491
64492  if test "x$with_jobs" = x; then
64493    # Number of jobs was not specified, calculate.
64494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64495$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64496    # Approximate memory in GB.
64497    memory_gb=`expr $MEMORY_SIZE / 1024`
64498    # Pick the lowest of memory in gb and number of cores.
64499    if test "$memory_gb" -lt "$NUM_CORES"; then
64500      JOBS="$memory_gb"
64501    else
64502      JOBS="$NUM_CORES"
64503    fi
64504    if test "$JOBS" -eq "0"; then
64505      JOBS=1
64506    fi
64507    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64508$as_echo "$JOBS" >&6; }
64509  else
64510    JOBS=$with_jobs
64511  fi
64512
64513
64514
64515  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64516
64517# Check whether --with-test-jobs was given.
64518if test "${with_test_jobs+set}" = set; then :
64519  withval=$with_test_jobs;
64520fi
64521
64522  if test "x$with_test_jobs" = x; then
64523      TEST_JOBS=0
64524  else
64525      TEST_JOBS=$with_test_jobs
64526  fi
64527
64528
64529
64530# Setup arguments for the boot jdk (after cores and memory have been setup)
64531
64532  ##############################################################################
64533  #
64534  # Specify jvm options for anything that is run with the Boot JDK.
64535  # Not all JVM:s accept the same arguments on the command line.
64536  #
64537
64538# Check whether --with-boot-jdk-jvmargs was given.
64539if test "${with_boot_jdk_jvmargs+set}" = set; then :
64540  withval=$with_boot_jdk_jvmargs;
64541fi
64542
64543
64544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64545$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64546
64547  # Disable special log output when a debug build is used as Boot JDK...
64548
64549  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64550  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64551  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64552  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64553  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64554  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64555    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64556    JVM_ARG_OK=true
64557  else
64558    $ECHO "Arg failed:" >&5
64559    $ECHO "$OUTPUT" >&5
64560    JVM_ARG_OK=false
64561  fi
64562
64563
64564  # Force en-US environment
64565
64566  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64567  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64568  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64569  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64570  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64571  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64572    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64573    JVM_ARG_OK=true
64574  else
64575    $ECHO "Arg failed:" >&5
64576    $ECHO "$OUTPUT" >&5
64577    JVM_ARG_OK=false
64578  fi
64579
64580
64581  # Apply user provided options.
64582
64583  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64584  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64585  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64586  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64587  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64588  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64589    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64590    JVM_ARG_OK=true
64591  else
64592    $ECHO "Arg failed:" >&5
64593    $ECHO "$OUTPUT" >&5
64594    JVM_ARG_OK=false
64595  fi
64596
64597
64598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64599$as_echo "$boot_jdk_jvmargs" >&6; }
64600
64601  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64602  JAVA_FLAGS=$boot_jdk_jvmargs
64603
64604
64605
64606  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64607$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64608
64609  # Starting amount of heap memory.
64610
64611  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64612  $ECHO "Command: $JAVA -Xms64M -version" >&5
64613  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64614  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64615  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64616  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64617    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64618    JVM_ARG_OK=true
64619  else
64620    $ECHO "Arg failed:" >&5
64621    $ECHO "$OUTPUT" >&5
64622    JVM_ARG_OK=false
64623  fi
64624
64625  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64626
64627  # Maximum amount of heap memory and stack size.
64628  JVM_HEAP_LIMIT_32="1024"
64629  # Running a 64 bit JVM allows for and requires a bigger heap
64630  JVM_HEAP_LIMIT_64="1600"
64631  STACK_SIZE_32=768
64632  STACK_SIZE_64=1536
64633  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64634  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64635    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64636  fi
64637  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64638    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64639  fi
64640  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64641    JVM_HEAP_LIMIT_32=512
64642    JVM_HEAP_LIMIT_64=512
64643  fi
64644
64645  if test "x$BOOT_JDK_BITS" = "x32"; then
64646    STACK_SIZE=$STACK_SIZE_32
64647    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64648  else
64649    STACK_SIZE=$STACK_SIZE_64
64650    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64651  fi
64652
64653  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64654  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64655  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64656  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64657  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64658  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64659    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64660    JVM_ARG_OK=true
64661  else
64662    $ECHO "Arg failed:" >&5
64663    $ECHO "$OUTPUT" >&5
64664    JVM_ARG_OK=false
64665  fi
64666
64667
64668  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64669  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64670  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64671  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64672  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64673  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64674    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64675    JVM_ARG_OK=true
64676  else
64677    $ECHO "Arg failed:" >&5
64678    $ECHO "$OUTPUT" >&5
64679    JVM_ARG_OK=false
64680  fi
64681
64682
64683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64684$as_echo "$boot_jdk_jvmargs_big" >&6; }
64685
64686  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64687
64688
64689  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64690    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64691    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64692  else
64693    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64694    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64695  fi
64696  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64697  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64699$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64701$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64702
64703
64704  # By default, the main javac compilations use big
64705  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64706
64707
64708  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64709$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64710
64711  # Use serial gc for small short lived tools if possible
64712
64713  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64714  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64715  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64716  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64717  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64718  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64719    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64720    JVM_ARG_OK=true
64721  else
64722    $ECHO "Arg failed:" >&5
64723    $ECHO "$OUTPUT" >&5
64724    JVM_ARG_OK=false
64725  fi
64726
64727
64728  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64729  $ECHO "Command: $JAVA -Xms32M -version" >&5
64730  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64731  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64732  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64733  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64734    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64735    JVM_ARG_OK=true
64736  else
64737    $ECHO "Arg failed:" >&5
64738    $ECHO "$OUTPUT" >&5
64739    JVM_ARG_OK=false
64740  fi
64741
64742
64743  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64744  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64745  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64746  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64747  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64748  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64749    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64750    JVM_ARG_OK=true
64751  else
64752    $ECHO "Arg failed:" >&5
64753    $ECHO "$OUTPUT" >&5
64754    JVM_ARG_OK=false
64755  fi
64756
64757
64758  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64759  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64760  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64761  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64762  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64763  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64764    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64765    JVM_ARG_OK=true
64766  else
64767    $ECHO "Arg failed:" >&5
64768    $ECHO "$OUTPUT" >&5
64769    JVM_ARG_OK=false
64770  fi
64771
64772
64773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64774$as_echo "$boot_jdk_jvmargs_small" >&6; }
64775
64776  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64777
64778
64779  JAVA_TOOL_FLAGS_SMALL=""
64780  for f in $JAVA_FLAGS_SMALL; do
64781    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64782  done
64783
64784
64785
64786# Setup smart javac (after cores and memory have been setup)
64787
64788
64789# Check whether --with-sjavac-server-java was given.
64790if test "${with_sjavac_server_java+set}" = set; then :
64791  withval=$with_sjavac_server_java;
64792fi
64793
64794
64795  if test "x$with_sjavac_server_java" != x; then
64796    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64797    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64798    if test "x$FOUND_VERSION" = x; then
64799      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64800    fi
64801  else
64802    SJAVAC_SERVER_JAVA="$JAVA"
64803  fi
64804
64805
64806  if test "$MEMORY_SIZE" -gt "3000"; then
64807
64808  $ECHO "Check if jvm arg is ok: -d64" >&5
64809  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64810  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64811  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64812  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64813  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64814    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64815    JVM_ARG_OK=true
64816  else
64817    $ECHO "Arg failed:" >&5
64818    $ECHO "$OUTPUT" >&5
64819    JVM_ARG_OK=false
64820  fi
64821
64822    if test "$JVM_ARG_OK" = true; then
64823      JVM_64BIT=true
64824      JVM_ARG_OK=false
64825    fi
64826  fi
64827
64828  MX_VALUE=`expr $MEMORY_SIZE / 2`
64829  if test "$JVM_64BIT" = true; then
64830    # Set ms lower than mx since more than one instance of the server might
64831    # get launched at the same time before they figure out which instance won.
64832    MS_VALUE=512
64833    if test "$MX_VALUE" -gt "2048"; then
64834      MX_VALUE=2048
64835    fi
64836  else
64837    MS_VALUE=256
64838    if test "$MX_VALUE" -gt "1500"; then
64839      MX_VALUE=1500
64840    fi
64841  fi
64842  if test "$MX_VALUE" -lt "512"; then
64843    MX_VALUE=512
64844  fi
64845
64846  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64847  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64848  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64849  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64850  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64851  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64852    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64853    JVM_ARG_OK=true
64854  else
64855    $ECHO "Arg failed:" >&5
64856    $ECHO "$OUTPUT" >&5
64857    JVM_ARG_OK=false
64858  fi
64859
64860
64861
64862  # Check whether --enable-sjavac was given.
64863if test "${enable_sjavac+set}" = set; then :
64864  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64865else
64866  ENABLE_SJAVAC="no"
64867fi
64868
64869  if test "x$JVM_ARG_OK" = "xfalse"; then
64870    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64871$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64872    ENABLE_SJAVAC="no"
64873  fi
64874  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64875$as_echo_n "checking whether to use sjavac... " >&6; }
64876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64877$as_echo "$ENABLE_SJAVAC" >&6; }
64878
64879
64880  # Check whether --enable-javac-server was given.
64881if test "${enable_javac_server+set}" = set; then :
64882  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64883else
64884  ENABLE_JAVAC_SERVER="yes"
64885fi
64886
64887  if test "x$JVM_ARG_OK" = "xfalse"; then
64888    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64889$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64890    ENABLE_JAVAC_SERVER="no"
64891  fi
64892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64893$as_echo_n "checking whether to use javac server... " >&6; }
64894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64895$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64896
64897
64898  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64899    # When using a server javac, the small client instances do not need much
64900    # resources.
64901    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64902  fi
64903
64904
64905# Setup use of icecc if requested
64906
64907  # Check whether --enable-icecc was given.
64908if test "${enable_icecc+set}" = set; then :
64909  enableval=$enable_icecc;
64910fi
64911
64912
64913  if test "x${enable_icecc}" = "xyes"; then
64914
64915
64916
64917  # Publish this variable in the help.
64918
64919
64920  if [ -z "${ICECC_CMD+x}" ]; then
64921    # The variable is not set by user, try to locate tool using the code snippet
64922    for ac_prog in icecc
64923do
64924  # Extract the first word of "$ac_prog", so it can be a program name with args.
64925set dummy $ac_prog; ac_word=$2
64926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64927$as_echo_n "checking for $ac_word... " >&6; }
64928if ${ac_cv_path_ICECC_CMD+:} false; then :
64929  $as_echo_n "(cached) " >&6
64930else
64931  case $ICECC_CMD in
64932  [\\/]* | ?:[\\/]*)
64933  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64934  ;;
64935  *)
64936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64937for as_dir in $PATH
64938do
64939  IFS=$as_save_IFS
64940  test -z "$as_dir" && as_dir=.
64941    for ac_exec_ext in '' $ac_executable_extensions; do
64942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64943    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64945    break 2
64946  fi
64947done
64948  done
64949IFS=$as_save_IFS
64950
64951  ;;
64952esac
64953fi
64954ICECC_CMD=$ac_cv_path_ICECC_CMD
64955if test -n "$ICECC_CMD"; then
64956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64957$as_echo "$ICECC_CMD" >&6; }
64958else
64959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64960$as_echo "no" >&6; }
64961fi
64962
64963
64964  test -n "$ICECC_CMD" && break
64965done
64966
64967  else
64968    # The variable is set, but is it from the command line or the environment?
64969
64970    # Try to remove the string !ICECC_CMD! from our list.
64971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64973      # If it failed, the variable was not from the command line. Ignore it,
64974      # but warn the user (except for BASH, which is always set by the calling BASH).
64975      if test "xICECC_CMD" != xBASH; then
64976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64977$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64978      fi
64979      # Try to locate tool using the code snippet
64980      for ac_prog in icecc
64981do
64982  # Extract the first word of "$ac_prog", so it can be a program name with args.
64983set dummy $ac_prog; ac_word=$2
64984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64985$as_echo_n "checking for $ac_word... " >&6; }
64986if ${ac_cv_path_ICECC_CMD+:} false; then :
64987  $as_echo_n "(cached) " >&6
64988else
64989  case $ICECC_CMD in
64990  [\\/]* | ?:[\\/]*)
64991  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64992  ;;
64993  *)
64994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64995for as_dir in $PATH
64996do
64997  IFS=$as_save_IFS
64998  test -z "$as_dir" && as_dir=.
64999    for ac_exec_ext in '' $ac_executable_extensions; do
65000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65001    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65003    break 2
65004  fi
65005done
65006  done
65007IFS=$as_save_IFS
65008
65009  ;;
65010esac
65011fi
65012ICECC_CMD=$ac_cv_path_ICECC_CMD
65013if test -n "$ICECC_CMD"; then
65014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65015$as_echo "$ICECC_CMD" >&6; }
65016else
65017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65018$as_echo "no" >&6; }
65019fi
65020
65021
65022  test -n "$ICECC_CMD" && break
65023done
65024
65025    else
65026      # If it succeeded, then it was overridden by the user. We will use it
65027      # for the tool.
65028
65029      # First remove it from the list of overridden variables, so we can test
65030      # for unknown variables in the end.
65031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65032
65033      # Check if we try to supply an empty value
65034      if test "x$ICECC_CMD" = x; then
65035        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65036$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65038$as_echo_n "checking for ICECC_CMD... " >&6; }
65039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65040$as_echo "disabled" >&6; }
65041      else
65042        # Check if the provided tool contains a complete path.
65043        tool_specified="$ICECC_CMD"
65044        tool_basename="${tool_specified##*/}"
65045        if test "x$tool_basename" = "x$tool_specified"; then
65046          # A command without a complete path is provided, search $PATH.
65047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65048$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65049          # Extract the first word of "$tool_basename", so it can be a program name with args.
65050set dummy $tool_basename; ac_word=$2
65051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65052$as_echo_n "checking for $ac_word... " >&6; }
65053if ${ac_cv_path_ICECC_CMD+:} false; then :
65054  $as_echo_n "(cached) " >&6
65055else
65056  case $ICECC_CMD in
65057  [\\/]* | ?:[\\/]*)
65058  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65059  ;;
65060  *)
65061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65062for as_dir in $PATH
65063do
65064  IFS=$as_save_IFS
65065  test -z "$as_dir" && as_dir=.
65066    for ac_exec_ext in '' $ac_executable_extensions; do
65067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65068    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65070    break 2
65071  fi
65072done
65073  done
65074IFS=$as_save_IFS
65075
65076  ;;
65077esac
65078fi
65079ICECC_CMD=$ac_cv_path_ICECC_CMD
65080if test -n "$ICECC_CMD"; then
65081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65082$as_echo "$ICECC_CMD" >&6; }
65083else
65084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65085$as_echo "no" >&6; }
65086fi
65087
65088
65089          if test "x$ICECC_CMD" = x; then
65090            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65091          fi
65092        else
65093          # Otherwise we believe it is a complete path. Use it as it is.
65094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65095$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65096          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65097$as_echo_n "checking for ICECC_CMD... " >&6; }
65098          if test ! -x "$tool_specified"; then
65099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65100$as_echo "not found" >&6; }
65101            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65102          fi
65103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65104$as_echo "$tool_specified" >&6; }
65105        fi
65106      fi
65107    fi
65108
65109  fi
65110
65111
65112
65113  if test "x$ICECC_CMD" = x; then
65114    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65115  fi
65116
65117
65118    old_path="$PATH"
65119
65120    # Look for icecc-create-env in some known places
65121    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65122
65123
65124
65125  # Publish this variable in the help.
65126
65127
65128  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65129    # The variable is not set by user, try to locate tool using the code snippet
65130    for ac_prog in icecc-create-env
65131do
65132  # Extract the first word of "$ac_prog", so it can be a program name with args.
65133set dummy $ac_prog; ac_word=$2
65134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65135$as_echo_n "checking for $ac_word... " >&6; }
65136if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65137  $as_echo_n "(cached) " >&6
65138else
65139  case $ICECC_CREATE_ENV in
65140  [\\/]* | ?:[\\/]*)
65141  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65142  ;;
65143  *)
65144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65145for as_dir in $PATH
65146do
65147  IFS=$as_save_IFS
65148  test -z "$as_dir" && as_dir=.
65149    for ac_exec_ext in '' $ac_executable_extensions; do
65150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65151    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65153    break 2
65154  fi
65155done
65156  done
65157IFS=$as_save_IFS
65158
65159  ;;
65160esac
65161fi
65162ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65163if test -n "$ICECC_CREATE_ENV"; then
65164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65165$as_echo "$ICECC_CREATE_ENV" >&6; }
65166else
65167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65168$as_echo "no" >&6; }
65169fi
65170
65171
65172  test -n "$ICECC_CREATE_ENV" && break
65173done
65174
65175  else
65176    # The variable is set, but is it from the command line or the environment?
65177
65178    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65179    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65180    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65181      # If it failed, the variable was not from the command line. Ignore it,
65182      # but warn the user (except for BASH, which is always set by the calling BASH).
65183      if test "xICECC_CREATE_ENV" != xBASH; then
65184        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65185$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65186      fi
65187      # Try to locate tool using the code snippet
65188      for ac_prog in icecc-create-env
65189do
65190  # Extract the first word of "$ac_prog", so it can be a program name with args.
65191set dummy $ac_prog; ac_word=$2
65192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65193$as_echo_n "checking for $ac_word... " >&6; }
65194if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65195  $as_echo_n "(cached) " >&6
65196else
65197  case $ICECC_CREATE_ENV in
65198  [\\/]* | ?:[\\/]*)
65199  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65200  ;;
65201  *)
65202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65203for as_dir in $PATH
65204do
65205  IFS=$as_save_IFS
65206  test -z "$as_dir" && as_dir=.
65207    for ac_exec_ext in '' $ac_executable_extensions; do
65208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65209    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65211    break 2
65212  fi
65213done
65214  done
65215IFS=$as_save_IFS
65216
65217  ;;
65218esac
65219fi
65220ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65221if test -n "$ICECC_CREATE_ENV"; then
65222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65223$as_echo "$ICECC_CREATE_ENV" >&6; }
65224else
65225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65226$as_echo "no" >&6; }
65227fi
65228
65229
65230  test -n "$ICECC_CREATE_ENV" && break
65231done
65232
65233    else
65234      # If it succeeded, then it was overridden by the user. We will use it
65235      # for the tool.
65236
65237      # First remove it from the list of overridden variables, so we can test
65238      # for unknown variables in the end.
65239      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65240
65241      # Check if we try to supply an empty value
65242      if test "x$ICECC_CREATE_ENV" = x; then
65243        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65244$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65245        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65246$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65248$as_echo "disabled" >&6; }
65249      else
65250        # Check if the provided tool contains a complete path.
65251        tool_specified="$ICECC_CREATE_ENV"
65252        tool_basename="${tool_specified##*/}"
65253        if test "x$tool_basename" = "x$tool_specified"; then
65254          # A command without a complete path is provided, search $PATH.
65255          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65256$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65257          # Extract the first word of "$tool_basename", so it can be a program name with args.
65258set dummy $tool_basename; ac_word=$2
65259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65260$as_echo_n "checking for $ac_word... " >&6; }
65261if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65262  $as_echo_n "(cached) " >&6
65263else
65264  case $ICECC_CREATE_ENV in
65265  [\\/]* | ?:[\\/]*)
65266  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65267  ;;
65268  *)
65269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65270for as_dir in $PATH
65271do
65272  IFS=$as_save_IFS
65273  test -z "$as_dir" && as_dir=.
65274    for ac_exec_ext in '' $ac_executable_extensions; do
65275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65276    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65278    break 2
65279  fi
65280done
65281  done
65282IFS=$as_save_IFS
65283
65284  ;;
65285esac
65286fi
65287ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65288if test -n "$ICECC_CREATE_ENV"; then
65289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65290$as_echo "$ICECC_CREATE_ENV" >&6; }
65291else
65292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65293$as_echo "no" >&6; }
65294fi
65295
65296
65297          if test "x$ICECC_CREATE_ENV" = x; then
65298            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65299          fi
65300        else
65301          # Otherwise we believe it is a complete path. Use it as it is.
65302          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65303$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65304          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65305$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65306          if test ! -x "$tool_specified"; then
65307            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65308$as_echo "not found" >&6; }
65309            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65310          fi
65311          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65312$as_echo "$tool_specified" >&6; }
65313        fi
65314      fi
65315    fi
65316
65317  fi
65318
65319
65320
65321  if test "x$ICECC_CREATE_ENV" = x; then
65322    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65323  fi
65324
65325
65326    # Use icecc-create-env to create a minimal compilation environment that can
65327    # be sent to the other hosts in the icecream cluster.
65328    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65329    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65330    # Older versions of icecc does not have the --gcc parameter
65331    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65332      icecc_gcc_arg="--gcc"
65333    fi
65334    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65335
65336  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65337      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65338          ${icecc_create_env_log} 2>&1 )
65339  if test "$?" != "0"; then
65340    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65341$as_echo "$as_me: icecc-create-env output:" >&6;}
65342    cat \
65343          ${icecc_create_env_log}
65344    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65345  fi
65346
65347    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65348      # For clang, the icecc compilerwrapper is needed. It usually resides next
65349      # to icecc-create-env.
65350
65351
65352
65353  # Publish this variable in the help.
65354
65355
65356  if [ -z "${ICECC_WRAPPER+x}" ]; then
65357    # The variable is not set by user, try to locate tool using the code snippet
65358    for ac_prog in compilerwrapper
65359do
65360  # Extract the first word of "$ac_prog", so it can be a program name with args.
65361set dummy $ac_prog; ac_word=$2
65362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65363$as_echo_n "checking for $ac_word... " >&6; }
65364if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65365  $as_echo_n "(cached) " >&6
65366else
65367  case $ICECC_WRAPPER in
65368  [\\/]* | ?:[\\/]*)
65369  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65370  ;;
65371  *)
65372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65373for as_dir in $PATH
65374do
65375  IFS=$as_save_IFS
65376  test -z "$as_dir" && as_dir=.
65377    for ac_exec_ext in '' $ac_executable_extensions; do
65378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65379    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65381    break 2
65382  fi
65383done
65384  done
65385IFS=$as_save_IFS
65386
65387  ;;
65388esac
65389fi
65390ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65391if test -n "$ICECC_WRAPPER"; then
65392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65393$as_echo "$ICECC_WRAPPER" >&6; }
65394else
65395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65396$as_echo "no" >&6; }
65397fi
65398
65399
65400  test -n "$ICECC_WRAPPER" && break
65401done
65402
65403  else
65404    # The variable is set, but is it from the command line or the environment?
65405
65406    # Try to remove the string !ICECC_WRAPPER! from our list.
65407    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65408    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65409      # If it failed, the variable was not from the command line. Ignore it,
65410      # but warn the user (except for BASH, which is always set by the calling BASH).
65411      if test "xICECC_WRAPPER" != xBASH; then
65412        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65413$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65414      fi
65415      # Try to locate tool using the code snippet
65416      for ac_prog in compilerwrapper
65417do
65418  # Extract the first word of "$ac_prog", so it can be a program name with args.
65419set dummy $ac_prog; ac_word=$2
65420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65421$as_echo_n "checking for $ac_word... " >&6; }
65422if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65423  $as_echo_n "(cached) " >&6
65424else
65425  case $ICECC_WRAPPER in
65426  [\\/]* | ?:[\\/]*)
65427  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65428  ;;
65429  *)
65430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65431for as_dir in $PATH
65432do
65433  IFS=$as_save_IFS
65434  test -z "$as_dir" && as_dir=.
65435    for ac_exec_ext in '' $ac_executable_extensions; do
65436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65437    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65439    break 2
65440  fi
65441done
65442  done
65443IFS=$as_save_IFS
65444
65445  ;;
65446esac
65447fi
65448ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65449if test -n "$ICECC_WRAPPER"; then
65450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65451$as_echo "$ICECC_WRAPPER" >&6; }
65452else
65453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65454$as_echo "no" >&6; }
65455fi
65456
65457
65458  test -n "$ICECC_WRAPPER" && break
65459done
65460
65461    else
65462      # If it succeeded, then it was overridden by the user. We will use it
65463      # for the tool.
65464
65465      # First remove it from the list of overridden variables, so we can test
65466      # for unknown variables in the end.
65467      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65468
65469      # Check if we try to supply an empty value
65470      if test "x$ICECC_WRAPPER" = x; then
65471        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65472$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65474$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65476$as_echo "disabled" >&6; }
65477      else
65478        # Check if the provided tool contains a complete path.
65479        tool_specified="$ICECC_WRAPPER"
65480        tool_basename="${tool_specified##*/}"
65481        if test "x$tool_basename" = "x$tool_specified"; then
65482          # A command without a complete path is provided, search $PATH.
65483          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65484$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65485          # Extract the first word of "$tool_basename", so it can be a program name with args.
65486set dummy $tool_basename; ac_word=$2
65487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65488$as_echo_n "checking for $ac_word... " >&6; }
65489if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65490  $as_echo_n "(cached) " >&6
65491else
65492  case $ICECC_WRAPPER in
65493  [\\/]* | ?:[\\/]*)
65494  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65495  ;;
65496  *)
65497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65498for as_dir in $PATH
65499do
65500  IFS=$as_save_IFS
65501  test -z "$as_dir" && as_dir=.
65502    for ac_exec_ext in '' $ac_executable_extensions; do
65503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65504    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65506    break 2
65507  fi
65508done
65509  done
65510IFS=$as_save_IFS
65511
65512  ;;
65513esac
65514fi
65515ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65516if test -n "$ICECC_WRAPPER"; then
65517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65518$as_echo "$ICECC_WRAPPER" >&6; }
65519else
65520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65521$as_echo "no" >&6; }
65522fi
65523
65524
65525          if test "x$ICECC_WRAPPER" = x; then
65526            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65527          fi
65528        else
65529          # Otherwise we believe it is a complete path. Use it as it is.
65530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65531$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65532          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65533$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65534          if test ! -x "$tool_specified"; then
65535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65536$as_echo "not found" >&6; }
65537            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65538          fi
65539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65540$as_echo "$tool_specified" >&6; }
65541        fi
65542      fi
65543    fi
65544
65545  fi
65546
65547
65548
65549  if test "x$ICECC_WRAPPER" = x; then
65550    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65551  fi
65552
65553
65554
65555  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65556      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65557  if test "$?" != "0"; then
65558    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65559$as_echo "$as_me: icecc-create-env output:" >&6;}
65560    cat ${icecc_create_env_log}
65561    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65562  fi
65563
65564    else
65565      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65566    fi
65567    PATH="$old_path"
65568    # The bundle with the compiler gets a name based on checksums. Parse log file
65569    # to find it.
65570    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65571    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65572    if test ! -f ${ICECC_ENV_BUNDLE}; then
65573      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65574    fi
65575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65576$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65577    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65578$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65579    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65580
65581    if test "x${COMPILE_TYPE}" = "xcross"; then
65582      # If cross compiling, create a separate env package for the build compiler
65583      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65584      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65585      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65586
65587  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65588      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65589            ${icecc_create_env_log_build} 2>&1 )
65590  if test "$?" != "0"; then
65591    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65592$as_echo "$as_me: icecc-create-env output:" >&6;}
65593    cat \
65594            ${icecc_create_env_log_build}
65595    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65596  fi
65597
65598      elif test "x${BUILD_CC##*/}" = "xclang"; then
65599
65600  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65601      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65602  if test "$?" != "0"; then
65603    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65604$as_echo "$as_me: icecc-create-env output:" >&6;}
65605    cat ${icecc_create_env_log_build}
65606    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65607  fi
65608
65609      else
65610        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65611      fi
65612      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65613      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65614      if test ! -f ${ICECC_ENV_BUNDLE}; then
65615        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65616      fi
65617      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65618$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65619      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65620$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65621      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65622          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65623    else
65624      BUILD_ICECC="${ICECC}"
65625    fi
65626
65627
65628  fi
65629
65630
65631# Can the C/C++ compiler use precompiled headers?
65632
65633
65634  ###############################################################################
65635  #
65636  # Can the C/C++ compiler use precompiled headers?
65637  #
65638  # Check whether --enable-precompiled-headers was given.
65639if test "${enable_precompiled_headers+set}" = set; then :
65640  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65641else
65642  ENABLE_PRECOMPH=yes
65643fi
65644
65645
65646  USE_PRECOMPILED_HEADER=1
65647  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65648$as_echo_n "checking If precompiled header is enabled... " >&6; }
65649  if test "x$ENABLE_PRECOMPH" = xno; then
65650    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65651$as_echo "no, forced" >&6; }
65652    USE_PRECOMPILED_HEADER=0
65653  elif test "x$ICECC" != "x"; then
65654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65655$as_echo "no, does not work effectively with icecc" >&6; }
65656    USE_PRECOMPILED_HEADER=0
65657  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65659$as_echo "no, does not work with Solaris Studio" >&6; }
65660    USE_PRECOMPILED_HEADER=0
65661  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65663$as_echo "no, does not work with xlc" >&6; }
65664    USE_PRECOMPILED_HEADER=0
65665  else
65666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65667$as_echo "yes" >&6; }
65668  fi
65669
65670  if test "x$ENABLE_PRECOMPH" = xyes; then
65671    # Check that the compiler actually supports precomp headers.
65672    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65673      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65674$as_echo_n "checking that precompiled headers work... " >&6; }
65675      echo "int alfa();" > conftest.h
65676      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65677      if test ! -f conftest.hpp.gch; then
65678        USE_PRECOMPILED_HEADER=0
65679        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65680$as_echo "no" >&6; }
65681      else
65682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65683$as_echo "yes" >&6; }
65684      fi
65685      $RM conftest.h conftest.hpp.gch
65686    fi
65687  fi
65688
65689
65690
65691
65692# Setup use of ccache, if available
65693
65694  # Check whether --enable-ccache was given.
65695if test "${enable_ccache+set}" = set; then :
65696  enableval=$enable_ccache;
65697fi
65698
65699
65700  CCACHE=
65701  CCACHE_STATUS=
65702  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65703$as_echo_n "checking is ccache enabled... " >&6; }
65704  if test "x$enable_ccache" = xyes; then
65705    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65706      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65707$as_echo "yes" >&6; }
65708      OLD_PATH="$PATH"
65709      if test "x$TOOLCHAIN_PATH" != x; then
65710        PATH=$TOOLCHAIN_PATH:$PATH
65711      fi
65712
65713
65714
65715  # Publish this variable in the help.
65716
65717
65718  if [ -z "${CCACHE+x}" ]; then
65719    # The variable is not set by user, try to locate tool using the code snippet
65720    for ac_prog in ccache
65721do
65722  # Extract the first word of "$ac_prog", so it can be a program name with args.
65723set dummy $ac_prog; ac_word=$2
65724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65725$as_echo_n "checking for $ac_word... " >&6; }
65726if ${ac_cv_path_CCACHE+:} false; then :
65727  $as_echo_n "(cached) " >&6
65728else
65729  case $CCACHE in
65730  [\\/]* | ?:[\\/]*)
65731  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65732  ;;
65733  *)
65734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65735for as_dir in $PATH
65736do
65737  IFS=$as_save_IFS
65738  test -z "$as_dir" && as_dir=.
65739    for ac_exec_ext in '' $ac_executable_extensions; do
65740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65741    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65743    break 2
65744  fi
65745done
65746  done
65747IFS=$as_save_IFS
65748
65749  ;;
65750esac
65751fi
65752CCACHE=$ac_cv_path_CCACHE
65753if test -n "$CCACHE"; then
65754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65755$as_echo "$CCACHE" >&6; }
65756else
65757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65758$as_echo "no" >&6; }
65759fi
65760
65761
65762  test -n "$CCACHE" && break
65763done
65764
65765  else
65766    # The variable is set, but is it from the command line or the environment?
65767
65768    # Try to remove the string !CCACHE! from our list.
65769    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65770    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65771      # If it failed, the variable was not from the command line. Ignore it,
65772      # but warn the user (except for BASH, which is always set by the calling BASH).
65773      if test "xCCACHE" != xBASH; then
65774        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65775$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65776      fi
65777      # Try to locate tool using the code snippet
65778      for ac_prog in ccache
65779do
65780  # Extract the first word of "$ac_prog", so it can be a program name with args.
65781set dummy $ac_prog; ac_word=$2
65782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65783$as_echo_n "checking for $ac_word... " >&6; }
65784if ${ac_cv_path_CCACHE+:} false; then :
65785  $as_echo_n "(cached) " >&6
65786else
65787  case $CCACHE in
65788  [\\/]* | ?:[\\/]*)
65789  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65790  ;;
65791  *)
65792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65793for as_dir in $PATH
65794do
65795  IFS=$as_save_IFS
65796  test -z "$as_dir" && as_dir=.
65797    for ac_exec_ext in '' $ac_executable_extensions; do
65798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65799    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65801    break 2
65802  fi
65803done
65804  done
65805IFS=$as_save_IFS
65806
65807  ;;
65808esac
65809fi
65810CCACHE=$ac_cv_path_CCACHE
65811if test -n "$CCACHE"; then
65812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65813$as_echo "$CCACHE" >&6; }
65814else
65815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65816$as_echo "no" >&6; }
65817fi
65818
65819
65820  test -n "$CCACHE" && break
65821done
65822
65823    else
65824      # If it succeeded, then it was overridden by the user. We will use it
65825      # for the tool.
65826
65827      # First remove it from the list of overridden variables, so we can test
65828      # for unknown variables in the end.
65829      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65830
65831      # Check if we try to supply an empty value
65832      if test "x$CCACHE" = x; then
65833        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65834$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65836$as_echo_n "checking for CCACHE... " >&6; }
65837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65838$as_echo "disabled" >&6; }
65839      else
65840        # Check if the provided tool contains a complete path.
65841        tool_specified="$CCACHE"
65842        tool_basename="${tool_specified##*/}"
65843        if test "x$tool_basename" = "x$tool_specified"; then
65844          # A command without a complete path is provided, search $PATH.
65845          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65846$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65847          # Extract the first word of "$tool_basename", so it can be a program name with args.
65848set dummy $tool_basename; ac_word=$2
65849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65850$as_echo_n "checking for $ac_word... " >&6; }
65851if ${ac_cv_path_CCACHE+:} false; then :
65852  $as_echo_n "(cached) " >&6
65853else
65854  case $CCACHE in
65855  [\\/]* | ?:[\\/]*)
65856  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65857  ;;
65858  *)
65859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65860for as_dir in $PATH
65861do
65862  IFS=$as_save_IFS
65863  test -z "$as_dir" && as_dir=.
65864    for ac_exec_ext in '' $ac_executable_extensions; do
65865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65866    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65868    break 2
65869  fi
65870done
65871  done
65872IFS=$as_save_IFS
65873
65874  ;;
65875esac
65876fi
65877CCACHE=$ac_cv_path_CCACHE
65878if test -n "$CCACHE"; then
65879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65880$as_echo "$CCACHE" >&6; }
65881else
65882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65883$as_echo "no" >&6; }
65884fi
65885
65886
65887          if test "x$CCACHE" = x; then
65888            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65889          fi
65890        else
65891          # Otherwise we believe it is a complete path. Use it as it is.
65892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65893$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65894          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65895$as_echo_n "checking for CCACHE... " >&6; }
65896          if test ! -x "$tool_specified"; then
65897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65898$as_echo "not found" >&6; }
65899            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65900          fi
65901          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65902$as_echo "$tool_specified" >&6; }
65903        fi
65904      fi
65905    fi
65906
65907  fi
65908
65909
65910
65911  if test "x$CCACHE" = x; then
65912    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65913  fi
65914
65915
65916      PATH="$OLD_PATH"
65917      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65918      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65919    else
65920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65921$as_echo "no" >&6; }
65922      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65923$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65924    fi
65925  elif test "x$enable_ccache" = xno; then
65926    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65927$as_echo "no, explicitly disabled" >&6; }
65928    CCACHE_STATUS="Disabled"
65929  elif test "x$enable_ccache" = x; then
65930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65931$as_echo "no" >&6; }
65932  else
65933    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65934$as_echo "unknown" >&6; }
65935    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65936  fi
65937
65938
65939
65940# Check whether --with-ccache-dir was given.
65941if test "${with_ccache_dir+set}" = set; then :
65942  withval=$with_ccache_dir;
65943fi
65944
65945
65946  if test "x$with_ccache_dir" != x; then
65947    # When using a non home ccache directory, assume the use is to share ccache files
65948    # with other users. Thus change the umask.
65949    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65950    if test "x$CCACHE" = x; then
65951      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65952$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65953    fi
65954  fi
65955
65956  if test "x$CCACHE" != x; then
65957
65958  if test "x$CCACHE" != x; then
65959    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65960      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65961          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65962      if test "x$HAS_BAD_CCACHE" != "x"; then
65963        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65964      fi
65965      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65966$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65967      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65968      PUSHED_FLAGS="$CXXFLAGS"
65969      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65970      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65971/* end confdefs.h.  */
65972
65973int
65974main ()
65975{
65976
65977  ;
65978  return 0;
65979}
65980_ACEOF
65981if ac_fn_cxx_try_compile "$LINENO"; then :
65982  CC_KNOWS_CCACHE_TRICK=yes
65983else
65984  CC_KNOWS_CCACHE_TRICK=no
65985fi
65986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65987      CXXFLAGS="$PUSHED_FLAGS"
65988      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65990$as_echo "yes" >&6; }
65991        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65992
65993        CCACHE_SLOPPINESS=pch_defines,time_macros
65994      else
65995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65996$as_echo "no" >&6; }
65997        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65998      fi
65999    fi
66000
66001    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66002        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66003
66004    if test "x$SET_CCACHE_DIR" != x; then
66005      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66006      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66007    fi
66008  fi
66009
66010  fi
66011
66012
66013###############################################################################
66014#
66015# And now the finish...
66016#
66017###############################################################################
66018
66019# Check for some common pitfalls
66020
66021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66022    file_to_test="$SRC_ROOT/LICENSE"
66023    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66024      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
66025    fi
66026  fi
66027
66028
66029  # Did user specify any unknown variables?
66030
66031  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66032    # Replace the separating ! with spaces before presenting for end user.
66033    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66034    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66035$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66036  fi
66037
66038
66039  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66040$as_echo_n "checking if build directory is on local disk... " >&6; }
66041
66042  # df -l lists only local disks; if the given directory is not found then
66043  # a non-zero exit code is given
66044  if test "x$DF" = x; then
66045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66046      # msys does not have df; use Windows "net use" instead.
66047      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66048      if test "x$IS_NETWORK_DISK" = x; then
66049        OUTPUT_DIR_IS_LOCAL="yes"
66050      else
66051        OUTPUT_DIR_IS_LOCAL="no"
66052      fi
66053    else
66054      # No df here, say it's local
66055      OUTPUT_DIR_IS_LOCAL="yes"
66056    fi
66057  else
66058    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66059      OUTPUT_DIR_IS_LOCAL="yes"
66060    else
66061      OUTPUT_DIR_IS_LOCAL="no"
66062    fi
66063  fi
66064
66065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66066$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66067
66068
66069
66070  # Check if the user has any old-style ALT_ variables set.
66071  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66072
66073  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66074  # Since we can't properly handle the dependencies for this, warn the user about the situation
66075  if test -e $OUTPUT_ROOT/spec.gmk; then
66076    IS_RECONFIGURE=yes
66077  else
66078    IS_RECONFIGURE=no
66079  fi
66080
66081
66082# At the end, call the custom hook. (Dummy macro if no custom sources available)
66083
66084
66085# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66086
66087  # Keep feature lists sorted and free of duplicates
66088  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66089  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66090  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66091  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66092  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66093  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66094  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66095
66096  # Validate features
66097  for variant in $JVM_VARIANTS; do
66098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66099$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66100    features_var_name=JVM_FEATURES_$variant
66101    JVM_FEATURES_TO_TEST=${!features_var_name}
66102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66103$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66104    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66105    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66106    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66107    if test "x$INVALID_FEATURES" != x; then
66108      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66109    fi
66110  done
66111
66112
66113# We're messing a bit with internal autoconf variables to put the config.status
66114# in the output directory instead of the current directory.
66115CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66116
66117# Create the actual output files. Now the main work of configure is done.
66118cat >confcache <<\_ACEOF
66119# This file is a shell script that caches the results of configure
66120# tests run on this system so they can be shared between configure
66121# scripts and configure runs, see configure's option --config-cache.
66122# It is not useful on other systems.  If it contains results you don't
66123# want to keep, you may remove or edit it.
66124#
66125# config.status only pays attention to the cache file if you give it
66126# the --recheck option to rerun configure.
66127#
66128# `ac_cv_env_foo' variables (set or unset) will be overridden when
66129# loading this file, other *unset* `ac_cv_foo' will be assigned the
66130# following values.
66131
66132_ACEOF
66133
66134# The following way of writing the cache mishandles newlines in values,
66135# but we know of no workaround that is simple, portable, and efficient.
66136# So, we kill variables containing newlines.
66137# Ultrix sh set writes to stderr and can't be redirected directly,
66138# and sets the high bit in the cache file unless we assign to the vars.
66139(
66140  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66141    eval ac_val=\$$ac_var
66142    case $ac_val in #(
66143    *${as_nl}*)
66144      case $ac_var in #(
66145      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66146$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66147      esac
66148      case $ac_var in #(
66149      _ | IFS | as_nl) ;; #(
66150      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66151      *) { eval $ac_var=; unset $ac_var;} ;;
66152      esac ;;
66153    esac
66154  done
66155
66156  (set) 2>&1 |
66157    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66158    *${as_nl}ac_space=\ *)
66159      # `set' does not quote correctly, so add quotes: double-quote
66160      # substitution turns \\\\ into \\, and sed turns \\ into \.
66161      sed -n \
66162	"s/'/'\\\\''/g;
66163	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66164      ;; #(
66165    *)
66166      # `set' quotes correctly as required by POSIX, so do not add quotes.
66167      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66168      ;;
66169    esac |
66170    sort
66171) |
66172  sed '
66173     /^ac_cv_env_/b end
66174     t clear
66175     :clear
66176     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66177     t end
66178     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66179     :end' >>confcache
66180if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66181  if test -w "$cache_file"; then
66182    if test "x$cache_file" != "x/dev/null"; then
66183      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66184$as_echo "$as_me: updating cache $cache_file" >&6;}
66185      if test ! -f "$cache_file" || test -h "$cache_file"; then
66186	cat confcache >"$cache_file"
66187      else
66188        case $cache_file in #(
66189        */* | ?:*)
66190	  mv -f confcache "$cache_file"$$ &&
66191	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66192        *)
66193	  mv -f confcache "$cache_file" ;;
66194	esac
66195      fi
66196    fi
66197  else
66198    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66199$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66200  fi
66201fi
66202rm -f confcache
66203
66204test "x$prefix" = xNONE && prefix=$ac_default_prefix
66205# Let make expand exec_prefix.
66206test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66207
66208# Transform confdefs.h into DEFS.
66209# Protect against shell expansion while executing Makefile rules.
66210# Protect against Makefile macro expansion.
66211#
66212# If the first sed substitution is executed (which looks for macros that
66213# take arguments), then branch to the quote section.  Otherwise,
66214# look for a macro that doesn't take arguments.
66215ac_script='
66216:mline
66217/\\$/{
66218 N
66219 s,\\\n,,
66220 b mline
66221}
66222t clear
66223:clear
66224s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66225t quote
66226s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66227t quote
66228b any
66229:quote
66230s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66231s/\[/\\&/g
66232s/\]/\\&/g
66233s/\$/$$/g
66234H
66235:any
66236${
66237	g
66238	s/^\n//
66239	s/\n/ /g
66240	p
66241}
66242'
66243DEFS=`sed -n "$ac_script" confdefs.h`
66244
66245
66246ac_libobjs=
66247ac_ltlibobjs=
66248U=
66249for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66250  # 1. Remove the extension, and $U if already installed.
66251  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66252  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66253  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66254  #    will be set to the directory where LIBOBJS objects are built.
66255  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66256  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66257done
66258LIBOBJS=$ac_libobjs
66259
66260LTLIBOBJS=$ac_ltlibobjs
66261
66262
66263
66264: "${CONFIG_STATUS=./config.status}"
66265ac_write_fail=0
66266ac_clean_files_save=$ac_clean_files
66267ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66268{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66269$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66270as_write_fail=0
66271cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66272#! $SHELL
66273# Generated by $as_me.
66274# Run this file to recreate the current configuration.
66275# Compiler output produced by configure, useful for debugging
66276# configure, is in config.log if it exists.
66277
66278debug=false
66279ac_cs_recheck=false
66280ac_cs_silent=false
66281
66282SHELL=\${CONFIG_SHELL-$SHELL}
66283export SHELL
66284_ASEOF
66285cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66286## -------------------- ##
66287## M4sh Initialization. ##
66288## -------------------- ##
66289
66290# Be more Bourne compatible
66291DUALCASE=1; export DUALCASE # for MKS sh
66292if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66293  emulate sh
66294  NULLCMD=:
66295  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66296  # is contrary to our usage.  Disable this feature.
66297  alias -g '${1+"$@"}'='"$@"'
66298  setopt NO_GLOB_SUBST
66299else
66300  case `(set -o) 2>/dev/null` in #(
66301  *posix*) :
66302    set -o posix ;; #(
66303  *) :
66304     ;;
66305esac
66306fi
66307
66308
66309as_nl='
66310'
66311export as_nl
66312# Printing a long string crashes Solaris 7 /usr/bin/printf.
66313as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66314as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66315as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66316# Prefer a ksh shell builtin over an external printf program on Solaris,
66317# but without wasting forks for bash or zsh.
66318if test -z "$BASH_VERSION$ZSH_VERSION" \
66319    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66320  as_echo='print -r --'
66321  as_echo_n='print -rn --'
66322elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66323  as_echo='printf %s\n'
66324  as_echo_n='printf %s'
66325else
66326  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66327    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66328    as_echo_n='/usr/ucb/echo -n'
66329  else
66330    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66331    as_echo_n_body='eval
66332      arg=$1;
66333      case $arg in #(
66334      *"$as_nl"*)
66335	expr "X$arg" : "X\\(.*\\)$as_nl";
66336	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66337      esac;
66338      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66339    '
66340    export as_echo_n_body
66341    as_echo_n='sh -c $as_echo_n_body as_echo'
66342  fi
66343  export as_echo_body
66344  as_echo='sh -c $as_echo_body as_echo'
66345fi
66346
66347# The user is always right.
66348if test "${PATH_SEPARATOR+set}" != set; then
66349  PATH_SEPARATOR=:
66350  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66351    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66352      PATH_SEPARATOR=';'
66353  }
66354fi
66355
66356
66357# IFS
66358# We need space, tab and new line, in precisely that order.  Quoting is
66359# there to prevent editors from complaining about space-tab.
66360# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66361# splitting by setting IFS to empty value.)
66362IFS=" ""	$as_nl"
66363
66364# Find who we are.  Look in the path if we contain no directory separator.
66365as_myself=
66366case $0 in #((
66367  *[\\/]* ) as_myself=$0 ;;
66368  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66369for as_dir in $PATH
66370do
66371  IFS=$as_save_IFS
66372  test -z "$as_dir" && as_dir=.
66373    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66374  done
66375IFS=$as_save_IFS
66376
66377     ;;
66378esac
66379# We did not find ourselves, most probably we were run as `sh COMMAND'
66380# in which case we are not to be found in the path.
66381if test "x$as_myself" = x; then
66382  as_myself=$0
66383fi
66384if test ! -f "$as_myself"; then
66385  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66386  exit 1
66387fi
66388
66389# Unset variables that we do not need and which cause bugs (e.g. in
66390# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66391# suppresses any "Segmentation fault" message there.  '((' could
66392# trigger a bug in pdksh 5.2.14.
66393for as_var in BASH_ENV ENV MAIL MAILPATH
66394do eval test x\${$as_var+set} = xset \
66395  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66396done
66397PS1='$ '
66398PS2='> '
66399PS4='+ '
66400
66401# NLS nuisances.
66402LC_ALL=C
66403export LC_ALL
66404LANGUAGE=C
66405export LANGUAGE
66406
66407# CDPATH.
66408(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66409
66410
66411# as_fn_error STATUS ERROR [LINENO LOG_FD]
66412# ----------------------------------------
66413# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66414# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66415# script with STATUS, using 1 if that was 0.
66416as_fn_error ()
66417{
66418  as_status=$1; test $as_status -eq 0 && as_status=1
66419  if test "$4"; then
66420    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66421    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66422  fi
66423  $as_echo "$as_me: error: $2" >&2
66424  as_fn_exit $as_status
66425} # as_fn_error
66426
66427
66428# as_fn_set_status STATUS
66429# -----------------------
66430# Set $? to STATUS, without forking.
66431as_fn_set_status ()
66432{
66433  return $1
66434} # as_fn_set_status
66435
66436# as_fn_exit STATUS
66437# -----------------
66438# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66439as_fn_exit ()
66440{
66441  set +e
66442  as_fn_set_status $1
66443  exit $1
66444} # as_fn_exit
66445
66446# as_fn_unset VAR
66447# ---------------
66448# Portably unset VAR.
66449as_fn_unset ()
66450{
66451  { eval $1=; unset $1;}
66452}
66453as_unset=as_fn_unset
66454# as_fn_append VAR VALUE
66455# ----------------------
66456# Append the text in VALUE to the end of the definition contained in VAR. Take
66457# advantage of any shell optimizations that allow amortized linear growth over
66458# repeated appends, instead of the typical quadratic growth present in naive
66459# implementations.
66460if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66461  eval 'as_fn_append ()
66462  {
66463    eval $1+=\$2
66464  }'
66465else
66466  as_fn_append ()
66467  {
66468    eval $1=\$$1\$2
66469  }
66470fi # as_fn_append
66471
66472# as_fn_arith ARG...
66473# ------------------
66474# Perform arithmetic evaluation on the ARGs, and store the result in the
66475# global $as_val. Take advantage of shells that can avoid forks. The arguments
66476# must be portable across $(()) and expr.
66477if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66478  eval 'as_fn_arith ()
66479  {
66480    as_val=$(( $* ))
66481  }'
66482else
66483  as_fn_arith ()
66484  {
66485    as_val=`expr "$@" || test $? -eq 1`
66486  }
66487fi # as_fn_arith
66488
66489
66490if expr a : '\(a\)' >/dev/null 2>&1 &&
66491   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66492  as_expr=expr
66493else
66494  as_expr=false
66495fi
66496
66497if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66498  as_basename=basename
66499else
66500  as_basename=false
66501fi
66502
66503if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66504  as_dirname=dirname
66505else
66506  as_dirname=false
66507fi
66508
66509as_me=`$as_basename -- "$0" ||
66510$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66511	 X"$0" : 'X\(//\)$' \| \
66512	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66513$as_echo X/"$0" |
66514    sed '/^.*\/\([^/][^/]*\)\/*$/{
66515	    s//\1/
66516	    q
66517	  }
66518	  /^X\/\(\/\/\)$/{
66519	    s//\1/
66520	    q
66521	  }
66522	  /^X\/\(\/\).*/{
66523	    s//\1/
66524	    q
66525	  }
66526	  s/.*/./; q'`
66527
66528# Avoid depending upon Character Ranges.
66529as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66530as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66531as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66532as_cr_digits='0123456789'
66533as_cr_alnum=$as_cr_Letters$as_cr_digits
66534
66535ECHO_C= ECHO_N= ECHO_T=
66536case `echo -n x` in #(((((
66537-n*)
66538  case `echo 'xy\c'` in
66539  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66540  xy)  ECHO_C='\c';;
66541  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66542       ECHO_T='	';;
66543  esac;;
66544*)
66545  ECHO_N='-n';;
66546esac
66547
66548rm -f conf$$ conf$$.exe conf$$.file
66549if test -d conf$$.dir; then
66550  rm -f conf$$.dir/conf$$.file
66551else
66552  rm -f conf$$.dir
66553  mkdir conf$$.dir 2>/dev/null
66554fi
66555if (echo >conf$$.file) 2>/dev/null; then
66556  if ln -s conf$$.file conf$$ 2>/dev/null; then
66557    as_ln_s='ln -s'
66558    # ... but there are two gotchas:
66559    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66560    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66561    # In both cases, we have to default to `cp -pR'.
66562    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66563      as_ln_s='cp -pR'
66564  elif ln conf$$.file conf$$ 2>/dev/null; then
66565    as_ln_s=ln
66566  else
66567    as_ln_s='cp -pR'
66568  fi
66569else
66570  as_ln_s='cp -pR'
66571fi
66572rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66573rmdir conf$$.dir 2>/dev/null
66574
66575
66576# as_fn_mkdir_p
66577# -------------
66578# Create "$as_dir" as a directory, including parents if necessary.
66579as_fn_mkdir_p ()
66580{
66581
66582  case $as_dir in #(
66583  -*) as_dir=./$as_dir;;
66584  esac
66585  test -d "$as_dir" || eval $as_mkdir_p || {
66586    as_dirs=
66587    while :; do
66588      case $as_dir in #(
66589      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66590      *) as_qdir=$as_dir;;
66591      esac
66592      as_dirs="'$as_qdir' $as_dirs"
66593      as_dir=`$as_dirname -- "$as_dir" ||
66594$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66595	 X"$as_dir" : 'X\(//\)[^/]' \| \
66596	 X"$as_dir" : 'X\(//\)$' \| \
66597	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66598$as_echo X"$as_dir" |
66599    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66600	    s//\1/
66601	    q
66602	  }
66603	  /^X\(\/\/\)[^/].*/{
66604	    s//\1/
66605	    q
66606	  }
66607	  /^X\(\/\/\)$/{
66608	    s//\1/
66609	    q
66610	  }
66611	  /^X\(\/\).*/{
66612	    s//\1/
66613	    q
66614	  }
66615	  s/.*/./; q'`
66616      test -d "$as_dir" && break
66617    done
66618    test -z "$as_dirs" || eval "mkdir $as_dirs"
66619  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66620
66621
66622} # as_fn_mkdir_p
66623if mkdir -p . 2>/dev/null; then
66624  as_mkdir_p='mkdir -p "$as_dir"'
66625else
66626  test -d ./-p && rmdir ./-p
66627  as_mkdir_p=false
66628fi
66629
66630
66631# as_fn_executable_p FILE
66632# -----------------------
66633# Test if FILE is an executable regular file.
66634as_fn_executable_p ()
66635{
66636  test -f "$1" && test -x "$1"
66637} # as_fn_executable_p
66638as_test_x='test -x'
66639as_executable_p=as_fn_executable_p
66640
66641# Sed expression to map a string onto a valid CPP name.
66642as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66643
66644# Sed expression to map a string onto a valid variable name.
66645as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66646
66647
66648exec 6>&1
66649## ----------------------------------- ##
66650## Main body of $CONFIG_STATUS script. ##
66651## ----------------------------------- ##
66652_ASEOF
66653test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66654
66655cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66656# Save the log message, to keep $0 and so on meaningful, and to
66657# report actual input values of CONFIG_FILES etc. instead of their
66658# values after options handling.
66659ac_log="
66660This file was extended by OpenJDK $as_me jdk9, which was
66661generated by GNU Autoconf 2.69.  Invocation command line was
66662
66663  CONFIG_FILES    = $CONFIG_FILES
66664  CONFIG_HEADERS  = $CONFIG_HEADERS
66665  CONFIG_LINKS    = $CONFIG_LINKS
66666  CONFIG_COMMANDS = $CONFIG_COMMANDS
66667  $ $0 $@
66668
66669on `(hostname || uname -n) 2>/dev/null | sed 1q`
66670"
66671
66672_ACEOF
66673
66674case $ac_config_files in *"
66675"*) set x $ac_config_files; shift; ac_config_files=$*;;
66676esac
66677
66678
66679
66680cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66681# Files that config.status was made for.
66682config_files="$ac_config_files"
66683
66684_ACEOF
66685
66686cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66687ac_cs_usage="\
66688\`$as_me' instantiates files and other configuration actions
66689from templates according to the current configuration.  Unless the files
66690and actions are specified as TAGs, all are instantiated by default.
66691
66692Usage: $0 [OPTION]... [TAG]...
66693
66694  -h, --help       print this help, then exit
66695  -V, --version    print version number and configuration settings, then exit
66696      --config     print configuration, then exit
66697  -q, --quiet, --silent
66698                   do not print progress messages
66699  -d, --debug      don't remove temporary files
66700      --recheck    update $as_me by reconfiguring in the same conditions
66701      --file=FILE[:TEMPLATE]
66702                   instantiate the configuration file FILE
66703
66704Configuration files:
66705$config_files
66706
66707Report bugs to <build-dev@openjdk.java.net>.
66708OpenJDK home page: <http://openjdk.java.net>."
66709
66710_ACEOF
66711cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66712ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66713ac_cs_version="\\
66714OpenJDK config.status jdk9
66715configured by $0, generated by GNU Autoconf 2.69,
66716  with options \\"\$ac_cs_config\\"
66717
66718Copyright (C) 2012 Free Software Foundation, Inc.
66719This config.status script is free software; the Free Software Foundation
66720gives unlimited permission to copy, distribute and modify it."
66721
66722ac_pwd='$ac_pwd'
66723srcdir='$srcdir'
66724AWK='$AWK'
66725test -n "\$AWK" || AWK=awk
66726_ACEOF
66727
66728cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66729# The default lists apply if the user does not specify any file.
66730ac_need_defaults=:
66731while test $# != 0
66732do
66733  case $1 in
66734  --*=?*)
66735    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66736    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66737    ac_shift=:
66738    ;;
66739  --*=)
66740    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66741    ac_optarg=
66742    ac_shift=:
66743    ;;
66744  *)
66745    ac_option=$1
66746    ac_optarg=$2
66747    ac_shift=shift
66748    ;;
66749  esac
66750
66751  case $ac_option in
66752  # Handling of the options.
66753  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66754    ac_cs_recheck=: ;;
66755  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66756    $as_echo "$ac_cs_version"; exit ;;
66757  --config | --confi | --conf | --con | --co | --c )
66758    $as_echo "$ac_cs_config"; exit ;;
66759  --debug | --debu | --deb | --de | --d | -d )
66760    debug=: ;;
66761  --file | --fil | --fi | --f )
66762    $ac_shift
66763    case $ac_optarg in
66764    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66765    '') as_fn_error $? "missing file argument" ;;
66766    esac
66767    as_fn_append CONFIG_FILES " '$ac_optarg'"
66768    ac_need_defaults=false;;
66769  --he | --h |  --help | --hel | -h )
66770    $as_echo "$ac_cs_usage"; exit ;;
66771  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66772  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66773    ac_cs_silent=: ;;
66774
66775  # This is an error.
66776  -*) as_fn_error $? "unrecognized option: \`$1'
66777Try \`$0 --help' for more information." ;;
66778
66779  *) as_fn_append ac_config_targets " $1"
66780     ac_need_defaults=false ;;
66781
66782  esac
66783  shift
66784done
66785
66786ac_configure_extra_args=
66787
66788if $ac_cs_silent; then
66789  exec 6>/dev/null
66790  ac_configure_extra_args="$ac_configure_extra_args --silent"
66791fi
66792
66793_ACEOF
66794cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66795if \$ac_cs_recheck; then
66796  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66797  shift
66798  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66799  CONFIG_SHELL='$SHELL'
66800  export CONFIG_SHELL
66801  exec "\$@"
66802fi
66803
66804_ACEOF
66805cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66806exec 5>>config.log
66807{
66808  echo
66809  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66810## Running $as_me. ##
66811_ASBOX
66812  $as_echo "$ac_log"
66813} >&5
66814
66815_ACEOF
66816cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66817_ACEOF
66818
66819cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66820
66821# Handling of arguments.
66822for ac_config_target in $ac_config_targets
66823do
66824  case $ac_config_target in
66825    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66826    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66827    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66828    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66829    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66830
66831  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66832  esac
66833done
66834
66835
66836# If the user did not use the arguments to specify the items to instantiate,
66837# then the envvar interface is used.  Set only those that are not.
66838# We use the long form for the default assignment because of an extremely
66839# bizarre bug on SunOS 4.1.3.
66840if $ac_need_defaults; then
66841  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66842fi
66843
66844# Have a temporary directory for convenience.  Make it in the build tree
66845# simply because there is no reason against having it here, and in addition,
66846# creating and moving files from /tmp can sometimes cause problems.
66847# Hook for its removal unless debugging.
66848# Note that there is a small window in which the directory will not be cleaned:
66849# after its creation but before its name has been assigned to `$tmp'.
66850$debug ||
66851{
66852  tmp= ac_tmp=
66853  trap 'exit_status=$?
66854  : "${ac_tmp:=$tmp}"
66855  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66856' 0
66857  trap 'as_fn_exit 1' 1 2 13 15
66858}
66859# Create a (secure) tmp directory for tmp files.
66860
66861{
66862  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66863  test -d "$tmp"
66864}  ||
66865{
66866  tmp=./conf$$-$RANDOM
66867  (umask 077 && mkdir "$tmp")
66868} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66869ac_tmp=$tmp
66870
66871# Set up the scripts for CONFIG_FILES section.
66872# No need to generate them if there are no CONFIG_FILES.
66873# This happens for instance with `./config.status config.h'.
66874if test -n "$CONFIG_FILES"; then
66875
66876
66877ac_cr=`echo X | tr X '\015'`
66878# On cygwin, bash can eat \r inside `` if the user requested igncr.
66879# But we know of no other shell where ac_cr would be empty at this
66880# point, so we can use a bashism as a fallback.
66881if test "x$ac_cr" = x; then
66882  eval ac_cr=\$\'\\r\'
66883fi
66884ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66885if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66886  ac_cs_awk_cr='\\r'
66887else
66888  ac_cs_awk_cr=$ac_cr
66889fi
66890
66891echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66892_ACEOF
66893
66894
66895{
66896  echo "cat >conf$$subs.awk <<_ACEOF" &&
66897  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66898  echo "_ACEOF"
66899} >conf$$subs.sh ||
66900  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66901ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66902ac_delim='%!_!# '
66903for ac_last_try in false false false false false :; do
66904  . ./conf$$subs.sh ||
66905    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66906
66907  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66908  if test $ac_delim_n = $ac_delim_num; then
66909    break
66910  elif $ac_last_try; then
66911    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66912  else
66913    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66914  fi
66915done
66916rm -f conf$$subs.sh
66917
66918cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66919cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66920_ACEOF
66921sed -n '
66922h
66923s/^/S["/; s/!.*/"]=/
66924p
66925g
66926s/^[^!]*!//
66927:repl
66928t repl
66929s/'"$ac_delim"'$//
66930t delim
66931:nl
66932h
66933s/\(.\{148\}\)..*/\1/
66934t more1
66935s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66936p
66937n
66938b repl
66939:more1
66940s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66941p
66942g
66943s/.\{148\}//
66944t nl
66945:delim
66946h
66947s/\(.\{148\}\)..*/\1/
66948t more2
66949s/["\\]/\\&/g; s/^/"/; s/$/"/
66950p
66951b
66952:more2
66953s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66954p
66955g
66956s/.\{148\}//
66957t delim
66958' <conf$$subs.awk | sed '
66959/^[^""]/{
66960  N
66961  s/\n//
66962}
66963' >>$CONFIG_STATUS || ac_write_fail=1
66964rm -f conf$$subs.awk
66965cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66966_ACAWK
66967cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66968  for (key in S) S_is_set[key] = 1
66969  FS = ""
66970
66971}
66972{
66973  line = $ 0
66974  nfields = split(line, field, "@")
66975  substed = 0
66976  len = length(field[1])
66977  for (i = 2; i < nfields; i++) {
66978    key = field[i]
66979    keylen = length(key)
66980    if (S_is_set[key]) {
66981      value = S[key]
66982      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66983      len += length(value) + length(field[++i])
66984      substed = 1
66985    } else
66986      len += 1 + keylen
66987  }
66988
66989  print line
66990}
66991
66992_ACAWK
66993_ACEOF
66994cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66995if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66996  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66997else
66998  cat
66999fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67000  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67001_ACEOF
67002
67003# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67004# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67005# trailing colons and then remove the whole line if VPATH becomes empty
67006# (actually we leave an empty line to preserve line numbers).
67007if test "x$srcdir" = x.; then
67008  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67009h
67010s///
67011s/^/:/
67012s/[	 ]*$/:/
67013s/:\$(srcdir):/:/g
67014s/:\${srcdir}:/:/g
67015s/:@srcdir@:/:/g
67016s/^:*//
67017s/:*$//
67018x
67019s/\(=[	 ]*\).*/\1/
67020G
67021s/\n//
67022s/^[^=]*=[	 ]*$//
67023}'
67024fi
67025
67026cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67027fi # test -n "$CONFIG_FILES"
67028
67029
67030eval set X "  :F $CONFIG_FILES      "
67031shift
67032for ac_tag
67033do
67034  case $ac_tag in
67035  :[FHLC]) ac_mode=$ac_tag; continue;;
67036  esac
67037  case $ac_mode$ac_tag in
67038  :[FHL]*:*);;
67039  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67040  :[FH]-) ac_tag=-:-;;
67041  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67042  esac
67043  ac_save_IFS=$IFS
67044  IFS=:
67045  set x $ac_tag
67046  IFS=$ac_save_IFS
67047  shift
67048  ac_file=$1
67049  shift
67050
67051  case $ac_mode in
67052  :L) ac_source=$1;;
67053  :[FH])
67054    ac_file_inputs=
67055    for ac_f
67056    do
67057      case $ac_f in
67058      -) ac_f="$ac_tmp/stdin";;
67059      *) # Look for the file first in the build tree, then in the source tree
67060	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67061	 # because $ac_f cannot contain `:'.
67062	 test -f "$ac_f" ||
67063	   case $ac_f in
67064	   [\\/$]*) false;;
67065	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67066	   esac ||
67067	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67068      esac
67069      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67070      as_fn_append ac_file_inputs " '$ac_f'"
67071    done
67072
67073    # Let's still pretend it is `configure' which instantiates (i.e., don't
67074    # use $as_me), people would be surprised to read:
67075    #    /* config.h.  Generated by config.status.  */
67076    configure_input='Generated from '`
67077	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67078	`' by configure.'
67079    if test x"$ac_file" != x-; then
67080      configure_input="$ac_file.  $configure_input"
67081      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67082$as_echo "$as_me: creating $ac_file" >&6;}
67083    fi
67084    # Neutralize special characters interpreted by sed in replacement strings.
67085    case $configure_input in #(
67086    *\&* | *\|* | *\\* )
67087       ac_sed_conf_input=`$as_echo "$configure_input" |
67088       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67089    *) ac_sed_conf_input=$configure_input;;
67090    esac
67091
67092    case $ac_tag in
67093    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67094      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67095    esac
67096    ;;
67097  esac
67098
67099  ac_dir=`$as_dirname -- "$ac_file" ||
67100$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67101	 X"$ac_file" : 'X\(//\)[^/]' \| \
67102	 X"$ac_file" : 'X\(//\)$' \| \
67103	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67104$as_echo X"$ac_file" |
67105    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67106	    s//\1/
67107	    q
67108	  }
67109	  /^X\(\/\/\)[^/].*/{
67110	    s//\1/
67111	    q
67112	  }
67113	  /^X\(\/\/\)$/{
67114	    s//\1/
67115	    q
67116	  }
67117	  /^X\(\/\).*/{
67118	    s//\1/
67119	    q
67120	  }
67121	  s/.*/./; q'`
67122  as_dir="$ac_dir"; as_fn_mkdir_p
67123  ac_builddir=.
67124
67125case "$ac_dir" in
67126.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67127*)
67128  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67129  # A ".." for each directory in $ac_dir_suffix.
67130  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67131  case $ac_top_builddir_sub in
67132  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67133  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67134  esac ;;
67135esac
67136ac_abs_top_builddir=$ac_pwd
67137ac_abs_builddir=$ac_pwd$ac_dir_suffix
67138# for backward compatibility:
67139ac_top_builddir=$ac_top_build_prefix
67140
67141case $srcdir in
67142  .)  # We are building in place.
67143    ac_srcdir=.
67144    ac_top_srcdir=$ac_top_builddir_sub
67145    ac_abs_top_srcdir=$ac_pwd ;;
67146  [\\/]* | ?:[\\/]* )  # Absolute name.
67147    ac_srcdir=$srcdir$ac_dir_suffix;
67148    ac_top_srcdir=$srcdir
67149    ac_abs_top_srcdir=$srcdir ;;
67150  *) # Relative name.
67151    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67152    ac_top_srcdir=$ac_top_build_prefix$srcdir
67153    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67154esac
67155ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67156
67157
67158  case $ac_mode in
67159  :F)
67160  #
67161  # CONFIG_FILE
67162  #
67163
67164_ACEOF
67165
67166cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67167# If the template does not know about datarootdir, expand it.
67168# FIXME: This hack should be removed a few years after 2.60.
67169ac_datarootdir_hack=; ac_datarootdir_seen=
67170ac_sed_dataroot='
67171/datarootdir/ {
67172  p
67173  q
67174}
67175/@datadir@/p
67176/@docdir@/p
67177/@infodir@/p
67178/@localedir@/p
67179/@mandir@/p'
67180case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67181*datarootdir*) ac_datarootdir_seen=yes;;
67182*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67183  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67184$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67185_ACEOF
67186cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67187  ac_datarootdir_hack='
67188  s&@datadir@&$datadir&g
67189  s&@docdir@&$docdir&g
67190  s&@infodir@&$infodir&g
67191  s&@localedir@&$localedir&g
67192  s&@mandir@&$mandir&g
67193  s&\\\${datarootdir}&$datarootdir&g' ;;
67194esac
67195_ACEOF
67196
67197# Neutralize VPATH when `$srcdir' = `.'.
67198# Shell code in configure.ac might set extrasub.
67199# FIXME: do we really want to maintain this feature?
67200cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67201ac_sed_extra="$ac_vpsub
67202$extrasub
67203_ACEOF
67204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67205:t
67206/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67207s|@configure_input@|$ac_sed_conf_input|;t t
67208s&@top_builddir@&$ac_top_builddir_sub&;t t
67209s&@top_build_prefix@&$ac_top_build_prefix&;t t
67210s&@srcdir@&$ac_srcdir&;t t
67211s&@abs_srcdir@&$ac_abs_srcdir&;t t
67212s&@top_srcdir@&$ac_top_srcdir&;t t
67213s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67214s&@builddir@&$ac_builddir&;t t
67215s&@abs_builddir@&$ac_abs_builddir&;t t
67216s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67217$ac_datarootdir_hack
67218"
67219eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67220  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67221
67222test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67223  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67224  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67225      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67226  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67227which seems to be undefined.  Please make sure it is defined" >&5
67228$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67229which seems to be undefined.  Please make sure it is defined" >&2;}
67230
67231  rm -f "$ac_tmp/stdin"
67232  case $ac_file in
67233  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67234  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67235  esac \
67236  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67237 ;;
67238
67239
67240
67241  esac
67242
67243done # for ac_tag
67244
67245
67246as_fn_exit 0
67247_ACEOF
67248ac_clean_files=$ac_clean_files_save
67249
67250test $ac_write_fail = 0 ||
67251  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67252
67253
67254# configure is writing to config.log, and then calls config.status.
67255# config.status does its own redirection, appending to config.log.
67256# Unfortunately, on DOS this fails, as config.log is still kept open
67257# by configure, so config.status won't be able to write to it; its
67258# output is simply discarded.  So we exec the FD to /dev/null,
67259# effectively closing config.log, so it can be properly (re)opened and
67260# appended to by config.status.  When coming back to configure, we
67261# need to make the FD available again.
67262if test "$no_create" != yes; then
67263  ac_cs_success=:
67264  ac_config_status_args=
67265  test "$silent" = yes &&
67266    ac_config_status_args="$ac_config_status_args --quiet"
67267  exec 5>/dev/null
67268  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67269  exec 5>>config.log
67270  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67271  # would make configure fail if this is the last instruction.
67272  $ac_cs_success || as_fn_exit 1
67273fi
67274if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67275  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67276$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67277fi
67278
67279
67280# After AC_OUTPUT, we need to do final work
67281
67282
67283  # Try to move config.log (generated by autoconf) to the configure-support directory.
67284  if test -e ./config.log; then
67285    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67286  fi
67287
67288  # Rotate our log file (configure.log)
67289  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67290    $RM -f "$OUTPUT_ROOT/configure.log.old"
67291  fi
67292  if test -e "$OUTPUT_ROOT/configure.log"; then
67293    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67294  fi
67295
67296  # Move configure.log from current directory to the build output root
67297  if test -e ./configure.log; then
67298    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67299  fi
67300
67301  # Make the compare script executable
67302  $CHMOD +x $OUTPUT_ROOT/compare.sh
67303
67304
67305# Finally output some useful information to the user
67306
67307  # Finally output some useful information to the user
67308
67309  printf "\n"
67310  printf "====================================================\n"
67311  if test "x$no_create" != "xyes"; then
67312    if test "x$IS_RECONFIGURE" != "xyes"; then
67313      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67314    else
67315      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67316    fi
67317  else
67318    if test "x$IS_RECONFIGURE" != "xyes"; then
67319      printf "A configuration has been successfully checked but not created\n"
67320    else
67321      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67322    fi
67323  fi
67324  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67325    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67326  else
67327    printf "using default settings.\n"
67328  fi
67329
67330  printf "\n"
67331  printf "Configuration summary:\n"
67332  printf "* Debug level:    $DEBUG_LEVEL\n"
67333  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67334  printf "* JDK variant:    $JDK_VARIANT\n"
67335  printf "* JVM variants:   $JVM_VARIANTS\n"
67336  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67337  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67338
67339  printf "\n"
67340  printf "Tools summary:\n"
67341  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67342    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67343  fi
67344  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67345  if test "x$TOOLCHAIN_VERSION" != "x"; then
67346    print_version=" $TOOLCHAIN_VERSION"
67347  fi
67348  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67349  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67350  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67351
67352  printf "\n"
67353  printf "Build performance summary:\n"
67354  printf "* Cores to use:   $JOBS\n"
67355  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67356  if test "x$CCACHE_STATUS" != "x"; then
67357    printf "* ccache status:  $CCACHE_STATUS\n"
67358  fi
67359  printf "\n"
67360
67361  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67362    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67363    printf "will result in longer build times.\n"
67364    printf "\n"
67365  fi
67366
67367  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67368    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67369    printf "These are not respected, and will be ignored. It is recommended\n"
67370    printf "that you clean your environment. The following variables are set:\n"
67371    printf "$FOUND_ALT_VARIABLES\n"
67372    printf "\n"
67373  fi
67374
67375  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67376    printf "WARNING: Your build output directory is not on a local disk.\n"
67377    printf "This will severely degrade build performance!\n"
67378    printf "It is recommended that you create an output directory on a local disk,\n"
67379    printf "and run the configure script again from that directory.\n"
67380    printf "\n"
67381  fi
67382
67383  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67384    printf "WARNING: The result of this configuration has overridden an older\n"
67385    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67386    printf "proper build. Failure to do so might result in strange build problems.\n"
67387    printf "\n"
67388  fi
67389
67390  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67391    printf "WARNING: The result of this configuration was not saved.\n"
67392    printf "You should run without '--no-create | -n' to create the configuration.\n"
67393    printf "\n"
67394  fi
67395
67396
67397
67398  # Locate config.log.
67399  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67400    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67401  elif test -e "./config.log"; then
67402    CONFIG_LOG_PATH="."
67403  fi
67404
67405  if test -e "$CONFIG_LOG_PATH/config.log"; then
67406    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67407    if test $? -eq 0; then
67408      printf "The following warnings were produced. Repeated here for convenience:\n"
67409      # We must quote sed expression (using []) to stop m4 from eating the [].
67410      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67411      printf "\n"
67412    fi
67413  fi
67414
67415