generated-configure.sh revision 504:78bb27faf889
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.63 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
8# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## --------------------- ##
12## M4sh Initialization.  ##
13## --------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18  emulate sh
19  NULLCMD=:
20  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21  # is contrary to our usage.  Disable this feature.
22  alias -g '${1+"$@"}'='"$@"'
23  setopt NO_GLOB_SUBST
24else
25  case `(set -o) 2>/dev/null` in
26  *posix*) set -o posix ;;
27esac
28
29fi
30
31
32
33
34# PATH needs CR
35# Avoid depending upon Character Ranges.
36as_cr_letters='abcdefghijklmnopqrstuvwxyz'
37as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
38as_cr_Letters=$as_cr_letters$as_cr_LETTERS
39as_cr_digits='0123456789'
40as_cr_alnum=$as_cr_Letters$as_cr_digits
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83# Support unset when possible.
84if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
85  as_unset=unset
86else
87  as_unset=false
88fi
89
90
91# IFS
92# We need space, tab and new line, in precisely that order.  Quoting is
93# there to prevent editors from complaining about space-tab.
94# (If _AS_PATH_WALK were called with IFS unset, it would disable word
95# splitting by setting IFS to empty value.)
96IFS=" ""	$as_nl"
97
98# Find who we are.  Look in the path if we contain no directory separator.
99case $0 in
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  { (exit 1); exit 1; }
120fi
121
122# Work around bugs in pre-3.0 UWIN ksh.
123for as_var in ENV MAIL MAILPATH
124do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
135
136# Required to use basename.
137if expr a : '\(a\)' >/dev/null 2>&1 &&
138   test "X`expr 00001 : '.*\(...\)'`" = X001; then
139  as_expr=expr
140else
141  as_expr=false
142fi
143
144if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
145  as_basename=basename
146else
147  as_basename=false
148fi
149
150
151# Name of the executable.
152as_me=`$as_basename -- "$0" ||
153$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
154	 X"$0" : 'X\(//\)$' \| \
155	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
156$as_echo X/"$0" |
157    sed '/^.*\/\([^/][^/]*\)\/*$/{
158	    s//\1/
159	    q
160	  }
161	  /^X\/\(\/\/\)$/{
162	    s//\1/
163	    q
164	  }
165	  /^X\/\(\/\).*/{
166	    s//\1/
167	    q
168	  }
169	  s/.*/./; q'`
170
171# CDPATH.
172$as_unset CDPATH
173
174
175if test "x$CONFIG_SHELL" = x; then
176  if (eval ":") 2>/dev/null; then
177  as_have_required=yes
178else
179  as_have_required=no
180fi
181
182  if test $as_have_required = yes &&	 (eval ":
183(as_func_return () {
184  (exit \$1)
185}
186as_func_success () {
187  as_func_return 0
188}
189as_func_failure () {
190  as_func_return 1
191}
192as_func_ret_success () {
193  return 0
194}
195as_func_ret_failure () {
196  return 1
197}
198
199exitcode=0
200if as_func_success; then
201  :
202else
203  exitcode=1
204  echo as_func_success failed.
205fi
206
207if as_func_failure; then
208  exitcode=1
209  echo as_func_failure succeeded.
210fi
211
212if as_func_ret_success; then
213  :
214else
215  exitcode=1
216  echo as_func_ret_success failed.
217fi
218
219if as_func_ret_failure; then
220  exitcode=1
221  echo as_func_ret_failure succeeded.
222fi
223
224if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
225  :
226else
227  exitcode=1
228  echo positional parameters were not saved.
229fi
230
231test \$exitcode = 0) || { (exit 1); exit 1; }
232
233(
234  as_lineno_1=\$LINENO
235  as_lineno_2=\$LINENO
236  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
237  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
238") 2> /dev/null; then
239  :
240else
241  as_candidate_shells=
242    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
243for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
244do
245  IFS=$as_save_IFS
246  test -z "$as_dir" && as_dir=.
247  case $as_dir in
248	 /*)
249	   for as_base in sh bash ksh sh5; do
250	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
251	   done;;
252       esac
253done
254IFS=$as_save_IFS
255
256
257      for as_shell in $as_candidate_shells $SHELL; do
258	 # Try only shells that exist, to save several forks.
259	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
260		{ ("$as_shell") 2> /dev/null <<\_ASEOF
261if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262  emulate sh
263  NULLCMD=:
264  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
265  # is contrary to our usage.  Disable this feature.
266  alias -g '${1+"$@"}'='"$@"'
267  setopt NO_GLOB_SUBST
268else
269  case `(set -o) 2>/dev/null` in
270  *posix*) set -o posix ;;
271esac
272
273fi
274
275
276:
277_ASEOF
278}; then
279  CONFIG_SHELL=$as_shell
280	       as_have_required=yes
281	       if { "$as_shell" 2> /dev/null <<\_ASEOF
282if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
283  emulate sh
284  NULLCMD=:
285  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
286  # is contrary to our usage.  Disable this feature.
287  alias -g '${1+"$@"}'='"$@"'
288  setopt NO_GLOB_SUBST
289else
290  case `(set -o) 2>/dev/null` in
291  *posix*) set -o posix ;;
292esac
293
294fi
295
296
297:
298(as_func_return () {
299  (exit $1)
300}
301as_func_success () {
302  as_func_return 0
303}
304as_func_failure () {
305  as_func_return 1
306}
307as_func_ret_success () {
308  return 0
309}
310as_func_ret_failure () {
311  return 1
312}
313
314exitcode=0
315if as_func_success; then
316  :
317else
318  exitcode=1
319  echo as_func_success failed.
320fi
321
322if as_func_failure; then
323  exitcode=1
324  echo as_func_failure succeeded.
325fi
326
327if as_func_ret_success; then
328  :
329else
330  exitcode=1
331  echo as_func_ret_success failed.
332fi
333
334if as_func_ret_failure; then
335  exitcode=1
336  echo as_func_ret_failure succeeded.
337fi
338
339if ( set x; as_func_ret_success y && test x = "$1" ); then
340  :
341else
342  exitcode=1
343  echo positional parameters were not saved.
344fi
345
346test $exitcode = 0) || { (exit 1); exit 1; }
347
348(
349  as_lineno_1=$LINENO
350  as_lineno_2=$LINENO
351  test "x$as_lineno_1" != "x$as_lineno_2" &&
352  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
353
354_ASEOF
355}; then
356  break
357fi
358
359fi
360
361      done
362
363      if test "x$CONFIG_SHELL" != x; then
364  for as_var in BASH_ENV ENV
365	do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
366	done
367	export CONFIG_SHELL
368	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
369fi
370
371
372    if test $as_have_required = no; then
373  echo This script requires a shell more modern than all the
374      echo shells that I found on your system.  Please install a
375      echo modern shell, or manually run the script under such a
376      echo shell if you do have one.
377      { (exit 1); exit 1; }
378fi
379
380
381fi
382
383fi
384
385
386
387(eval "as_func_return () {
388  (exit \$1)
389}
390as_func_success () {
391  as_func_return 0
392}
393as_func_failure () {
394  as_func_return 1
395}
396as_func_ret_success () {
397  return 0
398}
399as_func_ret_failure () {
400  return 1
401}
402
403exitcode=0
404if as_func_success; then
405  :
406else
407  exitcode=1
408  echo as_func_success failed.
409fi
410
411if as_func_failure; then
412  exitcode=1
413  echo as_func_failure succeeded.
414fi
415
416if as_func_ret_success; then
417  :
418else
419  exitcode=1
420  echo as_func_ret_success failed.
421fi
422
423if as_func_ret_failure; then
424  exitcode=1
425  echo as_func_ret_failure succeeded.
426fi
427
428if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
429  :
430else
431  exitcode=1
432  echo positional parameters were not saved.
433fi
434
435test \$exitcode = 0") || {
436  echo No shell found that supports shell functions.
437  echo Please tell bug-autoconf@gnu.org about your system,
438  echo including any error possibly output before this message.
439  echo This can help us improve future autoconf versions.
440  echo Configuration will now proceed without shell functions.
441}
442
443
444
445  as_lineno_1=$LINENO
446  as_lineno_2=$LINENO
447  test "x$as_lineno_1" != "x$as_lineno_2" &&
448  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
449
450  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
451  # uniformly replaced by the line number.  The first 'sed' inserts a
452  # line-number line after each line using $LINENO; the second 'sed'
453  # does the real work.  The second script uses 'N' to pair each
454  # line-number line with the line containing $LINENO, and appends
455  # trailing '-' during substitution so that $LINENO is not a special
456  # case at line end.
457  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
458  # scripts with optimization help from Paolo Bonzini.  Blame Lee
459  # E. McMahon (1931-1989) for sed's syntax.  :-)
460  sed -n '
461    p
462    /[$]LINENO/=
463  ' <$as_myself |
464    sed '
465      s/[$]LINENO.*/&-/
466      t lineno
467      b
468      :lineno
469      N
470      :loop
471      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
472      t loop
473      s/-\n.*//
474    ' >$as_me.lineno &&
475  chmod +x "$as_me.lineno" ||
476    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
477   { (exit 1); exit 1; }; }
478
479  # Don't try to exec as it changes $[0], causing all sort of problems
480  # (the dirname of $[0] is not the place where we might find the
481  # original and so on.  Autoconf is especially sensitive to this).
482  . "./$as_me.lineno"
483  # Exit status is that of the last command.
484  exit
485}
486
487
488if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
489  as_dirname=dirname
490else
491  as_dirname=false
492fi
493
494ECHO_C= ECHO_N= ECHO_T=
495case `echo -n x` in
496-n*)
497  case `echo 'x\c'` in
498  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
499  *)   ECHO_C='\c';;
500  esac;;
501*)
502  ECHO_N='-n';;
503esac
504if expr a : '\(a\)' >/dev/null 2>&1 &&
505   test "X`expr 00001 : '.*\(...\)'`" = X001; then
506  as_expr=expr
507else
508  as_expr=false
509fi
510
511rm -f conf$$ conf$$.exe conf$$.file
512if test -d conf$$.dir; then
513  rm -f conf$$.dir/conf$$.file
514else
515  rm -f conf$$.dir
516  mkdir conf$$.dir 2>/dev/null
517fi
518if (echo >conf$$.file) 2>/dev/null; then
519  if ln -s conf$$.file conf$$ 2>/dev/null; then
520    as_ln_s='ln -s'
521    # ... but there are two gotchas:
522    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
523    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
524    # In both cases, we have to default to `cp -p'.
525    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
526      as_ln_s='cp -p'
527  elif ln conf$$.file conf$$ 2>/dev/null; then
528    as_ln_s=ln
529  else
530    as_ln_s='cp -p'
531  fi
532else
533  as_ln_s='cp -p'
534fi
535rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
536rmdir conf$$.dir 2>/dev/null
537
538if mkdir -p . 2>/dev/null; then
539  as_mkdir_p=:
540else
541  test -d ./-p && rmdir ./-p
542  as_mkdir_p=false
543fi
544
545if test -x / >/dev/null 2>&1; then
546  as_test_x='test -x'
547else
548  if ls -dL / >/dev/null 2>&1; then
549    as_ls_L_option=L
550  else
551    as_ls_L_option=
552  fi
553  as_test_x='
554    eval sh -c '\''
555      if test -d "$1"; then
556	test -d "$1/.";
557      else
558	case $1 in
559	-*)set "./$1";;
560	esac;
561	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
562	???[sx]*):;;*)false;;esac;fi
563    '\'' sh
564  '
565fi
566as_executable_p=$as_test_x
567
568# Sed expression to map a string onto a valid CPP name.
569as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
570
571# Sed expression to map a string onto a valid variable name.
572as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
573
574
575
576exec 7<&0 </dev/null 6>&1
577
578# Name of the host.
579# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
580# so uname gets run too.
581ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
582
583#
584# Initializations.
585#
586ac_default_prefix=/usr/local
587ac_clean_files=
588ac_config_libobj_dir=.
589LIBOBJS=
590cross_compiling=no
591subdirs=
592MFLAGS=
593MAKEFLAGS=
594SHELL=${CONFIG_SHELL-/bin/sh}
595
596# Identity of this package.
597PACKAGE_NAME='OpenJDK'
598PACKAGE_TARNAME='openjdk'
599PACKAGE_VERSION='jdk8'
600PACKAGE_STRING='OpenJDK jdk8'
601PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
602
603# Factoring default headers for most tests.
604ac_includes_default="\
605#include <stdio.h>
606#ifdef HAVE_SYS_TYPES_H
607# include <sys/types.h>
608#endif
609#ifdef HAVE_SYS_STAT_H
610# include <sys/stat.h>
611#endif
612#ifdef STDC_HEADERS
613# include <stdlib.h>
614# include <stddef.h>
615#else
616# ifdef HAVE_STDLIB_H
617#  include <stdlib.h>
618# endif
619#endif
620#ifdef HAVE_STRING_H
621# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
622#  include <memory.h>
623# endif
624# include <string.h>
625#endif
626#ifdef HAVE_STRINGS_H
627# include <strings.h>
628#endif
629#ifdef HAVE_INTTYPES_H
630# include <inttypes.h>
631#endif
632#ifdef HAVE_STDINT_H
633# include <stdint.h>
634#endif
635#ifdef HAVE_UNISTD_H
636# include <unistd.h>
637#endif"
638
639ac_subst_vars='LTLIBOBJS
640LIBOBJS
641CCACHE
642USE_PRECOMPILED_HEADER
643SJAVAC_SERVER_DIR
644ENABLE_SJAVAC
645SJAVAC_SERVER_CORES
646SJAVAC_SERVER_JAVA
647MEMORY_SIZE
648CONCURRENT_BUILD_JOBS
649NUM_CORES
650SALIB_NAME
651HOTSPOT_MAKE_ARGS
652FIXPATH
653LIBCXX
654STATIC_CXX_SETTING
655LIBDL
656LIBM
657LIBZIP_CAN_USE_MMAP
658USE_EXTERNAL_LIBZ
659USE_EXTERNAL_LIBGIF
660USE_EXTERNAL_LIBJPEG
661ALSA_LIBS
662ALSA_CFLAGS
663FREETYPE2_LIB_PATH
664USING_SYSTEM_FT_LIB
665FREETYPE2_LIBS
666FREETYPE2_CFLAGS
667CUPS_CFLAGS
668OPENWIN_HOME
669X_EXTRA_LIBS
670X_LIBS
671X_PRE_LIBS
672X_CFLAGS
673XMKMF
674CXXFLAGS_DEBUG_SYMBOLS
675CFLAGS_DEBUG_SYMBOLS
676ZIP_DEBUGINFO_FILES
677ENABLE_DEBUG_SYMBOLS
678LDFLAGS_CXX_JDK
679LDFLAGS_JDKEXE_SUFFIX
680LDFLAGS_JDKLIB_SUFFIX
681LDFLAGS_JDKEXE
682LDFLAGS_JDKLIB
683CXXFLAGS_JDKEXE
684CXXFLAGS_JDKLIB
685CFLAGS_JDKEXE
686CFLAGS_JDKLIB
687PACKAGE_PATH
688LEGACY_EXTRA_LDFLAGS
689LEGACY_EXTRA_CXXFLAGS
690LEGACY_EXTRA_CFLAGS
691CXX_FLAG_DEPS
692C_FLAG_DEPS
693CXX_O_FLAG_NONE
694CXX_O_FLAG_NORM
695CXX_O_FLAG_HI
696CXX_O_FLAG_HIGHEST
697C_O_FLAG_NONE
698C_O_FLAG_NORM
699C_O_FLAG_HI
700C_O_FLAG_HIGHEST
701POST_MCS_CMD
702POST_STRIP_CMD
703SET_EXECUTABLE_ORIGIN
704SET_SHARED_LIBRARY_ORIGIN
705CXX_FLAG_REORDER
706C_FLAG_REORDER
707SET_SHARED_LIBRARY_MAPFILE
708SET_SHARED_LIBRARY_NAME
709SHARED_LIBRARY_FLAGS
710EXE_SUFFIX
711STATIC_LIBRARY_SUFFIX
712SHARED_LIBRARY_SUFFIX
713LIBRARY_PREFIX
714STATIC_LIBRARY
715SHARED_LIBRARY
716OBJ_SUFFIX
717LIPO
718ac_ct_OBJDUMP
719OBJDUMP
720ac_ct_OBJCOPY
721OBJCOPY
722MCS
723STRIP
724NM
725AS
726CXXCPP
727CPP
728COMPILER_TYPE
729RC_FLAGS
730DUMPBIN
731WINAR
732HOTSPOT_RC
733HOTSPOT_MT
734RC
735MT
736WINLD
737HOTSPOT_LD
738HOTSPOT_CXX
739ARFLAGS
740AR
741LDEXECXX
742LDCXX
743LDEXE
744LD
745ac_ct_OBJC
746OBJCFLAGS
747OBJC
748ac_ct_CXX
749CXXFLAGS
750CXX
751ac_ct_PROPER_COMPILER_CXX
752PROPER_COMPILER_CXX
753POTENTIAL_CXX
754OBJEXT
755EXEEXT
756ac_ct_CC
757CPPFLAGS
758LDFLAGS
759CFLAGS
760CC
761ac_ct_PROPER_COMPILER_CC
762PROPER_COMPILER_CC
763POTENTIAL_CC
764BUILD_LD
765BUILD_CXX
766BUILD_CC
767MSVCR_DLL
768VS_PATH
769VS_LIB
770VS_INCLUDE
771CYGWIN_LINK
772AR_OUT_OPTION
773LD_OUT_OPTION
774EXE_OUT_OPTION
775CC_OUT_OPTION
776BUILD_HOTSPOT
777HOTSPOT_DIST
778BUILD_OUTPUT
779OVERRIDE_SRC_ROOT
780ADD_SRC_ROOT
781JDK_TOPDIR
782HOTSPOT_TOPDIR
783JAXWS_TOPDIR
784JAXP_TOPDIR
785CORBA_TOPDIR
786LANGTOOLS_TOPDIR
787BOOT_JDK_JVMARGS
788JAVAC_FLAGS
789BOOT_JDK_SOURCETARGET
790BOOT_JDK
791BOOT_TOOLSJAR
792BOOT_RTJAR
793JAVA_CHECK
794JAVAC_CHECK
795COOKED_BUILD_NUMBER
796FULL_VERSION
797RELEASE
798JDK_VERSION
799RUNTIME_NAME
800COPYRIGHT_YEAR
801MACOSX_BUNDLE_ID_BASE
802MACOSX_BUNDLE_NAME_BASE
803COMPANY_NAME
804JDK_RC_PLATFORM_NAME
805PRODUCT_SUFFIX
806PRODUCT_NAME
807LAUNCHER_NAME
808MILESTONE
809JDK_BUILD_NUMBER
810JDK_UPDATE_VERSION
811JDK_MICRO_VERSION
812JDK_MINOR_VERSION
813JDK_MAJOR_VERSION
814COMPRESS_JARS
815UNLIMITED_CRYPTO
816CACERTS_FILE
817TEST_IN_BUILD
818BUILD_HEADLESS
819SUPPORT_HEADFUL
820SUPPORT_HEADLESS
821SET_OPENJDK
822BDEPS_FTP
823BDEPS_UNZIP
824OS_VERSION_MICRO
825OS_VERSION_MINOR
826OS_VERSION_MAJOR
827PKG_CONFIG
828COMM
829TIME
830STAT
831HG
832READELF
833OTOOL
834LDD
835ZIP
836UNZIP
837FIND_DELETE
838MAKE
839CHECK_TOOLSDIR_MAKE
840CHECK_TOOLSDIR_GMAKE
841CHECK_MAKE
842CHECK_GMAKE
843PKGHANDLER
844OUTPUT_ROOT
845CONF_NAME
846SPEC
847BUILD_VARIANT_RELEASE
848DEBUG_CLASSFILES
849FASTDEBUG
850VARIANT
851DEBUG_LEVEL
852MACOSX_UNIVERSAL
853JVM_VARIANT_ZEROSHARK
854JVM_VARIANT_ZERO
855JVM_VARIANT_KERNEL
856JVM_VARIANT_CLIENT
857JVM_VARIANT_SERVER
858JVM_VARIANTS
859JDK_VARIANT
860BUILD_LOG_WRAPPER
861BUILD_LOG_PREVIOUS
862BUILD_LOG
863SYS_ROOT
864PATH_SEP
865SRC_ROOT
866DEFINE_CROSS_COMPILE_ARCH
867LP64
868OPENJDK_TARGET_OS_API_DIR
869OPENJDK_TARGET_CPU_JLI_CFLAGS
870OPENJDK_TARGET_CPU_OSARCH
871OPENJDK_TARGET_CPU_ISADIR
872OPENJDK_TARGET_CPU_LIBDIR
873OPENJDK_TARGET_CPU_LEGACY_LIB
874OPENJDK_TARGET_CPU_LEGACY
875REQUIRED_OS_VERSION
876REQUIRED_OS_NAME
877COMPILE_TYPE
878OPENJDK_TARGET_CPU_ENDIAN
879OPENJDK_TARGET_CPU_BITS
880OPENJDK_TARGET_CPU_ARCH
881OPENJDK_TARGET_CPU
882OPENJDK_TARGET_OS_API
883OPENJDK_TARGET_OS
884OPENJDK_BUILD_CPU_ENDIAN
885OPENJDK_BUILD_CPU_BITS
886OPENJDK_BUILD_CPU_ARCH
887OPENJDK_BUILD_CPU
888OPENJDK_BUILD_OS_API
889OPENJDK_BUILD_OS
890OPENJDK_BUILD_AUTOCONF_NAME
891OPENJDK_TARGET_AUTOCONF_NAME
892target_os
893target_vendor
894target_cpu
895target
896host_os
897host_vendor
898host_cpu
899host
900build_os
901build_vendor
902build_cpu
903build
904SETFILE
905DF
906READLINK
907CYGPATH
908NAWK
909SED
910FGREP
911EGREP
912GREP
913AWK
914XARGS
915WHICH
916WC
917UNIQ
918UNAME
919TR
920TOUCH
921TEE
922TAR
923TAIL
924SORT
925SH
926RM
927THEPWDCMD
928PRINTF
929MV
930MKTEMP
931MKDIR
932LS
933LN
934HEAD
935FIND
936FILE
937EXPR
938ECHO
939DIRNAME
940DIFF
941DATE
942CUT
943CP
944CMP
945CHMOD
946CAT
947BASH
948BASENAME
949DATE_WHEN_CONFIGURED
950CONFIGURE_COMMAND_LINE
951CUSTOM_MAKE_DIR
952target_alias
953host_alias
954build_alias
955LIBS
956ECHO_T
957ECHO_N
958ECHO_C
959DEFS
960mandir
961localedir
962libdir
963psdir
964pdfdir
965dvidir
966htmldir
967infodir
968docdir
969oldincludedir
970includedir
971localstatedir
972sharedstatedir
973sysconfdir
974datadir
975datarootdir
976libexecdir
977sbindir
978bindir
979program_transform_name
980prefix
981exec_prefix
982PACKAGE_BUGREPORT
983PACKAGE_STRING
984PACKAGE_VERSION
985PACKAGE_TARNAME
986PACKAGE_NAME
987PATH_SEPARATOR
988SHELL'
989ac_subst_files=''
990ac_user_opts='
991enable_option_checking
992with_custom_make_dir
993with_target_bits
994with_sys_root
995with_tools_dir
996with_devkit
997with_jdk_variant
998with_jvm_variants
999enable_debug
1000with_debug_level
1001with_conf_name
1002with_builddeps_conf
1003with_builddeps_server
1004with_builddeps_dir
1005with_builddeps_group
1006enable_openjdk_only
1007enable_headful
1008enable_hotspot_test_in_build
1009with_cacerts_file
1010enable_unlimited_crypto
1011with_boot_jdk
1012with_boot_jdk_jvmargs
1013with_add_source_root
1014with_override_source_root
1015with_adds_and_overrides
1016with_override_langtools
1017with_override_corba
1018with_override_jaxp
1019with_override_jaxws
1020with_override_hotspot
1021with_override_jdk
1022with_import_hotspot
1023with_msvcr_dll
1024with_extra_cflags
1025with_extra_cxxflags
1026with_extra_ldflags
1027enable_debug_symbols
1028enable_zip_debug_info
1029enable_macosx_runtime_support
1030with_x
1031with_cups
1032with_cups_include
1033with_freetype
1034with_alsa
1035with_alsa_include
1036with_alsa_lib
1037with_zlib
1038enable_static_link_stdc++
1039with_num_cores
1040with_memory_size
1041with_sjavac_server_java
1042with_sjavac_server_cores
1043enable_sjavac
1044enable_precompiled_headers
1045enable_ccache
1046with_ccache_dir
1047'
1048      ac_precious_vars='build_alias
1049host_alias
1050target_alias
1051PKG_CONFIG
1052CC
1053CFLAGS
1054LDFLAGS
1055LIBS
1056CPPFLAGS
1057CXX
1058CXXFLAGS
1059CCC
1060OBJC
1061OBJCFLAGS
1062CPP
1063CXXCPP
1064XMKMF
1065FREETYPE2_CFLAGS
1066FREETYPE2_LIBS
1067ALSA_CFLAGS
1068ALSA_LIBS'
1069
1070
1071# Initialize some variables set by options.
1072ac_init_help=
1073ac_init_version=false
1074ac_unrecognized_opts=
1075ac_unrecognized_sep=
1076# The variables have the same names as the options, with
1077# dashes changed to underlines.
1078cache_file=/dev/null
1079exec_prefix=NONE
1080no_create=
1081no_recursion=
1082prefix=NONE
1083program_prefix=NONE
1084program_suffix=NONE
1085program_transform_name=s,x,x,
1086silent=
1087site=
1088srcdir=
1089verbose=
1090x_includes=NONE
1091x_libraries=NONE
1092
1093# Installation directory options.
1094# These are left unexpanded so users can "make install exec_prefix=/foo"
1095# and all the variables that are supposed to be based on exec_prefix
1096# by default will actually change.
1097# Use braces instead of parens because sh, perl, etc. also accept them.
1098# (The list follows the same order as the GNU Coding Standards.)
1099bindir='${exec_prefix}/bin'
1100sbindir='${exec_prefix}/sbin'
1101libexecdir='${exec_prefix}/libexec'
1102datarootdir='${prefix}/share'
1103datadir='${datarootdir}'
1104sysconfdir='${prefix}/etc'
1105sharedstatedir='${prefix}/com'
1106localstatedir='${prefix}/var'
1107includedir='${prefix}/include'
1108oldincludedir='/usr/include'
1109docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1110infodir='${datarootdir}/info'
1111htmldir='${docdir}'
1112dvidir='${docdir}'
1113pdfdir='${docdir}'
1114psdir='${docdir}'
1115libdir='${exec_prefix}/lib'
1116localedir='${datarootdir}/locale'
1117mandir='${datarootdir}/man'
1118
1119ac_prev=
1120ac_dashdash=
1121for ac_option
1122do
1123  # If the previous option needs an argument, assign it.
1124  if test -n "$ac_prev"; then
1125    eval $ac_prev=\$ac_option
1126    ac_prev=
1127    continue
1128  fi
1129
1130  case $ac_option in
1131  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1132  *)	ac_optarg=yes ;;
1133  esac
1134
1135  # Accept the important Cygnus configure options, so we can diagnose typos.
1136
1137  case $ac_dashdash$ac_option in
1138  --)
1139    ac_dashdash=yes ;;
1140
1141  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1142    ac_prev=bindir ;;
1143  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1144    bindir=$ac_optarg ;;
1145
1146  -build | --build | --buil | --bui | --bu)
1147    ac_prev=build_alias ;;
1148  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1149    build_alias=$ac_optarg ;;
1150
1151  -cache-file | --cache-file | --cache-fil | --cache-fi \
1152  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1153    ac_prev=cache_file ;;
1154  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1155  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1156    cache_file=$ac_optarg ;;
1157
1158  --config-cache | -C)
1159    cache_file=config.cache ;;
1160
1161  -datadir | --datadir | --datadi | --datad)
1162    ac_prev=datadir ;;
1163  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1164    datadir=$ac_optarg ;;
1165
1166  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1167  | --dataroo | --dataro | --datar)
1168    ac_prev=datarootdir ;;
1169  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1170  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1171    datarootdir=$ac_optarg ;;
1172
1173  -disable-* | --disable-*)
1174    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1175    # Reject names that are not valid shell variable names.
1176    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1177      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
1178   { (exit 1); exit 1; }; }
1179    ac_useropt_orig=$ac_useropt
1180    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1181    case $ac_user_opts in
1182      *"
1183"enable_$ac_useropt"
1184"*) ;;
1185      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1186	 ac_unrecognized_sep=', ';;
1187    esac
1188    eval enable_$ac_useropt=no ;;
1189
1190  -docdir | --docdir | --docdi | --doc | --do)
1191    ac_prev=docdir ;;
1192  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1193    docdir=$ac_optarg ;;
1194
1195  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1196    ac_prev=dvidir ;;
1197  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1198    dvidir=$ac_optarg ;;
1199
1200  -enable-* | --enable-*)
1201    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1202    # Reject names that are not valid shell variable names.
1203    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1204      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
1205   { (exit 1); exit 1; }; }
1206    ac_useropt_orig=$ac_useropt
1207    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208    case $ac_user_opts in
1209      *"
1210"enable_$ac_useropt"
1211"*) ;;
1212      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1213	 ac_unrecognized_sep=', ';;
1214    esac
1215    eval enable_$ac_useropt=\$ac_optarg ;;
1216
1217  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1218  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1219  | --exec | --exe | --ex)
1220    ac_prev=exec_prefix ;;
1221  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1222  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1223  | --exec=* | --exe=* | --ex=*)
1224    exec_prefix=$ac_optarg ;;
1225
1226  -gas | --gas | --ga | --g)
1227    # Obsolete; use --with-gas.
1228    with_gas=yes ;;
1229
1230  -help | --help | --hel | --he | -h)
1231    ac_init_help=long ;;
1232  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1233    ac_init_help=recursive ;;
1234  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1235    ac_init_help=short ;;
1236
1237  -host | --host | --hos | --ho)
1238    ac_prev=host_alias ;;
1239  -host=* | --host=* | --hos=* | --ho=*)
1240    host_alias=$ac_optarg ;;
1241
1242  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1243    ac_prev=htmldir ;;
1244  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1245  | --ht=*)
1246    htmldir=$ac_optarg ;;
1247
1248  -includedir | --includedir | --includedi | --included | --include \
1249  | --includ | --inclu | --incl | --inc)
1250    ac_prev=includedir ;;
1251  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1252  | --includ=* | --inclu=* | --incl=* | --inc=*)
1253    includedir=$ac_optarg ;;
1254
1255  -infodir | --infodir | --infodi | --infod | --info | --inf)
1256    ac_prev=infodir ;;
1257  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1258    infodir=$ac_optarg ;;
1259
1260  -libdir | --libdir | --libdi | --libd)
1261    ac_prev=libdir ;;
1262  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1263    libdir=$ac_optarg ;;
1264
1265  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1266  | --libexe | --libex | --libe)
1267    ac_prev=libexecdir ;;
1268  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1269  | --libexe=* | --libex=* | --libe=*)
1270    libexecdir=$ac_optarg ;;
1271
1272  -localedir | --localedir | --localedi | --localed | --locale)
1273    ac_prev=localedir ;;
1274  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1275    localedir=$ac_optarg ;;
1276
1277  -localstatedir | --localstatedir | --localstatedi | --localstated \
1278  | --localstate | --localstat | --localsta | --localst | --locals)
1279    ac_prev=localstatedir ;;
1280  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1281  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1282    localstatedir=$ac_optarg ;;
1283
1284  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1285    ac_prev=mandir ;;
1286  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1287    mandir=$ac_optarg ;;
1288
1289  -nfp | --nfp | --nf)
1290    # Obsolete; use --without-fp.
1291    with_fp=no ;;
1292
1293  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1294  | --no-cr | --no-c | -n)
1295    no_create=yes ;;
1296
1297  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1298  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1299    no_recursion=yes ;;
1300
1301  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1302  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1303  | --oldin | --oldi | --old | --ol | --o)
1304    ac_prev=oldincludedir ;;
1305  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1306  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1307  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1308    oldincludedir=$ac_optarg ;;
1309
1310  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1311    ac_prev=prefix ;;
1312  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1313    prefix=$ac_optarg ;;
1314
1315  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1316  | --program-pre | --program-pr | --program-p)
1317    ac_prev=program_prefix ;;
1318  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1319  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1320    program_prefix=$ac_optarg ;;
1321
1322  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1323  | --program-suf | --program-su | --program-s)
1324    ac_prev=program_suffix ;;
1325  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1326  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1327    program_suffix=$ac_optarg ;;
1328
1329  -program-transform-name | --program-transform-name \
1330  | --program-transform-nam | --program-transform-na \
1331  | --program-transform-n | --program-transform- \
1332  | --program-transform | --program-transfor \
1333  | --program-transfo | --program-transf \
1334  | --program-trans | --program-tran \
1335  | --progr-tra | --program-tr | --program-t)
1336    ac_prev=program_transform_name ;;
1337  -program-transform-name=* | --program-transform-name=* \
1338  | --program-transform-nam=* | --program-transform-na=* \
1339  | --program-transform-n=* | --program-transform-=* \
1340  | --program-transform=* | --program-transfor=* \
1341  | --program-transfo=* | --program-transf=* \
1342  | --program-trans=* | --program-tran=* \
1343  | --progr-tra=* | --program-tr=* | --program-t=*)
1344    program_transform_name=$ac_optarg ;;
1345
1346  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1347    ac_prev=pdfdir ;;
1348  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1349    pdfdir=$ac_optarg ;;
1350
1351  -psdir | --psdir | --psdi | --psd | --ps)
1352    ac_prev=psdir ;;
1353  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1354    psdir=$ac_optarg ;;
1355
1356  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1357  | -silent | --silent | --silen | --sile | --sil)
1358    silent=yes ;;
1359
1360  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1361    ac_prev=sbindir ;;
1362  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1363  | --sbi=* | --sb=*)
1364    sbindir=$ac_optarg ;;
1365
1366  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1367  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1368  | --sharedst | --shareds | --shared | --share | --shar \
1369  | --sha | --sh)
1370    ac_prev=sharedstatedir ;;
1371  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1372  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1373  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1374  | --sha=* | --sh=*)
1375    sharedstatedir=$ac_optarg ;;
1376
1377  -site | --site | --sit)
1378    ac_prev=site ;;
1379  -site=* | --site=* | --sit=*)
1380    site=$ac_optarg ;;
1381
1382  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1383    ac_prev=srcdir ;;
1384  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1385    srcdir=$ac_optarg ;;
1386
1387  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1388  | --syscon | --sysco | --sysc | --sys | --sy)
1389    ac_prev=sysconfdir ;;
1390  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1391  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1392    sysconfdir=$ac_optarg ;;
1393
1394  -target | --target | --targe | --targ | --tar | --ta | --t)
1395    ac_prev=target_alias ;;
1396  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1397    target_alias=$ac_optarg ;;
1398
1399  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1400    verbose=yes ;;
1401
1402  -version | --version | --versio | --versi | --vers | -V)
1403    ac_init_version=: ;;
1404
1405  -with-* | --with-*)
1406    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1407    # Reject names that are not valid shell variable names.
1408    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1409      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1410   { (exit 1); exit 1; }; }
1411    ac_useropt_orig=$ac_useropt
1412    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1413    case $ac_user_opts in
1414      *"
1415"with_$ac_useropt"
1416"*) ;;
1417      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1418	 ac_unrecognized_sep=', ';;
1419    esac
1420    eval with_$ac_useropt=\$ac_optarg ;;
1421
1422  -without-* | --without-*)
1423    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1424    # Reject names that are not valid shell variable names.
1425    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1426      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1427   { (exit 1); exit 1; }; }
1428    ac_useropt_orig=$ac_useropt
1429    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1430    case $ac_user_opts in
1431      *"
1432"with_$ac_useropt"
1433"*) ;;
1434      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1435	 ac_unrecognized_sep=', ';;
1436    esac
1437    eval with_$ac_useropt=no ;;
1438
1439  --x)
1440    # Obsolete; use --with-x.
1441    with_x=yes ;;
1442
1443  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1444  | --x-incl | --x-inc | --x-in | --x-i)
1445    ac_prev=x_includes ;;
1446  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1447  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1448    x_includes=$ac_optarg ;;
1449
1450  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1451  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1452    ac_prev=x_libraries ;;
1453  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1454  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1455    x_libraries=$ac_optarg ;;
1456
1457  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
1458Try \`$0 --help' for more information." >&2
1459   { (exit 1); exit 1; }; }
1460    ;;
1461
1462  *=*)
1463    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1464    # Reject names that are not valid shell variable names.
1465    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1466      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1467   { (exit 1); exit 1; }; }
1468    eval $ac_envvar=\$ac_optarg
1469    export $ac_envvar ;;
1470
1471  *)
1472    # FIXME: should be removed in autoconf 3.0.
1473    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1474    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1475      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1476    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1477    ;;
1478
1479  esac
1480done
1481
1482if test -n "$ac_prev"; then
1483  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1484  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
1485   { (exit 1); exit 1; }; }
1486fi
1487
1488if test -n "$ac_unrecognized_opts"; then
1489  case $enable_option_checking in
1490    no) ;;
1491    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1492   { (exit 1); exit 1; }; } ;;
1493    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1494  esac
1495fi
1496
1497# Check all directory arguments for consistency.
1498for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1499		datadir sysconfdir sharedstatedir localstatedir includedir \
1500		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1501		libdir localedir mandir
1502do
1503  eval ac_val=\$$ac_var
1504  # Remove trailing slashes.
1505  case $ac_val in
1506    */ )
1507      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1508      eval $ac_var=\$ac_val;;
1509  esac
1510  # Be sure to have absolute directory names.
1511  case $ac_val in
1512    [\\/$]* | ?:[\\/]* )  continue;;
1513    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1514  esac
1515  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1516   { (exit 1); exit 1; }; }
1517done
1518
1519# There might be people who depend on the old broken behavior: `$host'
1520# used to hold the argument of --host etc.
1521# FIXME: To remove some day.
1522build=$build_alias
1523host=$host_alias
1524target=$target_alias
1525
1526# FIXME: To remove some day.
1527if test "x$host_alias" != x; then
1528  if test "x$build_alias" = x; then
1529    cross_compiling=maybe
1530    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1531    If a cross compiler is detected then cross compile mode will be used." >&2
1532  elif test "x$build_alias" != "x$host_alias"; then
1533    cross_compiling=yes
1534  fi
1535fi
1536
1537ac_tool_prefix=
1538test -n "$host_alias" && ac_tool_prefix=$host_alias-
1539
1540test "$silent" = yes && exec 6>/dev/null
1541
1542
1543ac_pwd=`pwd` && test -n "$ac_pwd" &&
1544ac_ls_di=`ls -di .` &&
1545ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1546  { $as_echo "$as_me: error: working directory cannot be determined" >&2
1547   { (exit 1); exit 1; }; }
1548test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1549  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
1550   { (exit 1); exit 1; }; }
1551
1552
1553# Find the source files, if location was not specified.
1554if test -z "$srcdir"; then
1555  ac_srcdir_defaulted=yes
1556  # Try the directory containing this script, then the parent directory.
1557  ac_confdir=`$as_dirname -- "$as_myself" ||
1558$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1559	 X"$as_myself" : 'X\(//\)[^/]' \| \
1560	 X"$as_myself" : 'X\(//\)$' \| \
1561	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1562$as_echo X"$as_myself" |
1563    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1564	    s//\1/
1565	    q
1566	  }
1567	  /^X\(\/\/\)[^/].*/{
1568	    s//\1/
1569	    q
1570	  }
1571	  /^X\(\/\/\)$/{
1572	    s//\1/
1573	    q
1574	  }
1575	  /^X\(\/\).*/{
1576	    s//\1/
1577	    q
1578	  }
1579	  s/.*/./; q'`
1580  srcdir=$ac_confdir
1581  if test ! -r "$srcdir/$ac_unique_file"; then
1582    srcdir=..
1583  fi
1584else
1585  ac_srcdir_defaulted=no
1586fi
1587if test ! -r "$srcdir/$ac_unique_file"; then
1588  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1589  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1590   { (exit 1); exit 1; }; }
1591fi
1592ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1593ac_abs_confdir=`(
1594	cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
1595   { (exit 1); exit 1; }; }
1596	pwd)`
1597# When building in place, set srcdir=.
1598if test "$ac_abs_confdir" = "$ac_pwd"; then
1599  srcdir=.
1600fi
1601# Remove unnecessary trailing slashes from srcdir.
1602# Double slashes in file names in object file debugging info
1603# mess up M-x gdb in Emacs.
1604case $srcdir in
1605*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1606esac
1607for ac_var in $ac_precious_vars; do
1608  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1609  eval ac_env_${ac_var}_value=\$${ac_var}
1610  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1611  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1612done
1613
1614#
1615# Report the --help message.
1616#
1617if test "$ac_init_help" = "long"; then
1618  # Omit some internal or obsolete options to make the list less imposing.
1619  # This message is too long to be a string in the A/UX 3.1 sh.
1620  cat <<_ACEOF
1621\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1622
1623Usage: $0 [OPTION]... [VAR=VALUE]...
1624
1625To assign environment variables (e.g., CC, CFLAGS...), specify them as
1626VAR=VALUE.  See below for descriptions of some of the useful variables.
1627
1628Defaults for the options are specified in brackets.
1629
1630Configuration:
1631  -h, --help              display this help and exit
1632      --help=short        display options specific to this package
1633      --help=recursive    display the short help of all the included packages
1634  -V, --version           display version information and exit
1635  -q, --quiet, --silent   do not print \`checking...' messages
1636      --cache-file=FILE   cache test results in FILE [disabled]
1637  -C, --config-cache      alias for \`--cache-file=config.cache'
1638  -n, --no-create         do not create output files
1639      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1640
1641Installation directories:
1642  --prefix=PREFIX         install architecture-independent files in PREFIX
1643                          [$ac_default_prefix]
1644  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1645                          [PREFIX]
1646
1647By default, \`make install' will install all the files in
1648\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1649an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1650for instance \`--prefix=\$HOME'.
1651
1652For better control, use the options below.
1653
1654Fine tuning of the installation directories:
1655  --bindir=DIR            user executables [EPREFIX/bin]
1656  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1657  --libexecdir=DIR        program executables [EPREFIX/libexec]
1658  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1659  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1660  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1661  --libdir=DIR            object code libraries [EPREFIX/lib]
1662  --includedir=DIR        C header files [PREFIX/include]
1663  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1664  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1665  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1666  --infodir=DIR           info documentation [DATAROOTDIR/info]
1667  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1668  --mandir=DIR            man documentation [DATAROOTDIR/man]
1669  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1670  --htmldir=DIR           html documentation [DOCDIR]
1671  --dvidir=DIR            dvi documentation [DOCDIR]
1672  --pdfdir=DIR            pdf documentation [DOCDIR]
1673  --psdir=DIR             ps documentation [DOCDIR]
1674_ACEOF
1675
1676  cat <<\_ACEOF
1677
1678X features:
1679  --x-includes=DIR    X include files are in DIR
1680  --x-libraries=DIR   X library files are in DIR
1681
1682System types:
1683  --build=BUILD     configure for building on BUILD [guessed]
1684  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1685  --target=TARGET   configure for building compilers for TARGET [HOST]
1686_ACEOF
1687fi
1688
1689if test -n "$ac_init_help"; then
1690  case $ac_init_help in
1691     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1692   esac
1693  cat <<\_ACEOF
1694
1695Optional Features:
1696  --disable-option-checking  ignore unrecognized --enable/--with options
1697  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1698  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1699  --enable-debug          set the debug level to fastdebug (shorthand for
1700                          --with-debug-level=fastdebug) [disabled]
1701  --enable-openjdk-only   supress building closed source even if present
1702                          [disabled]
1703  --disable-headful       disable building headful support (graphical UI
1704                          support) [enabled]
1705  --enable-hotspot-test-in-build
1706                          run the Queens test after Hotspot build [disabled]
1707  --enable-unlimited-crypto
1708                          Enable unlimited crypto policy [disabled]
1709  --disable-debug-symbols disable generation of debug symbols [enabled]
1710  --disable-zip-debug-info
1711                          disable zipping of debug-info files [enabled]
1712  --disable-macosx-runtime-support
1713                          disable the use of MacOSX Java runtime support
1714                          framework [enabled]
1715  --disable-static-link-stdc++
1716                          disable static linking of the C++ runtime on Linux
1717                          [enabled]
1718  --enable-sjavac         use sjavac to do fast incremental compiles
1719                          [disabled]
1720  --disable-precompiled-headers
1721                          disable using precompiled headers when compiling C++
1722                          [enabled]
1723  --disable-ccache        disable using ccache to speed up recompilations
1724                          [enabled]
1725
1726Optional Packages:
1727  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1728  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1729  --with-custom-make-dir  use this directory for custom build/make files
1730  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1731                          support it), e.g. --with-target-bits=32 [guessed]
1732  --with-sys-root         pass this sys-root to the compilers and tools (for
1733                          cross-compiling)
1734  --with-tools-dir        search this directory for compilers and tools (for
1735                          cross-compiling)
1736  --with-devkit           use this directory as base for tools-dir and
1737                          sys-root (for cross-compiling)
1738  --with-jdk-variant      JDK variant to build (normal) [normal]
1739  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1740                          client, kernel, zero, zeroshark) [server]
1741  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1742                          [release]
1743  --with-conf-name        use this as the name of the configuration [generated
1744                          from important configuration options]
1745  --with-builddeps-conf   use this configuration file for the builddeps
1746  --with-builddeps-server download and use build dependencies from this server
1747                          url
1748  --with-builddeps-dir    store downloaded build dependencies here
1749                          [/localhome/builddeps]
1750  --with-builddeps-group  chgrp the downloaded build dependencies to this
1751                          group
1752  --with-cacerts-file     specify alternative cacerts file
1753  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1754  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1755                          invocations of the Boot JDK, overriding the default
1756                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1757                          -enableassertions"
1758  --with-add-source-root  for each and every source directory, look in this
1759                          additional source root for the same directory; if it
1760                          exists and have files in it, include it in the build
1761  --with-override-source-root
1762                          for each and every source directory, look in this
1763                          override source root for the same directory; if it
1764                          exists, use that directory instead and ignore the
1765                          directory in the original source root
1766  --with-adds-and-overrides
1767                          use the subdirs 'adds' and 'overrides' in the
1768                          specified directory as add-source-root and
1769                          override-source-root
1770  --with-override-langtools
1771                          use this langtools dir for the build
1772  --with-override-corba   use this corba dir for the build
1773  --with-override-jaxp    use this jaxp dir for the build
1774  --with-override-jaxws   use this jaxws dir for the build
1775  --with-override-hotspot use this hotspot dir for the build
1776  --with-override-jdk     use this jdk dir for the build
1777  --with-import-hotspot   import hotspot binaries from this jdk image or
1778                          hotspot build dist dir instead of building from
1779                          source
1780  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1781                          only) [probed]
1782  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1783  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1784  --with-extra-ldflags    extra flags to be used when linking jdk
1785  --with-x                use the X Window System
1786  --with-cups             specify prefix directory for the cups package
1787                          (expecting the headers under PATH/include)
1788  --with-cups-include     specify directory for the cups include files
1789  --with-freetype         specify prefix directory for the freetype2 package
1790                          (expecting the libraries under PATH/lib and the
1791                          headers under PATH/include)
1792  --with-alsa             specify prefix directory for the alsa package
1793                          (expecting the libraries under PATH/lib and the
1794                          headers under PATH/include)
1795  --with-alsa-include     specify directory for the alsa include files
1796  --with-alsa-lib         specify directory for the alsa library
1797  --with-zlib             use zlib from build system or OpenJDK source
1798                          (system, bundled) [bundled]
1799  --with-num-cores        number of cores in the build system, e.g.
1800                          --with-num-cores=8 [probed]
1801  --with-memory-size      memory (in MB) available in the build system, e.g.
1802                          --with-memory-size=1024 [probed]
1803  --with-sjavac-server-java
1804                          use this java binary for running the sjavac
1805                          background server [Boot JDK java]
1806  --with-sjavac-server-cores
1807                          use at most this number of concurrent threads on the
1808                          sjavac server [probed]
1809  --with-ccache-dir       where to store ccache files [~/.ccache]
1810
1811Some influential environment variables:
1812  PKG_CONFIG  path to pkg-config utility
1813  CC          C compiler command
1814  CFLAGS      C compiler flags
1815  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1816              nonstandard directory <lib dir>
1817  LIBS        libraries to pass to the linker, e.g. -l<library>
1818  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1819              you have headers in a nonstandard directory <include dir>
1820  CXX         C++ compiler command
1821  CXXFLAGS    C++ compiler flags
1822  OBJC        Objective C compiler command
1823  OBJCFLAGS   Objective C compiler flags
1824  CPP         C preprocessor
1825  CXXCPP      C++ preprocessor
1826  XMKMF       Path to xmkmf, Makefile generator for X Window System
1827  FREETYPE2_CFLAGS
1828              C compiler flags for FREETYPE2, overriding pkg-config
1829  FREETYPE2_LIBS
1830              linker flags for FREETYPE2, overriding pkg-config
1831  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1832  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1833
1834Use these variables to override the choices made by `configure' or to help
1835it to find libraries and programs with nonstandard names/locations.
1836
1837Report bugs to <build-dev@openjdk.java.net>.
1838_ACEOF
1839ac_status=$?
1840fi
1841
1842if test "$ac_init_help" = "recursive"; then
1843  # If there are subdirs, report their specific --help.
1844  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1845    test -d "$ac_dir" ||
1846      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1847      continue
1848    ac_builddir=.
1849
1850case "$ac_dir" in
1851.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1852*)
1853  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1854  # A ".." for each directory in $ac_dir_suffix.
1855  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1856  case $ac_top_builddir_sub in
1857  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1858  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1859  esac ;;
1860esac
1861ac_abs_top_builddir=$ac_pwd
1862ac_abs_builddir=$ac_pwd$ac_dir_suffix
1863# for backward compatibility:
1864ac_top_builddir=$ac_top_build_prefix
1865
1866case $srcdir in
1867  .)  # We are building in place.
1868    ac_srcdir=.
1869    ac_top_srcdir=$ac_top_builddir_sub
1870    ac_abs_top_srcdir=$ac_pwd ;;
1871  [\\/]* | ?:[\\/]* )  # Absolute name.
1872    ac_srcdir=$srcdir$ac_dir_suffix;
1873    ac_top_srcdir=$srcdir
1874    ac_abs_top_srcdir=$srcdir ;;
1875  *) # Relative name.
1876    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1877    ac_top_srcdir=$ac_top_build_prefix$srcdir
1878    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1879esac
1880ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1881
1882    cd "$ac_dir" || { ac_status=$?; continue; }
1883    # Check for guested configure.
1884    if test -f "$ac_srcdir/configure.gnu"; then
1885      echo &&
1886      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1887    elif test -f "$ac_srcdir/configure"; then
1888      echo &&
1889      $SHELL "$ac_srcdir/configure" --help=recursive
1890    else
1891      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1892    fi || ac_status=$?
1893    cd "$ac_pwd" || { ac_status=$?; break; }
1894  done
1895fi
1896
1897test -n "$ac_init_help" && exit $ac_status
1898if $ac_init_version; then
1899  cat <<\_ACEOF
1900OpenJDK configure jdk8
1901generated by GNU Autoconf 2.63
1902
1903Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
19042002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1905This configure script is free software; the Free Software Foundation
1906gives unlimited permission to copy, distribute and modify it.
1907_ACEOF
1908  exit
1909fi
1910cat >config.log <<_ACEOF
1911This file contains any messages produced by compilers while
1912running configure, to aid debugging if configure makes a mistake.
1913
1914It was created by OpenJDK $as_me jdk8, which was
1915generated by GNU Autoconf 2.63.  Invocation command line was
1916
1917  $ $0 $@
1918
1919_ACEOF
1920exec 5>>config.log
1921{
1922cat <<_ASUNAME
1923## --------- ##
1924## Platform. ##
1925## --------- ##
1926
1927hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1928uname -m = `(uname -m) 2>/dev/null || echo unknown`
1929uname -r = `(uname -r) 2>/dev/null || echo unknown`
1930uname -s = `(uname -s) 2>/dev/null || echo unknown`
1931uname -v = `(uname -v) 2>/dev/null || echo unknown`
1932
1933/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1934/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1935
1936/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1937/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1938/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1939/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1940/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1941/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1942/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1943
1944_ASUNAME
1945
1946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1947for as_dir in $PATH
1948do
1949  IFS=$as_save_IFS
1950  test -z "$as_dir" && as_dir=.
1951  $as_echo "PATH: $as_dir"
1952done
1953IFS=$as_save_IFS
1954
1955} >&5
1956
1957cat >&5 <<_ACEOF
1958
1959
1960## ----------- ##
1961## Core tests. ##
1962## ----------- ##
1963
1964_ACEOF
1965
1966
1967# Keep a trace of the command line.
1968# Strip out --no-create and --no-recursion so they do not pile up.
1969# Strip out --silent because we don't want to record it for future runs.
1970# Also quote any args containing shell meta-characters.
1971# Make two passes to allow for proper duplicate-argument suppression.
1972ac_configure_args=
1973ac_configure_args0=
1974ac_configure_args1=
1975ac_must_keep_next=false
1976for ac_pass in 1 2
1977do
1978  for ac_arg
1979  do
1980    case $ac_arg in
1981    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1982    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1983    | -silent | --silent | --silen | --sile | --sil)
1984      continue ;;
1985    *\'*)
1986      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1987    esac
1988    case $ac_pass in
1989    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1990    2)
1991      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1992      if test $ac_must_keep_next = true; then
1993	ac_must_keep_next=false # Got value, back to normal.
1994      else
1995	case $ac_arg in
1996	  *=* | --config-cache | -C | -disable-* | --disable-* \
1997	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1998	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1999	  | -with-* | --with-* | -without-* | --without-* | --x)
2000	    case "$ac_configure_args0 " in
2001	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2002	    esac
2003	    ;;
2004	  -* ) ac_must_keep_next=true ;;
2005	esac
2006      fi
2007      ac_configure_args="$ac_configure_args '$ac_arg'"
2008      ;;
2009    esac
2010  done
2011done
2012$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
2013$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
2014
2015# When interrupted or exit'd, cleanup temporary files, and complete
2016# config.log.  We remove comments because anyway the quotes in there
2017# would cause problems or look ugly.
2018# WARNING: Use '\'' to represent an apostrophe within the trap.
2019# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2020trap 'exit_status=$?
2021  # Save into config.log some information that might help in debugging.
2022  {
2023    echo
2024
2025    cat <<\_ASBOX
2026## ---------------- ##
2027## Cache variables. ##
2028## ---------------- ##
2029_ASBOX
2030    echo
2031    # The following way of writing the cache mishandles newlines in values,
2032(
2033  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2034    eval ac_val=\$$ac_var
2035    case $ac_val in #(
2036    *${as_nl}*)
2037      case $ac_var in #(
2038      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
2039$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2040      esac
2041      case $ac_var in #(
2042      _ | IFS | as_nl) ;; #(
2043      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2044      *) $as_unset $ac_var ;;
2045      esac ;;
2046    esac
2047  done
2048  (set) 2>&1 |
2049    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2050    *${as_nl}ac_space=\ *)
2051      sed -n \
2052	"s/'\''/'\''\\\\'\'''\''/g;
2053	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2054      ;; #(
2055    *)
2056      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2057      ;;
2058    esac |
2059    sort
2060)
2061    echo
2062
2063    cat <<\_ASBOX
2064## ----------------- ##
2065## Output variables. ##
2066## ----------------- ##
2067_ASBOX
2068    echo
2069    for ac_var in $ac_subst_vars
2070    do
2071      eval ac_val=\$$ac_var
2072      case $ac_val in
2073      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2074      esac
2075      $as_echo "$ac_var='\''$ac_val'\''"
2076    done | sort
2077    echo
2078
2079    if test -n "$ac_subst_files"; then
2080      cat <<\_ASBOX
2081## ------------------- ##
2082## File substitutions. ##
2083## ------------------- ##
2084_ASBOX
2085      echo
2086      for ac_var in $ac_subst_files
2087      do
2088	eval ac_val=\$$ac_var
2089	case $ac_val in
2090	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2091	esac
2092	$as_echo "$ac_var='\''$ac_val'\''"
2093      done | sort
2094      echo
2095    fi
2096
2097    if test -s confdefs.h; then
2098      cat <<\_ASBOX
2099## ----------- ##
2100## confdefs.h. ##
2101## ----------- ##
2102_ASBOX
2103      echo
2104      cat confdefs.h
2105      echo
2106    fi
2107    test "$ac_signal" != 0 &&
2108      $as_echo "$as_me: caught signal $ac_signal"
2109    $as_echo "$as_me: exit $exit_status"
2110  } >&5
2111  rm -f core *.core core.conftest.* &&
2112    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2113    exit $exit_status
2114' 0
2115for ac_signal in 1 2 13 15; do
2116  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
2117done
2118ac_signal=0
2119
2120# confdefs.h avoids OS command line length limits that DEFS can exceed.
2121rm -f -r conftest* confdefs.h
2122
2123# Predefined preprocessor variables.
2124
2125cat >>confdefs.h <<_ACEOF
2126#define PACKAGE_NAME "$PACKAGE_NAME"
2127_ACEOF
2128
2129
2130cat >>confdefs.h <<_ACEOF
2131#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2132_ACEOF
2133
2134
2135cat >>confdefs.h <<_ACEOF
2136#define PACKAGE_VERSION "$PACKAGE_VERSION"
2137_ACEOF
2138
2139
2140cat >>confdefs.h <<_ACEOF
2141#define PACKAGE_STRING "$PACKAGE_STRING"
2142_ACEOF
2143
2144
2145cat >>confdefs.h <<_ACEOF
2146#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2147_ACEOF
2148
2149
2150# Let the site file select an alternate cache file if it wants to.
2151# Prefer an explicitly selected file to automatically selected ones.
2152ac_site_file1=NONE
2153ac_site_file2=NONE
2154if test -n "$CONFIG_SITE"; then
2155  ac_site_file1=$CONFIG_SITE
2156elif test "x$prefix" != xNONE; then
2157  ac_site_file1=$prefix/share/config.site
2158  ac_site_file2=$prefix/etc/config.site
2159else
2160  ac_site_file1=$ac_default_prefix/share/config.site
2161  ac_site_file2=$ac_default_prefix/etc/config.site
2162fi
2163for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2164do
2165  test "x$ac_site_file" = xNONE && continue
2166  if test -r "$ac_site_file"; then
2167    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
2168$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2169    sed 's/^/| /' "$ac_site_file" >&5
2170    . "$ac_site_file"
2171  fi
2172done
2173
2174if test -r "$cache_file"; then
2175  # Some versions of bash will fail to source /dev/null (special
2176  # files actually), so we avoid doing that.
2177  if test -f "$cache_file"; then
2178    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
2179$as_echo "$as_me: loading cache $cache_file" >&6;}
2180    case $cache_file in
2181      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2182      *)                      . "./$cache_file";;
2183    esac
2184  fi
2185else
2186  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
2187$as_echo "$as_me: creating cache $cache_file" >&6;}
2188  >$cache_file
2189fi
2190
2191# Check that the precious variables saved in the cache have kept the same
2192# value.
2193ac_cache_corrupted=false
2194for ac_var in $ac_precious_vars; do
2195  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2196  eval ac_new_set=\$ac_env_${ac_var}_set
2197  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2198  eval ac_new_val=\$ac_env_${ac_var}_value
2199  case $ac_old_set,$ac_new_set in
2200    set,)
2201      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2202$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2203      ac_cache_corrupted=: ;;
2204    ,set)
2205      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
2206$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2207      ac_cache_corrupted=: ;;
2208    ,);;
2209    *)
2210      if test "x$ac_old_val" != "x$ac_new_val"; then
2211	# differences in whitespace do not lead to failure.
2212	ac_old_val_w=`echo x $ac_old_val`
2213	ac_new_val_w=`echo x $ac_new_val`
2214	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2215	  { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
2216$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2217	  ac_cache_corrupted=:
2218	else
2219	  { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2220$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2221	  eval $ac_var=\$ac_old_val
2222	fi
2223	{ $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
2224$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2225	{ $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
2226$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2227      fi;;
2228  esac
2229  # Pass precious variables to config.status.
2230  if test "$ac_new_set" = set; then
2231    case $ac_new_val in
2232    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2233    *) ac_arg=$ac_var=$ac_new_val ;;
2234    esac
2235    case " $ac_configure_args " in
2236      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2237      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
2238    esac
2239  fi
2240done
2241if $ac_cache_corrupted; then
2242  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2243$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2244  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
2245$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2246  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
2247$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
2248   { (exit 1); exit 1; }; }
2249fi
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275ac_ext=c
2276ac_cpp='$CPP $CPPFLAGS'
2277ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2278ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2279ac_compiler_gnu=$ac_cv_c_compiler_gnu
2280
2281
2282
2283ac_aux_dir=
2284for ac_dir in build-aux "$srcdir"/build-aux; do
2285  if test -f "$ac_dir/install-sh"; then
2286    ac_aux_dir=$ac_dir
2287    ac_install_sh="$ac_aux_dir/install-sh -c"
2288    break
2289  elif test -f "$ac_dir/install.sh"; then
2290    ac_aux_dir=$ac_dir
2291    ac_install_sh="$ac_aux_dir/install.sh -c"
2292    break
2293  elif test -f "$ac_dir/shtool"; then
2294    ac_aux_dir=$ac_dir
2295    ac_install_sh="$ac_aux_dir/shtool install -c"
2296    break
2297  fi
2298done
2299if test -z "$ac_aux_dir"; then
2300  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&5
2301$as_echo "$as_me: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&2;}
2302   { (exit 1); exit 1; }; }
2303fi
2304
2305# These three variables are undocumented and unsupported,
2306# and are intended to be withdrawn in a future Autoconf release.
2307# They can cause serious problems if a builder's source tree is in a directory
2308# whose full name contains unusual characters.
2309ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2310ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2311ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2312
2313
2314# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2315#
2316# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2317#
2318# This program is free software; you can redistribute it and/or modify
2319# it under the terms of the GNU General Public License as published by
2320# the Free Software Foundation; either version 2 of the License, or
2321# (at your option) any later version.
2322#
2323# This program is distributed in the hope that it will be useful, but
2324# WITHOUT ANY WARRANTY; without even the implied warranty of
2325# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2326# General Public License for more details.
2327#
2328# You should have received a copy of the GNU General Public License
2329# along with this program; if not, write to the Free Software
2330# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2331#
2332# As a special exception to the GNU General Public License, if you
2333# distribute this file as part of a program that contains a
2334# configuration script generated by Autoconf, you may include it under
2335# the same distribution terms that you use for the rest of that program.
2336
2337# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2338# ----------------------------------
2339# PKG_PROG_PKG_CONFIG
2340
2341# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2342#
2343# Check to see whether a particular set of modules exists.  Similar
2344# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2345#
2346#
2347# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2348# this or PKG_CHECK_MODULES is called, or make sure to call
2349# PKG_CHECK_EXISTS manually
2350# --------------------------------------------------------------
2351
2352
2353
2354# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2355# ---------------------------------------------
2356# _PKG_CONFIG
2357
2358# _PKG_SHORT_ERRORS_SUPPORTED
2359# -----------------------------
2360# _PKG_SHORT_ERRORS_SUPPORTED
2361
2362
2363# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2364# [ACTION-IF-NOT-FOUND])
2365#
2366#
2367# Note that if there is a possibility the first call to
2368# PKG_CHECK_MODULES might not happen, you should be sure to include an
2369# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2370#
2371#
2372# --------------------------------------------------------------
2373# PKG_CHECK_MODULES
2374
2375
2376# Include these first...
2377#
2378# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2379# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2380#
2381# This code is free software; you can redistribute it and/or modify it
2382# under the terms of the GNU General Public License version 2 only, as
2383# published by the Free Software Foundation.  Oracle designates this
2384# particular file as subject to the "Classpath" exception as provided
2385# by Oracle in the LICENSE file that accompanied this code.
2386#
2387# This code is distributed in the hope that it will be useful, but WITHOUT
2388# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2389# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2390# version 2 for more details (a copy is included in the LICENSE file that
2391# accompanied this code).
2392#
2393# You should have received a copy of the GNU General Public License version
2394# 2 along with this work; if not, write to the Free Software Foundation,
2395# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2396#
2397# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2398# or visit www.oracle.com if you need additional information or have any
2399# questions.
2400#
2401
2402
2403
2404# This will make sure the given variable points to a full and proper
2405# path. This means:
2406# 1) There will be no spaces in the path. On posix platforms,
2407#    spaces in the path will result in an error. On Windows,
2408#    the path will be rewritten using short-style to be space-free.
2409# 2) The path will be absolute, and it will be in unix-style (on
2410#     cygwin).
2411# $1: The name of the variable to fix
2412
2413
2414# This will make sure the given variable points to a executable
2415# with a full and proper path. This means:
2416# 1) There will be no spaces in the path. On posix platforms,
2417#    spaces in the path will result in an error. On Windows,
2418#    the path will be rewritten using short-style to be space-free.
2419# 2) The path will be absolute, and it will be in unix-style (on
2420#     cygwin).
2421# Any arguments given to the executable is preserved.
2422# If the input variable does not have a directory specification, then
2423# it need to be in the PATH.
2424# $1: The name of the variable to fix
2425
2426
2427
2428
2429
2430
2431# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
2432# $1: variable to check
2433# $2: executable name to print in warning (optional)
2434
2435
2436# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
2437# Arguments as AC_PATH_PROG:
2438# $1: variable to set
2439# $2: executable name to look for
2440
2441
2442# Setup the most fundamental tools that relies on not much else to set up,
2443# but is used by much of the early bootstrap code.
2444
2445
2446# Setup basic configuration paths, and platform-specific stuff related to PATHs.
2447
2448
2449
2450
2451
2452
2453
2454#%%% Simple tools %%%
2455
2456# Check if we have found a usable version of make
2457# $1: the path to a potential make binary (or empty)
2458# $2: the description on how we found this
2459
2460
2461# Goes looking for a usable version of GNU make.
2462
2463
2464
2465
2466
2467
2468# Check if build directory is on local disk. If not possible to determine,
2469# we prefer to claim it's local.
2470# Argument 1: directory to test
2471# Argument 2: what to do if it is on local disk
2472# Argument 3: what to do otherwise (remote disk or failure)
2473
2474
2475
2476
2477#
2478# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2479# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2480#
2481# This code is free software; you can redistribute it and/or modify it
2482# under the terms of the GNU General Public License version 2 only, as
2483# published by the Free Software Foundation.  Oracle designates this
2484# particular file as subject to the "Classpath" exception as provided
2485# by Oracle in the LICENSE file that accompanied this code.
2486#
2487# This code is distributed in the hope that it will be useful, but WITHOUT
2488# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2489# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2490# version 2 for more details (a copy is included in the LICENSE file that
2491# accompanied this code).
2492#
2493# You should have received a copy of the GNU General Public License version
2494# 2 along with this work; if not, write to the Free Software Foundation,
2495# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2496#
2497# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2498# or visit www.oracle.com if you need additional information or have any
2499# questions.
2500#
2501
2502
2503
2504
2505
2506# Helper function which possibly converts a path using DOS-style short mode.
2507# If so, the updated path is stored in $new_path.
2508# $1: The path to check
2509
2510
2511# Helper function which possibly converts a path using DOS-style short mode.
2512# If so, the updated path is stored in $new_path.
2513# $1: The path to check
2514
2515
2516# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
2517# and could probably be heavily simplified. However, all changes in this
2518# area tend to need lot of testing in different scenarios, and in lack of
2519# proper unit testing, cleaning this up has not been deemed worth the effort
2520# at the moment.
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530# Setup basic configuration paths, and platform-specific stuff related to PATHs.
2531
2532
2533
2534
2535#
2536# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2537# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2538#
2539# This code is free software; you can redistribute it and/or modify it
2540# under the terms of the GNU General Public License version 2 only, as
2541# published by the Free Software Foundation.  Oracle designates this
2542# particular file as subject to the "Classpath" exception as provided
2543# by Oracle in the LICENSE file that accompanied this code.
2544#
2545# This code is distributed in the hope that it will be useful, but WITHOUT
2546# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2547# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2548# version 2 for more details (a copy is included in the LICENSE file that
2549# accompanied this code).
2550#
2551# You should have received a copy of the GNU General Public License version
2552# 2 along with this work; if not, write to the Free Software Foundation,
2553# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2554#
2555# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2556# or visit www.oracle.com if you need additional information or have any
2557# questions.
2558#
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570# ... then the rest
2571#
2572# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2573# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2574#
2575# This code is free software; you can redistribute it and/or modify it
2576# under the terms of the GNU General Public License version 2 only, as
2577# published by the Free Software Foundation.  Oracle designates this
2578# particular file as subject to the "Classpath" exception as provided
2579# by Oracle in the LICENSE file that accompanied this code.
2580#
2581# This code is distributed in the hope that it will be useful, but WITHOUT
2582# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2583# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2584# version 2 for more details (a copy is included in the LICENSE file that
2585# accompanied this code).
2586#
2587# You should have received a copy of the GNU General Public License version
2588# 2 along with this work; if not, write to the Free Software Foundation,
2589# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2590#
2591# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2592# or visit www.oracle.com if you need additional information or have any
2593# questions.
2594#
2595
2596# Execute the check given as argument, and verify the result
2597# If the Boot JDK was previously found, do nothing
2598# $1 A command line (typically autoconf macro) to execute
2599
2600
2601# Test: Is bootjdk explicitely set by command line arguments?
2602
2603
2604# Test: Is bootjdk available from builddeps?
2605
2606
2607# Test: Is $JAVA_HOME set?
2608
2609
2610# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
2611
2612
2613# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
2614
2615
2616# Look for a jdk in the given path. If there are multiple, try to select the newest.
2617# If found, set BOOT_JDK and BOOT_JDK_FOUND.
2618# $1 = Path to directory containing jdk installations.
2619# $2 = String to append to the found JDK directory to get the proper JDK home
2620
2621
2622# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
2623# environmental variable as base for where to look.
2624# $1 Name of an environmal variable, assumed to point to the Program Files directory.
2625
2626
2627# Test: Is there a JDK installed in default, well-known locations?
2628
2629
2630# Check that a command-line tool in the Boot JDK is correct
2631# $1 = name of variable to assign
2632# $2 = name of binary
2633
2634
2635###############################################################################
2636#
2637# We need a Boot JDK to bootstrap the build.
2638#
2639
2640
2641
2642
2643
2644#
2645# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2646# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2647#
2648# This code is free software; you can redistribute it and/or modify it
2649# under the terms of the GNU General Public License version 2 only, as
2650# published by the Free Software Foundation.  Oracle designates this
2651# particular file as subject to the "Classpath" exception as provided
2652# by Oracle in the LICENSE file that accompanied this code.
2653#
2654# This code is distributed in the hope that it will be useful, but WITHOUT
2655# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2656# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2657# version 2 for more details (a copy is included in the LICENSE file that
2658# accompanied this code).
2659#
2660# You should have received a copy of the GNU General Public License version
2661# 2 along with this work; if not, write to the Free Software Foundation,
2662# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2663#
2664# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2665# or visit www.oracle.com if you need additional information or have any
2666# questions.
2667#
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686#
2687# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2688# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2689#
2690# This code is free software; you can redistribute it and/or modify it
2691# under the terms of the GNU General Public License version 2 only, as
2692# published by the Free Software Foundation.  Oracle designates this
2693# particular file as subject to the "Classpath" exception as provided
2694# by Oracle in the LICENSE file that accompanied this code.
2695#
2696# This code is distributed in the hope that it will be useful, but WITHOUT
2697# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2698# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2699# version 2 for more details (a copy is included in the LICENSE file that
2700# accompanied this code).
2701#
2702# You should have received a copy of the GNU General Public License version
2703# 2 along with this work; if not, write to the Free Software Foundation,
2704# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2705#
2706# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2707# or visit www.oracle.com if you need additional information or have any
2708# questions.
2709#
2710
2711
2712
2713
2714
2715cygwin_help() {
2716    case $1 in
2717    unzip)
2718        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
2719    zip)
2720        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
2721    make)
2722        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
2723    * )
2724       break ;;
2725    esac
2726}
2727
2728apt_help() {
2729    case $1 in
2730    devkit)
2731        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
2732    openjdk)
2733        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
2734    alsa)
2735        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
2736    cups)
2737        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
2738    freetype2)
2739        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
2740    pulse)
2741        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
2742    x11)
2743        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
2744    ccache)
2745        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
2746    * )
2747       break ;;
2748    esac
2749}
2750
2751yum_help() {
2752    case $1 in
2753    devkit)
2754        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
2755    openjdk)
2756        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
2757    alsa)
2758        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
2759    cups)
2760        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
2761    freetype2)
2762        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
2763    pulse)
2764        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
2765    x11)
2766        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
2767    ccache)
2768        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
2769    * )
2770       break ;;
2771    esac
2772}
2773
2774port_help() {
2775    PKGHANDLER_COMMAND=""
2776}
2777
2778pkgutil_help() {
2779    PKGHANDLER_COMMAND=""
2780}
2781
2782pkgadd_help() {
2783    PKGHANDLER_COMMAND=""
2784}
2785
2786
2787
2788#
2789# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2790# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2791#
2792# This code is free software; you can redistribute it and/or modify it
2793# under the terms of the GNU General Public License version 2 only, as
2794# published by the Free Software Foundation.  Oracle designates this
2795# particular file as subject to the "Classpath" exception as provided
2796# by Oracle in the LICENSE file that accompanied this code.
2797#
2798# This code is distributed in the hope that it will be useful, but WITHOUT
2799# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2800# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2801# version 2 for more details (a copy is included in the LICENSE file that
2802# accompanied this code).
2803#
2804# You should have received a copy of the GNU General Public License version
2805# 2 along with this work; if not, write to the Free Software Foundation,
2806# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2807#
2808# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2809# or visit www.oracle.com if you need additional information or have any
2810# questions.
2811#
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827# Support for customization of the build process. Some build files
2828# will include counterparts from this location, if they exist. This allows
2829# for a degree of customization of the build targets and the rules/recipes
2830# to create them
2831
2832# Check whether --with-custom-make-dir was given.
2833if test "${with_custom_make_dir+set}" = set; then
2834  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
2835fi
2836
2837
2838
2839#
2840# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2841# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2842#
2843# This code is free software; you can redistribute it and/or modify it
2844# under the terms of the GNU General Public License version 2 only, as
2845# published by the Free Software Foundation.  Oracle designates this
2846# particular file as subject to the "Classpath" exception as provided
2847# by Oracle in the LICENSE file that accompanied this code.
2848#
2849# This code is distributed in the hope that it will be useful, but WITHOUT
2850# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2851# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2852# version 2 for more details (a copy is included in the LICENSE file that
2853# accompanied this code).
2854#
2855# You should have received a copy of the GNU General Public License version
2856# 2 along with this work; if not, write to the Free Software Foundation,
2857# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2858#
2859# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2860# or visit www.oracle.com if you need additional information or have any
2861# questions.
2862#
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878#
2879# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2880# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2881#
2882# This code is free software; you can redistribute it and/or modify it
2883# under the terms of the GNU General Public License version 2 only, as
2884# published by the Free Software Foundation.  Oracle designates this
2885# particular file as subject to the "Classpath" exception as provided
2886# by Oracle in the LICENSE file that accompanied this code.
2887#
2888# This code is distributed in the hope that it will be useful, but WITHOUT
2889# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2890# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2891# version 2 for more details (a copy is included in the LICENSE file that
2892# accompanied this code).
2893#
2894# You should have received a copy of the GNU General Public License version
2895# 2 along with this work; if not, write to the Free Software Foundation,
2896# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2897#
2898# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2899# or visit www.oracle.com if you need additional information or have any
2900# questions.
2901#
2902
2903# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
2904# Converts autoconf style CPU name to OpenJDK style, into
2905# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
2906
2907
2908# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
2909# Converts autoconf style OS name to OpenJDK style, into
2910# VAR_OS and VAR_OS_API.
2911
2912
2913# Expects $host_os $host_cpu $build_os and $build_cpu
2914# and $with_target_bits to have been setup!
2915#
2916# Translate the standard triplet(quadruplet) definition
2917# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
2918# OPENJDK_BUILD_OS, etc.
2919
2920
2921# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
2922# accordingly. Must be done after setting up build and target system, but before
2923# doing anything else with these values.
2924
2925
2926    # Setup the legacy variables, for controlling the old makefiles.
2927    #
2928
2929
2930
2931
2932#%%% Build and target systems %%%
2933
2934
2935
2936
2937# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
2938# Add -mX to various FLAGS variables.
2939
2940
2941
2942
2943
2944
2945#
2946# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2947# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2948#
2949# This code is free software; you can redistribute it and/or modify it
2950# under the terms of the GNU General Public License version 2 only, as
2951# published by the Free Software Foundation.  Oracle designates this
2952# particular file as subject to the "Classpath" exception as provided
2953# by Oracle in the LICENSE file that accompanied this code.
2954#
2955# This code is distributed in the hope that it will be useful, but WITHOUT
2956# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2957# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2958# version 2 for more details (a copy is included in the LICENSE file that
2959# accompanied this code).
2960#
2961# You should have received a copy of the GNU General Public License version
2962# 2 along with this work; if not, write to the Free Software Foundation,
2963# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2964#
2965# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2966# or visit www.oracle.com if you need additional information or have any
2967# questions.
2968#
2969
2970
2971
2972
2973
2974
2975
2976
2977#
2978# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2979# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2980#
2981# This code is free software; you can redistribute it and/or modify it
2982# under the terms of the GNU General Public License version 2 only, as
2983# published by the Free Software Foundation.  Oracle designates this
2984# particular file as subject to the "Classpath" exception as provided
2985# by Oracle in the LICENSE file that accompanied this code.
2986#
2987# This code is distributed in the hope that it will be useful, but WITHOUT
2988# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2989# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2990# version 2 for more details (a copy is included in the LICENSE file that
2991# accompanied this code).
2992#
2993# You should have received a copy of the GNU General Public License version
2994# 2 along with this work; if not, write to the Free Software Foundation,
2995# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2996#
2997# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2998# or visit www.oracle.com if you need additional information or have any
2999# questions.
3000#
3001
3002# $1 = compiler to test (CC or CXX)
3003# $2 = human readable name of compiler (C or C++)
3004
3005
3006
3007
3008
3009# $1 = compiler to test (CC or CXX)
3010# $2 = human readable name of compiler (C or C++)
3011# $3 = list of compiler names to search for
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024#
3025# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3026# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3027#
3028# This code is free software; you can redistribute it and/or modify it
3029# under the terms of the GNU General Public License version 2 only, as
3030# published by the Free Software Foundation.  Oracle designates this
3031# particular file as subject to the "Classpath" exception as provided
3032# by Oracle in the LICENSE file that accompanied this code.
3033#
3034# This code is distributed in the hope that it will be useful, but WITHOUT
3035# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3036# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3037# version 2 for more details (a copy is included in the LICENSE file that
3038# accompanied this code).
3039#
3040# You should have received a copy of the GNU General Public License version
3041# 2 along with this work; if not, write to the Free Software Foundation,
3042# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3043#
3044# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3045# or visit www.oracle.com if you need additional information or have any
3046# questions.
3047#
3048
3049
3050
3051
3052
3053
3054
3055# Check if the VS env variables were setup prior to running configure.
3056# If not, then find vcvarsall.bat and run it automatically, and integrate
3057# the set env variables into the spec file.
3058
3059
3060
3061
3062
3063
3064# This line needs to be here, verbatim, after all includes and the dummy hook
3065# definitions. It is replaced with custom functionality when building
3066# custom sources.
3067#CUSTOM_AUTOCONF_INCLUDE
3068
3069# Do not change or remove the following line, it is needed for consistency checks:
3070DATE_WHEN_GENERATED=1352751880
3071
3072###############################################################################
3073#
3074# Initialization / Boot-strapping
3075#
3076# The bootstrapping process needs to solve the "chicken or the egg" problem,
3077# thus it jumps back and forth, each time gaining something needed later on.
3078#
3079###############################################################################
3080
3081# Basic initialization that must happen first of all
3082
3083# Save the original command line. This is passed to us by the wrapper configure script.
3084
3085DATE_WHEN_CONFIGURED=`LANG=C date`
3086
3087{ $as_echo "$as_me:$LINENO: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3088$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3089{ $as_echo "$as_me:$LINENO: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3090$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3091
3092
3093
3094# Start with tools that do not need have cross compilation support
3095# and can be expected to be found in the default PATH. These tools are
3096# used by configure. Nor are these tools expected to be found in the
3097# devkit from the builddeps server either, since they are
3098# needed to download the devkit.
3099
3100# First are all the simple required tools.
3101
3102    for ac_prog in basename
3103do
3104  # Extract the first word of "$ac_prog", so it can be a program name with args.
3105set dummy $ac_prog; ac_word=$2
3106{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3107$as_echo_n "checking for $ac_word... " >&6; }
3108if test "${ac_cv_path_BASENAME+set}" = set; then
3109  $as_echo_n "(cached) " >&6
3110else
3111  case $BASENAME in
3112  [\\/]* | ?:[\\/]*)
3113  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3114  ;;
3115  *)
3116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3117for as_dir in $PATH
3118do
3119  IFS=$as_save_IFS
3120  test -z "$as_dir" && as_dir=.
3121  for ac_exec_ext in '' $ac_executable_extensions; do
3122  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3123    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3124    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3125    break 2
3126  fi
3127done
3128done
3129IFS=$as_save_IFS
3130
3131  ;;
3132esac
3133fi
3134BASENAME=$ac_cv_path_BASENAME
3135if test -n "$BASENAME"; then
3136  { $as_echo "$as_me:$LINENO: result: $BASENAME" >&5
3137$as_echo "$BASENAME" >&6; }
3138else
3139  { $as_echo "$as_me:$LINENO: result: no" >&5
3140$as_echo "no" >&6; }
3141fi
3142
3143
3144  test -n "$BASENAME" && break
3145done
3146
3147
3148    if test "x$BASENAME" = x; then
3149        if test "xbasename" = x; then
3150          PROG_NAME=basename
3151        else
3152          PROG_NAME=basename
3153        fi
3154        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3155$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3156        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3157$as_echo "$as_me: error: Cannot continue" >&2;}
3158   { (exit 1); exit 1; }; }
3159    fi
3160
3161
3162
3163    for ac_prog in bash
3164do
3165  # Extract the first word of "$ac_prog", so it can be a program name with args.
3166set dummy $ac_prog; ac_word=$2
3167{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3168$as_echo_n "checking for $ac_word... " >&6; }
3169if test "${ac_cv_path_BASH+set}" = set; then
3170  $as_echo_n "(cached) " >&6
3171else
3172  case $BASH in
3173  [\\/]* | ?:[\\/]*)
3174  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3175  ;;
3176  *)
3177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3178for as_dir in $PATH
3179do
3180  IFS=$as_save_IFS
3181  test -z "$as_dir" && as_dir=.
3182  for ac_exec_ext in '' $ac_executable_extensions; do
3183  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3184    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3185    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3186    break 2
3187  fi
3188done
3189done
3190IFS=$as_save_IFS
3191
3192  ;;
3193esac
3194fi
3195BASH=$ac_cv_path_BASH
3196if test -n "$BASH"; then
3197  { $as_echo "$as_me:$LINENO: result: $BASH" >&5
3198$as_echo "$BASH" >&6; }
3199else
3200  { $as_echo "$as_me:$LINENO: result: no" >&5
3201$as_echo "no" >&6; }
3202fi
3203
3204
3205  test -n "$BASH" && break
3206done
3207
3208
3209    if test "x$BASH" = x; then
3210        if test "xbash" = x; then
3211          PROG_NAME=bash
3212        else
3213          PROG_NAME=bash
3214        fi
3215        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3216$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3217        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3218$as_echo "$as_me: error: Cannot continue" >&2;}
3219   { (exit 1); exit 1; }; }
3220    fi
3221
3222
3223
3224    for ac_prog in cat
3225do
3226  # Extract the first word of "$ac_prog", so it can be a program name with args.
3227set dummy $ac_prog; ac_word=$2
3228{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3229$as_echo_n "checking for $ac_word... " >&6; }
3230if test "${ac_cv_path_CAT+set}" = set; then
3231  $as_echo_n "(cached) " >&6
3232else
3233  case $CAT in
3234  [\\/]* | ?:[\\/]*)
3235  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3236  ;;
3237  *)
3238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3239for as_dir in $PATH
3240do
3241  IFS=$as_save_IFS
3242  test -z "$as_dir" && as_dir=.
3243  for ac_exec_ext in '' $ac_executable_extensions; do
3244  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3245    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3246    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3247    break 2
3248  fi
3249done
3250done
3251IFS=$as_save_IFS
3252
3253  ;;
3254esac
3255fi
3256CAT=$ac_cv_path_CAT
3257if test -n "$CAT"; then
3258  { $as_echo "$as_me:$LINENO: result: $CAT" >&5
3259$as_echo "$CAT" >&6; }
3260else
3261  { $as_echo "$as_me:$LINENO: result: no" >&5
3262$as_echo "no" >&6; }
3263fi
3264
3265
3266  test -n "$CAT" && break
3267done
3268
3269
3270    if test "x$CAT" = x; then
3271        if test "xcat" = x; then
3272          PROG_NAME=cat
3273        else
3274          PROG_NAME=cat
3275        fi
3276        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3277$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3278        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3279$as_echo "$as_me: error: Cannot continue" >&2;}
3280   { (exit 1); exit 1; }; }
3281    fi
3282
3283
3284
3285    for ac_prog in chmod
3286do
3287  # Extract the first word of "$ac_prog", so it can be a program name with args.
3288set dummy $ac_prog; ac_word=$2
3289{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3290$as_echo_n "checking for $ac_word... " >&6; }
3291if test "${ac_cv_path_CHMOD+set}" = set; then
3292  $as_echo_n "(cached) " >&6
3293else
3294  case $CHMOD in
3295  [\\/]* | ?:[\\/]*)
3296  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3297  ;;
3298  *)
3299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3300for as_dir in $PATH
3301do
3302  IFS=$as_save_IFS
3303  test -z "$as_dir" && as_dir=.
3304  for ac_exec_ext in '' $ac_executable_extensions; do
3305  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3306    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3307    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3308    break 2
3309  fi
3310done
3311done
3312IFS=$as_save_IFS
3313
3314  ;;
3315esac
3316fi
3317CHMOD=$ac_cv_path_CHMOD
3318if test -n "$CHMOD"; then
3319  { $as_echo "$as_me:$LINENO: result: $CHMOD" >&5
3320$as_echo "$CHMOD" >&6; }
3321else
3322  { $as_echo "$as_me:$LINENO: result: no" >&5
3323$as_echo "no" >&6; }
3324fi
3325
3326
3327  test -n "$CHMOD" && break
3328done
3329
3330
3331    if test "x$CHMOD" = x; then
3332        if test "xchmod" = x; then
3333          PROG_NAME=chmod
3334        else
3335          PROG_NAME=chmod
3336        fi
3337        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3338$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3339        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3340$as_echo "$as_me: error: Cannot continue" >&2;}
3341   { (exit 1); exit 1; }; }
3342    fi
3343
3344
3345
3346    for ac_prog in cmp
3347do
3348  # Extract the first word of "$ac_prog", so it can be a program name with args.
3349set dummy $ac_prog; ac_word=$2
3350{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3351$as_echo_n "checking for $ac_word... " >&6; }
3352if test "${ac_cv_path_CMP+set}" = set; then
3353  $as_echo_n "(cached) " >&6
3354else
3355  case $CMP in
3356  [\\/]* | ?:[\\/]*)
3357  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3358  ;;
3359  *)
3360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3361for as_dir in $PATH
3362do
3363  IFS=$as_save_IFS
3364  test -z "$as_dir" && as_dir=.
3365  for ac_exec_ext in '' $ac_executable_extensions; do
3366  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3367    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3368    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3369    break 2
3370  fi
3371done
3372done
3373IFS=$as_save_IFS
3374
3375  ;;
3376esac
3377fi
3378CMP=$ac_cv_path_CMP
3379if test -n "$CMP"; then
3380  { $as_echo "$as_me:$LINENO: result: $CMP" >&5
3381$as_echo "$CMP" >&6; }
3382else
3383  { $as_echo "$as_me:$LINENO: result: no" >&5
3384$as_echo "no" >&6; }
3385fi
3386
3387
3388  test -n "$CMP" && break
3389done
3390
3391
3392    if test "x$CMP" = x; then
3393        if test "xcmp" = x; then
3394          PROG_NAME=cmp
3395        else
3396          PROG_NAME=cmp
3397        fi
3398        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3399$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3400        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3401$as_echo "$as_me: error: Cannot continue" >&2;}
3402   { (exit 1); exit 1; }; }
3403    fi
3404
3405
3406
3407    for ac_prog in cp
3408do
3409  # Extract the first word of "$ac_prog", so it can be a program name with args.
3410set dummy $ac_prog; ac_word=$2
3411{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3412$as_echo_n "checking for $ac_word... " >&6; }
3413if test "${ac_cv_path_CP+set}" = set; then
3414  $as_echo_n "(cached) " >&6
3415else
3416  case $CP in
3417  [\\/]* | ?:[\\/]*)
3418  ac_cv_path_CP="$CP" # Let the user override the test with a path.
3419  ;;
3420  *)
3421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3422for as_dir in $PATH
3423do
3424  IFS=$as_save_IFS
3425  test -z "$as_dir" && as_dir=.
3426  for ac_exec_ext in '' $ac_executable_extensions; do
3427  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3428    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
3429    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3430    break 2
3431  fi
3432done
3433done
3434IFS=$as_save_IFS
3435
3436  ;;
3437esac
3438fi
3439CP=$ac_cv_path_CP
3440if test -n "$CP"; then
3441  { $as_echo "$as_me:$LINENO: result: $CP" >&5
3442$as_echo "$CP" >&6; }
3443else
3444  { $as_echo "$as_me:$LINENO: result: no" >&5
3445$as_echo "no" >&6; }
3446fi
3447
3448
3449  test -n "$CP" && break
3450done
3451
3452
3453    if test "x$CP" = x; then
3454        if test "xcp" = x; then
3455          PROG_NAME=cp
3456        else
3457          PROG_NAME=cp
3458        fi
3459        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3460$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3461        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3462$as_echo "$as_me: error: Cannot continue" >&2;}
3463   { (exit 1); exit 1; }; }
3464    fi
3465
3466
3467
3468    for ac_prog in cut
3469do
3470  # Extract the first word of "$ac_prog", so it can be a program name with args.
3471set dummy $ac_prog; ac_word=$2
3472{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3473$as_echo_n "checking for $ac_word... " >&6; }
3474if test "${ac_cv_path_CUT+set}" = set; then
3475  $as_echo_n "(cached) " >&6
3476else
3477  case $CUT in
3478  [\\/]* | ?:[\\/]*)
3479  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
3480  ;;
3481  *)
3482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3483for as_dir in $PATH
3484do
3485  IFS=$as_save_IFS
3486  test -z "$as_dir" && as_dir=.
3487  for ac_exec_ext in '' $ac_executable_extensions; do
3488  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3489    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
3490    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3491    break 2
3492  fi
3493done
3494done
3495IFS=$as_save_IFS
3496
3497  ;;
3498esac
3499fi
3500CUT=$ac_cv_path_CUT
3501if test -n "$CUT"; then
3502  { $as_echo "$as_me:$LINENO: result: $CUT" >&5
3503$as_echo "$CUT" >&6; }
3504else
3505  { $as_echo "$as_me:$LINENO: result: no" >&5
3506$as_echo "no" >&6; }
3507fi
3508
3509
3510  test -n "$CUT" && break
3511done
3512
3513
3514    if test "x$CUT" = x; then
3515        if test "xcut" = x; then
3516          PROG_NAME=cut
3517        else
3518          PROG_NAME=cut
3519        fi
3520        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3521$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3522        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3523$as_echo "$as_me: error: Cannot continue" >&2;}
3524   { (exit 1); exit 1; }; }
3525    fi
3526
3527
3528
3529    for ac_prog in date
3530do
3531  # Extract the first word of "$ac_prog", so it can be a program name with args.
3532set dummy $ac_prog; ac_word=$2
3533{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3534$as_echo_n "checking for $ac_word... " >&6; }
3535if test "${ac_cv_path_DATE+set}" = set; then
3536  $as_echo_n "(cached) " >&6
3537else
3538  case $DATE in
3539  [\\/]* | ?:[\\/]*)
3540  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
3541  ;;
3542  *)
3543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3544for as_dir in $PATH
3545do
3546  IFS=$as_save_IFS
3547  test -z "$as_dir" && as_dir=.
3548  for ac_exec_ext in '' $ac_executable_extensions; do
3549  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3550    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
3551    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3552    break 2
3553  fi
3554done
3555done
3556IFS=$as_save_IFS
3557
3558  ;;
3559esac
3560fi
3561DATE=$ac_cv_path_DATE
3562if test -n "$DATE"; then
3563  { $as_echo "$as_me:$LINENO: result: $DATE" >&5
3564$as_echo "$DATE" >&6; }
3565else
3566  { $as_echo "$as_me:$LINENO: result: no" >&5
3567$as_echo "no" >&6; }
3568fi
3569
3570
3571  test -n "$DATE" && break
3572done
3573
3574
3575    if test "x$DATE" = x; then
3576        if test "xdate" = x; then
3577          PROG_NAME=date
3578        else
3579          PROG_NAME=date
3580        fi
3581        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3582$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3583        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3584$as_echo "$as_me: error: Cannot continue" >&2;}
3585   { (exit 1); exit 1; }; }
3586    fi
3587
3588
3589
3590    for ac_prog in gdiff diff
3591do
3592  # Extract the first word of "$ac_prog", so it can be a program name with args.
3593set dummy $ac_prog; ac_word=$2
3594{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3595$as_echo_n "checking for $ac_word... " >&6; }
3596if test "${ac_cv_path_DIFF+set}" = set; then
3597  $as_echo_n "(cached) " >&6
3598else
3599  case $DIFF in
3600  [\\/]* | ?:[\\/]*)
3601  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
3602  ;;
3603  *)
3604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3605for as_dir in $PATH
3606do
3607  IFS=$as_save_IFS
3608  test -z "$as_dir" && as_dir=.
3609  for ac_exec_ext in '' $ac_executable_extensions; do
3610  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3611    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
3612    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3613    break 2
3614  fi
3615done
3616done
3617IFS=$as_save_IFS
3618
3619  ;;
3620esac
3621fi
3622DIFF=$ac_cv_path_DIFF
3623if test -n "$DIFF"; then
3624  { $as_echo "$as_me:$LINENO: result: $DIFF" >&5
3625$as_echo "$DIFF" >&6; }
3626else
3627  { $as_echo "$as_me:$LINENO: result: no" >&5
3628$as_echo "no" >&6; }
3629fi
3630
3631
3632  test -n "$DIFF" && break
3633done
3634
3635
3636    if test "x$DIFF" = x; then
3637        if test "xgdiff diff" = x; then
3638          PROG_NAME=diff
3639        else
3640          PROG_NAME=gdiff diff
3641        fi
3642        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3643$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3644        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3645$as_echo "$as_me: error: Cannot continue" >&2;}
3646   { (exit 1); exit 1; }; }
3647    fi
3648
3649
3650
3651    for ac_prog in dirname
3652do
3653  # Extract the first word of "$ac_prog", so it can be a program name with args.
3654set dummy $ac_prog; ac_word=$2
3655{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3656$as_echo_n "checking for $ac_word... " >&6; }
3657if test "${ac_cv_path_DIRNAME+set}" = set; then
3658  $as_echo_n "(cached) " >&6
3659else
3660  case $DIRNAME in
3661  [\\/]* | ?:[\\/]*)
3662  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
3663  ;;
3664  *)
3665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3666for as_dir in $PATH
3667do
3668  IFS=$as_save_IFS
3669  test -z "$as_dir" && as_dir=.
3670  for ac_exec_ext in '' $ac_executable_extensions; do
3671  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3672    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
3673    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3674    break 2
3675  fi
3676done
3677done
3678IFS=$as_save_IFS
3679
3680  ;;
3681esac
3682fi
3683DIRNAME=$ac_cv_path_DIRNAME
3684if test -n "$DIRNAME"; then
3685  { $as_echo "$as_me:$LINENO: result: $DIRNAME" >&5
3686$as_echo "$DIRNAME" >&6; }
3687else
3688  { $as_echo "$as_me:$LINENO: result: no" >&5
3689$as_echo "no" >&6; }
3690fi
3691
3692
3693  test -n "$DIRNAME" && break
3694done
3695
3696
3697    if test "x$DIRNAME" = x; then
3698        if test "xdirname" = x; then
3699          PROG_NAME=dirname
3700        else
3701          PROG_NAME=dirname
3702        fi
3703        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3704$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3705        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3706$as_echo "$as_me: error: Cannot continue" >&2;}
3707   { (exit 1); exit 1; }; }
3708    fi
3709
3710
3711
3712    for ac_prog in echo
3713do
3714  # Extract the first word of "$ac_prog", so it can be a program name with args.
3715set dummy $ac_prog; ac_word=$2
3716{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3717$as_echo_n "checking for $ac_word... " >&6; }
3718if test "${ac_cv_path_ECHO+set}" = set; then
3719  $as_echo_n "(cached) " >&6
3720else
3721  case $ECHO in
3722  [\\/]* | ?:[\\/]*)
3723  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
3724  ;;
3725  *)
3726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3727for as_dir in $PATH
3728do
3729  IFS=$as_save_IFS
3730  test -z "$as_dir" && as_dir=.
3731  for ac_exec_ext in '' $ac_executable_extensions; do
3732  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3733    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
3734    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3735    break 2
3736  fi
3737done
3738done
3739IFS=$as_save_IFS
3740
3741  ;;
3742esac
3743fi
3744ECHO=$ac_cv_path_ECHO
3745if test -n "$ECHO"; then
3746  { $as_echo "$as_me:$LINENO: result: $ECHO" >&5
3747$as_echo "$ECHO" >&6; }
3748else
3749  { $as_echo "$as_me:$LINENO: result: no" >&5
3750$as_echo "no" >&6; }
3751fi
3752
3753
3754  test -n "$ECHO" && break
3755done
3756
3757
3758    if test "x$ECHO" = x; then
3759        if test "xecho" = x; then
3760          PROG_NAME=echo
3761        else
3762          PROG_NAME=echo
3763        fi
3764        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3765$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3766        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3767$as_echo "$as_me: error: Cannot continue" >&2;}
3768   { (exit 1); exit 1; }; }
3769    fi
3770
3771
3772
3773    for ac_prog in expr
3774do
3775  # Extract the first word of "$ac_prog", so it can be a program name with args.
3776set dummy $ac_prog; ac_word=$2
3777{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3778$as_echo_n "checking for $ac_word... " >&6; }
3779if test "${ac_cv_path_EXPR+set}" = set; then
3780  $as_echo_n "(cached) " >&6
3781else
3782  case $EXPR in
3783  [\\/]* | ?:[\\/]*)
3784  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
3785  ;;
3786  *)
3787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3788for as_dir in $PATH
3789do
3790  IFS=$as_save_IFS
3791  test -z "$as_dir" && as_dir=.
3792  for ac_exec_ext in '' $ac_executable_extensions; do
3793  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3794    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
3795    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3796    break 2
3797  fi
3798done
3799done
3800IFS=$as_save_IFS
3801
3802  ;;
3803esac
3804fi
3805EXPR=$ac_cv_path_EXPR
3806if test -n "$EXPR"; then
3807  { $as_echo "$as_me:$LINENO: result: $EXPR" >&5
3808$as_echo "$EXPR" >&6; }
3809else
3810  { $as_echo "$as_me:$LINENO: result: no" >&5
3811$as_echo "no" >&6; }
3812fi
3813
3814
3815  test -n "$EXPR" && break
3816done
3817
3818
3819    if test "x$EXPR" = x; then
3820        if test "xexpr" = x; then
3821          PROG_NAME=expr
3822        else
3823          PROG_NAME=expr
3824        fi
3825        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3826$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3827        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3828$as_echo "$as_me: error: Cannot continue" >&2;}
3829   { (exit 1); exit 1; }; }
3830    fi
3831
3832
3833
3834    for ac_prog in file
3835do
3836  # Extract the first word of "$ac_prog", so it can be a program name with args.
3837set dummy $ac_prog; ac_word=$2
3838{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3839$as_echo_n "checking for $ac_word... " >&6; }
3840if test "${ac_cv_path_FILE+set}" = set; then
3841  $as_echo_n "(cached) " >&6
3842else
3843  case $FILE in
3844  [\\/]* | ?:[\\/]*)
3845  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
3846  ;;
3847  *)
3848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3849for as_dir in $PATH
3850do
3851  IFS=$as_save_IFS
3852  test -z "$as_dir" && as_dir=.
3853  for ac_exec_ext in '' $ac_executable_extensions; do
3854  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3855    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
3856    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3857    break 2
3858  fi
3859done
3860done
3861IFS=$as_save_IFS
3862
3863  ;;
3864esac
3865fi
3866FILE=$ac_cv_path_FILE
3867if test -n "$FILE"; then
3868  { $as_echo "$as_me:$LINENO: result: $FILE" >&5
3869$as_echo "$FILE" >&6; }
3870else
3871  { $as_echo "$as_me:$LINENO: result: no" >&5
3872$as_echo "no" >&6; }
3873fi
3874
3875
3876  test -n "$FILE" && break
3877done
3878
3879
3880    if test "x$FILE" = x; then
3881        if test "xfile" = x; then
3882          PROG_NAME=file
3883        else
3884          PROG_NAME=file
3885        fi
3886        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3887$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3888        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3889$as_echo "$as_me: error: Cannot continue" >&2;}
3890   { (exit 1); exit 1; }; }
3891    fi
3892
3893
3894
3895    for ac_prog in find
3896do
3897  # Extract the first word of "$ac_prog", so it can be a program name with args.
3898set dummy $ac_prog; ac_word=$2
3899{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3900$as_echo_n "checking for $ac_word... " >&6; }
3901if test "${ac_cv_path_FIND+set}" = set; then
3902  $as_echo_n "(cached) " >&6
3903else
3904  case $FIND in
3905  [\\/]* | ?:[\\/]*)
3906  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
3907  ;;
3908  *)
3909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3910for as_dir in $PATH
3911do
3912  IFS=$as_save_IFS
3913  test -z "$as_dir" && as_dir=.
3914  for ac_exec_ext in '' $ac_executable_extensions; do
3915  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3916    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
3917    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3918    break 2
3919  fi
3920done
3921done
3922IFS=$as_save_IFS
3923
3924  ;;
3925esac
3926fi
3927FIND=$ac_cv_path_FIND
3928if test -n "$FIND"; then
3929  { $as_echo "$as_me:$LINENO: result: $FIND" >&5
3930$as_echo "$FIND" >&6; }
3931else
3932  { $as_echo "$as_me:$LINENO: result: no" >&5
3933$as_echo "no" >&6; }
3934fi
3935
3936
3937  test -n "$FIND" && break
3938done
3939
3940
3941    if test "x$FIND" = x; then
3942        if test "xfind" = x; then
3943          PROG_NAME=find
3944        else
3945          PROG_NAME=find
3946        fi
3947        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3948$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3949        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3950$as_echo "$as_me: error: Cannot continue" >&2;}
3951   { (exit 1); exit 1; }; }
3952    fi
3953
3954
3955
3956    for ac_prog in head
3957do
3958  # Extract the first word of "$ac_prog", so it can be a program name with args.
3959set dummy $ac_prog; ac_word=$2
3960{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3961$as_echo_n "checking for $ac_word... " >&6; }
3962if test "${ac_cv_path_HEAD+set}" = set; then
3963  $as_echo_n "(cached) " >&6
3964else
3965  case $HEAD in
3966  [\\/]* | ?:[\\/]*)
3967  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
3968  ;;
3969  *)
3970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3971for as_dir in $PATH
3972do
3973  IFS=$as_save_IFS
3974  test -z "$as_dir" && as_dir=.
3975  for ac_exec_ext in '' $ac_executable_extensions; do
3976  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3977    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
3978    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3979    break 2
3980  fi
3981done
3982done
3983IFS=$as_save_IFS
3984
3985  ;;
3986esac
3987fi
3988HEAD=$ac_cv_path_HEAD
3989if test -n "$HEAD"; then
3990  { $as_echo "$as_me:$LINENO: result: $HEAD" >&5
3991$as_echo "$HEAD" >&6; }
3992else
3993  { $as_echo "$as_me:$LINENO: result: no" >&5
3994$as_echo "no" >&6; }
3995fi
3996
3997
3998  test -n "$HEAD" && break
3999done
4000
4001
4002    if test "x$HEAD" = x; then
4003        if test "xhead" = x; then
4004          PROG_NAME=head
4005        else
4006          PROG_NAME=head
4007        fi
4008        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4009$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4010        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4011$as_echo "$as_me: error: Cannot continue" >&2;}
4012   { (exit 1); exit 1; }; }
4013    fi
4014
4015
4016
4017    for ac_prog in ln
4018do
4019  # Extract the first word of "$ac_prog", so it can be a program name with args.
4020set dummy $ac_prog; ac_word=$2
4021{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4022$as_echo_n "checking for $ac_word... " >&6; }
4023if test "${ac_cv_path_LN+set}" = set; then
4024  $as_echo_n "(cached) " >&6
4025else
4026  case $LN in
4027  [\\/]* | ?:[\\/]*)
4028  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4029  ;;
4030  *)
4031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4032for as_dir in $PATH
4033do
4034  IFS=$as_save_IFS
4035  test -z "$as_dir" && as_dir=.
4036  for ac_exec_ext in '' $ac_executable_extensions; do
4037  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4038    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4039    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4040    break 2
4041  fi
4042done
4043done
4044IFS=$as_save_IFS
4045
4046  ;;
4047esac
4048fi
4049LN=$ac_cv_path_LN
4050if test -n "$LN"; then
4051  { $as_echo "$as_me:$LINENO: result: $LN" >&5
4052$as_echo "$LN" >&6; }
4053else
4054  { $as_echo "$as_me:$LINENO: result: no" >&5
4055$as_echo "no" >&6; }
4056fi
4057
4058
4059  test -n "$LN" && break
4060done
4061
4062
4063    if test "x$LN" = x; then
4064        if test "xln" = x; then
4065          PROG_NAME=ln
4066        else
4067          PROG_NAME=ln
4068        fi
4069        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4070$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4071        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4072$as_echo "$as_me: error: Cannot continue" >&2;}
4073   { (exit 1); exit 1; }; }
4074    fi
4075
4076
4077
4078    for ac_prog in ls
4079do
4080  # Extract the first word of "$ac_prog", so it can be a program name with args.
4081set dummy $ac_prog; ac_word=$2
4082{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4083$as_echo_n "checking for $ac_word... " >&6; }
4084if test "${ac_cv_path_LS+set}" = set; then
4085  $as_echo_n "(cached) " >&6
4086else
4087  case $LS in
4088  [\\/]* | ?:[\\/]*)
4089  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4090  ;;
4091  *)
4092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4093for as_dir in $PATH
4094do
4095  IFS=$as_save_IFS
4096  test -z "$as_dir" && as_dir=.
4097  for ac_exec_ext in '' $ac_executable_extensions; do
4098  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4099    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4100    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4101    break 2
4102  fi
4103done
4104done
4105IFS=$as_save_IFS
4106
4107  ;;
4108esac
4109fi
4110LS=$ac_cv_path_LS
4111if test -n "$LS"; then
4112  { $as_echo "$as_me:$LINENO: result: $LS" >&5
4113$as_echo "$LS" >&6; }
4114else
4115  { $as_echo "$as_me:$LINENO: result: no" >&5
4116$as_echo "no" >&6; }
4117fi
4118
4119
4120  test -n "$LS" && break
4121done
4122
4123
4124    if test "x$LS" = x; then
4125        if test "xls" = x; then
4126          PROG_NAME=ls
4127        else
4128          PROG_NAME=ls
4129        fi
4130        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4131$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4132        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4133$as_echo "$as_me: error: Cannot continue" >&2;}
4134   { (exit 1); exit 1; }; }
4135    fi
4136
4137
4138
4139    for ac_prog in mkdir
4140do
4141  # Extract the first word of "$ac_prog", so it can be a program name with args.
4142set dummy $ac_prog; ac_word=$2
4143{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4144$as_echo_n "checking for $ac_word... " >&6; }
4145if test "${ac_cv_path_MKDIR+set}" = set; then
4146  $as_echo_n "(cached) " >&6
4147else
4148  case $MKDIR in
4149  [\\/]* | ?:[\\/]*)
4150  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4151  ;;
4152  *)
4153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4154for as_dir in $PATH
4155do
4156  IFS=$as_save_IFS
4157  test -z "$as_dir" && as_dir=.
4158  for ac_exec_ext in '' $ac_executable_extensions; do
4159  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4160    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4161    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4162    break 2
4163  fi
4164done
4165done
4166IFS=$as_save_IFS
4167
4168  ;;
4169esac
4170fi
4171MKDIR=$ac_cv_path_MKDIR
4172if test -n "$MKDIR"; then
4173  { $as_echo "$as_me:$LINENO: result: $MKDIR" >&5
4174$as_echo "$MKDIR" >&6; }
4175else
4176  { $as_echo "$as_me:$LINENO: result: no" >&5
4177$as_echo "no" >&6; }
4178fi
4179
4180
4181  test -n "$MKDIR" && break
4182done
4183
4184
4185    if test "x$MKDIR" = x; then
4186        if test "xmkdir" = x; then
4187          PROG_NAME=mkdir
4188        else
4189          PROG_NAME=mkdir
4190        fi
4191        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4192$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4193        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4194$as_echo "$as_me: error: Cannot continue" >&2;}
4195   { (exit 1); exit 1; }; }
4196    fi
4197
4198
4199
4200    for ac_prog in mktemp
4201do
4202  # Extract the first word of "$ac_prog", so it can be a program name with args.
4203set dummy $ac_prog; ac_word=$2
4204{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4205$as_echo_n "checking for $ac_word... " >&6; }
4206if test "${ac_cv_path_MKTEMP+set}" = set; then
4207  $as_echo_n "(cached) " >&6
4208else
4209  case $MKTEMP in
4210  [\\/]* | ?:[\\/]*)
4211  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4212  ;;
4213  *)
4214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4215for as_dir in $PATH
4216do
4217  IFS=$as_save_IFS
4218  test -z "$as_dir" && as_dir=.
4219  for ac_exec_ext in '' $ac_executable_extensions; do
4220  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4221    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4222    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4223    break 2
4224  fi
4225done
4226done
4227IFS=$as_save_IFS
4228
4229  ;;
4230esac
4231fi
4232MKTEMP=$ac_cv_path_MKTEMP
4233if test -n "$MKTEMP"; then
4234  { $as_echo "$as_me:$LINENO: result: $MKTEMP" >&5
4235$as_echo "$MKTEMP" >&6; }
4236else
4237  { $as_echo "$as_me:$LINENO: result: no" >&5
4238$as_echo "no" >&6; }
4239fi
4240
4241
4242  test -n "$MKTEMP" && break
4243done
4244
4245
4246    if test "x$MKTEMP" = x; then
4247        if test "xmktemp" = x; then
4248          PROG_NAME=mktemp
4249        else
4250          PROG_NAME=mktemp
4251        fi
4252        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4253$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4254        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4255$as_echo "$as_me: error: Cannot continue" >&2;}
4256   { (exit 1); exit 1; }; }
4257    fi
4258
4259
4260
4261    for ac_prog in mv
4262do
4263  # Extract the first word of "$ac_prog", so it can be a program name with args.
4264set dummy $ac_prog; ac_word=$2
4265{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4266$as_echo_n "checking for $ac_word... " >&6; }
4267if test "${ac_cv_path_MV+set}" = set; then
4268  $as_echo_n "(cached) " >&6
4269else
4270  case $MV in
4271  [\\/]* | ?:[\\/]*)
4272  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4273  ;;
4274  *)
4275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4276for as_dir in $PATH
4277do
4278  IFS=$as_save_IFS
4279  test -z "$as_dir" && as_dir=.
4280  for ac_exec_ext in '' $ac_executable_extensions; do
4281  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4282    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4283    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4284    break 2
4285  fi
4286done
4287done
4288IFS=$as_save_IFS
4289
4290  ;;
4291esac
4292fi
4293MV=$ac_cv_path_MV
4294if test -n "$MV"; then
4295  { $as_echo "$as_me:$LINENO: result: $MV" >&5
4296$as_echo "$MV" >&6; }
4297else
4298  { $as_echo "$as_me:$LINENO: result: no" >&5
4299$as_echo "no" >&6; }
4300fi
4301
4302
4303  test -n "$MV" && break
4304done
4305
4306
4307    if test "x$MV" = x; then
4308        if test "xmv" = x; then
4309          PROG_NAME=mv
4310        else
4311          PROG_NAME=mv
4312        fi
4313        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4314$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4315        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4316$as_echo "$as_me: error: Cannot continue" >&2;}
4317   { (exit 1); exit 1; }; }
4318    fi
4319
4320
4321
4322    for ac_prog in printf
4323do
4324  # Extract the first word of "$ac_prog", so it can be a program name with args.
4325set dummy $ac_prog; ac_word=$2
4326{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4327$as_echo_n "checking for $ac_word... " >&6; }
4328if test "${ac_cv_path_PRINTF+set}" = set; then
4329  $as_echo_n "(cached) " >&6
4330else
4331  case $PRINTF in
4332  [\\/]* | ?:[\\/]*)
4333  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
4334  ;;
4335  *)
4336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4337for as_dir in $PATH
4338do
4339  IFS=$as_save_IFS
4340  test -z "$as_dir" && as_dir=.
4341  for ac_exec_ext in '' $ac_executable_extensions; do
4342  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4343    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
4344    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4345    break 2
4346  fi
4347done
4348done
4349IFS=$as_save_IFS
4350
4351  ;;
4352esac
4353fi
4354PRINTF=$ac_cv_path_PRINTF
4355if test -n "$PRINTF"; then
4356  { $as_echo "$as_me:$LINENO: result: $PRINTF" >&5
4357$as_echo "$PRINTF" >&6; }
4358else
4359  { $as_echo "$as_me:$LINENO: result: no" >&5
4360$as_echo "no" >&6; }
4361fi
4362
4363
4364  test -n "$PRINTF" && break
4365done
4366
4367
4368    if test "x$PRINTF" = x; then
4369        if test "xprintf" = x; then
4370          PROG_NAME=printf
4371        else
4372          PROG_NAME=printf
4373        fi
4374        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4375$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4376        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4377$as_echo "$as_me: error: Cannot continue" >&2;}
4378   { (exit 1); exit 1; }; }
4379    fi
4380
4381
4382
4383    for ac_prog in pwd
4384do
4385  # Extract the first word of "$ac_prog", so it can be a program name with args.
4386set dummy $ac_prog; ac_word=$2
4387{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4388$as_echo_n "checking for $ac_word... " >&6; }
4389if test "${ac_cv_path_THEPWDCMD+set}" = set; then
4390  $as_echo_n "(cached) " >&6
4391else
4392  case $THEPWDCMD in
4393  [\\/]* | ?:[\\/]*)
4394  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
4395  ;;
4396  *)
4397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4398for as_dir in $PATH
4399do
4400  IFS=$as_save_IFS
4401  test -z "$as_dir" && as_dir=.
4402  for ac_exec_ext in '' $ac_executable_extensions; do
4403  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4404    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
4405    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4406    break 2
4407  fi
4408done
4409done
4410IFS=$as_save_IFS
4411
4412  ;;
4413esac
4414fi
4415THEPWDCMD=$ac_cv_path_THEPWDCMD
4416if test -n "$THEPWDCMD"; then
4417  { $as_echo "$as_me:$LINENO: result: $THEPWDCMD" >&5
4418$as_echo "$THEPWDCMD" >&6; }
4419else
4420  { $as_echo "$as_me:$LINENO: result: no" >&5
4421$as_echo "no" >&6; }
4422fi
4423
4424
4425  test -n "$THEPWDCMD" && break
4426done
4427
4428
4429    if test "x$THEPWDCMD" = x; then
4430        if test "xpwd" = x; then
4431          PROG_NAME=thepwdcmd
4432        else
4433          PROG_NAME=pwd
4434        fi
4435        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4436$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4437        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4438$as_echo "$as_me: error: Cannot continue" >&2;}
4439   { (exit 1); exit 1; }; }
4440    fi
4441
4442
4443
4444    for ac_prog in rm
4445do
4446  # Extract the first word of "$ac_prog", so it can be a program name with args.
4447set dummy $ac_prog; ac_word=$2
4448{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4449$as_echo_n "checking for $ac_word... " >&6; }
4450if test "${ac_cv_path_RM+set}" = set; then
4451  $as_echo_n "(cached) " >&6
4452else
4453  case $RM in
4454  [\\/]* | ?:[\\/]*)
4455  ac_cv_path_RM="$RM" # Let the user override the test with a path.
4456  ;;
4457  *)
4458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4459for as_dir in $PATH
4460do
4461  IFS=$as_save_IFS
4462  test -z "$as_dir" && as_dir=.
4463  for ac_exec_ext in '' $ac_executable_extensions; do
4464  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4465    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
4466    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4467    break 2
4468  fi
4469done
4470done
4471IFS=$as_save_IFS
4472
4473  ;;
4474esac
4475fi
4476RM=$ac_cv_path_RM
4477if test -n "$RM"; then
4478  { $as_echo "$as_me:$LINENO: result: $RM" >&5
4479$as_echo "$RM" >&6; }
4480else
4481  { $as_echo "$as_me:$LINENO: result: no" >&5
4482$as_echo "no" >&6; }
4483fi
4484
4485
4486  test -n "$RM" && break
4487done
4488
4489
4490    if test "x$RM" = x; then
4491        if test "xrm" = x; then
4492          PROG_NAME=rm
4493        else
4494          PROG_NAME=rm
4495        fi
4496        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4497$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4498        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4499$as_echo "$as_me: error: Cannot continue" >&2;}
4500   { (exit 1); exit 1; }; }
4501    fi
4502
4503
4504
4505    for ac_prog in sh
4506do
4507  # Extract the first word of "$ac_prog", so it can be a program name with args.
4508set dummy $ac_prog; ac_word=$2
4509{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4510$as_echo_n "checking for $ac_word... " >&6; }
4511if test "${ac_cv_path_SH+set}" = set; then
4512  $as_echo_n "(cached) " >&6
4513else
4514  case $SH in
4515  [\\/]* | ?:[\\/]*)
4516  ac_cv_path_SH="$SH" # Let the user override the test with a path.
4517  ;;
4518  *)
4519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4520for as_dir in $PATH
4521do
4522  IFS=$as_save_IFS
4523  test -z "$as_dir" && as_dir=.
4524  for ac_exec_ext in '' $ac_executable_extensions; do
4525  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4526    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
4527    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4528    break 2
4529  fi
4530done
4531done
4532IFS=$as_save_IFS
4533
4534  ;;
4535esac
4536fi
4537SH=$ac_cv_path_SH
4538if test -n "$SH"; then
4539  { $as_echo "$as_me:$LINENO: result: $SH" >&5
4540$as_echo "$SH" >&6; }
4541else
4542  { $as_echo "$as_me:$LINENO: result: no" >&5
4543$as_echo "no" >&6; }
4544fi
4545
4546
4547  test -n "$SH" && break
4548done
4549
4550
4551    if test "x$SH" = x; then
4552        if test "xsh" = x; then
4553          PROG_NAME=sh
4554        else
4555          PROG_NAME=sh
4556        fi
4557        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4558$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4559        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4560$as_echo "$as_me: error: Cannot continue" >&2;}
4561   { (exit 1); exit 1; }; }
4562    fi
4563
4564
4565
4566    for ac_prog in sort
4567do
4568  # Extract the first word of "$ac_prog", so it can be a program name with args.
4569set dummy $ac_prog; ac_word=$2
4570{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4571$as_echo_n "checking for $ac_word... " >&6; }
4572if test "${ac_cv_path_SORT+set}" = set; then
4573  $as_echo_n "(cached) " >&6
4574else
4575  case $SORT in
4576  [\\/]* | ?:[\\/]*)
4577  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
4578  ;;
4579  *)
4580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4581for as_dir in $PATH
4582do
4583  IFS=$as_save_IFS
4584  test -z "$as_dir" && as_dir=.
4585  for ac_exec_ext in '' $ac_executable_extensions; do
4586  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4587    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
4588    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4589    break 2
4590  fi
4591done
4592done
4593IFS=$as_save_IFS
4594
4595  ;;
4596esac
4597fi
4598SORT=$ac_cv_path_SORT
4599if test -n "$SORT"; then
4600  { $as_echo "$as_me:$LINENO: result: $SORT" >&5
4601$as_echo "$SORT" >&6; }
4602else
4603  { $as_echo "$as_me:$LINENO: result: no" >&5
4604$as_echo "no" >&6; }
4605fi
4606
4607
4608  test -n "$SORT" && break
4609done
4610
4611
4612    if test "x$SORT" = x; then
4613        if test "xsort" = x; then
4614          PROG_NAME=sort
4615        else
4616          PROG_NAME=sort
4617        fi
4618        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4619$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4620        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4621$as_echo "$as_me: error: Cannot continue" >&2;}
4622   { (exit 1); exit 1; }; }
4623    fi
4624
4625
4626
4627    for ac_prog in tail
4628do
4629  # Extract the first word of "$ac_prog", so it can be a program name with args.
4630set dummy $ac_prog; ac_word=$2
4631{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4632$as_echo_n "checking for $ac_word... " >&6; }
4633if test "${ac_cv_path_TAIL+set}" = set; then
4634  $as_echo_n "(cached) " >&6
4635else
4636  case $TAIL in
4637  [\\/]* | ?:[\\/]*)
4638  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
4639  ;;
4640  *)
4641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4642for as_dir in $PATH
4643do
4644  IFS=$as_save_IFS
4645  test -z "$as_dir" && as_dir=.
4646  for ac_exec_ext in '' $ac_executable_extensions; do
4647  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4648    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
4649    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4650    break 2
4651  fi
4652done
4653done
4654IFS=$as_save_IFS
4655
4656  ;;
4657esac
4658fi
4659TAIL=$ac_cv_path_TAIL
4660if test -n "$TAIL"; then
4661  { $as_echo "$as_me:$LINENO: result: $TAIL" >&5
4662$as_echo "$TAIL" >&6; }
4663else
4664  { $as_echo "$as_me:$LINENO: result: no" >&5
4665$as_echo "no" >&6; }
4666fi
4667
4668
4669  test -n "$TAIL" && break
4670done
4671
4672
4673    if test "x$TAIL" = x; then
4674        if test "xtail" = x; then
4675          PROG_NAME=tail
4676        else
4677          PROG_NAME=tail
4678        fi
4679        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4680$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4681        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4682$as_echo "$as_me: error: Cannot continue" >&2;}
4683   { (exit 1); exit 1; }; }
4684    fi
4685
4686
4687
4688    for ac_prog in tar
4689do
4690  # Extract the first word of "$ac_prog", so it can be a program name with args.
4691set dummy $ac_prog; ac_word=$2
4692{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4693$as_echo_n "checking for $ac_word... " >&6; }
4694if test "${ac_cv_path_TAR+set}" = set; then
4695  $as_echo_n "(cached) " >&6
4696else
4697  case $TAR in
4698  [\\/]* | ?:[\\/]*)
4699  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4700  ;;
4701  *)
4702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4703for as_dir in $PATH
4704do
4705  IFS=$as_save_IFS
4706  test -z "$as_dir" && as_dir=.
4707  for ac_exec_ext in '' $ac_executable_extensions; do
4708  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4709    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4710    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4711    break 2
4712  fi
4713done
4714done
4715IFS=$as_save_IFS
4716
4717  ;;
4718esac
4719fi
4720TAR=$ac_cv_path_TAR
4721if test -n "$TAR"; then
4722  { $as_echo "$as_me:$LINENO: result: $TAR" >&5
4723$as_echo "$TAR" >&6; }
4724else
4725  { $as_echo "$as_me:$LINENO: result: no" >&5
4726$as_echo "no" >&6; }
4727fi
4728
4729
4730  test -n "$TAR" && break
4731done
4732
4733
4734    if test "x$TAR" = x; then
4735        if test "xtar" = x; then
4736          PROG_NAME=tar
4737        else
4738          PROG_NAME=tar
4739        fi
4740        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4741$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4742        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4743$as_echo "$as_me: error: Cannot continue" >&2;}
4744   { (exit 1); exit 1; }; }
4745    fi
4746
4747
4748
4749    for ac_prog in tee
4750do
4751  # Extract the first word of "$ac_prog", so it can be a program name with args.
4752set dummy $ac_prog; ac_word=$2
4753{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4754$as_echo_n "checking for $ac_word... " >&6; }
4755if test "${ac_cv_path_TEE+set}" = set; then
4756  $as_echo_n "(cached) " >&6
4757else
4758  case $TEE in
4759  [\\/]* | ?:[\\/]*)
4760  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
4761  ;;
4762  *)
4763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4764for as_dir in $PATH
4765do
4766  IFS=$as_save_IFS
4767  test -z "$as_dir" && as_dir=.
4768  for ac_exec_ext in '' $ac_executable_extensions; do
4769  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4770    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
4771    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4772    break 2
4773  fi
4774done
4775done
4776IFS=$as_save_IFS
4777
4778  ;;
4779esac
4780fi
4781TEE=$ac_cv_path_TEE
4782if test -n "$TEE"; then
4783  { $as_echo "$as_me:$LINENO: result: $TEE" >&5
4784$as_echo "$TEE" >&6; }
4785else
4786  { $as_echo "$as_me:$LINENO: result: no" >&5
4787$as_echo "no" >&6; }
4788fi
4789
4790
4791  test -n "$TEE" && break
4792done
4793
4794
4795    if test "x$TEE" = x; then
4796        if test "xtee" = x; then
4797          PROG_NAME=tee
4798        else
4799          PROG_NAME=tee
4800        fi
4801        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4802$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4803        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4804$as_echo "$as_me: error: Cannot continue" >&2;}
4805   { (exit 1); exit 1; }; }
4806    fi
4807
4808
4809
4810    for ac_prog in touch
4811do
4812  # Extract the first word of "$ac_prog", so it can be a program name with args.
4813set dummy $ac_prog; ac_word=$2
4814{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4815$as_echo_n "checking for $ac_word... " >&6; }
4816if test "${ac_cv_path_TOUCH+set}" = set; then
4817  $as_echo_n "(cached) " >&6
4818else
4819  case $TOUCH in
4820  [\\/]* | ?:[\\/]*)
4821  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
4822  ;;
4823  *)
4824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4825for as_dir in $PATH
4826do
4827  IFS=$as_save_IFS
4828  test -z "$as_dir" && as_dir=.
4829  for ac_exec_ext in '' $ac_executable_extensions; do
4830  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4831    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
4832    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4833    break 2
4834  fi
4835done
4836done
4837IFS=$as_save_IFS
4838
4839  ;;
4840esac
4841fi
4842TOUCH=$ac_cv_path_TOUCH
4843if test -n "$TOUCH"; then
4844  { $as_echo "$as_me:$LINENO: result: $TOUCH" >&5
4845$as_echo "$TOUCH" >&6; }
4846else
4847  { $as_echo "$as_me:$LINENO: result: no" >&5
4848$as_echo "no" >&6; }
4849fi
4850
4851
4852  test -n "$TOUCH" && break
4853done
4854
4855
4856    if test "x$TOUCH" = x; then
4857        if test "xtouch" = x; then
4858          PROG_NAME=touch
4859        else
4860          PROG_NAME=touch
4861        fi
4862        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4863$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4864        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4865$as_echo "$as_me: error: Cannot continue" >&2;}
4866   { (exit 1); exit 1; }; }
4867    fi
4868
4869
4870
4871    for ac_prog in tr
4872do
4873  # Extract the first word of "$ac_prog", so it can be a program name with args.
4874set dummy $ac_prog; ac_word=$2
4875{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4876$as_echo_n "checking for $ac_word... " >&6; }
4877if test "${ac_cv_path_TR+set}" = set; then
4878  $as_echo_n "(cached) " >&6
4879else
4880  case $TR in
4881  [\\/]* | ?:[\\/]*)
4882  ac_cv_path_TR="$TR" # Let the user override the test with a path.
4883  ;;
4884  *)
4885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4886for as_dir in $PATH
4887do
4888  IFS=$as_save_IFS
4889  test -z "$as_dir" && as_dir=.
4890  for ac_exec_ext in '' $ac_executable_extensions; do
4891  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4892    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
4893    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4894    break 2
4895  fi
4896done
4897done
4898IFS=$as_save_IFS
4899
4900  ;;
4901esac
4902fi
4903TR=$ac_cv_path_TR
4904if test -n "$TR"; then
4905  { $as_echo "$as_me:$LINENO: result: $TR" >&5
4906$as_echo "$TR" >&6; }
4907else
4908  { $as_echo "$as_me:$LINENO: result: no" >&5
4909$as_echo "no" >&6; }
4910fi
4911
4912
4913  test -n "$TR" && break
4914done
4915
4916
4917    if test "x$TR" = x; then
4918        if test "xtr" = x; then
4919          PROG_NAME=tr
4920        else
4921          PROG_NAME=tr
4922        fi
4923        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4924$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4925        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4926$as_echo "$as_me: error: Cannot continue" >&2;}
4927   { (exit 1); exit 1; }; }
4928    fi
4929
4930
4931
4932    for ac_prog in uname
4933do
4934  # Extract the first word of "$ac_prog", so it can be a program name with args.
4935set dummy $ac_prog; ac_word=$2
4936{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4937$as_echo_n "checking for $ac_word... " >&6; }
4938if test "${ac_cv_path_UNAME+set}" = set; then
4939  $as_echo_n "(cached) " >&6
4940else
4941  case $UNAME in
4942  [\\/]* | ?:[\\/]*)
4943  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
4944  ;;
4945  *)
4946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4947for as_dir in $PATH
4948do
4949  IFS=$as_save_IFS
4950  test -z "$as_dir" && as_dir=.
4951  for ac_exec_ext in '' $ac_executable_extensions; do
4952  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4953    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
4954    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4955    break 2
4956  fi
4957done
4958done
4959IFS=$as_save_IFS
4960
4961  ;;
4962esac
4963fi
4964UNAME=$ac_cv_path_UNAME
4965if test -n "$UNAME"; then
4966  { $as_echo "$as_me:$LINENO: result: $UNAME" >&5
4967$as_echo "$UNAME" >&6; }
4968else
4969  { $as_echo "$as_me:$LINENO: result: no" >&5
4970$as_echo "no" >&6; }
4971fi
4972
4973
4974  test -n "$UNAME" && break
4975done
4976
4977
4978    if test "x$UNAME" = x; then
4979        if test "xuname" = x; then
4980          PROG_NAME=uname
4981        else
4982          PROG_NAME=uname
4983        fi
4984        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4985$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4986        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4987$as_echo "$as_me: error: Cannot continue" >&2;}
4988   { (exit 1); exit 1; }; }
4989    fi
4990
4991
4992
4993    for ac_prog in uniq
4994do
4995  # Extract the first word of "$ac_prog", so it can be a program name with args.
4996set dummy $ac_prog; ac_word=$2
4997{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4998$as_echo_n "checking for $ac_word... " >&6; }
4999if test "${ac_cv_path_UNIQ+set}" = set; then
5000  $as_echo_n "(cached) " >&6
5001else
5002  case $UNIQ in
5003  [\\/]* | ?:[\\/]*)
5004  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5005  ;;
5006  *)
5007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5008for as_dir in $PATH
5009do
5010  IFS=$as_save_IFS
5011  test -z "$as_dir" && as_dir=.
5012  for ac_exec_ext in '' $ac_executable_extensions; do
5013  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5014    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5015    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5016    break 2
5017  fi
5018done
5019done
5020IFS=$as_save_IFS
5021
5022  ;;
5023esac
5024fi
5025UNIQ=$ac_cv_path_UNIQ
5026if test -n "$UNIQ"; then
5027  { $as_echo "$as_me:$LINENO: result: $UNIQ" >&5
5028$as_echo "$UNIQ" >&6; }
5029else
5030  { $as_echo "$as_me:$LINENO: result: no" >&5
5031$as_echo "no" >&6; }
5032fi
5033
5034
5035  test -n "$UNIQ" && break
5036done
5037
5038
5039    if test "x$UNIQ" = x; then
5040        if test "xuniq" = x; then
5041          PROG_NAME=uniq
5042        else
5043          PROG_NAME=uniq
5044        fi
5045        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5046$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5047        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5048$as_echo "$as_me: error: Cannot continue" >&2;}
5049   { (exit 1); exit 1; }; }
5050    fi
5051
5052
5053
5054    for ac_prog in wc
5055do
5056  # Extract the first word of "$ac_prog", so it can be a program name with args.
5057set dummy $ac_prog; ac_word=$2
5058{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5059$as_echo_n "checking for $ac_word... " >&6; }
5060if test "${ac_cv_path_WC+set}" = set; then
5061  $as_echo_n "(cached) " >&6
5062else
5063  case $WC in
5064  [\\/]* | ?:[\\/]*)
5065  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5066  ;;
5067  *)
5068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5069for as_dir in $PATH
5070do
5071  IFS=$as_save_IFS
5072  test -z "$as_dir" && as_dir=.
5073  for ac_exec_ext in '' $ac_executable_extensions; do
5074  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5075    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5076    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5077    break 2
5078  fi
5079done
5080done
5081IFS=$as_save_IFS
5082
5083  ;;
5084esac
5085fi
5086WC=$ac_cv_path_WC
5087if test -n "$WC"; then
5088  { $as_echo "$as_me:$LINENO: result: $WC" >&5
5089$as_echo "$WC" >&6; }
5090else
5091  { $as_echo "$as_me:$LINENO: result: no" >&5
5092$as_echo "no" >&6; }
5093fi
5094
5095
5096  test -n "$WC" && break
5097done
5098
5099
5100    if test "x$WC" = x; then
5101        if test "xwc" = x; then
5102          PROG_NAME=wc
5103        else
5104          PROG_NAME=wc
5105        fi
5106        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5107$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5108        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5109$as_echo "$as_me: error: Cannot continue" >&2;}
5110   { (exit 1); exit 1; }; }
5111    fi
5112
5113
5114
5115    for ac_prog in which
5116do
5117  # Extract the first word of "$ac_prog", so it can be a program name with args.
5118set dummy $ac_prog; ac_word=$2
5119{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5120$as_echo_n "checking for $ac_word... " >&6; }
5121if test "${ac_cv_path_WHICH+set}" = set; then
5122  $as_echo_n "(cached) " >&6
5123else
5124  case $WHICH in
5125  [\\/]* | ?:[\\/]*)
5126  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5127  ;;
5128  *)
5129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5130for as_dir in $PATH
5131do
5132  IFS=$as_save_IFS
5133  test -z "$as_dir" && as_dir=.
5134  for ac_exec_ext in '' $ac_executable_extensions; do
5135  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5136    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5137    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5138    break 2
5139  fi
5140done
5141done
5142IFS=$as_save_IFS
5143
5144  ;;
5145esac
5146fi
5147WHICH=$ac_cv_path_WHICH
5148if test -n "$WHICH"; then
5149  { $as_echo "$as_me:$LINENO: result: $WHICH" >&5
5150$as_echo "$WHICH" >&6; }
5151else
5152  { $as_echo "$as_me:$LINENO: result: no" >&5
5153$as_echo "no" >&6; }
5154fi
5155
5156
5157  test -n "$WHICH" && break
5158done
5159
5160
5161    if test "x$WHICH" = x; then
5162        if test "xwhich" = x; then
5163          PROG_NAME=which
5164        else
5165          PROG_NAME=which
5166        fi
5167        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5168$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5169        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5170$as_echo "$as_me: error: Cannot continue" >&2;}
5171   { (exit 1); exit 1; }; }
5172    fi
5173
5174
5175
5176    for ac_prog in xargs
5177do
5178  # Extract the first word of "$ac_prog", so it can be a program name with args.
5179set dummy $ac_prog; ac_word=$2
5180{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5181$as_echo_n "checking for $ac_word... " >&6; }
5182if test "${ac_cv_path_XARGS+set}" = set; then
5183  $as_echo_n "(cached) " >&6
5184else
5185  case $XARGS in
5186  [\\/]* | ?:[\\/]*)
5187  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5188  ;;
5189  *)
5190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5191for as_dir in $PATH
5192do
5193  IFS=$as_save_IFS
5194  test -z "$as_dir" && as_dir=.
5195  for ac_exec_ext in '' $ac_executable_extensions; do
5196  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5197    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5198    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5199    break 2
5200  fi
5201done
5202done
5203IFS=$as_save_IFS
5204
5205  ;;
5206esac
5207fi
5208XARGS=$ac_cv_path_XARGS
5209if test -n "$XARGS"; then
5210  { $as_echo "$as_me:$LINENO: result: $XARGS" >&5
5211$as_echo "$XARGS" >&6; }
5212else
5213  { $as_echo "$as_me:$LINENO: result: no" >&5
5214$as_echo "no" >&6; }
5215fi
5216
5217
5218  test -n "$XARGS" && break
5219done
5220
5221
5222    if test "x$XARGS" = x; then
5223        if test "xxargs" = x; then
5224          PROG_NAME=xargs
5225        else
5226          PROG_NAME=xargs
5227        fi
5228        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5229$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5230        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5231$as_echo "$as_me: error: Cannot continue" >&2;}
5232   { (exit 1); exit 1; }; }
5233    fi
5234
5235
5236
5237# Then required tools that require some special treatment.
5238for ac_prog in gawk mawk nawk awk
5239do
5240  # Extract the first word of "$ac_prog", so it can be a program name with args.
5241set dummy $ac_prog; ac_word=$2
5242{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5243$as_echo_n "checking for $ac_word... " >&6; }
5244if test "${ac_cv_prog_AWK+set}" = set; then
5245  $as_echo_n "(cached) " >&6
5246else
5247  if test -n "$AWK"; then
5248  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5249else
5250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5251for as_dir in $PATH
5252do
5253  IFS=$as_save_IFS
5254  test -z "$as_dir" && as_dir=.
5255  for ac_exec_ext in '' $ac_executable_extensions; do
5256  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5257    ac_cv_prog_AWK="$ac_prog"
5258    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5259    break 2
5260  fi
5261done
5262done
5263IFS=$as_save_IFS
5264
5265fi
5266fi
5267AWK=$ac_cv_prog_AWK
5268if test -n "$AWK"; then
5269  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
5270$as_echo "$AWK" >&6; }
5271else
5272  { $as_echo "$as_me:$LINENO: result: no" >&5
5273$as_echo "no" >&6; }
5274fi
5275
5276
5277  test -n "$AWK" && break
5278done
5279
5280
5281    if test "x$AWK" = x; then
5282        if test "x" = x; then
5283          PROG_NAME=awk
5284        else
5285          PROG_NAME=
5286        fi
5287        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5288$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5289        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5290$as_echo "$as_me: error: Cannot continue" >&2;}
5291   { (exit 1); exit 1; }; }
5292    fi
5293
5294{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
5295$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5296if test "${ac_cv_path_GREP+set}" = set; then
5297  $as_echo_n "(cached) " >&6
5298else
5299  if test -z "$GREP"; then
5300  ac_path_GREP_found=false
5301  # Loop through the user's path and test for each of PROGNAME-LIST
5302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5303for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5304do
5305  IFS=$as_save_IFS
5306  test -z "$as_dir" && as_dir=.
5307  for ac_prog in grep ggrep; do
5308    for ac_exec_ext in '' $ac_executable_extensions; do
5309      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5310      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5311# Check for GNU ac_path_GREP and select it if it is found.
5312  # Check for GNU $ac_path_GREP
5313case `"$ac_path_GREP" --version 2>&1` in
5314*GNU*)
5315  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5316*)
5317  ac_count=0
5318  $as_echo_n 0123456789 >"conftest.in"
5319  while :
5320  do
5321    cat "conftest.in" "conftest.in" >"conftest.tmp"
5322    mv "conftest.tmp" "conftest.in"
5323    cp "conftest.in" "conftest.nl"
5324    $as_echo 'GREP' >> "conftest.nl"
5325    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5326    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5327    ac_count=`expr $ac_count + 1`
5328    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5329      # Best one so far, save it but keep looking for a better one
5330      ac_cv_path_GREP="$ac_path_GREP"
5331      ac_path_GREP_max=$ac_count
5332    fi
5333    # 10*(2^10) chars as input seems more than enough
5334    test $ac_count -gt 10 && break
5335  done
5336  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5337esac
5338
5339      $ac_path_GREP_found && break 3
5340    done
5341  done
5342done
5343IFS=$as_save_IFS
5344  if test -z "$ac_cv_path_GREP"; then
5345    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5346$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5347   { (exit 1); exit 1; }; }
5348  fi
5349else
5350  ac_cv_path_GREP=$GREP
5351fi
5352
5353fi
5354{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
5355$as_echo "$ac_cv_path_GREP" >&6; }
5356 GREP="$ac_cv_path_GREP"
5357
5358
5359
5360    if test "x$GREP" = x; then
5361        if test "x" = x; then
5362          PROG_NAME=grep
5363        else
5364          PROG_NAME=
5365        fi
5366        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5367$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5368        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5369$as_echo "$as_me: error: Cannot continue" >&2;}
5370   { (exit 1); exit 1; }; }
5371    fi
5372
5373{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
5374$as_echo_n "checking for egrep... " >&6; }
5375if test "${ac_cv_path_EGREP+set}" = set; then
5376  $as_echo_n "(cached) " >&6
5377else
5378  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5379   then ac_cv_path_EGREP="$GREP -E"
5380   else
5381     if test -z "$EGREP"; then
5382  ac_path_EGREP_found=false
5383  # Loop through the user's path and test for each of PROGNAME-LIST
5384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5385for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5386do
5387  IFS=$as_save_IFS
5388  test -z "$as_dir" && as_dir=.
5389  for ac_prog in egrep; do
5390    for ac_exec_ext in '' $ac_executable_extensions; do
5391      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5392      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5393# Check for GNU ac_path_EGREP and select it if it is found.
5394  # Check for GNU $ac_path_EGREP
5395case `"$ac_path_EGREP" --version 2>&1` in
5396*GNU*)
5397  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5398*)
5399  ac_count=0
5400  $as_echo_n 0123456789 >"conftest.in"
5401  while :
5402  do
5403    cat "conftest.in" "conftest.in" >"conftest.tmp"
5404    mv "conftest.tmp" "conftest.in"
5405    cp "conftest.in" "conftest.nl"
5406    $as_echo 'EGREP' >> "conftest.nl"
5407    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5408    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5409    ac_count=`expr $ac_count + 1`
5410    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5411      # Best one so far, save it but keep looking for a better one
5412      ac_cv_path_EGREP="$ac_path_EGREP"
5413      ac_path_EGREP_max=$ac_count
5414    fi
5415    # 10*(2^10) chars as input seems more than enough
5416    test $ac_count -gt 10 && break
5417  done
5418  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5419esac
5420
5421      $ac_path_EGREP_found && break 3
5422    done
5423  done
5424done
5425IFS=$as_save_IFS
5426  if test -z "$ac_cv_path_EGREP"; then
5427    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5428$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5429   { (exit 1); exit 1; }; }
5430  fi
5431else
5432  ac_cv_path_EGREP=$EGREP
5433fi
5434
5435   fi
5436fi
5437{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
5438$as_echo "$ac_cv_path_EGREP" >&6; }
5439 EGREP="$ac_cv_path_EGREP"
5440
5441
5442
5443    if test "x$EGREP" = x; then
5444        if test "x" = x; then
5445          PROG_NAME=egrep
5446        else
5447          PROG_NAME=
5448        fi
5449        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5450$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5451        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5452$as_echo "$as_me: error: Cannot continue" >&2;}
5453   { (exit 1); exit 1; }; }
5454    fi
5455
5456{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5
5457$as_echo_n "checking for fgrep... " >&6; }
5458if test "${ac_cv_path_FGREP+set}" = set; then
5459  $as_echo_n "(cached) " >&6
5460else
5461  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5462   then ac_cv_path_FGREP="$GREP -F"
5463   else
5464     if test -z "$FGREP"; then
5465  ac_path_FGREP_found=false
5466  # Loop through the user's path and test for each of PROGNAME-LIST
5467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5468for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5469do
5470  IFS=$as_save_IFS
5471  test -z "$as_dir" && as_dir=.
5472  for ac_prog in fgrep; do
5473    for ac_exec_ext in '' $ac_executable_extensions; do
5474      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
5475      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
5476# Check for GNU ac_path_FGREP and select it if it is found.
5477  # Check for GNU $ac_path_FGREP
5478case `"$ac_path_FGREP" --version 2>&1` in
5479*GNU*)
5480  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
5481*)
5482  ac_count=0
5483  $as_echo_n 0123456789 >"conftest.in"
5484  while :
5485  do
5486    cat "conftest.in" "conftest.in" >"conftest.tmp"
5487    mv "conftest.tmp" "conftest.in"
5488    cp "conftest.in" "conftest.nl"
5489    $as_echo 'FGREP' >> "conftest.nl"
5490    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
5491    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5492    ac_count=`expr $ac_count + 1`
5493    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
5494      # Best one so far, save it but keep looking for a better one
5495      ac_cv_path_FGREP="$ac_path_FGREP"
5496      ac_path_FGREP_max=$ac_count
5497    fi
5498    # 10*(2^10) chars as input seems more than enough
5499    test $ac_count -gt 10 && break
5500  done
5501  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5502esac
5503
5504      $ac_path_FGREP_found && break 3
5505    done
5506  done
5507done
5508IFS=$as_save_IFS
5509  if test -z "$ac_cv_path_FGREP"; then
5510    { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5511$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5512   { (exit 1); exit 1; }; }
5513  fi
5514else
5515  ac_cv_path_FGREP=$FGREP
5516fi
5517
5518   fi
5519fi
5520{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5
5521$as_echo "$ac_cv_path_FGREP" >&6; }
5522 FGREP="$ac_cv_path_FGREP"
5523
5524
5525
5526    if test "x$FGREP" = x; then
5527        if test "x" = x; then
5528          PROG_NAME=fgrep
5529        else
5530          PROG_NAME=
5531        fi
5532        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5533$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5534        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5535$as_echo "$as_me: error: Cannot continue" >&2;}
5536   { (exit 1); exit 1; }; }
5537    fi
5538
5539{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
5540$as_echo_n "checking for a sed that does not truncate output... " >&6; }
5541if test "${ac_cv_path_SED+set}" = set; then
5542  $as_echo_n "(cached) " >&6
5543else
5544            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
5545     for ac_i in 1 2 3 4 5 6 7; do
5546       ac_script="$ac_script$as_nl$ac_script"
5547     done
5548     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
5549     $as_unset ac_script || ac_script=
5550     if test -z "$SED"; then
5551  ac_path_SED_found=false
5552  # Loop through the user's path and test for each of PROGNAME-LIST
5553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5554for as_dir in $PATH
5555do
5556  IFS=$as_save_IFS
5557  test -z "$as_dir" && as_dir=.
5558  for ac_prog in sed gsed; do
5559    for ac_exec_ext in '' $ac_executable_extensions; do
5560      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
5561      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
5562# Check for GNU ac_path_SED and select it if it is found.
5563  # Check for GNU $ac_path_SED
5564case `"$ac_path_SED" --version 2>&1` in
5565*GNU*)
5566  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
5567*)
5568  ac_count=0
5569  $as_echo_n 0123456789 >"conftest.in"
5570  while :
5571  do
5572    cat "conftest.in" "conftest.in" >"conftest.tmp"
5573    mv "conftest.tmp" "conftest.in"
5574    cp "conftest.in" "conftest.nl"
5575    $as_echo '' >> "conftest.nl"
5576    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
5577    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5578    ac_count=`expr $ac_count + 1`
5579    if test $ac_count -gt ${ac_path_SED_max-0}; then
5580      # Best one so far, save it but keep looking for a better one
5581      ac_cv_path_SED="$ac_path_SED"
5582      ac_path_SED_max=$ac_count
5583    fi
5584    # 10*(2^10) chars as input seems more than enough
5585    test $ac_count -gt 10 && break
5586  done
5587  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5588esac
5589
5590      $ac_path_SED_found && break 3
5591    done
5592  done
5593done
5594IFS=$as_save_IFS
5595  if test -z "$ac_cv_path_SED"; then
5596    { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5
5597$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;}
5598   { (exit 1); exit 1; }; }
5599  fi
5600else
5601  ac_cv_path_SED=$SED
5602fi
5603
5604fi
5605{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5
5606$as_echo "$ac_cv_path_SED" >&6; }
5607 SED="$ac_cv_path_SED"
5608  rm -f conftest.sed
5609
5610
5611    if test "x$SED" = x; then
5612        if test "x" = x; then
5613          PROG_NAME=sed
5614        else
5615          PROG_NAME=
5616        fi
5617        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5618$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5619        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5620$as_echo "$as_me: error: Cannot continue" >&2;}
5621   { (exit 1); exit 1; }; }
5622    fi
5623
5624
5625for ac_prog in nawk gawk awk
5626do
5627  # Extract the first word of "$ac_prog", so it can be a program name with args.
5628set dummy $ac_prog; ac_word=$2
5629{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5630$as_echo_n "checking for $ac_word... " >&6; }
5631if test "${ac_cv_path_NAWK+set}" = set; then
5632  $as_echo_n "(cached) " >&6
5633else
5634  case $NAWK in
5635  [\\/]* | ?:[\\/]*)
5636  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
5637  ;;
5638  *)
5639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5640for as_dir in $PATH
5641do
5642  IFS=$as_save_IFS
5643  test -z "$as_dir" && as_dir=.
5644  for ac_exec_ext in '' $ac_executable_extensions; do
5645  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5646    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
5647    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5648    break 2
5649  fi
5650done
5651done
5652IFS=$as_save_IFS
5653
5654  ;;
5655esac
5656fi
5657NAWK=$ac_cv_path_NAWK
5658if test -n "$NAWK"; then
5659  { $as_echo "$as_me:$LINENO: result: $NAWK" >&5
5660$as_echo "$NAWK" >&6; }
5661else
5662  { $as_echo "$as_me:$LINENO: result: no" >&5
5663$as_echo "no" >&6; }
5664fi
5665
5666
5667  test -n "$NAWK" && break
5668done
5669
5670
5671    if test "x$NAWK" = x; then
5672        if test "x" = x; then
5673          PROG_NAME=nawk
5674        else
5675          PROG_NAME=
5676        fi
5677        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5678$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5679        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5680$as_echo "$as_me: error: Cannot continue" >&2;}
5681   { (exit 1); exit 1; }; }
5682    fi
5683
5684
5685# Always force rm.
5686RM="$RM -f"
5687
5688# These are not required on all platforms
5689# Extract the first word of "cygpath", so it can be a program name with args.
5690set dummy cygpath; ac_word=$2
5691{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5692$as_echo_n "checking for $ac_word... " >&6; }
5693if test "${ac_cv_path_CYGPATH+set}" = set; then
5694  $as_echo_n "(cached) " >&6
5695else
5696  case $CYGPATH in
5697  [\\/]* | ?:[\\/]*)
5698  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
5699  ;;
5700  *)
5701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5702for as_dir in $PATH
5703do
5704  IFS=$as_save_IFS
5705  test -z "$as_dir" && as_dir=.
5706  for ac_exec_ext in '' $ac_executable_extensions; do
5707  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5708    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
5709    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5710    break 2
5711  fi
5712done
5713done
5714IFS=$as_save_IFS
5715
5716  ;;
5717esac
5718fi
5719CYGPATH=$ac_cv_path_CYGPATH
5720if test -n "$CYGPATH"; then
5721  { $as_echo "$as_me:$LINENO: result: $CYGPATH" >&5
5722$as_echo "$CYGPATH" >&6; }
5723else
5724  { $as_echo "$as_me:$LINENO: result: no" >&5
5725$as_echo "no" >&6; }
5726fi
5727
5728
5729# Extract the first word of "readlink", so it can be a program name with args.
5730set dummy readlink; ac_word=$2
5731{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5732$as_echo_n "checking for $ac_word... " >&6; }
5733if test "${ac_cv_path_READLINK+set}" = set; then
5734  $as_echo_n "(cached) " >&6
5735else
5736  case $READLINK in
5737  [\\/]* | ?:[\\/]*)
5738  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
5739  ;;
5740  *)
5741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5742for as_dir in $PATH
5743do
5744  IFS=$as_save_IFS
5745  test -z "$as_dir" && as_dir=.
5746  for ac_exec_ext in '' $ac_executable_extensions; do
5747  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5748    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
5749    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5750    break 2
5751  fi
5752done
5753done
5754IFS=$as_save_IFS
5755
5756  ;;
5757esac
5758fi
5759READLINK=$ac_cv_path_READLINK
5760if test -n "$READLINK"; then
5761  { $as_echo "$as_me:$LINENO: result: $READLINK" >&5
5762$as_echo "$READLINK" >&6; }
5763else
5764  { $as_echo "$as_me:$LINENO: result: no" >&5
5765$as_echo "no" >&6; }
5766fi
5767
5768
5769# Extract the first word of "df", so it can be a program name with args.
5770set dummy df; ac_word=$2
5771{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5772$as_echo_n "checking for $ac_word... " >&6; }
5773if test "${ac_cv_path_DF+set}" = set; then
5774  $as_echo_n "(cached) " >&6
5775else
5776  case $DF in
5777  [\\/]* | ?:[\\/]*)
5778  ac_cv_path_DF="$DF" # Let the user override the test with a path.
5779  ;;
5780  *)
5781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5782for as_dir in $PATH
5783do
5784  IFS=$as_save_IFS
5785  test -z "$as_dir" && as_dir=.
5786  for ac_exec_ext in '' $ac_executable_extensions; do
5787  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5788    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
5789    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5790    break 2
5791  fi
5792done
5793done
5794IFS=$as_save_IFS
5795
5796  ;;
5797esac
5798fi
5799DF=$ac_cv_path_DF
5800if test -n "$DF"; then
5801  { $as_echo "$as_me:$LINENO: result: $DF" >&5
5802$as_echo "$DF" >&6; }
5803else
5804  { $as_echo "$as_me:$LINENO: result: no" >&5
5805$as_echo "no" >&6; }
5806fi
5807
5808
5809# Extract the first word of "SetFile", so it can be a program name with args.
5810set dummy SetFile; ac_word=$2
5811{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5812$as_echo_n "checking for $ac_word... " >&6; }
5813if test "${ac_cv_path_SETFILE+set}" = set; then
5814  $as_echo_n "(cached) " >&6
5815else
5816  case $SETFILE in
5817  [\\/]* | ?:[\\/]*)
5818  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
5819  ;;
5820  *)
5821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5822for as_dir in $PATH
5823do
5824  IFS=$as_save_IFS
5825  test -z "$as_dir" && as_dir=.
5826  for ac_exec_ext in '' $ac_executable_extensions; do
5827  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5828    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
5829    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5830    break 2
5831  fi
5832done
5833done
5834IFS=$as_save_IFS
5835
5836  ;;
5837esac
5838fi
5839SETFILE=$ac_cv_path_SETFILE
5840if test -n "$SETFILE"; then
5841  { $as_echo "$as_me:$LINENO: result: $SETFILE" >&5
5842$as_echo "$SETFILE" >&6; }
5843else
5844  { $as_echo "$as_me:$LINENO: result: no" >&5
5845$as_echo "no" >&6; }
5846fi
5847
5848
5849
5850
5851# Now we can determine OpenJDK build and target platforms. This is required to
5852# have early on.
5853
5854# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
5855# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
5856# product you're building. The target of this build is called "host". Since this is confusing to most people, we
5857# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
5858# to use the configure naming style.
5859# Make sure we can run config.sub.
5860$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5861  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
5862$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
5863   { (exit 1); exit 1; }; }
5864
5865{ $as_echo "$as_me:$LINENO: checking build system type" >&5
5866$as_echo_n "checking build system type... " >&6; }
5867if test "${ac_cv_build+set}" = set; then
5868  $as_echo_n "(cached) " >&6
5869else
5870  ac_build_alias=$build_alias
5871test "x$ac_build_alias" = x &&
5872  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5873test "x$ac_build_alias" = x &&
5874  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
5875$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
5876   { (exit 1); exit 1; }; }
5877ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5878  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
5879$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
5880   { (exit 1); exit 1; }; }
5881
5882fi
5883{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
5884$as_echo "$ac_cv_build" >&6; }
5885case $ac_cv_build in
5886*-*-*) ;;
5887*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
5888$as_echo "$as_me: error: invalid value of canonical build" >&2;}
5889   { (exit 1); exit 1; }; };;
5890esac
5891build=$ac_cv_build
5892ac_save_IFS=$IFS; IFS='-'
5893set x $ac_cv_build
5894shift
5895build_cpu=$1
5896build_vendor=$2
5897shift; shift
5898# Remember, the first character of IFS is used to create $*,
5899# except with old shells:
5900build_os=$*
5901IFS=$ac_save_IFS
5902case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5903
5904
5905{ $as_echo "$as_me:$LINENO: checking host system type" >&5
5906$as_echo_n "checking host system type... " >&6; }
5907if test "${ac_cv_host+set}" = set; then
5908  $as_echo_n "(cached) " >&6
5909else
5910  if test "x$host_alias" = x; then
5911  ac_cv_host=$ac_cv_build
5912else
5913  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5914    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
5915$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
5916   { (exit 1); exit 1; }; }
5917fi
5918
5919fi
5920{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
5921$as_echo "$ac_cv_host" >&6; }
5922case $ac_cv_host in
5923*-*-*) ;;
5924*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
5925$as_echo "$as_me: error: invalid value of canonical host" >&2;}
5926   { (exit 1); exit 1; }; };;
5927esac
5928host=$ac_cv_host
5929ac_save_IFS=$IFS; IFS='-'
5930set x $ac_cv_host
5931shift
5932host_cpu=$1
5933host_vendor=$2
5934shift; shift
5935# Remember, the first character of IFS is used to create $*,
5936# except with old shells:
5937host_os=$*
5938IFS=$ac_save_IFS
5939case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5940
5941
5942{ $as_echo "$as_me:$LINENO: checking target system type" >&5
5943$as_echo_n "checking target system type... " >&6; }
5944if test "${ac_cv_target+set}" = set; then
5945  $as_echo_n "(cached) " >&6
5946else
5947  if test "x$target_alias" = x; then
5948  ac_cv_target=$ac_cv_host
5949else
5950  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
5951    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
5952$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
5953   { (exit 1); exit 1; }; }
5954fi
5955
5956fi
5957{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5
5958$as_echo "$ac_cv_target" >&6; }
5959case $ac_cv_target in
5960*-*-*) ;;
5961*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
5962$as_echo "$as_me: error: invalid value of canonical target" >&2;}
5963   { (exit 1); exit 1; }; };;
5964esac
5965target=$ac_cv_target
5966ac_save_IFS=$IFS; IFS='-'
5967set x $ac_cv_target
5968shift
5969target_cpu=$1
5970target_vendor=$2
5971shift; shift
5972# Remember, the first character of IFS is used to create $*,
5973# except with old shells:
5974target_os=$*
5975IFS=$ac_save_IFS
5976case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
5977
5978
5979# The aliases save the names the user supplied, while $host etc.
5980# will get canonicalized.
5981test -n "$target_alias" &&
5982  test "$program_prefix$program_suffix$program_transform_name" = \
5983    NONENONEs,x,x, &&
5984  program_prefix=${target_alias}-
5985
5986
5987    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
5988    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
5989    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
5990    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
5991    OPENJDK_TARGET_AUTOCONF_NAME="$host"
5992    OPENJDK_BUILD_AUTOCONF_NAME="$build"
5993
5994
5995
5996    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
5997
5998  case "$build_os" in
5999    *linux*)
6000      VAR_OS=linux
6001      VAR_OS_API=posix
6002      VAR_OS_ENV=linux
6003      ;;
6004    *solaris*)
6005      VAR_OS=solaris
6006      VAR_OS_API=posix
6007      VAR_OS_ENV=solaris
6008      ;;
6009    *darwin*)
6010      VAR_OS=macosx
6011      VAR_OS_API=posix
6012      VAR_OS_ENV=macosx
6013      ;;
6014    *bsd*)
6015      VAR_OS=bsd
6016      VAR_OS_API=posix
6017      VAR_OS_ENV=bsd
6018      ;;
6019    *cygwin*)
6020      VAR_OS=windows
6021      VAR_OS_API=winapi
6022      VAR_OS_ENV=windows.cygwin
6023      ;;
6024    *mingw*)
6025      VAR_OS=windows
6026      VAR_OS_API=winapi
6027      VAR_OS_ENV=windows.msys
6028      ;;
6029    *)
6030      { { $as_echo "$as_me:$LINENO: error: unsupported operating system $build_os" >&5
6031$as_echo "$as_me: error: unsupported operating system $build_os" >&2;}
6032   { (exit 1); exit 1; }; }
6033      ;;
6034  esac
6035
6036
6037  # First argument is the cpu name from the trip/quad
6038  case "$build_cpu" in
6039    x86_64)
6040      VAR_CPU=x86_64
6041      VAR_CPU_ARCH=x86
6042      VAR_CPU_BITS=64
6043      VAR_CPU_ENDIAN=little
6044      ;;
6045    i?86)
6046      VAR_CPU=x86
6047      VAR_CPU_ARCH=x86
6048      VAR_CPU_BITS=32
6049      VAR_CPU_ENDIAN=little
6050      ;;
6051    arm*)
6052      VAR_CPU=arm
6053      VAR_CPU_ARCH=arm
6054      VAR_CPU_BITS=32
6055      VAR_CPU_ENDIAN=little
6056      ;;
6057    powerpc)
6058      VAR_CPU=ppc
6059      VAR_CPU_ARCH=ppc
6060      VAR_CPU_BITS=32
6061      VAR_CPU_ENDIAN=big
6062       ;;
6063    powerpc64)
6064      VAR_CPU=ppc64
6065      VAR_CPU_ARCH=ppc
6066      VAR_CPU_BITS=64
6067      VAR_CPU_ENDIAN=big
6068       ;;
6069    sparc)
6070      VAR_CPU=sparc
6071      VAR_CPU_ARCH=sparc
6072      VAR_CPU_BITS=32
6073      VAR_CPU_ENDIAN=big
6074       ;;
6075    sparcv9)
6076      VAR_CPU=sparcv9
6077      VAR_CPU_ARCH=sparc
6078      VAR_CPU_BITS=64
6079      VAR_CPU_ENDIAN=big
6080       ;;
6081    *)
6082      { { $as_echo "$as_me:$LINENO: error: unsupported cpu $build_cpu" >&5
6083$as_echo "$as_me: error: unsupported cpu $build_cpu" >&2;}
6084   { (exit 1); exit 1; }; }
6085      ;;
6086  esac
6087
6088    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6089    OPENJDK_BUILD_OS="$VAR_OS"
6090    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6091    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6092    OPENJDK_BUILD_CPU="$VAR_CPU"
6093    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6094    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6095    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6096
6097
6098
6099
6100
6101
6102
6103    { $as_echo "$as_me:$LINENO: checking openjdk-build os-cpu" >&5
6104$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6105    { $as_echo "$as_me:$LINENO: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6106$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6107
6108    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6109
6110  case "$host_os" in
6111    *linux*)
6112      VAR_OS=linux
6113      VAR_OS_API=posix
6114      VAR_OS_ENV=linux
6115      ;;
6116    *solaris*)
6117      VAR_OS=solaris
6118      VAR_OS_API=posix
6119      VAR_OS_ENV=solaris
6120      ;;
6121    *darwin*)
6122      VAR_OS=macosx
6123      VAR_OS_API=posix
6124      VAR_OS_ENV=macosx
6125      ;;
6126    *bsd*)
6127      VAR_OS=bsd
6128      VAR_OS_API=posix
6129      VAR_OS_ENV=bsd
6130      ;;
6131    *cygwin*)
6132      VAR_OS=windows
6133      VAR_OS_API=winapi
6134      VAR_OS_ENV=windows.cygwin
6135      ;;
6136    *mingw*)
6137      VAR_OS=windows
6138      VAR_OS_API=winapi
6139      VAR_OS_ENV=windows.msys
6140      ;;
6141    *)
6142      { { $as_echo "$as_me:$LINENO: error: unsupported operating system $host_os" >&5
6143$as_echo "$as_me: error: unsupported operating system $host_os" >&2;}
6144   { (exit 1); exit 1; }; }
6145      ;;
6146  esac
6147
6148
6149  # First argument is the cpu name from the trip/quad
6150  case "$host_cpu" in
6151    x86_64)
6152      VAR_CPU=x86_64
6153      VAR_CPU_ARCH=x86
6154      VAR_CPU_BITS=64
6155      VAR_CPU_ENDIAN=little
6156      ;;
6157    i?86)
6158      VAR_CPU=x86
6159      VAR_CPU_ARCH=x86
6160      VAR_CPU_BITS=32
6161      VAR_CPU_ENDIAN=little
6162      ;;
6163    arm*)
6164      VAR_CPU=arm
6165      VAR_CPU_ARCH=arm
6166      VAR_CPU_BITS=32
6167      VAR_CPU_ENDIAN=little
6168      ;;
6169    powerpc)
6170      VAR_CPU=ppc
6171      VAR_CPU_ARCH=ppc
6172      VAR_CPU_BITS=32
6173      VAR_CPU_ENDIAN=big
6174       ;;
6175    powerpc64)
6176      VAR_CPU=ppc64
6177      VAR_CPU_ARCH=ppc
6178      VAR_CPU_BITS=64
6179      VAR_CPU_ENDIAN=big
6180       ;;
6181    sparc)
6182      VAR_CPU=sparc
6183      VAR_CPU_ARCH=sparc
6184      VAR_CPU_BITS=32
6185      VAR_CPU_ENDIAN=big
6186       ;;
6187    sparcv9)
6188      VAR_CPU=sparcv9
6189      VAR_CPU_ARCH=sparc
6190      VAR_CPU_BITS=64
6191      VAR_CPU_ENDIAN=big
6192       ;;
6193    *)
6194      { { $as_echo "$as_me:$LINENO: error: unsupported cpu $host_cpu" >&5
6195$as_echo "$as_me: error: unsupported cpu $host_cpu" >&2;}
6196   { (exit 1); exit 1; }; }
6197      ;;
6198  esac
6199
6200    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6201    OPENJDK_TARGET_OS="$VAR_OS"
6202    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6203    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6204    OPENJDK_TARGET_CPU="$VAR_CPU"
6205    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6206    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6207    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6208
6209
6210
6211
6212
6213
6214
6215    { $as_echo "$as_me:$LINENO: checking openjdk-target os-cpu" >&5
6216$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6217    { $as_echo "$as_me:$LINENO: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6218$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6219
6220
6221
6222# Check whether --with-target-bits was given.
6223if test "${with_target_bits+set}" = set; then
6224  withval=$with_target_bits;
6225fi
6226
6227
6228  # We have three types of compiles:
6229  # native  == normal compilation, target system == build system
6230  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6231  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6232  #
6233  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6234    # We're doing a proper cross-compilation
6235    COMPILE_TYPE="cross"
6236  else
6237    COMPILE_TYPE="native"
6238  fi
6239
6240  if test "x$with_target_bits" != x; then
6241    if test "x$COMPILE_TYPE" = "xcross"; then
6242      { { $as_echo "$as_me:$LINENO: error: It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." >&5
6243$as_echo "$as_me: error: It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." >&2;}
6244   { (exit 1); exit 1; }; }
6245    fi
6246
6247    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6248      # A reduced build is requested
6249      COMPILE_TYPE="reduced"
6250      OPENJDK_TARGET_CPU_BITS=32
6251      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6252        OPENJDK_TARGET_CPU=x86
6253      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6254        OPENJDK_TARGET_CPU=sparc
6255      else
6256        { { $as_echo "$as_me:$LINENO: error: Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" >&5
6257$as_echo "$as_me: error: Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" >&2;}
6258   { (exit 1); exit 1; }; }
6259      fi
6260    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6261      { { $as_echo "$as_me:$LINENO: error: It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." >&5
6262$as_echo "$as_me: error: It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." >&2;}
6263   { (exit 1); exit 1; }; }
6264    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6265      { $as_echo "$as_me:$LINENO: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6266$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6267    else
6268      { { $as_echo "$as_me:$LINENO: error: --with-target-bits can only be 32 or 64, you specified $with_target_bits!" >&5
6269$as_echo "$as_me: error: --with-target-bits can only be 32 or 64, you specified $with_target_bits!" >&2;}
6270   { (exit 1); exit 1; }; }
6271    fi
6272  fi
6273
6274
6275{ $as_echo "$as_me:$LINENO: checking compilation type" >&5
6276$as_echo_n "checking compilation type... " >&6; }
6277{ $as_echo "$as_me:$LINENO: result: $COMPILE_TYPE" >&5
6278$as_echo "$COMPILE_TYPE" >&6; }
6279
6280
6281    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6282       REQUIRED_OS_NAME=SunOS
6283       REQUIRED_OS_VERSION=5.10
6284    fi
6285    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6286       REQUIRED_OS_NAME=Linux
6287       REQUIRED_OS_VERSION=2.6
6288    fi
6289    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6290        REQUIRED_OS_NAME=Windows
6291        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6292            REQUIRED_OS_VERSION=5.2
6293        else
6294            REQUIRED_OS_VERSION=5.1
6295        fi
6296    fi
6297    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6298        REQUIRED_OS_NAME=Darwin
6299        REQUIRED_OS_VERSION=11.2
6300    fi
6301
6302
6303
6304
6305
6306    # Also store the legacy naming of the cpu.
6307    # Ie i586 and amd64 instead of x86 and x86_64
6308    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6309    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6310      OPENJDK_TARGET_CPU_LEGACY="i586"
6311    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6312      # On all platforms except MacOSX replace x86_64 with amd64.
6313      OPENJDK_TARGET_CPU_LEGACY="amd64"
6314    fi
6315
6316
6317    # And the second legacy naming of the cpu.
6318    # Ie i386 and amd64 instead of x86 and x86_64.
6319    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6320    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6321      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6322    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6323      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6324    fi
6325
6326
6327    # This is the name of the cpu (but using i386 and amd64 instead of
6328    # x86 and x86_64, respectively), preceeded by a /, to be used when
6329    # locating libraries. On macosx, it's empty, though.
6330    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6331    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6332        OPENJDK_TARGET_CPU_LIBDIR=""
6333    fi
6334
6335
6336    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6337    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6338    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6339    OPENJDK_TARGET_CPU_ISADIR=""
6340    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6341      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6342          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6343      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6344          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6345      fi
6346    fi
6347
6348
6349    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6350    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6351    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6352      # On linux only, we replace x86 with i386.
6353      OPENJDK_TARGET_CPU_OSARCH="i386"
6354    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6355      # On all platforms except macosx, we replace x86_64 with amd64.
6356      OPENJDK_TARGET_CPU_OSARCH="amd64"
6357    fi
6358
6359
6360    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6361    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6362      OPENJDK_TARGET_CPU_JLI="i386"
6363    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6364      # On all platforms except macosx, we replace x86_64 with amd64.
6365      OPENJDK_TARGET_CPU_JLI="amd64"
6366    fi
6367    # Now setup the -D flags for building libjli.
6368    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6369    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6370      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
6371        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
6372      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
6373        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
6374      fi
6375    fi
6376
6377
6378    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
6379    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
6380        OPENJDK_TARGET_OS_API_DIR="solaris"
6381    fi
6382    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
6383        OPENJDK_TARGET_OS_API_DIR="windows"
6384    fi
6385
6386
6387    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6388        A_LP64="LP64:="
6389        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
6390        # unpack200.exe
6391        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
6392            ADD_LP64="-D_LP64=1"
6393        fi
6394    fi
6395    LP64=$A_LP64
6396
6397
6398    if test "x$COMPILE_TYPE" = "xcross"; then
6399      # FIXME: ... or should this include reduced builds..?
6400      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
6401    else
6402      DEFINE_CROSS_COMPILE_ARCH=""
6403    fi
6404
6405
6406
6407
6408# Continue setting up basic stuff. Most remaining code require fundamental tools.
6409
6410# Locate the directory of this script.
6411SCRIPT="$0"
6412
6413    if test "x$OPENJDK_BUILD_OS" != xwindows; then
6414        # Follow a chain of symbolic links. Use readlink
6415        # where it exists, else fall back to horribly
6416        # complicated shell code.
6417        if test "x$READLINK_TESTED" != yes; then
6418            # On MacOSX there is a readlink tool with a different
6419            # purpose than the GNU readlink tool. Check the found readlink.
6420            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
6421            if test "x$ISGNU" = x; then
6422                 # A readlink that we do not know how to use.
6423                 # Are there other non-GNU readlinks out there?
6424                 READLINK_TESTED=yes
6425                 READLINK=
6426            fi
6427        fi
6428
6429        if test "x$READLINK" != x; then
6430            SCRIPT=`$READLINK -f $SCRIPT`
6431        else
6432            STARTDIR=$PWD
6433            COUNTER=0
6434            sym_link_dir=`$DIRNAME $SCRIPT`
6435            sym_link_file=`$BASENAME $SCRIPT`
6436            while test $COUNTER -lt 20; do
6437                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
6438                if test "x$ISLINK" == x; then
6439                    # This is not a symbolic link! We are done!
6440                    break
6441                fi
6442                # The link might be relative! We have to use cd to travel safely.
6443                cd $sym_link_dir
6444                # ... and we must get the to the absolute path, not one using symbolic links.
6445                cd `pwd -P`
6446                cd `$DIRNAME $ISLINK`
6447                sym_link_dir=`$THEPWDCMD`
6448                sym_link_file=`$BASENAME $ISLINK`
6449                let COUNTER=COUNTER+1
6450            done
6451            cd $STARTDIR
6452            SCRIPT=$sym_link_dir/$sym_link_file
6453        fi
6454    fi
6455
6456AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
6457
6458# Where is the source? It is located two levels above the configure script.
6459CURDIR="$PWD"
6460cd "$AUTOCONF_DIR/../.."
6461SRC_ROOT="`pwd`"
6462
6463if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6464  PATH_SEP=";"
6465
6466  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
6467  if test $SRC_ROOT_LENGTH -gt 100; then
6468      { { $as_echo "$as_me:$LINENO: error: Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" >&5
6469$as_echo "$as_me: error: Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" >&2;}
6470   { (exit 1); exit 1; }; }
6471  fi
6472
6473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6474    { $as_echo "$as_me:$LINENO: checking cygwin release" >&5
6475$as_echo_n "checking cygwin release... " >&6; }
6476    CYGWIN_VERSION=`$UNAME -r`
6477    { $as_echo "$as_me:$LINENO: result: $CYGWIN_VERSION" >&5
6478$as_echo "$CYGWIN_VERSION" >&6; }
6479    WINDOWS_ENV_VENDOR='cygwin'
6480    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
6481
6482    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
6483    if test "x$CYGWIN_VERSION_OK" = x; then
6484      { $as_echo "$as_me:$LINENO: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
6485$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;}
6486      { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
6487$as_echo "$as_me: error: Cannot continue" >&2;}
6488   { (exit 1); exit 1; }; }
6489    fi
6490    if test "x$CYGPATH" = x; then
6491        { { $as_echo "$as_me:$LINENO: error: Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" >&5
6492$as_echo "$as_me: error: Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" >&2;}
6493   { (exit 1); exit 1; }; }
6494    fi
6495    { $as_echo "$as_me:$LINENO: checking cygwin root directory as unix-style path" >&5
6496$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
6497    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6498    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
6499    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
6500    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
6501    { $as_echo "$as_me:$LINENO: result: $CYGWIN_ROOT_PATH" >&5
6502$as_echo "$CYGWIN_ROOT_PATH" >&6; }
6503    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
6504    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
6505    if test "x$test_cygdrive_prefix" = x; then
6506        { { $as_echo "$as_me:$LINENO: error: Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." >&5
6507$as_echo "$as_me: error: Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." >&2;}
6508   { (exit 1); exit 1; }; }
6509    fi
6510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6511    { $as_echo "$as_me:$LINENO: checking msys release" >&5
6512$as_echo_n "checking msys release... " >&6; }
6513    MSYS_VERSION=`$UNAME -r`
6514    { $as_echo "$as_me:$LINENO: result: $MSYS_VERSION" >&5
6515$as_echo "$MSYS_VERSION" >&6; }
6516
6517    WINDOWS_ENV_VENDOR='msys'
6518    WINDOWS_ENV_VERSION="$MSYS_VERSION"
6519
6520    { $as_echo "$as_me:$LINENO: checking msys root directory as unix-style path" >&5
6521$as_echo_n "checking msys root directory as unix-style path... " >&6; }
6522    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6523    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
6524
6525  windows_path="$MSYS_ROOT_PATH"
6526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6527    unix_path=`$CYGPATH -u "$windows_path"`
6528    MSYS_ROOT_PATH="$unix_path"
6529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
6531    MSYS_ROOT_PATH="$unix_path"
6532  fi
6533
6534    { $as_echo "$as_me:$LINENO: result: $MSYS_ROOT_PATH" >&5
6535$as_echo "$MSYS_ROOT_PATH" >&6; }
6536    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
6537  else
6538    { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment. Neither cygwin nor msys was detected." >&5
6539$as_echo "$as_me: error: Unknown Windows environment. Neither cygwin nor msys was detected." >&2;}
6540   { (exit 1); exit 1; }; }
6541  fi
6542
6543  # Test if windows or unix (cygwin/msys) find is first in path.
6544  { $as_echo "$as_me:$LINENO: checking what kind of 'find' is first on the PATH" >&5
6545$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
6546  FIND_BINARY_OUTPUT=`find --version 2>&1`
6547  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
6548    { $as_echo "$as_me:$LINENO: result: unix style" >&5
6549$as_echo "unix style" >&6; }
6550  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
6551    { $as_echo "$as_me:$LINENO: result: Windows" >&5
6552$as_echo "Windows" >&6; }
6553    { $as_echo "$as_me:$LINENO: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
6554$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
6555    { $as_echo "$as_me:$LINENO: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
6556$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
6557    { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
6558$as_echo "$as_me: error: Cannot continue" >&2;}
6559   { (exit 1); exit 1; }; }
6560  else
6561    { $as_echo "$as_me:$LINENO: result: unknown" >&5
6562$as_echo "unknown" >&6; }
6563    { $as_echo "$as_me:$LINENO: WARNING: It seems that your find utility is non-standard." >&5
6564$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
6565  fi
6566
6567else
6568  PATH_SEP=":"
6569fi
6570
6571
6572
6573cd "$CURDIR"
6574
6575
6576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6577
6578  # Input might be given as Windows format, start by converting to
6579  # unix format.
6580  path="$SRC_ROOT"
6581  new_path=`$CYGPATH -u "$path"`
6582
6583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
6584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
6585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
6586  # "foo.exe" is OK but "foo" is an error.
6587  #
6588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
6589  # It is also a way to make sure we got the proper file name for the real test later on.
6590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
6591  if test "x$test_shortpath" = x; then
6592    { $as_echo "$as_me:$LINENO: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
6593$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
6594    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of SRC_ROOT" >&5
6595$as_echo "$as_me: error: Cannot locate the the path of SRC_ROOT" >&2;}
6596   { (exit 1); exit 1; }; }
6597  fi
6598
6599  # Call helper function which possibly converts this using DOS-style short mode.
6600  # If so, the updated path is stored in $new_path.
6601
6602  input_path="$new_path"
6603  # Check if we need to convert this using DOS-style short mode. If the path
6604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
6605  # take no chances and rewrite it.
6606  # Note: m4 eats our [], so we need to use [ and ] instead.
6607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
6608  if test "x$has_forbidden_chars" != x; then
6609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
6610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
6611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
6612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
6613      # Going to short mode and back again did indeed matter. Since short mode is
6614      # case insensitive, let's make it lowercase to improve readability.
6615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
6616      # Now convert it back to Unix-stile (cygpath)
6617      input_path=`$CYGPATH -u "$shortmode_path"`
6618      new_path="$input_path"
6619    fi
6620  fi
6621
6622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
6623  if test "x$test_cygdrive_prefix" = x; then
6624    # As a simple fix, exclude /usr/bin since it's not a real path.
6625    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
6626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
6627      # a path prefixed by /cygdrive for fixpath to work.
6628      new_path="$CYGWIN_ROOT_PATH$input_path"
6629    fi
6630  fi
6631
6632
6633  if test "x$path" != "x$new_path"; then
6634    SRC_ROOT="$new_path"
6635    { $as_echo "$as_me:$LINENO: Rewriting SRC_ROOT to \"$new_path\"" >&5
6636$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
6637  fi
6638
6639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6640
6641  path="$SRC_ROOT"
6642  has_colon=`$ECHO $path | $GREP ^.:`
6643  new_path="$path"
6644  if test "x$has_colon" = x; then
6645    # Not in mixed or Windows style, start by that.
6646    new_path=`cmd //c echo $path`
6647  fi
6648
6649
6650  input_path="$new_path"
6651  # Check if we need to convert this using DOS-style short mode. If the path
6652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
6653  # take no chances and rewrite it.
6654  # Note: m4 eats our [], so we need to use [ and ] instead.
6655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
6656  if test "x$has_forbidden_chars" != x; then
6657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
6658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
6659  fi
6660
6661
6662  windows_path="$new_path"
6663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6664    unix_path=`$CYGPATH -u "$windows_path"`
6665    new_path="$unix_path"
6666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
6668    new_path="$unix_path"
6669  fi
6670
6671  if test "x$path" != "x$new_path"; then
6672    SRC_ROOT="$new_path"
6673    { $as_echo "$as_me:$LINENO: Rewriting SRC_ROOT to \"$new_path\"" >&5
6674$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
6675  fi
6676
6677  # Save the first 10 bytes of this path to the storage, so fixpath can work.
6678  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
6679
6680  else
6681    # We're on a posix platform. Hooray! :)
6682    path="$SRC_ROOT"
6683
6684    if test ! -f "$path" && test ! -d "$path"; then
6685      { { $as_echo "$as_me:$LINENO: error: The path of SRC_ROOT, which resolves as \"$path\", is not found." >&5
6686$as_echo "$as_me: error: The path of SRC_ROOT, which resolves as \"$path\", is not found." >&2;}
6687   { (exit 1); exit 1; }; }
6688    fi
6689
6690    has_space=`$ECHO "$path" | $GREP " "`
6691    if test "x$has_space" != x; then
6692      { $as_echo "$as_me:$LINENO: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
6693$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
6694      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
6695$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
6696   { (exit 1); exit 1; }; }
6697    fi
6698  fi
6699
6700
6701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6702
6703  # Input might be given as Windows format, start by converting to
6704  # unix format.
6705  path="$CURDIR"
6706  new_path=`$CYGPATH -u "$path"`
6707
6708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
6709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
6710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
6711  # "foo.exe" is OK but "foo" is an error.
6712  #
6713  # This test is therefore slightly more accurate than "test -f" to check for file precense.
6714  # It is also a way to make sure we got the proper file name for the real test later on.
6715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
6716  if test "x$test_shortpath" = x; then
6717    { $as_echo "$as_me:$LINENO: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
6718$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
6719    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CURDIR" >&5
6720$as_echo "$as_me: error: Cannot locate the the path of CURDIR" >&2;}
6721   { (exit 1); exit 1; }; }
6722  fi
6723
6724  # Call helper function which possibly converts this using DOS-style short mode.
6725  # If so, the updated path is stored in $new_path.
6726
6727  input_path="$new_path"
6728  # Check if we need to convert this using DOS-style short mode. If the path
6729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
6730  # take no chances and rewrite it.
6731  # Note: m4 eats our [], so we need to use [ and ] instead.
6732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
6733  if test "x$has_forbidden_chars" != x; then
6734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
6735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
6736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
6737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
6738      # Going to short mode and back again did indeed matter. Since short mode is
6739      # case insensitive, let's make it lowercase to improve readability.
6740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
6741      # Now convert it back to Unix-stile (cygpath)
6742      input_path=`$CYGPATH -u "$shortmode_path"`
6743      new_path="$input_path"
6744    fi
6745  fi
6746
6747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
6748  if test "x$test_cygdrive_prefix" = x; then
6749    # As a simple fix, exclude /usr/bin since it's not a real path.
6750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
6751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
6752      # a path prefixed by /cygdrive for fixpath to work.
6753      new_path="$CYGWIN_ROOT_PATH$input_path"
6754    fi
6755  fi
6756
6757
6758  if test "x$path" != "x$new_path"; then
6759    CURDIR="$new_path"
6760    { $as_echo "$as_me:$LINENO: Rewriting CURDIR to \"$new_path\"" >&5
6761$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
6762  fi
6763
6764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6765
6766  path="$CURDIR"
6767  has_colon=`$ECHO $path | $GREP ^.:`
6768  new_path="$path"
6769  if test "x$has_colon" = x; then
6770    # Not in mixed or Windows style, start by that.
6771    new_path=`cmd //c echo $path`
6772  fi
6773
6774
6775  input_path="$new_path"
6776  # Check if we need to convert this using DOS-style short mode. If the path
6777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
6778  # take no chances and rewrite it.
6779  # Note: m4 eats our [], so we need to use [ and ] instead.
6780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
6781  if test "x$has_forbidden_chars" != x; then
6782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
6783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
6784  fi
6785
6786
6787  windows_path="$new_path"
6788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6789    unix_path=`$CYGPATH -u "$windows_path"`
6790    new_path="$unix_path"
6791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
6793    new_path="$unix_path"
6794  fi
6795
6796  if test "x$path" != "x$new_path"; then
6797    CURDIR="$new_path"
6798    { $as_echo "$as_me:$LINENO: Rewriting CURDIR to \"$new_path\"" >&5
6799$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
6800  fi
6801
6802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
6803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
6804
6805  else
6806    # We're on a posix platform. Hooray! :)
6807    path="$CURDIR"
6808
6809    if test ! -f "$path" && test ! -d "$path"; then
6810      { { $as_echo "$as_me:$LINENO: error: The path of CURDIR, which resolves as \"$path\", is not found." >&5
6811$as_echo "$as_me: error: The path of CURDIR, which resolves as \"$path\", is not found." >&2;}
6812   { (exit 1); exit 1; }; }
6813    fi
6814
6815    has_space=`$ECHO "$path" | $GREP " "`
6816    if test "x$has_space" != x; then
6817      { $as_echo "$as_me:$LINENO: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
6818$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
6819      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
6820$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
6821   { (exit 1); exit 1; }; }
6822    fi
6823  fi
6824
6825
6826if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
6827    # Add extra search paths on solaris for utilities like ar and as etc...
6828    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
6829fi
6830
6831# You can force the sys-root if the sys-root encoded into the cross compiler tools
6832# is not correct.
6833
6834# Check whether --with-sys-root was given.
6835if test "${with_sys_root+set}" = set; then
6836  withval=$with_sys_root;
6837fi
6838
6839
6840if test "x$with_sys_root" != x; then
6841  SYS_ROOT=$with_sys_root
6842else
6843  SYS_ROOT=/
6844fi
6845
6846
6847
6848# Check whether --with-tools-dir was given.
6849if test "${with_tools_dir+set}" = set; then
6850  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
6851fi
6852
6853
6854
6855# Check whether --with-devkit was given.
6856if test "${with_devkit+set}" = set; then
6857  withval=$with_devkit;
6858    if test "x$with_sys_root" != x; then
6859      { { $as_echo "$as_me:$LINENO: error: Cannot specify both --with-devkit and --with-sys-root at the same time" >&5
6860$as_echo "$as_me: error: Cannot specify both --with-devkit and --with-sys-root at the same time" >&2;}
6861   { (exit 1); exit 1; }; }
6862    fi
6863    if test "x$with_tools_dir" != x; then
6864      { { $as_echo "$as_me:$LINENO: error: Cannot specify both --with-devkit and --with-tools-dir at the same time" >&5
6865$as_echo "$as_me: error: Cannot specify both --with-devkit and --with-tools-dir at the same time" >&2;}
6866   { (exit 1); exit 1; }; }
6867    fi
6868    TOOLS_DIR=$with_devkit/bin
6869    SYS_ROOT=$with_devkit/$host_alias/libc
6870
6871fi
6872
6873
6874
6875
6876# Setup default logging of stdout and stderr to build.log in the output root.
6877BUILD_LOG='$(OUTPUT_ROOT)/build.log'
6878BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
6879BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
6880
6881
6882
6883
6884
6885# These are needed to be able to create a configuration name (and thus the output directory)
6886
6887###############################################################################
6888#
6889# Check which variant of the JDK that we want to build.
6890# Currently we have:
6891#    normal:   standard edition
6892# but the custom make system may add other variants
6893#
6894# Effectively the JDK variant gives a name to a specific set of
6895# modules to compile into the JDK. In the future, these modules
6896# might even be Jigsaw modules.
6897#
6898{ $as_echo "$as_me:$LINENO: checking which variant of the JDK to build" >&5
6899$as_echo_n "checking which variant of the JDK to build... " >&6; }
6900
6901# Check whether --with-jdk-variant was given.
6902if test "${with_jdk_variant+set}" = set; then
6903  withval=$with_jdk_variant;
6904fi
6905
6906
6907if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
6908    JDK_VARIANT="normal"
6909else
6910    { { $as_echo "$as_me:$LINENO: error: The available JDK variants are: normal" >&5
6911$as_echo "$as_me: error: The available JDK variants are: normal" >&2;}
6912   { (exit 1); exit 1; }; }
6913fi
6914
6915
6916
6917{ $as_echo "$as_me:$LINENO: result: $JDK_VARIANT" >&5
6918$as_echo "$JDK_VARIANT" >&6; }
6919
6920
6921
6922###############################################################################
6923#
6924# Check which variants of the JVM that we want to build.
6925# Currently we have:
6926#    server: normal interpreter and a tiered C1/C2 compiler
6927#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
6928#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
6929#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
6930#    zero: no machine code interpreter, no compiler
6931#    zeroshark: zero interpreter and shark/llvm compiler backend
6932{ $as_echo "$as_me:$LINENO: checking which variants of the JVM to build" >&5
6933$as_echo_n "checking which variants of the JVM to build... " >&6; }
6934
6935# Check whether --with-jvm-variants was given.
6936if test "${with_jvm_variants+set}" = set; then
6937  withval=$with_jvm_variants;
6938fi
6939
6940
6941if test "x$with_jvm_variants" = x; then
6942     with_jvm_variants="server"
6943fi
6944
6945JVM_VARIANTS=",$with_jvm_variants,"
6946TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
6947
6948if test "x$TEST_VARIANTS" != "x,"; then
6949   { { $as_echo "$as_me:$LINENO: error: The available JVM variants are: server, client, kernel, zero, zeroshark" >&5
6950$as_echo "$as_me: error: The available JVM variants are: server, client, kernel, zero, zeroshark" >&2;}
6951   { (exit 1); exit 1; }; }
6952fi
6953{ $as_echo "$as_me:$LINENO: result: $with_jvm_variants" >&5
6954$as_echo "$with_jvm_variants" >&6; }
6955
6956JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
6957JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
6958JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
6959JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
6960JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
6961
6962if test "x$JVM_VARIANT_CLIENT" = xtrue; then
6963    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6964        { { $as_echo "$as_me:$LINENO: error: You cannot build a client JVM for a 64-bit machine." >&5
6965$as_echo "$as_me: error: You cannot build a client JVM for a 64-bit machine." >&2;}
6966   { (exit 1); exit 1; }; }
6967    fi
6968fi
6969if test "x$JVM_VARIANT_KERNEL" = xtrue; then
6970    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6971        { { $as_echo "$as_me:$LINENO: error: You cannot build a kernel JVM for a 64-bit machine." >&5
6972$as_echo "$as_me: error: You cannot build a kernel JVM for a 64-bit machine." >&2;}
6973   { (exit 1); exit 1; }; }
6974    fi
6975fi
6976
6977# Replace the commas with AND for use in the build directory name.
6978ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
6979COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
6980if test "x$COUNT_VARIANTS" != "x,1"; then
6981    BUILDING_MULTIPLE_JVM_VARIANTS=yes
6982else
6983    BUILDING_MULTIPLE_JVM_VARIANTS=no
6984fi
6985
6986
6987
6988
6989
6990
6991
6992
6993if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6994   MACOSX_UNIVERSAL="true"
6995fi
6996
6997
6998
6999
7000
7001###############################################################################
7002#
7003# Set the debug level
7004#    release: no debug information, all optimizations, no asserts.
7005#    fastdebug: debug information (-g), all optimizations, all asserts
7006#    slowdebug: debug information (-g), no optimizations, all asserts
7007#
7008DEBUG_LEVEL="release"
7009{ $as_echo "$as_me:$LINENO: checking which debug level to use" >&5
7010$as_echo_n "checking which debug level to use... " >&6; }
7011# Check whether --enable-debug was given.
7012if test "${enable_debug+set}" = set; then
7013  enableval=$enable_debug;
7014        ENABLE_DEBUG="${enableval}"
7015        DEBUG_LEVEL="fastdebug"
7016
7017else
7018  ENABLE_DEBUG="no"
7019fi
7020
7021
7022
7023# Check whether --with-debug-level was given.
7024if test "${with_debug_level+set}" = set; then
7025  withval=$with_debug_level;
7026        DEBUG_LEVEL="${withval}"
7027        if test "x$ENABLE_DEBUG" = xyes; then
7028			{ { $as_echo "$as_me:$LINENO: error: You cannot use both --enable-debug and --with-debug-level at the same time." >&5
7029$as_echo "$as_me: error: You cannot use both --enable-debug and --with-debug-level at the same time." >&2;}
7030   { (exit 1); exit 1; }; }
7031        fi
7032
7033fi
7034
7035{ $as_echo "$as_me:$LINENO: result: $DEBUG_LEVEL" >&5
7036$as_echo "$DEBUG_LEVEL" >&6; }
7037
7038if test "x$DEBUG_LEVEL" != xrelease && \
7039   test "x$DEBUG_LEVEL" != xfastdebug && \
7040   test "x$DEBUG_LEVEL" != xslowdebug; then
7041   { { $as_echo "$as_me:$LINENO: error: Allowed debug levels are: release, fastdebug and slowdebug" >&5
7042$as_echo "$as_me: error: Allowed debug levels are: release, fastdebug and slowdebug" >&2;}
7043   { (exit 1); exit 1; }; }
7044fi
7045
7046
7047###############################################################################
7048#
7049# Setup legacy vars/targets and new vars to deal with different debug levels.
7050#
7051
7052case $DEBUG_LEVEL in
7053      release )
7054          VARIANT="OPT"
7055          FASTDEBUG="false"
7056          DEBUG_CLASSFILES="false"
7057          BUILD_VARIANT_RELEASE=""
7058          HOTSPOT_DEBUG_LEVEL="product"
7059          HOTSPOT_EXPORT="product"
7060           ;;
7061      fastdebug )
7062          VARIANT="DBG"
7063          FASTDEBUG="true"
7064          DEBUG_CLASSFILES="true"
7065          BUILD_VARIANT_RELEASE="-fastdebug"
7066          HOTSPOT_DEBUG_LEVEL="fastdebug"
7067          HOTSPOT_EXPORT="fastdebug"
7068           ;;
7069      slowdebug )
7070          VARIANT="DBG"
7071          FASTDEBUG="false"
7072          DEBUG_CLASSFILES="true"
7073          BUILD_VARIANT_RELEASE="-debug"
7074          HOTSPOT_DEBUG_LEVEL="jvmg"
7075          HOTSPOT_EXPORT="debug"
7076           ;;
7077esac
7078
7079#####
7080# Generate the legacy makefile targets for hotspot.
7081# The hotspot api for selecting the build artifacts, really, needs to be improved.
7082#
7083HOTSPOT_TARGET=""
7084
7085if test "x$JVM_VARIANT_SERVER" = xtrue; then
7086    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7087fi
7088
7089if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7090    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7091fi
7092
7093if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7094    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7095fi
7096
7097if test "x$JVM_VARIANT_ZERO" = xtrue; then
7098    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7099fi
7100
7101if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7102    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7103fi
7104
7105HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7106
7107# On Macosx universal binaries are produced, but they only contain
7108# 64 bit intel. This invalidates control of which jvms are built
7109# from configure, but only server is valid anyway. Fix this
7110# when hotspot makefiles are rewritten.
7111if test "x$MACOSX_UNIVERSAL" = xtrue; then
7112    HOTSPOT_TARGET=universal_product
7113fi
7114
7115#####
7116
7117
7118
7119
7120
7121
7122
7123
7124# With basic setup done, call the custom early hook.
7125
7126
7127# To properly create a configuration name, we need to have the OpenJDK target
7128# and options (variants and debug level) parsed.
7129
7130
7131
7132# Check whether --with-conf-name was given.
7133if test "${with_conf_name+set}" = set; then
7134  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7135fi
7136
7137
7138# Test from where we are running configure, in or outside of src root.
7139if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7140    # We are running configure from the src root.
7141    # Create a default ./build/target-variant-debuglevel output root.
7142    if test "x${CONF_NAME}" = x; then
7143        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7144    fi
7145    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7146    $MKDIR -p "$OUTPUT_ROOT"
7147    if test ! -d "$OUTPUT_ROOT"; then
7148        { { $as_echo "$as_me:$LINENO: error: Could not create build directory $OUTPUT_ROOT" >&5
7149$as_echo "$as_me: error: Could not create build directory $OUTPUT_ROOT" >&2;}
7150   { (exit 1); exit 1; }; }
7151    fi
7152else
7153    # We are running configure from outside of the src dir.
7154    # Then use the current directory as output dir!
7155    # If configuration is situated in normal build directory, just use the build
7156    # directory name as configuration name, otherwise use the complete path.
7157    if test "x${CONF_NAME}" = x; then
7158        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7159    fi
7160    OUTPUT_ROOT="$CURDIR"
7161
7162    # WARNING: This might be a bad thing to do. You need to be sure you want to
7163    # have a configuration in this directory. Do some sanity checks!
7164
7165    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7166      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7167      # other files
7168      files_present=`$LS $OUTPUT_ROOT`
7169      # Configure has already touched config.log and confdefs.h in the current dir when this check
7170      # is performed.
7171      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7172                                             | $TR -d '\n'`
7173      if test "x$filtered_files" != x; then
7174        { $as_echo "$as_me:$LINENO: Current directory is $CURDIR." >&5
7175$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7176        { $as_echo "$as_me:$LINENO: Since this is not the source root, configure will output the configuration here" >&5
7177$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7178        { $as_echo "$as_me:$LINENO: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7179$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7180        { $as_echo "$as_me:$LINENO: However, this directory is not empty. This is not allowed, since it could" >&5
7181$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7182        { $as_echo "$as_me:$LINENO: seriously mess up just about everything." >&5
7183$as_echo "$as_me: seriously mess up just about everything." >&6;}
7184        { $as_echo "$as_me:$LINENO: Try 'cd $SRC_ROOT' and restart configure" >&5
7185$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7186        { $as_echo "$as_me:$LINENO: (or create a new empty directory and cd to it)." >&5
7187$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7188        { { $as_echo "$as_me:$LINENO: error: Will not continue creating configuration in $CURDIR" >&5
7189$as_echo "$as_me: error: Will not continue creating configuration in $CURDIR" >&2;}
7190   { (exit 1); exit 1; }; }
7191      fi
7192    fi
7193fi
7194{ $as_echo "$as_me:$LINENO: checking what configuration name to use" >&5
7195$as_echo_n "checking what configuration name to use... " >&6; }
7196{ $as_echo "$as_me:$LINENO: result: $CONF_NAME" >&5
7197$as_echo "$CONF_NAME" >&6; }
7198
7199
7200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7201
7202  # Input might be given as Windows format, start by converting to
7203  # unix format.
7204  path="$OUTPUT_ROOT"
7205  new_path=`$CYGPATH -u "$path"`
7206
7207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7210  # "foo.exe" is OK but "foo" is an error.
7211  #
7212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7213  # It is also a way to make sure we got the proper file name for the real test later on.
7214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7215  if test "x$test_shortpath" = x; then
7216    { $as_echo "$as_me:$LINENO: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7217$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7218    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OUTPUT_ROOT" >&5
7219$as_echo "$as_me: error: Cannot locate the the path of OUTPUT_ROOT" >&2;}
7220   { (exit 1); exit 1; }; }
7221  fi
7222
7223  # Call helper function which possibly converts this using DOS-style short mode.
7224  # If so, the updated path is stored in $new_path.
7225
7226  input_path="$new_path"
7227  # Check if we need to convert this using DOS-style short mode. If the path
7228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7229  # take no chances and rewrite it.
7230  # Note: m4 eats our [], so we need to use [ and ] instead.
7231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7232  if test "x$has_forbidden_chars" != x; then
7233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7234    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7235    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7236    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7237      # Going to short mode and back again did indeed matter. Since short mode is
7238      # case insensitive, let's make it lowercase to improve readability.
7239      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7240      # Now convert it back to Unix-stile (cygpath)
7241      input_path=`$CYGPATH -u "$shortmode_path"`
7242      new_path="$input_path"
7243    fi
7244  fi
7245
7246  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7247  if test "x$test_cygdrive_prefix" = x; then
7248    # As a simple fix, exclude /usr/bin since it's not a real path.
7249    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7250      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7251      # a path prefixed by /cygdrive for fixpath to work.
7252      new_path="$CYGWIN_ROOT_PATH$input_path"
7253    fi
7254  fi
7255
7256
7257  if test "x$path" != "x$new_path"; then
7258    OUTPUT_ROOT="$new_path"
7259    { $as_echo "$as_me:$LINENO: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7260$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7261  fi
7262
7263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7264
7265  path="$OUTPUT_ROOT"
7266  has_colon=`$ECHO $path | $GREP ^.:`
7267  new_path="$path"
7268  if test "x$has_colon" = x; then
7269    # Not in mixed or Windows style, start by that.
7270    new_path=`cmd //c echo $path`
7271  fi
7272
7273
7274  input_path="$new_path"
7275  # Check if we need to convert this using DOS-style short mode. If the path
7276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7277  # take no chances and rewrite it.
7278  # Note: m4 eats our [], so we need to use [ and ] instead.
7279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7280  if test "x$has_forbidden_chars" != x; then
7281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7283  fi
7284
7285
7286  windows_path="$new_path"
7287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7288    unix_path=`$CYGPATH -u "$windows_path"`
7289    new_path="$unix_path"
7290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7292    new_path="$unix_path"
7293  fi
7294
7295  if test "x$path" != "x$new_path"; then
7296    OUTPUT_ROOT="$new_path"
7297    { $as_echo "$as_me:$LINENO: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7298$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7299  fi
7300
7301  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7302  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7303
7304  else
7305    # We're on a posix platform. Hooray! :)
7306    path="$OUTPUT_ROOT"
7307
7308    if test ! -f "$path" && test ! -d "$path"; then
7309      { { $as_echo "$as_me:$LINENO: error: The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." >&5
7310$as_echo "$as_me: error: The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." >&2;}
7311   { (exit 1); exit 1; }; }
7312    fi
7313
7314    has_space=`$ECHO "$path" | $GREP " "`
7315    if test "x$has_space" != x; then
7316      { $as_echo "$as_me:$LINENO: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7317$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7318      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
7319$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
7320   { (exit 1); exit 1; }; }
7321    fi
7322  fi
7323
7324
7325SPEC=$OUTPUT_ROOT/spec.gmk
7326
7327CONF_NAME=$CONF_NAME
7328
7329OUTPUT_ROOT=$OUTPUT_ROOT
7330
7331
7332# Most of the probed defines are put into config.h
7333ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7334
7335# The spec.gmk file contains all variables for the make system.
7336ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7337
7338# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7339ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7340
7341# The bootcycle-spec.gmk file contains support for boot cycle builds.
7342ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7343
7344# The compare.sh is used to compare the build output to other builds.
7345ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7346
7347# Spec.sh is currently used by compare-objects.sh
7348ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7349
7350# The generated Makefile knows where the spec.gmk is and where the source is.
7351# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7352# which will look for generated configurations
7353ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7354
7355
7356# Save the arguments given to us
7357echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7358
7359
7360# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
7361
7362    for ac_prog in apt-get yum port pkgutil pkgadd
7363do
7364  # Extract the first word of "$ac_prog", so it can be a program name with args.
7365set dummy $ac_prog; ac_word=$2
7366{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7367$as_echo_n "checking for $ac_word... " >&6; }
7368if test "${ac_cv_prog_PKGHANDLER+set}" = set; then
7369  $as_echo_n "(cached) " >&6
7370else
7371  if test -n "$PKGHANDLER"; then
7372  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
7373else
7374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7375for as_dir in $PATH
7376do
7377  IFS=$as_save_IFS
7378  test -z "$as_dir" && as_dir=.
7379  for ac_exec_ext in '' $ac_executable_extensions; do
7380  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7381    ac_cv_prog_PKGHANDLER="$ac_prog"
7382    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7383    break 2
7384  fi
7385done
7386done
7387IFS=$as_save_IFS
7388
7389fi
7390fi
7391PKGHANDLER=$ac_cv_prog_PKGHANDLER
7392if test -n "$PKGHANDLER"; then
7393  { $as_echo "$as_me:$LINENO: result: $PKGHANDLER" >&5
7394$as_echo "$PKGHANDLER" >&6; }
7395else
7396  { $as_echo "$as_me:$LINENO: result: no" >&5
7397$as_echo "no" >&6; }
7398fi
7399
7400
7401  test -n "$PKGHANDLER" && break
7402done
7403
7404
7405
7406# Setup tools that requires more complex handling, or that is not needed by the configure script.
7407
7408
7409  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
7410  if test "x$MAKE" != x; then
7411    # User has supplied a make, test it.
7412    if test ! -f "$MAKE"; then
7413      { { $as_echo "$as_me:$LINENO: error: The specified make (by MAKE=$MAKE) is not found." >&5
7414$as_echo "$as_me: error: The specified make (by MAKE=$MAKE) is not found." >&2;}
7415   { (exit 1); exit 1; }; }
7416    fi
7417
7418  MAKE_CANDIDATE=""$MAKE""
7419  DESCRIPTION="user supplied MAKE=$MAKE"
7420  if test "x$MAKE_CANDIDATE" != x; then
7421    { $as_echo "$as_me:$LINENO: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7422$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7423    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7424    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7425    if test "x$IS_GNU_MAKE" = x; then
7426      { $as_echo "$as_me:$LINENO: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7427$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7428    else
7429      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7430      if test "x$IS_MODERN_MAKE" = x; then
7431        { $as_echo "$as_me:$LINENO: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
7432$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
7433      else
7434        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7435          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7436            MAKE_EXPECTED_ENV='cygwin'
7437          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7438            MAKE_EXPECTED_ENV='msys'
7439          else
7440            { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment" >&5
7441$as_echo "$as_me: error: Unknown Windows environment" >&2;}
7442   { (exit 1); exit 1; }; }
7443          fi
7444          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7445          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7446        else
7447          # Not relevant for non-Windows
7448          IS_MAKE_CORRECT_ENV=true
7449        fi
7450        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7451          { $as_echo "$as_me:$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
7452$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;}
7453        else
7454          FOUND_MAKE=$MAKE_CANDIDATE
7455
7456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7457
7458  # First separate the path from the arguments. This will split at the first
7459  # space.
7460  complete="$FOUND_MAKE"
7461  path="${complete%% *}"
7462  tmp="$complete EOL"
7463  arguments="${tmp#* }"
7464
7465  # Input might be given as Windows format, start by converting to
7466  # unix format.
7467  new_path=`$CYGPATH -u "$path"`
7468
7469  # Now try to locate executable using which
7470  new_path=`$WHICH "$new_path" 2> /dev/null`
7471  # bat and cmd files are not always considered executable in cygwin causing which
7472  # to not find them
7473  if test "x$new_path" = x \
7474           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7475           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7476    new_path=`$CYGPATH -u "$path"`
7477  fi
7478  if test "x$new_path" = x; then
7479    # Oops. Which didn't find the executable.
7480    # The splitting of arguments from the executable at a space might have been incorrect,
7481    # since paths with space are more likely in Windows. Give it another try with the whole
7482    # argument.
7483    path="$complete"
7484    arguments="EOL"
7485    new_path=`$CYGPATH -u "$path"`
7486    new_path=`$WHICH "$new_path" 2> /dev/null`
7487    # bat and cmd files are not always considered executable in cygwin causing which
7488    # to not find them
7489    if test "x$new_path" = x \
7490             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7491             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7492      new_path=`$CYGPATH -u "$path"`
7493    fi
7494    if test "x$new_path" = x; then
7495      # It's still not found. Now this is an unrecoverable error.
7496      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7497$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7498      has_space=`$ECHO "$complete" | $GREP " "`
7499      if test "x$has_space" != x; then
7500        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7502      fi
7503      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7504$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7505   { (exit 1); exit 1; }; }
7506    fi
7507  fi
7508
7509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7512  # "foo.exe" is OK but "foo" is an error.
7513  #
7514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7515  # It is also a way to make sure we got the proper file name for the real test later on.
7516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7517  if test "x$test_shortpath" = x; then
7518    # Short path failed, file does not exist as specified.
7519    # Try adding .exe or .cmd
7520    if test -f "${new_path}.exe"; then
7521       input_to_shortpath="${new_path}.exe"
7522    elif test -f "${new_path}.cmd"; then
7523       input_to_shortpath="${new_path}.cmd"
7524    else
7525      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
7526$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
7527      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
7528$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
7529      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7530$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7531   { (exit 1); exit 1; }; }
7532    fi
7533  else
7534    input_to_shortpath="$new_path"
7535  fi
7536
7537  # Call helper function which possibly converts this using DOS-style short mode.
7538  # If so, the updated path is stored in $new_path.
7539  new_path="$input_to_shortpath"
7540
7541  input_path="$input_to_shortpath"
7542  # Check if we need to convert this using DOS-style short mode. If the path
7543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7544  # take no chances and rewrite it.
7545  # Note: m4 eats our [], so we need to use [ and ] instead.
7546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7547  if test "x$has_forbidden_chars" != x; then
7548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7552      # Going to short mode and back again did indeed matter. Since short mode is
7553      # case insensitive, let's make it lowercase to improve readability.
7554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7555      # Now convert it back to Unix-stile (cygpath)
7556      input_path=`$CYGPATH -u "$shortmode_path"`
7557      new_path="$input_path"
7558    fi
7559  fi
7560
7561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7562  if test "x$test_cygdrive_prefix" = x; then
7563    # As a simple fix, exclude /usr/bin since it's not a real path.
7564    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
7565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7566      # a path prefixed by /cygdrive for fixpath to work.
7567      new_path="$CYGWIN_ROOT_PATH$input_path"
7568    fi
7569  fi
7570
7571  # remove trailing .exe if any
7572  new_path="${new_path/%.exe/}"
7573
7574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7575
7576  # First separate the path from the arguments. This will split at the first
7577  # space.
7578  complete="$FOUND_MAKE"
7579  path="${complete%% *}"
7580  tmp="$complete EOL"
7581  arguments="${tmp#* }"
7582
7583  # Input might be given as Windows format, start by converting to
7584  # unix format.
7585  new_path="$path"
7586
7587  windows_path="$new_path"
7588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7589    unix_path=`$CYGPATH -u "$windows_path"`
7590    new_path="$unix_path"
7591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7593    new_path="$unix_path"
7594  fi
7595
7596
7597  # Now try to locate executable using which
7598  new_path=`$WHICH "$new_path" 2> /dev/null`
7599
7600  if test "x$new_path" = x; then
7601    # Oops. Which didn't find the executable.
7602    # The splitting of arguments from the executable at a space might have been incorrect,
7603    # since paths with space are more likely in Windows. Give it another try with the whole
7604    # argument.
7605    path="$complete"
7606    arguments="EOL"
7607    new_path="$path"
7608
7609  windows_path="$new_path"
7610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7611    unix_path=`$CYGPATH -u "$windows_path"`
7612    new_path="$unix_path"
7613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7615    new_path="$unix_path"
7616  fi
7617
7618
7619    new_path=`$WHICH "$new_path" 2> /dev/null`
7620
7621    if test "x$new_path" = x; then
7622      # It's still not found. Now this is an unrecoverable error.
7623      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7624$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7625      has_space=`$ECHO "$complete" | $GREP " "`
7626      if test "x$has_space" != x; then
7627        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7628$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7629      fi
7630      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7631$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7632   { (exit 1); exit 1; }; }
7633    fi
7634  fi
7635
7636  # Now new_path has a complete unix path to the binary
7637  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
7638    # Keep paths in /bin as-is, but remove trailing .exe if any
7639    new_path="${new_path/%.exe/}"
7640    # Do not save /bin paths to all_fixpath_prefixes!
7641  else
7642    # Not in mixed or Windows style, start by that.
7643    new_path=`cmd //c echo $new_path`
7644
7645  input_path="$new_path"
7646  # Check if we need to convert this using DOS-style short mode. If the path
7647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7648  # take no chances and rewrite it.
7649  # Note: m4 eats our [], so we need to use [ and ] instead.
7650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7651  if test "x$has_forbidden_chars" != x; then
7652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7653    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7654  fi
7655
7656    # Output is in $new_path
7657
7658  windows_path="$new_path"
7659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7660    unix_path=`$CYGPATH -u "$windows_path"`
7661    new_path="$unix_path"
7662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7664    new_path="$unix_path"
7665  fi
7666
7667    # remove trailing .exe if any
7668    new_path="${new_path/%.exe/}"
7669
7670    # Save the first 10 bytes of this path to the storage, so fixpath can work.
7671    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7672  fi
7673
7674  else
7675    # We're on a posix platform. Hooray! :)
7676    # First separate the path from the arguments. This will split at the first
7677    # space.
7678    complete="$FOUND_MAKE"
7679    path="${complete%% *}"
7680    tmp="$complete EOL"
7681    arguments="${tmp#* }"
7682
7683    new_path=`$WHICH $path 2> /dev/null`
7684    if test "x$new_path" = x; then
7685      is_absolute_path=`$ECHO "$path" | $GREP ^/`
7686      if test "x$is_absolute_path" != x; then
7687        { $as_echo "$as_me:$LINENO: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
7688$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
7689        new_path="$path"
7690      else
7691        { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7692$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7693        has_space=`$ECHO "$complete" | $GREP " "`
7694        if test "x$has_space" != x; then
7695          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
7696$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
7697        fi
7698        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7699$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7700   { (exit 1); exit 1; }; }
7701      fi
7702    fi
7703  fi
7704
7705  # Now join together the path and the arguments once again
7706  if test "x$arguments" != xEOL; then
7707      new_complete="$new_path ${arguments% *}"
7708  else
7709      new_complete="$new_path"
7710  fi
7711
7712  if test "x$complete" != "x$new_complete"; then
7713    FOUND_MAKE="$new_complete"
7714    { $as_echo "$as_me:$LINENO: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
7715$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
7716  fi
7717
7718        fi
7719      fi
7720    fi
7721  fi
7722
7723    if test "x$FOUND_MAKE" = x; then
7724      { { $as_echo "$as_me:$LINENO: error: The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." >&5
7725$as_echo "$as_me: error: The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." >&2;}
7726   { (exit 1); exit 1; }; }
7727    fi
7728  else
7729    # Try our hardest to locate a correct version of GNU make
7730    for ac_prog in gmake
7731do
7732  # Extract the first word of "$ac_prog", so it can be a program name with args.
7733set dummy $ac_prog; ac_word=$2
7734{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7735$as_echo_n "checking for $ac_word... " >&6; }
7736if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then
7737  $as_echo_n "(cached) " >&6
7738else
7739  case $CHECK_GMAKE in
7740  [\\/]* | ?:[\\/]*)
7741  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
7742  ;;
7743  *)
7744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7745for as_dir in $PATH
7746do
7747  IFS=$as_save_IFS
7748  test -z "$as_dir" && as_dir=.
7749  for ac_exec_ext in '' $ac_executable_extensions; do
7750  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7751    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
7752    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7753    break 2
7754  fi
7755done
7756done
7757IFS=$as_save_IFS
7758
7759  ;;
7760esac
7761fi
7762CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
7763if test -n "$CHECK_GMAKE"; then
7764  { $as_echo "$as_me:$LINENO: result: $CHECK_GMAKE" >&5
7765$as_echo "$CHECK_GMAKE" >&6; }
7766else
7767  { $as_echo "$as_me:$LINENO: result: no" >&5
7768$as_echo "no" >&6; }
7769fi
7770
7771
7772  test -n "$CHECK_GMAKE" && break
7773done
7774
7775
7776  MAKE_CANDIDATE=""$CHECK_GMAKE""
7777  DESCRIPTION="gmake in PATH"
7778  if test "x$MAKE_CANDIDATE" != x; then
7779    { $as_echo "$as_me:$LINENO: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7780$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7781    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7782    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7783    if test "x$IS_GNU_MAKE" = x; then
7784      { $as_echo "$as_me:$LINENO: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7785$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7786    else
7787      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7788      if test "x$IS_MODERN_MAKE" = x; then
7789        { $as_echo "$as_me:$LINENO: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
7790$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
7791      else
7792        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7793          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7794            MAKE_EXPECTED_ENV='cygwin'
7795          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7796            MAKE_EXPECTED_ENV='msys'
7797          else
7798            { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment" >&5
7799$as_echo "$as_me: error: Unknown Windows environment" >&2;}
7800   { (exit 1); exit 1; }; }
7801          fi
7802          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7803          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7804        else
7805          # Not relevant for non-Windows
7806          IS_MAKE_CORRECT_ENV=true
7807        fi
7808        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7809          { $as_echo "$as_me:$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
7810$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;}
7811        else
7812          FOUND_MAKE=$MAKE_CANDIDATE
7813
7814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7815
7816  # First separate the path from the arguments. This will split at the first
7817  # space.
7818  complete="$FOUND_MAKE"
7819  path="${complete%% *}"
7820  tmp="$complete EOL"
7821  arguments="${tmp#* }"
7822
7823  # Input might be given as Windows format, start by converting to
7824  # unix format.
7825  new_path=`$CYGPATH -u "$path"`
7826
7827  # Now try to locate executable using which
7828  new_path=`$WHICH "$new_path" 2> /dev/null`
7829  # bat and cmd files are not always considered executable in cygwin causing which
7830  # to not find them
7831  if test "x$new_path" = x \
7832           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7833           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7834    new_path=`$CYGPATH -u "$path"`
7835  fi
7836  if test "x$new_path" = x; then
7837    # Oops. Which didn't find the executable.
7838    # The splitting of arguments from the executable at a space might have been incorrect,
7839    # since paths with space are more likely in Windows. Give it another try with the whole
7840    # argument.
7841    path="$complete"
7842    arguments="EOL"
7843    new_path=`$CYGPATH -u "$path"`
7844    new_path=`$WHICH "$new_path" 2> /dev/null`
7845    # bat and cmd files are not always considered executable in cygwin causing which
7846    # to not find them
7847    if test "x$new_path" = x \
7848             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7849             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7850      new_path=`$CYGPATH -u "$path"`
7851    fi
7852    if test "x$new_path" = x; then
7853      # It's still not found. Now this is an unrecoverable error.
7854      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7855$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7856      has_space=`$ECHO "$complete" | $GREP " "`
7857      if test "x$has_space" != x; then
7858        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7860      fi
7861      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7862$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7863   { (exit 1); exit 1; }; }
7864    fi
7865  fi
7866
7867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7870  # "foo.exe" is OK but "foo" is an error.
7871  #
7872  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7873  # It is also a way to make sure we got the proper file name for the real test later on.
7874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7875  if test "x$test_shortpath" = x; then
7876    # Short path failed, file does not exist as specified.
7877    # Try adding .exe or .cmd
7878    if test -f "${new_path}.exe"; then
7879       input_to_shortpath="${new_path}.exe"
7880    elif test -f "${new_path}.cmd"; then
7881       input_to_shortpath="${new_path}.cmd"
7882    else
7883      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
7884$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
7885      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
7886$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
7887      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7888$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7889   { (exit 1); exit 1; }; }
7890    fi
7891  else
7892    input_to_shortpath="$new_path"
7893  fi
7894
7895  # Call helper function which possibly converts this using DOS-style short mode.
7896  # If so, the updated path is stored in $new_path.
7897  new_path="$input_to_shortpath"
7898
7899  input_path="$input_to_shortpath"
7900  # Check if we need to convert this using DOS-style short mode. If the path
7901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7902  # take no chances and rewrite it.
7903  # Note: m4 eats our [], so we need to use [ and ] instead.
7904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7905  if test "x$has_forbidden_chars" != x; then
7906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7907    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7908    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7909    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7910      # Going to short mode and back again did indeed matter. Since short mode is
7911      # case insensitive, let's make it lowercase to improve readability.
7912      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7913      # Now convert it back to Unix-stile (cygpath)
7914      input_path=`$CYGPATH -u "$shortmode_path"`
7915      new_path="$input_path"
7916    fi
7917  fi
7918
7919  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7920  if test "x$test_cygdrive_prefix" = x; then
7921    # As a simple fix, exclude /usr/bin since it's not a real path.
7922    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
7923      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7924      # a path prefixed by /cygdrive for fixpath to work.
7925      new_path="$CYGWIN_ROOT_PATH$input_path"
7926    fi
7927  fi
7928
7929  # remove trailing .exe if any
7930  new_path="${new_path/%.exe/}"
7931
7932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7933
7934  # First separate the path from the arguments. This will split at the first
7935  # space.
7936  complete="$FOUND_MAKE"
7937  path="${complete%% *}"
7938  tmp="$complete EOL"
7939  arguments="${tmp#* }"
7940
7941  # Input might be given as Windows format, start by converting to
7942  # unix format.
7943  new_path="$path"
7944
7945  windows_path="$new_path"
7946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7947    unix_path=`$CYGPATH -u "$windows_path"`
7948    new_path="$unix_path"
7949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7951    new_path="$unix_path"
7952  fi
7953
7954
7955  # Now try to locate executable using which
7956  new_path=`$WHICH "$new_path" 2> /dev/null`
7957
7958  if test "x$new_path" = x; then
7959    # Oops. Which didn't find the executable.
7960    # The splitting of arguments from the executable at a space might have been incorrect,
7961    # since paths with space are more likely in Windows. Give it another try with the whole
7962    # argument.
7963    path="$complete"
7964    arguments="EOL"
7965    new_path="$path"
7966
7967  windows_path="$new_path"
7968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7969    unix_path=`$CYGPATH -u "$windows_path"`
7970    new_path="$unix_path"
7971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7973    new_path="$unix_path"
7974  fi
7975
7976
7977    new_path=`$WHICH "$new_path" 2> /dev/null`
7978
7979    if test "x$new_path" = x; then
7980      # It's still not found. Now this is an unrecoverable error.
7981      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7982$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7983      has_space=`$ECHO "$complete" | $GREP " "`
7984      if test "x$has_space" != x; then
7985        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7987      fi
7988      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7989$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7990   { (exit 1); exit 1; }; }
7991    fi
7992  fi
7993
7994  # Now new_path has a complete unix path to the binary
7995  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
7996    # Keep paths in /bin as-is, but remove trailing .exe if any
7997    new_path="${new_path/%.exe/}"
7998    # Do not save /bin paths to all_fixpath_prefixes!
7999  else
8000    # Not in mixed or Windows style, start by that.
8001    new_path=`cmd //c echo $new_path`
8002
8003  input_path="$new_path"
8004  # Check if we need to convert this using DOS-style short mode. If the path
8005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8006  # take no chances and rewrite it.
8007  # Note: m4 eats our [], so we need to use [ and ] instead.
8008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8009  if test "x$has_forbidden_chars" != x; then
8010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8012  fi
8013
8014    # Output is in $new_path
8015
8016  windows_path="$new_path"
8017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8018    unix_path=`$CYGPATH -u "$windows_path"`
8019    new_path="$unix_path"
8020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8022    new_path="$unix_path"
8023  fi
8024
8025    # remove trailing .exe if any
8026    new_path="${new_path/%.exe/}"
8027
8028    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8029    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8030  fi
8031
8032  else
8033    # We're on a posix platform. Hooray! :)
8034    # First separate the path from the arguments. This will split at the first
8035    # space.
8036    complete="$FOUND_MAKE"
8037    path="${complete%% *}"
8038    tmp="$complete EOL"
8039    arguments="${tmp#* }"
8040
8041    new_path=`$WHICH $path 2> /dev/null`
8042    if test "x$new_path" = x; then
8043      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8044      if test "x$is_absolute_path" != x; then
8045        { $as_echo "$as_me:$LINENO: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8046$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8047        new_path="$path"
8048      else
8049        { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8051        has_space=`$ECHO "$complete" | $GREP " "`
8052        if test "x$has_space" != x; then
8053          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
8054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8055        fi
8056        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8057$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8058   { (exit 1); exit 1; }; }
8059      fi
8060    fi
8061  fi
8062
8063  # Now join together the path and the arguments once again
8064  if test "x$arguments" != xEOL; then
8065      new_complete="$new_path ${arguments% *}"
8066  else
8067      new_complete="$new_path"
8068  fi
8069
8070  if test "x$complete" != "x$new_complete"; then
8071    FOUND_MAKE="$new_complete"
8072    { $as_echo "$as_me:$LINENO: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8073$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8074  fi
8075
8076        fi
8077      fi
8078    fi
8079  fi
8080
8081
8082    if test "x$FOUND_MAKE" = x; then
8083      for ac_prog in make
8084do
8085  # Extract the first word of "$ac_prog", so it can be a program name with args.
8086set dummy $ac_prog; ac_word=$2
8087{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8088$as_echo_n "checking for $ac_word... " >&6; }
8089if test "${ac_cv_path_CHECK_MAKE+set}" = set; then
8090  $as_echo_n "(cached) " >&6
8091else
8092  case $CHECK_MAKE in
8093  [\\/]* | ?:[\\/]*)
8094  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8095  ;;
8096  *)
8097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8098for as_dir in $PATH
8099do
8100  IFS=$as_save_IFS
8101  test -z "$as_dir" && as_dir=.
8102  for ac_exec_ext in '' $ac_executable_extensions; do
8103  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8104    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8105    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8106    break 2
8107  fi
8108done
8109done
8110IFS=$as_save_IFS
8111
8112  ;;
8113esac
8114fi
8115CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8116if test -n "$CHECK_MAKE"; then
8117  { $as_echo "$as_me:$LINENO: result: $CHECK_MAKE" >&5
8118$as_echo "$CHECK_MAKE" >&6; }
8119else
8120  { $as_echo "$as_me:$LINENO: result: no" >&5
8121$as_echo "no" >&6; }
8122fi
8123
8124
8125  test -n "$CHECK_MAKE" && break
8126done
8127
8128
8129  MAKE_CANDIDATE=""$CHECK_MAKE""
8130  DESCRIPTION="make in PATH"
8131  if test "x$MAKE_CANDIDATE" != x; then
8132    { $as_echo "$as_me:$LINENO: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8133$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8134    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8135    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8136    if test "x$IS_GNU_MAKE" = x; then
8137      { $as_echo "$as_me:$LINENO: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8138$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8139    else
8140      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8141      if test "x$IS_MODERN_MAKE" = x; then
8142        { $as_echo "$as_me:$LINENO: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8143$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8144      else
8145        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8146          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8147            MAKE_EXPECTED_ENV='cygwin'
8148          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8149            MAKE_EXPECTED_ENV='msys'
8150          else
8151            { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment" >&5
8152$as_echo "$as_me: error: Unknown Windows environment" >&2;}
8153   { (exit 1); exit 1; }; }
8154          fi
8155          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8156          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8157        else
8158          # Not relevant for non-Windows
8159          IS_MAKE_CORRECT_ENV=true
8160        fi
8161        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8162          { $as_echo "$as_me:$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
8163$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;}
8164        else
8165          FOUND_MAKE=$MAKE_CANDIDATE
8166
8167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8168
8169  # First separate the path from the arguments. This will split at the first
8170  # space.
8171  complete="$FOUND_MAKE"
8172  path="${complete%% *}"
8173  tmp="$complete EOL"
8174  arguments="${tmp#* }"
8175
8176  # Input might be given as Windows format, start by converting to
8177  # unix format.
8178  new_path=`$CYGPATH -u "$path"`
8179
8180  # Now try to locate executable using which
8181  new_path=`$WHICH "$new_path" 2> /dev/null`
8182  # bat and cmd files are not always considered executable in cygwin causing which
8183  # to not find them
8184  if test "x$new_path" = x \
8185           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8186           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8187    new_path=`$CYGPATH -u "$path"`
8188  fi
8189  if test "x$new_path" = x; then
8190    # Oops. Which didn't find the executable.
8191    # The splitting of arguments from the executable at a space might have been incorrect,
8192    # since paths with space are more likely in Windows. Give it another try with the whole
8193    # argument.
8194    path="$complete"
8195    arguments="EOL"
8196    new_path=`$CYGPATH -u "$path"`
8197    new_path=`$WHICH "$new_path" 2> /dev/null`
8198    # bat and cmd files are not always considered executable in cygwin causing which
8199    # to not find them
8200    if test "x$new_path" = x \
8201             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8202             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8203      new_path=`$CYGPATH -u "$path"`
8204    fi
8205    if test "x$new_path" = x; then
8206      # It's still not found. Now this is an unrecoverable error.
8207      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8208$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8209      has_space=`$ECHO "$complete" | $GREP " "`
8210      if test "x$has_space" != x; then
8211        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8213      fi
8214      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8215$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8216   { (exit 1); exit 1; }; }
8217    fi
8218  fi
8219
8220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8223  # "foo.exe" is OK but "foo" is an error.
8224  #
8225  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8226  # It is also a way to make sure we got the proper file name for the real test later on.
8227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8228  if test "x$test_shortpath" = x; then
8229    # Short path failed, file does not exist as specified.
8230    # Try adding .exe or .cmd
8231    if test -f "${new_path}.exe"; then
8232       input_to_shortpath="${new_path}.exe"
8233    elif test -f "${new_path}.cmd"; then
8234       input_to_shortpath="${new_path}.cmd"
8235    else
8236      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8237$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8238      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8239$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8240      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8241$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8242   { (exit 1); exit 1; }; }
8243    fi
8244  else
8245    input_to_shortpath="$new_path"
8246  fi
8247
8248  # Call helper function which possibly converts this using DOS-style short mode.
8249  # If so, the updated path is stored in $new_path.
8250  new_path="$input_to_shortpath"
8251
8252  input_path="$input_to_shortpath"
8253  # Check if we need to convert this using DOS-style short mode. If the path
8254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8255  # take no chances and rewrite it.
8256  # Note: m4 eats our [], so we need to use [ and ] instead.
8257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8258  if test "x$has_forbidden_chars" != x; then
8259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8263      # Going to short mode and back again did indeed matter. Since short mode is
8264      # case insensitive, let's make it lowercase to improve readability.
8265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8266      # Now convert it back to Unix-stile (cygpath)
8267      input_path=`$CYGPATH -u "$shortmode_path"`
8268      new_path="$input_path"
8269    fi
8270  fi
8271
8272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8273  if test "x$test_cygdrive_prefix" = x; then
8274    # As a simple fix, exclude /usr/bin since it's not a real path.
8275    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8277      # a path prefixed by /cygdrive for fixpath to work.
8278      new_path="$CYGWIN_ROOT_PATH$input_path"
8279    fi
8280  fi
8281
8282  # remove trailing .exe if any
8283  new_path="${new_path/%.exe/}"
8284
8285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8286
8287  # First separate the path from the arguments. This will split at the first
8288  # space.
8289  complete="$FOUND_MAKE"
8290  path="${complete%% *}"
8291  tmp="$complete EOL"
8292  arguments="${tmp#* }"
8293
8294  # Input might be given as Windows format, start by converting to
8295  # unix format.
8296  new_path="$path"
8297
8298  windows_path="$new_path"
8299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8300    unix_path=`$CYGPATH -u "$windows_path"`
8301    new_path="$unix_path"
8302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8304    new_path="$unix_path"
8305  fi
8306
8307
8308  # Now try to locate executable using which
8309  new_path=`$WHICH "$new_path" 2> /dev/null`
8310
8311  if test "x$new_path" = x; then
8312    # Oops. Which didn't find the executable.
8313    # The splitting of arguments from the executable at a space might have been incorrect,
8314    # since paths with space are more likely in Windows. Give it another try with the whole
8315    # argument.
8316    path="$complete"
8317    arguments="EOL"
8318    new_path="$path"
8319
8320  windows_path="$new_path"
8321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8322    unix_path=`$CYGPATH -u "$windows_path"`
8323    new_path="$unix_path"
8324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8326    new_path="$unix_path"
8327  fi
8328
8329
8330    new_path=`$WHICH "$new_path" 2> /dev/null`
8331
8332    if test "x$new_path" = x; then
8333      # It's still not found. Now this is an unrecoverable error.
8334      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8335$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8336      has_space=`$ECHO "$complete" | $GREP " "`
8337      if test "x$has_space" != x; then
8338        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8340      fi
8341      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8342$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8343   { (exit 1); exit 1; }; }
8344    fi
8345  fi
8346
8347  # Now new_path has a complete unix path to the binary
8348  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8349    # Keep paths in /bin as-is, but remove trailing .exe if any
8350    new_path="${new_path/%.exe/}"
8351    # Do not save /bin paths to all_fixpath_prefixes!
8352  else
8353    # Not in mixed or Windows style, start by that.
8354    new_path=`cmd //c echo $new_path`
8355
8356  input_path="$new_path"
8357  # Check if we need to convert this using DOS-style short mode. If the path
8358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8359  # take no chances and rewrite it.
8360  # Note: m4 eats our [], so we need to use [ and ] instead.
8361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8362  if test "x$has_forbidden_chars" != x; then
8363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8365  fi
8366
8367    # Output is in $new_path
8368
8369  windows_path="$new_path"
8370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8371    unix_path=`$CYGPATH -u "$windows_path"`
8372    new_path="$unix_path"
8373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8375    new_path="$unix_path"
8376  fi
8377
8378    # remove trailing .exe if any
8379    new_path="${new_path/%.exe/}"
8380
8381    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8382    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8383  fi
8384
8385  else
8386    # We're on a posix platform. Hooray! :)
8387    # First separate the path from the arguments. This will split at the first
8388    # space.
8389    complete="$FOUND_MAKE"
8390    path="${complete%% *}"
8391    tmp="$complete EOL"
8392    arguments="${tmp#* }"
8393
8394    new_path=`$WHICH $path 2> /dev/null`
8395    if test "x$new_path" = x; then
8396      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8397      if test "x$is_absolute_path" != x; then
8398        { $as_echo "$as_me:$LINENO: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8399$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8400        new_path="$path"
8401      else
8402        { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8403$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8404        has_space=`$ECHO "$complete" | $GREP " "`
8405        if test "x$has_space" != x; then
8406          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
8407$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8408        fi
8409        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8410$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8411   { (exit 1); exit 1; }; }
8412      fi
8413    fi
8414  fi
8415
8416  # Now join together the path and the arguments once again
8417  if test "x$arguments" != xEOL; then
8418      new_complete="$new_path ${arguments% *}"
8419  else
8420      new_complete="$new_path"
8421  fi
8422
8423  if test "x$complete" != "x$new_complete"; then
8424    FOUND_MAKE="$new_complete"
8425    { $as_echo "$as_me:$LINENO: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8426$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8427  fi
8428
8429        fi
8430      fi
8431    fi
8432  fi
8433
8434    fi
8435
8436    if test "x$FOUND_MAKE" = x; then
8437      if test "x$TOOLS_DIR" != x; then
8438        # We have a tools-dir, check that as well before giving up.
8439        OLD_PATH=$PATH
8440        PATH=$TOOLS_DIR:$PATH
8441        for ac_prog in gmake
8442do
8443  # Extract the first word of "$ac_prog", so it can be a program name with args.
8444set dummy $ac_prog; ac_word=$2
8445{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8446$as_echo_n "checking for $ac_word... " >&6; }
8447if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then
8448  $as_echo_n "(cached) " >&6
8449else
8450  case $CHECK_TOOLSDIR_GMAKE in
8451  [\\/]* | ?:[\\/]*)
8452  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
8453  ;;
8454  *)
8455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8456for as_dir in $PATH
8457do
8458  IFS=$as_save_IFS
8459  test -z "$as_dir" && as_dir=.
8460  for ac_exec_ext in '' $ac_executable_extensions; do
8461  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8462    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8463    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8464    break 2
8465  fi
8466done
8467done
8468IFS=$as_save_IFS
8469
8470  ;;
8471esac
8472fi
8473CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
8474if test -n "$CHECK_TOOLSDIR_GMAKE"; then
8475  { $as_echo "$as_me:$LINENO: result: $CHECK_TOOLSDIR_GMAKE" >&5
8476$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
8477else
8478  { $as_echo "$as_me:$LINENO: result: no" >&5
8479$as_echo "no" >&6; }
8480fi
8481
8482
8483  test -n "$CHECK_TOOLSDIR_GMAKE" && break
8484done
8485
8486
8487  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
8488  DESCRIPTION="gmake in tools-dir"
8489  if test "x$MAKE_CANDIDATE" != x; then
8490    { $as_echo "$as_me:$LINENO: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8491$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8492    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8493    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8494    if test "x$IS_GNU_MAKE" = x; then
8495      { $as_echo "$as_me:$LINENO: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8496$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8497    else
8498      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8499      if test "x$IS_MODERN_MAKE" = x; then
8500        { $as_echo "$as_me:$LINENO: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8501$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8502      else
8503        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8504          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8505            MAKE_EXPECTED_ENV='cygwin'
8506          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8507            MAKE_EXPECTED_ENV='msys'
8508          else
8509            { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment" >&5
8510$as_echo "$as_me: error: Unknown Windows environment" >&2;}
8511   { (exit 1); exit 1; }; }
8512          fi
8513          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8514          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8515        else
8516          # Not relevant for non-Windows
8517          IS_MAKE_CORRECT_ENV=true
8518        fi
8519        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8520          { $as_echo "$as_me:$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
8521$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;}
8522        else
8523          FOUND_MAKE=$MAKE_CANDIDATE
8524
8525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8526
8527  # First separate the path from the arguments. This will split at the first
8528  # space.
8529  complete="$FOUND_MAKE"
8530  path="${complete%% *}"
8531  tmp="$complete EOL"
8532  arguments="${tmp#* }"
8533
8534  # Input might be given as Windows format, start by converting to
8535  # unix format.
8536  new_path=`$CYGPATH -u "$path"`
8537
8538  # Now try to locate executable using which
8539  new_path=`$WHICH "$new_path" 2> /dev/null`
8540  # bat and cmd files are not always considered executable in cygwin causing which
8541  # to not find them
8542  if test "x$new_path" = x \
8543           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8544           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8545    new_path=`$CYGPATH -u "$path"`
8546  fi
8547  if test "x$new_path" = x; then
8548    # Oops. Which didn't find the executable.
8549    # The splitting of arguments from the executable at a space might have been incorrect,
8550    # since paths with space are more likely in Windows. Give it another try with the whole
8551    # argument.
8552    path="$complete"
8553    arguments="EOL"
8554    new_path=`$CYGPATH -u "$path"`
8555    new_path=`$WHICH "$new_path" 2> /dev/null`
8556    # bat and cmd files are not always considered executable in cygwin causing which
8557    # to not find them
8558    if test "x$new_path" = x \
8559             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8560             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8561      new_path=`$CYGPATH -u "$path"`
8562    fi
8563    if test "x$new_path" = x; then
8564      # It's still not found. Now this is an unrecoverable error.
8565      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8566$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8567      has_space=`$ECHO "$complete" | $GREP " "`
8568      if test "x$has_space" != x; then
8569        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8571      fi
8572      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8573$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8574   { (exit 1); exit 1; }; }
8575    fi
8576  fi
8577
8578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8581  # "foo.exe" is OK but "foo" is an error.
8582  #
8583  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8584  # It is also a way to make sure we got the proper file name for the real test later on.
8585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8586  if test "x$test_shortpath" = x; then
8587    # Short path failed, file does not exist as specified.
8588    # Try adding .exe or .cmd
8589    if test -f "${new_path}.exe"; then
8590       input_to_shortpath="${new_path}.exe"
8591    elif test -f "${new_path}.cmd"; then
8592       input_to_shortpath="${new_path}.cmd"
8593    else
8594      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8595$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8596      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8597$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8598      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8599$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8600   { (exit 1); exit 1; }; }
8601    fi
8602  else
8603    input_to_shortpath="$new_path"
8604  fi
8605
8606  # Call helper function which possibly converts this using DOS-style short mode.
8607  # If so, the updated path is stored in $new_path.
8608  new_path="$input_to_shortpath"
8609
8610  input_path="$input_to_shortpath"
8611  # Check if we need to convert this using DOS-style short mode. If the path
8612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8613  # take no chances and rewrite it.
8614  # Note: m4 eats our [], so we need to use [ and ] instead.
8615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8616  if test "x$has_forbidden_chars" != x; then
8617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8621      # Going to short mode and back again did indeed matter. Since short mode is
8622      # case insensitive, let's make it lowercase to improve readability.
8623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8624      # Now convert it back to Unix-stile (cygpath)
8625      input_path=`$CYGPATH -u "$shortmode_path"`
8626      new_path="$input_path"
8627    fi
8628  fi
8629
8630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8631  if test "x$test_cygdrive_prefix" = x; then
8632    # As a simple fix, exclude /usr/bin since it's not a real path.
8633    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8635      # a path prefixed by /cygdrive for fixpath to work.
8636      new_path="$CYGWIN_ROOT_PATH$input_path"
8637    fi
8638  fi
8639
8640  # remove trailing .exe if any
8641  new_path="${new_path/%.exe/}"
8642
8643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8644
8645  # First separate the path from the arguments. This will split at the first
8646  # space.
8647  complete="$FOUND_MAKE"
8648  path="${complete%% *}"
8649  tmp="$complete EOL"
8650  arguments="${tmp#* }"
8651
8652  # Input might be given as Windows format, start by converting to
8653  # unix format.
8654  new_path="$path"
8655
8656  windows_path="$new_path"
8657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8658    unix_path=`$CYGPATH -u "$windows_path"`
8659    new_path="$unix_path"
8660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8662    new_path="$unix_path"
8663  fi
8664
8665
8666  # Now try to locate executable using which
8667  new_path=`$WHICH "$new_path" 2> /dev/null`
8668
8669  if test "x$new_path" = x; then
8670    # Oops. Which didn't find the executable.
8671    # The splitting of arguments from the executable at a space might have been incorrect,
8672    # since paths with space are more likely in Windows. Give it another try with the whole
8673    # argument.
8674    path="$complete"
8675    arguments="EOL"
8676    new_path="$path"
8677
8678  windows_path="$new_path"
8679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8680    unix_path=`$CYGPATH -u "$windows_path"`
8681    new_path="$unix_path"
8682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8684    new_path="$unix_path"
8685  fi
8686
8687
8688    new_path=`$WHICH "$new_path" 2> /dev/null`
8689
8690    if test "x$new_path" = x; then
8691      # It's still not found. Now this is an unrecoverable error.
8692      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8693$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8694      has_space=`$ECHO "$complete" | $GREP " "`
8695      if test "x$has_space" != x; then
8696        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8697$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8698      fi
8699      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8700$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8701   { (exit 1); exit 1; }; }
8702    fi
8703  fi
8704
8705  # Now new_path has a complete unix path to the binary
8706  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8707    # Keep paths in /bin as-is, but remove trailing .exe if any
8708    new_path="${new_path/%.exe/}"
8709    # Do not save /bin paths to all_fixpath_prefixes!
8710  else
8711    # Not in mixed or Windows style, start by that.
8712    new_path=`cmd //c echo $new_path`
8713
8714  input_path="$new_path"
8715  # Check if we need to convert this using DOS-style short mode. If the path
8716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8717  # take no chances and rewrite it.
8718  # Note: m4 eats our [], so we need to use [ and ] instead.
8719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8720  if test "x$has_forbidden_chars" != x; then
8721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8723  fi
8724
8725    # Output is in $new_path
8726
8727  windows_path="$new_path"
8728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8729    unix_path=`$CYGPATH -u "$windows_path"`
8730    new_path="$unix_path"
8731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8733    new_path="$unix_path"
8734  fi
8735
8736    # remove trailing .exe if any
8737    new_path="${new_path/%.exe/}"
8738
8739    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8740    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8741  fi
8742
8743  else
8744    # We're on a posix platform. Hooray! :)
8745    # First separate the path from the arguments. This will split at the first
8746    # space.
8747    complete="$FOUND_MAKE"
8748    path="${complete%% *}"
8749    tmp="$complete EOL"
8750    arguments="${tmp#* }"
8751
8752    new_path=`$WHICH $path 2> /dev/null`
8753    if test "x$new_path" = x; then
8754      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8755      if test "x$is_absolute_path" != x; then
8756        { $as_echo "$as_me:$LINENO: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8757$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8758        new_path="$path"
8759      else
8760        { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8761$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8762        has_space=`$ECHO "$complete" | $GREP " "`
8763        if test "x$has_space" != x; then
8764          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
8765$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8766        fi
8767        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8768$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8769   { (exit 1); exit 1; }; }
8770      fi
8771    fi
8772  fi
8773
8774  # Now join together the path and the arguments once again
8775  if test "x$arguments" != xEOL; then
8776      new_complete="$new_path ${arguments% *}"
8777  else
8778      new_complete="$new_path"
8779  fi
8780
8781  if test "x$complete" != "x$new_complete"; then
8782    FOUND_MAKE="$new_complete"
8783    { $as_echo "$as_me:$LINENO: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8784$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8785  fi
8786
8787        fi
8788      fi
8789    fi
8790  fi
8791
8792        if test "x$FOUND_MAKE" = x; then
8793          for ac_prog in make
8794do
8795  # Extract the first word of "$ac_prog", so it can be a program name with args.
8796set dummy $ac_prog; ac_word=$2
8797{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8798$as_echo_n "checking for $ac_word... " >&6; }
8799if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then
8800  $as_echo_n "(cached) " >&6
8801else
8802  case $CHECK_TOOLSDIR_MAKE in
8803  [\\/]* | ?:[\\/]*)
8804  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
8805  ;;
8806  *)
8807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8808for as_dir in $PATH
8809do
8810  IFS=$as_save_IFS
8811  test -z "$as_dir" && as_dir=.
8812  for ac_exec_ext in '' $ac_executable_extensions; do
8813  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8814    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
8815    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8816    break 2
8817  fi
8818done
8819done
8820IFS=$as_save_IFS
8821
8822  ;;
8823esac
8824fi
8825CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
8826if test -n "$CHECK_TOOLSDIR_MAKE"; then
8827  { $as_echo "$as_me:$LINENO: result: $CHECK_TOOLSDIR_MAKE" >&5
8828$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
8829else
8830  { $as_echo "$as_me:$LINENO: result: no" >&5
8831$as_echo "no" >&6; }
8832fi
8833
8834
8835  test -n "$CHECK_TOOLSDIR_MAKE" && break
8836done
8837
8838
8839  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
8840  DESCRIPTION="make in tools-dir"
8841  if test "x$MAKE_CANDIDATE" != x; then
8842    { $as_echo "$as_me:$LINENO: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8843$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8844    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8845    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8846    if test "x$IS_GNU_MAKE" = x; then
8847      { $as_echo "$as_me:$LINENO: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8848$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8849    else
8850      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8851      if test "x$IS_MODERN_MAKE" = x; then
8852        { $as_echo "$as_me:$LINENO: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8853$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8854      else
8855        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8856          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8857            MAKE_EXPECTED_ENV='cygwin'
8858          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8859            MAKE_EXPECTED_ENV='msys'
8860          else
8861            { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment" >&5
8862$as_echo "$as_me: error: Unknown Windows environment" >&2;}
8863   { (exit 1); exit 1; }; }
8864          fi
8865          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8866          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8867        else
8868          # Not relevant for non-Windows
8869          IS_MAKE_CORRECT_ENV=true
8870        fi
8871        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8872          { $as_echo "$as_me:$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
8873$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;}
8874        else
8875          FOUND_MAKE=$MAKE_CANDIDATE
8876
8877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8878
8879  # First separate the path from the arguments. This will split at the first
8880  # space.
8881  complete="$FOUND_MAKE"
8882  path="${complete%% *}"
8883  tmp="$complete EOL"
8884  arguments="${tmp#* }"
8885
8886  # Input might be given as Windows format, start by converting to
8887  # unix format.
8888  new_path=`$CYGPATH -u "$path"`
8889
8890  # Now try to locate executable using which
8891  new_path=`$WHICH "$new_path" 2> /dev/null`
8892  # bat and cmd files are not always considered executable in cygwin causing which
8893  # to not find them
8894  if test "x$new_path" = x \
8895           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8896           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8897    new_path=`$CYGPATH -u "$path"`
8898  fi
8899  if test "x$new_path" = x; then
8900    # Oops. Which didn't find the executable.
8901    # The splitting of arguments from the executable at a space might have been incorrect,
8902    # since paths with space are more likely in Windows. Give it another try with the whole
8903    # argument.
8904    path="$complete"
8905    arguments="EOL"
8906    new_path=`$CYGPATH -u "$path"`
8907    new_path=`$WHICH "$new_path" 2> /dev/null`
8908    # bat and cmd files are not always considered executable in cygwin causing which
8909    # to not find them
8910    if test "x$new_path" = x \
8911             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8912             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8913      new_path=`$CYGPATH -u "$path"`
8914    fi
8915    if test "x$new_path" = x; then
8916      # It's still not found. Now this is an unrecoverable error.
8917      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8918$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8919      has_space=`$ECHO "$complete" | $GREP " "`
8920      if test "x$has_space" != x; then
8921        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8922$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8923      fi
8924      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8925$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8926   { (exit 1); exit 1; }; }
8927    fi
8928  fi
8929
8930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8933  # "foo.exe" is OK but "foo" is an error.
8934  #
8935  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8936  # It is also a way to make sure we got the proper file name for the real test later on.
8937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8938  if test "x$test_shortpath" = x; then
8939    # Short path failed, file does not exist as specified.
8940    # Try adding .exe or .cmd
8941    if test -f "${new_path}.exe"; then
8942       input_to_shortpath="${new_path}.exe"
8943    elif test -f "${new_path}.cmd"; then
8944       input_to_shortpath="${new_path}.cmd"
8945    else
8946      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8947$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8948      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8949$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8950      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8951$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8952   { (exit 1); exit 1; }; }
8953    fi
8954  else
8955    input_to_shortpath="$new_path"
8956  fi
8957
8958  # Call helper function which possibly converts this using DOS-style short mode.
8959  # If so, the updated path is stored in $new_path.
8960  new_path="$input_to_shortpath"
8961
8962  input_path="$input_to_shortpath"
8963  # Check if we need to convert this using DOS-style short mode. If the path
8964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8965  # take no chances and rewrite it.
8966  # Note: m4 eats our [], so we need to use [ and ] instead.
8967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8968  if test "x$has_forbidden_chars" != x; then
8969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8973      # Going to short mode and back again did indeed matter. Since short mode is
8974      # case insensitive, let's make it lowercase to improve readability.
8975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8976      # Now convert it back to Unix-stile (cygpath)
8977      input_path=`$CYGPATH -u "$shortmode_path"`
8978      new_path="$input_path"
8979    fi
8980  fi
8981
8982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8983  if test "x$test_cygdrive_prefix" = x; then
8984    # As a simple fix, exclude /usr/bin since it's not a real path.
8985    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8987      # a path prefixed by /cygdrive for fixpath to work.
8988      new_path="$CYGWIN_ROOT_PATH$input_path"
8989    fi
8990  fi
8991
8992  # remove trailing .exe if any
8993  new_path="${new_path/%.exe/}"
8994
8995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8996
8997  # First separate the path from the arguments. This will split at the first
8998  # space.
8999  complete="$FOUND_MAKE"
9000  path="${complete%% *}"
9001  tmp="$complete EOL"
9002  arguments="${tmp#* }"
9003
9004  # Input might be given as Windows format, start by converting to
9005  # unix format.
9006  new_path="$path"
9007
9008  windows_path="$new_path"
9009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9010    unix_path=`$CYGPATH -u "$windows_path"`
9011    new_path="$unix_path"
9012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9014    new_path="$unix_path"
9015  fi
9016
9017
9018  # Now try to locate executable using which
9019  new_path=`$WHICH "$new_path" 2> /dev/null`
9020
9021  if test "x$new_path" = x; then
9022    # Oops. Which didn't find the executable.
9023    # The splitting of arguments from the executable at a space might have been incorrect,
9024    # since paths with space are more likely in Windows. Give it another try with the whole
9025    # argument.
9026    path="$complete"
9027    arguments="EOL"
9028    new_path="$path"
9029
9030  windows_path="$new_path"
9031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9032    unix_path=`$CYGPATH -u "$windows_path"`
9033    new_path="$unix_path"
9034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9036    new_path="$unix_path"
9037  fi
9038
9039
9040    new_path=`$WHICH "$new_path" 2> /dev/null`
9041
9042    if test "x$new_path" = x; then
9043      # It's still not found. Now this is an unrecoverable error.
9044      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9045$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9046      has_space=`$ECHO "$complete" | $GREP " "`
9047      if test "x$has_space" != x; then
9048        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9049$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9050      fi
9051      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
9052$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
9053   { (exit 1); exit 1; }; }
9054    fi
9055  fi
9056
9057  # Now new_path has a complete unix path to the binary
9058  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9059    # Keep paths in /bin as-is, but remove trailing .exe if any
9060    new_path="${new_path/%.exe/}"
9061    # Do not save /bin paths to all_fixpath_prefixes!
9062  else
9063    # Not in mixed or Windows style, start by that.
9064    new_path=`cmd //c echo $new_path`
9065
9066  input_path="$new_path"
9067  # Check if we need to convert this using DOS-style short mode. If the path
9068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9069  # take no chances and rewrite it.
9070  # Note: m4 eats our [], so we need to use [ and ] instead.
9071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9072  if test "x$has_forbidden_chars" != x; then
9073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9075  fi
9076
9077    # Output is in $new_path
9078
9079  windows_path="$new_path"
9080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9081    unix_path=`$CYGPATH -u "$windows_path"`
9082    new_path="$unix_path"
9083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9085    new_path="$unix_path"
9086  fi
9087
9088    # remove trailing .exe if any
9089    new_path="${new_path/%.exe/}"
9090
9091    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9092    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9093  fi
9094
9095  else
9096    # We're on a posix platform. Hooray! :)
9097    # First separate the path from the arguments. This will split at the first
9098    # space.
9099    complete="$FOUND_MAKE"
9100    path="${complete%% *}"
9101    tmp="$complete EOL"
9102    arguments="${tmp#* }"
9103
9104    new_path=`$WHICH $path 2> /dev/null`
9105    if test "x$new_path" = x; then
9106      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9107      if test "x$is_absolute_path" != x; then
9108        { $as_echo "$as_me:$LINENO: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9109$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9110        new_path="$path"
9111      else
9112        { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9113$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9114        has_space=`$ECHO "$complete" | $GREP " "`
9115        if test "x$has_space" != x; then
9116          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
9117$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9118        fi
9119        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
9120$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
9121   { (exit 1); exit 1; }; }
9122      fi
9123    fi
9124  fi
9125
9126  # Now join together the path and the arguments once again
9127  if test "x$arguments" != xEOL; then
9128      new_complete="$new_path ${arguments% *}"
9129  else
9130      new_complete="$new_path"
9131  fi
9132
9133  if test "x$complete" != "x$new_complete"; then
9134    FOUND_MAKE="$new_complete"
9135    { $as_echo "$as_me:$LINENO: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9136$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9137  fi
9138
9139        fi
9140      fi
9141    fi
9142  fi
9143
9144        fi
9145        PATH=$OLD_PATH
9146      fi
9147    fi
9148
9149    if test "x$FOUND_MAKE" = x; then
9150      { { $as_echo "$as_me:$LINENO: error: Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." >&5
9151$as_echo "$as_me: error: Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." >&2;}
9152   { (exit 1); exit 1; }; }
9153    fi
9154  fi
9155
9156  MAKE=$FOUND_MAKE
9157
9158  { $as_echo "$as_me:$LINENO: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9159$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9160
9161
9162
9163    # Test if find supports -delete
9164    { $as_echo "$as_me:$LINENO: checking if find supports -delete" >&5
9165$as_echo_n "checking if find supports -delete... " >&6; }
9166    FIND_DELETE="-delete"
9167
9168    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9169
9170    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9171
9172    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9173    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9174        # No, it does not.
9175        rm $DELETEDIR/TestIfFindSupportsDelete
9176        FIND_DELETE="-exec rm \{\} \+"
9177        { $as_echo "$as_me:$LINENO: result: no" >&5
9178$as_echo "no" >&6; }
9179    else
9180        { $as_echo "$as_me:$LINENO: result: yes" >&5
9181$as_echo "yes" >&6; }
9182    fi
9183    rmdir $DELETEDIR
9184
9185
9186
9187# These tools might not be installed by default,
9188# need hint on how to install them.
9189
9190    for ac_prog in unzip
9191do
9192  # Extract the first word of "$ac_prog", so it can be a program name with args.
9193set dummy $ac_prog; ac_word=$2
9194{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9195$as_echo_n "checking for $ac_word... " >&6; }
9196if test "${ac_cv_path_UNZIP+set}" = set; then
9197  $as_echo_n "(cached) " >&6
9198else
9199  case $UNZIP in
9200  [\\/]* | ?:[\\/]*)
9201  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9202  ;;
9203  *)
9204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9205for as_dir in $PATH
9206do
9207  IFS=$as_save_IFS
9208  test -z "$as_dir" && as_dir=.
9209  for ac_exec_ext in '' $ac_executable_extensions; do
9210  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9211    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9212    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9213    break 2
9214  fi
9215done
9216done
9217IFS=$as_save_IFS
9218
9219  ;;
9220esac
9221fi
9222UNZIP=$ac_cv_path_UNZIP
9223if test -n "$UNZIP"; then
9224  { $as_echo "$as_me:$LINENO: result: $UNZIP" >&5
9225$as_echo "$UNZIP" >&6; }
9226else
9227  { $as_echo "$as_me:$LINENO: result: no" >&5
9228$as_echo "no" >&6; }
9229fi
9230
9231
9232  test -n "$UNZIP" && break
9233done
9234
9235
9236    if test "x$UNZIP" = x; then
9237        if test "xunzip" = x; then
9238          PROG_NAME=unzip
9239        else
9240          PROG_NAME=unzip
9241        fi
9242        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
9243$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9244        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
9245$as_echo "$as_me: error: Cannot continue" >&2;}
9246   { (exit 1); exit 1; }; }
9247    fi
9248
9249
9250
9251    for ac_prog in zip
9252do
9253  # Extract the first word of "$ac_prog", so it can be a program name with args.
9254set dummy $ac_prog; ac_word=$2
9255{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9256$as_echo_n "checking for $ac_word... " >&6; }
9257if test "${ac_cv_path_ZIP+set}" = set; then
9258  $as_echo_n "(cached) " >&6
9259else
9260  case $ZIP in
9261  [\\/]* | ?:[\\/]*)
9262  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9263  ;;
9264  *)
9265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9266for as_dir in $PATH
9267do
9268  IFS=$as_save_IFS
9269  test -z "$as_dir" && as_dir=.
9270  for ac_exec_ext in '' $ac_executable_extensions; do
9271  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9272    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9273    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9274    break 2
9275  fi
9276done
9277done
9278IFS=$as_save_IFS
9279
9280  ;;
9281esac
9282fi
9283ZIP=$ac_cv_path_ZIP
9284if test -n "$ZIP"; then
9285  { $as_echo "$as_me:$LINENO: result: $ZIP" >&5
9286$as_echo "$ZIP" >&6; }
9287else
9288  { $as_echo "$as_me:$LINENO: result: no" >&5
9289$as_echo "no" >&6; }
9290fi
9291
9292
9293  test -n "$ZIP" && break
9294done
9295
9296
9297    if test "x$ZIP" = x; then
9298        if test "xzip" = x; then
9299          PROG_NAME=zip
9300        else
9301          PROG_NAME=zip
9302        fi
9303        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
9304$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9305        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
9306$as_echo "$as_me: error: Cannot continue" >&2;}
9307   { (exit 1); exit 1; }; }
9308    fi
9309
9310
9311
9312# Non-required basic tools
9313
9314# Extract the first word of "ldd", so it can be a program name with args.
9315set dummy ldd; ac_word=$2
9316{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9317$as_echo_n "checking for $ac_word... " >&6; }
9318if test "${ac_cv_path_LDD+set}" = set; then
9319  $as_echo_n "(cached) " >&6
9320else
9321  case $LDD in
9322  [\\/]* | ?:[\\/]*)
9323  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9324  ;;
9325  *)
9326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9327for as_dir in $PATH
9328do
9329  IFS=$as_save_IFS
9330  test -z "$as_dir" && as_dir=.
9331  for ac_exec_ext in '' $ac_executable_extensions; do
9332  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9333    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9334    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9335    break 2
9336  fi
9337done
9338done
9339IFS=$as_save_IFS
9340
9341  ;;
9342esac
9343fi
9344LDD=$ac_cv_path_LDD
9345if test -n "$LDD"; then
9346  { $as_echo "$as_me:$LINENO: result: $LDD" >&5
9347$as_echo "$LDD" >&6; }
9348else
9349  { $as_echo "$as_me:$LINENO: result: no" >&5
9350$as_echo "no" >&6; }
9351fi
9352
9353
9354if test "x$LDD" = "x"; then
9355    # List shared lib dependencies is used for
9356    # debug output and checking for forbidden dependencies.
9357    # We can build without it.
9358    LDD="true"
9359fi
9360# Extract the first word of "otool", so it can be a program name with args.
9361set dummy otool; ac_word=$2
9362{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9363$as_echo_n "checking for $ac_word... " >&6; }
9364if test "${ac_cv_path_OTOOL+set}" = set; then
9365  $as_echo_n "(cached) " >&6
9366else
9367  case $OTOOL in
9368  [\\/]* | ?:[\\/]*)
9369  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
9370  ;;
9371  *)
9372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9373for as_dir in $PATH
9374do
9375  IFS=$as_save_IFS
9376  test -z "$as_dir" && as_dir=.
9377  for ac_exec_ext in '' $ac_executable_extensions; do
9378  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9379    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
9380    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9381    break 2
9382  fi
9383done
9384done
9385IFS=$as_save_IFS
9386
9387  ;;
9388esac
9389fi
9390OTOOL=$ac_cv_path_OTOOL
9391if test -n "$OTOOL"; then
9392  { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5
9393$as_echo "$OTOOL" >&6; }
9394else
9395  { $as_echo "$as_me:$LINENO: result: no" >&5
9396$as_echo "no" >&6; }
9397fi
9398
9399
9400if test "x$OTOOL" = "x"; then
9401   OTOOL="true"
9402fi
9403for ac_prog in readelf greadelf
9404do
9405  # Extract the first word of "$ac_prog", so it can be a program name with args.
9406set dummy $ac_prog; ac_word=$2
9407{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9408$as_echo_n "checking for $ac_word... " >&6; }
9409if test "${ac_cv_path_READELF+set}" = set; then
9410  $as_echo_n "(cached) " >&6
9411else
9412  case $READELF in
9413  [\\/]* | ?:[\\/]*)
9414  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
9415  ;;
9416  *)
9417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9418for as_dir in $PATH
9419do
9420  IFS=$as_save_IFS
9421  test -z "$as_dir" && as_dir=.
9422  for ac_exec_ext in '' $ac_executable_extensions; do
9423  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9424    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
9425    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9426    break 2
9427  fi
9428done
9429done
9430IFS=$as_save_IFS
9431
9432  ;;
9433esac
9434fi
9435READELF=$ac_cv_path_READELF
9436if test -n "$READELF"; then
9437  { $as_echo "$as_me:$LINENO: result: $READELF" >&5
9438$as_echo "$READELF" >&6; }
9439else
9440  { $as_echo "$as_me:$LINENO: result: no" >&5
9441$as_echo "no" >&6; }
9442fi
9443
9444
9445  test -n "$READELF" && break
9446done
9447
9448# Extract the first word of "hg", so it can be a program name with args.
9449set dummy hg; ac_word=$2
9450{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9451$as_echo_n "checking for $ac_word... " >&6; }
9452if test "${ac_cv_path_HG+set}" = set; then
9453  $as_echo_n "(cached) " >&6
9454else
9455  case $HG in
9456  [\\/]* | ?:[\\/]*)
9457  ac_cv_path_HG="$HG" # Let the user override the test with a path.
9458  ;;
9459  *)
9460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9461for as_dir in $PATH
9462do
9463  IFS=$as_save_IFS
9464  test -z "$as_dir" && as_dir=.
9465  for ac_exec_ext in '' $ac_executable_extensions; do
9466  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9467    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
9468    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9469    break 2
9470  fi
9471done
9472done
9473IFS=$as_save_IFS
9474
9475  ;;
9476esac
9477fi
9478HG=$ac_cv_path_HG
9479if test -n "$HG"; then
9480  { $as_echo "$as_me:$LINENO: result: $HG" >&5
9481$as_echo "$HG" >&6; }
9482else
9483  { $as_echo "$as_me:$LINENO: result: no" >&5
9484$as_echo "no" >&6; }
9485fi
9486
9487
9488# Extract the first word of "stat", so it can be a program name with args.
9489set dummy stat; ac_word=$2
9490{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9491$as_echo_n "checking for $ac_word... " >&6; }
9492if test "${ac_cv_path_STAT+set}" = set; then
9493  $as_echo_n "(cached) " >&6
9494else
9495  case $STAT in
9496  [\\/]* | ?:[\\/]*)
9497  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
9498  ;;
9499  *)
9500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9501for as_dir in $PATH
9502do
9503  IFS=$as_save_IFS
9504  test -z "$as_dir" && as_dir=.
9505  for ac_exec_ext in '' $ac_executable_extensions; do
9506  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9507    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
9508    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9509    break 2
9510  fi
9511done
9512done
9513IFS=$as_save_IFS
9514
9515  ;;
9516esac
9517fi
9518STAT=$ac_cv_path_STAT
9519if test -n "$STAT"; then
9520  { $as_echo "$as_me:$LINENO: result: $STAT" >&5
9521$as_echo "$STAT" >&6; }
9522else
9523  { $as_echo "$as_me:$LINENO: result: no" >&5
9524$as_echo "no" >&6; }
9525fi
9526
9527
9528# Extract the first word of "time", so it can be a program name with args.
9529set dummy time; ac_word=$2
9530{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9531$as_echo_n "checking for $ac_word... " >&6; }
9532if test "${ac_cv_path_TIME+set}" = set; then
9533  $as_echo_n "(cached) " >&6
9534else
9535  case $TIME in
9536  [\\/]* | ?:[\\/]*)
9537  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
9538  ;;
9539  *)
9540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9541for as_dir in $PATH
9542do
9543  IFS=$as_save_IFS
9544  test -z "$as_dir" && as_dir=.
9545  for ac_exec_ext in '' $ac_executable_extensions; do
9546  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9547    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
9548    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9549    break 2
9550  fi
9551done
9552done
9553IFS=$as_save_IFS
9554
9555  ;;
9556esac
9557fi
9558TIME=$ac_cv_path_TIME
9559if test -n "$TIME"; then
9560  { $as_echo "$as_me:$LINENO: result: $TIME" >&5
9561$as_echo "$TIME" >&6; }
9562else
9563  { $as_echo "$as_me:$LINENO: result: no" >&5
9564$as_echo "no" >&6; }
9565fi
9566
9567
9568
9569if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
9570
9571    for ac_prog in comm
9572do
9573  # Extract the first word of "$ac_prog", so it can be a program name with args.
9574set dummy $ac_prog; ac_word=$2
9575{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9576$as_echo_n "checking for $ac_word... " >&6; }
9577if test "${ac_cv_path_COMM+set}" = set; then
9578  $as_echo_n "(cached) " >&6
9579else
9580  case $COMM in
9581  [\\/]* | ?:[\\/]*)
9582  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
9583  ;;
9584  *)
9585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9586for as_dir in $PATH
9587do
9588  IFS=$as_save_IFS
9589  test -z "$as_dir" && as_dir=.
9590  for ac_exec_ext in '' $ac_executable_extensions; do
9591  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9592    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
9593    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9594    break 2
9595  fi
9596done
9597done
9598IFS=$as_save_IFS
9599
9600  ;;
9601esac
9602fi
9603COMM=$ac_cv_path_COMM
9604if test -n "$COMM"; then
9605  { $as_echo "$as_me:$LINENO: result: $COMM" >&5
9606$as_echo "$COMM" >&6; }
9607else
9608  { $as_echo "$as_me:$LINENO: result: no" >&5
9609$as_echo "no" >&6; }
9610fi
9611
9612
9613  test -n "$COMM" && break
9614done
9615
9616
9617    if test "x$COMM" = x; then
9618        if test "xcomm" = x; then
9619          PROG_NAME=comm
9620        else
9621          PROG_NAME=comm
9622        fi
9623        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
9624$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9625        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
9626$as_echo "$as_me: error: Cannot continue" >&2;}
9627   { (exit 1); exit 1; }; }
9628    fi
9629
9630
9631fi
9632
9633
9634# Check if pkg-config is available.
9635
9636
9637if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9638	if test -n "$ac_tool_prefix"; then
9639  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9640set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9641{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9642$as_echo_n "checking for $ac_word... " >&6; }
9643if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9644  $as_echo_n "(cached) " >&6
9645else
9646  case $PKG_CONFIG in
9647  [\\/]* | ?:[\\/]*)
9648  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9649  ;;
9650  *)
9651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9652for as_dir in $PATH
9653do
9654  IFS=$as_save_IFS
9655  test -z "$as_dir" && as_dir=.
9656  for ac_exec_ext in '' $ac_executable_extensions; do
9657  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9658    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9659    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9660    break 2
9661  fi
9662done
9663done
9664IFS=$as_save_IFS
9665
9666  ;;
9667esac
9668fi
9669PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9670if test -n "$PKG_CONFIG"; then
9671  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
9672$as_echo "$PKG_CONFIG" >&6; }
9673else
9674  { $as_echo "$as_me:$LINENO: result: no" >&5
9675$as_echo "no" >&6; }
9676fi
9677
9678
9679fi
9680if test -z "$ac_cv_path_PKG_CONFIG"; then
9681  ac_pt_PKG_CONFIG=$PKG_CONFIG
9682  # Extract the first word of "pkg-config", so it can be a program name with args.
9683set dummy pkg-config; ac_word=$2
9684{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9685$as_echo_n "checking for $ac_word... " >&6; }
9686if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
9687  $as_echo_n "(cached) " >&6
9688else
9689  case $ac_pt_PKG_CONFIG in
9690  [\\/]* | ?:[\\/]*)
9691  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9692  ;;
9693  *)
9694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9695for as_dir in $PATH
9696do
9697  IFS=$as_save_IFS
9698  test -z "$as_dir" && as_dir=.
9699  for ac_exec_ext in '' $ac_executable_extensions; do
9700  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9701    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9702    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9703    break 2
9704  fi
9705done
9706done
9707IFS=$as_save_IFS
9708
9709  ;;
9710esac
9711fi
9712ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9713if test -n "$ac_pt_PKG_CONFIG"; then
9714  { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
9715$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9716else
9717  { $as_echo "$as_me:$LINENO: result: no" >&5
9718$as_echo "no" >&6; }
9719fi
9720
9721  if test "x$ac_pt_PKG_CONFIG" = x; then
9722    PKG_CONFIG=""
9723  else
9724    case $cross_compiling:$ac_tool_warned in
9725yes:)
9726{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
9727$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9728ac_tool_warned=yes ;;
9729esac
9730    PKG_CONFIG=$ac_pt_PKG_CONFIG
9731  fi
9732else
9733  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9734fi
9735
9736fi
9737if test -n "$PKG_CONFIG"; then
9738	_pkg_min_version=0.9.0
9739	{ $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
9740$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9741	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9742		{ $as_echo "$as_me:$LINENO: result: yes" >&5
9743$as_echo "yes" >&6; }
9744	else
9745		{ $as_echo "$as_me:$LINENO: result: no" >&5
9746$as_echo "no" >&6; }
9747		PKG_CONFIG=""
9748	fi
9749
9750fi
9751
9752# After basic tools have been setup, we can check build os specific details.
9753
9754###############################################################################
9755
9756# Note that this is the build platform OS version!
9757
9758OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
9759OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
9760OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
9761OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
9762
9763
9764
9765
9766
9767# Setup builddeps, for automatic downloading of tools we need.
9768# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
9769# boot-jdk setup, but we need to have basic tools setup first.
9770
9771
9772# Check whether --with-builddeps-conf was given.
9773if test "${with_builddeps_conf+set}" = set; then
9774  withval=$with_builddeps_conf;
9775fi
9776
9777
9778
9779# Check whether --with-builddeps-server was given.
9780if test "${with_builddeps_server+set}" = set; then
9781  withval=$with_builddeps_server;
9782fi
9783
9784
9785
9786# Check whether --with-builddeps-dir was given.
9787if test "${with_builddeps_dir+set}" = set; then
9788  withval=$with_builddeps_dir;
9789else
9790  with_builddeps_dir=/localhome/builddeps
9791fi
9792
9793
9794
9795# Check whether --with-builddeps-group was given.
9796if test "${with_builddeps_group+set}" = set; then
9797  withval=$with_builddeps_group;
9798fi
9799
9800
9801
9802
9803    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
9804        if test "x$with_builddeps_conf" != x; then
9805            { $as_echo "$as_me:$LINENO: checking for supplied builddeps configuration file" >&5
9806$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
9807            builddepsfile=$with_builddeps_conf
9808            if test -s $builddepsfile; then
9809                . $builddepsfile
9810                { $as_echo "$as_me:$LINENO: result: loaded!" >&5
9811$as_echo "loaded!" >&6; }
9812            else
9813               { { $as_echo "$as_me:$LINENO: error: The given builddeps conf file $with_builddeps_conf could not be loaded!" >&5
9814$as_echo "$as_me: error: The given builddeps conf file $with_builddeps_conf could not be loaded!" >&2;}
9815   { (exit 1); exit 1; }; }
9816           fi
9817        else
9818            { $as_echo "$as_me:$LINENO: checking for builddeps.conf files in sources..." >&5
9819$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
9820            builddepsfile=`mktemp`
9821            touch $builddepsfile
9822            # Put all found confs into a single file.
9823            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
9824            # Source the file to acquire the variables
9825            if test -s $builddepsfile; then
9826                . $builddepsfile
9827                { $as_echo "$as_me:$LINENO: result: found at least one!" >&5
9828$as_echo "found at least one!" >&6; }
9829            else
9830               { { $as_echo "$as_me:$LINENO: error: Could not find any builddeps.conf at all!" >&5
9831$as_echo "$as_me: error: Could not find any builddeps.conf at all!" >&2;}
9832   { (exit 1); exit 1; }; }
9833           fi
9834        fi
9835        # Create build and target names that use _ instead of "-" and ".".
9836        # This is necessary to use them in variable names.
9837        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
9838        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
9839        # Extract rewrite information for build and target
9840        eval rewritten_build=\${REWRITE_${build_var}}
9841        if test "x$rewritten_build" = x; then
9842            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
9843            echo Build stays the same $rewritten_build
9844        else
9845            echo Rewriting build for builddeps into $rewritten_build
9846        fi
9847        eval rewritten_target=\${REWRITE_${target_var}}
9848        if test "x$rewritten_target" = x; then
9849            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
9850            echo Target stays the same $rewritten_target
9851        else
9852            echo Rewriting target for builddeps into $rewritten_target
9853        fi
9854        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
9855        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
9856    fi
9857    for ac_prog in 7z unzip
9858do
9859  # Extract the first word of "$ac_prog", so it can be a program name with args.
9860set dummy $ac_prog; ac_word=$2
9861{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9862$as_echo_n "checking for $ac_word... " >&6; }
9863if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then
9864  $as_echo_n "(cached) " >&6
9865else
9866  if test -n "$BDEPS_UNZIP"; then
9867  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
9868else
9869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9870for as_dir in $PATH
9871do
9872  IFS=$as_save_IFS
9873  test -z "$as_dir" && as_dir=.
9874  for ac_exec_ext in '' $ac_executable_extensions; do
9875  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9876    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
9877    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9878    break 2
9879  fi
9880done
9881done
9882IFS=$as_save_IFS
9883
9884fi
9885fi
9886BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
9887if test -n "$BDEPS_UNZIP"; then
9888  { $as_echo "$as_me:$LINENO: result: $BDEPS_UNZIP" >&5
9889$as_echo "$BDEPS_UNZIP" >&6; }
9890else
9891  { $as_echo "$as_me:$LINENO: result: no" >&5
9892$as_echo "no" >&6; }
9893fi
9894
9895
9896  test -n "$BDEPS_UNZIP" && break
9897done
9898
9899    if test "x$BDEPS_UNZIP" = x7z; then
9900        BDEPS_UNZIP="7z x"
9901    fi
9902
9903    for ac_prog in wget lftp ftp
9904do
9905  # Extract the first word of "$ac_prog", so it can be a program name with args.
9906set dummy $ac_prog; ac_word=$2
9907{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9908$as_echo_n "checking for $ac_word... " >&6; }
9909if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then
9910  $as_echo_n "(cached) " >&6
9911else
9912  if test -n "$BDEPS_FTP"; then
9913  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
9914else
9915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9916for as_dir in $PATH
9917do
9918  IFS=$as_save_IFS
9919  test -z "$as_dir" && as_dir=.
9920  for ac_exec_ext in '' $ac_executable_extensions; do
9921  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9922    ac_cv_prog_BDEPS_FTP="$ac_prog"
9923    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9924    break 2
9925  fi
9926done
9927done
9928IFS=$as_save_IFS
9929
9930fi
9931fi
9932BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
9933if test -n "$BDEPS_FTP"; then
9934  { $as_echo "$as_me:$LINENO: result: $BDEPS_FTP" >&5
9935$as_echo "$BDEPS_FTP" >&6; }
9936else
9937  { $as_echo "$as_me:$LINENO: result: no" >&5
9938$as_echo "no" >&6; }
9939fi
9940
9941
9942  test -n "$BDEPS_FTP" && break
9943done
9944
9945
9946
9947###############################################################################
9948#
9949# Determine OpenJDK variants, options and version numbers.
9950#
9951###############################################################################
9952
9953# We need build & target for this.
9954
9955
9956###############################################################################
9957#
9958# Should we build only OpenJDK even if closed sources are present?
9959#
9960# Check whether --enable-openjdk-only was given.
9961if test "${enable_openjdk_only+set}" = set; then
9962  enableval=$enable_openjdk_only;
9963else
9964  enable_openjdk_only="no"
9965fi
9966
9967
9968{ $as_echo "$as_me:$LINENO: checking for presence of closed sources" >&5
9969$as_echo_n "checking for presence of closed sources... " >&6; }
9970if test -d "$SRC_ROOT/jdk/src/closed"; then
9971    CLOSED_SOURCE_PRESENT=yes
9972else
9973    CLOSED_SOURCE_PRESENT=no
9974fi
9975{ $as_echo "$as_me:$LINENO: result: $CLOSED_SOURCE_PRESENT" >&5
9976$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
9977
9978{ $as_echo "$as_me:$LINENO: checking if closed source is supressed (openjdk-only)" >&5
9979$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
9980SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
9981{ $as_echo "$as_me:$LINENO: result: $SUPRESS_CLOSED_SOURCE" >&5
9982$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
9983
9984if test "x$CLOSED_SOURCE_PRESENT" = xno; then
9985  OPENJDK=true
9986  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
9987    { $as_echo "$as_me:$LINENO: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
9988$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
9989  fi
9990else
9991  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
9992    OPENJDK=true
9993  else
9994    OPENJDK=false
9995  fi
9996fi
9997
9998if test "x$OPENJDK" = "xtrue"; then
9999    SET_OPENJDK="OPENJDK=true"
10000fi
10001
10002
10003
10004###############################################################################
10005#
10006# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10007# We always build headless support.
10008#
10009{ $as_echo "$as_me:$LINENO: checking headful support" >&5
10010$as_echo_n "checking headful support... " >&6; }
10011# Check whether --enable-headful was given.
10012if test "${enable_headful+set}" = set; then
10013  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10014else
10015  SUPPORT_HEADFUL=yes
10016fi
10017
10018
10019SUPPORT_HEADLESS=yes
10020BUILD_HEADLESS="BUILD_HEADLESS:=true"
10021
10022if test "x$SUPPORT_HEADFUL" = xyes; then
10023    # We are building both headful and headless.
10024    headful_msg="inlude support for both headful and headless"
10025fi
10026
10027if test "x$SUPPORT_HEADFUL" = xno; then
10028    # Thus we are building headless only.
10029    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10030    headful_msg="headless only"
10031fi
10032
10033{ $as_echo "$as_me:$LINENO: result: $headful_msg" >&5
10034$as_echo "$headful_msg" >&6; }
10035
10036
10037
10038
10039
10040# Control wether Hotspot runs Queens test after build.
10041# Check whether --enable-hotspot-test-in-build was given.
10042if test "${enable_hotspot_test_in_build+set}" = set; then
10043  enableval=$enable_hotspot_test_in_build;
10044else
10045  enable_hotspot_test_in_build=no
10046fi
10047
10048if test "x$enable_hotspot_test_in_build" = "xyes"; then
10049    TEST_IN_BUILD=true
10050else
10051    TEST_IN_BUILD=false
10052fi
10053
10054
10055###############################################################################
10056#
10057# Choose cacerts source file
10058#
10059
10060# Check whether --with-cacerts-file was given.
10061if test "${with_cacerts_file+set}" = set; then
10062  withval=$with_cacerts_file;
10063fi
10064
10065if test "x$with_cacerts_file" != x; then
10066    CACERTS_FILE=$with_cacerts_file
10067else
10068    if test "x$OPENJDK" = "xtrue"; then
10069        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10070    else
10071        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10072    fi
10073fi
10074
10075
10076###############################################################################
10077#
10078# Enable or disable unlimited crypto
10079#
10080# Check whether --enable-unlimited-crypto was given.
10081if test "${enable_unlimited_crypto+set}" = set; then
10082  enableval=$enable_unlimited_crypto;
10083else
10084  enable_unlimited_crypto=no
10085fi
10086
10087if test "x$enable_unlimited_crypto" = "xyes"; then
10088    UNLIMITED_CRYPTO=true
10089else
10090    UNLIMITED_CRYPTO=false
10091fi
10092
10093
10094###############################################################################
10095#
10096# Compress jars
10097#
10098COMPRESS_JARS=false
10099
10100
10101
10102
10103# Source the version numbers
10104. $AUTOCONF_DIR/version.numbers
10105if test "x$OPENJDK" = "xfalse"; then
10106    . $AUTOCONF_DIR/closed.version.numbers
10107fi
10108# Now set the JDK version, milestone, build number etc.
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123COPYRIGHT_YEAR=`date +'%Y'`
10124
10125
10126RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
10127
10128
10129if test "x$JDK_UPDATE_VERSION" != x; then
10130    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10131else
10132    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10133fi
10134
10135
10136if test "x$MILESTONE" != x; then
10137    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
10138else
10139    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
10140fi
10141
10142
10143if test "x$JDK_BUILD_NUMBER" != x; then
10144    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
10145else
10146    JDK_BUILD_NUMBER=b00
10147    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10148    # Avoid [:alnum:] since it depends on the locale.
10149    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10150    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10151    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
10152fi
10153
10154COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10155
10156
10157
10158###############################################################################
10159#
10160# Setup BootJDK, used to bootstrap the build.
10161#
10162###############################################################################
10163
10164
10165BOOT_JDK_FOUND=no
10166
10167# Check whether --with-boot-jdk was given.
10168if test "${with_boot_jdk+set}" = set; then
10169  withval=$with_boot_jdk;
10170fi
10171
10172
10173# We look for the Boot JDK through various means, going from more certain to
10174# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10175# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10176# must check if this is indeed valid; otherwise we'll continue looking.
10177
10178# Test: Is bootjdk explicitely set by command line arguments?
10179
10180  if test "x$BOOT_JDK_FOUND" = xno; then
10181    # Now execute the test
10182
10183if test "x$with_boot_jdk" != x; then
10184    BOOT_JDK=$with_boot_jdk
10185    BOOT_JDK_FOUND=maybe
10186    { $as_echo "$as_me:$LINENO: Found potential Boot JDK using configure arguments" >&5
10187$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10188fi
10189
10190
10191    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10192    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10193      # Do we have a bin/java?
10194      if test ! -x "$BOOT_JDK/bin/java"; then
10195        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10197        BOOT_JDK_FOUND=no
10198      else
10199        # Do we have a bin/javac?
10200        if test ! -x "$BOOT_JDK/bin/javac"; then
10201          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10203          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
10204$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10205          BOOT_JDK_FOUND=no
10206        else
10207          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10208          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10209            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10211            BOOT_JDK_FOUND=no
10212          else
10213            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10214            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10215
10216            # Extra M4 quote needed to protect [] in grep expression.
10217            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10218            if test "x$FOUND_VERSION_78" = x; then
10219              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10220$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10221              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
10222$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10223              BOOT_JDK_FOUND=no
10224            else
10225              # We're done! :-)
10226              BOOT_JDK_FOUND=yes
10227
10228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10229
10230  # Input might be given as Windows format, start by converting to
10231  # unix format.
10232  path="$BOOT_JDK"
10233  new_path=`$CYGPATH -u "$path"`
10234
10235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10238  # "foo.exe" is OK but "foo" is an error.
10239  #
10240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10241  # It is also a way to make sure we got the proper file name for the real test later on.
10242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10243  if test "x$test_shortpath" = x; then
10244    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10245$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10246    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
10247$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
10248   { (exit 1); exit 1; }; }
10249  fi
10250
10251  # Call helper function which possibly converts this using DOS-style short mode.
10252  # If so, the updated path is stored in $new_path.
10253
10254  input_path="$new_path"
10255  # Check if we need to convert this using DOS-style short mode. If the path
10256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10257  # take no chances and rewrite it.
10258  # Note: m4 eats our [], so we need to use [ and ] instead.
10259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10260  if test "x$has_forbidden_chars" != x; then
10261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10265      # Going to short mode and back again did indeed matter. Since short mode is
10266      # case insensitive, let's make it lowercase to improve readability.
10267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10268      # Now convert it back to Unix-stile (cygpath)
10269      input_path=`$CYGPATH -u "$shortmode_path"`
10270      new_path="$input_path"
10271    fi
10272  fi
10273
10274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10275  if test "x$test_cygdrive_prefix" = x; then
10276    # As a simple fix, exclude /usr/bin since it's not a real path.
10277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10279      # a path prefixed by /cygdrive for fixpath to work.
10280      new_path="$CYGWIN_ROOT_PATH$input_path"
10281    fi
10282  fi
10283
10284
10285  if test "x$path" != "x$new_path"; then
10286    BOOT_JDK="$new_path"
10287    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
10288$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10289  fi
10290
10291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10292
10293  path="$BOOT_JDK"
10294  has_colon=`$ECHO $path | $GREP ^.:`
10295  new_path="$path"
10296  if test "x$has_colon" = x; then
10297    # Not in mixed or Windows style, start by that.
10298    new_path=`cmd //c echo $path`
10299  fi
10300
10301
10302  input_path="$new_path"
10303  # Check if we need to convert this using DOS-style short mode. If the path
10304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10305  # take no chances and rewrite it.
10306  # Note: m4 eats our [], so we need to use [ and ] instead.
10307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10308  if test "x$has_forbidden_chars" != x; then
10309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10311  fi
10312
10313
10314  windows_path="$new_path"
10315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10316    unix_path=`$CYGPATH -u "$windows_path"`
10317    new_path="$unix_path"
10318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10320    new_path="$unix_path"
10321  fi
10322
10323  if test "x$path" != "x$new_path"; then
10324    BOOT_JDK="$new_path"
10325    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
10326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10327  fi
10328
10329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10331
10332  else
10333    # We're on a posix platform. Hooray! :)
10334    path="$BOOT_JDK"
10335
10336    if test ! -f "$path" && test ! -d "$path"; then
10337      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
10338$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
10339   { (exit 1); exit 1; }; }
10340    fi
10341
10342    has_space=`$ECHO "$path" | $GREP " "`
10343    if test "x$has_space" != x; then
10344      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10345$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10346      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
10347$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
10348   { (exit 1); exit 1; }; }
10349    fi
10350  fi
10351
10352              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
10353$as_echo_n "checking for Boot JDK... " >&6; }
10354              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
10355$as_echo "$BOOT_JDK" >&6; }
10356              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
10357$as_echo_n "checking Boot JDK version... " >&6; }
10358              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10359              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
10360$as_echo "$BOOT_JDK_VERSION" >&6; }
10361            fi # end check jdk version
10362          fi # end check rt.jar
10363        fi # end check javac
10364      fi # end check java
10365    fi # end check boot jdk found
10366  fi
10367
10368if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
10369  # Having specified an argument which is incorrect will produce an instant failure;
10370  # we should not go on looking
10371  { { $as_echo "$as_me:$LINENO: error: The path given by --with-boot-jdk does not contain a valid Boot JDK" >&5
10372$as_echo "$as_me: error: The path given by --with-boot-jdk does not contain a valid Boot JDK" >&2;}
10373   { (exit 1); exit 1; }; }
10374fi
10375
10376# Test: Is bootjdk available from builddeps?
10377
10378  if test "x$BOOT_JDK_FOUND" = xno; then
10379    # Now execute the test
10380
10381
10382
10383    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10384        # Source the builddeps file again, to make sure it uses the latest variables!
10385        . $builddepsfile
10386        # Look for a target and build machine specific resource!
10387        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10388        if test "x$resource" = x; then
10389            # Ok, lets instead look for a target specific resource
10390            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
10391        fi
10392        if test "x$resource" = x; then
10393            # Ok, lets instead look for a build specific resource
10394            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
10395        fi
10396        if test "x$resource" = x; then
10397            # Ok, lets instead look for a generic resource
10398            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
10399            resource=${builddep_bootjdk}
10400        fi
10401        if test "x$resource" != x; then
10402            { $as_echo "$as_me:$LINENO: Using builddeps $resource for bootjdk" >&5
10403$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
10404	    # If the resource in the builddeps.conf file is an existing directory,
10405	    # for example /java/linux/cups
10406	    if test -d ${resource}; then
10407	       depdir=${resource}
10408	    else
10409
10410# bootjdk is for example mymodule
10411# $resource is for example libs/general/libmymod_1_2_3.zip
10412# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10413# $with_builddeps_dir is for example /localhome/builddeps
10414# depdir is the name of the variable into which we store the depdir, eg MYMOD
10415# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10416# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10417    filename=`basename $resource`
10418    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10419    filebase=${filename%%.*}
10420    extension=${filename#*.}
10421    installdir=$with_builddeps_dir/$filebase
10422    if test ! -f $installdir/$filename.unpacked; then
10423        { $as_echo "$as_me:$LINENO: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
10424$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10425        if test ! -d $installdir; then
10426            mkdir -p $installdir
10427        fi
10428        if test ! -d $installdir; then
10429            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
10430$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
10431   { (exit 1); exit 1; }; }
10432        fi
10433        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
10434        touch $tmpfile
10435        if test ! -f $tmpfile; then
10436            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
10437$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
10438   { (exit 1); exit 1; }; }
10439        fi
10440
10441    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10442    # $tmpfile is the local file name for the downloaded file.
10443    VALID_TOOL=no
10444    if test "x$BDEPS_FTP" = xwget; then
10445       VALID_TOOL=yes
10446       wget -O $tmpfile $with_builddeps_server/$resource
10447    fi
10448    if test "x$BDEPS_FTP" = xlftp; then
10449       VALID_TOOL=yes
10450       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10451    fi
10452    if test "x$BDEPS_FTP" = xftp; then
10453        VALID_TOOL=yes
10454        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
10455        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
10456        FTPUSERPWD=${FTPSERVER%%@*}
10457        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
10458            FTPUSER=${userpwd%%:*}
10459            FTPPWD=${userpwd#*@}
10460            FTPSERVER=${FTPSERVER#*@}
10461        else
10462            FTPUSER=ftp
10463            FTPPWD=ftp
10464        fi
10465        # the "pass" command does not work on some
10466        # ftp clients (read ftp.exe) but if it works,
10467        # passive mode is better!
10468        (\
10469            echo "user $FTPUSER $FTPPWD"        ;\
10470            echo "pass"                         ;\
10471            echo "bin"                          ;\
10472            echo "get $FTPPATH $tmpfile"              ;\
10473        ) | ftp -in $FTPSERVER
10474    fi
10475    if test "x$VALID_TOOL" != xyes; then
10476       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
10477$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
10478   { (exit 1); exit 1; }; }
10479    fi
10480
10481        mv $tmpfile $installdir/$filename
10482        if test ! -s $installdir/$filename; then
10483            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
10484$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
10485   { (exit 1); exit 1; }; }
10486        fi
10487        case "$extension" in
10488            zip)  echo "Unzipping $installdir/$filename..."
10489               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
10490            ;;
10491            tar.gz) echo "Untaring $installdir/$filename..."
10492               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10493            ;;
10494            tgz) echo "Untaring $installdir/$filename..."
10495               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10496            ;;
10497            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
10498$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
10499   { (exit 1); exit 1; }; }
10500            ;;
10501        esac
10502    fi
10503    if test -f $installdir/$filename.unpacked; then
10504        depdir=$installdir
10505    fi
10506
10507	    fi
10508            # Source the builddeps file again, because in the previous command, the depdir
10509            # was updated to point at the current build dependency install directory.
10510            . $builddepsfile
10511            # Now extract variables from the builddeps.conf files.
10512            theroot=${builddep_bootjdk_ROOT}
10513            thecflags=${builddep_bootjdk_CFLAGS}
10514            thelibs=${builddep_bootjdk_LIBS}
10515            if test "x$depdir" = x; then
10516                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency bootjdk" >&5
10517$as_echo "$as_me: error: Could not download build dependency bootjdk" >&2;}
10518   { (exit 1); exit 1; }; }
10519            fi
10520            BOOT_JDK=$depdir
10521            if test "x$theroot" != x; then
10522               BOOT_JDK="$theroot"
10523            fi
10524            if test "x$thecflags" != x; then
10525               BOOT_JDK_CFLAGS="$thecflags"
10526            fi
10527            if test "x$thelibs" != x; then
10528               BOOT_JDK_LIBS="$thelibs"
10529            fi
10530            BOOT_JDK_FOUND=maybe
10531            else BOOT_JDK_FOUND=no
10532
10533        fi
10534        else BOOT_JDK_FOUND=no
10535
10536    fi
10537
10538
10539
10540    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10541    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10542      # Do we have a bin/java?
10543      if test ! -x "$BOOT_JDK/bin/java"; then
10544        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10546        BOOT_JDK_FOUND=no
10547      else
10548        # Do we have a bin/javac?
10549        if test ! -x "$BOOT_JDK/bin/javac"; then
10550          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10552          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
10553$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10554          BOOT_JDK_FOUND=no
10555        else
10556          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10557          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10558            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10560            BOOT_JDK_FOUND=no
10561          else
10562            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10563            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10564
10565            # Extra M4 quote needed to protect [] in grep expression.
10566            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10567            if test "x$FOUND_VERSION_78" = x; then
10568              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10570              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
10571$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10572              BOOT_JDK_FOUND=no
10573            else
10574              # We're done! :-)
10575              BOOT_JDK_FOUND=yes
10576
10577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10578
10579  # Input might be given as Windows format, start by converting to
10580  # unix format.
10581  path="$BOOT_JDK"
10582  new_path=`$CYGPATH -u "$path"`
10583
10584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10587  # "foo.exe" is OK but "foo" is an error.
10588  #
10589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10590  # It is also a way to make sure we got the proper file name for the real test later on.
10591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10592  if test "x$test_shortpath" = x; then
10593    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10595    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
10596$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
10597   { (exit 1); exit 1; }; }
10598  fi
10599
10600  # Call helper function which possibly converts this using DOS-style short mode.
10601  # If so, the updated path is stored in $new_path.
10602
10603  input_path="$new_path"
10604  # Check if we need to convert this using DOS-style short mode. If the path
10605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10606  # take no chances and rewrite it.
10607  # Note: m4 eats our [], so we need to use [ and ] instead.
10608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10609  if test "x$has_forbidden_chars" != x; then
10610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10614      # Going to short mode and back again did indeed matter. Since short mode is
10615      # case insensitive, let's make it lowercase to improve readability.
10616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10617      # Now convert it back to Unix-stile (cygpath)
10618      input_path=`$CYGPATH -u "$shortmode_path"`
10619      new_path="$input_path"
10620    fi
10621  fi
10622
10623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10624  if test "x$test_cygdrive_prefix" = x; then
10625    # As a simple fix, exclude /usr/bin since it's not a real path.
10626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10628      # a path prefixed by /cygdrive for fixpath to work.
10629      new_path="$CYGWIN_ROOT_PATH$input_path"
10630    fi
10631  fi
10632
10633
10634  if test "x$path" != "x$new_path"; then
10635    BOOT_JDK="$new_path"
10636    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
10637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10638  fi
10639
10640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10641
10642  path="$BOOT_JDK"
10643  has_colon=`$ECHO $path | $GREP ^.:`
10644  new_path="$path"
10645  if test "x$has_colon" = x; then
10646    # Not in mixed or Windows style, start by that.
10647    new_path=`cmd //c echo $path`
10648  fi
10649
10650
10651  input_path="$new_path"
10652  # Check if we need to convert this using DOS-style short mode. If the path
10653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10654  # take no chances and rewrite it.
10655  # Note: m4 eats our [], so we need to use [ and ] instead.
10656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10657  if test "x$has_forbidden_chars" != x; then
10658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10660  fi
10661
10662
10663  windows_path="$new_path"
10664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10665    unix_path=`$CYGPATH -u "$windows_path"`
10666    new_path="$unix_path"
10667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10669    new_path="$unix_path"
10670  fi
10671
10672  if test "x$path" != "x$new_path"; then
10673    BOOT_JDK="$new_path"
10674    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
10675$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10676  fi
10677
10678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10680
10681  else
10682    # We're on a posix platform. Hooray! :)
10683    path="$BOOT_JDK"
10684
10685    if test ! -f "$path" && test ! -d "$path"; then
10686      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
10687$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
10688   { (exit 1); exit 1; }; }
10689    fi
10690
10691    has_space=`$ECHO "$path" | $GREP " "`
10692    if test "x$has_space" != x; then
10693      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10694$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10695      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
10696$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
10697   { (exit 1); exit 1; }; }
10698    fi
10699  fi
10700
10701              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
10702$as_echo_n "checking for Boot JDK... " >&6; }
10703              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
10704$as_echo "$BOOT_JDK" >&6; }
10705              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
10706$as_echo_n "checking Boot JDK version... " >&6; }
10707              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10708              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
10709$as_echo "$BOOT_JDK_VERSION" >&6; }
10710            fi # end check jdk version
10711          fi # end check rt.jar
10712        fi # end check javac
10713      fi # end check java
10714    fi # end check boot jdk found
10715  fi
10716
10717
10718# Test: Is $JAVA_HOME set?
10719
10720  if test "x$BOOT_JDK_FOUND" = xno; then
10721    # Now execute the test
10722
10723    if test "x$JAVA_HOME" != x; then
10724        JAVA_HOME_PROCESSED="$JAVA_HOME"
10725
10726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10727
10728  # Input might be given as Windows format, start by converting to
10729  # unix format.
10730  path="$JAVA_HOME_PROCESSED"
10731  new_path=`$CYGPATH -u "$path"`
10732
10733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10736  # "foo.exe" is OK but "foo" is an error.
10737  #
10738  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10739  # It is also a way to make sure we got the proper file name for the real test later on.
10740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10741  if test "x$test_shortpath" = x; then
10742    { $as_echo "$as_me:$LINENO: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
10743$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
10744    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of JAVA_HOME_PROCESSED" >&5
10745$as_echo "$as_me: error: Cannot locate the the path of JAVA_HOME_PROCESSED" >&2;}
10746   { (exit 1); exit 1; }; }
10747  fi
10748
10749  # Call helper function which possibly converts this using DOS-style short mode.
10750  # If so, the updated path is stored in $new_path.
10751
10752  input_path="$new_path"
10753  # Check if we need to convert this using DOS-style short mode. If the path
10754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10755  # take no chances and rewrite it.
10756  # Note: m4 eats our [], so we need to use [ and ] instead.
10757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10758  if test "x$has_forbidden_chars" != x; then
10759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10763      # Going to short mode and back again did indeed matter. Since short mode is
10764      # case insensitive, let's make it lowercase to improve readability.
10765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10766      # Now convert it back to Unix-stile (cygpath)
10767      input_path=`$CYGPATH -u "$shortmode_path"`
10768      new_path="$input_path"
10769    fi
10770  fi
10771
10772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10773  if test "x$test_cygdrive_prefix" = x; then
10774    # As a simple fix, exclude /usr/bin since it's not a real path.
10775    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10777      # a path prefixed by /cygdrive for fixpath to work.
10778      new_path="$CYGWIN_ROOT_PATH$input_path"
10779    fi
10780  fi
10781
10782
10783  if test "x$path" != "x$new_path"; then
10784    JAVA_HOME_PROCESSED="$new_path"
10785    { $as_echo "$as_me:$LINENO: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
10786$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
10787  fi
10788
10789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10790
10791  path="$JAVA_HOME_PROCESSED"
10792  has_colon=`$ECHO $path | $GREP ^.:`
10793  new_path="$path"
10794  if test "x$has_colon" = x; then
10795    # Not in mixed or Windows style, start by that.
10796    new_path=`cmd //c echo $path`
10797  fi
10798
10799
10800  input_path="$new_path"
10801  # Check if we need to convert this using DOS-style short mode. If the path
10802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10803  # take no chances and rewrite it.
10804  # Note: m4 eats our [], so we need to use [ and ] instead.
10805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10806  if test "x$has_forbidden_chars" != x; then
10807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10809  fi
10810
10811
10812  windows_path="$new_path"
10813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10814    unix_path=`$CYGPATH -u "$windows_path"`
10815    new_path="$unix_path"
10816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10818    new_path="$unix_path"
10819  fi
10820
10821  if test "x$path" != "x$new_path"; then
10822    JAVA_HOME_PROCESSED="$new_path"
10823    { $as_echo "$as_me:$LINENO: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
10824$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
10825  fi
10826
10827  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10828  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10829
10830  else
10831    # We're on a posix platform. Hooray! :)
10832    path="$JAVA_HOME_PROCESSED"
10833
10834    if test ! -f "$path" && test ! -d "$path"; then
10835      { { $as_echo "$as_me:$LINENO: error: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." >&5
10836$as_echo "$as_me: error: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." >&2;}
10837   { (exit 1); exit 1; }; }
10838    fi
10839
10840    has_space=`$ECHO "$path" | $GREP " "`
10841    if test "x$has_space" != x; then
10842      { $as_echo "$as_me:$LINENO: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
10843$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
10844      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
10845$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
10846   { (exit 1); exit 1; }; }
10847    fi
10848  fi
10849
10850        if test ! -d "$JAVA_HOME_PROCESSED"; then
10851            { $as_echo "$as_me:$LINENO: Your JAVA_HOME points to a non-existing directory!" >&5
10852$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
10853        else
10854          # Aha, the user has set a JAVA_HOME
10855          # let us use that as the Boot JDK.
10856          BOOT_JDK="$JAVA_HOME_PROCESSED"
10857          BOOT_JDK_FOUND=maybe
10858          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using JAVA_HOME" >&5
10859$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
10860        fi
10861    fi
10862
10863
10864    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10865    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10866      # Do we have a bin/java?
10867      if test ! -x "$BOOT_JDK/bin/java"; then
10868        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10870        BOOT_JDK_FOUND=no
10871      else
10872        # Do we have a bin/javac?
10873        if test ! -x "$BOOT_JDK/bin/javac"; then
10874          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10876          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
10877$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10878          BOOT_JDK_FOUND=no
10879        else
10880          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10881          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10882            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10884            BOOT_JDK_FOUND=no
10885          else
10886            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10887            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10888
10889            # Extra M4 quote needed to protect [] in grep expression.
10890            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10891            if test "x$FOUND_VERSION_78" = x; then
10892              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10894              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
10895$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10896              BOOT_JDK_FOUND=no
10897            else
10898              # We're done! :-)
10899              BOOT_JDK_FOUND=yes
10900
10901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10902
10903  # Input might be given as Windows format, start by converting to
10904  # unix format.
10905  path="$BOOT_JDK"
10906  new_path=`$CYGPATH -u "$path"`
10907
10908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10911  # "foo.exe" is OK but "foo" is an error.
10912  #
10913  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10914  # It is also a way to make sure we got the proper file name for the real test later on.
10915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10916  if test "x$test_shortpath" = x; then
10917    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10918$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10919    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
10920$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
10921   { (exit 1); exit 1; }; }
10922  fi
10923
10924  # Call helper function which possibly converts this using DOS-style short mode.
10925  # If so, the updated path is stored in $new_path.
10926
10927  input_path="$new_path"
10928  # Check if we need to convert this using DOS-style short mode. If the path
10929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10930  # take no chances and rewrite it.
10931  # Note: m4 eats our [], so we need to use [ and ] instead.
10932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10933  if test "x$has_forbidden_chars" != x; then
10934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10938      # Going to short mode and back again did indeed matter. Since short mode is
10939      # case insensitive, let's make it lowercase to improve readability.
10940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10941      # Now convert it back to Unix-stile (cygpath)
10942      input_path=`$CYGPATH -u "$shortmode_path"`
10943      new_path="$input_path"
10944    fi
10945  fi
10946
10947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10948  if test "x$test_cygdrive_prefix" = x; then
10949    # As a simple fix, exclude /usr/bin since it's not a real path.
10950    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10952      # a path prefixed by /cygdrive for fixpath to work.
10953      new_path="$CYGWIN_ROOT_PATH$input_path"
10954    fi
10955  fi
10956
10957
10958  if test "x$path" != "x$new_path"; then
10959    BOOT_JDK="$new_path"
10960    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
10961$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10962  fi
10963
10964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10965
10966  path="$BOOT_JDK"
10967  has_colon=`$ECHO $path | $GREP ^.:`
10968  new_path="$path"
10969  if test "x$has_colon" = x; then
10970    # Not in mixed or Windows style, start by that.
10971    new_path=`cmd //c echo $path`
10972  fi
10973
10974
10975  input_path="$new_path"
10976  # Check if we need to convert this using DOS-style short mode. If the path
10977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10978  # take no chances and rewrite it.
10979  # Note: m4 eats our [], so we need to use [ and ] instead.
10980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10981  if test "x$has_forbidden_chars" != x; then
10982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10984  fi
10985
10986
10987  windows_path="$new_path"
10988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10989    unix_path=`$CYGPATH -u "$windows_path"`
10990    new_path="$unix_path"
10991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10993    new_path="$unix_path"
10994  fi
10995
10996  if test "x$path" != "x$new_path"; then
10997    BOOT_JDK="$new_path"
10998    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
10999$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11000  fi
11001
11002  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11003  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11004
11005  else
11006    # We're on a posix platform. Hooray! :)
11007    path="$BOOT_JDK"
11008
11009    if test ! -f "$path" && test ! -d "$path"; then
11010      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
11011$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
11012   { (exit 1); exit 1; }; }
11013    fi
11014
11015    has_space=`$ECHO "$path" | $GREP " "`
11016    if test "x$has_space" != x; then
11017      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11018$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11019      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
11020$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
11021   { (exit 1); exit 1; }; }
11022    fi
11023  fi
11024
11025              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
11026$as_echo_n "checking for Boot JDK... " >&6; }
11027              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
11028$as_echo "$BOOT_JDK" >&6; }
11029              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
11030$as_echo_n "checking Boot JDK version... " >&6; }
11031              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11032              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
11033$as_echo "$BOOT_JDK_VERSION" >&6; }
11034            fi # end check jdk version
11035          fi # end check rt.jar
11036        fi # end check javac
11037      fi # end check java
11038    fi # end check boot jdk found
11039  fi
11040
11041
11042# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11043
11044  if test "x$BOOT_JDK_FOUND" = xno; then
11045    # Now execute the test
11046
11047    if test -x /usr/libexec/java_home; then
11048        BOOT_JDK=`/usr/libexec/java_home`
11049        BOOT_JDK_FOUND=maybe
11050        { $as_echo "$as_me:$LINENO: Found potential Boot JDK using /usr/libexec/java_home" >&5
11051$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11052    fi
11053
11054
11055    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11056    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11057      # Do we have a bin/java?
11058      if test ! -x "$BOOT_JDK/bin/java"; then
11059        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11061        BOOT_JDK_FOUND=no
11062      else
11063        # Do we have a bin/javac?
11064        if test ! -x "$BOOT_JDK/bin/javac"; then
11065          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11067          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
11068$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11069          BOOT_JDK_FOUND=no
11070        else
11071          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11072          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11073            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11075            BOOT_JDK_FOUND=no
11076          else
11077            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11078            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11079
11080            # Extra M4 quote needed to protect [] in grep expression.
11081            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11082            if test "x$FOUND_VERSION_78" = x; then
11083              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11085              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
11086$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11087              BOOT_JDK_FOUND=no
11088            else
11089              # We're done! :-)
11090              BOOT_JDK_FOUND=yes
11091
11092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11093
11094  # Input might be given as Windows format, start by converting to
11095  # unix format.
11096  path="$BOOT_JDK"
11097  new_path=`$CYGPATH -u "$path"`
11098
11099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11102  # "foo.exe" is OK but "foo" is an error.
11103  #
11104  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11105  # It is also a way to make sure we got the proper file name for the real test later on.
11106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11107  if test "x$test_shortpath" = x; then
11108    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11109$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11110    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
11111$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
11112   { (exit 1); exit 1; }; }
11113  fi
11114
11115  # Call helper function which possibly converts this using DOS-style short mode.
11116  # If so, the updated path is stored in $new_path.
11117
11118  input_path="$new_path"
11119  # Check if we need to convert this using DOS-style short mode. If the path
11120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11121  # take no chances and rewrite it.
11122  # Note: m4 eats our [], so we need to use [ and ] instead.
11123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11124  if test "x$has_forbidden_chars" != x; then
11125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11129      # Going to short mode and back again did indeed matter. Since short mode is
11130      # case insensitive, let's make it lowercase to improve readability.
11131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11132      # Now convert it back to Unix-stile (cygpath)
11133      input_path=`$CYGPATH -u "$shortmode_path"`
11134      new_path="$input_path"
11135    fi
11136  fi
11137
11138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11139  if test "x$test_cygdrive_prefix" = x; then
11140    # As a simple fix, exclude /usr/bin since it's not a real path.
11141    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11143      # a path prefixed by /cygdrive for fixpath to work.
11144      new_path="$CYGWIN_ROOT_PATH$input_path"
11145    fi
11146  fi
11147
11148
11149  if test "x$path" != "x$new_path"; then
11150    BOOT_JDK="$new_path"
11151    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11152$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11153  fi
11154
11155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11156
11157  path="$BOOT_JDK"
11158  has_colon=`$ECHO $path | $GREP ^.:`
11159  new_path="$path"
11160  if test "x$has_colon" = x; then
11161    # Not in mixed or Windows style, start by that.
11162    new_path=`cmd //c echo $path`
11163  fi
11164
11165
11166  input_path="$new_path"
11167  # Check if we need to convert this using DOS-style short mode. If the path
11168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11169  # take no chances and rewrite it.
11170  # Note: m4 eats our [], so we need to use [ and ] instead.
11171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11172  if test "x$has_forbidden_chars" != x; then
11173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11175  fi
11176
11177
11178  windows_path="$new_path"
11179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11180    unix_path=`$CYGPATH -u "$windows_path"`
11181    new_path="$unix_path"
11182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11184    new_path="$unix_path"
11185  fi
11186
11187  if test "x$path" != "x$new_path"; then
11188    BOOT_JDK="$new_path"
11189    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11190$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11191  fi
11192
11193  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11194  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11195
11196  else
11197    # We're on a posix platform. Hooray! :)
11198    path="$BOOT_JDK"
11199
11200    if test ! -f "$path" && test ! -d "$path"; then
11201      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
11202$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
11203   { (exit 1); exit 1; }; }
11204    fi
11205
11206    has_space=`$ECHO "$path" | $GREP " "`
11207    if test "x$has_space" != x; then
11208      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11209$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11210      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
11211$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
11212   { (exit 1); exit 1; }; }
11213    fi
11214  fi
11215
11216              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
11217$as_echo_n "checking for Boot JDK... " >&6; }
11218              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
11219$as_echo "$BOOT_JDK" >&6; }
11220              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
11221$as_echo_n "checking Boot JDK version... " >&6; }
11222              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11223              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
11224$as_echo "$BOOT_JDK_VERSION" >&6; }
11225            fi # end check jdk version
11226          fi # end check rt.jar
11227        fi # end check javac
11228      fi # end check java
11229    fi # end check boot jdk found
11230  fi
11231
11232
11233# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11234
11235  if test "x$BOOT_JDK_FOUND" = xno; then
11236    # Now execute the test
11237
11238    # Extract the first word of "javac", so it can be a program name with args.
11239set dummy javac; ac_word=$2
11240{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
11241$as_echo_n "checking for $ac_word... " >&6; }
11242if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then
11243  $as_echo_n "(cached) " >&6
11244else
11245  case $JAVAC_CHECK in
11246  [\\/]* | ?:[\\/]*)
11247  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11248  ;;
11249  *)
11250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11251for as_dir in $PATH
11252do
11253  IFS=$as_save_IFS
11254  test -z "$as_dir" && as_dir=.
11255  for ac_exec_ext in '' $ac_executable_extensions; do
11256  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11257    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11258    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11259    break 2
11260  fi
11261done
11262done
11263IFS=$as_save_IFS
11264
11265  ;;
11266esac
11267fi
11268JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11269if test -n "$JAVAC_CHECK"; then
11270  { $as_echo "$as_me:$LINENO: result: $JAVAC_CHECK" >&5
11271$as_echo "$JAVAC_CHECK" >&6; }
11272else
11273  { $as_echo "$as_me:$LINENO: result: no" >&5
11274$as_echo "no" >&6; }
11275fi
11276
11277
11278    # Extract the first word of "java", so it can be a program name with args.
11279set dummy java; ac_word=$2
11280{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
11281$as_echo_n "checking for $ac_word... " >&6; }
11282if test "${ac_cv_path_JAVA_CHECK+set}" = set; then
11283  $as_echo_n "(cached) " >&6
11284else
11285  case $JAVA_CHECK in
11286  [\\/]* | ?:[\\/]*)
11287  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11288  ;;
11289  *)
11290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11291for as_dir in $PATH
11292do
11293  IFS=$as_save_IFS
11294  test -z "$as_dir" && as_dir=.
11295  for ac_exec_ext in '' $ac_executable_extensions; do
11296  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11297    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11298    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11299    break 2
11300  fi
11301done
11302done
11303IFS=$as_save_IFS
11304
11305  ;;
11306esac
11307fi
11308JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11309if test -n "$JAVA_CHECK"; then
11310  { $as_echo "$as_me:$LINENO: result: $JAVA_CHECK" >&5
11311$as_echo "$JAVA_CHECK" >&6; }
11312else
11313  { $as_echo "$as_me:$LINENO: result: no" >&5
11314$as_echo "no" >&6; }
11315fi
11316
11317
11318    BINARY="$JAVAC_CHECK"
11319    if test "x$JAVAC_CHECK" = x; then
11320        BINARY="$JAVA_CHECK"
11321    fi
11322    if test "x$BINARY" != x; then
11323        # So there is a java(c) binary, it might be part of a JDK.
11324        # Lets find the JDK/JRE directory by following symbolic links.
11325        # Linux/GNU systems often have links from /usr/bin/java to
11326        # /etc/alternatives/java to the real JDK binary.
11327
11328    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11329        # Follow a chain of symbolic links. Use readlink
11330        # where it exists, else fall back to horribly
11331        # complicated shell code.
11332        if test "x$READLINK_TESTED" != yes; then
11333            # On MacOSX there is a readlink tool with a different
11334            # purpose than the GNU readlink tool. Check the found readlink.
11335            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
11336            if test "x$ISGNU" = x; then
11337                 # A readlink that we do not know how to use.
11338                 # Are there other non-GNU readlinks out there?
11339                 READLINK_TESTED=yes
11340                 READLINK=
11341            fi
11342        fi
11343
11344        if test "x$READLINK" != x; then
11345            BINARY=`$READLINK -f $BINARY`
11346        else
11347            STARTDIR=$PWD
11348            COUNTER=0
11349            sym_link_dir=`$DIRNAME $BINARY`
11350            sym_link_file=`$BASENAME $BINARY`
11351            while test $COUNTER -lt 20; do
11352                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11353                if test "x$ISLINK" == x; then
11354                    # This is not a symbolic link! We are done!
11355                    break
11356                fi
11357                # The link might be relative! We have to use cd to travel safely.
11358                cd $sym_link_dir
11359                # ... and we must get the to the absolute path, not one using symbolic links.
11360                cd `pwd -P`
11361                cd `$DIRNAME $ISLINK`
11362                sym_link_dir=`$THEPWDCMD`
11363                sym_link_file=`$BASENAME $ISLINK`
11364                let COUNTER=COUNTER+1
11365            done
11366            cd $STARTDIR
11367            BINARY=$sym_link_dir/$sym_link_file
11368        fi
11369    fi
11370
11371        BOOT_JDK=`dirname "$BINARY"`
11372        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11373        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11374            # Looks like we found ourselves an JDK
11375            BOOT_JDK_FOUND=maybe
11376            { $as_echo "$as_me:$LINENO: Found potential Boot JDK using java(c) in PATH" >&5
11377$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11378        fi
11379    fi
11380
11381
11382    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11383    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11384      # Do we have a bin/java?
11385      if test ! -x "$BOOT_JDK/bin/java"; then
11386        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11388        BOOT_JDK_FOUND=no
11389      else
11390        # Do we have a bin/javac?
11391        if test ! -x "$BOOT_JDK/bin/javac"; then
11392          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11393$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11394          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
11395$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11396          BOOT_JDK_FOUND=no
11397        else
11398          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11399          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11400            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11402            BOOT_JDK_FOUND=no
11403          else
11404            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11405            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11406
11407            # Extra M4 quote needed to protect [] in grep expression.
11408            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11409            if test "x$FOUND_VERSION_78" = x; then
11410              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11412              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
11413$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11414              BOOT_JDK_FOUND=no
11415            else
11416              # We're done! :-)
11417              BOOT_JDK_FOUND=yes
11418
11419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11420
11421  # Input might be given as Windows format, start by converting to
11422  # unix format.
11423  path="$BOOT_JDK"
11424  new_path=`$CYGPATH -u "$path"`
11425
11426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11429  # "foo.exe" is OK but "foo" is an error.
11430  #
11431  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11432  # It is also a way to make sure we got the proper file name for the real test later on.
11433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11434  if test "x$test_shortpath" = x; then
11435    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11436$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11437    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
11438$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
11439   { (exit 1); exit 1; }; }
11440  fi
11441
11442  # Call helper function which possibly converts this using DOS-style short mode.
11443  # If so, the updated path is stored in $new_path.
11444
11445  input_path="$new_path"
11446  # Check if we need to convert this using DOS-style short mode. If the path
11447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11448  # take no chances and rewrite it.
11449  # Note: m4 eats our [], so we need to use [ and ] instead.
11450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11451  if test "x$has_forbidden_chars" != x; then
11452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11456      # Going to short mode and back again did indeed matter. Since short mode is
11457      # case insensitive, let's make it lowercase to improve readability.
11458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11459      # Now convert it back to Unix-stile (cygpath)
11460      input_path=`$CYGPATH -u "$shortmode_path"`
11461      new_path="$input_path"
11462    fi
11463  fi
11464
11465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11466  if test "x$test_cygdrive_prefix" = x; then
11467    # As a simple fix, exclude /usr/bin since it's not a real path.
11468    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11470      # a path prefixed by /cygdrive for fixpath to work.
11471      new_path="$CYGWIN_ROOT_PATH$input_path"
11472    fi
11473  fi
11474
11475
11476  if test "x$path" != "x$new_path"; then
11477    BOOT_JDK="$new_path"
11478    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11479$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11480  fi
11481
11482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11483
11484  path="$BOOT_JDK"
11485  has_colon=`$ECHO $path | $GREP ^.:`
11486  new_path="$path"
11487  if test "x$has_colon" = x; then
11488    # Not in mixed or Windows style, start by that.
11489    new_path=`cmd //c echo $path`
11490  fi
11491
11492
11493  input_path="$new_path"
11494  # Check if we need to convert this using DOS-style short mode. If the path
11495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11496  # take no chances and rewrite it.
11497  # Note: m4 eats our [], so we need to use [ and ] instead.
11498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11499  if test "x$has_forbidden_chars" != x; then
11500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11502  fi
11503
11504
11505  windows_path="$new_path"
11506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11507    unix_path=`$CYGPATH -u "$windows_path"`
11508    new_path="$unix_path"
11509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11511    new_path="$unix_path"
11512  fi
11513
11514  if test "x$path" != "x$new_path"; then
11515    BOOT_JDK="$new_path"
11516    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11517$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11518  fi
11519
11520  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11521  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11522
11523  else
11524    # We're on a posix platform. Hooray! :)
11525    path="$BOOT_JDK"
11526
11527    if test ! -f "$path" && test ! -d "$path"; then
11528      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
11529$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
11530   { (exit 1); exit 1; }; }
11531    fi
11532
11533    has_space=`$ECHO "$path" | $GREP " "`
11534    if test "x$has_space" != x; then
11535      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11536$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11537      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
11538$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
11539   { (exit 1); exit 1; }; }
11540    fi
11541  fi
11542
11543              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
11544$as_echo_n "checking for Boot JDK... " >&6; }
11545              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
11546$as_echo "$BOOT_JDK" >&6; }
11547              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
11548$as_echo_n "checking Boot JDK version... " >&6; }
11549              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11550              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
11551$as_echo "$BOOT_JDK_VERSION" >&6; }
11552            fi # end check jdk version
11553          fi # end check rt.jar
11554        fi # end check javac
11555      fi # end check java
11556    fi # end check boot jdk found
11557  fi
11558
11559
11560# Test: Is there a JDK installed in default, well-known locations?
11561
11562  if test "x$BOOT_JDK_FOUND" = xno; then
11563    # Now execute the test
11564
11565  if test "x$OPENJDK_TARGET_OS" = xwindows; then
11566
11567  if test "x$BOOT_JDK_FOUND" = xno; then
11568    # Now execute the test
11569
11570  if test "x$ProgramW6432" != x; then
11571    VIRTUAL_DIR="$ProgramW6432/Java"
11572
11573  windows_path="$VIRTUAL_DIR"
11574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11575    unix_path=`$CYGPATH -u "$windows_path"`
11576    VIRTUAL_DIR="$unix_path"
11577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11579    VIRTUAL_DIR="$unix_path"
11580  fi
11581
11582
11583  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
11584  BOOT_JDK_SUFFIX=""
11585  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
11586  if test "x$ALL_JDKS_FOUND" != x; then
11587    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
11588
11589  if test "x$BOOT_JDK_FOUND" = xno; then
11590    # Now execute the test
11591
11592        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
11593        if test -d "$BOOT_JDK"; then
11594          BOOT_JDK_FOUND=maybe
11595          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
11596$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
11597        fi
11598
11599
11600    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11601    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11602      # Do we have a bin/java?
11603      if test ! -x "$BOOT_JDK/bin/java"; then
11604        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11606        BOOT_JDK_FOUND=no
11607      else
11608        # Do we have a bin/javac?
11609        if test ! -x "$BOOT_JDK/bin/javac"; then
11610          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11612          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
11613$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11614          BOOT_JDK_FOUND=no
11615        else
11616          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11617          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11618            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11620            BOOT_JDK_FOUND=no
11621          else
11622            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11623            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11624
11625            # Extra M4 quote needed to protect [] in grep expression.
11626            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11627            if test "x$FOUND_VERSION_78" = x; then
11628              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11630              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
11631$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11632              BOOT_JDK_FOUND=no
11633            else
11634              # We're done! :-)
11635              BOOT_JDK_FOUND=yes
11636
11637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11638
11639  # Input might be given as Windows format, start by converting to
11640  # unix format.
11641  path="$BOOT_JDK"
11642  new_path=`$CYGPATH -u "$path"`
11643
11644  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11645  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11646  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11647  # "foo.exe" is OK but "foo" is an error.
11648  #
11649  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11650  # It is also a way to make sure we got the proper file name for the real test later on.
11651  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11652  if test "x$test_shortpath" = x; then
11653    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11654$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11655    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
11656$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
11657   { (exit 1); exit 1; }; }
11658  fi
11659
11660  # Call helper function which possibly converts this using DOS-style short mode.
11661  # If so, the updated path is stored in $new_path.
11662
11663  input_path="$new_path"
11664  # Check if we need to convert this using DOS-style short mode. If the path
11665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11666  # take no chances and rewrite it.
11667  # Note: m4 eats our [], so we need to use [ and ] instead.
11668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11669  if test "x$has_forbidden_chars" != x; then
11670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11674      # Going to short mode and back again did indeed matter. Since short mode is
11675      # case insensitive, let's make it lowercase to improve readability.
11676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11677      # Now convert it back to Unix-stile (cygpath)
11678      input_path=`$CYGPATH -u "$shortmode_path"`
11679      new_path="$input_path"
11680    fi
11681  fi
11682
11683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11684  if test "x$test_cygdrive_prefix" = x; then
11685    # As a simple fix, exclude /usr/bin since it's not a real path.
11686    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11688      # a path prefixed by /cygdrive for fixpath to work.
11689      new_path="$CYGWIN_ROOT_PATH$input_path"
11690    fi
11691  fi
11692
11693
11694  if test "x$path" != "x$new_path"; then
11695    BOOT_JDK="$new_path"
11696    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11697$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11698  fi
11699
11700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11701
11702  path="$BOOT_JDK"
11703  has_colon=`$ECHO $path | $GREP ^.:`
11704  new_path="$path"
11705  if test "x$has_colon" = x; then
11706    # Not in mixed or Windows style, start by that.
11707    new_path=`cmd //c echo $path`
11708  fi
11709
11710
11711  input_path="$new_path"
11712  # Check if we need to convert this using DOS-style short mode. If the path
11713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11714  # take no chances and rewrite it.
11715  # Note: m4 eats our [], so we need to use [ and ] instead.
11716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11717  if test "x$has_forbidden_chars" != x; then
11718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11720  fi
11721
11722
11723  windows_path="$new_path"
11724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11725    unix_path=`$CYGPATH -u "$windows_path"`
11726    new_path="$unix_path"
11727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11729    new_path="$unix_path"
11730  fi
11731
11732  if test "x$path" != "x$new_path"; then
11733    BOOT_JDK="$new_path"
11734    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11735$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11736  fi
11737
11738  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11739  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11740
11741  else
11742    # We're on a posix platform. Hooray! :)
11743    path="$BOOT_JDK"
11744
11745    if test ! -f "$path" && test ! -d "$path"; then
11746      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
11747$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
11748   { (exit 1); exit 1; }; }
11749    fi
11750
11751    has_space=`$ECHO "$path" | $GREP " "`
11752    if test "x$has_space" != x; then
11753      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11754$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11755      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
11756$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
11757   { (exit 1); exit 1; }; }
11758    fi
11759  fi
11760
11761              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
11762$as_echo_n "checking for Boot JDK... " >&6; }
11763              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
11764$as_echo "$BOOT_JDK" >&6; }
11765              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
11766$as_echo_n "checking Boot JDK version... " >&6; }
11767              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11768              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
11769$as_echo "$BOOT_JDK_VERSION" >&6; }
11770            fi # end check jdk version
11771          fi # end check rt.jar
11772        fi # end check javac
11773      fi # end check java
11774    fi # end check boot jdk found
11775  fi
11776
11777    done
11778  fi
11779
11780  fi
11781
11782
11783    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11784    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11785      # Do we have a bin/java?
11786      if test ! -x "$BOOT_JDK/bin/java"; then
11787        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11789        BOOT_JDK_FOUND=no
11790      else
11791        # Do we have a bin/javac?
11792        if test ! -x "$BOOT_JDK/bin/javac"; then
11793          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11795          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
11796$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11797          BOOT_JDK_FOUND=no
11798        else
11799          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11800          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11801            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11803            BOOT_JDK_FOUND=no
11804          else
11805            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11806            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11807
11808            # Extra M4 quote needed to protect [] in grep expression.
11809            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11810            if test "x$FOUND_VERSION_78" = x; then
11811              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11813              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
11814$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11815              BOOT_JDK_FOUND=no
11816            else
11817              # We're done! :-)
11818              BOOT_JDK_FOUND=yes
11819
11820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11821
11822  # Input might be given as Windows format, start by converting to
11823  # unix format.
11824  path="$BOOT_JDK"
11825  new_path=`$CYGPATH -u "$path"`
11826
11827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11830  # "foo.exe" is OK but "foo" is an error.
11831  #
11832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11833  # It is also a way to make sure we got the proper file name for the real test later on.
11834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11835  if test "x$test_shortpath" = x; then
11836    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11838    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
11839$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
11840   { (exit 1); exit 1; }; }
11841  fi
11842
11843  # Call helper function which possibly converts this using DOS-style short mode.
11844  # If so, the updated path is stored in $new_path.
11845
11846  input_path="$new_path"
11847  # Check if we need to convert this using DOS-style short mode. If the path
11848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11849  # take no chances and rewrite it.
11850  # Note: m4 eats our [], so we need to use [ and ] instead.
11851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11852  if test "x$has_forbidden_chars" != x; then
11853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11857      # Going to short mode and back again did indeed matter. Since short mode is
11858      # case insensitive, let's make it lowercase to improve readability.
11859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11860      # Now convert it back to Unix-stile (cygpath)
11861      input_path=`$CYGPATH -u "$shortmode_path"`
11862      new_path="$input_path"
11863    fi
11864  fi
11865
11866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11867  if test "x$test_cygdrive_prefix" = x; then
11868    # As a simple fix, exclude /usr/bin since it's not a real path.
11869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11871      # a path prefixed by /cygdrive for fixpath to work.
11872      new_path="$CYGWIN_ROOT_PATH$input_path"
11873    fi
11874  fi
11875
11876
11877  if test "x$path" != "x$new_path"; then
11878    BOOT_JDK="$new_path"
11879    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11880$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11881  fi
11882
11883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11884
11885  path="$BOOT_JDK"
11886  has_colon=`$ECHO $path | $GREP ^.:`
11887  new_path="$path"
11888  if test "x$has_colon" = x; then
11889    # Not in mixed or Windows style, start by that.
11890    new_path=`cmd //c echo $path`
11891  fi
11892
11893
11894  input_path="$new_path"
11895  # Check if we need to convert this using DOS-style short mode. If the path
11896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11897  # take no chances and rewrite it.
11898  # Note: m4 eats our [], so we need to use [ and ] instead.
11899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11900  if test "x$has_forbidden_chars" != x; then
11901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11903  fi
11904
11905
11906  windows_path="$new_path"
11907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11908    unix_path=`$CYGPATH -u "$windows_path"`
11909    new_path="$unix_path"
11910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11912    new_path="$unix_path"
11913  fi
11914
11915  if test "x$path" != "x$new_path"; then
11916    BOOT_JDK="$new_path"
11917    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11918$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11919  fi
11920
11921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11923
11924  else
11925    # We're on a posix platform. Hooray! :)
11926    path="$BOOT_JDK"
11927
11928    if test ! -f "$path" && test ! -d "$path"; then
11929      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
11930$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
11931   { (exit 1); exit 1; }; }
11932    fi
11933
11934    has_space=`$ECHO "$path" | $GREP " "`
11935    if test "x$has_space" != x; then
11936      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11937$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11938      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
11939$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
11940   { (exit 1); exit 1; }; }
11941    fi
11942  fi
11943
11944              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
11945$as_echo_n "checking for Boot JDK... " >&6; }
11946              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
11947$as_echo "$BOOT_JDK" >&6; }
11948              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
11949$as_echo_n "checking Boot JDK version... " >&6; }
11950              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11951              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
11952$as_echo "$BOOT_JDK_VERSION" >&6; }
11953            fi # end check jdk version
11954          fi # end check rt.jar
11955        fi # end check javac
11956      fi # end check java
11957    fi # end check boot jdk found
11958  fi
11959
11960
11961  if test "x$BOOT_JDK_FOUND" = xno; then
11962    # Now execute the test
11963
11964  if test "x$PROGRAMW6432" != x; then
11965    VIRTUAL_DIR="$PROGRAMW6432/Java"
11966
11967  windows_path="$VIRTUAL_DIR"
11968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11969    unix_path=`$CYGPATH -u "$windows_path"`
11970    VIRTUAL_DIR="$unix_path"
11971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11973    VIRTUAL_DIR="$unix_path"
11974  fi
11975
11976
11977  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
11978  BOOT_JDK_SUFFIX=""
11979  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
11980  if test "x$ALL_JDKS_FOUND" != x; then
11981    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
11982
11983  if test "x$BOOT_JDK_FOUND" = xno; then
11984    # Now execute the test
11985
11986        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
11987        if test -d "$BOOT_JDK"; then
11988          BOOT_JDK_FOUND=maybe
11989          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
11990$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
11991        fi
11992
11993
11994    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11995    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11996      # Do we have a bin/java?
11997      if test ! -x "$BOOT_JDK/bin/java"; then
11998        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12000        BOOT_JDK_FOUND=no
12001      else
12002        # Do we have a bin/javac?
12003        if test ! -x "$BOOT_JDK/bin/javac"; then
12004          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12006          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12007$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12008          BOOT_JDK_FOUND=no
12009        else
12010          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12011          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12012            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12014            BOOT_JDK_FOUND=no
12015          else
12016            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12017            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12018
12019            # Extra M4 quote needed to protect [] in grep expression.
12020            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12021            if test "x$FOUND_VERSION_78" = x; then
12022              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12024              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12025$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12026              BOOT_JDK_FOUND=no
12027            else
12028              # We're done! :-)
12029              BOOT_JDK_FOUND=yes
12030
12031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12032
12033  # Input might be given as Windows format, start by converting to
12034  # unix format.
12035  path="$BOOT_JDK"
12036  new_path=`$CYGPATH -u "$path"`
12037
12038  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12039  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12040  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12041  # "foo.exe" is OK but "foo" is an error.
12042  #
12043  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12044  # It is also a way to make sure we got the proper file name for the real test later on.
12045  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12046  if test "x$test_shortpath" = x; then
12047    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12049    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
12050$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
12051   { (exit 1); exit 1; }; }
12052  fi
12053
12054  # Call helper function which possibly converts this using DOS-style short mode.
12055  # If so, the updated path is stored in $new_path.
12056
12057  input_path="$new_path"
12058  # Check if we need to convert this using DOS-style short mode. If the path
12059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12060  # take no chances and rewrite it.
12061  # Note: m4 eats our [], so we need to use [ and ] instead.
12062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12063  if test "x$has_forbidden_chars" != x; then
12064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12068      # Going to short mode and back again did indeed matter. Since short mode is
12069      # case insensitive, let's make it lowercase to improve readability.
12070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12071      # Now convert it back to Unix-stile (cygpath)
12072      input_path=`$CYGPATH -u "$shortmode_path"`
12073      new_path="$input_path"
12074    fi
12075  fi
12076
12077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12078  if test "x$test_cygdrive_prefix" = x; then
12079    # As a simple fix, exclude /usr/bin since it's not a real path.
12080    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12082      # a path prefixed by /cygdrive for fixpath to work.
12083      new_path="$CYGWIN_ROOT_PATH$input_path"
12084    fi
12085  fi
12086
12087
12088  if test "x$path" != "x$new_path"; then
12089    BOOT_JDK="$new_path"
12090    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12091$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12092  fi
12093
12094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12095
12096  path="$BOOT_JDK"
12097  has_colon=`$ECHO $path | $GREP ^.:`
12098  new_path="$path"
12099  if test "x$has_colon" = x; then
12100    # Not in mixed or Windows style, start by that.
12101    new_path=`cmd //c echo $path`
12102  fi
12103
12104
12105  input_path="$new_path"
12106  # Check if we need to convert this using DOS-style short mode. If the path
12107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12108  # take no chances and rewrite it.
12109  # Note: m4 eats our [], so we need to use [ and ] instead.
12110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12111  if test "x$has_forbidden_chars" != x; then
12112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12113    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12114  fi
12115
12116
12117  windows_path="$new_path"
12118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12119    unix_path=`$CYGPATH -u "$windows_path"`
12120    new_path="$unix_path"
12121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12123    new_path="$unix_path"
12124  fi
12125
12126  if test "x$path" != "x$new_path"; then
12127    BOOT_JDK="$new_path"
12128    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12129$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12130  fi
12131
12132  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12133  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12134
12135  else
12136    # We're on a posix platform. Hooray! :)
12137    path="$BOOT_JDK"
12138
12139    if test ! -f "$path" && test ! -d "$path"; then
12140      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
12141$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
12142   { (exit 1); exit 1; }; }
12143    fi
12144
12145    has_space=`$ECHO "$path" | $GREP " "`
12146    if test "x$has_space" != x; then
12147      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12148$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12149      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
12150$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
12151   { (exit 1); exit 1; }; }
12152    fi
12153  fi
12154
12155              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
12156$as_echo_n "checking for Boot JDK... " >&6; }
12157              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
12158$as_echo "$BOOT_JDK" >&6; }
12159              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
12160$as_echo_n "checking Boot JDK version... " >&6; }
12161              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12162              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
12163$as_echo "$BOOT_JDK_VERSION" >&6; }
12164            fi # end check jdk version
12165          fi # end check rt.jar
12166        fi # end check javac
12167      fi # end check java
12168    fi # end check boot jdk found
12169  fi
12170
12171    done
12172  fi
12173
12174  fi
12175
12176
12177    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12178    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12179      # Do we have a bin/java?
12180      if test ! -x "$BOOT_JDK/bin/java"; then
12181        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12183        BOOT_JDK_FOUND=no
12184      else
12185        # Do we have a bin/javac?
12186        if test ! -x "$BOOT_JDK/bin/javac"; then
12187          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12189          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12190$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12191          BOOT_JDK_FOUND=no
12192        else
12193          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12194          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12195            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12197            BOOT_JDK_FOUND=no
12198          else
12199            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12200            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12201
12202            # Extra M4 quote needed to protect [] in grep expression.
12203            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12204            if test "x$FOUND_VERSION_78" = x; then
12205              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12207              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12208$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12209              BOOT_JDK_FOUND=no
12210            else
12211              # We're done! :-)
12212              BOOT_JDK_FOUND=yes
12213
12214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12215
12216  # Input might be given as Windows format, start by converting to
12217  # unix format.
12218  path="$BOOT_JDK"
12219  new_path=`$CYGPATH -u "$path"`
12220
12221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12224  # "foo.exe" is OK but "foo" is an error.
12225  #
12226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12227  # It is also a way to make sure we got the proper file name for the real test later on.
12228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12229  if test "x$test_shortpath" = x; then
12230    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12232    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
12233$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
12234   { (exit 1); exit 1; }; }
12235  fi
12236
12237  # Call helper function which possibly converts this using DOS-style short mode.
12238  # If so, the updated path is stored in $new_path.
12239
12240  input_path="$new_path"
12241  # Check if we need to convert this using DOS-style short mode. If the path
12242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12243  # take no chances and rewrite it.
12244  # Note: m4 eats our [], so we need to use [ and ] instead.
12245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12246  if test "x$has_forbidden_chars" != x; then
12247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12251      # Going to short mode and back again did indeed matter. Since short mode is
12252      # case insensitive, let's make it lowercase to improve readability.
12253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12254      # Now convert it back to Unix-stile (cygpath)
12255      input_path=`$CYGPATH -u "$shortmode_path"`
12256      new_path="$input_path"
12257    fi
12258  fi
12259
12260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12261  if test "x$test_cygdrive_prefix" = x; then
12262    # As a simple fix, exclude /usr/bin since it's not a real path.
12263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12265      # a path prefixed by /cygdrive for fixpath to work.
12266      new_path="$CYGWIN_ROOT_PATH$input_path"
12267    fi
12268  fi
12269
12270
12271  if test "x$path" != "x$new_path"; then
12272    BOOT_JDK="$new_path"
12273    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12274$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12275  fi
12276
12277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12278
12279  path="$BOOT_JDK"
12280  has_colon=`$ECHO $path | $GREP ^.:`
12281  new_path="$path"
12282  if test "x$has_colon" = x; then
12283    # Not in mixed or Windows style, start by that.
12284    new_path=`cmd //c echo $path`
12285  fi
12286
12287
12288  input_path="$new_path"
12289  # Check if we need to convert this using DOS-style short mode. If the path
12290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12291  # take no chances and rewrite it.
12292  # Note: m4 eats our [], so we need to use [ and ] instead.
12293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12294  if test "x$has_forbidden_chars" != x; then
12295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12297  fi
12298
12299
12300  windows_path="$new_path"
12301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12302    unix_path=`$CYGPATH -u "$windows_path"`
12303    new_path="$unix_path"
12304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12306    new_path="$unix_path"
12307  fi
12308
12309  if test "x$path" != "x$new_path"; then
12310    BOOT_JDK="$new_path"
12311    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12312$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12313  fi
12314
12315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12317
12318  else
12319    # We're on a posix platform. Hooray! :)
12320    path="$BOOT_JDK"
12321
12322    if test ! -f "$path" && test ! -d "$path"; then
12323      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
12324$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
12325   { (exit 1); exit 1; }; }
12326    fi
12327
12328    has_space=`$ECHO "$path" | $GREP " "`
12329    if test "x$has_space" != x; then
12330      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12331$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12332      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
12333$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
12334   { (exit 1); exit 1; }; }
12335    fi
12336  fi
12337
12338              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
12339$as_echo_n "checking for Boot JDK... " >&6; }
12340              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
12341$as_echo "$BOOT_JDK" >&6; }
12342              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
12343$as_echo_n "checking Boot JDK version... " >&6; }
12344              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12345              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
12346$as_echo "$BOOT_JDK_VERSION" >&6; }
12347            fi # end check jdk version
12348          fi # end check rt.jar
12349        fi # end check javac
12350      fi # end check java
12351    fi # end check boot jdk found
12352  fi
12353
12354
12355  if test "x$BOOT_JDK_FOUND" = xno; then
12356    # Now execute the test
12357
12358  if test "x$PROGRAMFILES" != x; then
12359    VIRTUAL_DIR="$PROGRAMFILES/Java"
12360
12361  windows_path="$VIRTUAL_DIR"
12362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12363    unix_path=`$CYGPATH -u "$windows_path"`
12364    VIRTUAL_DIR="$unix_path"
12365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12367    VIRTUAL_DIR="$unix_path"
12368  fi
12369
12370
12371  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12372  BOOT_JDK_SUFFIX=""
12373  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12374  if test "x$ALL_JDKS_FOUND" != x; then
12375    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12376
12377  if test "x$BOOT_JDK_FOUND" = xno; then
12378    # Now execute the test
12379
12380        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12381        if test -d "$BOOT_JDK"; then
12382          BOOT_JDK_FOUND=maybe
12383          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12384$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12385        fi
12386
12387
12388    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12389    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12390      # Do we have a bin/java?
12391      if test ! -x "$BOOT_JDK/bin/java"; then
12392        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12393$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12394        BOOT_JDK_FOUND=no
12395      else
12396        # Do we have a bin/javac?
12397        if test ! -x "$BOOT_JDK/bin/javac"; then
12398          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12400          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12401$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12402          BOOT_JDK_FOUND=no
12403        else
12404          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12405          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12406            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12407$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12408            BOOT_JDK_FOUND=no
12409          else
12410            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12411            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12412
12413            # Extra M4 quote needed to protect [] in grep expression.
12414            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12415            if test "x$FOUND_VERSION_78" = x; then
12416              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12418              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12419$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12420              BOOT_JDK_FOUND=no
12421            else
12422              # We're done! :-)
12423              BOOT_JDK_FOUND=yes
12424
12425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12426
12427  # Input might be given as Windows format, start by converting to
12428  # unix format.
12429  path="$BOOT_JDK"
12430  new_path=`$CYGPATH -u "$path"`
12431
12432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12435  # "foo.exe" is OK but "foo" is an error.
12436  #
12437  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12438  # It is also a way to make sure we got the proper file name for the real test later on.
12439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12440  if test "x$test_shortpath" = x; then
12441    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12442$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12443    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
12444$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
12445   { (exit 1); exit 1; }; }
12446  fi
12447
12448  # Call helper function which possibly converts this using DOS-style short mode.
12449  # If so, the updated path is stored in $new_path.
12450
12451  input_path="$new_path"
12452  # Check if we need to convert this using DOS-style short mode. If the path
12453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12454  # take no chances and rewrite it.
12455  # Note: m4 eats our [], so we need to use [ and ] instead.
12456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12457  if test "x$has_forbidden_chars" != x; then
12458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12462      # Going to short mode and back again did indeed matter. Since short mode is
12463      # case insensitive, let's make it lowercase to improve readability.
12464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12465      # Now convert it back to Unix-stile (cygpath)
12466      input_path=`$CYGPATH -u "$shortmode_path"`
12467      new_path="$input_path"
12468    fi
12469  fi
12470
12471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12472  if test "x$test_cygdrive_prefix" = x; then
12473    # As a simple fix, exclude /usr/bin since it's not a real path.
12474    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12476      # a path prefixed by /cygdrive for fixpath to work.
12477      new_path="$CYGWIN_ROOT_PATH$input_path"
12478    fi
12479  fi
12480
12481
12482  if test "x$path" != "x$new_path"; then
12483    BOOT_JDK="$new_path"
12484    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12485$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12486  fi
12487
12488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12489
12490  path="$BOOT_JDK"
12491  has_colon=`$ECHO $path | $GREP ^.:`
12492  new_path="$path"
12493  if test "x$has_colon" = x; then
12494    # Not in mixed or Windows style, start by that.
12495    new_path=`cmd //c echo $path`
12496  fi
12497
12498
12499  input_path="$new_path"
12500  # Check if we need to convert this using DOS-style short mode. If the path
12501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12502  # take no chances and rewrite it.
12503  # Note: m4 eats our [], so we need to use [ and ] instead.
12504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12505  if test "x$has_forbidden_chars" != x; then
12506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12508  fi
12509
12510
12511  windows_path="$new_path"
12512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12513    unix_path=`$CYGPATH -u "$windows_path"`
12514    new_path="$unix_path"
12515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12517    new_path="$unix_path"
12518  fi
12519
12520  if test "x$path" != "x$new_path"; then
12521    BOOT_JDK="$new_path"
12522    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12523$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12524  fi
12525
12526  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12527  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12528
12529  else
12530    # We're on a posix platform. Hooray! :)
12531    path="$BOOT_JDK"
12532
12533    if test ! -f "$path" && test ! -d "$path"; then
12534      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
12535$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
12536   { (exit 1); exit 1; }; }
12537    fi
12538
12539    has_space=`$ECHO "$path" | $GREP " "`
12540    if test "x$has_space" != x; then
12541      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12543      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
12544$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
12545   { (exit 1); exit 1; }; }
12546    fi
12547  fi
12548
12549              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
12550$as_echo_n "checking for Boot JDK... " >&6; }
12551              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
12552$as_echo "$BOOT_JDK" >&6; }
12553              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
12554$as_echo_n "checking Boot JDK version... " >&6; }
12555              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12556              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
12557$as_echo "$BOOT_JDK_VERSION" >&6; }
12558            fi # end check jdk version
12559          fi # end check rt.jar
12560        fi # end check javac
12561      fi # end check java
12562    fi # end check boot jdk found
12563  fi
12564
12565    done
12566  fi
12567
12568  fi
12569
12570
12571    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12572    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12573      # Do we have a bin/java?
12574      if test ! -x "$BOOT_JDK/bin/java"; then
12575        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12577        BOOT_JDK_FOUND=no
12578      else
12579        # Do we have a bin/javac?
12580        if test ! -x "$BOOT_JDK/bin/javac"; then
12581          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12583          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12584$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12585          BOOT_JDK_FOUND=no
12586        else
12587          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12588          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12589            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12591            BOOT_JDK_FOUND=no
12592          else
12593            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12594            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12595
12596            # Extra M4 quote needed to protect [] in grep expression.
12597            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12598            if test "x$FOUND_VERSION_78" = x; then
12599              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12601              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12602$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12603              BOOT_JDK_FOUND=no
12604            else
12605              # We're done! :-)
12606              BOOT_JDK_FOUND=yes
12607
12608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12609
12610  # Input might be given as Windows format, start by converting to
12611  # unix format.
12612  path="$BOOT_JDK"
12613  new_path=`$CYGPATH -u "$path"`
12614
12615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12618  # "foo.exe" is OK but "foo" is an error.
12619  #
12620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12621  # It is also a way to make sure we got the proper file name for the real test later on.
12622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12623  if test "x$test_shortpath" = x; then
12624    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12625$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12626    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
12627$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
12628   { (exit 1); exit 1; }; }
12629  fi
12630
12631  # Call helper function which possibly converts this using DOS-style short mode.
12632  # If so, the updated path is stored in $new_path.
12633
12634  input_path="$new_path"
12635  # Check if we need to convert this using DOS-style short mode. If the path
12636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12637  # take no chances and rewrite it.
12638  # Note: m4 eats our [], so we need to use [ and ] instead.
12639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12640  if test "x$has_forbidden_chars" != x; then
12641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12645      # Going to short mode and back again did indeed matter. Since short mode is
12646      # case insensitive, let's make it lowercase to improve readability.
12647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12648      # Now convert it back to Unix-stile (cygpath)
12649      input_path=`$CYGPATH -u "$shortmode_path"`
12650      new_path="$input_path"
12651    fi
12652  fi
12653
12654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12655  if test "x$test_cygdrive_prefix" = x; then
12656    # As a simple fix, exclude /usr/bin since it's not a real path.
12657    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12659      # a path prefixed by /cygdrive for fixpath to work.
12660      new_path="$CYGWIN_ROOT_PATH$input_path"
12661    fi
12662  fi
12663
12664
12665  if test "x$path" != "x$new_path"; then
12666    BOOT_JDK="$new_path"
12667    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12668$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12669  fi
12670
12671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12672
12673  path="$BOOT_JDK"
12674  has_colon=`$ECHO $path | $GREP ^.:`
12675  new_path="$path"
12676  if test "x$has_colon" = x; then
12677    # Not in mixed or Windows style, start by that.
12678    new_path=`cmd //c echo $path`
12679  fi
12680
12681
12682  input_path="$new_path"
12683  # Check if we need to convert this using DOS-style short mode. If the path
12684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12685  # take no chances and rewrite it.
12686  # Note: m4 eats our [], so we need to use [ and ] instead.
12687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12688  if test "x$has_forbidden_chars" != x; then
12689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12690    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12691  fi
12692
12693
12694  windows_path="$new_path"
12695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12696    unix_path=`$CYGPATH -u "$windows_path"`
12697    new_path="$unix_path"
12698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12700    new_path="$unix_path"
12701  fi
12702
12703  if test "x$path" != "x$new_path"; then
12704    BOOT_JDK="$new_path"
12705    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12706$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12707  fi
12708
12709  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12710  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12711
12712  else
12713    # We're on a posix platform. Hooray! :)
12714    path="$BOOT_JDK"
12715
12716    if test ! -f "$path" && test ! -d "$path"; then
12717      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
12718$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
12719   { (exit 1); exit 1; }; }
12720    fi
12721
12722    has_space=`$ECHO "$path" | $GREP " "`
12723    if test "x$has_space" != x; then
12724      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12725$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12726      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
12727$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
12728   { (exit 1); exit 1; }; }
12729    fi
12730  fi
12731
12732              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
12733$as_echo_n "checking for Boot JDK... " >&6; }
12734              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
12735$as_echo "$BOOT_JDK" >&6; }
12736              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
12737$as_echo_n "checking Boot JDK version... " >&6; }
12738              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12739              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
12740$as_echo "$BOOT_JDK_VERSION" >&6; }
12741            fi # end check jdk version
12742          fi # end check rt.jar
12743        fi # end check javac
12744      fi # end check java
12745    fi # end check boot jdk found
12746  fi
12747
12748
12749  if test "x$BOOT_JDK_FOUND" = xno; then
12750    # Now execute the test
12751
12752  if test "x$ProgramFiles" != x; then
12753    VIRTUAL_DIR="$ProgramFiles/Java"
12754
12755  windows_path="$VIRTUAL_DIR"
12756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12757    unix_path=`$CYGPATH -u "$windows_path"`
12758    VIRTUAL_DIR="$unix_path"
12759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12761    VIRTUAL_DIR="$unix_path"
12762  fi
12763
12764
12765  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12766  BOOT_JDK_SUFFIX=""
12767  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12768  if test "x$ALL_JDKS_FOUND" != x; then
12769    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12770
12771  if test "x$BOOT_JDK_FOUND" = xno; then
12772    # Now execute the test
12773
12774        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12775        if test -d "$BOOT_JDK"; then
12776          BOOT_JDK_FOUND=maybe
12777          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12778$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12779        fi
12780
12781
12782    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12783    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12784      # Do we have a bin/java?
12785      if test ! -x "$BOOT_JDK/bin/java"; then
12786        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12788        BOOT_JDK_FOUND=no
12789      else
12790        # Do we have a bin/javac?
12791        if test ! -x "$BOOT_JDK/bin/javac"; then
12792          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12794          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12795$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12796          BOOT_JDK_FOUND=no
12797        else
12798          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12799          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12800            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12802            BOOT_JDK_FOUND=no
12803          else
12804            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12805            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12806
12807            # Extra M4 quote needed to protect [] in grep expression.
12808            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12809            if test "x$FOUND_VERSION_78" = x; then
12810              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12812              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12813$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12814              BOOT_JDK_FOUND=no
12815            else
12816              # We're done! :-)
12817              BOOT_JDK_FOUND=yes
12818
12819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12820
12821  # Input might be given as Windows format, start by converting to
12822  # unix format.
12823  path="$BOOT_JDK"
12824  new_path=`$CYGPATH -u "$path"`
12825
12826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12829  # "foo.exe" is OK but "foo" is an error.
12830  #
12831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12832  # It is also a way to make sure we got the proper file name for the real test later on.
12833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12834  if test "x$test_shortpath" = x; then
12835    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12836$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12837    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
12838$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
12839   { (exit 1); exit 1; }; }
12840  fi
12841
12842  # Call helper function which possibly converts this using DOS-style short mode.
12843  # If so, the updated path is stored in $new_path.
12844
12845  input_path="$new_path"
12846  # Check if we need to convert this using DOS-style short mode. If the path
12847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12848  # take no chances and rewrite it.
12849  # Note: m4 eats our [], so we need to use [ and ] instead.
12850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12851  if test "x$has_forbidden_chars" != x; then
12852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12856      # Going to short mode and back again did indeed matter. Since short mode is
12857      # case insensitive, let's make it lowercase to improve readability.
12858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12859      # Now convert it back to Unix-stile (cygpath)
12860      input_path=`$CYGPATH -u "$shortmode_path"`
12861      new_path="$input_path"
12862    fi
12863  fi
12864
12865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12866  if test "x$test_cygdrive_prefix" = x; then
12867    # As a simple fix, exclude /usr/bin since it's not a real path.
12868    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12870      # a path prefixed by /cygdrive for fixpath to work.
12871      new_path="$CYGWIN_ROOT_PATH$input_path"
12872    fi
12873  fi
12874
12875
12876  if test "x$path" != "x$new_path"; then
12877    BOOT_JDK="$new_path"
12878    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12879$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12880  fi
12881
12882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12883
12884  path="$BOOT_JDK"
12885  has_colon=`$ECHO $path | $GREP ^.:`
12886  new_path="$path"
12887  if test "x$has_colon" = x; then
12888    # Not in mixed or Windows style, start by that.
12889    new_path=`cmd //c echo $path`
12890  fi
12891
12892
12893  input_path="$new_path"
12894  # Check if we need to convert this using DOS-style short mode. If the path
12895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12896  # take no chances and rewrite it.
12897  # Note: m4 eats our [], so we need to use [ and ] instead.
12898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12899  if test "x$has_forbidden_chars" != x; then
12900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12902  fi
12903
12904
12905  windows_path="$new_path"
12906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12907    unix_path=`$CYGPATH -u "$windows_path"`
12908    new_path="$unix_path"
12909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12911    new_path="$unix_path"
12912  fi
12913
12914  if test "x$path" != "x$new_path"; then
12915    BOOT_JDK="$new_path"
12916    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12917$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12918  fi
12919
12920  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12921  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12922
12923  else
12924    # We're on a posix platform. Hooray! :)
12925    path="$BOOT_JDK"
12926
12927    if test ! -f "$path" && test ! -d "$path"; then
12928      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
12929$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
12930   { (exit 1); exit 1; }; }
12931    fi
12932
12933    has_space=`$ECHO "$path" | $GREP " "`
12934    if test "x$has_space" != x; then
12935      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12936$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12937      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
12938$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
12939   { (exit 1); exit 1; }; }
12940    fi
12941  fi
12942
12943              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
12944$as_echo_n "checking for Boot JDK... " >&6; }
12945              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
12946$as_echo "$BOOT_JDK" >&6; }
12947              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
12948$as_echo_n "checking Boot JDK version... " >&6; }
12949              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12950              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
12951$as_echo "$BOOT_JDK_VERSION" >&6; }
12952            fi # end check jdk version
12953          fi # end check rt.jar
12954        fi # end check javac
12955      fi # end check java
12956    fi # end check boot jdk found
12957  fi
12958
12959    done
12960  fi
12961
12962  fi
12963
12964
12965    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12966    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12967      # Do we have a bin/java?
12968      if test ! -x "$BOOT_JDK/bin/java"; then
12969        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12971        BOOT_JDK_FOUND=no
12972      else
12973        # Do we have a bin/javac?
12974        if test ! -x "$BOOT_JDK/bin/javac"; then
12975          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12977          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12978$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12979          BOOT_JDK_FOUND=no
12980        else
12981          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12982          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12983            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12985            BOOT_JDK_FOUND=no
12986          else
12987            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12988            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12989
12990            # Extra M4 quote needed to protect [] in grep expression.
12991            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12992            if test "x$FOUND_VERSION_78" = x; then
12993              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12995              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12996$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12997              BOOT_JDK_FOUND=no
12998            else
12999              # We're done! :-)
13000              BOOT_JDK_FOUND=yes
13001
13002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13003
13004  # Input might be given as Windows format, start by converting to
13005  # unix format.
13006  path="$BOOT_JDK"
13007  new_path=`$CYGPATH -u "$path"`
13008
13009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13012  # "foo.exe" is OK but "foo" is an error.
13013  #
13014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13015  # It is also a way to make sure we got the proper file name for the real test later on.
13016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13017  if test "x$test_shortpath" = x; then
13018    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13020    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13021$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13022   { (exit 1); exit 1; }; }
13023  fi
13024
13025  # Call helper function which possibly converts this using DOS-style short mode.
13026  # If so, the updated path is stored in $new_path.
13027
13028  input_path="$new_path"
13029  # Check if we need to convert this using DOS-style short mode. If the path
13030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13031  # take no chances and rewrite it.
13032  # Note: m4 eats our [], so we need to use [ and ] instead.
13033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13034  if test "x$has_forbidden_chars" != x; then
13035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13039      # Going to short mode and back again did indeed matter. Since short mode is
13040      # case insensitive, let's make it lowercase to improve readability.
13041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13042      # Now convert it back to Unix-stile (cygpath)
13043      input_path=`$CYGPATH -u "$shortmode_path"`
13044      new_path="$input_path"
13045    fi
13046  fi
13047
13048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13049  if test "x$test_cygdrive_prefix" = x; then
13050    # As a simple fix, exclude /usr/bin since it's not a real path.
13051    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13053      # a path prefixed by /cygdrive for fixpath to work.
13054      new_path="$CYGWIN_ROOT_PATH$input_path"
13055    fi
13056  fi
13057
13058
13059  if test "x$path" != "x$new_path"; then
13060    BOOT_JDK="$new_path"
13061    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13062$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13063  fi
13064
13065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13066
13067  path="$BOOT_JDK"
13068  has_colon=`$ECHO $path | $GREP ^.:`
13069  new_path="$path"
13070  if test "x$has_colon" = x; then
13071    # Not in mixed or Windows style, start by that.
13072    new_path=`cmd //c echo $path`
13073  fi
13074
13075
13076  input_path="$new_path"
13077  # Check if we need to convert this using DOS-style short mode. If the path
13078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13079  # take no chances and rewrite it.
13080  # Note: m4 eats our [], so we need to use [ and ] instead.
13081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13082  if test "x$has_forbidden_chars" != x; then
13083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13085  fi
13086
13087
13088  windows_path="$new_path"
13089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13090    unix_path=`$CYGPATH -u "$windows_path"`
13091    new_path="$unix_path"
13092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13094    new_path="$unix_path"
13095  fi
13096
13097  if test "x$path" != "x$new_path"; then
13098    BOOT_JDK="$new_path"
13099    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13100$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13101  fi
13102
13103  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13104  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13105
13106  else
13107    # We're on a posix platform. Hooray! :)
13108    path="$BOOT_JDK"
13109
13110    if test ! -f "$path" && test ! -d "$path"; then
13111      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
13112$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
13113   { (exit 1); exit 1; }; }
13114    fi
13115
13116    has_space=`$ECHO "$path" | $GREP " "`
13117    if test "x$has_space" != x; then
13118      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13119$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13120      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
13121$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
13122   { (exit 1); exit 1; }; }
13123    fi
13124  fi
13125
13126              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
13127$as_echo_n "checking for Boot JDK... " >&6; }
13128              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
13129$as_echo "$BOOT_JDK" >&6; }
13130              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
13131$as_echo_n "checking Boot JDK version... " >&6; }
13132              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13133              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13134$as_echo "$BOOT_JDK_VERSION" >&6; }
13135            fi # end check jdk version
13136          fi # end check rt.jar
13137        fi # end check javac
13138      fi # end check java
13139    fi # end check boot jdk found
13140  fi
13141
13142
13143  if test "x$BOOT_JDK_FOUND" = xno; then
13144    # Now execute the test
13145
13146  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13147  BOOT_JDK_SUFFIX=""
13148  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13149  if test "x$ALL_JDKS_FOUND" != x; then
13150    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13151
13152  if test "x$BOOT_JDK_FOUND" = xno; then
13153    # Now execute the test
13154
13155        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13156        if test -d "$BOOT_JDK"; then
13157          BOOT_JDK_FOUND=maybe
13158          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13159$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13160        fi
13161
13162
13163    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13164    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13165      # Do we have a bin/java?
13166      if test ! -x "$BOOT_JDK/bin/java"; then
13167        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13169        BOOT_JDK_FOUND=no
13170      else
13171        # Do we have a bin/javac?
13172        if test ! -x "$BOOT_JDK/bin/javac"; then
13173          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13175          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13176$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13177          BOOT_JDK_FOUND=no
13178        else
13179          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13180          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13181            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13183            BOOT_JDK_FOUND=no
13184          else
13185            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13186            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13187
13188            # Extra M4 quote needed to protect [] in grep expression.
13189            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13190            if test "x$FOUND_VERSION_78" = x; then
13191              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13193              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
13194$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13195              BOOT_JDK_FOUND=no
13196            else
13197              # We're done! :-)
13198              BOOT_JDK_FOUND=yes
13199
13200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13201
13202  # Input might be given as Windows format, start by converting to
13203  # unix format.
13204  path="$BOOT_JDK"
13205  new_path=`$CYGPATH -u "$path"`
13206
13207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13210  # "foo.exe" is OK but "foo" is an error.
13211  #
13212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13213  # It is also a way to make sure we got the proper file name for the real test later on.
13214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13215  if test "x$test_shortpath" = x; then
13216    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13217$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13218    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13219$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13220   { (exit 1); exit 1; }; }
13221  fi
13222
13223  # Call helper function which possibly converts this using DOS-style short mode.
13224  # If so, the updated path is stored in $new_path.
13225
13226  input_path="$new_path"
13227  # Check if we need to convert this using DOS-style short mode. If the path
13228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13229  # take no chances and rewrite it.
13230  # Note: m4 eats our [], so we need to use [ and ] instead.
13231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13232  if test "x$has_forbidden_chars" != x; then
13233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13234    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13235    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13236    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13237      # Going to short mode and back again did indeed matter. Since short mode is
13238      # case insensitive, let's make it lowercase to improve readability.
13239      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13240      # Now convert it back to Unix-stile (cygpath)
13241      input_path=`$CYGPATH -u "$shortmode_path"`
13242      new_path="$input_path"
13243    fi
13244  fi
13245
13246  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13247  if test "x$test_cygdrive_prefix" = x; then
13248    # As a simple fix, exclude /usr/bin since it's not a real path.
13249    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13250      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13251      # a path prefixed by /cygdrive for fixpath to work.
13252      new_path="$CYGWIN_ROOT_PATH$input_path"
13253    fi
13254  fi
13255
13256
13257  if test "x$path" != "x$new_path"; then
13258    BOOT_JDK="$new_path"
13259    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13261  fi
13262
13263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13264
13265  path="$BOOT_JDK"
13266  has_colon=`$ECHO $path | $GREP ^.:`
13267  new_path="$path"
13268  if test "x$has_colon" = x; then
13269    # Not in mixed or Windows style, start by that.
13270    new_path=`cmd //c echo $path`
13271  fi
13272
13273
13274  input_path="$new_path"
13275  # Check if we need to convert this using DOS-style short mode. If the path
13276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13277  # take no chances and rewrite it.
13278  # Note: m4 eats our [], so we need to use [ and ] instead.
13279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13280  if test "x$has_forbidden_chars" != x; then
13281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13283  fi
13284
13285
13286  windows_path="$new_path"
13287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13288    unix_path=`$CYGPATH -u "$windows_path"`
13289    new_path="$unix_path"
13290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13292    new_path="$unix_path"
13293  fi
13294
13295  if test "x$path" != "x$new_path"; then
13296    BOOT_JDK="$new_path"
13297    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13298$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13299  fi
13300
13301  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13302  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13303
13304  else
13305    # We're on a posix platform. Hooray! :)
13306    path="$BOOT_JDK"
13307
13308    if test ! -f "$path" && test ! -d "$path"; then
13309      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
13310$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
13311   { (exit 1); exit 1; }; }
13312    fi
13313
13314    has_space=`$ECHO "$path" | $GREP " "`
13315    if test "x$has_space" != x; then
13316      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13317$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13318      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
13319$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
13320   { (exit 1); exit 1; }; }
13321    fi
13322  fi
13323
13324              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
13325$as_echo_n "checking for Boot JDK... " >&6; }
13326              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
13327$as_echo "$BOOT_JDK" >&6; }
13328              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
13329$as_echo_n "checking Boot JDK version... " >&6; }
13330              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13331              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13332$as_echo "$BOOT_JDK_VERSION" >&6; }
13333            fi # end check jdk version
13334          fi # end check rt.jar
13335        fi # end check javac
13336      fi # end check java
13337    fi # end check boot jdk found
13338  fi
13339
13340    done
13341  fi
13342
13343
13344    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13345    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13346      # Do we have a bin/java?
13347      if test ! -x "$BOOT_JDK/bin/java"; then
13348        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13350        BOOT_JDK_FOUND=no
13351      else
13352        # Do we have a bin/javac?
13353        if test ! -x "$BOOT_JDK/bin/javac"; then
13354          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13355$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13356          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13357$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13358          BOOT_JDK_FOUND=no
13359        else
13360          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13361          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13362            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13363$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13364            BOOT_JDK_FOUND=no
13365          else
13366            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13367            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13368
13369            # Extra M4 quote needed to protect [] in grep expression.
13370            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13371            if test "x$FOUND_VERSION_78" = x; then
13372              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13374              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
13375$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13376              BOOT_JDK_FOUND=no
13377            else
13378              # We're done! :-)
13379              BOOT_JDK_FOUND=yes
13380
13381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13382
13383  # Input might be given as Windows format, start by converting to
13384  # unix format.
13385  path="$BOOT_JDK"
13386  new_path=`$CYGPATH -u "$path"`
13387
13388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13391  # "foo.exe" is OK but "foo" is an error.
13392  #
13393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13394  # It is also a way to make sure we got the proper file name for the real test later on.
13395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13396  if test "x$test_shortpath" = x; then
13397    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13398$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13399    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13400$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13401   { (exit 1); exit 1; }; }
13402  fi
13403
13404  # Call helper function which possibly converts this using DOS-style short mode.
13405  # If so, the updated path is stored in $new_path.
13406
13407  input_path="$new_path"
13408  # Check if we need to convert this using DOS-style short mode. If the path
13409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13410  # take no chances and rewrite it.
13411  # Note: m4 eats our [], so we need to use [ and ] instead.
13412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13413  if test "x$has_forbidden_chars" != x; then
13414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13418      # Going to short mode and back again did indeed matter. Since short mode is
13419      # case insensitive, let's make it lowercase to improve readability.
13420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13421      # Now convert it back to Unix-stile (cygpath)
13422      input_path=`$CYGPATH -u "$shortmode_path"`
13423      new_path="$input_path"
13424    fi
13425  fi
13426
13427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13428  if test "x$test_cygdrive_prefix" = x; then
13429    # As a simple fix, exclude /usr/bin since it's not a real path.
13430    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13432      # a path prefixed by /cygdrive for fixpath to work.
13433      new_path="$CYGWIN_ROOT_PATH$input_path"
13434    fi
13435  fi
13436
13437
13438  if test "x$path" != "x$new_path"; then
13439    BOOT_JDK="$new_path"
13440    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13441$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13442  fi
13443
13444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13445
13446  path="$BOOT_JDK"
13447  has_colon=`$ECHO $path | $GREP ^.:`
13448  new_path="$path"
13449  if test "x$has_colon" = x; then
13450    # Not in mixed or Windows style, start by that.
13451    new_path=`cmd //c echo $path`
13452  fi
13453
13454
13455  input_path="$new_path"
13456  # Check if we need to convert this using DOS-style short mode. If the path
13457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13458  # take no chances and rewrite it.
13459  # Note: m4 eats our [], so we need to use [ and ] instead.
13460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13461  if test "x$has_forbidden_chars" != x; then
13462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13464  fi
13465
13466
13467  windows_path="$new_path"
13468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13469    unix_path=`$CYGPATH -u "$windows_path"`
13470    new_path="$unix_path"
13471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13473    new_path="$unix_path"
13474  fi
13475
13476  if test "x$path" != "x$new_path"; then
13477    BOOT_JDK="$new_path"
13478    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13479$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13480  fi
13481
13482  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13483  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13484
13485  else
13486    # We're on a posix platform. Hooray! :)
13487    path="$BOOT_JDK"
13488
13489    if test ! -f "$path" && test ! -d "$path"; then
13490      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
13491$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
13492   { (exit 1); exit 1; }; }
13493    fi
13494
13495    has_space=`$ECHO "$path" | $GREP " "`
13496    if test "x$has_space" != x; then
13497      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13498$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13499      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
13500$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
13501   { (exit 1); exit 1; }; }
13502    fi
13503  fi
13504
13505              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
13506$as_echo_n "checking for Boot JDK... " >&6; }
13507              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
13508$as_echo "$BOOT_JDK" >&6; }
13509              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
13510$as_echo_n "checking Boot JDK version... " >&6; }
13511              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13512              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13513$as_echo "$BOOT_JDK_VERSION" >&6; }
13514            fi # end check jdk version
13515          fi # end check rt.jar
13516        fi # end check javac
13517      fi # end check java
13518    fi # end check boot jdk found
13519  fi
13520
13521  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
13522
13523  if test "x$BOOT_JDK_FOUND" = xno; then
13524    # Now execute the test
13525
13526  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
13527  BOOT_JDK_SUFFIX="/Contents/Home"
13528  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13529  if test "x$ALL_JDKS_FOUND" != x; then
13530    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13531
13532  if test "x$BOOT_JDK_FOUND" = xno; then
13533    # Now execute the test
13534
13535        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13536        if test -d "$BOOT_JDK"; then
13537          BOOT_JDK_FOUND=maybe
13538          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13539$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13540        fi
13541
13542
13543    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13544    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13545      # Do we have a bin/java?
13546      if test ! -x "$BOOT_JDK/bin/java"; then
13547        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13549        BOOT_JDK_FOUND=no
13550      else
13551        # Do we have a bin/javac?
13552        if test ! -x "$BOOT_JDK/bin/javac"; then
13553          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13555          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13556$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13557          BOOT_JDK_FOUND=no
13558        else
13559          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13560          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13561            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13563            BOOT_JDK_FOUND=no
13564          else
13565            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13566            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13567
13568            # Extra M4 quote needed to protect [] in grep expression.
13569            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13570            if test "x$FOUND_VERSION_78" = x; then
13571              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13573              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
13574$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13575              BOOT_JDK_FOUND=no
13576            else
13577              # We're done! :-)
13578              BOOT_JDK_FOUND=yes
13579
13580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13581
13582  # Input might be given as Windows format, start by converting to
13583  # unix format.
13584  path="$BOOT_JDK"
13585  new_path=`$CYGPATH -u "$path"`
13586
13587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13590  # "foo.exe" is OK but "foo" is an error.
13591  #
13592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13593  # It is also a way to make sure we got the proper file name for the real test later on.
13594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13595  if test "x$test_shortpath" = x; then
13596    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13598    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13599$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13600   { (exit 1); exit 1; }; }
13601  fi
13602
13603  # Call helper function which possibly converts this using DOS-style short mode.
13604  # If so, the updated path is stored in $new_path.
13605
13606  input_path="$new_path"
13607  # Check if we need to convert this using DOS-style short mode. If the path
13608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13609  # take no chances and rewrite it.
13610  # Note: m4 eats our [], so we need to use [ and ] instead.
13611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13612  if test "x$has_forbidden_chars" != x; then
13613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13617      # Going to short mode and back again did indeed matter. Since short mode is
13618      # case insensitive, let's make it lowercase to improve readability.
13619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13620      # Now convert it back to Unix-stile (cygpath)
13621      input_path=`$CYGPATH -u "$shortmode_path"`
13622      new_path="$input_path"
13623    fi
13624  fi
13625
13626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13627  if test "x$test_cygdrive_prefix" = x; then
13628    # As a simple fix, exclude /usr/bin since it's not a real path.
13629    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13631      # a path prefixed by /cygdrive for fixpath to work.
13632      new_path="$CYGWIN_ROOT_PATH$input_path"
13633    fi
13634  fi
13635
13636
13637  if test "x$path" != "x$new_path"; then
13638    BOOT_JDK="$new_path"
13639    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13640$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13641  fi
13642
13643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13644
13645  path="$BOOT_JDK"
13646  has_colon=`$ECHO $path | $GREP ^.:`
13647  new_path="$path"
13648  if test "x$has_colon" = x; then
13649    # Not in mixed or Windows style, start by that.
13650    new_path=`cmd //c echo $path`
13651  fi
13652
13653
13654  input_path="$new_path"
13655  # Check if we need to convert this using DOS-style short mode. If the path
13656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13657  # take no chances and rewrite it.
13658  # Note: m4 eats our [], so we need to use [ and ] instead.
13659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13660  if test "x$has_forbidden_chars" != x; then
13661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13663  fi
13664
13665
13666  windows_path="$new_path"
13667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13668    unix_path=`$CYGPATH -u "$windows_path"`
13669    new_path="$unix_path"
13670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13672    new_path="$unix_path"
13673  fi
13674
13675  if test "x$path" != "x$new_path"; then
13676    BOOT_JDK="$new_path"
13677    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13678$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13679  fi
13680
13681  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13682  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13683
13684  else
13685    # We're on a posix platform. Hooray! :)
13686    path="$BOOT_JDK"
13687
13688    if test ! -f "$path" && test ! -d "$path"; then
13689      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
13690$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
13691   { (exit 1); exit 1; }; }
13692    fi
13693
13694    has_space=`$ECHO "$path" | $GREP " "`
13695    if test "x$has_space" != x; then
13696      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13697$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13698      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
13699$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
13700   { (exit 1); exit 1; }; }
13701    fi
13702  fi
13703
13704              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
13705$as_echo_n "checking for Boot JDK... " >&6; }
13706              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
13707$as_echo "$BOOT_JDK" >&6; }
13708              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
13709$as_echo_n "checking Boot JDK version... " >&6; }
13710              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13711              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13712$as_echo "$BOOT_JDK_VERSION" >&6; }
13713            fi # end check jdk version
13714          fi # end check rt.jar
13715        fi # end check javac
13716      fi # end check java
13717    fi # end check boot jdk found
13718  fi
13719
13720    done
13721  fi
13722
13723
13724    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13725    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13726      # Do we have a bin/java?
13727      if test ! -x "$BOOT_JDK/bin/java"; then
13728        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13730        BOOT_JDK_FOUND=no
13731      else
13732        # Do we have a bin/javac?
13733        if test ! -x "$BOOT_JDK/bin/javac"; then
13734          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13736          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13737$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13738          BOOT_JDK_FOUND=no
13739        else
13740          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13741          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13742            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13743$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13744            BOOT_JDK_FOUND=no
13745          else
13746            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13747            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13748
13749            # Extra M4 quote needed to protect [] in grep expression.
13750            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13751            if test "x$FOUND_VERSION_78" = x; then
13752              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13754              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
13755$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13756              BOOT_JDK_FOUND=no
13757            else
13758              # We're done! :-)
13759              BOOT_JDK_FOUND=yes
13760
13761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13762
13763  # Input might be given as Windows format, start by converting to
13764  # unix format.
13765  path="$BOOT_JDK"
13766  new_path=`$CYGPATH -u "$path"`
13767
13768  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13769  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13770  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13771  # "foo.exe" is OK but "foo" is an error.
13772  #
13773  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13774  # It is also a way to make sure we got the proper file name for the real test later on.
13775  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13776  if test "x$test_shortpath" = x; then
13777    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13778$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13779    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13780$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13781   { (exit 1); exit 1; }; }
13782  fi
13783
13784  # Call helper function which possibly converts this using DOS-style short mode.
13785  # If so, the updated path is stored in $new_path.
13786
13787  input_path="$new_path"
13788  # Check if we need to convert this using DOS-style short mode. If the path
13789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13790  # take no chances and rewrite it.
13791  # Note: m4 eats our [], so we need to use [ and ] instead.
13792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13793  if test "x$has_forbidden_chars" != x; then
13794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13798      # Going to short mode and back again did indeed matter. Since short mode is
13799      # case insensitive, let's make it lowercase to improve readability.
13800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13801      # Now convert it back to Unix-stile (cygpath)
13802      input_path=`$CYGPATH -u "$shortmode_path"`
13803      new_path="$input_path"
13804    fi
13805  fi
13806
13807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13808  if test "x$test_cygdrive_prefix" = x; then
13809    # As a simple fix, exclude /usr/bin since it's not a real path.
13810    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13812      # a path prefixed by /cygdrive for fixpath to work.
13813      new_path="$CYGWIN_ROOT_PATH$input_path"
13814    fi
13815  fi
13816
13817
13818  if test "x$path" != "x$new_path"; then
13819    BOOT_JDK="$new_path"
13820    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13821$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13822  fi
13823
13824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13825
13826  path="$BOOT_JDK"
13827  has_colon=`$ECHO $path | $GREP ^.:`
13828  new_path="$path"
13829  if test "x$has_colon" = x; then
13830    # Not in mixed or Windows style, start by that.
13831    new_path=`cmd //c echo $path`
13832  fi
13833
13834
13835  input_path="$new_path"
13836  # Check if we need to convert this using DOS-style short mode. If the path
13837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13838  # take no chances and rewrite it.
13839  # Note: m4 eats our [], so we need to use [ and ] instead.
13840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13841  if test "x$has_forbidden_chars" != x; then
13842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13844  fi
13845
13846
13847  windows_path="$new_path"
13848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13849    unix_path=`$CYGPATH -u "$windows_path"`
13850    new_path="$unix_path"
13851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13853    new_path="$unix_path"
13854  fi
13855
13856  if test "x$path" != "x$new_path"; then
13857    BOOT_JDK="$new_path"
13858    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13859$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13860  fi
13861
13862  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13863  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13864
13865  else
13866    # We're on a posix platform. Hooray! :)
13867    path="$BOOT_JDK"
13868
13869    if test ! -f "$path" && test ! -d "$path"; then
13870      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
13871$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
13872   { (exit 1); exit 1; }; }
13873    fi
13874
13875    has_space=`$ECHO "$path" | $GREP " "`
13876    if test "x$has_space" != x; then
13877      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13878$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13879      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
13880$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
13881   { (exit 1); exit 1; }; }
13882    fi
13883  fi
13884
13885              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
13886$as_echo_n "checking for Boot JDK... " >&6; }
13887              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
13888$as_echo "$BOOT_JDK" >&6; }
13889              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
13890$as_echo_n "checking Boot JDK version... " >&6; }
13891              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13892              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13893$as_echo "$BOOT_JDK_VERSION" >&6; }
13894            fi # end check jdk version
13895          fi # end check rt.jar
13896        fi # end check javac
13897      fi # end check java
13898    fi # end check boot jdk found
13899  fi
13900
13901
13902  if test "x$BOOT_JDK_FOUND" = xno; then
13903    # Now execute the test
13904
13905  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
13906  BOOT_JDK_SUFFIX="/Contents/Home"
13907  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13908  if test "x$ALL_JDKS_FOUND" != x; then
13909    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13910
13911  if test "x$BOOT_JDK_FOUND" = xno; then
13912    # Now execute the test
13913
13914        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13915        if test -d "$BOOT_JDK"; then
13916          BOOT_JDK_FOUND=maybe
13917          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13918$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13919        fi
13920
13921
13922    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13923    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13924      # Do we have a bin/java?
13925      if test ! -x "$BOOT_JDK/bin/java"; then
13926        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13928        BOOT_JDK_FOUND=no
13929      else
13930        # Do we have a bin/javac?
13931        if test ! -x "$BOOT_JDK/bin/javac"; then
13932          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13934          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13935$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13936          BOOT_JDK_FOUND=no
13937        else
13938          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13939          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13940            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13942            BOOT_JDK_FOUND=no
13943          else
13944            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13945            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13946
13947            # Extra M4 quote needed to protect [] in grep expression.
13948            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13949            if test "x$FOUND_VERSION_78" = x; then
13950              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13952              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
13953$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13954              BOOT_JDK_FOUND=no
13955            else
13956              # We're done! :-)
13957              BOOT_JDK_FOUND=yes
13958
13959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13960
13961  # Input might be given as Windows format, start by converting to
13962  # unix format.
13963  path="$BOOT_JDK"
13964  new_path=`$CYGPATH -u "$path"`
13965
13966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13969  # "foo.exe" is OK but "foo" is an error.
13970  #
13971  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13972  # It is also a way to make sure we got the proper file name for the real test later on.
13973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13974  if test "x$test_shortpath" = x; then
13975    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13976$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13977    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13978$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13979   { (exit 1); exit 1; }; }
13980  fi
13981
13982  # Call helper function which possibly converts this using DOS-style short mode.
13983  # If so, the updated path is stored in $new_path.
13984
13985  input_path="$new_path"
13986  # Check if we need to convert this using DOS-style short mode. If the path
13987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13988  # take no chances and rewrite it.
13989  # Note: m4 eats our [], so we need to use [ and ] instead.
13990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13991  if test "x$has_forbidden_chars" != x; then
13992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13993    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13994    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13995    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13996      # Going to short mode and back again did indeed matter. Since short mode is
13997      # case insensitive, let's make it lowercase to improve readability.
13998      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13999      # Now convert it back to Unix-stile (cygpath)
14000      input_path=`$CYGPATH -u "$shortmode_path"`
14001      new_path="$input_path"
14002    fi
14003  fi
14004
14005  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14006  if test "x$test_cygdrive_prefix" = x; then
14007    # As a simple fix, exclude /usr/bin since it's not a real path.
14008    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14009      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14010      # a path prefixed by /cygdrive for fixpath to work.
14011      new_path="$CYGWIN_ROOT_PATH$input_path"
14012    fi
14013  fi
14014
14015
14016  if test "x$path" != "x$new_path"; then
14017    BOOT_JDK="$new_path"
14018    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14019$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14020  fi
14021
14022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14023
14024  path="$BOOT_JDK"
14025  has_colon=`$ECHO $path | $GREP ^.:`
14026  new_path="$path"
14027  if test "x$has_colon" = x; then
14028    # Not in mixed or Windows style, start by that.
14029    new_path=`cmd //c echo $path`
14030  fi
14031
14032
14033  input_path="$new_path"
14034  # Check if we need to convert this using DOS-style short mode. If the path
14035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14036  # take no chances and rewrite it.
14037  # Note: m4 eats our [], so we need to use [ and ] instead.
14038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14039  if test "x$has_forbidden_chars" != x; then
14040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14042  fi
14043
14044
14045  windows_path="$new_path"
14046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14047    unix_path=`$CYGPATH -u "$windows_path"`
14048    new_path="$unix_path"
14049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14051    new_path="$unix_path"
14052  fi
14053
14054  if test "x$path" != "x$new_path"; then
14055    BOOT_JDK="$new_path"
14056    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14057$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14058  fi
14059
14060  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14061  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14062
14063  else
14064    # We're on a posix platform. Hooray! :)
14065    path="$BOOT_JDK"
14066
14067    if test ! -f "$path" && test ! -d "$path"; then
14068      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
14069$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
14070   { (exit 1); exit 1; }; }
14071    fi
14072
14073    has_space=`$ECHO "$path" | $GREP " "`
14074    if test "x$has_space" != x; then
14075      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14076$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14077      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
14078$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
14079   { (exit 1); exit 1; }; }
14080    fi
14081  fi
14082
14083              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
14084$as_echo_n "checking for Boot JDK... " >&6; }
14085              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
14086$as_echo "$BOOT_JDK" >&6; }
14087              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
14088$as_echo_n "checking Boot JDK version... " >&6; }
14089              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14090              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
14091$as_echo "$BOOT_JDK_VERSION" >&6; }
14092            fi # end check jdk version
14093          fi # end check rt.jar
14094        fi # end check javac
14095      fi # end check java
14096    fi # end check boot jdk found
14097  fi
14098
14099    done
14100  fi
14101
14102
14103    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14104    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14105      # Do we have a bin/java?
14106      if test ! -x "$BOOT_JDK/bin/java"; then
14107        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14109        BOOT_JDK_FOUND=no
14110      else
14111        # Do we have a bin/javac?
14112        if test ! -x "$BOOT_JDK/bin/javac"; then
14113          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14115          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
14116$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14117          BOOT_JDK_FOUND=no
14118        else
14119          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14120          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14121            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14122$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14123            BOOT_JDK_FOUND=no
14124          else
14125            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14126            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14127
14128            # Extra M4 quote needed to protect [] in grep expression.
14129            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14130            if test "x$FOUND_VERSION_78" = x; then
14131              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14133              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
14134$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14135              BOOT_JDK_FOUND=no
14136            else
14137              # We're done! :-)
14138              BOOT_JDK_FOUND=yes
14139
14140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14141
14142  # Input might be given as Windows format, start by converting to
14143  # unix format.
14144  path="$BOOT_JDK"
14145  new_path=`$CYGPATH -u "$path"`
14146
14147  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14148  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14149  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14150  # "foo.exe" is OK but "foo" is an error.
14151  #
14152  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14153  # It is also a way to make sure we got the proper file name for the real test later on.
14154  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14155  if test "x$test_shortpath" = x; then
14156    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14157$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14158    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
14159$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
14160   { (exit 1); exit 1; }; }
14161  fi
14162
14163  # Call helper function which possibly converts this using DOS-style short mode.
14164  # If so, the updated path is stored in $new_path.
14165
14166  input_path="$new_path"
14167  # Check if we need to convert this using DOS-style short mode. If the path
14168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14169  # take no chances and rewrite it.
14170  # Note: m4 eats our [], so we need to use [ and ] instead.
14171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14172  if test "x$has_forbidden_chars" != x; then
14173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14174    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14175    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14176    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14177      # Going to short mode and back again did indeed matter. Since short mode is
14178      # case insensitive, let's make it lowercase to improve readability.
14179      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14180      # Now convert it back to Unix-stile (cygpath)
14181      input_path=`$CYGPATH -u "$shortmode_path"`
14182      new_path="$input_path"
14183    fi
14184  fi
14185
14186  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14187  if test "x$test_cygdrive_prefix" = x; then
14188    # As a simple fix, exclude /usr/bin since it's not a real path.
14189    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14190      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14191      # a path prefixed by /cygdrive for fixpath to work.
14192      new_path="$CYGWIN_ROOT_PATH$input_path"
14193    fi
14194  fi
14195
14196
14197  if test "x$path" != "x$new_path"; then
14198    BOOT_JDK="$new_path"
14199    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14200$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14201  fi
14202
14203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14204
14205  path="$BOOT_JDK"
14206  has_colon=`$ECHO $path | $GREP ^.:`
14207  new_path="$path"
14208  if test "x$has_colon" = x; then
14209    # Not in mixed or Windows style, start by that.
14210    new_path=`cmd //c echo $path`
14211  fi
14212
14213
14214  input_path="$new_path"
14215  # Check if we need to convert this using DOS-style short mode. If the path
14216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14217  # take no chances and rewrite it.
14218  # Note: m4 eats our [], so we need to use [ and ] instead.
14219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14220  if test "x$has_forbidden_chars" != x; then
14221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14223  fi
14224
14225
14226  windows_path="$new_path"
14227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14228    unix_path=`$CYGPATH -u "$windows_path"`
14229    new_path="$unix_path"
14230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14232    new_path="$unix_path"
14233  fi
14234
14235  if test "x$path" != "x$new_path"; then
14236    BOOT_JDK="$new_path"
14237    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14238$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14239  fi
14240
14241  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14242  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14243
14244  else
14245    # We're on a posix platform. Hooray! :)
14246    path="$BOOT_JDK"
14247
14248    if test ! -f "$path" && test ! -d "$path"; then
14249      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
14250$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
14251   { (exit 1); exit 1; }; }
14252    fi
14253
14254    has_space=`$ECHO "$path" | $GREP " "`
14255    if test "x$has_space" != x; then
14256      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14257$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14258      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
14259$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
14260   { (exit 1); exit 1; }; }
14261    fi
14262  fi
14263
14264              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
14265$as_echo_n "checking for Boot JDK... " >&6; }
14266              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
14267$as_echo "$BOOT_JDK" >&6; }
14268              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
14269$as_echo_n "checking Boot JDK version... " >&6; }
14270              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14271              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
14272$as_echo "$BOOT_JDK_VERSION" >&6; }
14273            fi # end check jdk version
14274          fi # end check rt.jar
14275        fi # end check javac
14276      fi # end check java
14277    fi # end check boot jdk found
14278  fi
14279
14280  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14281
14282  if test "x$BOOT_JDK_FOUND" = xno; then
14283    # Now execute the test
14284
14285  BOOT_JDK_PREFIX="/usr/lib/jvm"
14286  BOOT_JDK_SUFFIX=""
14287  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14288  if test "x$ALL_JDKS_FOUND" != x; then
14289    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14290
14291  if test "x$BOOT_JDK_FOUND" = xno; then
14292    # Now execute the test
14293
14294        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14295        if test -d "$BOOT_JDK"; then
14296          BOOT_JDK_FOUND=maybe
14297          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14298$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14299        fi
14300
14301
14302    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14303    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14304      # Do we have a bin/java?
14305      if test ! -x "$BOOT_JDK/bin/java"; then
14306        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14308        BOOT_JDK_FOUND=no
14309      else
14310        # Do we have a bin/javac?
14311        if test ! -x "$BOOT_JDK/bin/javac"; then
14312          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14314          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
14315$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14316          BOOT_JDK_FOUND=no
14317        else
14318          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14319          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14320            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14322            BOOT_JDK_FOUND=no
14323          else
14324            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14325            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14326
14327            # Extra M4 quote needed to protect [] in grep expression.
14328            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14329            if test "x$FOUND_VERSION_78" = x; then
14330              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14332              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
14333$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14334              BOOT_JDK_FOUND=no
14335            else
14336              # We're done! :-)
14337              BOOT_JDK_FOUND=yes
14338
14339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14340
14341  # Input might be given as Windows format, start by converting to
14342  # unix format.
14343  path="$BOOT_JDK"
14344  new_path=`$CYGPATH -u "$path"`
14345
14346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14349  # "foo.exe" is OK but "foo" is an error.
14350  #
14351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14352  # It is also a way to make sure we got the proper file name for the real test later on.
14353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14354  if test "x$test_shortpath" = x; then
14355    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14357    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
14358$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
14359   { (exit 1); exit 1; }; }
14360  fi
14361
14362  # Call helper function which possibly converts this using DOS-style short mode.
14363  # If so, the updated path is stored in $new_path.
14364
14365  input_path="$new_path"
14366  # Check if we need to convert this using DOS-style short mode. If the path
14367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14368  # take no chances and rewrite it.
14369  # Note: m4 eats our [], so we need to use [ and ] instead.
14370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14371  if test "x$has_forbidden_chars" != x; then
14372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14376      # Going to short mode and back again did indeed matter. Since short mode is
14377      # case insensitive, let's make it lowercase to improve readability.
14378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14379      # Now convert it back to Unix-stile (cygpath)
14380      input_path=`$CYGPATH -u "$shortmode_path"`
14381      new_path="$input_path"
14382    fi
14383  fi
14384
14385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14386  if test "x$test_cygdrive_prefix" = x; then
14387    # As a simple fix, exclude /usr/bin since it's not a real path.
14388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14390      # a path prefixed by /cygdrive for fixpath to work.
14391      new_path="$CYGWIN_ROOT_PATH$input_path"
14392    fi
14393  fi
14394
14395
14396  if test "x$path" != "x$new_path"; then
14397    BOOT_JDK="$new_path"
14398    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14400  fi
14401
14402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14403
14404  path="$BOOT_JDK"
14405  has_colon=`$ECHO $path | $GREP ^.:`
14406  new_path="$path"
14407  if test "x$has_colon" = x; then
14408    # Not in mixed or Windows style, start by that.
14409    new_path=`cmd //c echo $path`
14410  fi
14411
14412
14413  input_path="$new_path"
14414  # Check if we need to convert this using DOS-style short mode. If the path
14415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14416  # take no chances and rewrite it.
14417  # Note: m4 eats our [], so we need to use [ and ] instead.
14418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14419  if test "x$has_forbidden_chars" != x; then
14420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14422  fi
14423
14424
14425  windows_path="$new_path"
14426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14427    unix_path=`$CYGPATH -u "$windows_path"`
14428    new_path="$unix_path"
14429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14431    new_path="$unix_path"
14432  fi
14433
14434  if test "x$path" != "x$new_path"; then
14435    BOOT_JDK="$new_path"
14436    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14437$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14438  fi
14439
14440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14442
14443  else
14444    # We're on a posix platform. Hooray! :)
14445    path="$BOOT_JDK"
14446
14447    if test ! -f "$path" && test ! -d "$path"; then
14448      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
14449$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
14450   { (exit 1); exit 1; }; }
14451    fi
14452
14453    has_space=`$ECHO "$path" | $GREP " "`
14454    if test "x$has_space" != x; then
14455      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14457      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
14458$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
14459   { (exit 1); exit 1; }; }
14460    fi
14461  fi
14462
14463              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
14464$as_echo_n "checking for Boot JDK... " >&6; }
14465              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
14466$as_echo "$BOOT_JDK" >&6; }
14467              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
14468$as_echo_n "checking Boot JDK version... " >&6; }
14469              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14470              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
14471$as_echo "$BOOT_JDK_VERSION" >&6; }
14472            fi # end check jdk version
14473          fi # end check rt.jar
14474        fi # end check javac
14475      fi # end check java
14476    fi # end check boot jdk found
14477  fi
14478
14479    done
14480  fi
14481
14482
14483    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14484    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14485      # Do we have a bin/java?
14486      if test ! -x "$BOOT_JDK/bin/java"; then
14487        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14489        BOOT_JDK_FOUND=no
14490      else
14491        # Do we have a bin/javac?
14492        if test ! -x "$BOOT_JDK/bin/javac"; then
14493          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14495          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
14496$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14497          BOOT_JDK_FOUND=no
14498        else
14499          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14500          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14501            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14503            BOOT_JDK_FOUND=no
14504          else
14505            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14506            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14507
14508            # Extra M4 quote needed to protect [] in grep expression.
14509            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14510            if test "x$FOUND_VERSION_78" = x; then
14511              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14513              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
14514$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14515              BOOT_JDK_FOUND=no
14516            else
14517              # We're done! :-)
14518              BOOT_JDK_FOUND=yes
14519
14520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14521
14522  # Input might be given as Windows format, start by converting to
14523  # unix format.
14524  path="$BOOT_JDK"
14525  new_path=`$CYGPATH -u "$path"`
14526
14527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14530  # "foo.exe" is OK but "foo" is an error.
14531  #
14532  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14533  # It is also a way to make sure we got the proper file name for the real test later on.
14534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14535  if test "x$test_shortpath" = x; then
14536    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14537$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14538    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
14539$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
14540   { (exit 1); exit 1; }; }
14541  fi
14542
14543  # Call helper function which possibly converts this using DOS-style short mode.
14544  # If so, the updated path is stored in $new_path.
14545
14546  input_path="$new_path"
14547  # Check if we need to convert this using DOS-style short mode. If the path
14548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14549  # take no chances and rewrite it.
14550  # Note: m4 eats our [], so we need to use [ and ] instead.
14551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14552  if test "x$has_forbidden_chars" != x; then
14553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14554    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14555    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14556    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14557      # Going to short mode and back again did indeed matter. Since short mode is
14558      # case insensitive, let's make it lowercase to improve readability.
14559      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14560      # Now convert it back to Unix-stile (cygpath)
14561      input_path=`$CYGPATH -u "$shortmode_path"`
14562      new_path="$input_path"
14563    fi
14564  fi
14565
14566  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14567  if test "x$test_cygdrive_prefix" = x; then
14568    # As a simple fix, exclude /usr/bin since it's not a real path.
14569    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14570      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14571      # a path prefixed by /cygdrive for fixpath to work.
14572      new_path="$CYGWIN_ROOT_PATH$input_path"
14573    fi
14574  fi
14575
14576
14577  if test "x$path" != "x$new_path"; then
14578    BOOT_JDK="$new_path"
14579    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14580$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14581  fi
14582
14583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14584
14585  path="$BOOT_JDK"
14586  has_colon=`$ECHO $path | $GREP ^.:`
14587  new_path="$path"
14588  if test "x$has_colon" = x; then
14589    # Not in mixed or Windows style, start by that.
14590    new_path=`cmd //c echo $path`
14591  fi
14592
14593
14594  input_path="$new_path"
14595  # Check if we need to convert this using DOS-style short mode. If the path
14596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14597  # take no chances and rewrite it.
14598  # Note: m4 eats our [], so we need to use [ and ] instead.
14599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14600  if test "x$has_forbidden_chars" != x; then
14601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14602    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14603  fi
14604
14605
14606  windows_path="$new_path"
14607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14608    unix_path=`$CYGPATH -u "$windows_path"`
14609    new_path="$unix_path"
14610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14612    new_path="$unix_path"
14613  fi
14614
14615  if test "x$path" != "x$new_path"; then
14616    BOOT_JDK="$new_path"
14617    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14618$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14619  fi
14620
14621  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14622  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14623
14624  else
14625    # We're on a posix platform. Hooray! :)
14626    path="$BOOT_JDK"
14627
14628    if test ! -f "$path" && test ! -d "$path"; then
14629      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
14630$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
14631   { (exit 1); exit 1; }; }
14632    fi
14633
14634    has_space=`$ECHO "$path" | $GREP " "`
14635    if test "x$has_space" != x; then
14636      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14638      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
14639$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
14640   { (exit 1); exit 1; }; }
14641    fi
14642  fi
14643
14644              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
14645$as_echo_n "checking for Boot JDK... " >&6; }
14646              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
14647$as_echo "$BOOT_JDK" >&6; }
14648              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
14649$as_echo_n "checking Boot JDK version... " >&6; }
14650              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14651              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
14652$as_echo "$BOOT_JDK_VERSION" >&6; }
14653            fi # end check jdk version
14654          fi # end check rt.jar
14655        fi # end check javac
14656      fi # end check java
14657    fi # end check boot jdk found
14658  fi
14659
14660  fi
14661
14662
14663    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14664    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14665      # Do we have a bin/java?
14666      if test ! -x "$BOOT_JDK/bin/java"; then
14667        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14668$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14669        BOOT_JDK_FOUND=no
14670      else
14671        # Do we have a bin/javac?
14672        if test ! -x "$BOOT_JDK/bin/javac"; then
14673          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14675          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
14676$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14677          BOOT_JDK_FOUND=no
14678        else
14679          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14680          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14681            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14683            BOOT_JDK_FOUND=no
14684          else
14685            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14686            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14687
14688            # Extra M4 quote needed to protect [] in grep expression.
14689            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14690            if test "x$FOUND_VERSION_78" = x; then
14691              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14693              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
14694$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14695              BOOT_JDK_FOUND=no
14696            else
14697              # We're done! :-)
14698              BOOT_JDK_FOUND=yes
14699
14700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14701
14702  # Input might be given as Windows format, start by converting to
14703  # unix format.
14704  path="$BOOT_JDK"
14705  new_path=`$CYGPATH -u "$path"`
14706
14707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14710  # "foo.exe" is OK but "foo" is an error.
14711  #
14712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14713  # It is also a way to make sure we got the proper file name for the real test later on.
14714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14715  if test "x$test_shortpath" = x; then
14716    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14717$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14718    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
14719$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
14720   { (exit 1); exit 1; }; }
14721  fi
14722
14723  # Call helper function which possibly converts this using DOS-style short mode.
14724  # If so, the updated path is stored in $new_path.
14725
14726  input_path="$new_path"
14727  # Check if we need to convert this using DOS-style short mode. If the path
14728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14729  # take no chances and rewrite it.
14730  # Note: m4 eats our [], so we need to use [ and ] instead.
14731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14732  if test "x$has_forbidden_chars" != x; then
14733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14737      # Going to short mode and back again did indeed matter. Since short mode is
14738      # case insensitive, let's make it lowercase to improve readability.
14739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14740      # Now convert it back to Unix-stile (cygpath)
14741      input_path=`$CYGPATH -u "$shortmode_path"`
14742      new_path="$input_path"
14743    fi
14744  fi
14745
14746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14747  if test "x$test_cygdrive_prefix" = x; then
14748    # As a simple fix, exclude /usr/bin since it's not a real path.
14749    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14751      # a path prefixed by /cygdrive for fixpath to work.
14752      new_path="$CYGWIN_ROOT_PATH$input_path"
14753    fi
14754  fi
14755
14756
14757  if test "x$path" != "x$new_path"; then
14758    BOOT_JDK="$new_path"
14759    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14760$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14761  fi
14762
14763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14764
14765  path="$BOOT_JDK"
14766  has_colon=`$ECHO $path | $GREP ^.:`
14767  new_path="$path"
14768  if test "x$has_colon" = x; then
14769    # Not in mixed or Windows style, start by that.
14770    new_path=`cmd //c echo $path`
14771  fi
14772
14773
14774  input_path="$new_path"
14775  # Check if we need to convert this using DOS-style short mode. If the path
14776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14777  # take no chances and rewrite it.
14778  # Note: m4 eats our [], so we need to use [ and ] instead.
14779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14780  if test "x$has_forbidden_chars" != x; then
14781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14783  fi
14784
14785
14786  windows_path="$new_path"
14787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14788    unix_path=`$CYGPATH -u "$windows_path"`
14789    new_path="$unix_path"
14790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14792    new_path="$unix_path"
14793  fi
14794
14795  if test "x$path" != "x$new_path"; then
14796    BOOT_JDK="$new_path"
14797    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14798$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14799  fi
14800
14801  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14802  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14803
14804  else
14805    # We're on a posix platform. Hooray! :)
14806    path="$BOOT_JDK"
14807
14808    if test ! -f "$path" && test ! -d "$path"; then
14809      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
14810$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
14811   { (exit 1); exit 1; }; }
14812    fi
14813
14814    has_space=`$ECHO "$path" | $GREP " "`
14815    if test "x$has_space" != x; then
14816      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14817$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14818      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
14819$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
14820   { (exit 1); exit 1; }; }
14821    fi
14822  fi
14823
14824              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
14825$as_echo_n "checking for Boot JDK... " >&6; }
14826              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
14827$as_echo "$BOOT_JDK" >&6; }
14828              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
14829$as_echo_n "checking Boot JDK version... " >&6; }
14830              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14831              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
14832$as_echo "$BOOT_JDK_VERSION" >&6; }
14833            fi # end check jdk version
14834          fi # end check rt.jar
14835        fi # end check javac
14836      fi # end check java
14837    fi # end check boot jdk found
14838  fi
14839
14840
14841# If we haven't found anything yet, we've truly lost. Give up.
14842if test "x$BOOT_JDK_FOUND" = xno; then
14843
14844    # Print a helpful message on how to acquire the necessary build dependency.
14845    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
14846    MISSING_DEPENDENCY=openjdk
14847    PKGHANDLER_COMMAND=
14848
14849    case $PKGHANDLER in
14850	apt-get)
14851                apt_help     $MISSING_DEPENDENCY ;;
14852    yum)
14853                yum_help     $MISSING_DEPENDENCY ;;
14854	port)
14855                port_help    $MISSING_DEPENDENCY ;;
14856	pkgutil)
14857                pkgutil_help $MISSING_DEPENDENCY ;;
14858	pkgadd)
14859                pkgadd_help  $MISSING_DEPENDENCY ;;
14860    * )
14861      break ;;
14862    esac
14863
14864    if test "x$PKGHANDLER_COMMAND" != x; then
14865        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
14866    fi
14867
14868  { $as_echo "$as_me:$LINENO: Could not find a valid Boot JDK. $HELP_MSG" >&5
14869$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
14870  { $as_echo "$as_me:$LINENO: This might be fixed by explicitely setting --with-boot-jdk" >&5
14871$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14872  { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
14873$as_echo "$as_me: error: Cannot continue" >&2;}
14874   { (exit 1); exit 1; }; }
14875fi
14876
14877# Setup proper paths for what we found
14878BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
14879if test ! -f "$BOOT_RTJAR"; then
14880    # On MacOSX it is called classes.jar
14881    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
14882    if test -f "$BOOT_RTJAR"; then
14883      # Remove the ..
14884      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
14885    fi
14886fi
14887BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
14888BOOT_JDK="$BOOT_JDK"
14889
14890
14891
14892
14893# Setup tools from the Boot JDK.
14894
14895  { $as_echo "$as_me:$LINENO: checking for java in Boot JDK" >&5
14896$as_echo_n "checking for java in Boot JDK... " >&6; }
14897  JAVA=$BOOT_JDK/bin/java
14898  if test ! -x $JAVA; then
14899      { $as_echo "$as_me:$LINENO: result: not found" >&5
14900$as_echo "not found" >&6; }
14901      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14902$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14903      { { $as_echo "$as_me:$LINENO: error: Could not find java in the Boot JDK" >&5
14904$as_echo "$as_me: error: Could not find java in the Boot JDK" >&2;}
14905   { (exit 1); exit 1; }; }
14906  fi
14907  { $as_echo "$as_me:$LINENO: result: ok" >&5
14908$as_echo "ok" >&6; }
14909
14910
14911  { $as_echo "$as_me:$LINENO: checking for javac in Boot JDK" >&5
14912$as_echo_n "checking for javac in Boot JDK... " >&6; }
14913  JAVAC=$BOOT_JDK/bin/javac
14914  if test ! -x $JAVAC; then
14915      { $as_echo "$as_me:$LINENO: result: not found" >&5
14916$as_echo "not found" >&6; }
14917      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14918$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14919      { { $as_echo "$as_me:$LINENO: error: Could not find javac in the Boot JDK" >&5
14920$as_echo "$as_me: error: Could not find javac in the Boot JDK" >&2;}
14921   { (exit 1); exit 1; }; }
14922  fi
14923  { $as_echo "$as_me:$LINENO: result: ok" >&5
14924$as_echo "ok" >&6; }
14925
14926
14927  { $as_echo "$as_me:$LINENO: checking for javah in Boot JDK" >&5
14928$as_echo_n "checking for javah in Boot JDK... " >&6; }
14929  JAVAH=$BOOT_JDK/bin/javah
14930  if test ! -x $JAVAH; then
14931      { $as_echo "$as_me:$LINENO: result: not found" >&5
14932$as_echo "not found" >&6; }
14933      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14934$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14935      { { $as_echo "$as_me:$LINENO: error: Could not find javah in the Boot JDK" >&5
14936$as_echo "$as_me: error: Could not find javah in the Boot JDK" >&2;}
14937   { (exit 1); exit 1; }; }
14938  fi
14939  { $as_echo "$as_me:$LINENO: result: ok" >&5
14940$as_echo "ok" >&6; }
14941
14942
14943  { $as_echo "$as_me:$LINENO: checking for javap in Boot JDK" >&5
14944$as_echo_n "checking for javap in Boot JDK... " >&6; }
14945  JAVAP=$BOOT_JDK/bin/javap
14946  if test ! -x $JAVAP; then
14947      { $as_echo "$as_me:$LINENO: result: not found" >&5
14948$as_echo "not found" >&6; }
14949      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14950$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14951      { { $as_echo "$as_me:$LINENO: error: Could not find javap in the Boot JDK" >&5
14952$as_echo "$as_me: error: Could not find javap in the Boot JDK" >&2;}
14953   { (exit 1); exit 1; }; }
14954  fi
14955  { $as_echo "$as_me:$LINENO: result: ok" >&5
14956$as_echo "ok" >&6; }
14957
14958
14959  { $as_echo "$as_me:$LINENO: checking for jar in Boot JDK" >&5
14960$as_echo_n "checking for jar in Boot JDK... " >&6; }
14961  JAR=$BOOT_JDK/bin/jar
14962  if test ! -x $JAR; then
14963      { $as_echo "$as_me:$LINENO: result: not found" >&5
14964$as_echo "not found" >&6; }
14965      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14966$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14967      { { $as_echo "$as_me:$LINENO: error: Could not find jar in the Boot JDK" >&5
14968$as_echo "$as_me: error: Could not find jar in the Boot JDK" >&2;}
14969   { (exit 1); exit 1; }; }
14970  fi
14971  { $as_echo "$as_me:$LINENO: result: ok" >&5
14972$as_echo "ok" >&6; }
14973
14974
14975  { $as_echo "$as_me:$LINENO: checking for rmic in Boot JDK" >&5
14976$as_echo_n "checking for rmic in Boot JDK... " >&6; }
14977  RMIC=$BOOT_JDK/bin/rmic
14978  if test ! -x $RMIC; then
14979      { $as_echo "$as_me:$LINENO: result: not found" >&5
14980$as_echo "not found" >&6; }
14981      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14982$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14983      { { $as_echo "$as_me:$LINENO: error: Could not find rmic in the Boot JDK" >&5
14984$as_echo "$as_me: error: Could not find rmic in the Boot JDK" >&2;}
14985   { (exit 1); exit 1; }; }
14986  fi
14987  { $as_echo "$as_me:$LINENO: result: ok" >&5
14988$as_echo "ok" >&6; }
14989
14990
14991  { $as_echo "$as_me:$LINENO: checking for native2ascii in Boot JDK" >&5
14992$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
14993  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
14994  if test ! -x $NATIVE2ASCII; then
14995      { $as_echo "$as_me:$LINENO: result: not found" >&5
14996$as_echo "not found" >&6; }
14997      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14998$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14999      { { $as_echo "$as_me:$LINENO: error: Could not find native2ascii in the Boot JDK" >&5
15000$as_echo "$as_me: error: Could not find native2ascii in the Boot JDK" >&2;}
15001   { (exit 1); exit 1; }; }
15002  fi
15003  { $as_echo "$as_me:$LINENO: result: ok" >&5
15004$as_echo "ok" >&6; }
15005
15006
15007# Finally, set some other options...
15008
15009# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15010BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15011
15012
15013
15014
15015##############################################################################
15016#
15017# Specify options for anything that is run with the Boot JDK.
15018#
15019
15020# Check whether --with-boot-jdk-jvmargs was given.
15021if test "${with_boot_jdk_jvmargs+set}" = set; then
15022  withval=$with_boot_jdk_jvmargs;
15023fi
15024
15025
15026if test "x$with_boot_jdk_jvmargs" = x; then
15027    # Not all JVM:s accept the same arguments on the command line.
15028    # OpenJDK specific increase in thread stack for JDK build,
15029    # well more specifically, when running javac.
15030    if test "x$BUILD_NUM_BITS" = x32; then
15031       STACK_SIZE=768
15032    else
15033       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15034       # since 64-bit pointers are pushed on the stach. Apparently, we need
15035       # to increase the stack space when javacing the JDK....
15036       STACK_SIZE=1536
15037    fi
15038
15039    # Minimum amount of heap memory.
15040
15041    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15042    # If so, then append -Xms64M to boot_jdk_jvmargs
15043    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15044    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15045    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15046        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15047    fi
15048
15049    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15050        # Why does macosx need more heap? Its the huge JDK batch.
15051
15052    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15053    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15054    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15055    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15056    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15057        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15058    fi
15059
15060    else
15061
15062    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15063    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15064    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15065    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15066    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15067        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15068    fi
15069
15070    fi
15071    # When is adding -client something that speeds up the JVM?
15072    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15073
15074    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15075    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15076    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15077    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15078    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15079        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15080    fi
15081
15082
15083    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15084    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15085    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15086    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15087    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15088        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15089    fi
15090
15091
15092    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15093    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15094    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15095    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15096    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15097        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15098    fi
15099
15100    # Disable special log output when a debug build is used as Boot JDK...
15101
15102    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15103    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15104    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15105    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15106    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15107        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15108    fi
15109
15110fi
15111
15112BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15113
15114
15115
15116###############################################################################
15117#
15118# Configure the sources to use. We can add or override individual directories.
15119#
15120###############################################################################
15121
15122
15123
15124# Where are the sources. Any of these can be overridden
15125# using --with-override-corba and the likes.
15126LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15127CORBA_TOPDIR="$SRC_ROOT/corba"
15128JAXP_TOPDIR="$SRC_ROOT/jaxp"
15129JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15130HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15131JDK_TOPDIR="$SRC_ROOT/jdk"
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141###############################################################################
15142#
15143# Pickup additional source for a component from outside of the source root
15144# or override source for a component.
15145#
15146
15147# Check whether --with-add-source-root was given.
15148if test "${with_add_source_root+set}" = set; then
15149  withval=$with_add_source_root;
15150fi
15151
15152
15153
15154# Check whether --with-override-source-root was given.
15155if test "${with_override_source_root+set}" = set; then
15156  withval=$with_override_source_root;
15157fi
15158
15159
15160
15161# Check whether --with-adds-and-overrides was given.
15162if test "${with_adds_and_overrides+set}" = set; then
15163  withval=$with_adds_and_overrides;
15164fi
15165
15166
15167if test "x$with_adds_and_overrides" != x; then
15168    with_add_source_root="$with_adds_and_overrides/adds"
15169    with_override_source_root="$with_adds_and_overrides/overrides"
15170fi
15171
15172if test "x$with_add_source_root" != x; then
15173    if ! test -d $with_add_source_root; then
15174       { { $as_echo "$as_me:$LINENO: error: Trying to use a non-existant add-source-root $with_add_source_root" >&5
15175$as_echo "$as_me: error: Trying to use a non-existant add-source-root $with_add_source_root" >&2;}
15176   { (exit 1); exit 1; }; }
15177    fi
15178    CURDIR="$PWD"
15179    cd "$with_add_source_root"
15180    ADD_SRC_ROOT="`pwd`"
15181    cd "$CURDIR"
15182    # Verify that the addon source root does not have any root makefiles.
15183    # If it does, then it is usually an error, prevent this.
15184    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15185       test -f $with_add_source_root/langtools/make/Makefile; then
15186        { { $as_echo "$as_me:$LINENO: error: Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." >&5
15187$as_echo "$as_me: error: Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." >&2;}
15188   { (exit 1); exit 1; }; }
15189    fi
15190    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15191       test -f $with_add_source_root/corba/make/Makefile; then
15192        { { $as_echo "$as_me:$LINENO: error: Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." >&5
15193$as_echo "$as_me: error: Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." >&2;}
15194   { (exit 1); exit 1; }; }
15195    fi
15196    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15197       test -f $with_add_source_root/jaxp/make/Makefile; then
15198        { { $as_echo "$as_me:$LINENO: error: Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." >&5
15199$as_echo "$as_me: error: Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." >&2;}
15200   { (exit 1); exit 1; }; }
15201    fi
15202    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15203       test -f $with_add_source_root/jaxws/make/Makefile; then
15204        { { $as_echo "$as_me:$LINENO: error: Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." >&5
15205$as_echo "$as_me: error: Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." >&2;}
15206   { (exit 1); exit 1; }; }
15207    fi
15208    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15209       test -f $with_add_source_root/hotspot/make/Makefile; then
15210        { { $as_echo "$as_me:$LINENO: error: Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." >&5
15211$as_echo "$as_me: error: Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." >&2;}
15212   { (exit 1); exit 1; }; }
15213    fi
15214    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15215       test -f $with_add_source_root/jdk/make/Makefile; then
15216        { { $as_echo "$as_me:$LINENO: error: Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." >&5
15217$as_echo "$as_me: error: Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." >&2;}
15218   { (exit 1); exit 1; }; }
15219    fi
15220fi
15221
15222
15223if test "x$with_override_source_root" != x; then
15224    if ! test -d $with_override_source_root; then
15225       { { $as_echo "$as_me:$LINENO: error: Trying to use a non-existant override-source-root $with_override_source_root" >&5
15226$as_echo "$as_me: error: Trying to use a non-existant override-source-root $with_override_source_root" >&2;}
15227   { (exit 1); exit 1; }; }
15228    fi
15229    CURDIR="$PWD"
15230    cd "$with_override_source_root"
15231    OVERRIDE_SRC_ROOT="`pwd`"
15232    cd "$CURDIR"
15233    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15234       test -f $with_override_source_root/langtools/make/Makefile; then
15235        { { $as_echo "$as_me:$LINENO: error: Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." >&5
15236$as_echo "$as_me: error: Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." >&2;}
15237   { (exit 1); exit 1; }; }
15238    fi
15239    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15240       test -f $with_override_source_root/corba/make/Makefile; then
15241        { { $as_echo "$as_me:$LINENO: error: Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." >&5
15242$as_echo "$as_me: error: Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." >&2;}
15243   { (exit 1); exit 1; }; }
15244    fi
15245    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15246       test -f $with_override_source_root/jaxp/make/Makefile; then
15247        { { $as_echo "$as_me:$LINENO: error: Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." >&5
15248$as_echo "$as_me: error: Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." >&2;}
15249   { (exit 1); exit 1; }; }
15250    fi
15251    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15252       test -f $with_override_source_root/jaxws/make/Makefile; then
15253        { { $as_echo "$as_me:$LINENO: error: Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." >&5
15254$as_echo "$as_me: error: Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." >&2;}
15255   { (exit 1); exit 1; }; }
15256    fi
15257    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15258       test -f $with_override_source_root/hotspot/make/Makefile; then
15259        { { $as_echo "$as_me:$LINENO: error: Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." >&5
15260$as_echo "$as_me: error: Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." >&2;}
15261   { (exit 1); exit 1; }; }
15262    fi
15263    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15264       test -f $with_override_source_root/jdk/make/Makefile; then
15265        { { $as_echo "$as_me:$LINENO: error: Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." >&5
15266$as_echo "$as_me: error: Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." >&2;}
15267   { (exit 1); exit 1; }; }
15268    fi
15269fi
15270
15271
15272###############################################################################
15273#
15274# Override a repo completely, this is used for example when you have 3 small
15275# development sandboxes of the langtools sources and want to avoid having 3 full
15276# OpenJDK sources checked out on disk.
15277#
15278# Assuming that the 3 langtools sandboxes are located here:
15279# /home/fredrik/sandbox1/langtools
15280# /home/fredrik/sandbox2/langtools
15281# /home/fredrik/sandbox3/langtools
15282#
15283# From the source root you create build subdirs manually:
15284#     mkdir -p build1 build2 build3
15285# in each build directory run:
15286#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15287#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15288#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15289#
15290
15291
15292# Check whether --with-override-langtools was given.
15293if test "${with_override_langtools+set}" = set; then
15294  withval=$with_override_langtools;
15295fi
15296
15297
15298
15299# Check whether --with-override-corba was given.
15300if test "${with_override_corba+set}" = set; then
15301  withval=$with_override_corba;
15302fi
15303
15304
15305
15306# Check whether --with-override-jaxp was given.
15307if test "${with_override_jaxp+set}" = set; then
15308  withval=$with_override_jaxp;
15309fi
15310
15311
15312
15313# Check whether --with-override-jaxws was given.
15314if test "${with_override_jaxws+set}" = set; then
15315  withval=$with_override_jaxws;
15316fi
15317
15318
15319
15320# Check whether --with-override-hotspot was given.
15321if test "${with_override_hotspot+set}" = set; then
15322  withval=$with_override_hotspot;
15323fi
15324
15325
15326
15327# Check whether --with-override-jdk was given.
15328if test "${with_override_jdk+set}" = set; then
15329  withval=$with_override_jdk;
15330fi
15331
15332
15333if test "x$with_override_langtools" != x; then
15334    CURDIR="$PWD"
15335    cd "$with_override_langtools"
15336    LANGTOOLS_TOPDIR="`pwd`"
15337    cd "$CURDIR"
15338    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15339        { { $as_echo "$as_me:$LINENO: error: You have to override langtools with a full langtools repo!" >&5
15340$as_echo "$as_me: error: You have to override langtools with a full langtools repo!" >&2;}
15341   { (exit 1); exit 1; }; }
15342    fi
15343    { $as_echo "$as_me:$LINENO: checking if langtools should be overridden" >&5
15344$as_echo_n "checking if langtools should be overridden... " >&6; }
15345    { $as_echo "$as_me:$LINENO: result: yes with $LANGTOOLS_TOPDIR" >&5
15346$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15347fi
15348if test "x$with_override_corba" != x; then
15349    CURDIR="$PWD"
15350    cd "$with_override_corba"
15351    CORBA_TOPDIR="`pwd`"
15352    cd "$CURDIR"
15353    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15354        { { $as_echo "$as_me:$LINENO: error: You have to override corba with a full corba repo!" >&5
15355$as_echo "$as_me: error: You have to override corba with a full corba repo!" >&2;}
15356   { (exit 1); exit 1; }; }
15357    fi
15358    { $as_echo "$as_me:$LINENO: checking if corba should be overridden" >&5
15359$as_echo_n "checking if corba should be overridden... " >&6; }
15360    { $as_echo "$as_me:$LINENO: result: yes with $CORBA_TOPDIR" >&5
15361$as_echo "yes with $CORBA_TOPDIR" >&6; }
15362fi
15363if test "x$with_override_jaxp" != x; then
15364    CURDIR="$PWD"
15365    cd "$with_override_jaxp"
15366    JAXP_TOPDIR="`pwd`"
15367    cd "$CURDIR"
15368    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15369        { { $as_echo "$as_me:$LINENO: error: You have to override jaxp with a full jaxp repo!" >&5
15370$as_echo "$as_me: error: You have to override jaxp with a full jaxp repo!" >&2;}
15371   { (exit 1); exit 1; }; }
15372    fi
15373    { $as_echo "$as_me:$LINENO: checking if jaxp should be overridden" >&5
15374$as_echo_n "checking if jaxp should be overridden... " >&6; }
15375    { $as_echo "$as_me:$LINENO: result: yes with $JAXP_TOPDIR" >&5
15376$as_echo "yes with $JAXP_TOPDIR" >&6; }
15377fi
15378if test "x$with_override_jaxws" != x; then
15379    CURDIR="$PWD"
15380    cd "$with_override_jaxws"
15381    JAXWS_TOPDIR="`pwd`"
15382    cd "$CURDIR"
15383    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15384        { { $as_echo "$as_me:$LINENO: error: You have to override jaxws with a full jaxws repo!" >&5
15385$as_echo "$as_me: error: You have to override jaxws with a full jaxws repo!" >&2;}
15386   { (exit 1); exit 1; }; }
15387    fi
15388    { $as_echo "$as_me:$LINENO: checking if jaxws should be overridden" >&5
15389$as_echo_n "checking if jaxws should be overridden... " >&6; }
15390    { $as_echo "$as_me:$LINENO: result: yes with $JAXWS_TOPDIR" >&5
15391$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15392fi
15393if test "x$with_override_hotspot" != x; then
15394    CURDIR="$PWD"
15395    cd "$with_override_hotspot"
15396    HOTSPOT_TOPDIR="`pwd`"
15397    cd "$CURDIR"
15398    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15399       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15400        { { $as_echo "$as_me:$LINENO: error: You have to override hotspot with a full hotspot repo!" >&5
15401$as_echo "$as_me: error: You have to override hotspot with a full hotspot repo!" >&2;}
15402   { (exit 1); exit 1; }; }
15403    fi
15404    { $as_echo "$as_me:$LINENO: checking if hotspot should be overridden" >&5
15405$as_echo_n "checking if hotspot should be overridden... " >&6; }
15406    { $as_echo "$as_me:$LINENO: result: yes with $HOTSPOT_TOPDIR" >&5
15407$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15408fi
15409if test "x$with_override_jdk" != x; then
15410    CURDIR="$PWD"
15411    cd "$with_override_jdk"
15412    JDK_TOPDIR="`pwd`"
15413    cd "$CURDIR"
15414    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15415        { { $as_echo "$as_me:$LINENO: error: You have to override JDK with a full JDK repo!" >&5
15416$as_echo "$as_me: error: You have to override JDK with a full JDK repo!" >&2;}
15417   { (exit 1); exit 1; }; }
15418    fi
15419    { $as_echo "$as_me:$LINENO: checking if JDK should be overridden" >&5
15420$as_echo_n "checking if JDK should be overridden... " >&6; }
15421    { $as_echo "$as_me:$LINENO: result: yes with $JDK_TOPDIR" >&5
15422$as_echo "yes with $JDK_TOPDIR" >&6; }
15423fi
15424
15425
15426
15427BUILD_OUTPUT="$OUTPUT_ROOT"
15428
15429
15430HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15431BUILD_HOTSPOT=true
15432
15433
15434
15435# Check whether --with-import-hotspot was given.
15436if test "${with_import_hotspot+set}" = set; then
15437  withval=$with_import_hotspot;
15438fi
15439
15440if test "x$with_import_hotspot" != x; then
15441    CURDIR="$PWD"
15442    cd "$with_import_hotspot"
15443    HOTSPOT_DIST="`pwd`"
15444    cd "$CURDIR"
15445    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15446        { { $as_echo "$as_me:$LINENO: error: You have to import hotspot from a full jdk image or hotspot build dist dir!" >&5
15447$as_echo "$as_me: error: You have to import hotspot from a full jdk image or hotspot build dist dir!" >&2;}
15448   { (exit 1); exit 1; }; }
15449    fi
15450    { $as_echo "$as_me:$LINENO: checking if hotspot should be imported" >&5
15451$as_echo_n "checking if hotspot should be imported... " >&6; }
15452    { $as_echo "$as_me:$LINENO: result: yes from $HOTSPOT_DIST" >&5
15453$as_echo "yes from $HOTSPOT_DIST" >&6; }
15454    BUILD_HOTSPOT=false
15455fi
15456
15457JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15458
15459
15460###############################################################################
15461#
15462# Setup the toolchain (compilers etc), i.e. the tools that need to be
15463# cross-compilation aware.
15464#
15465###############################################################################
15466
15467
15468###############################################################################
15469#
15470# Configure the development tool paths and potential sysroot.
15471#
15472ac_ext=cpp
15473ac_cpp='$CXXCPP $CPPFLAGS'
15474ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15475ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15476ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15477
15478
15479# The option used to specify the target .o,.a or .so file.
15480# When compiling, how to specify the to be created object file.
15481CC_OUT_OPTION='-o$(SPACE)'
15482# When linking, how to specify the to be created executable.
15483EXE_OUT_OPTION='-o$(SPACE)'
15484# When linking, how to specify the to be created dynamically linkable library.
15485LD_OUT_OPTION='-o$(SPACE)'
15486# When archiving, how to specify the to be create static archive for object files.
15487AR_OUT_OPTION='rcs$(SPACE)'
15488
15489
15490
15491
15492
15493# Locate the actual tools
15494
15495if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15496
15497  # Store path to cygwin link.exe to help excluding it when searching for
15498  # VS linker. This must be done before changing the PATH when looking for VS.
15499  # Extract the first word of "link", so it can be a program name with args.
15500set dummy link; ac_word=$2
15501{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15502$as_echo_n "checking for $ac_word... " >&6; }
15503if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then
15504  $as_echo_n "(cached) " >&6
15505else
15506  case $CYGWIN_LINK in
15507  [\\/]* | ?:[\\/]*)
15508  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15509  ;;
15510  *)
15511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15512for as_dir in $PATH
15513do
15514  IFS=$as_save_IFS
15515  test -z "$as_dir" && as_dir=.
15516  for ac_exec_ext in '' $ac_executable_extensions; do
15517  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15518    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15519    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15520    break 2
15521  fi
15522done
15523done
15524IFS=$as_save_IFS
15525
15526  ;;
15527esac
15528fi
15529CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15530if test -n "$CYGWIN_LINK"; then
15531  { $as_echo "$as_me:$LINENO: result: $CYGWIN_LINK" >&5
15532$as_echo "$CYGWIN_LINK" >&6; }
15533else
15534  { $as_echo "$as_me:$LINENO: result: no" >&5
15535$as_echo "no" >&6; }
15536fi
15537
15538
15539  if test "x$CYGWIN_LINK" != x; then
15540    { $as_echo "$as_me:$LINENO: checking if the first found link.exe is actually the Cygwin link tool" >&5
15541$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15542    "$CYGWIN_LINK" --version > /dev/null
15543    if test $? -eq 0 ; then
15544      { $as_echo "$as_me:$LINENO: result: yes" >&5
15545$as_echo "yes" >&6; }
15546    else
15547      { $as_echo "$as_me:$LINENO: result: no" >&5
15548$as_echo "no" >&6; }
15549      # This might be the VS linker. Don't exclude it later on.
15550      CYGWIN_LINK=""
15551    fi
15552  fi
15553
15554  # First-hand choice is to locate and run the vsvars bat file.
15555
15556  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15557    VCVARSFILE="vc/bin/vcvars32.bat"
15558  else
15559    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15560  fi
15561
15562  VS_ENV_CMD=""
15563  VS_ENV_ARGS=""
15564  if test "x$with_toolsdir" != x; then
15565
15566  if test "x$VS_ENV_CMD" = x; then
15567    VS100BASE="$with_toolsdir/../.."
15568    METHOD="--with-tools-dir"
15569
15570  windows_path="$VS100BASE"
15571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15572    unix_path=`$CYGPATH -u "$windows_path"`
15573    VS100BASE="$unix_path"
15574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15576    VS100BASE="$unix_path"
15577  fi
15578
15579    if test -d "$VS100BASE"; then
15580      if test -f "$VS100BASE/$VCVARSFILE"; then
15581        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15582$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15583        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15584      else
15585        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15586$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15587        { $as_echo "$as_me:$LINENO: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15588$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15589      fi
15590    fi
15591  fi
15592
15593  fi
15594
15595  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
15596    # Having specified an argument which is incorrect will produce an instant failure;
15597    # we should not go on looking
15598    { $as_echo "$as_me:$LINENO: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
15599$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
15600    { $as_echo "$as_me:$LINENO: Please point to the VC/bin directory within the Visual Studio installation" >&5
15601$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
15602    { { $as_echo "$as_me:$LINENO: error: Cannot locate a valid Visual Studio installation" >&5
15603$as_echo "$as_me: error: Cannot locate a valid Visual Studio installation" >&2;}
15604   { (exit 1); exit 1; }; }
15605  fi
15606
15607  if test "x$ProgramW6432" != x; then
15608
15609  if test "x$VS_ENV_CMD" = x; then
15610    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
15611    METHOD="well-known name"
15612
15613  windows_path="$WIN_SDK_BASE"
15614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15615    unix_path=`$CYGPATH -u "$windows_path"`
15616    WIN_SDK_BASE="$unix_path"
15617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15619    WIN_SDK_BASE="$unix_path"
15620  fi
15621
15622    if test -d "$WIN_SDK_BASE"; then
15623      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15624        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15625$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15626        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15627        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15628          VS_ENV_ARGS="/x86"
15629        else
15630          VS_ENV_ARGS="/x64"
15631        fi
15632      else
15633        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15634$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15635        { $as_echo "$as_me:$LINENO: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15636$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15637      fi
15638    fi
15639  fi
15640
15641  fi
15642  if test "x$PROGRAMW6432" != x; then
15643
15644  if test "x$VS_ENV_CMD" = x; then
15645    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
15646    METHOD="well-known name"
15647
15648  windows_path="$WIN_SDK_BASE"
15649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15650    unix_path=`$CYGPATH -u "$windows_path"`
15651    WIN_SDK_BASE="$unix_path"
15652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15654    WIN_SDK_BASE="$unix_path"
15655  fi
15656
15657    if test -d "$WIN_SDK_BASE"; then
15658      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15659        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15660$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15661        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15662        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15663          VS_ENV_ARGS="/x86"
15664        else
15665          VS_ENV_ARGS="/x64"
15666        fi
15667      else
15668        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15669$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15670        { $as_echo "$as_me:$LINENO: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15671$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15672      fi
15673    fi
15674  fi
15675
15676  fi
15677  if test "x$PROGRAMFILES" != x; then
15678
15679  if test "x$VS_ENV_CMD" = x; then
15680    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
15681    METHOD="well-known name"
15682
15683  windows_path="$WIN_SDK_BASE"
15684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15685    unix_path=`$CYGPATH -u "$windows_path"`
15686    WIN_SDK_BASE="$unix_path"
15687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15689    WIN_SDK_BASE="$unix_path"
15690  fi
15691
15692    if test -d "$WIN_SDK_BASE"; then
15693      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15694        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15695$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15696        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15697        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15698          VS_ENV_ARGS="/x86"
15699        else
15700          VS_ENV_ARGS="/x64"
15701        fi
15702      else
15703        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15704$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15705        { $as_echo "$as_me:$LINENO: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15706$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15707      fi
15708    fi
15709  fi
15710
15711  fi
15712
15713  if test "x$VS_ENV_CMD" = x; then
15714    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
15715    METHOD="well-known name"
15716
15717  windows_path="$WIN_SDK_BASE"
15718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15719    unix_path=`$CYGPATH -u "$windows_path"`
15720    WIN_SDK_BASE="$unix_path"
15721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15723    WIN_SDK_BASE="$unix_path"
15724  fi
15725
15726    if test -d "$WIN_SDK_BASE"; then
15727      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15728        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15729$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15730        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15731        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15732          VS_ENV_ARGS="/x86"
15733        else
15734          VS_ENV_ARGS="/x64"
15735        fi
15736      else
15737        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15738$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15739        { $as_echo "$as_me:$LINENO: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15740$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15741      fi
15742    fi
15743  fi
15744
15745
15746  if test "x$VS_ENV_CMD" = x; then
15747    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
15748    METHOD="well-known name"
15749
15750  windows_path="$WIN_SDK_BASE"
15751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15752    unix_path=`$CYGPATH -u "$windows_path"`
15753    WIN_SDK_BASE="$unix_path"
15754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15756    WIN_SDK_BASE="$unix_path"
15757  fi
15758
15759    if test -d "$WIN_SDK_BASE"; then
15760      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15761        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15762$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15763        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15764        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15765          VS_ENV_ARGS="/x86"
15766        else
15767          VS_ENV_ARGS="/x64"
15768        fi
15769      else
15770        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15771$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15772        { $as_echo "$as_me:$LINENO: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15773$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15774      fi
15775    fi
15776  fi
15777
15778
15779  if test "x$VS100COMNTOOLS" != x; then
15780
15781  if test "x$VS_ENV_CMD" = x; then
15782    VS100BASE="$VS100COMNTOOLS/../.."
15783    METHOD="VS100COMNTOOLS variable"
15784
15785  windows_path="$VS100BASE"
15786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15787    unix_path=`$CYGPATH -u "$windows_path"`
15788    VS100BASE="$unix_path"
15789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15791    VS100BASE="$unix_path"
15792  fi
15793
15794    if test -d "$VS100BASE"; then
15795      if test -f "$VS100BASE/$VCVARSFILE"; then
15796        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15797$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15798        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15799      else
15800        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15801$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15802        { $as_echo "$as_me:$LINENO: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15803$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15804      fi
15805    fi
15806  fi
15807
15808  fi
15809  if test "x$PROGRAMFILES" != x; then
15810
15811  if test "x$VS_ENV_CMD" = x; then
15812    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
15813    METHOD="well-known name"
15814
15815  windows_path="$VS100BASE"
15816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15817    unix_path=`$CYGPATH -u "$windows_path"`
15818    VS100BASE="$unix_path"
15819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15821    VS100BASE="$unix_path"
15822  fi
15823
15824    if test -d "$VS100BASE"; then
15825      if test -f "$VS100BASE/$VCVARSFILE"; then
15826        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15827$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15828        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15829      else
15830        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15831$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15832        { $as_echo "$as_me:$LINENO: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15833$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15834      fi
15835    fi
15836  fi
15837
15838  fi
15839
15840  if test "x$VS_ENV_CMD" = x; then
15841    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
15842    METHOD="well-known name"
15843
15844  windows_path="$VS100BASE"
15845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15846    unix_path=`$CYGPATH -u "$windows_path"`
15847    VS100BASE="$unix_path"
15848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15850    VS100BASE="$unix_path"
15851  fi
15852
15853    if test -d "$VS100BASE"; then
15854      if test -f "$VS100BASE/$VCVARSFILE"; then
15855        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15856$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15857        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15858      else
15859        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15860$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15861        { $as_echo "$as_me:$LINENO: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15862$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15863      fi
15864    fi
15865  fi
15866
15867
15868  if test "x$VS_ENV_CMD" = x; then
15869    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
15870    METHOD="well-known name"
15871
15872  windows_path="$VS100BASE"
15873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15874    unix_path=`$CYGPATH -u "$windows_path"`
15875    VS100BASE="$unix_path"
15876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15878    VS100BASE="$unix_path"
15879  fi
15880
15881    if test -d "$VS100BASE"; then
15882      if test -f "$VS100BASE/$VCVARSFILE"; then
15883        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15884$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15885        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15886      else
15887        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15888$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15889        { $as_echo "$as_me:$LINENO: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15890$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15891      fi
15892    fi
15893  fi
15894
15895
15896  if test "x$VS_ENV_CMD" != x; then
15897    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
15898
15899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15900
15901  # First separate the path from the arguments. This will split at the first
15902  # space.
15903  complete="$VS_ENV_CMD"
15904  path="${complete%% *}"
15905  tmp="$complete EOL"
15906  arguments="${tmp#* }"
15907
15908  # Input might be given as Windows format, start by converting to
15909  # unix format.
15910  new_path=`$CYGPATH -u "$path"`
15911
15912  # Now try to locate executable using which
15913  new_path=`$WHICH "$new_path" 2> /dev/null`
15914  # bat and cmd files are not always considered executable in cygwin causing which
15915  # to not find them
15916  if test "x$new_path" = x \
15917           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15918           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15919    new_path=`$CYGPATH -u "$path"`
15920  fi
15921  if test "x$new_path" = x; then
15922    # Oops. Which didn't find the executable.
15923    # The splitting of arguments from the executable at a space might have been incorrect,
15924    # since paths with space are more likely in Windows. Give it another try with the whole
15925    # argument.
15926    path="$complete"
15927    arguments="EOL"
15928    new_path=`$CYGPATH -u "$path"`
15929    new_path=`$WHICH "$new_path" 2> /dev/null`
15930    # bat and cmd files are not always considered executable in cygwin causing which
15931    # to not find them
15932    if test "x$new_path" = x \
15933             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15934             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15935      new_path=`$CYGPATH -u "$path"`
15936    fi
15937    if test "x$new_path" = x; then
15938      # It's still not found. Now this is an unrecoverable error.
15939      { $as_echo "$as_me:$LINENO: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
15940$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
15941      has_space=`$ECHO "$complete" | $GREP " "`
15942      if test "x$has_space" != x; then
15943        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15945      fi
15946      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of VS_ENV_CMD" >&5
15947$as_echo "$as_me: error: Cannot locate the the path of VS_ENV_CMD" >&2;}
15948   { (exit 1); exit 1; }; }
15949    fi
15950  fi
15951
15952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15955  # "foo.exe" is OK but "foo" is an error.
15956  #
15957  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15958  # It is also a way to make sure we got the proper file name for the real test later on.
15959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15960  if test "x$test_shortpath" = x; then
15961    # Short path failed, file does not exist as specified.
15962    # Try adding .exe or .cmd
15963    if test -f "${new_path}.exe"; then
15964       input_to_shortpath="${new_path}.exe"
15965    elif test -f "${new_path}.cmd"; then
15966       input_to_shortpath="${new_path}.cmd"
15967    else
15968      { $as_echo "$as_me:$LINENO: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
15969$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
15970      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15971$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15972      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of VS_ENV_CMD" >&5
15973$as_echo "$as_me: error: Cannot locate the the path of VS_ENV_CMD" >&2;}
15974   { (exit 1); exit 1; }; }
15975    fi
15976  else
15977    input_to_shortpath="$new_path"
15978  fi
15979
15980  # Call helper function which possibly converts this using DOS-style short mode.
15981  # If so, the updated path is stored in $new_path.
15982  new_path="$input_to_shortpath"
15983
15984  input_path="$input_to_shortpath"
15985  # Check if we need to convert this using DOS-style short mode. If the path
15986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15987  # take no chances and rewrite it.
15988  # Note: m4 eats our [], so we need to use [ and ] instead.
15989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15990  if test "x$has_forbidden_chars" != x; then
15991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15995      # Going to short mode and back again did indeed matter. Since short mode is
15996      # case insensitive, let's make it lowercase to improve readability.
15997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15998      # Now convert it back to Unix-stile (cygpath)
15999      input_path=`$CYGPATH -u "$shortmode_path"`
16000      new_path="$input_path"
16001    fi
16002  fi
16003
16004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16005  if test "x$test_cygdrive_prefix" = x; then
16006    # As a simple fix, exclude /usr/bin since it's not a real path.
16007    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16009      # a path prefixed by /cygdrive for fixpath to work.
16010      new_path="$CYGWIN_ROOT_PATH$input_path"
16011    fi
16012  fi
16013
16014  # remove trailing .exe if any
16015  new_path="${new_path/%.exe/}"
16016
16017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16018
16019  # First separate the path from the arguments. This will split at the first
16020  # space.
16021  complete="$VS_ENV_CMD"
16022  path="${complete%% *}"
16023  tmp="$complete EOL"
16024  arguments="${tmp#* }"
16025
16026  # Input might be given as Windows format, start by converting to
16027  # unix format.
16028  new_path="$path"
16029
16030  windows_path="$new_path"
16031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16032    unix_path=`$CYGPATH -u "$windows_path"`
16033    new_path="$unix_path"
16034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16036    new_path="$unix_path"
16037  fi
16038
16039
16040  # Now try to locate executable using which
16041  new_path=`$WHICH "$new_path" 2> /dev/null`
16042
16043  if test "x$new_path" = x; then
16044    # Oops. Which didn't find the executable.
16045    # The splitting of arguments from the executable at a space might have been incorrect,
16046    # since paths with space are more likely in Windows. Give it another try with the whole
16047    # argument.
16048    path="$complete"
16049    arguments="EOL"
16050    new_path="$path"
16051
16052  windows_path="$new_path"
16053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16054    unix_path=`$CYGPATH -u "$windows_path"`
16055    new_path="$unix_path"
16056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16058    new_path="$unix_path"
16059  fi
16060
16061
16062    new_path=`$WHICH "$new_path" 2> /dev/null`
16063
16064    if test "x$new_path" = x; then
16065      # It's still not found. Now this is an unrecoverable error.
16066      { $as_echo "$as_me:$LINENO: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16067$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16068      has_space=`$ECHO "$complete" | $GREP " "`
16069      if test "x$has_space" != x; then
16070        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16071$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16072      fi
16073      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of VS_ENV_CMD" >&5
16074$as_echo "$as_me: error: Cannot locate the the path of VS_ENV_CMD" >&2;}
16075   { (exit 1); exit 1; }; }
16076    fi
16077  fi
16078
16079  # Now new_path has a complete unix path to the binary
16080  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16081    # Keep paths in /bin as-is, but remove trailing .exe if any
16082    new_path="${new_path/%.exe/}"
16083    # Do not save /bin paths to all_fixpath_prefixes!
16084  else
16085    # Not in mixed or Windows style, start by that.
16086    new_path=`cmd //c echo $new_path`
16087
16088  input_path="$new_path"
16089  # Check if we need to convert this using DOS-style short mode. If the path
16090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16091  # take no chances and rewrite it.
16092  # Note: m4 eats our [], so we need to use [ and ] instead.
16093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16094  if test "x$has_forbidden_chars" != x; then
16095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16097  fi
16098
16099    # Output is in $new_path
16100
16101  windows_path="$new_path"
16102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16103    unix_path=`$CYGPATH -u "$windows_path"`
16104    new_path="$unix_path"
16105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16107    new_path="$unix_path"
16108  fi
16109
16110    # remove trailing .exe if any
16111    new_path="${new_path/%.exe/}"
16112
16113    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16114    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16115  fi
16116
16117  else
16118    # We're on a posix platform. Hooray! :)
16119    # First separate the path from the arguments. This will split at the first
16120    # space.
16121    complete="$VS_ENV_CMD"
16122    path="${complete%% *}"
16123    tmp="$complete EOL"
16124    arguments="${tmp#* }"
16125
16126    new_path=`$WHICH $path 2> /dev/null`
16127    if test "x$new_path" = x; then
16128      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16129      if test "x$is_absolute_path" != x; then
16130        { $as_echo "$as_me:$LINENO: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&5
16131$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&6;}
16132        new_path="$path"
16133      else
16134        { $as_echo "$as_me:$LINENO: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16135$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16136        has_space=`$ECHO "$complete" | $GREP " "`
16137        if test "x$has_space" != x; then
16138          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
16139$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16140        fi
16141        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of VS_ENV_CMD" >&5
16142$as_echo "$as_me: error: Cannot locate the the path of VS_ENV_CMD" >&2;}
16143   { (exit 1); exit 1; }; }
16144      fi
16145    fi
16146  fi
16147
16148  # Now join together the path and the arguments once again
16149  if test "x$arguments" != xEOL; then
16150      new_complete="$new_path ${arguments% *}"
16151  else
16152      new_complete="$new_path"
16153  fi
16154
16155  if test "x$complete" != "x$new_complete"; then
16156    VS_ENV_CMD="$new_complete"
16157    { $as_echo "$as_me:$LINENO: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16158$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16159  fi
16160
16161
16162    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16163    { $as_echo "$as_me:$LINENO: Trying to extract Visual Studio environment variables" >&5
16164$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16165    cd $OUTPUT_ROOT
16166    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16167    # to autoconf standards.
16168
16169    #----
16170
16171    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16172    # but calculate the difference in Cygwin environment before/after running it and then
16173    # apply the diff.
16174
16175    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16176      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16177      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16178      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16179    else
16180      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16181      _dosbash=`cmd //c echo \`which bash\``
16182    fi
16183
16184    # generate the set of exported vars before/after the vs10 setup
16185    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16186    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16187    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16188    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16189
16190    # Now execute the newly created bat file.
16191    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16192    cmd /c localdevenvtmp.bat | cat
16193
16194    # apply the diff (less some non-vs10 vars named by "!")
16195    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16196    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16197    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16198
16199    # cleanup
16200    $RM localdevenvtmp*
16201    #----
16202    cd $CURDIR
16203    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16204      { $as_echo "$as_me:$LINENO: result: no" >&5
16205$as_echo "no" >&6; }
16206      { $as_echo "$as_me:$LINENO: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16207$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16208      { $as_echo "$as_me:$LINENO: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16209$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16210      { $as_echo "$as_me:$LINENO: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16211$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16212      { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
16213$as_echo "$as_me: error: Cannot continue" >&2;}
16214   { (exit 1); exit 1; }; }
16215    fi
16216
16217    # Now set all paths and other env variables. This will allow the rest of
16218    # the configure script to find and run the compiler in the proper way.
16219    { $as_echo "$as_me:$LINENO: Setting extracted environment variables" >&5
16220$as_echo "$as_me: Setting extracted environment variables" >&6;}
16221    . $OUTPUT_ROOT/localdevenv.sh
16222  else
16223    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16224    { $as_echo "$as_me:$LINENO: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16225$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16226  fi
16227
16228  # At this point, we should have corrent variables in the environment, or we can't continue.
16229  { $as_echo "$as_me:$LINENO: checking for Visual Studio variables" >&5
16230$as_echo_n "checking for Visual Studio variables... " >&6; }
16231
16232  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16233    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16234      { $as_echo "$as_me:$LINENO: result: present but broken" >&5
16235$as_echo "present but broken" >&6; }
16236      { { $as_echo "$as_me:$LINENO: error: Your VC command prompt seems broken, INCLUDE and/or LIB is missing." >&5
16237$as_echo "$as_me: error: Your VC command prompt seems broken, INCLUDE and/or LIB is missing." >&2;}
16238   { (exit 1); exit 1; }; }
16239    else
16240      { $as_echo "$as_me:$LINENO: result: ok" >&5
16241$as_echo "ok" >&6; }
16242      VS_INCLUDE="$INCLUDE"
16243      VS_LIB="$LIB"
16244      VS_PATH="$PATH"
16245
16246
16247
16248    fi
16249  else
16250    { $as_echo "$as_me:$LINENO: result: not found" >&5
16251$as_echo "not found" >&6; }
16252
16253    if test "x$VS_ENV_CMD" = x; then
16254      { $as_echo "$as_me:$LINENO: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16255$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16256      { $as_echo "$as_me:$LINENO: nor is this script run from a Visual Studio command prompt." >&5
16257$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16258    else
16259      { $as_echo "$as_me:$LINENO: Running the extraction script failed." >&5
16260$as_echo "$as_me: Running the extraction script failed." >&6;}
16261    fi
16262    { $as_echo "$as_me:$LINENO: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16263$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16264    { $as_echo "$as_me:$LINENO: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16265$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16266    { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
16267$as_echo "$as_me: error: Cannot continue" >&2;}
16268   { (exit 1); exit 1; }; }
16269  fi
16270
16271  { $as_echo "$as_me:$LINENO: checking for msvcr100.dll" >&5
16272$as_echo_n "checking for msvcr100.dll... " >&6; }
16273
16274# Check whether --with-msvcr-dll was given.
16275if test "${with_msvcr_dll+set}" = set; then
16276  withval=$with_msvcr_dll;
16277fi
16278
16279  if test "x$with_msvcr_dll" != x; then
16280    MSVCR_DLL="$with_msvcr_dll"
16281  else
16282    if test "x$VCINSTALLDIR" != x; then
16283      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16284        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16285      else
16286        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16287        if test "x$MSVCR_DLL" = x; then
16288          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16289        fi
16290      fi
16291      if test "x$MSVCR_DLL" != x; then
16292        { $as_echo "$as_me:$LINENO: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16293$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16294      else
16295        { $as_echo "$as_me:$LINENO: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16296$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16297      fi
16298    fi
16299    if test "x$MSVCR_DLL" = x; then
16300      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16301        { $as_echo "$as_me:$LINENO: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16302$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16303        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16304      fi
16305    fi
16306  fi
16307  if test "x$MSVCR_DLL" = x; then
16308    { $as_echo "$as_me:$LINENO: result: no" >&5
16309$as_echo "no" >&6; }
16310    { { $as_echo "$as_me:$LINENO: error: Could not find msvcr100.dll !" >&5
16311$as_echo "$as_me: error: Could not find msvcr100.dll !" >&2;}
16312   { (exit 1); exit 1; }; }
16313  fi
16314  { $as_echo "$as_me:$LINENO: result: $MSVCR_DLL" >&5
16315$as_echo "$MSVCR_DLL" >&6; }
16316
16317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16318
16319  # Input might be given as Windows format, start by converting to
16320  # unix format.
16321  path="$MSVCR_DLL"
16322  new_path=`$CYGPATH -u "$path"`
16323
16324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16327  # "foo.exe" is OK but "foo" is an error.
16328  #
16329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16330  # It is also a way to make sure we got the proper file name for the real test later on.
16331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16332  if test "x$test_shortpath" = x; then
16333    { $as_echo "$as_me:$LINENO: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16334$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16335    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MSVCR_DLL" >&5
16336$as_echo "$as_me: error: Cannot locate the the path of MSVCR_DLL" >&2;}
16337   { (exit 1); exit 1; }; }
16338  fi
16339
16340  # Call helper function which possibly converts this using DOS-style short mode.
16341  # If so, the updated path is stored in $new_path.
16342
16343  input_path="$new_path"
16344  # Check if we need to convert this using DOS-style short mode. If the path
16345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16346  # take no chances and rewrite it.
16347  # Note: m4 eats our [], so we need to use [ and ] instead.
16348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16349  if test "x$has_forbidden_chars" != x; then
16350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16354      # Going to short mode and back again did indeed matter. Since short mode is
16355      # case insensitive, let's make it lowercase to improve readability.
16356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16357      # Now convert it back to Unix-stile (cygpath)
16358      input_path=`$CYGPATH -u "$shortmode_path"`
16359      new_path="$input_path"
16360    fi
16361  fi
16362
16363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16364  if test "x$test_cygdrive_prefix" = x; then
16365    # As a simple fix, exclude /usr/bin since it's not a real path.
16366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16368      # a path prefixed by /cygdrive for fixpath to work.
16369      new_path="$CYGWIN_ROOT_PATH$input_path"
16370    fi
16371  fi
16372
16373
16374  if test "x$path" != "x$new_path"; then
16375    MSVCR_DLL="$new_path"
16376    { $as_echo "$as_me:$LINENO: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16377$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16378  fi
16379
16380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16381
16382  path="$MSVCR_DLL"
16383  has_colon=`$ECHO $path | $GREP ^.:`
16384  new_path="$path"
16385  if test "x$has_colon" = x; then
16386    # Not in mixed or Windows style, start by that.
16387    new_path=`cmd //c echo $path`
16388  fi
16389
16390
16391  input_path="$new_path"
16392  # Check if we need to convert this using DOS-style short mode. If the path
16393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16394  # take no chances and rewrite it.
16395  # Note: m4 eats our [], so we need to use [ and ] instead.
16396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16397  if test "x$has_forbidden_chars" != x; then
16398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16400  fi
16401
16402
16403  windows_path="$new_path"
16404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16405    unix_path=`$CYGPATH -u "$windows_path"`
16406    new_path="$unix_path"
16407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16409    new_path="$unix_path"
16410  fi
16411
16412  if test "x$path" != "x$new_path"; then
16413    MSVCR_DLL="$new_path"
16414    { $as_echo "$as_me:$LINENO: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16415$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16416  fi
16417
16418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16420
16421  else
16422    # We're on a posix platform. Hooray! :)
16423    path="$MSVCR_DLL"
16424
16425    if test ! -f "$path" && test ! -d "$path"; then
16426      { { $as_echo "$as_me:$LINENO: error: The path of MSVCR_DLL, which resolves as \"$path\", is not found." >&5
16427$as_echo "$as_me: error: The path of MSVCR_DLL, which resolves as \"$path\", is not found." >&2;}
16428   { (exit 1); exit 1; }; }
16429    fi
16430
16431    has_space=`$ECHO "$path" | $GREP " "`
16432    if test "x$has_space" != x; then
16433      { $as_echo "$as_me:$LINENO: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16434$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16435      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
16436$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
16437   { (exit 1); exit 1; }; }
16438    fi
16439  fi
16440
16441
16442fi
16443
16444
16445
16446# If --build AND --host is set, then the configure script will find any
16447# cross compilation tools in the PATH. Cross compilation tools
16448# follows the cross compilation standard where they are prefixed with ${host}.
16449# For example the binary i686-sun-solaris2.10-gcc
16450# will cross compile for i686-sun-solaris2.10
16451# If neither of build and host is not set, then build=host and the
16452# default compiler found in the path will be used.
16453# Setting only --host, does not seem to be really supported.
16454# Please set both --build and --host if you want to cross compile.
16455
16456if test "x$COMPILE_TYPE" = "xcross"; then
16457    # Now we to find a C/C++ compiler that can build executables for the build
16458    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16459    # once. Also, we need to do this before adding a tools dir to the path,
16460    # otherwise we might pick up cross-compilers which don't use standard naming.
16461    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16462    # to wait until they are properly discovered.
16463    for ac_prog in cl cc gcc
16464do
16465  # Extract the first word of "$ac_prog", so it can be a program name with args.
16466set dummy $ac_prog; ac_word=$2
16467{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16468$as_echo_n "checking for $ac_word... " >&6; }
16469if test "${ac_cv_path_BUILD_CC+set}" = set; then
16470  $as_echo_n "(cached) " >&6
16471else
16472  case $BUILD_CC in
16473  [\\/]* | ?:[\\/]*)
16474  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16475  ;;
16476  *)
16477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16478for as_dir in $PATH
16479do
16480  IFS=$as_save_IFS
16481  test -z "$as_dir" && as_dir=.
16482  for ac_exec_ext in '' $ac_executable_extensions; do
16483  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16484    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16485    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16486    break 2
16487  fi
16488done
16489done
16490IFS=$as_save_IFS
16491
16492  ;;
16493esac
16494fi
16495BUILD_CC=$ac_cv_path_BUILD_CC
16496if test -n "$BUILD_CC"; then
16497  { $as_echo "$as_me:$LINENO: result: $BUILD_CC" >&5
16498$as_echo "$BUILD_CC" >&6; }
16499else
16500  { $as_echo "$as_me:$LINENO: result: no" >&5
16501$as_echo "no" >&6; }
16502fi
16503
16504
16505  test -n "$BUILD_CC" && break
16506done
16507
16508
16509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16510
16511  # First separate the path from the arguments. This will split at the first
16512  # space.
16513  complete="$BUILD_CC"
16514  path="${complete%% *}"
16515  tmp="$complete EOL"
16516  arguments="${tmp#* }"
16517
16518  # Input might be given as Windows format, start by converting to
16519  # unix format.
16520  new_path=`$CYGPATH -u "$path"`
16521
16522  # Now try to locate executable using which
16523  new_path=`$WHICH "$new_path" 2> /dev/null`
16524  # bat and cmd files are not always considered executable in cygwin causing which
16525  # to not find them
16526  if test "x$new_path" = x \
16527           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16528           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16529    new_path=`$CYGPATH -u "$path"`
16530  fi
16531  if test "x$new_path" = x; then
16532    # Oops. Which didn't find the executable.
16533    # The splitting of arguments from the executable at a space might have been incorrect,
16534    # since paths with space are more likely in Windows. Give it another try with the whole
16535    # argument.
16536    path="$complete"
16537    arguments="EOL"
16538    new_path=`$CYGPATH -u "$path"`
16539    new_path=`$WHICH "$new_path" 2> /dev/null`
16540    # bat and cmd files are not always considered executable in cygwin causing which
16541    # to not find them
16542    if test "x$new_path" = x \
16543             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16544             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16545      new_path=`$CYGPATH -u "$path"`
16546    fi
16547    if test "x$new_path" = x; then
16548      # It's still not found. Now this is an unrecoverable error.
16549      { $as_echo "$as_me:$LINENO: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16550$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16551      has_space=`$ECHO "$complete" | $GREP " "`
16552      if test "x$has_space" != x; then
16553        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16554$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16555      fi
16556      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CC" >&5
16557$as_echo "$as_me: error: Cannot locate the the path of BUILD_CC" >&2;}
16558   { (exit 1); exit 1; }; }
16559    fi
16560  fi
16561
16562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16565  # "foo.exe" is OK but "foo" is an error.
16566  #
16567  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16568  # It is also a way to make sure we got the proper file name for the real test later on.
16569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16570  if test "x$test_shortpath" = x; then
16571    # Short path failed, file does not exist as specified.
16572    # Try adding .exe or .cmd
16573    if test -f "${new_path}.exe"; then
16574       input_to_shortpath="${new_path}.exe"
16575    elif test -f "${new_path}.cmd"; then
16576       input_to_shortpath="${new_path}.cmd"
16577    else
16578      { $as_echo "$as_me:$LINENO: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
16579$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
16580      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16581$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16582      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CC" >&5
16583$as_echo "$as_me: error: Cannot locate the the path of BUILD_CC" >&2;}
16584   { (exit 1); exit 1; }; }
16585    fi
16586  else
16587    input_to_shortpath="$new_path"
16588  fi
16589
16590  # Call helper function which possibly converts this using DOS-style short mode.
16591  # If so, the updated path is stored in $new_path.
16592  new_path="$input_to_shortpath"
16593
16594  input_path="$input_to_shortpath"
16595  # Check if we need to convert this using DOS-style short mode. If the path
16596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16597  # take no chances and rewrite it.
16598  # Note: m4 eats our [], so we need to use [ and ] instead.
16599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16600  if test "x$has_forbidden_chars" != x; then
16601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16602    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16603    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16604    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16605      # Going to short mode and back again did indeed matter. Since short mode is
16606      # case insensitive, let's make it lowercase to improve readability.
16607      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16608      # Now convert it back to Unix-stile (cygpath)
16609      input_path=`$CYGPATH -u "$shortmode_path"`
16610      new_path="$input_path"
16611    fi
16612  fi
16613
16614  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16615  if test "x$test_cygdrive_prefix" = x; then
16616    # As a simple fix, exclude /usr/bin since it's not a real path.
16617    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16618      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16619      # a path prefixed by /cygdrive for fixpath to work.
16620      new_path="$CYGWIN_ROOT_PATH$input_path"
16621    fi
16622  fi
16623
16624  # remove trailing .exe if any
16625  new_path="${new_path/%.exe/}"
16626
16627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16628
16629  # First separate the path from the arguments. This will split at the first
16630  # space.
16631  complete="$BUILD_CC"
16632  path="${complete%% *}"
16633  tmp="$complete EOL"
16634  arguments="${tmp#* }"
16635
16636  # Input might be given as Windows format, start by converting to
16637  # unix format.
16638  new_path="$path"
16639
16640  windows_path="$new_path"
16641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16642    unix_path=`$CYGPATH -u "$windows_path"`
16643    new_path="$unix_path"
16644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16646    new_path="$unix_path"
16647  fi
16648
16649
16650  # Now try to locate executable using which
16651  new_path=`$WHICH "$new_path" 2> /dev/null`
16652
16653  if test "x$new_path" = x; then
16654    # Oops. Which didn't find the executable.
16655    # The splitting of arguments from the executable at a space might have been incorrect,
16656    # since paths with space are more likely in Windows. Give it another try with the whole
16657    # argument.
16658    path="$complete"
16659    arguments="EOL"
16660    new_path="$path"
16661
16662  windows_path="$new_path"
16663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16664    unix_path=`$CYGPATH -u "$windows_path"`
16665    new_path="$unix_path"
16666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16668    new_path="$unix_path"
16669  fi
16670
16671
16672    new_path=`$WHICH "$new_path" 2> /dev/null`
16673
16674    if test "x$new_path" = x; then
16675      # It's still not found. Now this is an unrecoverable error.
16676      { $as_echo "$as_me:$LINENO: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16677$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16678      has_space=`$ECHO "$complete" | $GREP " "`
16679      if test "x$has_space" != x; then
16680        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16681$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16682      fi
16683      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CC" >&5
16684$as_echo "$as_me: error: Cannot locate the the path of BUILD_CC" >&2;}
16685   { (exit 1); exit 1; }; }
16686    fi
16687  fi
16688
16689  # Now new_path has a complete unix path to the binary
16690  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16691    # Keep paths in /bin as-is, but remove trailing .exe if any
16692    new_path="${new_path/%.exe/}"
16693    # Do not save /bin paths to all_fixpath_prefixes!
16694  else
16695    # Not in mixed or Windows style, start by that.
16696    new_path=`cmd //c echo $new_path`
16697
16698  input_path="$new_path"
16699  # Check if we need to convert this using DOS-style short mode. If the path
16700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16701  # take no chances and rewrite it.
16702  # Note: m4 eats our [], so we need to use [ and ] instead.
16703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16704  if test "x$has_forbidden_chars" != x; then
16705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16707  fi
16708
16709    # Output is in $new_path
16710
16711  windows_path="$new_path"
16712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16713    unix_path=`$CYGPATH -u "$windows_path"`
16714    new_path="$unix_path"
16715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16717    new_path="$unix_path"
16718  fi
16719
16720    # remove trailing .exe if any
16721    new_path="${new_path/%.exe/}"
16722
16723    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16724    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16725  fi
16726
16727  else
16728    # We're on a posix platform. Hooray! :)
16729    # First separate the path from the arguments. This will split at the first
16730    # space.
16731    complete="$BUILD_CC"
16732    path="${complete%% *}"
16733    tmp="$complete EOL"
16734    arguments="${tmp#* }"
16735
16736    new_path=`$WHICH $path 2> /dev/null`
16737    if test "x$new_path" = x; then
16738      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16739      if test "x$is_absolute_path" != x; then
16740        { $as_echo "$as_me:$LINENO: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&5
16741$as_echo "$as_me: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&6;}
16742        new_path="$path"
16743      else
16744        { $as_echo "$as_me:$LINENO: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16745$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16746        has_space=`$ECHO "$complete" | $GREP " "`
16747        if test "x$has_space" != x; then
16748          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
16749$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16750        fi
16751        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CC" >&5
16752$as_echo "$as_me: error: Cannot locate the the path of BUILD_CC" >&2;}
16753   { (exit 1); exit 1; }; }
16754      fi
16755    fi
16756  fi
16757
16758  # Now join together the path and the arguments once again
16759  if test "x$arguments" != xEOL; then
16760      new_complete="$new_path ${arguments% *}"
16761  else
16762      new_complete="$new_path"
16763  fi
16764
16765  if test "x$complete" != "x$new_complete"; then
16766    BUILD_CC="$new_complete"
16767    { $as_echo "$as_me:$LINENO: Rewriting BUILD_CC to \"$new_complete\"" >&5
16768$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
16769  fi
16770
16771    for ac_prog in cl CC g++
16772do
16773  # Extract the first word of "$ac_prog", so it can be a program name with args.
16774set dummy $ac_prog; ac_word=$2
16775{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16776$as_echo_n "checking for $ac_word... " >&6; }
16777if test "${ac_cv_path_BUILD_CXX+set}" = set; then
16778  $as_echo_n "(cached) " >&6
16779else
16780  case $BUILD_CXX in
16781  [\\/]* | ?:[\\/]*)
16782  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
16783  ;;
16784  *)
16785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16786for as_dir in $PATH
16787do
16788  IFS=$as_save_IFS
16789  test -z "$as_dir" && as_dir=.
16790  for ac_exec_ext in '' $ac_executable_extensions; do
16791  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16792    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
16793    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16794    break 2
16795  fi
16796done
16797done
16798IFS=$as_save_IFS
16799
16800  ;;
16801esac
16802fi
16803BUILD_CXX=$ac_cv_path_BUILD_CXX
16804if test -n "$BUILD_CXX"; then
16805  { $as_echo "$as_me:$LINENO: result: $BUILD_CXX" >&5
16806$as_echo "$BUILD_CXX" >&6; }
16807else
16808  { $as_echo "$as_me:$LINENO: result: no" >&5
16809$as_echo "no" >&6; }
16810fi
16811
16812
16813  test -n "$BUILD_CXX" && break
16814done
16815
16816
16817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16818
16819  # First separate the path from the arguments. This will split at the first
16820  # space.
16821  complete="$BUILD_CXX"
16822  path="${complete%% *}"
16823  tmp="$complete EOL"
16824  arguments="${tmp#* }"
16825
16826  # Input might be given as Windows format, start by converting to
16827  # unix format.
16828  new_path=`$CYGPATH -u "$path"`
16829
16830  # Now try to locate executable using which
16831  new_path=`$WHICH "$new_path" 2> /dev/null`
16832  # bat and cmd files are not always considered executable in cygwin causing which
16833  # to not find them
16834  if test "x$new_path" = x \
16835           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16836           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16837    new_path=`$CYGPATH -u "$path"`
16838  fi
16839  if test "x$new_path" = x; then
16840    # Oops. Which didn't find the executable.
16841    # The splitting of arguments from the executable at a space might have been incorrect,
16842    # since paths with space are more likely in Windows. Give it another try with the whole
16843    # argument.
16844    path="$complete"
16845    arguments="EOL"
16846    new_path=`$CYGPATH -u "$path"`
16847    new_path=`$WHICH "$new_path" 2> /dev/null`
16848    # bat and cmd files are not always considered executable in cygwin causing which
16849    # to not find them
16850    if test "x$new_path" = x \
16851             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16852             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16853      new_path=`$CYGPATH -u "$path"`
16854    fi
16855    if test "x$new_path" = x; then
16856      # It's still not found. Now this is an unrecoverable error.
16857      { $as_echo "$as_me:$LINENO: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
16858$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
16859      has_space=`$ECHO "$complete" | $GREP " "`
16860      if test "x$has_space" != x; then
16861        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16863      fi
16864      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CXX" >&5
16865$as_echo "$as_me: error: Cannot locate the the path of BUILD_CXX" >&2;}
16866   { (exit 1); exit 1; }; }
16867    fi
16868  fi
16869
16870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16873  # "foo.exe" is OK but "foo" is an error.
16874  #
16875  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16876  # It is also a way to make sure we got the proper file name for the real test later on.
16877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16878  if test "x$test_shortpath" = x; then
16879    # Short path failed, file does not exist as specified.
16880    # Try adding .exe or .cmd
16881    if test -f "${new_path}.exe"; then
16882       input_to_shortpath="${new_path}.exe"
16883    elif test -f "${new_path}.cmd"; then
16884       input_to_shortpath="${new_path}.cmd"
16885    else
16886      { $as_echo "$as_me:$LINENO: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
16887$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
16888      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16889$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16890      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CXX" >&5
16891$as_echo "$as_me: error: Cannot locate the the path of BUILD_CXX" >&2;}
16892   { (exit 1); exit 1; }; }
16893    fi
16894  else
16895    input_to_shortpath="$new_path"
16896  fi
16897
16898  # Call helper function which possibly converts this using DOS-style short mode.
16899  # If so, the updated path is stored in $new_path.
16900  new_path="$input_to_shortpath"
16901
16902  input_path="$input_to_shortpath"
16903  # Check if we need to convert this using DOS-style short mode. If the path
16904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16905  # take no chances and rewrite it.
16906  # Note: m4 eats our [], so we need to use [ and ] instead.
16907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16908  if test "x$has_forbidden_chars" != x; then
16909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16910    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16911    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16912    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16913      # Going to short mode and back again did indeed matter. Since short mode is
16914      # case insensitive, let's make it lowercase to improve readability.
16915      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16916      # Now convert it back to Unix-stile (cygpath)
16917      input_path=`$CYGPATH -u "$shortmode_path"`
16918      new_path="$input_path"
16919    fi
16920  fi
16921
16922  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16923  if test "x$test_cygdrive_prefix" = x; then
16924    # As a simple fix, exclude /usr/bin since it's not a real path.
16925    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16926      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16927      # a path prefixed by /cygdrive for fixpath to work.
16928      new_path="$CYGWIN_ROOT_PATH$input_path"
16929    fi
16930  fi
16931
16932  # remove trailing .exe if any
16933  new_path="${new_path/%.exe/}"
16934
16935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16936
16937  # First separate the path from the arguments. This will split at the first
16938  # space.
16939  complete="$BUILD_CXX"
16940  path="${complete%% *}"
16941  tmp="$complete EOL"
16942  arguments="${tmp#* }"
16943
16944  # Input might be given as Windows format, start by converting to
16945  # unix format.
16946  new_path="$path"
16947
16948  windows_path="$new_path"
16949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16950    unix_path=`$CYGPATH -u "$windows_path"`
16951    new_path="$unix_path"
16952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16954    new_path="$unix_path"
16955  fi
16956
16957
16958  # Now try to locate executable using which
16959  new_path=`$WHICH "$new_path" 2> /dev/null`
16960
16961  if test "x$new_path" = x; then
16962    # Oops. Which didn't find the executable.
16963    # The splitting of arguments from the executable at a space might have been incorrect,
16964    # since paths with space are more likely in Windows. Give it another try with the whole
16965    # argument.
16966    path="$complete"
16967    arguments="EOL"
16968    new_path="$path"
16969
16970  windows_path="$new_path"
16971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16972    unix_path=`$CYGPATH -u "$windows_path"`
16973    new_path="$unix_path"
16974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16976    new_path="$unix_path"
16977  fi
16978
16979
16980    new_path=`$WHICH "$new_path" 2> /dev/null`
16981
16982    if test "x$new_path" = x; then
16983      # It's still not found. Now this is an unrecoverable error.
16984      { $as_echo "$as_me:$LINENO: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
16985$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
16986      has_space=`$ECHO "$complete" | $GREP " "`
16987      if test "x$has_space" != x; then
16988        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16990      fi
16991      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CXX" >&5
16992$as_echo "$as_me: error: Cannot locate the the path of BUILD_CXX" >&2;}
16993   { (exit 1); exit 1; }; }
16994    fi
16995  fi
16996
16997  # Now new_path has a complete unix path to the binary
16998  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16999    # Keep paths in /bin as-is, but remove trailing .exe if any
17000    new_path="${new_path/%.exe/}"
17001    # Do not save /bin paths to all_fixpath_prefixes!
17002  else
17003    # Not in mixed or Windows style, start by that.
17004    new_path=`cmd //c echo $new_path`
17005
17006  input_path="$new_path"
17007  # Check if we need to convert this using DOS-style short mode. If the path
17008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17009  # take no chances and rewrite it.
17010  # Note: m4 eats our [], so we need to use [ and ] instead.
17011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17012  if test "x$has_forbidden_chars" != x; then
17013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17015  fi
17016
17017    # Output is in $new_path
17018
17019  windows_path="$new_path"
17020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17021    unix_path=`$CYGPATH -u "$windows_path"`
17022    new_path="$unix_path"
17023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17025    new_path="$unix_path"
17026  fi
17027
17028    # remove trailing .exe if any
17029    new_path="${new_path/%.exe/}"
17030
17031    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17032    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17033  fi
17034
17035  else
17036    # We're on a posix platform. Hooray! :)
17037    # First separate the path from the arguments. This will split at the first
17038    # space.
17039    complete="$BUILD_CXX"
17040    path="${complete%% *}"
17041    tmp="$complete EOL"
17042    arguments="${tmp#* }"
17043
17044    new_path=`$WHICH $path 2> /dev/null`
17045    if test "x$new_path" = x; then
17046      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17047      if test "x$is_absolute_path" != x; then
17048        { $as_echo "$as_me:$LINENO: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&5
17049$as_echo "$as_me: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&6;}
17050        new_path="$path"
17051      else
17052        { $as_echo "$as_me:$LINENO: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17053$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17054        has_space=`$ECHO "$complete" | $GREP " "`
17055        if test "x$has_space" != x; then
17056          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
17057$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17058        fi
17059        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CXX" >&5
17060$as_echo "$as_me: error: Cannot locate the the path of BUILD_CXX" >&2;}
17061   { (exit 1); exit 1; }; }
17062      fi
17063    fi
17064  fi
17065
17066  # Now join together the path and the arguments once again
17067  if test "x$arguments" != xEOL; then
17068      new_complete="$new_path ${arguments% *}"
17069  else
17070      new_complete="$new_path"
17071  fi
17072
17073  if test "x$complete" != "x$new_complete"; then
17074    BUILD_CXX="$new_complete"
17075    { $as_echo "$as_me:$LINENO: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17076$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17077  fi
17078
17079    # Extract the first word of "ld", so it can be a program name with args.
17080set dummy ld; ac_word=$2
17081{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
17082$as_echo_n "checking for $ac_word... " >&6; }
17083if test "${ac_cv_path_BUILD_LD+set}" = set; then
17084  $as_echo_n "(cached) " >&6
17085else
17086  case $BUILD_LD in
17087  [\\/]* | ?:[\\/]*)
17088  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17089  ;;
17090  *)
17091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17092for as_dir in $PATH
17093do
17094  IFS=$as_save_IFS
17095  test -z "$as_dir" && as_dir=.
17096  for ac_exec_ext in '' $ac_executable_extensions; do
17097  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17098    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17099    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17100    break 2
17101  fi
17102done
17103done
17104IFS=$as_save_IFS
17105
17106  ;;
17107esac
17108fi
17109BUILD_LD=$ac_cv_path_BUILD_LD
17110if test -n "$BUILD_LD"; then
17111  { $as_echo "$as_me:$LINENO: result: $BUILD_LD" >&5
17112$as_echo "$BUILD_LD" >&6; }
17113else
17114  { $as_echo "$as_me:$LINENO: result: no" >&5
17115$as_echo "no" >&6; }
17116fi
17117
17118
17119
17120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17121
17122  # First separate the path from the arguments. This will split at the first
17123  # space.
17124  complete="$BUILD_LD"
17125  path="${complete%% *}"
17126  tmp="$complete EOL"
17127  arguments="${tmp#* }"
17128
17129  # Input might be given as Windows format, start by converting to
17130  # unix format.
17131  new_path=`$CYGPATH -u "$path"`
17132
17133  # Now try to locate executable using which
17134  new_path=`$WHICH "$new_path" 2> /dev/null`
17135  # bat and cmd files are not always considered executable in cygwin causing which
17136  # to not find them
17137  if test "x$new_path" = x \
17138           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17139           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17140    new_path=`$CYGPATH -u "$path"`
17141  fi
17142  if test "x$new_path" = x; then
17143    # Oops. Which didn't find the executable.
17144    # The splitting of arguments from the executable at a space might have been incorrect,
17145    # since paths with space are more likely in Windows. Give it another try with the whole
17146    # argument.
17147    path="$complete"
17148    arguments="EOL"
17149    new_path=`$CYGPATH -u "$path"`
17150    new_path=`$WHICH "$new_path" 2> /dev/null`
17151    # bat and cmd files are not always considered executable in cygwin causing which
17152    # to not find them
17153    if test "x$new_path" = x \
17154             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17155             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17156      new_path=`$CYGPATH -u "$path"`
17157    fi
17158    if test "x$new_path" = x; then
17159      # It's still not found. Now this is an unrecoverable error.
17160      { $as_echo "$as_me:$LINENO: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17161$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17162      has_space=`$ECHO "$complete" | $GREP " "`
17163      if test "x$has_space" != x; then
17164        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17165$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17166      fi
17167      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_LD" >&5
17168$as_echo "$as_me: error: Cannot locate the the path of BUILD_LD" >&2;}
17169   { (exit 1); exit 1; }; }
17170    fi
17171  fi
17172
17173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17176  # "foo.exe" is OK but "foo" is an error.
17177  #
17178  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17179  # It is also a way to make sure we got the proper file name for the real test later on.
17180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17181  if test "x$test_shortpath" = x; then
17182    # Short path failed, file does not exist as specified.
17183    # Try adding .exe or .cmd
17184    if test -f "${new_path}.exe"; then
17185       input_to_shortpath="${new_path}.exe"
17186    elif test -f "${new_path}.cmd"; then
17187       input_to_shortpath="${new_path}.cmd"
17188    else
17189      { $as_echo "$as_me:$LINENO: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17190$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17191      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17192$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17193      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_LD" >&5
17194$as_echo "$as_me: error: Cannot locate the the path of BUILD_LD" >&2;}
17195   { (exit 1); exit 1; }; }
17196    fi
17197  else
17198    input_to_shortpath="$new_path"
17199  fi
17200
17201  # Call helper function which possibly converts this using DOS-style short mode.
17202  # If so, the updated path is stored in $new_path.
17203  new_path="$input_to_shortpath"
17204
17205  input_path="$input_to_shortpath"
17206  # Check if we need to convert this using DOS-style short mode. If the path
17207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17208  # take no chances and rewrite it.
17209  # Note: m4 eats our [], so we need to use [ and ] instead.
17210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17211  if test "x$has_forbidden_chars" != x; then
17212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17216      # Going to short mode and back again did indeed matter. Since short mode is
17217      # case insensitive, let's make it lowercase to improve readability.
17218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17219      # Now convert it back to Unix-stile (cygpath)
17220      input_path=`$CYGPATH -u "$shortmode_path"`
17221      new_path="$input_path"
17222    fi
17223  fi
17224
17225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17226  if test "x$test_cygdrive_prefix" = x; then
17227    # As a simple fix, exclude /usr/bin since it's not a real path.
17228    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17230      # a path prefixed by /cygdrive for fixpath to work.
17231      new_path="$CYGWIN_ROOT_PATH$input_path"
17232    fi
17233  fi
17234
17235  # remove trailing .exe if any
17236  new_path="${new_path/%.exe/}"
17237
17238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17239
17240  # First separate the path from the arguments. This will split at the first
17241  # space.
17242  complete="$BUILD_LD"
17243  path="${complete%% *}"
17244  tmp="$complete EOL"
17245  arguments="${tmp#* }"
17246
17247  # Input might be given as Windows format, start by converting to
17248  # unix format.
17249  new_path="$path"
17250
17251  windows_path="$new_path"
17252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17253    unix_path=`$CYGPATH -u "$windows_path"`
17254    new_path="$unix_path"
17255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17257    new_path="$unix_path"
17258  fi
17259
17260
17261  # Now try to locate executable using which
17262  new_path=`$WHICH "$new_path" 2> /dev/null`
17263
17264  if test "x$new_path" = x; then
17265    # Oops. Which didn't find the executable.
17266    # The splitting of arguments from the executable at a space might have been incorrect,
17267    # since paths with space are more likely in Windows. Give it another try with the whole
17268    # argument.
17269    path="$complete"
17270    arguments="EOL"
17271    new_path="$path"
17272
17273  windows_path="$new_path"
17274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17275    unix_path=`$CYGPATH -u "$windows_path"`
17276    new_path="$unix_path"
17277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17279    new_path="$unix_path"
17280  fi
17281
17282
17283    new_path=`$WHICH "$new_path" 2> /dev/null`
17284
17285    if test "x$new_path" = x; then
17286      # It's still not found. Now this is an unrecoverable error.
17287      { $as_echo "$as_me:$LINENO: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17288$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17289      has_space=`$ECHO "$complete" | $GREP " "`
17290      if test "x$has_space" != x; then
17291        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17293      fi
17294      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_LD" >&5
17295$as_echo "$as_me: error: Cannot locate the the path of BUILD_LD" >&2;}
17296   { (exit 1); exit 1; }; }
17297    fi
17298  fi
17299
17300  # Now new_path has a complete unix path to the binary
17301  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17302    # Keep paths in /bin as-is, but remove trailing .exe if any
17303    new_path="${new_path/%.exe/}"
17304    # Do not save /bin paths to all_fixpath_prefixes!
17305  else
17306    # Not in mixed or Windows style, start by that.
17307    new_path=`cmd //c echo $new_path`
17308
17309  input_path="$new_path"
17310  # Check if we need to convert this using DOS-style short mode. If the path
17311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17312  # take no chances and rewrite it.
17313  # Note: m4 eats our [], so we need to use [ and ] instead.
17314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17315  if test "x$has_forbidden_chars" != x; then
17316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17318  fi
17319
17320    # Output is in $new_path
17321
17322  windows_path="$new_path"
17323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17324    unix_path=`$CYGPATH -u "$windows_path"`
17325    new_path="$unix_path"
17326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17328    new_path="$unix_path"
17329  fi
17330
17331    # remove trailing .exe if any
17332    new_path="${new_path/%.exe/}"
17333
17334    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17335    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17336  fi
17337
17338  else
17339    # We're on a posix platform. Hooray! :)
17340    # First separate the path from the arguments. This will split at the first
17341    # space.
17342    complete="$BUILD_LD"
17343    path="${complete%% *}"
17344    tmp="$complete EOL"
17345    arguments="${tmp#* }"
17346
17347    new_path=`$WHICH $path 2> /dev/null`
17348    if test "x$new_path" = x; then
17349      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17350      if test "x$is_absolute_path" != x; then
17351        { $as_echo "$as_me:$LINENO: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&5
17352$as_echo "$as_me: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&6;}
17353        new_path="$path"
17354      else
17355        { $as_echo "$as_me:$LINENO: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17356$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17357        has_space=`$ECHO "$complete" | $GREP " "`
17358        if test "x$has_space" != x; then
17359          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
17360$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17361        fi
17362        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_LD" >&5
17363$as_echo "$as_me: error: Cannot locate the the path of BUILD_LD" >&2;}
17364   { (exit 1); exit 1; }; }
17365      fi
17366    fi
17367  fi
17368
17369  # Now join together the path and the arguments once again
17370  if test "x$arguments" != xEOL; then
17371      new_complete="$new_path ${arguments% *}"
17372  else
17373      new_complete="$new_path"
17374  fi
17375
17376  if test "x$complete" != "x$new_complete"; then
17377    BUILD_LD="$new_complete"
17378    { $as_echo "$as_me:$LINENO: Rewriting BUILD_LD to \"$new_complete\"" >&5
17379$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17380  fi
17381
17382fi
17383
17384
17385
17386
17387# If a devkit is found on the builddeps server, then prepend its path to the
17388# PATH variable. If there are cross compilers available in the devkit, these
17389# will be found by AC_PROG_CC et al.
17390DEVKIT=
17391
17392
17393    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17394        # Source the builddeps file again, to make sure it uses the latest variables!
17395        . $builddepsfile
17396        # Look for a target and build machine specific resource!
17397        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17398        if test "x$resource" = x; then
17399            # Ok, lets instead look for a target specific resource
17400            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17401        fi
17402        if test "x$resource" = x; then
17403            # Ok, lets instead look for a build specific resource
17404            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17405        fi
17406        if test "x$resource" = x; then
17407            # Ok, lets instead look for a generic resource
17408            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17409            resource=${builddep_devkit}
17410        fi
17411        if test "x$resource" != x; then
17412            { $as_echo "$as_me:$LINENO: Using builddeps $resource for devkit" >&5
17413$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17414	    # If the resource in the builddeps.conf file is an existing directory,
17415	    # for example /java/linux/cups
17416	    if test -d ${resource}; then
17417	       depdir=${resource}
17418	    else
17419
17420# devkit is for example mymodule
17421# $resource is for example libs/general/libmymod_1_2_3.zip
17422# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17423# $with_builddeps_dir is for example /localhome/builddeps
17424# depdir is the name of the variable into which we store the depdir, eg MYMOD
17425# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17426# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17427    filename=`basename $resource`
17428    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17429    filebase=${filename%%.*}
17430    extension=${filename#*.}
17431    installdir=$with_builddeps_dir/$filebase
17432    if test ! -f $installdir/$filename.unpacked; then
17433        { $as_echo "$as_me:$LINENO: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17434$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17435        if test ! -d $installdir; then
17436            mkdir -p $installdir
17437        fi
17438        if test ! -d $installdir; then
17439            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
17440$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
17441   { (exit 1); exit 1; }; }
17442        fi
17443        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17444        touch $tmpfile
17445        if test ! -f $tmpfile; then
17446            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
17447$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
17448   { (exit 1); exit 1; }; }
17449        fi
17450
17451    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17452    # $tmpfile is the local file name for the downloaded file.
17453    VALID_TOOL=no
17454    if test "x$BDEPS_FTP" = xwget; then
17455       VALID_TOOL=yes
17456       wget -O $tmpfile $with_builddeps_server/$resource
17457    fi
17458    if test "x$BDEPS_FTP" = xlftp; then
17459       VALID_TOOL=yes
17460       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17461    fi
17462    if test "x$BDEPS_FTP" = xftp; then
17463        VALID_TOOL=yes
17464        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17465        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17466        FTPUSERPWD=${FTPSERVER%%@*}
17467        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17468            FTPUSER=${userpwd%%:*}
17469            FTPPWD=${userpwd#*@}
17470            FTPSERVER=${FTPSERVER#*@}
17471        else
17472            FTPUSER=ftp
17473            FTPPWD=ftp
17474        fi
17475        # the "pass" command does not work on some
17476        # ftp clients (read ftp.exe) but if it works,
17477        # passive mode is better!
17478        (\
17479            echo "user $FTPUSER $FTPPWD"        ;\
17480            echo "pass"                         ;\
17481            echo "bin"                          ;\
17482            echo "get $FTPPATH $tmpfile"              ;\
17483        ) | ftp -in $FTPSERVER
17484    fi
17485    if test "x$VALID_TOOL" != xyes; then
17486       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
17487$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
17488   { (exit 1); exit 1; }; }
17489    fi
17490
17491        mv $tmpfile $installdir/$filename
17492        if test ! -s $installdir/$filename; then
17493            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
17494$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
17495   { (exit 1); exit 1; }; }
17496        fi
17497        case "$extension" in
17498            zip)  echo "Unzipping $installdir/$filename..."
17499               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17500            ;;
17501            tar.gz) echo "Untaring $installdir/$filename..."
17502               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17503            ;;
17504            tgz) echo "Untaring $installdir/$filename..."
17505               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17506            ;;
17507            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
17508$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
17509   { (exit 1); exit 1; }; }
17510            ;;
17511        esac
17512    fi
17513    if test -f $installdir/$filename.unpacked; then
17514        depdir=$installdir
17515    fi
17516
17517	    fi
17518            # Source the builddeps file again, because in the previous command, the depdir
17519            # was updated to point at the current build dependency install directory.
17520            . $builddepsfile
17521            # Now extract variables from the builddeps.conf files.
17522            theroot=${builddep_devkit_ROOT}
17523            thecflags=${builddep_devkit_CFLAGS}
17524            thelibs=${builddep_devkit_LIBS}
17525            if test "x$depdir" = x; then
17526                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency devkit" >&5
17527$as_echo "$as_me: error: Could not download build dependency devkit" >&2;}
17528   { (exit 1); exit 1; }; }
17529            fi
17530            DEVKIT=$depdir
17531            if test "x$theroot" != x; then
17532               DEVKIT="$theroot"
17533            fi
17534            if test "x$thecflags" != x; then
17535               DEVKIT_CFLAGS="$thecflags"
17536            fi
17537            if test "x$thelibs" != x; then
17538               DEVKIT_LIBS="$thelibs"
17539            fi
17540            # Found devkit
17541                     PATH="$DEVKIT/bin:$PATH"
17542                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17543                     if test "x$x_includes" = "xNONE"; then
17544                         x_includes="$SYS_ROOT/usr/include/X11"
17545                     fi
17546                     if test "x$x_libraries" = "xNONE"; then
17547                         x_libraries="$SYS_ROOT/usr/lib"
17548                     fi
17549
17550
17551        fi
17552
17553    fi
17554
17555
17556if test "x$SYS_ROOT" != "x/" ; then
17557    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
17558    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
17559    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17560    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17561    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
17562    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
17563fi
17564
17565# Store the CFLAGS etal passed to the configure script.
17566ORG_CFLAGS="$CFLAGS"
17567ORG_CXXFLAGS="$CXXFLAGS"
17568ORG_OBJCFLAGS="$OBJCFLAGS"
17569
17570# autoconf magic only relies on PATH, so update it if tools dir is specified
17571OLD_PATH="$PATH"
17572if test "x$TOOLS_DIR" != x; then
17573  PATH=$TOOLS_DIR:$PATH
17574fi
17575
17576
17577### Locate C compiler (CC)
17578
17579# gcc is almost always present, but on Windows we
17580# prefer cl.exe and on Solaris we prefer CC.
17581# Thus test for them in this order.
17582if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17583  # Do not probe for cc on MacOSX.
17584  COMPILER_CHECK_LIST="cl gcc"
17585else
17586  COMPILER_CHECK_LIST="cl cc gcc"
17587fi
17588
17589
17590  COMPILER_NAME=C
17591
17592  # Do a first initial attempt at searching the list of compiler names.
17593  # AC_PATH_PROGS can't be run multiple times with the same variable,
17594  # so create a new name for this run.
17595  for ac_prog in $COMPILER_CHECK_LIST
17596do
17597  # Extract the first word of "$ac_prog", so it can be a program name with args.
17598set dummy $ac_prog; ac_word=$2
17599{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
17600$as_echo_n "checking for $ac_word... " >&6; }
17601if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then
17602  $as_echo_n "(cached) " >&6
17603else
17604  case $POTENTIAL_CC in
17605  [\\/]* | ?:[\\/]*)
17606  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
17607  ;;
17608  *)
17609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17610for as_dir in $PATH
17611do
17612  IFS=$as_save_IFS
17613  test -z "$as_dir" && as_dir=.
17614  for ac_exec_ext in '' $ac_executable_extensions; do
17615  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17616    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
17617    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17618    break 2
17619  fi
17620done
17621done
17622IFS=$as_save_IFS
17623
17624  ;;
17625esac
17626fi
17627POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
17628if test -n "$POTENTIAL_CC"; then
17629  { $as_echo "$as_me:$LINENO: result: $POTENTIAL_CC" >&5
17630$as_echo "$POTENTIAL_CC" >&6; }
17631else
17632  { $as_echo "$as_me:$LINENO: result: no" >&5
17633$as_echo "no" >&6; }
17634fi
17635
17636
17637  test -n "$POTENTIAL_CC" && break
17638done
17639
17640  CC=$POTENTIAL_CC
17641
17642  if test "x$$CC" = x; then
17643
17644    # Print a helpful message on how to acquire the necessary build dependency.
17645    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
17646    MISSING_DEPENDENCY=devkit
17647    PKGHANDLER_COMMAND=
17648
17649    case $PKGHANDLER in
17650	apt-get)
17651                apt_help     $MISSING_DEPENDENCY ;;
17652    yum)
17653                yum_help     $MISSING_DEPENDENCY ;;
17654	port)
17655                port_help    $MISSING_DEPENDENCY ;;
17656	pkgutil)
17657                pkgutil_help $MISSING_DEPENDENCY ;;
17658	pkgadd)
17659                pkgadd_help  $MISSING_DEPENDENCY ;;
17660    * )
17661      break ;;
17662    esac
17663
17664    if test "x$PKGHANDLER_COMMAND" != x; then
17665        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
17666    fi
17667
17668      { { $as_echo "$as_me:$LINENO: error: Could not find a $COMPILER_NAME compiler. $HELP_MSG" >&5
17669$as_echo "$as_me: error: Could not find a $COMPILER_NAME compiler. $HELP_MSG" >&2;}
17670   { (exit 1); exit 1; }; }
17671  fi
17672
17673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17674
17675  # First separate the path from the arguments. This will split at the first
17676  # space.
17677  complete="$CC"
17678  path="${complete%% *}"
17679  tmp="$complete EOL"
17680  arguments="${tmp#* }"
17681
17682  # Input might be given as Windows format, start by converting to
17683  # unix format.
17684  new_path=`$CYGPATH -u "$path"`
17685
17686  # Now try to locate executable using which
17687  new_path=`$WHICH "$new_path" 2> /dev/null`
17688  # bat and cmd files are not always considered executable in cygwin causing which
17689  # to not find them
17690  if test "x$new_path" = x \
17691           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17692           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17693    new_path=`$CYGPATH -u "$path"`
17694  fi
17695  if test "x$new_path" = x; then
17696    # Oops. Which didn't find the executable.
17697    # The splitting of arguments from the executable at a space might have been incorrect,
17698    # since paths with space are more likely in Windows. Give it another try with the whole
17699    # argument.
17700    path="$complete"
17701    arguments="EOL"
17702    new_path=`$CYGPATH -u "$path"`
17703    new_path=`$WHICH "$new_path" 2> /dev/null`
17704    # bat and cmd files are not always considered executable in cygwin causing which
17705    # to not find them
17706    if test "x$new_path" = x \
17707             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17708             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17709      new_path=`$CYGPATH -u "$path"`
17710    fi
17711    if test "x$new_path" = x; then
17712      # It's still not found. Now this is an unrecoverable error.
17713      { $as_echo "$as_me:$LINENO: The path of CC, which resolves as \"$complete\", is not found." >&5
17714$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17715      has_space=`$ECHO "$complete" | $GREP " "`
17716      if test "x$has_space" != x; then
17717        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17719      fi
17720      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CC" >&5
17721$as_echo "$as_me: error: Cannot locate the the path of CC" >&2;}
17722   { (exit 1); exit 1; }; }
17723    fi
17724  fi
17725
17726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17729  # "foo.exe" is OK but "foo" is an error.
17730  #
17731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17732  # It is also a way to make sure we got the proper file name for the real test later on.
17733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17734  if test "x$test_shortpath" = x; then
17735    # Short path failed, file does not exist as specified.
17736    # Try adding .exe or .cmd
17737    if test -f "${new_path}.exe"; then
17738       input_to_shortpath="${new_path}.exe"
17739    elif test -f "${new_path}.cmd"; then
17740       input_to_shortpath="${new_path}.cmd"
17741    else
17742      { $as_echo "$as_me:$LINENO: The path of CC, which resolves as \"$new_path\", is invalid." >&5
17743$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
17744      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17745$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17746      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CC" >&5
17747$as_echo "$as_me: error: Cannot locate the the path of CC" >&2;}
17748   { (exit 1); exit 1; }; }
17749    fi
17750  else
17751    input_to_shortpath="$new_path"
17752  fi
17753
17754  # Call helper function which possibly converts this using DOS-style short mode.
17755  # If so, the updated path is stored in $new_path.
17756  new_path="$input_to_shortpath"
17757
17758  input_path="$input_to_shortpath"
17759  # Check if we need to convert this using DOS-style short mode. If the path
17760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17761  # take no chances and rewrite it.
17762  # Note: m4 eats our [], so we need to use [ and ] instead.
17763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17764  if test "x$has_forbidden_chars" != x; then
17765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17769      # Going to short mode and back again did indeed matter. Since short mode is
17770      # case insensitive, let's make it lowercase to improve readability.
17771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17772      # Now convert it back to Unix-stile (cygpath)
17773      input_path=`$CYGPATH -u "$shortmode_path"`
17774      new_path="$input_path"
17775    fi
17776  fi
17777
17778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17779  if test "x$test_cygdrive_prefix" = x; then
17780    # As a simple fix, exclude /usr/bin since it's not a real path.
17781    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17783      # a path prefixed by /cygdrive for fixpath to work.
17784      new_path="$CYGWIN_ROOT_PATH$input_path"
17785    fi
17786  fi
17787
17788  # remove trailing .exe if any
17789  new_path="${new_path/%.exe/}"
17790
17791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17792
17793  # First separate the path from the arguments. This will split at the first
17794  # space.
17795  complete="$CC"
17796  path="${complete%% *}"
17797  tmp="$complete EOL"
17798  arguments="${tmp#* }"
17799
17800  # Input might be given as Windows format, start by converting to
17801  # unix format.
17802  new_path="$path"
17803
17804  windows_path="$new_path"
17805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17806    unix_path=`$CYGPATH -u "$windows_path"`
17807    new_path="$unix_path"
17808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17810    new_path="$unix_path"
17811  fi
17812
17813
17814  # Now try to locate executable using which
17815  new_path=`$WHICH "$new_path" 2> /dev/null`
17816
17817  if test "x$new_path" = x; then
17818    # Oops. Which didn't find the executable.
17819    # The splitting of arguments from the executable at a space might have been incorrect,
17820    # since paths with space are more likely in Windows. Give it another try with the whole
17821    # argument.
17822    path="$complete"
17823    arguments="EOL"
17824    new_path="$path"
17825
17826  windows_path="$new_path"
17827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17828    unix_path=`$CYGPATH -u "$windows_path"`
17829    new_path="$unix_path"
17830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17832    new_path="$unix_path"
17833  fi
17834
17835
17836    new_path=`$WHICH "$new_path" 2> /dev/null`
17837
17838    if test "x$new_path" = x; then
17839      # It's still not found. Now this is an unrecoverable error.
17840      { $as_echo "$as_me:$LINENO: The path of CC, which resolves as \"$complete\", is not found." >&5
17841$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17842      has_space=`$ECHO "$complete" | $GREP " "`
17843      if test "x$has_space" != x; then
17844        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17846      fi
17847      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CC" >&5
17848$as_echo "$as_me: error: Cannot locate the the path of CC" >&2;}
17849   { (exit 1); exit 1; }; }
17850    fi
17851  fi
17852
17853  # Now new_path has a complete unix path to the binary
17854  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17855    # Keep paths in /bin as-is, but remove trailing .exe if any
17856    new_path="${new_path/%.exe/}"
17857    # Do not save /bin paths to all_fixpath_prefixes!
17858  else
17859    # Not in mixed or Windows style, start by that.
17860    new_path=`cmd //c echo $new_path`
17861
17862  input_path="$new_path"
17863  # Check if we need to convert this using DOS-style short mode. If the path
17864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17865  # take no chances and rewrite it.
17866  # Note: m4 eats our [], so we need to use [ and ] instead.
17867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17868  if test "x$has_forbidden_chars" != x; then
17869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17871  fi
17872
17873    # Output is in $new_path
17874
17875  windows_path="$new_path"
17876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17877    unix_path=`$CYGPATH -u "$windows_path"`
17878    new_path="$unix_path"
17879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17881    new_path="$unix_path"
17882  fi
17883
17884    # remove trailing .exe if any
17885    new_path="${new_path/%.exe/}"
17886
17887    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17888    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17889  fi
17890
17891  else
17892    # We're on a posix platform. Hooray! :)
17893    # First separate the path from the arguments. This will split at the first
17894    # space.
17895    complete="$CC"
17896    path="${complete%% *}"
17897    tmp="$complete EOL"
17898    arguments="${tmp#* }"
17899
17900    new_path=`$WHICH $path 2> /dev/null`
17901    if test "x$new_path" = x; then
17902      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17903      if test "x$is_absolute_path" != x; then
17904        { $as_echo "$as_me:$LINENO: Resolving CC (as $path) with 'which' failed, using $path directly." >&5
17905$as_echo "$as_me: Resolving CC (as $path) with 'which' failed, using $path directly." >&6;}
17906        new_path="$path"
17907      else
17908        { $as_echo "$as_me:$LINENO: The path of CC, which resolves as \"$complete\", is not found." >&5
17909$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17910        has_space=`$ECHO "$complete" | $GREP " "`
17911        if test "x$has_space" != x; then
17912          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
17913$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17914        fi
17915        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CC" >&5
17916$as_echo "$as_me: error: Cannot locate the the path of CC" >&2;}
17917   { (exit 1); exit 1; }; }
17918      fi
17919    fi
17920  fi
17921
17922  # Now join together the path and the arguments once again
17923  if test "x$arguments" != xEOL; then
17924      new_complete="$new_path ${arguments% *}"
17925  else
17926      new_complete="$new_path"
17927  fi
17928
17929  if test "x$complete" != "x$new_complete"; then
17930    CC="$new_complete"
17931    { $as_echo "$as_me:$LINENO: Rewriting CC to \"$new_complete\"" >&5
17932$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
17933  fi
17934
17935  { $as_echo "$as_me:$LINENO: checking resolved symbolic links for CC" >&5
17936$as_echo_n "checking resolved symbolic links for CC... " >&6; }
17937  TEST_COMPILER="$CC"
17938
17939    if test "x$OPENJDK_BUILD_OS" != xwindows; then
17940        # Follow a chain of symbolic links. Use readlink
17941        # where it exists, else fall back to horribly
17942        # complicated shell code.
17943        if test "x$READLINK_TESTED" != yes; then
17944            # On MacOSX there is a readlink tool with a different
17945            # purpose than the GNU readlink tool. Check the found readlink.
17946            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
17947            if test "x$ISGNU" = x; then
17948                 # A readlink that we do not know how to use.
17949                 # Are there other non-GNU readlinks out there?
17950                 READLINK_TESTED=yes
17951                 READLINK=
17952            fi
17953        fi
17954
17955        if test "x$READLINK" != x; then
17956            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
17957        else
17958            STARTDIR=$PWD
17959            COUNTER=0
17960            sym_link_dir=`$DIRNAME $TEST_COMPILER`
17961            sym_link_file=`$BASENAME $TEST_COMPILER`
17962            while test $COUNTER -lt 20; do
17963                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
17964                if test "x$ISLINK" == x; then
17965                    # This is not a symbolic link! We are done!
17966                    break
17967                fi
17968                # The link might be relative! We have to use cd to travel safely.
17969                cd $sym_link_dir
17970                # ... and we must get the to the absolute path, not one using symbolic links.
17971                cd `pwd -P`
17972                cd `$DIRNAME $ISLINK`
17973                sym_link_dir=`$THEPWDCMD`
17974                sym_link_file=`$BASENAME $ISLINK`
17975                let COUNTER=COUNTER+1
17976            done
17977            cd $STARTDIR
17978            TEST_COMPILER=$sym_link_dir/$sym_link_file
17979        fi
17980    fi
17981
17982  { $as_echo "$as_me:$LINENO: result: $TEST_COMPILER" >&5
17983$as_echo "$TEST_COMPILER" >&6; }
17984  { $as_echo "$as_me:$LINENO: checking if CC is disguised ccache" >&5
17985$as_echo_n "checking if CC is disguised ccache... " >&6; }
17986
17987  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
17988  if test "x$COMPILER_BASENAME" = "xccache"; then
17989    { $as_echo "$as_me:$LINENO: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
17990$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
17991    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
17992    # We want to control ccache invocation ourselves, so ignore this cc and try
17993    # searching again.
17994
17995    # Remove the path to the fake ccache cc from the PATH
17996    RETRY_COMPILER_SAVED_PATH="$PATH"
17997    COMPILER_DIRNAME=`$DIRNAME $CC`
17998    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
17999
18000    # Try again looking for our compiler
18001    if test -n "$ac_tool_prefix"; then
18002  for ac_prog in $COMPILER_CHECK_LIST
18003  do
18004    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18005set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18006{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
18007$as_echo_n "checking for $ac_word... " >&6; }
18008if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then
18009  $as_echo_n "(cached) " >&6
18010else
18011  if test -n "$PROPER_COMPILER_CC"; then
18012  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18013else
18014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18015for as_dir in $PATH
18016do
18017  IFS=$as_save_IFS
18018  test -z "$as_dir" && as_dir=.
18019  for ac_exec_ext in '' $ac_executable_extensions; do
18020  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18021    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18022    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18023    break 2
18024  fi
18025done
18026done
18027IFS=$as_save_IFS
18028
18029fi
18030fi
18031PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18032if test -n "$PROPER_COMPILER_CC"; then
18033  { $as_echo "$as_me:$LINENO: result: $PROPER_COMPILER_CC" >&5
18034$as_echo "$PROPER_COMPILER_CC" >&6; }
18035else
18036  { $as_echo "$as_me:$LINENO: result: no" >&5
18037$as_echo "no" >&6; }
18038fi
18039
18040
18041    test -n "$PROPER_COMPILER_CC" && break
18042  done
18043fi
18044if test -z "$PROPER_COMPILER_CC"; then
18045  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18046  for ac_prog in $COMPILER_CHECK_LIST
18047do
18048  # Extract the first word of "$ac_prog", so it can be a program name with args.
18049set dummy $ac_prog; ac_word=$2
18050{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
18051$as_echo_n "checking for $ac_word... " >&6; }
18052if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then
18053  $as_echo_n "(cached) " >&6
18054else
18055  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18056  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18057else
18058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18059for as_dir in $PATH
18060do
18061  IFS=$as_save_IFS
18062  test -z "$as_dir" && as_dir=.
18063  for ac_exec_ext in '' $ac_executable_extensions; do
18064  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18065    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18066    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18067    break 2
18068  fi
18069done
18070done
18071IFS=$as_save_IFS
18072
18073fi
18074fi
18075ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18076if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18077  { $as_echo "$as_me:$LINENO: result: $ac_ct_PROPER_COMPILER_CC" >&5
18078$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18079else
18080  { $as_echo "$as_me:$LINENO: result: no" >&5
18081$as_echo "no" >&6; }
18082fi
18083
18084
18085  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18086done
18087
18088  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18089    PROPER_COMPILER_CC=""
18090  else
18091    case $cross_compiling:$ac_tool_warned in
18092yes:)
18093{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
18094$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18095ac_tool_warned=yes ;;
18096esac
18097    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18098  fi
18099fi
18100
18101
18102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18103
18104  # First separate the path from the arguments. This will split at the first
18105  # space.
18106  complete="$PROPER_COMPILER_CC"
18107  path="${complete%% *}"
18108  tmp="$complete EOL"
18109  arguments="${tmp#* }"
18110
18111  # Input might be given as Windows format, start by converting to
18112  # unix format.
18113  new_path=`$CYGPATH -u "$path"`
18114
18115  # Now try to locate executable using which
18116  new_path=`$WHICH "$new_path" 2> /dev/null`
18117  # bat and cmd files are not always considered executable in cygwin causing which
18118  # to not find them
18119  if test "x$new_path" = x \
18120           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18121           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18122    new_path=`$CYGPATH -u "$path"`
18123  fi
18124  if test "x$new_path" = x; then
18125    # Oops. Which didn't find the executable.
18126    # The splitting of arguments from the executable at a space might have been incorrect,
18127    # since paths with space are more likely in Windows. Give it another try with the whole
18128    # argument.
18129    path="$complete"
18130    arguments="EOL"
18131    new_path=`$CYGPATH -u "$path"`
18132    new_path=`$WHICH "$new_path" 2> /dev/null`
18133    # bat and cmd files are not always considered executable in cygwin causing which
18134    # to not find them
18135    if test "x$new_path" = x \
18136             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18137             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18138      new_path=`$CYGPATH -u "$path"`
18139    fi
18140    if test "x$new_path" = x; then
18141      # It's still not found. Now this is an unrecoverable error.
18142      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18143$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18144      has_space=`$ECHO "$complete" | $GREP " "`
18145      if test "x$has_space" != x; then
18146        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18147$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18148      fi
18149      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CC" >&5
18150$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CC" >&2;}
18151   { (exit 1); exit 1; }; }
18152    fi
18153  fi
18154
18155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18158  # "foo.exe" is OK but "foo" is an error.
18159  #
18160  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18161  # It is also a way to make sure we got the proper file name for the real test later on.
18162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18163  if test "x$test_shortpath" = x; then
18164    # Short path failed, file does not exist as specified.
18165    # Try adding .exe or .cmd
18166    if test -f "${new_path}.exe"; then
18167       input_to_shortpath="${new_path}.exe"
18168    elif test -f "${new_path}.cmd"; then
18169       input_to_shortpath="${new_path}.cmd"
18170    else
18171      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18172$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18173      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18174$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18175      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CC" >&5
18176$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CC" >&2;}
18177   { (exit 1); exit 1; }; }
18178    fi
18179  else
18180    input_to_shortpath="$new_path"
18181  fi
18182
18183  # Call helper function which possibly converts this using DOS-style short mode.
18184  # If so, the updated path is stored in $new_path.
18185  new_path="$input_to_shortpath"
18186
18187  input_path="$input_to_shortpath"
18188  # Check if we need to convert this using DOS-style short mode. If the path
18189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18190  # take no chances and rewrite it.
18191  # Note: m4 eats our [], so we need to use [ and ] instead.
18192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18193  if test "x$has_forbidden_chars" != x; then
18194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18198      # Going to short mode and back again did indeed matter. Since short mode is
18199      # case insensitive, let's make it lowercase to improve readability.
18200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18201      # Now convert it back to Unix-stile (cygpath)
18202      input_path=`$CYGPATH -u "$shortmode_path"`
18203      new_path="$input_path"
18204    fi
18205  fi
18206
18207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18208  if test "x$test_cygdrive_prefix" = x; then
18209    # As a simple fix, exclude /usr/bin since it's not a real path.
18210    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18212      # a path prefixed by /cygdrive for fixpath to work.
18213      new_path="$CYGWIN_ROOT_PATH$input_path"
18214    fi
18215  fi
18216
18217  # remove trailing .exe if any
18218  new_path="${new_path/%.exe/}"
18219
18220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18221
18222  # First separate the path from the arguments. This will split at the first
18223  # space.
18224  complete="$PROPER_COMPILER_CC"
18225  path="${complete%% *}"
18226  tmp="$complete EOL"
18227  arguments="${tmp#* }"
18228
18229  # Input might be given as Windows format, start by converting to
18230  # unix format.
18231  new_path="$path"
18232
18233  windows_path="$new_path"
18234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18235    unix_path=`$CYGPATH -u "$windows_path"`
18236    new_path="$unix_path"
18237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18239    new_path="$unix_path"
18240  fi
18241
18242
18243  # Now try to locate executable using which
18244  new_path=`$WHICH "$new_path" 2> /dev/null`
18245
18246  if test "x$new_path" = x; then
18247    # Oops. Which didn't find the executable.
18248    # The splitting of arguments from the executable at a space might have been incorrect,
18249    # since paths with space are more likely in Windows. Give it another try with the whole
18250    # argument.
18251    path="$complete"
18252    arguments="EOL"
18253    new_path="$path"
18254
18255  windows_path="$new_path"
18256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18257    unix_path=`$CYGPATH -u "$windows_path"`
18258    new_path="$unix_path"
18259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18261    new_path="$unix_path"
18262  fi
18263
18264
18265    new_path=`$WHICH "$new_path" 2> /dev/null`
18266
18267    if test "x$new_path" = x; then
18268      # It's still not found. Now this is an unrecoverable error.
18269      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18270$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18271      has_space=`$ECHO "$complete" | $GREP " "`
18272      if test "x$has_space" != x; then
18273        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18275      fi
18276      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CC" >&5
18277$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CC" >&2;}
18278   { (exit 1); exit 1; }; }
18279    fi
18280  fi
18281
18282  # Now new_path has a complete unix path to the binary
18283  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18284    # Keep paths in /bin as-is, but remove trailing .exe if any
18285    new_path="${new_path/%.exe/}"
18286    # Do not save /bin paths to all_fixpath_prefixes!
18287  else
18288    # Not in mixed or Windows style, start by that.
18289    new_path=`cmd //c echo $new_path`
18290
18291  input_path="$new_path"
18292  # Check if we need to convert this using DOS-style short mode. If the path
18293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18294  # take no chances and rewrite it.
18295  # Note: m4 eats our [], so we need to use [ and ] instead.
18296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18297  if test "x$has_forbidden_chars" != x; then
18298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18300  fi
18301
18302    # Output is in $new_path
18303
18304  windows_path="$new_path"
18305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18306    unix_path=`$CYGPATH -u "$windows_path"`
18307    new_path="$unix_path"
18308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18310    new_path="$unix_path"
18311  fi
18312
18313    # remove trailing .exe if any
18314    new_path="${new_path/%.exe/}"
18315
18316    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18317    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18318  fi
18319
18320  else
18321    # We're on a posix platform. Hooray! :)
18322    # First separate the path from the arguments. This will split at the first
18323    # space.
18324    complete="$PROPER_COMPILER_CC"
18325    path="${complete%% *}"
18326    tmp="$complete EOL"
18327    arguments="${tmp#* }"
18328
18329    new_path=`$WHICH $path 2> /dev/null`
18330    if test "x$new_path" = x; then
18331      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18332      if test "x$is_absolute_path" != x; then
18333        { $as_echo "$as_me:$LINENO: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&5
18334$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&6;}
18335        new_path="$path"
18336      else
18337        { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18338$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18339        has_space=`$ECHO "$complete" | $GREP " "`
18340        if test "x$has_space" != x; then
18341          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
18342$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18343        fi
18344        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CC" >&5
18345$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CC" >&2;}
18346   { (exit 1); exit 1; }; }
18347      fi
18348    fi
18349  fi
18350
18351  # Now join together the path and the arguments once again
18352  if test "x$arguments" != xEOL; then
18353      new_complete="$new_path ${arguments% *}"
18354  else
18355      new_complete="$new_path"
18356  fi
18357
18358  if test "x$complete" != "x$new_complete"; then
18359    PROPER_COMPILER_CC="$new_complete"
18360    { $as_echo "$as_me:$LINENO: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18361$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18362  fi
18363
18364    PATH="$RETRY_COMPILER_SAVED_PATH"
18365
18366    { $as_echo "$as_me:$LINENO: checking for resolved symbolic links for CC" >&5
18367$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18368
18369    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18370        # Follow a chain of symbolic links. Use readlink
18371        # where it exists, else fall back to horribly
18372        # complicated shell code.
18373        if test "x$READLINK_TESTED" != yes; then
18374            # On MacOSX there is a readlink tool with a different
18375            # purpose than the GNU readlink tool. Check the found readlink.
18376            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
18377            if test "x$ISGNU" = x; then
18378                 # A readlink that we do not know how to use.
18379                 # Are there other non-GNU readlinks out there?
18380                 READLINK_TESTED=yes
18381                 READLINK=
18382            fi
18383        fi
18384
18385        if test "x$READLINK" != x; then
18386            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18387        else
18388            STARTDIR=$PWD
18389            COUNTER=0
18390            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18391            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18392            while test $COUNTER -lt 20; do
18393                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18394                if test "x$ISLINK" == x; then
18395                    # This is not a symbolic link! We are done!
18396                    break
18397                fi
18398                # The link might be relative! We have to use cd to travel safely.
18399                cd $sym_link_dir
18400                # ... and we must get the to the absolute path, not one using symbolic links.
18401                cd `pwd -P`
18402                cd `$DIRNAME $ISLINK`
18403                sym_link_dir=`$THEPWDCMD`
18404                sym_link_file=`$BASENAME $ISLINK`
18405                let COUNTER=COUNTER+1
18406            done
18407            cd $STARTDIR
18408            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18409        fi
18410    fi
18411
18412    { $as_echo "$as_me:$LINENO: result: $PROPER_COMPILER_CC" >&5
18413$as_echo "$PROPER_COMPILER_CC" >&6; }
18414    CC="$PROPER_COMPILER_CC"
18415  else
18416    { $as_echo "$as_me:$LINENO: result: no, keeping CC" >&5
18417$as_echo "no, keeping CC" >&6; }
18418    CC="$TEST_COMPILER"
18419  fi
18420
18421  COMPILER=$CC
18422  COMPILER_NAME=$COMPILER_NAME
18423
18424  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18425    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18426    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18427    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18428    if test $? -ne 0; then
18429      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18430
18431      { $as_echo "$as_me:$LINENO: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
18432$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18433      { $as_echo "$as_me:$LINENO: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18434$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18435      { { $as_echo "$as_me:$LINENO: error: Sun Studio compiler is required. Try setting --with-tools-dir." >&5
18436$as_echo "$as_me: error: Sun Studio compiler is required. Try setting --with-tools-dir." >&2;}
18437   { (exit 1); exit 1; }; }
18438    else
18439      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18440      COMPILER_VENDOR="Sun Studio"
18441    fi
18442  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18443    # First line typically looks something like:
18444    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18445    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18446    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18447    COMPILER_VENDOR="Microsoft CL.EXE"
18448    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18449    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18450      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18451        { { $as_echo "$as_me:$LINENO: error: Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." >&5
18452$as_echo "$as_me: error: Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." >&2;}
18453   { (exit 1); exit 1; }; }
18454      fi
18455    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18456      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18457        { { $as_echo "$as_me:$LINENO: error: Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." >&5
18458$as_echo "$as_me: error: Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." >&2;}
18459   { (exit 1); exit 1; }; }
18460      fi
18461    fi
18462  else
18463    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18464    # Check that this is likely to be GCC.
18465    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18466    if test $? -ne 0; then
18467      { $as_echo "$as_me:$LINENO: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18468$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18469      { $as_echo "$as_me:$LINENO: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18470$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18471      { { $as_echo "$as_me:$LINENO: error: GCC compiler is required. Try setting --with-tools-dir." >&5
18472$as_echo "$as_me: error: GCC compiler is required. Try setting --with-tools-dir." >&2;}
18473   { (exit 1); exit 1; }; }
18474    fi
18475
18476    # First line typically looks something like:
18477    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18478    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18479    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18480  fi
18481  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18482  CC_VERSION="$COMPILER_VERSION"
18483  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18484  CC_VENDOR="$COMPILER_VENDOR"
18485
18486  { $as_echo "$as_me:$LINENO: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
18487$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
18488
18489
18490# Now that we have resolved CC ourself, let autoconf have it's go at it
18491ac_ext=c
18492ac_cpp='$CPP $CPPFLAGS'
18493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18495ac_compiler_gnu=$ac_cv_c_compiler_gnu
18496if test -n "$ac_tool_prefix"; then
18497  for ac_prog in $CC
18498  do
18499    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18500set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18501{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
18502$as_echo_n "checking for $ac_word... " >&6; }
18503if test "${ac_cv_prog_CC+set}" = set; then
18504  $as_echo_n "(cached) " >&6
18505else
18506  if test -n "$CC"; then
18507  ac_cv_prog_CC="$CC" # Let the user override the test.
18508else
18509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18510for as_dir in $PATH
18511do
18512  IFS=$as_save_IFS
18513  test -z "$as_dir" && as_dir=.
18514  for ac_exec_ext in '' $ac_executable_extensions; do
18515  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18516    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
18517    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18518    break 2
18519  fi
18520done
18521done
18522IFS=$as_save_IFS
18523
18524fi
18525fi
18526CC=$ac_cv_prog_CC
18527if test -n "$CC"; then
18528  { $as_echo "$as_me:$LINENO: result: $CC" >&5
18529$as_echo "$CC" >&6; }
18530else
18531  { $as_echo "$as_me:$LINENO: result: no" >&5
18532$as_echo "no" >&6; }
18533fi
18534
18535
18536    test -n "$CC" && break
18537  done
18538fi
18539if test -z "$CC"; then
18540  ac_ct_CC=$CC
18541  for ac_prog in $CC
18542do
18543  # Extract the first word of "$ac_prog", so it can be a program name with args.
18544set dummy $ac_prog; ac_word=$2
18545{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
18546$as_echo_n "checking for $ac_word... " >&6; }
18547if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
18548  $as_echo_n "(cached) " >&6
18549else
18550  if test -n "$ac_ct_CC"; then
18551  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
18552else
18553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18554for as_dir in $PATH
18555do
18556  IFS=$as_save_IFS
18557  test -z "$as_dir" && as_dir=.
18558  for ac_exec_ext in '' $ac_executable_extensions; do
18559  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18560    ac_cv_prog_ac_ct_CC="$ac_prog"
18561    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18562    break 2
18563  fi
18564done
18565done
18566IFS=$as_save_IFS
18567
18568fi
18569fi
18570ac_ct_CC=$ac_cv_prog_ac_ct_CC
18571if test -n "$ac_ct_CC"; then
18572  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
18573$as_echo "$ac_ct_CC" >&6; }
18574else
18575  { $as_echo "$as_me:$LINENO: result: no" >&5
18576$as_echo "no" >&6; }
18577fi
18578
18579
18580  test -n "$ac_ct_CC" && break
18581done
18582
18583  if test "x$ac_ct_CC" = x; then
18584    CC=""
18585  else
18586    case $cross_compiling:$ac_tool_warned in
18587yes:)
18588{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
18589$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18590ac_tool_warned=yes ;;
18591esac
18592    CC=$ac_ct_CC
18593  fi
18594fi
18595
18596
18597test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18599{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
18600See \`config.log' for more details." >&5
18601$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
18602See \`config.log' for more details." >&2;}
18603   { (exit 1); exit 1; }; }; }
18604
18605# Provide some information about the compiler.
18606$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
18607set X $ac_compile
18608ac_compiler=$2
18609{ (ac_try="$ac_compiler --version >&5"
18610case "(($ac_try" in
18611  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18612  *) ac_try_echo=$ac_try;;
18613esac
18614eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18615$as_echo "$ac_try_echo") >&5
18616  (eval "$ac_compiler --version >&5") 2>&5
18617  ac_status=$?
18618  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18619  (exit $ac_status); }
18620{ (ac_try="$ac_compiler -v >&5"
18621case "(($ac_try" in
18622  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18623  *) ac_try_echo=$ac_try;;
18624esac
18625eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18626$as_echo "$ac_try_echo") >&5
18627  (eval "$ac_compiler -v >&5") 2>&5
18628  ac_status=$?
18629  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18630  (exit $ac_status); }
18631{ (ac_try="$ac_compiler -V >&5"
18632case "(($ac_try" in
18633  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18634  *) ac_try_echo=$ac_try;;
18635esac
18636eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18637$as_echo "$ac_try_echo") >&5
18638  (eval "$ac_compiler -V >&5") 2>&5
18639  ac_status=$?
18640  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18641  (exit $ac_status); }
18642
18643cat >conftest.$ac_ext <<_ACEOF
18644/* confdefs.h.  */
18645_ACEOF
18646cat confdefs.h >>conftest.$ac_ext
18647cat >>conftest.$ac_ext <<_ACEOF
18648/* end confdefs.h.  */
18649
18650int
18651main ()
18652{
18653
18654  ;
18655  return 0;
18656}
18657_ACEOF
18658ac_clean_files_save=$ac_clean_files
18659ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
18660# Try to create an executable without -o first, disregard a.out.
18661# It will help us diagnose broken compilers, and finding out an intuition
18662# of exeext.
18663{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
18664$as_echo_n "checking for C compiler default output file name... " >&6; }
18665ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
18666
18667# The possible output files:
18668ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
18669
18670ac_rmfiles=
18671for ac_file in $ac_files
18672do
18673  case $ac_file in
18674    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18675    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
18676  esac
18677done
18678rm -f $ac_rmfiles
18679
18680if { (ac_try="$ac_link_default"
18681case "(($ac_try" in
18682  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18683  *) ac_try_echo=$ac_try;;
18684esac
18685eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18686$as_echo "$ac_try_echo") >&5
18687  (eval "$ac_link_default") 2>&5
18688  ac_status=$?
18689  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18690  (exit $ac_status); }; then
18691  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
18692# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
18693# in a Makefile.  We should not override ac_cv_exeext if it was cached,
18694# so that the user can short-circuit this test for compilers unknown to
18695# Autoconf.
18696for ac_file in $ac_files ''
18697do
18698  test -f "$ac_file" || continue
18699  case $ac_file in
18700    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
18701	;;
18702    [ab].out )
18703	# We found the default executable, but exeext='' is most
18704	# certainly right.
18705	break;;
18706    *.* )
18707        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
18708	then :; else
18709	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18710	fi
18711	# We set ac_cv_exeext here because the later test for it is not
18712	# safe: cross compilers may not add the suffix if given an `-o'
18713	# argument, so we may need to know it at that point already.
18714	# Even if this section looks crufty: it has the advantage of
18715	# actually working.
18716	break;;
18717    * )
18718	break;;
18719  esac
18720done
18721test "$ac_cv_exeext" = no && ac_cv_exeext=
18722
18723else
18724  ac_file=''
18725fi
18726
18727{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
18728$as_echo "$ac_file" >&6; }
18729if test -z "$ac_file"; then
18730  $as_echo "$as_me: failed program was:" >&5
18731sed 's/^/| /' conftest.$ac_ext >&5
18732
18733{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18735{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
18736See \`config.log' for more details." >&5
18737$as_echo "$as_me: error: C compiler cannot create executables
18738See \`config.log' for more details." >&2;}
18739   { (exit 77); exit 77; }; }; }
18740fi
18741
18742ac_exeext=$ac_cv_exeext
18743
18744# Check that the compiler produces executables we can run.  If not, either
18745# the compiler is broken, or we cross compile.
18746{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
18747$as_echo_n "checking whether the C compiler works... " >&6; }
18748# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
18749# If not cross compiling, check that we can run a simple program.
18750if test "$cross_compiling" != yes; then
18751  if { ac_try='./$ac_file'
18752  { (case "(($ac_try" in
18753  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18754  *) ac_try_echo=$ac_try;;
18755esac
18756eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18757$as_echo "$ac_try_echo") >&5
18758  (eval "$ac_try") 2>&5
18759  ac_status=$?
18760  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18761  (exit $ac_status); }; }; then
18762    cross_compiling=no
18763  else
18764    if test "$cross_compiling" = maybe; then
18765	cross_compiling=yes
18766    else
18767	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18768$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18769{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
18770If you meant to cross compile, use \`--host'.
18771See \`config.log' for more details." >&5
18772$as_echo "$as_me: error: cannot run C compiled programs.
18773If you meant to cross compile, use \`--host'.
18774See \`config.log' for more details." >&2;}
18775   { (exit 1); exit 1; }; }; }
18776    fi
18777  fi
18778fi
18779{ $as_echo "$as_me:$LINENO: result: yes" >&5
18780$as_echo "yes" >&6; }
18781
18782rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
18783ac_clean_files=$ac_clean_files_save
18784# Check that the compiler produces executables we can run.  If not, either
18785# the compiler is broken, or we cross compile.
18786{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
18787$as_echo_n "checking whether we are cross compiling... " >&6; }
18788{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
18789$as_echo "$cross_compiling" >&6; }
18790
18791{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
18792$as_echo_n "checking for suffix of executables... " >&6; }
18793if { (ac_try="$ac_link"
18794case "(($ac_try" in
18795  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18796  *) ac_try_echo=$ac_try;;
18797esac
18798eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18799$as_echo "$ac_try_echo") >&5
18800  (eval "$ac_link") 2>&5
18801  ac_status=$?
18802  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18803  (exit $ac_status); }; then
18804  # If both `conftest.exe' and `conftest' are `present' (well, observable)
18805# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
18806# work properly (i.e., refer to `conftest.exe'), while it won't with
18807# `rm'.
18808for ac_file in conftest.exe conftest conftest.*; do
18809  test -f "$ac_file" || continue
18810  case $ac_file in
18811    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18812    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18813	  break;;
18814    * ) break;;
18815  esac
18816done
18817else
18818  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18819$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18820{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
18821See \`config.log' for more details." >&5
18822$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
18823See \`config.log' for more details." >&2;}
18824   { (exit 1); exit 1; }; }; }
18825fi
18826
18827rm -f conftest$ac_cv_exeext
18828{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
18829$as_echo "$ac_cv_exeext" >&6; }
18830
18831rm -f conftest.$ac_ext
18832EXEEXT=$ac_cv_exeext
18833ac_exeext=$EXEEXT
18834{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
18835$as_echo_n "checking for suffix of object files... " >&6; }
18836if test "${ac_cv_objext+set}" = set; then
18837  $as_echo_n "(cached) " >&6
18838else
18839  cat >conftest.$ac_ext <<_ACEOF
18840/* confdefs.h.  */
18841_ACEOF
18842cat confdefs.h >>conftest.$ac_ext
18843cat >>conftest.$ac_ext <<_ACEOF
18844/* end confdefs.h.  */
18845
18846int
18847main ()
18848{
18849
18850  ;
18851  return 0;
18852}
18853_ACEOF
18854rm -f conftest.o conftest.obj
18855if { (ac_try="$ac_compile"
18856case "(($ac_try" in
18857  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18858  *) ac_try_echo=$ac_try;;
18859esac
18860eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18861$as_echo "$ac_try_echo") >&5
18862  (eval "$ac_compile") 2>&5
18863  ac_status=$?
18864  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18865  (exit $ac_status); }; then
18866  for ac_file in conftest.o conftest.obj conftest.*; do
18867  test -f "$ac_file" || continue;
18868  case $ac_file in
18869    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
18870    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
18871       break;;
18872  esac
18873done
18874else
18875  $as_echo "$as_me: failed program was:" >&5
18876sed 's/^/| /' conftest.$ac_ext >&5
18877
18878{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18880{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
18881See \`config.log' for more details." >&5
18882$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
18883See \`config.log' for more details." >&2;}
18884   { (exit 1); exit 1; }; }; }
18885fi
18886
18887rm -f conftest.$ac_cv_objext conftest.$ac_ext
18888fi
18889{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
18890$as_echo "$ac_cv_objext" >&6; }
18891OBJEXT=$ac_cv_objext
18892ac_objext=$OBJEXT
18893{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
18894$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
18895if test "${ac_cv_c_compiler_gnu+set}" = set; then
18896  $as_echo_n "(cached) " >&6
18897else
18898  cat >conftest.$ac_ext <<_ACEOF
18899/* confdefs.h.  */
18900_ACEOF
18901cat confdefs.h >>conftest.$ac_ext
18902cat >>conftest.$ac_ext <<_ACEOF
18903/* end confdefs.h.  */
18904
18905int
18906main ()
18907{
18908#ifndef __GNUC__
18909       choke me
18910#endif
18911
18912  ;
18913  return 0;
18914}
18915_ACEOF
18916rm -f conftest.$ac_objext
18917if { (ac_try="$ac_compile"
18918case "(($ac_try" in
18919  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18920  *) ac_try_echo=$ac_try;;
18921esac
18922eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18923$as_echo "$ac_try_echo") >&5
18924  (eval "$ac_compile") 2>conftest.er1
18925  ac_status=$?
18926  grep -v '^ *+' conftest.er1 >conftest.err
18927  rm -f conftest.er1
18928  cat conftest.err >&5
18929  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18930  (exit $ac_status); } && {
18931	 test -z "$ac_c_werror_flag" ||
18932	 test ! -s conftest.err
18933       } && test -s conftest.$ac_objext; then
18934  ac_compiler_gnu=yes
18935else
18936  $as_echo "$as_me: failed program was:" >&5
18937sed 's/^/| /' conftest.$ac_ext >&5
18938
18939	ac_compiler_gnu=no
18940fi
18941
18942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18943ac_cv_c_compiler_gnu=$ac_compiler_gnu
18944
18945fi
18946{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
18947$as_echo "$ac_cv_c_compiler_gnu" >&6; }
18948if test $ac_compiler_gnu = yes; then
18949  GCC=yes
18950else
18951  GCC=
18952fi
18953ac_test_CFLAGS=${CFLAGS+set}
18954ac_save_CFLAGS=$CFLAGS
18955{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
18956$as_echo_n "checking whether $CC accepts -g... " >&6; }
18957if test "${ac_cv_prog_cc_g+set}" = set; then
18958  $as_echo_n "(cached) " >&6
18959else
18960  ac_save_c_werror_flag=$ac_c_werror_flag
18961   ac_c_werror_flag=yes
18962   ac_cv_prog_cc_g=no
18963   CFLAGS="-g"
18964   cat >conftest.$ac_ext <<_ACEOF
18965/* confdefs.h.  */
18966_ACEOF
18967cat confdefs.h >>conftest.$ac_ext
18968cat >>conftest.$ac_ext <<_ACEOF
18969/* end confdefs.h.  */
18970
18971int
18972main ()
18973{
18974
18975  ;
18976  return 0;
18977}
18978_ACEOF
18979rm -f conftest.$ac_objext
18980if { (ac_try="$ac_compile"
18981case "(($ac_try" in
18982  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18983  *) ac_try_echo=$ac_try;;
18984esac
18985eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18986$as_echo "$ac_try_echo") >&5
18987  (eval "$ac_compile") 2>conftest.er1
18988  ac_status=$?
18989  grep -v '^ *+' conftest.er1 >conftest.err
18990  rm -f conftest.er1
18991  cat conftest.err >&5
18992  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18993  (exit $ac_status); } && {
18994	 test -z "$ac_c_werror_flag" ||
18995	 test ! -s conftest.err
18996       } && test -s conftest.$ac_objext; then
18997  ac_cv_prog_cc_g=yes
18998else
18999  $as_echo "$as_me: failed program was:" >&5
19000sed 's/^/| /' conftest.$ac_ext >&5
19001
19002	CFLAGS=""
19003      cat >conftest.$ac_ext <<_ACEOF
19004/* confdefs.h.  */
19005_ACEOF
19006cat confdefs.h >>conftest.$ac_ext
19007cat >>conftest.$ac_ext <<_ACEOF
19008/* end confdefs.h.  */
19009
19010int
19011main ()
19012{
19013
19014  ;
19015  return 0;
19016}
19017_ACEOF
19018rm -f conftest.$ac_objext
19019if { (ac_try="$ac_compile"
19020case "(($ac_try" in
19021  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19022  *) ac_try_echo=$ac_try;;
19023esac
19024eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19025$as_echo "$ac_try_echo") >&5
19026  (eval "$ac_compile") 2>conftest.er1
19027  ac_status=$?
19028  grep -v '^ *+' conftest.er1 >conftest.err
19029  rm -f conftest.er1
19030  cat conftest.err >&5
19031  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19032  (exit $ac_status); } && {
19033	 test -z "$ac_c_werror_flag" ||
19034	 test ! -s conftest.err
19035       } && test -s conftest.$ac_objext; then
19036  :
19037else
19038  $as_echo "$as_me: failed program was:" >&5
19039sed 's/^/| /' conftest.$ac_ext >&5
19040
19041	ac_c_werror_flag=$ac_save_c_werror_flag
19042	 CFLAGS="-g"
19043	 cat >conftest.$ac_ext <<_ACEOF
19044/* confdefs.h.  */
19045_ACEOF
19046cat confdefs.h >>conftest.$ac_ext
19047cat >>conftest.$ac_ext <<_ACEOF
19048/* end confdefs.h.  */
19049
19050int
19051main ()
19052{
19053
19054  ;
19055  return 0;
19056}
19057_ACEOF
19058rm -f conftest.$ac_objext
19059if { (ac_try="$ac_compile"
19060case "(($ac_try" in
19061  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19062  *) ac_try_echo=$ac_try;;
19063esac
19064eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19065$as_echo "$ac_try_echo") >&5
19066  (eval "$ac_compile") 2>conftest.er1
19067  ac_status=$?
19068  grep -v '^ *+' conftest.er1 >conftest.err
19069  rm -f conftest.er1
19070  cat conftest.err >&5
19071  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19072  (exit $ac_status); } && {
19073	 test -z "$ac_c_werror_flag" ||
19074	 test ! -s conftest.err
19075       } && test -s conftest.$ac_objext; then
19076  ac_cv_prog_cc_g=yes
19077else
19078  $as_echo "$as_me: failed program was:" >&5
19079sed 's/^/| /' conftest.$ac_ext >&5
19080
19081
19082fi
19083
19084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19085fi
19086
19087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19088fi
19089
19090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19091   ac_c_werror_flag=$ac_save_c_werror_flag
19092fi
19093{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
19094$as_echo "$ac_cv_prog_cc_g" >&6; }
19095if test "$ac_test_CFLAGS" = set; then
19096  CFLAGS=$ac_save_CFLAGS
19097elif test $ac_cv_prog_cc_g = yes; then
19098  if test "$GCC" = yes; then
19099    CFLAGS="-g -O2"
19100  else
19101    CFLAGS="-g"
19102  fi
19103else
19104  if test "$GCC" = yes; then
19105    CFLAGS="-O2"
19106  else
19107    CFLAGS=
19108  fi
19109fi
19110{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
19111$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19112if test "${ac_cv_prog_cc_c89+set}" = set; then
19113  $as_echo_n "(cached) " >&6
19114else
19115  ac_cv_prog_cc_c89=no
19116ac_save_CC=$CC
19117cat >conftest.$ac_ext <<_ACEOF
19118/* confdefs.h.  */
19119_ACEOF
19120cat confdefs.h >>conftest.$ac_ext
19121cat >>conftest.$ac_ext <<_ACEOF
19122/* end confdefs.h.  */
19123#include <stdarg.h>
19124#include <stdio.h>
19125#include <sys/types.h>
19126#include <sys/stat.h>
19127/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19128struct buf { int x; };
19129FILE * (*rcsopen) (struct buf *, struct stat *, int);
19130static char *e (p, i)
19131     char **p;
19132     int i;
19133{
19134  return p[i];
19135}
19136static char *f (char * (*g) (char **, int), char **p, ...)
19137{
19138  char *s;
19139  va_list v;
19140  va_start (v,p);
19141  s = g (p, va_arg (v,int));
19142  va_end (v);
19143  return s;
19144}
19145
19146/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19147   function prototypes and stuff, but not '\xHH' hex character constants.
19148   These don't provoke an error unfortunately, instead are silently treated
19149   as 'x'.  The following induces an error, until -std is added to get
19150   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19151   array size at least.  It's necessary to write '\x00'==0 to get something
19152   that's true only with -std.  */
19153int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19154
19155/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19156   inside strings and character constants.  */
19157#define FOO(x) 'x'
19158int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19159
19160int test (int i, double x);
19161struct s1 {int (*f) (int a);};
19162struct s2 {int (*f) (double a);};
19163int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19164int argc;
19165char **argv;
19166int
19167main ()
19168{
19169return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19170  ;
19171  return 0;
19172}
19173_ACEOF
19174for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19175	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19176do
19177  CC="$ac_save_CC $ac_arg"
19178  rm -f conftest.$ac_objext
19179if { (ac_try="$ac_compile"
19180case "(($ac_try" in
19181  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19182  *) ac_try_echo=$ac_try;;
19183esac
19184eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19185$as_echo "$ac_try_echo") >&5
19186  (eval "$ac_compile") 2>conftest.er1
19187  ac_status=$?
19188  grep -v '^ *+' conftest.er1 >conftest.err
19189  rm -f conftest.er1
19190  cat conftest.err >&5
19191  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19192  (exit $ac_status); } && {
19193	 test -z "$ac_c_werror_flag" ||
19194	 test ! -s conftest.err
19195       } && test -s conftest.$ac_objext; then
19196  ac_cv_prog_cc_c89=$ac_arg
19197else
19198  $as_echo "$as_me: failed program was:" >&5
19199sed 's/^/| /' conftest.$ac_ext >&5
19200
19201
19202fi
19203
19204rm -f core conftest.err conftest.$ac_objext
19205  test "x$ac_cv_prog_cc_c89" != "xno" && break
19206done
19207rm -f conftest.$ac_ext
19208CC=$ac_save_CC
19209
19210fi
19211# AC_CACHE_VAL
19212case "x$ac_cv_prog_cc_c89" in
19213  x)
19214    { $as_echo "$as_me:$LINENO: result: none needed" >&5
19215$as_echo "none needed" >&6; } ;;
19216  xno)
19217    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
19218$as_echo "unsupported" >&6; } ;;
19219  *)
19220    CC="$CC $ac_cv_prog_cc_c89"
19221    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
19222$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19223esac
19224
19225
19226ac_ext=cpp
19227ac_cpp='$CXXCPP $CPPFLAGS'
19228ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19229ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19230ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19231
19232
19233### Locate C++ compiler (CXX)
19234
19235if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19236  # Do not probe for CC on MacOSX.
19237  COMPILER_CHECK_LIST="cl g++"
19238else
19239  COMPILER_CHECK_LIST="cl CC g++"
19240fi
19241
19242  COMPILER_NAME=C++
19243
19244  # Do a first initial attempt at searching the list of compiler names.
19245  # AC_PATH_PROGS can't be run multiple times with the same variable,
19246  # so create a new name for this run.
19247  for ac_prog in $COMPILER_CHECK_LIST
19248do
19249  # Extract the first word of "$ac_prog", so it can be a program name with args.
19250set dummy $ac_prog; ac_word=$2
19251{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
19252$as_echo_n "checking for $ac_word... " >&6; }
19253if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then
19254  $as_echo_n "(cached) " >&6
19255else
19256  case $POTENTIAL_CXX in
19257  [\\/]* | ?:[\\/]*)
19258  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19259  ;;
19260  *)
19261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19262for as_dir in $PATH
19263do
19264  IFS=$as_save_IFS
19265  test -z "$as_dir" && as_dir=.
19266  for ac_exec_ext in '' $ac_executable_extensions; do
19267  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19268    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19269    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19270    break 2
19271  fi
19272done
19273done
19274IFS=$as_save_IFS
19275
19276  ;;
19277esac
19278fi
19279POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19280if test -n "$POTENTIAL_CXX"; then
19281  { $as_echo "$as_me:$LINENO: result: $POTENTIAL_CXX" >&5
19282$as_echo "$POTENTIAL_CXX" >&6; }
19283else
19284  { $as_echo "$as_me:$LINENO: result: no" >&5
19285$as_echo "no" >&6; }
19286fi
19287
19288
19289  test -n "$POTENTIAL_CXX" && break
19290done
19291
19292  CXX=$POTENTIAL_CXX
19293
19294  if test "x$$CXX" = x; then
19295
19296    # Print a helpful message on how to acquire the necessary build dependency.
19297    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19298    MISSING_DEPENDENCY=devkit
19299    PKGHANDLER_COMMAND=
19300
19301    case $PKGHANDLER in
19302	apt-get)
19303                apt_help     $MISSING_DEPENDENCY ;;
19304    yum)
19305                yum_help     $MISSING_DEPENDENCY ;;
19306	port)
19307                port_help    $MISSING_DEPENDENCY ;;
19308	pkgutil)
19309                pkgutil_help $MISSING_DEPENDENCY ;;
19310	pkgadd)
19311                pkgadd_help  $MISSING_DEPENDENCY ;;
19312    * )
19313      break ;;
19314    esac
19315
19316    if test "x$PKGHANDLER_COMMAND" != x; then
19317        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19318    fi
19319
19320      { { $as_echo "$as_me:$LINENO: error: Could not find a $COMPILER_NAME compiler. $HELP_MSG" >&5
19321$as_echo "$as_me: error: Could not find a $COMPILER_NAME compiler. $HELP_MSG" >&2;}
19322   { (exit 1); exit 1; }; }
19323  fi
19324
19325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19326
19327  # First separate the path from the arguments. This will split at the first
19328  # space.
19329  complete="$CXX"
19330  path="${complete%% *}"
19331  tmp="$complete EOL"
19332  arguments="${tmp#* }"
19333
19334  # Input might be given as Windows format, start by converting to
19335  # unix format.
19336  new_path=`$CYGPATH -u "$path"`
19337
19338  # Now try to locate executable using which
19339  new_path=`$WHICH "$new_path" 2> /dev/null`
19340  # bat and cmd files are not always considered executable in cygwin causing which
19341  # to not find them
19342  if test "x$new_path" = x \
19343           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19344           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19345    new_path=`$CYGPATH -u "$path"`
19346  fi
19347  if test "x$new_path" = x; then
19348    # Oops. Which didn't find the executable.
19349    # The splitting of arguments from the executable at a space might have been incorrect,
19350    # since paths with space are more likely in Windows. Give it another try with the whole
19351    # argument.
19352    path="$complete"
19353    arguments="EOL"
19354    new_path=`$CYGPATH -u "$path"`
19355    new_path=`$WHICH "$new_path" 2> /dev/null`
19356    # bat and cmd files are not always considered executable in cygwin causing which
19357    # to not find them
19358    if test "x$new_path" = x \
19359             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19360             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19361      new_path=`$CYGPATH -u "$path"`
19362    fi
19363    if test "x$new_path" = x; then
19364      # It's still not found. Now this is an unrecoverable error.
19365      { $as_echo "$as_me:$LINENO: The path of CXX, which resolves as \"$complete\", is not found." >&5
19366$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19367      has_space=`$ECHO "$complete" | $GREP " "`
19368      if test "x$has_space" != x; then
19369        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19371      fi
19372      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXX" >&5
19373$as_echo "$as_me: error: Cannot locate the the path of CXX" >&2;}
19374   { (exit 1); exit 1; }; }
19375    fi
19376  fi
19377
19378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19381  # "foo.exe" is OK but "foo" is an error.
19382  #
19383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19384  # It is also a way to make sure we got the proper file name for the real test later on.
19385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19386  if test "x$test_shortpath" = x; then
19387    # Short path failed, file does not exist as specified.
19388    # Try adding .exe or .cmd
19389    if test -f "${new_path}.exe"; then
19390       input_to_shortpath="${new_path}.exe"
19391    elif test -f "${new_path}.cmd"; then
19392       input_to_shortpath="${new_path}.cmd"
19393    else
19394      { $as_echo "$as_me:$LINENO: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19395$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19396      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19397$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19398      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXX" >&5
19399$as_echo "$as_me: error: Cannot locate the the path of CXX" >&2;}
19400   { (exit 1); exit 1; }; }
19401    fi
19402  else
19403    input_to_shortpath="$new_path"
19404  fi
19405
19406  # Call helper function which possibly converts this using DOS-style short mode.
19407  # If so, the updated path is stored in $new_path.
19408  new_path="$input_to_shortpath"
19409
19410  input_path="$input_to_shortpath"
19411  # Check if we need to convert this using DOS-style short mode. If the path
19412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19413  # take no chances and rewrite it.
19414  # Note: m4 eats our [], so we need to use [ and ] instead.
19415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19416  if test "x$has_forbidden_chars" != x; then
19417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19421      # Going to short mode and back again did indeed matter. Since short mode is
19422      # case insensitive, let's make it lowercase to improve readability.
19423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19424      # Now convert it back to Unix-stile (cygpath)
19425      input_path=`$CYGPATH -u "$shortmode_path"`
19426      new_path="$input_path"
19427    fi
19428  fi
19429
19430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19431  if test "x$test_cygdrive_prefix" = x; then
19432    # As a simple fix, exclude /usr/bin since it's not a real path.
19433    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19435      # a path prefixed by /cygdrive for fixpath to work.
19436      new_path="$CYGWIN_ROOT_PATH$input_path"
19437    fi
19438  fi
19439
19440  # remove trailing .exe if any
19441  new_path="${new_path/%.exe/}"
19442
19443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19444
19445  # First separate the path from the arguments. This will split at the first
19446  # space.
19447  complete="$CXX"
19448  path="${complete%% *}"
19449  tmp="$complete EOL"
19450  arguments="${tmp#* }"
19451
19452  # Input might be given as Windows format, start by converting to
19453  # unix format.
19454  new_path="$path"
19455
19456  windows_path="$new_path"
19457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19458    unix_path=`$CYGPATH -u "$windows_path"`
19459    new_path="$unix_path"
19460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19462    new_path="$unix_path"
19463  fi
19464
19465
19466  # Now try to locate executable using which
19467  new_path=`$WHICH "$new_path" 2> /dev/null`
19468
19469  if test "x$new_path" = x; then
19470    # Oops. Which didn't find the executable.
19471    # The splitting of arguments from the executable at a space might have been incorrect,
19472    # since paths with space are more likely in Windows. Give it another try with the whole
19473    # argument.
19474    path="$complete"
19475    arguments="EOL"
19476    new_path="$path"
19477
19478  windows_path="$new_path"
19479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19480    unix_path=`$CYGPATH -u "$windows_path"`
19481    new_path="$unix_path"
19482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19484    new_path="$unix_path"
19485  fi
19486
19487
19488    new_path=`$WHICH "$new_path" 2> /dev/null`
19489
19490    if test "x$new_path" = x; then
19491      # It's still not found. Now this is an unrecoverable error.
19492      { $as_echo "$as_me:$LINENO: The path of CXX, which resolves as \"$complete\", is not found." >&5
19493$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19494      has_space=`$ECHO "$complete" | $GREP " "`
19495      if test "x$has_space" != x; then
19496        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19497$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19498      fi
19499      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXX" >&5
19500$as_echo "$as_me: error: Cannot locate the the path of CXX" >&2;}
19501   { (exit 1); exit 1; }; }
19502    fi
19503  fi
19504
19505  # Now new_path has a complete unix path to the binary
19506  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19507    # Keep paths in /bin as-is, but remove trailing .exe if any
19508    new_path="${new_path/%.exe/}"
19509    # Do not save /bin paths to all_fixpath_prefixes!
19510  else
19511    # Not in mixed or Windows style, start by that.
19512    new_path=`cmd //c echo $new_path`
19513
19514  input_path="$new_path"
19515  # Check if we need to convert this using DOS-style short mode. If the path
19516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19517  # take no chances and rewrite it.
19518  # Note: m4 eats our [], so we need to use [ and ] instead.
19519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19520  if test "x$has_forbidden_chars" != x; then
19521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19523  fi
19524
19525    # Output is in $new_path
19526
19527  windows_path="$new_path"
19528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19529    unix_path=`$CYGPATH -u "$windows_path"`
19530    new_path="$unix_path"
19531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19533    new_path="$unix_path"
19534  fi
19535
19536    # remove trailing .exe if any
19537    new_path="${new_path/%.exe/}"
19538
19539    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19540    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19541  fi
19542
19543  else
19544    # We're on a posix platform. Hooray! :)
19545    # First separate the path from the arguments. This will split at the first
19546    # space.
19547    complete="$CXX"
19548    path="${complete%% *}"
19549    tmp="$complete EOL"
19550    arguments="${tmp#* }"
19551
19552    new_path=`$WHICH $path 2> /dev/null`
19553    if test "x$new_path" = x; then
19554      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19555      if test "x$is_absolute_path" != x; then
19556        { $as_echo "$as_me:$LINENO: Resolving CXX (as $path) with 'which' failed, using $path directly." >&5
19557$as_echo "$as_me: Resolving CXX (as $path) with 'which' failed, using $path directly." >&6;}
19558        new_path="$path"
19559      else
19560        { $as_echo "$as_me:$LINENO: The path of CXX, which resolves as \"$complete\", is not found." >&5
19561$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19562        has_space=`$ECHO "$complete" | $GREP " "`
19563        if test "x$has_space" != x; then
19564          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
19565$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19566        fi
19567        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXX" >&5
19568$as_echo "$as_me: error: Cannot locate the the path of CXX" >&2;}
19569   { (exit 1); exit 1; }; }
19570      fi
19571    fi
19572  fi
19573
19574  # Now join together the path and the arguments once again
19575  if test "x$arguments" != xEOL; then
19576      new_complete="$new_path ${arguments% *}"
19577  else
19578      new_complete="$new_path"
19579  fi
19580
19581  if test "x$complete" != "x$new_complete"; then
19582    CXX="$new_complete"
19583    { $as_echo "$as_me:$LINENO: Rewriting CXX to \"$new_complete\"" >&5
19584$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
19585  fi
19586
19587  { $as_echo "$as_me:$LINENO: checking resolved symbolic links for CXX" >&5
19588$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
19589  TEST_COMPILER="$CXX"
19590
19591    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19592        # Follow a chain of symbolic links. Use readlink
19593        # where it exists, else fall back to horribly
19594        # complicated shell code.
19595        if test "x$READLINK_TESTED" != yes; then
19596            # On MacOSX there is a readlink tool with a different
19597            # purpose than the GNU readlink tool. Check the found readlink.
19598            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
19599            if test "x$ISGNU" = x; then
19600                 # A readlink that we do not know how to use.
19601                 # Are there other non-GNU readlinks out there?
19602                 READLINK_TESTED=yes
19603                 READLINK=
19604            fi
19605        fi
19606
19607        if test "x$READLINK" != x; then
19608            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19609        else
19610            STARTDIR=$PWD
19611            COUNTER=0
19612            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19613            sym_link_file=`$BASENAME $TEST_COMPILER`
19614            while test $COUNTER -lt 20; do
19615                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19616                if test "x$ISLINK" == x; then
19617                    # This is not a symbolic link! We are done!
19618                    break
19619                fi
19620                # The link might be relative! We have to use cd to travel safely.
19621                cd $sym_link_dir
19622                # ... and we must get the to the absolute path, not one using symbolic links.
19623                cd `pwd -P`
19624                cd `$DIRNAME $ISLINK`
19625                sym_link_dir=`$THEPWDCMD`
19626                sym_link_file=`$BASENAME $ISLINK`
19627                let COUNTER=COUNTER+1
19628            done
19629            cd $STARTDIR
19630            TEST_COMPILER=$sym_link_dir/$sym_link_file
19631        fi
19632    fi
19633
19634  { $as_echo "$as_me:$LINENO: result: $TEST_COMPILER" >&5
19635$as_echo "$TEST_COMPILER" >&6; }
19636  { $as_echo "$as_me:$LINENO: checking if CXX is disguised ccache" >&5
19637$as_echo_n "checking if CXX is disguised ccache... " >&6; }
19638
19639  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19640  if test "x$COMPILER_BASENAME" = "xccache"; then
19641    { $as_echo "$as_me:$LINENO: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19642$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19643    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19644    # We want to control ccache invocation ourselves, so ignore this cc and try
19645    # searching again.
19646
19647    # Remove the path to the fake ccache cc from the PATH
19648    RETRY_COMPILER_SAVED_PATH="$PATH"
19649    COMPILER_DIRNAME=`$DIRNAME $CXX`
19650    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19651
19652    # Try again looking for our compiler
19653    if test -n "$ac_tool_prefix"; then
19654  for ac_prog in $COMPILER_CHECK_LIST
19655  do
19656    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19657set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19658{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
19659$as_echo_n "checking for $ac_word... " >&6; }
19660if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then
19661  $as_echo_n "(cached) " >&6
19662else
19663  if test -n "$PROPER_COMPILER_CXX"; then
19664  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
19665else
19666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19667for as_dir in $PATH
19668do
19669  IFS=$as_save_IFS
19670  test -z "$as_dir" && as_dir=.
19671  for ac_exec_ext in '' $ac_executable_extensions; do
19672  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19673    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
19674    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19675    break 2
19676  fi
19677done
19678done
19679IFS=$as_save_IFS
19680
19681fi
19682fi
19683PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
19684if test -n "$PROPER_COMPILER_CXX"; then
19685  { $as_echo "$as_me:$LINENO: result: $PROPER_COMPILER_CXX" >&5
19686$as_echo "$PROPER_COMPILER_CXX" >&6; }
19687else
19688  { $as_echo "$as_me:$LINENO: result: no" >&5
19689$as_echo "no" >&6; }
19690fi
19691
19692
19693    test -n "$PROPER_COMPILER_CXX" && break
19694  done
19695fi
19696if test -z "$PROPER_COMPILER_CXX"; then
19697  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
19698  for ac_prog in $COMPILER_CHECK_LIST
19699do
19700  # Extract the first word of "$ac_prog", so it can be a program name with args.
19701set dummy $ac_prog; ac_word=$2
19702{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
19703$as_echo_n "checking for $ac_word... " >&6; }
19704if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then
19705  $as_echo_n "(cached) " >&6
19706else
19707  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19708  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
19709else
19710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19711for as_dir in $PATH
19712do
19713  IFS=$as_save_IFS
19714  test -z "$as_dir" && as_dir=.
19715  for ac_exec_ext in '' $ac_executable_extensions; do
19716  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19717    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
19718    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19719    break 2
19720  fi
19721done
19722done
19723IFS=$as_save_IFS
19724
19725fi
19726fi
19727ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
19728if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19729  { $as_echo "$as_me:$LINENO: result: $ac_ct_PROPER_COMPILER_CXX" >&5
19730$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
19731else
19732  { $as_echo "$as_me:$LINENO: result: no" >&5
19733$as_echo "no" >&6; }
19734fi
19735
19736
19737  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
19738done
19739
19740  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
19741    PROPER_COMPILER_CXX=""
19742  else
19743    case $cross_compiling:$ac_tool_warned in
19744yes:)
19745{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
19746$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19747ac_tool_warned=yes ;;
19748esac
19749    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
19750  fi
19751fi
19752
19753
19754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19755
19756  # First separate the path from the arguments. This will split at the first
19757  # space.
19758  complete="$PROPER_COMPILER_CXX"
19759  path="${complete%% *}"
19760  tmp="$complete EOL"
19761  arguments="${tmp#* }"
19762
19763  # Input might be given as Windows format, start by converting to
19764  # unix format.
19765  new_path=`$CYGPATH -u "$path"`
19766
19767  # Now try to locate executable using which
19768  new_path=`$WHICH "$new_path" 2> /dev/null`
19769  # bat and cmd files are not always considered executable in cygwin causing which
19770  # to not find them
19771  if test "x$new_path" = x \
19772           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19773           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19774    new_path=`$CYGPATH -u "$path"`
19775  fi
19776  if test "x$new_path" = x; then
19777    # Oops. Which didn't find the executable.
19778    # The splitting of arguments from the executable at a space might have been incorrect,
19779    # since paths with space are more likely in Windows. Give it another try with the whole
19780    # argument.
19781    path="$complete"
19782    arguments="EOL"
19783    new_path=`$CYGPATH -u "$path"`
19784    new_path=`$WHICH "$new_path" 2> /dev/null`
19785    # bat and cmd files are not always considered executable in cygwin causing which
19786    # to not find them
19787    if test "x$new_path" = x \
19788             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19789             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19790      new_path=`$CYGPATH -u "$path"`
19791    fi
19792    if test "x$new_path" = x; then
19793      # It's still not found. Now this is an unrecoverable error.
19794      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19795$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19796      has_space=`$ECHO "$complete" | $GREP " "`
19797      if test "x$has_space" != x; then
19798        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19799$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19800      fi
19801      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&5
19802$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&2;}
19803   { (exit 1); exit 1; }; }
19804    fi
19805  fi
19806
19807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19810  # "foo.exe" is OK but "foo" is an error.
19811  #
19812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19813  # It is also a way to make sure we got the proper file name for the real test later on.
19814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19815  if test "x$test_shortpath" = x; then
19816    # Short path failed, file does not exist as specified.
19817    # Try adding .exe or .cmd
19818    if test -f "${new_path}.exe"; then
19819       input_to_shortpath="${new_path}.exe"
19820    elif test -f "${new_path}.cmd"; then
19821       input_to_shortpath="${new_path}.cmd"
19822    else
19823      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
19824$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
19825      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19826$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19827      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&5
19828$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&2;}
19829   { (exit 1); exit 1; }; }
19830    fi
19831  else
19832    input_to_shortpath="$new_path"
19833  fi
19834
19835  # Call helper function which possibly converts this using DOS-style short mode.
19836  # If so, the updated path is stored in $new_path.
19837  new_path="$input_to_shortpath"
19838
19839  input_path="$input_to_shortpath"
19840  # Check if we need to convert this using DOS-style short mode. If the path
19841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19842  # take no chances and rewrite it.
19843  # Note: m4 eats our [], so we need to use [ and ] instead.
19844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19845  if test "x$has_forbidden_chars" != x; then
19846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19850      # Going to short mode and back again did indeed matter. Since short mode is
19851      # case insensitive, let's make it lowercase to improve readability.
19852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19853      # Now convert it back to Unix-stile (cygpath)
19854      input_path=`$CYGPATH -u "$shortmode_path"`
19855      new_path="$input_path"
19856    fi
19857  fi
19858
19859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19860  if test "x$test_cygdrive_prefix" = x; then
19861    # As a simple fix, exclude /usr/bin since it's not a real path.
19862    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19864      # a path prefixed by /cygdrive for fixpath to work.
19865      new_path="$CYGWIN_ROOT_PATH$input_path"
19866    fi
19867  fi
19868
19869  # remove trailing .exe if any
19870  new_path="${new_path/%.exe/}"
19871
19872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19873
19874  # First separate the path from the arguments. This will split at the first
19875  # space.
19876  complete="$PROPER_COMPILER_CXX"
19877  path="${complete%% *}"
19878  tmp="$complete EOL"
19879  arguments="${tmp#* }"
19880
19881  # Input might be given as Windows format, start by converting to
19882  # unix format.
19883  new_path="$path"
19884
19885  windows_path="$new_path"
19886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19887    unix_path=`$CYGPATH -u "$windows_path"`
19888    new_path="$unix_path"
19889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19891    new_path="$unix_path"
19892  fi
19893
19894
19895  # Now try to locate executable using which
19896  new_path=`$WHICH "$new_path" 2> /dev/null`
19897
19898  if test "x$new_path" = x; then
19899    # Oops. Which didn't find the executable.
19900    # The splitting of arguments from the executable at a space might have been incorrect,
19901    # since paths with space are more likely in Windows. Give it another try with the whole
19902    # argument.
19903    path="$complete"
19904    arguments="EOL"
19905    new_path="$path"
19906
19907  windows_path="$new_path"
19908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19909    unix_path=`$CYGPATH -u "$windows_path"`
19910    new_path="$unix_path"
19911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19913    new_path="$unix_path"
19914  fi
19915
19916
19917    new_path=`$WHICH "$new_path" 2> /dev/null`
19918
19919    if test "x$new_path" = x; then
19920      # It's still not found. Now this is an unrecoverable error.
19921      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19922$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19923      has_space=`$ECHO "$complete" | $GREP " "`
19924      if test "x$has_space" != x; then
19925        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19927      fi
19928      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&5
19929$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&2;}
19930   { (exit 1); exit 1; }; }
19931    fi
19932  fi
19933
19934  # Now new_path has a complete unix path to the binary
19935  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19936    # Keep paths in /bin as-is, but remove trailing .exe if any
19937    new_path="${new_path/%.exe/}"
19938    # Do not save /bin paths to all_fixpath_prefixes!
19939  else
19940    # Not in mixed or Windows style, start by that.
19941    new_path=`cmd //c echo $new_path`
19942
19943  input_path="$new_path"
19944  # Check if we need to convert this using DOS-style short mode. If the path
19945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19946  # take no chances and rewrite it.
19947  # Note: m4 eats our [], so we need to use [ and ] instead.
19948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19949  if test "x$has_forbidden_chars" != x; then
19950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19952  fi
19953
19954    # Output is in $new_path
19955
19956  windows_path="$new_path"
19957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19958    unix_path=`$CYGPATH -u "$windows_path"`
19959    new_path="$unix_path"
19960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19962    new_path="$unix_path"
19963  fi
19964
19965    # remove trailing .exe if any
19966    new_path="${new_path/%.exe/}"
19967
19968    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19969    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19970  fi
19971
19972  else
19973    # We're on a posix platform. Hooray! :)
19974    # First separate the path from the arguments. This will split at the first
19975    # space.
19976    complete="$PROPER_COMPILER_CXX"
19977    path="${complete%% *}"
19978    tmp="$complete EOL"
19979    arguments="${tmp#* }"
19980
19981    new_path=`$WHICH $path 2> /dev/null`
19982    if test "x$new_path" = x; then
19983      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19984      if test "x$is_absolute_path" != x; then
19985        { $as_echo "$as_me:$LINENO: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&5
19986$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&6;}
19987        new_path="$path"
19988      else
19989        { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19990$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19991        has_space=`$ECHO "$complete" | $GREP " "`
19992        if test "x$has_space" != x; then
19993          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
19994$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19995        fi
19996        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&5
19997$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&2;}
19998   { (exit 1); exit 1; }; }
19999      fi
20000    fi
20001  fi
20002
20003  # Now join together the path and the arguments once again
20004  if test "x$arguments" != xEOL; then
20005      new_complete="$new_path ${arguments% *}"
20006  else
20007      new_complete="$new_path"
20008  fi
20009
20010  if test "x$complete" != "x$new_complete"; then
20011    PROPER_COMPILER_CXX="$new_complete"
20012    { $as_echo "$as_me:$LINENO: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20013$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20014  fi
20015
20016    PATH="$RETRY_COMPILER_SAVED_PATH"
20017
20018    { $as_echo "$as_me:$LINENO: checking for resolved symbolic links for CXX" >&5
20019$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20020
20021    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20022        # Follow a chain of symbolic links. Use readlink
20023        # where it exists, else fall back to horribly
20024        # complicated shell code.
20025        if test "x$READLINK_TESTED" != yes; then
20026            # On MacOSX there is a readlink tool with a different
20027            # purpose than the GNU readlink tool. Check the found readlink.
20028            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
20029            if test "x$ISGNU" = x; then
20030                 # A readlink that we do not know how to use.
20031                 # Are there other non-GNU readlinks out there?
20032                 READLINK_TESTED=yes
20033                 READLINK=
20034            fi
20035        fi
20036
20037        if test "x$READLINK" != x; then
20038            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20039        else
20040            STARTDIR=$PWD
20041            COUNTER=0
20042            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20043            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20044            while test $COUNTER -lt 20; do
20045                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20046                if test "x$ISLINK" == x; then
20047                    # This is not a symbolic link! We are done!
20048                    break
20049                fi
20050                # The link might be relative! We have to use cd to travel safely.
20051                cd $sym_link_dir
20052                # ... and we must get the to the absolute path, not one using symbolic links.
20053                cd `pwd -P`
20054                cd `$DIRNAME $ISLINK`
20055                sym_link_dir=`$THEPWDCMD`
20056                sym_link_file=`$BASENAME $ISLINK`
20057                let COUNTER=COUNTER+1
20058            done
20059            cd $STARTDIR
20060            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20061        fi
20062    fi
20063
20064    { $as_echo "$as_me:$LINENO: result: $PROPER_COMPILER_CXX" >&5
20065$as_echo "$PROPER_COMPILER_CXX" >&6; }
20066    CXX="$PROPER_COMPILER_CXX"
20067  else
20068    { $as_echo "$as_me:$LINENO: result: no, keeping CXX" >&5
20069$as_echo "no, keeping CXX" >&6; }
20070    CXX="$TEST_COMPILER"
20071  fi
20072
20073  COMPILER=$CXX
20074  COMPILER_NAME=$COMPILER_NAME
20075
20076  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20077    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20078    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20079    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20080    if test $? -ne 0; then
20081      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20082
20083      { $as_echo "$as_me:$LINENO: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
20084$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20085      { $as_echo "$as_me:$LINENO: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20086$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20087      { { $as_echo "$as_me:$LINENO: error: Sun Studio compiler is required. Try setting --with-tools-dir." >&5
20088$as_echo "$as_me: error: Sun Studio compiler is required. Try setting --with-tools-dir." >&2;}
20089   { (exit 1); exit 1; }; }
20090    else
20091      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20092      COMPILER_VENDOR="Sun Studio"
20093    fi
20094  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20095    # First line typically looks something like:
20096    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20097    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20098    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20099    COMPILER_VENDOR="Microsoft CL.EXE"
20100    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20101    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20102      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20103        { { $as_echo "$as_me:$LINENO: error: Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." >&5
20104$as_echo "$as_me: error: Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." >&2;}
20105   { (exit 1); exit 1; }; }
20106      fi
20107    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20108      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20109        { { $as_echo "$as_me:$LINENO: error: Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." >&5
20110$as_echo "$as_me: error: Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." >&2;}
20111   { (exit 1); exit 1; }; }
20112      fi
20113    fi
20114  else
20115    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20116    # Check that this is likely to be GCC.
20117    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20118    if test $? -ne 0; then
20119      { $as_echo "$as_me:$LINENO: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20120$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20121      { $as_echo "$as_me:$LINENO: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20122$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20123      { { $as_echo "$as_me:$LINENO: error: GCC compiler is required. Try setting --with-tools-dir." >&5
20124$as_echo "$as_me: error: GCC compiler is required. Try setting --with-tools-dir." >&2;}
20125   { (exit 1); exit 1; }; }
20126    fi
20127
20128    # First line typically looks something like:
20129    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20130    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20131    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20132  fi
20133  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20134  CXX_VERSION="$COMPILER_VERSION"
20135  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20136  CXX_VENDOR="$COMPILER_VENDOR"
20137
20138  { $as_echo "$as_me:$LINENO: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20139$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20140
20141
20142# Now that we have resolved CXX ourself, let autoconf have it's go at it
20143ac_ext=cpp
20144ac_cpp='$CXXCPP $CPPFLAGS'
20145ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20146ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20147ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20148if test -z "$CXX"; then
20149  if test -n "$CCC"; then
20150    CXX=$CCC
20151  else
20152    if test -n "$ac_tool_prefix"; then
20153  for ac_prog in $CXX
20154  do
20155    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20156set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20157{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
20158$as_echo_n "checking for $ac_word... " >&6; }
20159if test "${ac_cv_prog_CXX+set}" = set; then
20160  $as_echo_n "(cached) " >&6
20161else
20162  if test -n "$CXX"; then
20163  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20164else
20165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20166for as_dir in $PATH
20167do
20168  IFS=$as_save_IFS
20169  test -z "$as_dir" && as_dir=.
20170  for ac_exec_ext in '' $ac_executable_extensions; do
20171  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20172    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20173    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20174    break 2
20175  fi
20176done
20177done
20178IFS=$as_save_IFS
20179
20180fi
20181fi
20182CXX=$ac_cv_prog_CXX
20183if test -n "$CXX"; then
20184  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
20185$as_echo "$CXX" >&6; }
20186else
20187  { $as_echo "$as_me:$LINENO: result: no" >&5
20188$as_echo "no" >&6; }
20189fi
20190
20191
20192    test -n "$CXX" && break
20193  done
20194fi
20195if test -z "$CXX"; then
20196  ac_ct_CXX=$CXX
20197  for ac_prog in $CXX
20198do
20199  # Extract the first word of "$ac_prog", so it can be a program name with args.
20200set dummy $ac_prog; ac_word=$2
20201{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
20202$as_echo_n "checking for $ac_word... " >&6; }
20203if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
20204  $as_echo_n "(cached) " >&6
20205else
20206  if test -n "$ac_ct_CXX"; then
20207  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20208else
20209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20210for as_dir in $PATH
20211do
20212  IFS=$as_save_IFS
20213  test -z "$as_dir" && as_dir=.
20214  for ac_exec_ext in '' $ac_executable_extensions; do
20215  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20216    ac_cv_prog_ac_ct_CXX="$ac_prog"
20217    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20218    break 2
20219  fi
20220done
20221done
20222IFS=$as_save_IFS
20223
20224fi
20225fi
20226ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20227if test -n "$ac_ct_CXX"; then
20228  { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
20229$as_echo "$ac_ct_CXX" >&6; }
20230else
20231  { $as_echo "$as_me:$LINENO: result: no" >&5
20232$as_echo "no" >&6; }
20233fi
20234
20235
20236  test -n "$ac_ct_CXX" && break
20237done
20238
20239  if test "x$ac_ct_CXX" = x; then
20240    CXX="g++"
20241  else
20242    case $cross_compiling:$ac_tool_warned in
20243yes:)
20244{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
20245$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20246ac_tool_warned=yes ;;
20247esac
20248    CXX=$ac_ct_CXX
20249  fi
20250fi
20251
20252  fi
20253fi
20254# Provide some information about the compiler.
20255$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
20256set X $ac_compile
20257ac_compiler=$2
20258{ (ac_try="$ac_compiler --version >&5"
20259case "(($ac_try" in
20260  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20261  *) ac_try_echo=$ac_try;;
20262esac
20263eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20264$as_echo "$ac_try_echo") >&5
20265  (eval "$ac_compiler --version >&5") 2>&5
20266  ac_status=$?
20267  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20268  (exit $ac_status); }
20269{ (ac_try="$ac_compiler -v >&5"
20270case "(($ac_try" in
20271  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20272  *) ac_try_echo=$ac_try;;
20273esac
20274eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20275$as_echo "$ac_try_echo") >&5
20276  (eval "$ac_compiler -v >&5") 2>&5
20277  ac_status=$?
20278  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20279  (exit $ac_status); }
20280{ (ac_try="$ac_compiler -V >&5"
20281case "(($ac_try" in
20282  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20283  *) ac_try_echo=$ac_try;;
20284esac
20285eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20286$as_echo "$ac_try_echo") >&5
20287  (eval "$ac_compiler -V >&5") 2>&5
20288  ac_status=$?
20289  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20290  (exit $ac_status); }
20291
20292{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
20293$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20294if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
20295  $as_echo_n "(cached) " >&6
20296else
20297  cat >conftest.$ac_ext <<_ACEOF
20298/* confdefs.h.  */
20299_ACEOF
20300cat confdefs.h >>conftest.$ac_ext
20301cat >>conftest.$ac_ext <<_ACEOF
20302/* end confdefs.h.  */
20303
20304int
20305main ()
20306{
20307#ifndef __GNUC__
20308       choke me
20309#endif
20310
20311  ;
20312  return 0;
20313}
20314_ACEOF
20315rm -f conftest.$ac_objext
20316if { (ac_try="$ac_compile"
20317case "(($ac_try" in
20318  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20319  *) ac_try_echo=$ac_try;;
20320esac
20321eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20322$as_echo "$ac_try_echo") >&5
20323  (eval "$ac_compile") 2>conftest.er1
20324  ac_status=$?
20325  grep -v '^ *+' conftest.er1 >conftest.err
20326  rm -f conftest.er1
20327  cat conftest.err >&5
20328  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20329  (exit $ac_status); } && {
20330	 test -z "$ac_cxx_werror_flag" ||
20331	 test ! -s conftest.err
20332       } && test -s conftest.$ac_objext; then
20333  ac_compiler_gnu=yes
20334else
20335  $as_echo "$as_me: failed program was:" >&5
20336sed 's/^/| /' conftest.$ac_ext >&5
20337
20338	ac_compiler_gnu=no
20339fi
20340
20341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20342ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20343
20344fi
20345{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
20346$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20347if test $ac_compiler_gnu = yes; then
20348  GXX=yes
20349else
20350  GXX=
20351fi
20352ac_test_CXXFLAGS=${CXXFLAGS+set}
20353ac_save_CXXFLAGS=$CXXFLAGS
20354{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
20355$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20356if test "${ac_cv_prog_cxx_g+set}" = set; then
20357  $as_echo_n "(cached) " >&6
20358else
20359  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20360   ac_cxx_werror_flag=yes
20361   ac_cv_prog_cxx_g=no
20362   CXXFLAGS="-g"
20363   cat >conftest.$ac_ext <<_ACEOF
20364/* confdefs.h.  */
20365_ACEOF
20366cat confdefs.h >>conftest.$ac_ext
20367cat >>conftest.$ac_ext <<_ACEOF
20368/* end confdefs.h.  */
20369
20370int
20371main ()
20372{
20373
20374  ;
20375  return 0;
20376}
20377_ACEOF
20378rm -f conftest.$ac_objext
20379if { (ac_try="$ac_compile"
20380case "(($ac_try" in
20381  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20382  *) ac_try_echo=$ac_try;;
20383esac
20384eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20385$as_echo "$ac_try_echo") >&5
20386  (eval "$ac_compile") 2>conftest.er1
20387  ac_status=$?
20388  grep -v '^ *+' conftest.er1 >conftest.err
20389  rm -f conftest.er1
20390  cat conftest.err >&5
20391  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20392  (exit $ac_status); } && {
20393	 test -z "$ac_cxx_werror_flag" ||
20394	 test ! -s conftest.err
20395       } && test -s conftest.$ac_objext; then
20396  ac_cv_prog_cxx_g=yes
20397else
20398  $as_echo "$as_me: failed program was:" >&5
20399sed 's/^/| /' conftest.$ac_ext >&5
20400
20401	CXXFLAGS=""
20402      cat >conftest.$ac_ext <<_ACEOF
20403/* confdefs.h.  */
20404_ACEOF
20405cat confdefs.h >>conftest.$ac_ext
20406cat >>conftest.$ac_ext <<_ACEOF
20407/* end confdefs.h.  */
20408
20409int
20410main ()
20411{
20412
20413  ;
20414  return 0;
20415}
20416_ACEOF
20417rm -f conftest.$ac_objext
20418if { (ac_try="$ac_compile"
20419case "(($ac_try" in
20420  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20421  *) ac_try_echo=$ac_try;;
20422esac
20423eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20424$as_echo "$ac_try_echo") >&5
20425  (eval "$ac_compile") 2>conftest.er1
20426  ac_status=$?
20427  grep -v '^ *+' conftest.er1 >conftest.err
20428  rm -f conftest.er1
20429  cat conftest.err >&5
20430  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20431  (exit $ac_status); } && {
20432	 test -z "$ac_cxx_werror_flag" ||
20433	 test ! -s conftest.err
20434       } && test -s conftest.$ac_objext; then
20435  :
20436else
20437  $as_echo "$as_me: failed program was:" >&5
20438sed 's/^/| /' conftest.$ac_ext >&5
20439
20440	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20441	 CXXFLAGS="-g"
20442	 cat >conftest.$ac_ext <<_ACEOF
20443/* confdefs.h.  */
20444_ACEOF
20445cat confdefs.h >>conftest.$ac_ext
20446cat >>conftest.$ac_ext <<_ACEOF
20447/* end confdefs.h.  */
20448
20449int
20450main ()
20451{
20452
20453  ;
20454  return 0;
20455}
20456_ACEOF
20457rm -f conftest.$ac_objext
20458if { (ac_try="$ac_compile"
20459case "(($ac_try" in
20460  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20461  *) ac_try_echo=$ac_try;;
20462esac
20463eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20464$as_echo "$ac_try_echo") >&5
20465  (eval "$ac_compile") 2>conftest.er1
20466  ac_status=$?
20467  grep -v '^ *+' conftest.er1 >conftest.err
20468  rm -f conftest.er1
20469  cat conftest.err >&5
20470  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20471  (exit $ac_status); } && {
20472	 test -z "$ac_cxx_werror_flag" ||
20473	 test ! -s conftest.err
20474       } && test -s conftest.$ac_objext; then
20475  ac_cv_prog_cxx_g=yes
20476else
20477  $as_echo "$as_me: failed program was:" >&5
20478sed 's/^/| /' conftest.$ac_ext >&5
20479
20480
20481fi
20482
20483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20484fi
20485
20486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20487fi
20488
20489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20490   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20491fi
20492{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
20493$as_echo "$ac_cv_prog_cxx_g" >&6; }
20494if test "$ac_test_CXXFLAGS" = set; then
20495  CXXFLAGS=$ac_save_CXXFLAGS
20496elif test $ac_cv_prog_cxx_g = yes; then
20497  if test "$GXX" = yes; then
20498    CXXFLAGS="-g -O2"
20499  else
20500    CXXFLAGS="-g"
20501  fi
20502else
20503  if test "$GXX" = yes; then
20504    CXXFLAGS="-O2"
20505  else
20506    CXXFLAGS=
20507  fi
20508fi
20509ac_ext=cpp
20510ac_cpp='$CXXCPP $CPPFLAGS'
20511ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20512ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20513ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20514
20515
20516### Locate other tools
20517
20518if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20519    ac_ext=m
20520ac_cpp='$OBJCPP $CPPFLAGS'
20521ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20522ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20523ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20524if test -n "$ac_tool_prefix"; then
20525  for ac_prog in gcc objcc objc cc CC
20526  do
20527    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20528set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20529{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
20530$as_echo_n "checking for $ac_word... " >&6; }
20531if test "${ac_cv_prog_OBJC+set}" = set; then
20532  $as_echo_n "(cached) " >&6
20533else
20534  if test -n "$OBJC"; then
20535  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20536else
20537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20538for as_dir in $PATH
20539do
20540  IFS=$as_save_IFS
20541  test -z "$as_dir" && as_dir=.
20542  for ac_exec_ext in '' $ac_executable_extensions; do
20543  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20544    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20545    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20546    break 2
20547  fi
20548done
20549done
20550IFS=$as_save_IFS
20551
20552fi
20553fi
20554OBJC=$ac_cv_prog_OBJC
20555if test -n "$OBJC"; then
20556  { $as_echo "$as_me:$LINENO: result: $OBJC" >&5
20557$as_echo "$OBJC" >&6; }
20558else
20559  { $as_echo "$as_me:$LINENO: result: no" >&5
20560$as_echo "no" >&6; }
20561fi
20562
20563
20564    test -n "$OBJC" && break
20565  done
20566fi
20567if test -z "$OBJC"; then
20568  ac_ct_OBJC=$OBJC
20569  for ac_prog in gcc objcc objc cc CC
20570do
20571  # Extract the first word of "$ac_prog", so it can be a program name with args.
20572set dummy $ac_prog; ac_word=$2
20573{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
20574$as_echo_n "checking for $ac_word... " >&6; }
20575if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then
20576  $as_echo_n "(cached) " >&6
20577else
20578  if test -n "$ac_ct_OBJC"; then
20579  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20580else
20581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20582for as_dir in $PATH
20583do
20584  IFS=$as_save_IFS
20585  test -z "$as_dir" && as_dir=.
20586  for ac_exec_ext in '' $ac_executable_extensions; do
20587  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20588    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20589    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20590    break 2
20591  fi
20592done
20593done
20594IFS=$as_save_IFS
20595
20596fi
20597fi
20598ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20599if test -n "$ac_ct_OBJC"; then
20600  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJC" >&5
20601$as_echo "$ac_ct_OBJC" >&6; }
20602else
20603  { $as_echo "$as_me:$LINENO: result: no" >&5
20604$as_echo "no" >&6; }
20605fi
20606
20607
20608  test -n "$ac_ct_OBJC" && break
20609done
20610
20611  if test "x$ac_ct_OBJC" = x; then
20612    OBJC="gcc"
20613  else
20614    case $cross_compiling:$ac_tool_warned in
20615yes:)
20616{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
20617$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20618ac_tool_warned=yes ;;
20619esac
20620    OBJC=$ac_ct_OBJC
20621  fi
20622fi
20623
20624# Provide some information about the compiler.
20625$as_echo "$as_me:$LINENO: checking for Objective C compiler version" >&5
20626set X $ac_compile
20627ac_compiler=$2
20628{ (ac_try="$ac_compiler --version >&5"
20629case "(($ac_try" in
20630  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20631  *) ac_try_echo=$ac_try;;
20632esac
20633eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20634$as_echo "$ac_try_echo") >&5
20635  (eval "$ac_compiler --version >&5") 2>&5
20636  ac_status=$?
20637  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20638  (exit $ac_status); }
20639{ (ac_try="$ac_compiler -v >&5"
20640case "(($ac_try" in
20641  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20642  *) ac_try_echo=$ac_try;;
20643esac
20644eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20645$as_echo "$ac_try_echo") >&5
20646  (eval "$ac_compiler -v >&5") 2>&5
20647  ac_status=$?
20648  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20649  (exit $ac_status); }
20650{ (ac_try="$ac_compiler -V >&5"
20651case "(($ac_try" in
20652  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20653  *) ac_try_echo=$ac_try;;
20654esac
20655eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20656$as_echo "$ac_try_echo") >&5
20657  (eval "$ac_compiler -V >&5") 2>&5
20658  ac_status=$?
20659  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20660  (exit $ac_status); }
20661
20662{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Objective C compiler" >&5
20663$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20664if test "${ac_cv_objc_compiler_gnu+set}" = set; then
20665  $as_echo_n "(cached) " >&6
20666else
20667  cat >conftest.$ac_ext <<_ACEOF
20668/* confdefs.h.  */
20669_ACEOF
20670cat confdefs.h >>conftest.$ac_ext
20671cat >>conftest.$ac_ext <<_ACEOF
20672/* end confdefs.h.  */
20673
20674int
20675main ()
20676{
20677#ifndef __GNUC__
20678       choke me
20679#endif
20680
20681  ;
20682  return 0;
20683}
20684_ACEOF
20685rm -f conftest.$ac_objext
20686if { (ac_try="$ac_compile"
20687case "(($ac_try" in
20688  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20689  *) ac_try_echo=$ac_try;;
20690esac
20691eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20692$as_echo "$ac_try_echo") >&5
20693  (eval "$ac_compile") 2>conftest.er1
20694  ac_status=$?
20695  grep -v '^ *+' conftest.er1 >conftest.err
20696  rm -f conftest.er1
20697  cat conftest.err >&5
20698  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20699  (exit $ac_status); } && {
20700	 test -z "$ac_objc_werror_flag" ||
20701	 test ! -s conftest.err
20702       } && test -s conftest.$ac_objext; then
20703  ac_compiler_gnu=yes
20704else
20705  $as_echo "$as_me: failed program was:" >&5
20706sed 's/^/| /' conftest.$ac_ext >&5
20707
20708	ac_compiler_gnu=no
20709fi
20710
20711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20712ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20713
20714fi
20715{ $as_echo "$as_me:$LINENO: result: $ac_cv_objc_compiler_gnu" >&5
20716$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20717if test $ac_compiler_gnu = yes; then
20718  GOBJC=yes
20719else
20720  GOBJC=
20721fi
20722ac_test_OBJCFLAGS=${OBJCFLAGS+set}
20723ac_save_OBJCFLAGS=$OBJCFLAGS
20724{ $as_echo "$as_me:$LINENO: checking whether $OBJC accepts -g" >&5
20725$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
20726if test "${ac_cv_prog_objc_g+set}" = set; then
20727  $as_echo_n "(cached) " >&6
20728else
20729  ac_save_objc_werror_flag=$ac_objc_werror_flag
20730   ac_objc_werror_flag=yes
20731   ac_cv_prog_objc_g=no
20732   OBJCFLAGS="-g"
20733   cat >conftest.$ac_ext <<_ACEOF
20734/* confdefs.h.  */
20735_ACEOF
20736cat confdefs.h >>conftest.$ac_ext
20737cat >>conftest.$ac_ext <<_ACEOF
20738/* end confdefs.h.  */
20739
20740int
20741main ()
20742{
20743
20744  ;
20745  return 0;
20746}
20747_ACEOF
20748rm -f conftest.$ac_objext
20749if { (ac_try="$ac_compile"
20750case "(($ac_try" in
20751  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20752  *) ac_try_echo=$ac_try;;
20753esac
20754eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20755$as_echo "$ac_try_echo") >&5
20756  (eval "$ac_compile") 2>conftest.er1
20757  ac_status=$?
20758  grep -v '^ *+' conftest.er1 >conftest.err
20759  rm -f conftest.er1
20760  cat conftest.err >&5
20761  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20762  (exit $ac_status); } && {
20763	 test -z "$ac_objc_werror_flag" ||
20764	 test ! -s conftest.err
20765       } && test -s conftest.$ac_objext; then
20766  ac_cv_prog_objc_g=yes
20767else
20768  $as_echo "$as_me: failed program was:" >&5
20769sed 's/^/| /' conftest.$ac_ext >&5
20770
20771	OBJCFLAGS=""
20772      cat >conftest.$ac_ext <<_ACEOF
20773/* confdefs.h.  */
20774_ACEOF
20775cat confdefs.h >>conftest.$ac_ext
20776cat >>conftest.$ac_ext <<_ACEOF
20777/* end confdefs.h.  */
20778
20779int
20780main ()
20781{
20782
20783  ;
20784  return 0;
20785}
20786_ACEOF
20787rm -f conftest.$ac_objext
20788if { (ac_try="$ac_compile"
20789case "(($ac_try" in
20790  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20791  *) ac_try_echo=$ac_try;;
20792esac
20793eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20794$as_echo "$ac_try_echo") >&5
20795  (eval "$ac_compile") 2>conftest.er1
20796  ac_status=$?
20797  grep -v '^ *+' conftest.er1 >conftest.err
20798  rm -f conftest.er1
20799  cat conftest.err >&5
20800  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20801  (exit $ac_status); } && {
20802	 test -z "$ac_objc_werror_flag" ||
20803	 test ! -s conftest.err
20804       } && test -s conftest.$ac_objext; then
20805  :
20806else
20807  $as_echo "$as_me: failed program was:" >&5
20808sed 's/^/| /' conftest.$ac_ext >&5
20809
20810	ac_objc_werror_flag=$ac_save_objc_werror_flag
20811	 OBJCFLAGS="-g"
20812	 cat >conftest.$ac_ext <<_ACEOF
20813/* confdefs.h.  */
20814_ACEOF
20815cat confdefs.h >>conftest.$ac_ext
20816cat >>conftest.$ac_ext <<_ACEOF
20817/* end confdefs.h.  */
20818
20819int
20820main ()
20821{
20822
20823  ;
20824  return 0;
20825}
20826_ACEOF
20827rm -f conftest.$ac_objext
20828if { (ac_try="$ac_compile"
20829case "(($ac_try" in
20830  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20831  *) ac_try_echo=$ac_try;;
20832esac
20833eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20834$as_echo "$ac_try_echo") >&5
20835  (eval "$ac_compile") 2>conftest.er1
20836  ac_status=$?
20837  grep -v '^ *+' conftest.er1 >conftest.err
20838  rm -f conftest.er1
20839  cat conftest.err >&5
20840  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20841  (exit $ac_status); } && {
20842	 test -z "$ac_objc_werror_flag" ||
20843	 test ! -s conftest.err
20844       } && test -s conftest.$ac_objext; then
20845  ac_cv_prog_objc_g=yes
20846else
20847  $as_echo "$as_me: failed program was:" >&5
20848sed 's/^/| /' conftest.$ac_ext >&5
20849
20850
20851fi
20852
20853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20854fi
20855
20856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20857fi
20858
20859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20860   ac_objc_werror_flag=$ac_save_objc_werror_flag
20861fi
20862{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_objc_g" >&5
20863$as_echo "$ac_cv_prog_objc_g" >&6; }
20864if test "$ac_test_OBJCFLAGS" = set; then
20865  OBJCFLAGS=$ac_save_OBJCFLAGS
20866elif test $ac_cv_prog_objc_g = yes; then
20867  if test "$GOBJC" = yes; then
20868    OBJCFLAGS="-g -O2"
20869  else
20870    OBJCFLAGS="-g"
20871  fi
20872else
20873  if test "$GOBJC" = yes; then
20874    OBJCFLAGS="-O2"
20875  else
20876    OBJCFLAGS=
20877  fi
20878fi
20879ac_ext=cpp
20880ac_cpp='$CXXCPP $CPPFLAGS'
20881ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20882ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20883ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20884
20885
20886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20887
20888  # First separate the path from the arguments. This will split at the first
20889  # space.
20890  complete="$OBJC"
20891  path="${complete%% *}"
20892  tmp="$complete EOL"
20893  arguments="${tmp#* }"
20894
20895  # Input might be given as Windows format, start by converting to
20896  # unix format.
20897  new_path=`$CYGPATH -u "$path"`
20898
20899  # Now try to locate executable using which
20900  new_path=`$WHICH "$new_path" 2> /dev/null`
20901  # bat and cmd files are not always considered executable in cygwin causing which
20902  # to not find them
20903  if test "x$new_path" = x \
20904           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20905           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20906    new_path=`$CYGPATH -u "$path"`
20907  fi
20908  if test "x$new_path" = x; then
20909    # Oops. Which didn't find the executable.
20910    # The splitting of arguments from the executable at a space might have been incorrect,
20911    # since paths with space are more likely in Windows. Give it another try with the whole
20912    # argument.
20913    path="$complete"
20914    arguments="EOL"
20915    new_path=`$CYGPATH -u "$path"`
20916    new_path=`$WHICH "$new_path" 2> /dev/null`
20917    # bat and cmd files are not always considered executable in cygwin causing which
20918    # to not find them
20919    if test "x$new_path" = x \
20920             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20921             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20922      new_path=`$CYGPATH -u "$path"`
20923    fi
20924    if test "x$new_path" = x; then
20925      # It's still not found. Now this is an unrecoverable error.
20926      { $as_echo "$as_me:$LINENO: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20927$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20928      has_space=`$ECHO "$complete" | $GREP " "`
20929      if test "x$has_space" != x; then
20930        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20932      fi
20933      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJC" >&5
20934$as_echo "$as_me: error: Cannot locate the the path of OBJC" >&2;}
20935   { (exit 1); exit 1; }; }
20936    fi
20937  fi
20938
20939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20942  # "foo.exe" is OK but "foo" is an error.
20943  #
20944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20945  # It is also a way to make sure we got the proper file name for the real test later on.
20946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20947  if test "x$test_shortpath" = x; then
20948    # Short path failed, file does not exist as specified.
20949    # Try adding .exe or .cmd
20950    if test -f "${new_path}.exe"; then
20951       input_to_shortpath="${new_path}.exe"
20952    elif test -f "${new_path}.cmd"; then
20953       input_to_shortpath="${new_path}.cmd"
20954    else
20955      { $as_echo "$as_me:$LINENO: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
20956$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
20957      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20958$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20959      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJC" >&5
20960$as_echo "$as_me: error: Cannot locate the the path of OBJC" >&2;}
20961   { (exit 1); exit 1; }; }
20962    fi
20963  else
20964    input_to_shortpath="$new_path"
20965  fi
20966
20967  # Call helper function which possibly converts this using DOS-style short mode.
20968  # If so, the updated path is stored in $new_path.
20969  new_path="$input_to_shortpath"
20970
20971  input_path="$input_to_shortpath"
20972  # Check if we need to convert this using DOS-style short mode. If the path
20973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20974  # take no chances and rewrite it.
20975  # Note: m4 eats our [], so we need to use [ and ] instead.
20976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20977  if test "x$has_forbidden_chars" != x; then
20978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20982      # Going to short mode and back again did indeed matter. Since short mode is
20983      # case insensitive, let's make it lowercase to improve readability.
20984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20985      # Now convert it back to Unix-stile (cygpath)
20986      input_path=`$CYGPATH -u "$shortmode_path"`
20987      new_path="$input_path"
20988    fi
20989  fi
20990
20991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20992  if test "x$test_cygdrive_prefix" = x; then
20993    # As a simple fix, exclude /usr/bin since it's not a real path.
20994    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20996      # a path prefixed by /cygdrive for fixpath to work.
20997      new_path="$CYGWIN_ROOT_PATH$input_path"
20998    fi
20999  fi
21000
21001  # remove trailing .exe if any
21002  new_path="${new_path/%.exe/}"
21003
21004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21005
21006  # First separate the path from the arguments. This will split at the first
21007  # space.
21008  complete="$OBJC"
21009  path="${complete%% *}"
21010  tmp="$complete EOL"
21011  arguments="${tmp#* }"
21012
21013  # Input might be given as Windows format, start by converting to
21014  # unix format.
21015  new_path="$path"
21016
21017  windows_path="$new_path"
21018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21019    unix_path=`$CYGPATH -u "$windows_path"`
21020    new_path="$unix_path"
21021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21023    new_path="$unix_path"
21024  fi
21025
21026
21027  # Now try to locate executable using which
21028  new_path=`$WHICH "$new_path" 2> /dev/null`
21029
21030  if test "x$new_path" = x; then
21031    # Oops. Which didn't find the executable.
21032    # The splitting of arguments from the executable at a space might have been incorrect,
21033    # since paths with space are more likely in Windows. Give it another try with the whole
21034    # argument.
21035    path="$complete"
21036    arguments="EOL"
21037    new_path="$path"
21038
21039  windows_path="$new_path"
21040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21041    unix_path=`$CYGPATH -u "$windows_path"`
21042    new_path="$unix_path"
21043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21045    new_path="$unix_path"
21046  fi
21047
21048
21049    new_path=`$WHICH "$new_path" 2> /dev/null`
21050
21051    if test "x$new_path" = x; then
21052      # It's still not found. Now this is an unrecoverable error.
21053      { $as_echo "$as_me:$LINENO: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21054$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21055      has_space=`$ECHO "$complete" | $GREP " "`
21056      if test "x$has_space" != x; then
21057        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21058$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21059      fi
21060      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJC" >&5
21061$as_echo "$as_me: error: Cannot locate the the path of OBJC" >&2;}
21062   { (exit 1); exit 1; }; }
21063    fi
21064  fi
21065
21066  # Now new_path has a complete unix path to the binary
21067  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21068    # Keep paths in /bin as-is, but remove trailing .exe if any
21069    new_path="${new_path/%.exe/}"
21070    # Do not save /bin paths to all_fixpath_prefixes!
21071  else
21072    # Not in mixed or Windows style, start by that.
21073    new_path=`cmd //c echo $new_path`
21074
21075  input_path="$new_path"
21076  # Check if we need to convert this using DOS-style short mode. If the path
21077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21078  # take no chances and rewrite it.
21079  # Note: m4 eats our [], so we need to use [ and ] instead.
21080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21081  if test "x$has_forbidden_chars" != x; then
21082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21084  fi
21085
21086    # Output is in $new_path
21087
21088  windows_path="$new_path"
21089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21090    unix_path=`$CYGPATH -u "$windows_path"`
21091    new_path="$unix_path"
21092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21094    new_path="$unix_path"
21095  fi
21096
21097    # remove trailing .exe if any
21098    new_path="${new_path/%.exe/}"
21099
21100    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21101    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21102  fi
21103
21104  else
21105    # We're on a posix platform. Hooray! :)
21106    # First separate the path from the arguments. This will split at the first
21107    # space.
21108    complete="$OBJC"
21109    path="${complete%% *}"
21110    tmp="$complete EOL"
21111    arguments="${tmp#* }"
21112
21113    new_path=`$WHICH $path 2> /dev/null`
21114    if test "x$new_path" = x; then
21115      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21116      if test "x$is_absolute_path" != x; then
21117        { $as_echo "$as_me:$LINENO: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&5
21118$as_echo "$as_me: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&6;}
21119        new_path="$path"
21120      else
21121        { $as_echo "$as_me:$LINENO: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21122$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21123        has_space=`$ECHO "$complete" | $GREP " "`
21124        if test "x$has_space" != x; then
21125          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
21126$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21127        fi
21128        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJC" >&5
21129$as_echo "$as_me: error: Cannot locate the the path of OBJC" >&2;}
21130   { (exit 1); exit 1; }; }
21131      fi
21132    fi
21133  fi
21134
21135  # Now join together the path and the arguments once again
21136  if test "x$arguments" != xEOL; then
21137      new_complete="$new_path ${arguments% *}"
21138  else
21139      new_complete="$new_path"
21140  fi
21141
21142  if test "x$complete" != "x$new_complete"; then
21143    OBJC="$new_complete"
21144    { $as_echo "$as_me:$LINENO: Rewriting OBJC to \"$new_complete\"" >&5
21145$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21146  fi
21147
21148else
21149    OBJC=
21150fi
21151
21152# Restore the flags to the user specified values.
21153# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21154CFLAGS="$ORG_CFLAGS"
21155CXXFLAGS="$ORG_CXXFLAGS"
21156OBJCFLAGS="$ORG_OBJCFLAGS"
21157
21158LD="$CC"
21159LDEXE="$CC"
21160LDCXX="$CXX"
21161LDEXECXX="$CXX"
21162
21163# LDEXE is the linker to use, when creating executables.
21164
21165# Linking C++ libraries.
21166
21167# Linking C++ executables.
21168
21169
21170if test "x$OPENJDK_TARGET_OS" != xwindows; then
21171    if test -n "$ac_tool_prefix"; then
21172  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21173set dummy ${ac_tool_prefix}ar; ac_word=$2
21174{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
21175$as_echo_n "checking for $ac_word... " >&6; }
21176if test "${ac_cv_prog_AR+set}" = set; then
21177  $as_echo_n "(cached) " >&6
21178else
21179  if test -n "$AR"; then
21180  ac_cv_prog_AR="$AR" # Let the user override the test.
21181else
21182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21183for as_dir in $PATH
21184do
21185  IFS=$as_save_IFS
21186  test -z "$as_dir" && as_dir=.
21187  for ac_exec_ext in '' $ac_executable_extensions; do
21188  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21189    ac_cv_prog_AR="${ac_tool_prefix}ar"
21190    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21191    break 2
21192  fi
21193done
21194done
21195IFS=$as_save_IFS
21196
21197fi
21198fi
21199AR=$ac_cv_prog_AR
21200if test -n "$AR"; then
21201  { $as_echo "$as_me:$LINENO: result: $AR" >&5
21202$as_echo "$AR" >&6; }
21203else
21204  { $as_echo "$as_me:$LINENO: result: no" >&5
21205$as_echo "no" >&6; }
21206fi
21207
21208
21209fi
21210if test -z "$ac_cv_prog_AR"; then
21211  ac_ct_AR=$AR
21212  # Extract the first word of "ar", so it can be a program name with args.
21213set dummy ar; ac_word=$2
21214{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
21215$as_echo_n "checking for $ac_word... " >&6; }
21216if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
21217  $as_echo_n "(cached) " >&6
21218else
21219  if test -n "$ac_ct_AR"; then
21220  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21221else
21222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21223for as_dir in $PATH
21224do
21225  IFS=$as_save_IFS
21226  test -z "$as_dir" && as_dir=.
21227  for ac_exec_ext in '' $ac_executable_extensions; do
21228  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21229    ac_cv_prog_ac_ct_AR="ar"
21230    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21231    break 2
21232  fi
21233done
21234done
21235IFS=$as_save_IFS
21236
21237fi
21238fi
21239ac_ct_AR=$ac_cv_prog_ac_ct_AR
21240if test -n "$ac_ct_AR"; then
21241  { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
21242$as_echo "$ac_ct_AR" >&6; }
21243else
21244  { $as_echo "$as_me:$LINENO: result: no" >&5
21245$as_echo "no" >&6; }
21246fi
21247
21248  if test "x$ac_ct_AR" = x; then
21249    AR=""
21250  else
21251    case $cross_compiling:$ac_tool_warned in
21252yes:)
21253{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
21254$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21255ac_tool_warned=yes ;;
21256esac
21257    AR=$ac_ct_AR
21258  fi
21259else
21260  AR="$ac_cv_prog_AR"
21261fi
21262
21263
21264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21265
21266  # First separate the path from the arguments. This will split at the first
21267  # space.
21268  complete="$AR"
21269  path="${complete%% *}"
21270  tmp="$complete EOL"
21271  arguments="${tmp#* }"
21272
21273  # Input might be given as Windows format, start by converting to
21274  # unix format.
21275  new_path=`$CYGPATH -u "$path"`
21276
21277  # Now try to locate executable using which
21278  new_path=`$WHICH "$new_path" 2> /dev/null`
21279  # bat and cmd files are not always considered executable in cygwin causing which
21280  # to not find them
21281  if test "x$new_path" = x \
21282           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21283           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21284    new_path=`$CYGPATH -u "$path"`
21285  fi
21286  if test "x$new_path" = x; then
21287    # Oops. Which didn't find the executable.
21288    # The splitting of arguments from the executable at a space might have been incorrect,
21289    # since paths with space are more likely in Windows. Give it another try with the whole
21290    # argument.
21291    path="$complete"
21292    arguments="EOL"
21293    new_path=`$CYGPATH -u "$path"`
21294    new_path=`$WHICH "$new_path" 2> /dev/null`
21295    # bat and cmd files are not always considered executable in cygwin causing which
21296    # to not find them
21297    if test "x$new_path" = x \
21298             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21299             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21300      new_path=`$CYGPATH -u "$path"`
21301    fi
21302    if test "x$new_path" = x; then
21303      # It's still not found. Now this is an unrecoverable error.
21304      { $as_echo "$as_me:$LINENO: The path of AR, which resolves as \"$complete\", is not found." >&5
21305$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21306      has_space=`$ECHO "$complete" | $GREP " "`
21307      if test "x$has_space" != x; then
21308        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21309$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21310      fi
21311      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AR" >&5
21312$as_echo "$as_me: error: Cannot locate the the path of AR" >&2;}
21313   { (exit 1); exit 1; }; }
21314    fi
21315  fi
21316
21317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21320  # "foo.exe" is OK but "foo" is an error.
21321  #
21322  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21323  # It is also a way to make sure we got the proper file name for the real test later on.
21324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21325  if test "x$test_shortpath" = x; then
21326    # Short path failed, file does not exist as specified.
21327    # Try adding .exe or .cmd
21328    if test -f "${new_path}.exe"; then
21329       input_to_shortpath="${new_path}.exe"
21330    elif test -f "${new_path}.cmd"; then
21331       input_to_shortpath="${new_path}.cmd"
21332    else
21333      { $as_echo "$as_me:$LINENO: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21334$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21335      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21336$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21337      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AR" >&5
21338$as_echo "$as_me: error: Cannot locate the the path of AR" >&2;}
21339   { (exit 1); exit 1; }; }
21340    fi
21341  else
21342    input_to_shortpath="$new_path"
21343  fi
21344
21345  # Call helper function which possibly converts this using DOS-style short mode.
21346  # If so, the updated path is stored in $new_path.
21347  new_path="$input_to_shortpath"
21348
21349  input_path="$input_to_shortpath"
21350  # Check if we need to convert this using DOS-style short mode. If the path
21351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21352  # take no chances and rewrite it.
21353  # Note: m4 eats our [], so we need to use [ and ] instead.
21354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21355  if test "x$has_forbidden_chars" != x; then
21356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21357    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21358    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21359    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21360      # Going to short mode and back again did indeed matter. Since short mode is
21361      # case insensitive, let's make it lowercase to improve readability.
21362      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21363      # Now convert it back to Unix-stile (cygpath)
21364      input_path=`$CYGPATH -u "$shortmode_path"`
21365      new_path="$input_path"
21366    fi
21367  fi
21368
21369  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21370  if test "x$test_cygdrive_prefix" = x; then
21371    # As a simple fix, exclude /usr/bin since it's not a real path.
21372    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21373      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21374      # a path prefixed by /cygdrive for fixpath to work.
21375      new_path="$CYGWIN_ROOT_PATH$input_path"
21376    fi
21377  fi
21378
21379  # remove trailing .exe if any
21380  new_path="${new_path/%.exe/}"
21381
21382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21383
21384  # First separate the path from the arguments. This will split at the first
21385  # space.
21386  complete="$AR"
21387  path="${complete%% *}"
21388  tmp="$complete EOL"
21389  arguments="${tmp#* }"
21390
21391  # Input might be given as Windows format, start by converting to
21392  # unix format.
21393  new_path="$path"
21394
21395  windows_path="$new_path"
21396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21397    unix_path=`$CYGPATH -u "$windows_path"`
21398    new_path="$unix_path"
21399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21401    new_path="$unix_path"
21402  fi
21403
21404
21405  # Now try to locate executable using which
21406  new_path=`$WHICH "$new_path" 2> /dev/null`
21407
21408  if test "x$new_path" = x; then
21409    # Oops. Which didn't find the executable.
21410    # The splitting of arguments from the executable at a space might have been incorrect,
21411    # since paths with space are more likely in Windows. Give it another try with the whole
21412    # argument.
21413    path="$complete"
21414    arguments="EOL"
21415    new_path="$path"
21416
21417  windows_path="$new_path"
21418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21419    unix_path=`$CYGPATH -u "$windows_path"`
21420    new_path="$unix_path"
21421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21423    new_path="$unix_path"
21424  fi
21425
21426
21427    new_path=`$WHICH "$new_path" 2> /dev/null`
21428
21429    if test "x$new_path" = x; then
21430      # It's still not found. Now this is an unrecoverable error.
21431      { $as_echo "$as_me:$LINENO: The path of AR, which resolves as \"$complete\", is not found." >&5
21432$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21433      has_space=`$ECHO "$complete" | $GREP " "`
21434      if test "x$has_space" != x; then
21435        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21437      fi
21438      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AR" >&5
21439$as_echo "$as_me: error: Cannot locate the the path of AR" >&2;}
21440   { (exit 1); exit 1; }; }
21441    fi
21442  fi
21443
21444  # Now new_path has a complete unix path to the binary
21445  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21446    # Keep paths in /bin as-is, but remove trailing .exe if any
21447    new_path="${new_path/%.exe/}"
21448    # Do not save /bin paths to all_fixpath_prefixes!
21449  else
21450    # Not in mixed or Windows style, start by that.
21451    new_path=`cmd //c echo $new_path`
21452
21453  input_path="$new_path"
21454  # Check if we need to convert this using DOS-style short mode. If the path
21455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21456  # take no chances and rewrite it.
21457  # Note: m4 eats our [], so we need to use [ and ] instead.
21458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21459  if test "x$has_forbidden_chars" != x; then
21460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21462  fi
21463
21464    # Output is in $new_path
21465
21466  windows_path="$new_path"
21467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21468    unix_path=`$CYGPATH -u "$windows_path"`
21469    new_path="$unix_path"
21470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21472    new_path="$unix_path"
21473  fi
21474
21475    # remove trailing .exe if any
21476    new_path="${new_path/%.exe/}"
21477
21478    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21479    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21480  fi
21481
21482  else
21483    # We're on a posix platform. Hooray! :)
21484    # First separate the path from the arguments. This will split at the first
21485    # space.
21486    complete="$AR"
21487    path="${complete%% *}"
21488    tmp="$complete EOL"
21489    arguments="${tmp#* }"
21490
21491    new_path=`$WHICH $path 2> /dev/null`
21492    if test "x$new_path" = x; then
21493      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21494      if test "x$is_absolute_path" != x; then
21495        { $as_echo "$as_me:$LINENO: Resolving AR (as $path) with 'which' failed, using $path directly." >&5
21496$as_echo "$as_me: Resolving AR (as $path) with 'which' failed, using $path directly." >&6;}
21497        new_path="$path"
21498      else
21499        { $as_echo "$as_me:$LINENO: The path of AR, which resolves as \"$complete\", is not found." >&5
21500$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21501        has_space=`$ECHO "$complete" | $GREP " "`
21502        if test "x$has_space" != x; then
21503          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
21504$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21505        fi
21506        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AR" >&5
21507$as_echo "$as_me: error: Cannot locate the the path of AR" >&2;}
21508   { (exit 1); exit 1; }; }
21509      fi
21510    fi
21511  fi
21512
21513  # Now join together the path and the arguments once again
21514  if test "x$arguments" != xEOL; then
21515      new_complete="$new_path ${arguments% *}"
21516  else
21517      new_complete="$new_path"
21518  fi
21519
21520  if test "x$complete" != "x$new_complete"; then
21521    AR="$new_complete"
21522    { $as_echo "$as_me:$LINENO: Rewriting AR to \"$new_complete\"" >&5
21523$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21524  fi
21525
21526fi
21527if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21528    ARFLAGS="-r"
21529else
21530    ARFLAGS=""
21531fi
21532
21533
21534# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21535HOTSPOT_CXX="$CXX"
21536HOTSPOT_LD="$LD"
21537
21538
21539
21540COMPILER_NAME=gcc
21541COMPILER_TYPE=CC
21542if test "x$OPENJDK_TARGET_OS" = xwindows; then
21543
21544    # For now, assume that we are always compiling using cl.exe.
21545    CC_OUT_OPTION=-Fo
21546    EXE_OUT_OPTION=-out:
21547    LD_OUT_OPTION=-out:
21548    AR_OUT_OPTION=-out:
21549    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21550    # program for something completely different.
21551    # Extract the first word of "link", so it can be a program name with args.
21552set dummy link; ac_word=$2
21553{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
21554$as_echo_n "checking for $ac_word... " >&6; }
21555if test "${ac_cv_prog_WINLD+set}" = set; then
21556  $as_echo_n "(cached) " >&6
21557else
21558  if test -n "$WINLD"; then
21559  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21560else
21561  ac_prog_rejected=no
21562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21563for as_dir in $PATH
21564do
21565  IFS=$as_save_IFS
21566  test -z "$as_dir" && as_dir=.
21567  for ac_exec_ext in '' $ac_executable_extensions; do
21568  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21569    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21570       ac_prog_rejected=yes
21571       continue
21572     fi
21573    ac_cv_prog_WINLD="link"
21574    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21575    break 2
21576  fi
21577done
21578done
21579IFS=$as_save_IFS
21580
21581if test $ac_prog_rejected = yes; then
21582  # We found a bogon in the path, so make sure we never use it.
21583  set dummy $ac_cv_prog_WINLD
21584  shift
21585  if test $# != 0; then
21586    # We chose a different compiler from the bogus one.
21587    # However, it has the same basename, so the bogon will be chosen
21588    # first if we set WINLD to just the basename; use the full file name.
21589    shift
21590    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21591  fi
21592fi
21593fi
21594fi
21595WINLD=$ac_cv_prog_WINLD
21596if test -n "$WINLD"; then
21597  { $as_echo "$as_me:$LINENO: result: $WINLD" >&5
21598$as_echo "$WINLD" >&6; }
21599else
21600  { $as_echo "$as_me:$LINENO: result: no" >&5
21601$as_echo "no" >&6; }
21602fi
21603
21604
21605    # Since we must ignore the first found link, WINLD will contain
21606    # the full path to the link.exe program.
21607
21608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21609
21610  # First separate the path from the arguments. This will split at the first
21611  # space.
21612  complete="$WINLD"
21613  path="${complete%% *}"
21614  tmp="$complete EOL"
21615  arguments="${tmp#* }"
21616
21617  # Input might be given as Windows format, start by converting to
21618  # unix format.
21619  new_path=`$CYGPATH -u "$path"`
21620
21621  # Now try to locate executable using which
21622  new_path=`$WHICH "$new_path" 2> /dev/null`
21623  # bat and cmd files are not always considered executable in cygwin causing which
21624  # to not find them
21625  if test "x$new_path" = x \
21626           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21627           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21628    new_path=`$CYGPATH -u "$path"`
21629  fi
21630  if test "x$new_path" = x; then
21631    # Oops. Which didn't find the executable.
21632    # The splitting of arguments from the executable at a space might have been incorrect,
21633    # since paths with space are more likely in Windows. Give it another try with the whole
21634    # argument.
21635    path="$complete"
21636    arguments="EOL"
21637    new_path=`$CYGPATH -u "$path"`
21638    new_path=`$WHICH "$new_path" 2> /dev/null`
21639    # bat and cmd files are not always considered executable in cygwin causing which
21640    # to not find them
21641    if test "x$new_path" = x \
21642             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21643             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21644      new_path=`$CYGPATH -u "$path"`
21645    fi
21646    if test "x$new_path" = x; then
21647      # It's still not found. Now this is an unrecoverable error.
21648      { $as_echo "$as_me:$LINENO: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21649$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21650      has_space=`$ECHO "$complete" | $GREP " "`
21651      if test "x$has_space" != x; then
21652        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21654      fi
21655      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINLD" >&5
21656$as_echo "$as_me: error: Cannot locate the the path of WINLD" >&2;}
21657   { (exit 1); exit 1; }; }
21658    fi
21659  fi
21660
21661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21664  # "foo.exe" is OK but "foo" is an error.
21665  #
21666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21667  # It is also a way to make sure we got the proper file name for the real test later on.
21668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21669  if test "x$test_shortpath" = x; then
21670    # Short path failed, file does not exist as specified.
21671    # Try adding .exe or .cmd
21672    if test -f "${new_path}.exe"; then
21673       input_to_shortpath="${new_path}.exe"
21674    elif test -f "${new_path}.cmd"; then
21675       input_to_shortpath="${new_path}.cmd"
21676    else
21677      { $as_echo "$as_me:$LINENO: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21678$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21679      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21680$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21681      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINLD" >&5
21682$as_echo "$as_me: error: Cannot locate the the path of WINLD" >&2;}
21683   { (exit 1); exit 1; }; }
21684    fi
21685  else
21686    input_to_shortpath="$new_path"
21687  fi
21688
21689  # Call helper function which possibly converts this using DOS-style short mode.
21690  # If so, the updated path is stored in $new_path.
21691  new_path="$input_to_shortpath"
21692
21693  input_path="$input_to_shortpath"
21694  # Check if we need to convert this using DOS-style short mode. If the path
21695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21696  # take no chances and rewrite it.
21697  # Note: m4 eats our [], so we need to use [ and ] instead.
21698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21699  if test "x$has_forbidden_chars" != x; then
21700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21704      # Going to short mode and back again did indeed matter. Since short mode is
21705      # case insensitive, let's make it lowercase to improve readability.
21706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21707      # Now convert it back to Unix-stile (cygpath)
21708      input_path=`$CYGPATH -u "$shortmode_path"`
21709      new_path="$input_path"
21710    fi
21711  fi
21712
21713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21714  if test "x$test_cygdrive_prefix" = x; then
21715    # As a simple fix, exclude /usr/bin since it's not a real path.
21716    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21718      # a path prefixed by /cygdrive for fixpath to work.
21719      new_path="$CYGWIN_ROOT_PATH$input_path"
21720    fi
21721  fi
21722
21723  # remove trailing .exe if any
21724  new_path="${new_path/%.exe/}"
21725
21726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21727
21728  # First separate the path from the arguments. This will split at the first
21729  # space.
21730  complete="$WINLD"
21731  path="${complete%% *}"
21732  tmp="$complete EOL"
21733  arguments="${tmp#* }"
21734
21735  # Input might be given as Windows format, start by converting to
21736  # unix format.
21737  new_path="$path"
21738
21739  windows_path="$new_path"
21740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21741    unix_path=`$CYGPATH -u "$windows_path"`
21742    new_path="$unix_path"
21743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21745    new_path="$unix_path"
21746  fi
21747
21748
21749  # Now try to locate executable using which
21750  new_path=`$WHICH "$new_path" 2> /dev/null`
21751
21752  if test "x$new_path" = x; then
21753    # Oops. Which didn't find the executable.
21754    # The splitting of arguments from the executable at a space might have been incorrect,
21755    # since paths with space are more likely in Windows. Give it another try with the whole
21756    # argument.
21757    path="$complete"
21758    arguments="EOL"
21759    new_path="$path"
21760
21761  windows_path="$new_path"
21762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21763    unix_path=`$CYGPATH -u "$windows_path"`
21764    new_path="$unix_path"
21765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21767    new_path="$unix_path"
21768  fi
21769
21770
21771    new_path=`$WHICH "$new_path" 2> /dev/null`
21772
21773    if test "x$new_path" = x; then
21774      # It's still not found. Now this is an unrecoverable error.
21775      { $as_echo "$as_me:$LINENO: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21776$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21777      has_space=`$ECHO "$complete" | $GREP " "`
21778      if test "x$has_space" != x; then
21779        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21780$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21781      fi
21782      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINLD" >&5
21783$as_echo "$as_me: error: Cannot locate the the path of WINLD" >&2;}
21784   { (exit 1); exit 1; }; }
21785    fi
21786  fi
21787
21788  # Now new_path has a complete unix path to the binary
21789  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21790    # Keep paths in /bin as-is, but remove trailing .exe if any
21791    new_path="${new_path/%.exe/}"
21792    # Do not save /bin paths to all_fixpath_prefixes!
21793  else
21794    # Not in mixed or Windows style, start by that.
21795    new_path=`cmd //c echo $new_path`
21796
21797  input_path="$new_path"
21798  # Check if we need to convert this using DOS-style short mode. If the path
21799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21800  # take no chances and rewrite it.
21801  # Note: m4 eats our [], so we need to use [ and ] instead.
21802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21803  if test "x$has_forbidden_chars" != x; then
21804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21805    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21806  fi
21807
21808    # Output is in $new_path
21809
21810  windows_path="$new_path"
21811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21812    unix_path=`$CYGPATH -u "$windows_path"`
21813    new_path="$unix_path"
21814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21816    new_path="$unix_path"
21817  fi
21818
21819    # remove trailing .exe if any
21820    new_path="${new_path/%.exe/}"
21821
21822    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21823    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21824  fi
21825
21826  else
21827    # We're on a posix platform. Hooray! :)
21828    # First separate the path from the arguments. This will split at the first
21829    # space.
21830    complete="$WINLD"
21831    path="${complete%% *}"
21832    tmp="$complete EOL"
21833    arguments="${tmp#* }"
21834
21835    new_path=`$WHICH $path 2> /dev/null`
21836    if test "x$new_path" = x; then
21837      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21838      if test "x$is_absolute_path" != x; then
21839        { $as_echo "$as_me:$LINENO: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&5
21840$as_echo "$as_me: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&6;}
21841        new_path="$path"
21842      else
21843        { $as_echo "$as_me:$LINENO: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21844$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21845        has_space=`$ECHO "$complete" | $GREP " "`
21846        if test "x$has_space" != x; then
21847          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
21848$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21849        fi
21850        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINLD" >&5
21851$as_echo "$as_me: error: Cannot locate the the path of WINLD" >&2;}
21852   { (exit 1); exit 1; }; }
21853      fi
21854    fi
21855  fi
21856
21857  # Now join together the path and the arguments once again
21858  if test "x$arguments" != xEOL; then
21859      new_complete="$new_path ${arguments% *}"
21860  else
21861      new_complete="$new_path"
21862  fi
21863
21864  if test "x$complete" != "x$new_complete"; then
21865    WINLD="$new_complete"
21866    { $as_echo "$as_me:$LINENO: Rewriting WINLD to \"$new_complete\"" >&5
21867$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
21868  fi
21869
21870    printf "Windows linker was found at $WINLD\n"
21871    { $as_echo "$as_me:$LINENO: checking if the found link.exe is actually the Visual Studio linker" >&5
21872$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
21873    "$WINLD" --version > /dev/null
21874    if test $? -eq 0 ; then
21875      { $as_echo "$as_me:$LINENO: result: no" >&5
21876$as_echo "no" >&6; }
21877      { { $as_echo "$as_me:$LINENO: error: This is the Cygwin link tool. Please check your PATH and rerun configure." >&5
21878$as_echo "$as_me: error: This is the Cygwin link tool. Please check your PATH and rerun configure." >&2;}
21879   { (exit 1); exit 1; }; }
21880    else
21881      { $as_echo "$as_me:$LINENO: result: yes" >&5
21882$as_echo "yes" >&6; }
21883    fi
21884    LD="$WINLD"
21885    LDEXE="$WINLD"
21886    LDCXX="$WINLD"
21887    LDEXECXX="$WINLD"
21888
21889    # Extract the first word of "mt", so it can be a program name with args.
21890set dummy mt; ac_word=$2
21891{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
21892$as_echo_n "checking for $ac_word... " >&6; }
21893if test "${ac_cv_prog_MT+set}" = set; then
21894  $as_echo_n "(cached) " >&6
21895else
21896  if test -n "$MT"; then
21897  ac_cv_prog_MT="$MT" # Let the user override the test.
21898else
21899  ac_prog_rejected=no
21900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21901for as_dir in $PATH
21902do
21903  IFS=$as_save_IFS
21904  test -z "$as_dir" && as_dir=.
21905  for ac_exec_ext in '' $ac_executable_extensions; do
21906  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21907    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
21908       ac_prog_rejected=yes
21909       continue
21910     fi
21911    ac_cv_prog_MT="mt"
21912    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21913    break 2
21914  fi
21915done
21916done
21917IFS=$as_save_IFS
21918
21919if test $ac_prog_rejected = yes; then
21920  # We found a bogon in the path, so make sure we never use it.
21921  set dummy $ac_cv_prog_MT
21922  shift
21923  if test $# != 0; then
21924    # We chose a different compiler from the bogus one.
21925    # However, it has the same basename, so the bogon will be chosen
21926    # first if we set MT to just the basename; use the full file name.
21927    shift
21928    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
21929  fi
21930fi
21931fi
21932fi
21933MT=$ac_cv_prog_MT
21934if test -n "$MT"; then
21935  { $as_echo "$as_me:$LINENO: result: $MT" >&5
21936$as_echo "$MT" >&6; }
21937else
21938  { $as_echo "$as_me:$LINENO: result: no" >&5
21939$as_echo "no" >&6; }
21940fi
21941
21942
21943
21944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21945
21946  # First separate the path from the arguments. This will split at the first
21947  # space.
21948  complete="$MT"
21949  path="${complete%% *}"
21950  tmp="$complete EOL"
21951  arguments="${tmp#* }"
21952
21953  # Input might be given as Windows format, start by converting to
21954  # unix format.
21955  new_path=`$CYGPATH -u "$path"`
21956
21957  # Now try to locate executable using which
21958  new_path=`$WHICH "$new_path" 2> /dev/null`
21959  # bat and cmd files are not always considered executable in cygwin causing which
21960  # to not find them
21961  if test "x$new_path" = x \
21962           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21963           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21964    new_path=`$CYGPATH -u "$path"`
21965  fi
21966  if test "x$new_path" = x; then
21967    # Oops. Which didn't find the executable.
21968    # The splitting of arguments from the executable at a space might have been incorrect,
21969    # since paths with space are more likely in Windows. Give it another try with the whole
21970    # argument.
21971    path="$complete"
21972    arguments="EOL"
21973    new_path=`$CYGPATH -u "$path"`
21974    new_path=`$WHICH "$new_path" 2> /dev/null`
21975    # bat and cmd files are not always considered executable in cygwin causing which
21976    # to not find them
21977    if test "x$new_path" = x \
21978             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21979             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21980      new_path=`$CYGPATH -u "$path"`
21981    fi
21982    if test "x$new_path" = x; then
21983      # It's still not found. Now this is an unrecoverable error.
21984      { $as_echo "$as_me:$LINENO: The path of MT, which resolves as \"$complete\", is not found." >&5
21985$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21986      has_space=`$ECHO "$complete" | $GREP " "`
21987      if test "x$has_space" != x; then
21988        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21990      fi
21991      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MT" >&5
21992$as_echo "$as_me: error: Cannot locate the the path of MT" >&2;}
21993   { (exit 1); exit 1; }; }
21994    fi
21995  fi
21996
21997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22000  # "foo.exe" is OK but "foo" is an error.
22001  #
22002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22003  # It is also a way to make sure we got the proper file name for the real test later on.
22004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22005  if test "x$test_shortpath" = x; then
22006    # Short path failed, file does not exist as specified.
22007    # Try adding .exe or .cmd
22008    if test -f "${new_path}.exe"; then
22009       input_to_shortpath="${new_path}.exe"
22010    elif test -f "${new_path}.cmd"; then
22011       input_to_shortpath="${new_path}.cmd"
22012    else
22013      { $as_echo "$as_me:$LINENO: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22014$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22015      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22016$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22017      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MT" >&5
22018$as_echo "$as_me: error: Cannot locate the the path of MT" >&2;}
22019   { (exit 1); exit 1; }; }
22020    fi
22021  else
22022    input_to_shortpath="$new_path"
22023  fi
22024
22025  # Call helper function which possibly converts this using DOS-style short mode.
22026  # If so, the updated path is stored in $new_path.
22027  new_path="$input_to_shortpath"
22028
22029  input_path="$input_to_shortpath"
22030  # Check if we need to convert this using DOS-style short mode. If the path
22031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22032  # take no chances and rewrite it.
22033  # Note: m4 eats our [], so we need to use [ and ] instead.
22034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22035  if test "x$has_forbidden_chars" != x; then
22036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22040      # Going to short mode and back again did indeed matter. Since short mode is
22041      # case insensitive, let's make it lowercase to improve readability.
22042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22043      # Now convert it back to Unix-stile (cygpath)
22044      input_path=`$CYGPATH -u "$shortmode_path"`
22045      new_path="$input_path"
22046    fi
22047  fi
22048
22049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22050  if test "x$test_cygdrive_prefix" = x; then
22051    # As a simple fix, exclude /usr/bin since it's not a real path.
22052    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22054      # a path prefixed by /cygdrive for fixpath to work.
22055      new_path="$CYGWIN_ROOT_PATH$input_path"
22056    fi
22057  fi
22058
22059  # remove trailing .exe if any
22060  new_path="${new_path/%.exe/}"
22061
22062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22063
22064  # First separate the path from the arguments. This will split at the first
22065  # space.
22066  complete="$MT"
22067  path="${complete%% *}"
22068  tmp="$complete EOL"
22069  arguments="${tmp#* }"
22070
22071  # Input might be given as Windows format, start by converting to
22072  # unix format.
22073  new_path="$path"
22074
22075  windows_path="$new_path"
22076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22077    unix_path=`$CYGPATH -u "$windows_path"`
22078    new_path="$unix_path"
22079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22081    new_path="$unix_path"
22082  fi
22083
22084
22085  # Now try to locate executable using which
22086  new_path=`$WHICH "$new_path" 2> /dev/null`
22087
22088  if test "x$new_path" = x; then
22089    # Oops. Which didn't find the executable.
22090    # The splitting of arguments from the executable at a space might have been incorrect,
22091    # since paths with space are more likely in Windows. Give it another try with the whole
22092    # argument.
22093    path="$complete"
22094    arguments="EOL"
22095    new_path="$path"
22096
22097  windows_path="$new_path"
22098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22099    unix_path=`$CYGPATH -u "$windows_path"`
22100    new_path="$unix_path"
22101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22103    new_path="$unix_path"
22104  fi
22105
22106
22107    new_path=`$WHICH "$new_path" 2> /dev/null`
22108
22109    if test "x$new_path" = x; then
22110      # It's still not found. Now this is an unrecoverable error.
22111      { $as_echo "$as_me:$LINENO: The path of MT, which resolves as \"$complete\", is not found." >&5
22112$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22113      has_space=`$ECHO "$complete" | $GREP " "`
22114      if test "x$has_space" != x; then
22115        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22116$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22117      fi
22118      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MT" >&5
22119$as_echo "$as_me: error: Cannot locate the the path of MT" >&2;}
22120   { (exit 1); exit 1; }; }
22121    fi
22122  fi
22123
22124  # Now new_path has a complete unix path to the binary
22125  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22126    # Keep paths in /bin as-is, but remove trailing .exe if any
22127    new_path="${new_path/%.exe/}"
22128    # Do not save /bin paths to all_fixpath_prefixes!
22129  else
22130    # Not in mixed or Windows style, start by that.
22131    new_path=`cmd //c echo $new_path`
22132
22133  input_path="$new_path"
22134  # Check if we need to convert this using DOS-style short mode. If the path
22135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22136  # take no chances and rewrite it.
22137  # Note: m4 eats our [], so we need to use [ and ] instead.
22138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22139  if test "x$has_forbidden_chars" != x; then
22140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22142  fi
22143
22144    # Output is in $new_path
22145
22146  windows_path="$new_path"
22147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22148    unix_path=`$CYGPATH -u "$windows_path"`
22149    new_path="$unix_path"
22150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22152    new_path="$unix_path"
22153  fi
22154
22155    # remove trailing .exe if any
22156    new_path="${new_path/%.exe/}"
22157
22158    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22159    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22160  fi
22161
22162  else
22163    # We're on a posix platform. Hooray! :)
22164    # First separate the path from the arguments. This will split at the first
22165    # space.
22166    complete="$MT"
22167    path="${complete%% *}"
22168    tmp="$complete EOL"
22169    arguments="${tmp#* }"
22170
22171    new_path=`$WHICH $path 2> /dev/null`
22172    if test "x$new_path" = x; then
22173      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22174      if test "x$is_absolute_path" != x; then
22175        { $as_echo "$as_me:$LINENO: Resolving MT (as $path) with 'which' failed, using $path directly." >&5
22176$as_echo "$as_me: Resolving MT (as $path) with 'which' failed, using $path directly." >&6;}
22177        new_path="$path"
22178      else
22179        { $as_echo "$as_me:$LINENO: The path of MT, which resolves as \"$complete\", is not found." >&5
22180$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22181        has_space=`$ECHO "$complete" | $GREP " "`
22182        if test "x$has_space" != x; then
22183          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
22184$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22185        fi
22186        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MT" >&5
22187$as_echo "$as_me: error: Cannot locate the the path of MT" >&2;}
22188   { (exit 1); exit 1; }; }
22189      fi
22190    fi
22191  fi
22192
22193  # Now join together the path and the arguments once again
22194  if test "x$arguments" != xEOL; then
22195      new_complete="$new_path ${arguments% *}"
22196  else
22197      new_complete="$new_path"
22198  fi
22199
22200  if test "x$complete" != "x$new_complete"; then
22201    MT="$new_complete"
22202    { $as_echo "$as_me:$LINENO: Rewriting MT to \"$new_complete\"" >&5
22203$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22204  fi
22205
22206    # The resource compiler
22207    # Extract the first word of "rc", so it can be a program name with args.
22208set dummy rc; ac_word=$2
22209{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
22210$as_echo_n "checking for $ac_word... " >&6; }
22211if test "${ac_cv_prog_RC+set}" = set; then
22212  $as_echo_n "(cached) " >&6
22213else
22214  if test -n "$RC"; then
22215  ac_cv_prog_RC="$RC" # Let the user override the test.
22216else
22217  ac_prog_rejected=no
22218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22219for as_dir in $PATH
22220do
22221  IFS=$as_save_IFS
22222  test -z "$as_dir" && as_dir=.
22223  for ac_exec_ext in '' $ac_executable_extensions; do
22224  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22225    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22226       ac_prog_rejected=yes
22227       continue
22228     fi
22229    ac_cv_prog_RC="rc"
22230    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22231    break 2
22232  fi
22233done
22234done
22235IFS=$as_save_IFS
22236
22237if test $ac_prog_rejected = yes; then
22238  # We found a bogon in the path, so make sure we never use it.
22239  set dummy $ac_cv_prog_RC
22240  shift
22241  if test $# != 0; then
22242    # We chose a different compiler from the bogus one.
22243    # However, it has the same basename, so the bogon will be chosen
22244    # first if we set RC to just the basename; use the full file name.
22245    shift
22246    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22247  fi
22248fi
22249fi
22250fi
22251RC=$ac_cv_prog_RC
22252if test -n "$RC"; then
22253  { $as_echo "$as_me:$LINENO: result: $RC" >&5
22254$as_echo "$RC" >&6; }
22255else
22256  { $as_echo "$as_me:$LINENO: result: no" >&5
22257$as_echo "no" >&6; }
22258fi
22259
22260
22261
22262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22263
22264  # First separate the path from the arguments. This will split at the first
22265  # space.
22266  complete="$RC"
22267  path="${complete%% *}"
22268  tmp="$complete EOL"
22269  arguments="${tmp#* }"
22270
22271  # Input might be given as Windows format, start by converting to
22272  # unix format.
22273  new_path=`$CYGPATH -u "$path"`
22274
22275  # Now try to locate executable using which
22276  new_path=`$WHICH "$new_path" 2> /dev/null`
22277  # bat and cmd files are not always considered executable in cygwin causing which
22278  # to not find them
22279  if test "x$new_path" = x \
22280           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22281           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22282    new_path=`$CYGPATH -u "$path"`
22283  fi
22284  if test "x$new_path" = x; then
22285    # Oops. Which didn't find the executable.
22286    # The splitting of arguments from the executable at a space might have been incorrect,
22287    # since paths with space are more likely in Windows. Give it another try with the whole
22288    # argument.
22289    path="$complete"
22290    arguments="EOL"
22291    new_path=`$CYGPATH -u "$path"`
22292    new_path=`$WHICH "$new_path" 2> /dev/null`
22293    # bat and cmd files are not always considered executable in cygwin causing which
22294    # to not find them
22295    if test "x$new_path" = x \
22296             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22297             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22298      new_path=`$CYGPATH -u "$path"`
22299    fi
22300    if test "x$new_path" = x; then
22301      # It's still not found. Now this is an unrecoverable error.
22302      { $as_echo "$as_me:$LINENO: The path of RC, which resolves as \"$complete\", is not found." >&5
22303$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22304      has_space=`$ECHO "$complete" | $GREP " "`
22305      if test "x$has_space" != x; then
22306        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22308      fi
22309      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of RC" >&5
22310$as_echo "$as_me: error: Cannot locate the the path of RC" >&2;}
22311   { (exit 1); exit 1; }; }
22312    fi
22313  fi
22314
22315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22318  # "foo.exe" is OK but "foo" is an error.
22319  #
22320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22321  # It is also a way to make sure we got the proper file name for the real test later on.
22322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22323  if test "x$test_shortpath" = x; then
22324    # Short path failed, file does not exist as specified.
22325    # Try adding .exe or .cmd
22326    if test -f "${new_path}.exe"; then
22327       input_to_shortpath="${new_path}.exe"
22328    elif test -f "${new_path}.cmd"; then
22329       input_to_shortpath="${new_path}.cmd"
22330    else
22331      { $as_echo "$as_me:$LINENO: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22332$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22333      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22334$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22335      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of RC" >&5
22336$as_echo "$as_me: error: Cannot locate the the path of RC" >&2;}
22337   { (exit 1); exit 1; }; }
22338    fi
22339  else
22340    input_to_shortpath="$new_path"
22341  fi
22342
22343  # Call helper function which possibly converts this using DOS-style short mode.
22344  # If so, the updated path is stored in $new_path.
22345  new_path="$input_to_shortpath"
22346
22347  input_path="$input_to_shortpath"
22348  # Check if we need to convert this using DOS-style short mode. If the path
22349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22350  # take no chances and rewrite it.
22351  # Note: m4 eats our [], so we need to use [ and ] instead.
22352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22353  if test "x$has_forbidden_chars" != x; then
22354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22358      # Going to short mode and back again did indeed matter. Since short mode is
22359      # case insensitive, let's make it lowercase to improve readability.
22360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22361      # Now convert it back to Unix-stile (cygpath)
22362      input_path=`$CYGPATH -u "$shortmode_path"`
22363      new_path="$input_path"
22364    fi
22365  fi
22366
22367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22368  if test "x$test_cygdrive_prefix" = x; then
22369    # As a simple fix, exclude /usr/bin since it's not a real path.
22370    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22372      # a path prefixed by /cygdrive for fixpath to work.
22373      new_path="$CYGWIN_ROOT_PATH$input_path"
22374    fi
22375  fi
22376
22377  # remove trailing .exe if any
22378  new_path="${new_path/%.exe/}"
22379
22380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22381
22382  # First separate the path from the arguments. This will split at the first
22383  # space.
22384  complete="$RC"
22385  path="${complete%% *}"
22386  tmp="$complete EOL"
22387  arguments="${tmp#* }"
22388
22389  # Input might be given as Windows format, start by converting to
22390  # unix format.
22391  new_path="$path"
22392
22393  windows_path="$new_path"
22394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22395    unix_path=`$CYGPATH -u "$windows_path"`
22396    new_path="$unix_path"
22397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22399    new_path="$unix_path"
22400  fi
22401
22402
22403  # Now try to locate executable using which
22404  new_path=`$WHICH "$new_path" 2> /dev/null`
22405
22406  if test "x$new_path" = x; then
22407    # Oops. Which didn't find the executable.
22408    # The splitting of arguments from the executable at a space might have been incorrect,
22409    # since paths with space are more likely in Windows. Give it another try with the whole
22410    # argument.
22411    path="$complete"
22412    arguments="EOL"
22413    new_path="$path"
22414
22415  windows_path="$new_path"
22416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22417    unix_path=`$CYGPATH -u "$windows_path"`
22418    new_path="$unix_path"
22419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22421    new_path="$unix_path"
22422  fi
22423
22424
22425    new_path=`$WHICH "$new_path" 2> /dev/null`
22426
22427    if test "x$new_path" = x; then
22428      # It's still not found. Now this is an unrecoverable error.
22429      { $as_echo "$as_me:$LINENO: The path of RC, which resolves as \"$complete\", is not found." >&5
22430$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22431      has_space=`$ECHO "$complete" | $GREP " "`
22432      if test "x$has_space" != x; then
22433        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22435      fi
22436      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of RC" >&5
22437$as_echo "$as_me: error: Cannot locate the the path of RC" >&2;}
22438   { (exit 1); exit 1; }; }
22439    fi
22440  fi
22441
22442  # Now new_path has a complete unix path to the binary
22443  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22444    # Keep paths in /bin as-is, but remove trailing .exe if any
22445    new_path="${new_path/%.exe/}"
22446    # Do not save /bin paths to all_fixpath_prefixes!
22447  else
22448    # Not in mixed or Windows style, start by that.
22449    new_path=`cmd //c echo $new_path`
22450
22451  input_path="$new_path"
22452  # Check if we need to convert this using DOS-style short mode. If the path
22453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22454  # take no chances and rewrite it.
22455  # Note: m4 eats our [], so we need to use [ and ] instead.
22456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22457  if test "x$has_forbidden_chars" != x; then
22458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22460  fi
22461
22462    # Output is in $new_path
22463
22464  windows_path="$new_path"
22465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22466    unix_path=`$CYGPATH -u "$windows_path"`
22467    new_path="$unix_path"
22468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22470    new_path="$unix_path"
22471  fi
22472
22473    # remove trailing .exe if any
22474    new_path="${new_path/%.exe/}"
22475
22476    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22477    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22478  fi
22479
22480  else
22481    # We're on a posix platform. Hooray! :)
22482    # First separate the path from the arguments. This will split at the first
22483    # space.
22484    complete="$RC"
22485    path="${complete%% *}"
22486    tmp="$complete EOL"
22487    arguments="${tmp#* }"
22488
22489    new_path=`$WHICH $path 2> /dev/null`
22490    if test "x$new_path" = x; then
22491      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22492      if test "x$is_absolute_path" != x; then
22493        { $as_echo "$as_me:$LINENO: Resolving RC (as $path) with 'which' failed, using $path directly." >&5
22494$as_echo "$as_me: Resolving RC (as $path) with 'which' failed, using $path directly." >&6;}
22495        new_path="$path"
22496      else
22497        { $as_echo "$as_me:$LINENO: The path of RC, which resolves as \"$complete\", is not found." >&5
22498$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22499        has_space=`$ECHO "$complete" | $GREP " "`
22500        if test "x$has_space" != x; then
22501          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
22502$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22503        fi
22504        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of RC" >&5
22505$as_echo "$as_me: error: Cannot locate the the path of RC" >&2;}
22506   { (exit 1); exit 1; }; }
22507      fi
22508    fi
22509  fi
22510
22511  # Now join together the path and the arguments once again
22512  if test "x$arguments" != xEOL; then
22513      new_complete="$new_path ${arguments% *}"
22514  else
22515      new_complete="$new_path"
22516  fi
22517
22518  if test "x$complete" != "x$new_complete"; then
22519    RC="$new_complete"
22520    { $as_echo "$as_me:$LINENO: Rewriting RC to \"$new_complete\"" >&5
22521$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22522  fi
22523
22524
22525    # For hotspot, we need these in Windows mixed path,
22526    # so rewrite them all. Need added .exe suffix.
22527    HOTSPOT_CXX="$CXX.exe"
22528    HOTSPOT_LD="$LD.exe"
22529    HOTSPOT_MT="$MT.exe"
22530    HOTSPOT_RC="$RC.exe"
22531
22532  unix_path="$HOTSPOT_CXX"
22533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22534    windows_path=`$CYGPATH -m "$unix_path"`
22535    HOTSPOT_CXX="$windows_path"
22536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22537    windows_path=`cmd //c echo $unix_path`
22538    HOTSPOT_CXX="$windows_path"
22539  fi
22540
22541
22542  unix_path="$HOTSPOT_LD"
22543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22544    windows_path=`$CYGPATH -m "$unix_path"`
22545    HOTSPOT_LD="$windows_path"
22546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22547    windows_path=`cmd //c echo $unix_path`
22548    HOTSPOT_LD="$windows_path"
22549  fi
22550
22551
22552  unix_path="$HOTSPOT_MT"
22553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22554    windows_path=`$CYGPATH -m "$unix_path"`
22555    HOTSPOT_MT="$windows_path"
22556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22557    windows_path=`cmd //c echo $unix_path`
22558    HOTSPOT_MT="$windows_path"
22559  fi
22560
22561
22562  unix_path="$HOTSPOT_RC"
22563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22564    windows_path=`$CYGPATH -m "$unix_path"`
22565    HOTSPOT_RC="$windows_path"
22566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22567    windows_path=`cmd //c echo $unix_path`
22568    HOTSPOT_RC="$windows_path"
22569  fi
22570
22571
22572
22573
22574    RC_FLAGS="-nologo -l 0x409 -r"
22575    if test "x$VARIANT" = xOPT; then
22576
22577        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22578
22579fi
22580
22581    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22582    if test "x$JDK_UPDATE_VERSION" = x; then
22583
22584        JDK_UPDATE_VERSION_NOTNULL=0
22585
22586fi
22587
22588    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22589    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22590    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22591    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22592    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22593    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22594    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22595
22596    # lib.exe is used to create static libraries.
22597    # Extract the first word of "lib", so it can be a program name with args.
22598set dummy lib; ac_word=$2
22599{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
22600$as_echo_n "checking for $ac_word... " >&6; }
22601if test "${ac_cv_prog_WINAR+set}" = set; then
22602  $as_echo_n "(cached) " >&6
22603else
22604  if test -n "$WINAR"; then
22605  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22606else
22607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22608for as_dir in $PATH
22609do
22610  IFS=$as_save_IFS
22611  test -z "$as_dir" && as_dir=.
22612  for ac_exec_ext in '' $ac_executable_extensions; do
22613  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22614    ac_cv_prog_WINAR="lib"
22615    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22616    break 2
22617  fi
22618done
22619done
22620IFS=$as_save_IFS
22621
22622fi
22623fi
22624WINAR=$ac_cv_prog_WINAR
22625if test -n "$WINAR"; then
22626  { $as_echo "$as_me:$LINENO: result: $WINAR" >&5
22627$as_echo "$WINAR" >&6; }
22628else
22629  { $as_echo "$as_me:$LINENO: result: no" >&5
22630$as_echo "no" >&6; }
22631fi
22632
22633
22634
22635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22636
22637  # First separate the path from the arguments. This will split at the first
22638  # space.
22639  complete="$WINAR"
22640  path="${complete%% *}"
22641  tmp="$complete EOL"
22642  arguments="${tmp#* }"
22643
22644  # Input might be given as Windows format, start by converting to
22645  # unix format.
22646  new_path=`$CYGPATH -u "$path"`
22647
22648  # Now try to locate executable using which
22649  new_path=`$WHICH "$new_path" 2> /dev/null`
22650  # bat and cmd files are not always considered executable in cygwin causing which
22651  # to not find them
22652  if test "x$new_path" = x \
22653           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22654           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22655    new_path=`$CYGPATH -u "$path"`
22656  fi
22657  if test "x$new_path" = x; then
22658    # Oops. Which didn't find the executable.
22659    # The splitting of arguments from the executable at a space might have been incorrect,
22660    # since paths with space are more likely in Windows. Give it another try with the whole
22661    # argument.
22662    path="$complete"
22663    arguments="EOL"
22664    new_path=`$CYGPATH -u "$path"`
22665    new_path=`$WHICH "$new_path" 2> /dev/null`
22666    # bat and cmd files are not always considered executable in cygwin causing which
22667    # to not find them
22668    if test "x$new_path" = x \
22669             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22670             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22671      new_path=`$CYGPATH -u "$path"`
22672    fi
22673    if test "x$new_path" = x; then
22674      # It's still not found. Now this is an unrecoverable error.
22675      { $as_echo "$as_me:$LINENO: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22676$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22677      has_space=`$ECHO "$complete" | $GREP " "`
22678      if test "x$has_space" != x; then
22679        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22680$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22681      fi
22682      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINAR" >&5
22683$as_echo "$as_me: error: Cannot locate the the path of WINAR" >&2;}
22684   { (exit 1); exit 1; }; }
22685    fi
22686  fi
22687
22688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22691  # "foo.exe" is OK but "foo" is an error.
22692  #
22693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22694  # It is also a way to make sure we got the proper file name for the real test later on.
22695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22696  if test "x$test_shortpath" = x; then
22697    # Short path failed, file does not exist as specified.
22698    # Try adding .exe or .cmd
22699    if test -f "${new_path}.exe"; then
22700       input_to_shortpath="${new_path}.exe"
22701    elif test -f "${new_path}.cmd"; then
22702       input_to_shortpath="${new_path}.cmd"
22703    else
22704      { $as_echo "$as_me:$LINENO: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22705$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22706      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22707$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22708      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINAR" >&5
22709$as_echo "$as_me: error: Cannot locate the the path of WINAR" >&2;}
22710   { (exit 1); exit 1; }; }
22711    fi
22712  else
22713    input_to_shortpath="$new_path"
22714  fi
22715
22716  # Call helper function which possibly converts this using DOS-style short mode.
22717  # If so, the updated path is stored in $new_path.
22718  new_path="$input_to_shortpath"
22719
22720  input_path="$input_to_shortpath"
22721  # Check if we need to convert this using DOS-style short mode. If the path
22722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22723  # take no chances and rewrite it.
22724  # Note: m4 eats our [], so we need to use [ and ] instead.
22725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22726  if test "x$has_forbidden_chars" != x; then
22727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22731      # Going to short mode and back again did indeed matter. Since short mode is
22732      # case insensitive, let's make it lowercase to improve readability.
22733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22734      # Now convert it back to Unix-stile (cygpath)
22735      input_path=`$CYGPATH -u "$shortmode_path"`
22736      new_path="$input_path"
22737    fi
22738  fi
22739
22740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22741  if test "x$test_cygdrive_prefix" = x; then
22742    # As a simple fix, exclude /usr/bin since it's not a real path.
22743    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22745      # a path prefixed by /cygdrive for fixpath to work.
22746      new_path="$CYGWIN_ROOT_PATH$input_path"
22747    fi
22748  fi
22749
22750  # remove trailing .exe if any
22751  new_path="${new_path/%.exe/}"
22752
22753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22754
22755  # First separate the path from the arguments. This will split at the first
22756  # space.
22757  complete="$WINAR"
22758  path="${complete%% *}"
22759  tmp="$complete EOL"
22760  arguments="${tmp#* }"
22761
22762  # Input might be given as Windows format, start by converting to
22763  # unix format.
22764  new_path="$path"
22765
22766  windows_path="$new_path"
22767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22768    unix_path=`$CYGPATH -u "$windows_path"`
22769    new_path="$unix_path"
22770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22772    new_path="$unix_path"
22773  fi
22774
22775
22776  # Now try to locate executable using which
22777  new_path=`$WHICH "$new_path" 2> /dev/null`
22778
22779  if test "x$new_path" = x; then
22780    # Oops. Which didn't find the executable.
22781    # The splitting of arguments from the executable at a space might have been incorrect,
22782    # since paths with space are more likely in Windows. Give it another try with the whole
22783    # argument.
22784    path="$complete"
22785    arguments="EOL"
22786    new_path="$path"
22787
22788  windows_path="$new_path"
22789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22790    unix_path=`$CYGPATH -u "$windows_path"`
22791    new_path="$unix_path"
22792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22794    new_path="$unix_path"
22795  fi
22796
22797
22798    new_path=`$WHICH "$new_path" 2> /dev/null`
22799
22800    if test "x$new_path" = x; then
22801      # It's still not found. Now this is an unrecoverable error.
22802      { $as_echo "$as_me:$LINENO: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22803$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22804      has_space=`$ECHO "$complete" | $GREP " "`
22805      if test "x$has_space" != x; then
22806        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22808      fi
22809      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINAR" >&5
22810$as_echo "$as_me: error: Cannot locate the the path of WINAR" >&2;}
22811   { (exit 1); exit 1; }; }
22812    fi
22813  fi
22814
22815  # Now new_path has a complete unix path to the binary
22816  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22817    # Keep paths in /bin as-is, but remove trailing .exe if any
22818    new_path="${new_path/%.exe/}"
22819    # Do not save /bin paths to all_fixpath_prefixes!
22820  else
22821    # Not in mixed or Windows style, start by that.
22822    new_path=`cmd //c echo $new_path`
22823
22824  input_path="$new_path"
22825  # Check if we need to convert this using DOS-style short mode. If the path
22826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22827  # take no chances and rewrite it.
22828  # Note: m4 eats our [], so we need to use [ and ] instead.
22829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22830  if test "x$has_forbidden_chars" != x; then
22831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22833  fi
22834
22835    # Output is in $new_path
22836
22837  windows_path="$new_path"
22838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22839    unix_path=`$CYGPATH -u "$windows_path"`
22840    new_path="$unix_path"
22841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22843    new_path="$unix_path"
22844  fi
22845
22846    # remove trailing .exe if any
22847    new_path="${new_path/%.exe/}"
22848
22849    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22850    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22851  fi
22852
22853  else
22854    # We're on a posix platform. Hooray! :)
22855    # First separate the path from the arguments. This will split at the first
22856    # space.
22857    complete="$WINAR"
22858    path="${complete%% *}"
22859    tmp="$complete EOL"
22860    arguments="${tmp#* }"
22861
22862    new_path=`$WHICH $path 2> /dev/null`
22863    if test "x$new_path" = x; then
22864      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22865      if test "x$is_absolute_path" != x; then
22866        { $as_echo "$as_me:$LINENO: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&5
22867$as_echo "$as_me: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&6;}
22868        new_path="$path"
22869      else
22870        { $as_echo "$as_me:$LINENO: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22871$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22872        has_space=`$ECHO "$complete" | $GREP " "`
22873        if test "x$has_space" != x; then
22874          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
22875$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22876        fi
22877        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINAR" >&5
22878$as_echo "$as_me: error: Cannot locate the the path of WINAR" >&2;}
22879   { (exit 1); exit 1; }; }
22880      fi
22881    fi
22882  fi
22883
22884  # Now join together the path and the arguments once again
22885  if test "x$arguments" != xEOL; then
22886      new_complete="$new_path ${arguments% *}"
22887  else
22888      new_complete="$new_path"
22889  fi
22890
22891  if test "x$complete" != "x$new_complete"; then
22892    WINAR="$new_complete"
22893    { $as_echo "$as_me:$LINENO: Rewriting WINAR to \"$new_complete\"" >&5
22894$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
22895  fi
22896
22897    AR="$WINAR"
22898    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
22899
22900    # Extract the first word of "dumpbin", so it can be a program name with args.
22901set dummy dumpbin; ac_word=$2
22902{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
22903$as_echo_n "checking for $ac_word... " >&6; }
22904if test "${ac_cv_prog_DUMPBIN+set}" = set; then
22905  $as_echo_n "(cached) " >&6
22906else
22907  if test -n "$DUMPBIN"; then
22908  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
22909else
22910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22911for as_dir in $PATH
22912do
22913  IFS=$as_save_IFS
22914  test -z "$as_dir" && as_dir=.
22915  for ac_exec_ext in '' $ac_executable_extensions; do
22916  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22917    ac_cv_prog_DUMPBIN="dumpbin"
22918    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22919    break 2
22920  fi
22921done
22922done
22923IFS=$as_save_IFS
22924
22925fi
22926fi
22927DUMPBIN=$ac_cv_prog_DUMPBIN
22928if test -n "$DUMPBIN"; then
22929  { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5
22930$as_echo "$DUMPBIN" >&6; }
22931else
22932  { $as_echo "$as_me:$LINENO: result: no" >&5
22933$as_echo "no" >&6; }
22934fi
22935
22936
22937
22938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22939
22940  # First separate the path from the arguments. This will split at the first
22941  # space.
22942  complete="$DUMPBIN"
22943  path="${complete%% *}"
22944  tmp="$complete EOL"
22945  arguments="${tmp#* }"
22946
22947  # Input might be given as Windows format, start by converting to
22948  # unix format.
22949  new_path=`$CYGPATH -u "$path"`
22950
22951  # Now try to locate executable using which
22952  new_path=`$WHICH "$new_path" 2> /dev/null`
22953  # bat and cmd files are not always considered executable in cygwin causing which
22954  # to not find them
22955  if test "x$new_path" = x \
22956           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22957           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22958    new_path=`$CYGPATH -u "$path"`
22959  fi
22960  if test "x$new_path" = x; then
22961    # Oops. Which didn't find the executable.
22962    # The splitting of arguments from the executable at a space might have been incorrect,
22963    # since paths with space are more likely in Windows. Give it another try with the whole
22964    # argument.
22965    path="$complete"
22966    arguments="EOL"
22967    new_path=`$CYGPATH -u "$path"`
22968    new_path=`$WHICH "$new_path" 2> /dev/null`
22969    # bat and cmd files are not always considered executable in cygwin causing which
22970    # to not find them
22971    if test "x$new_path" = x \
22972             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22973             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22974      new_path=`$CYGPATH -u "$path"`
22975    fi
22976    if test "x$new_path" = x; then
22977      # It's still not found. Now this is an unrecoverable error.
22978      { $as_echo "$as_me:$LINENO: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22979$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22980      has_space=`$ECHO "$complete" | $GREP " "`
22981      if test "x$has_space" != x; then
22982        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22984      fi
22985      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of DUMPBIN" >&5
22986$as_echo "$as_me: error: Cannot locate the the path of DUMPBIN" >&2;}
22987   { (exit 1); exit 1; }; }
22988    fi
22989  fi
22990
22991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22994  # "foo.exe" is OK but "foo" is an error.
22995  #
22996  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22997  # It is also a way to make sure we got the proper file name for the real test later on.
22998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22999  if test "x$test_shortpath" = x; then
23000    # Short path failed, file does not exist as specified.
23001    # Try adding .exe or .cmd
23002    if test -f "${new_path}.exe"; then
23003       input_to_shortpath="${new_path}.exe"
23004    elif test -f "${new_path}.cmd"; then
23005       input_to_shortpath="${new_path}.cmd"
23006    else
23007      { $as_echo "$as_me:$LINENO: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23008$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23009      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23010$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23011      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of DUMPBIN" >&5
23012$as_echo "$as_me: error: Cannot locate the the path of DUMPBIN" >&2;}
23013   { (exit 1); exit 1; }; }
23014    fi
23015  else
23016    input_to_shortpath="$new_path"
23017  fi
23018
23019  # Call helper function which possibly converts this using DOS-style short mode.
23020  # If so, the updated path is stored in $new_path.
23021  new_path="$input_to_shortpath"
23022
23023  input_path="$input_to_shortpath"
23024  # Check if we need to convert this using DOS-style short mode. If the path
23025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23026  # take no chances and rewrite it.
23027  # Note: m4 eats our [], so we need to use [ and ] instead.
23028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23029  if test "x$has_forbidden_chars" != x; then
23030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23034      # Going to short mode and back again did indeed matter. Since short mode is
23035      # case insensitive, let's make it lowercase to improve readability.
23036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23037      # Now convert it back to Unix-stile (cygpath)
23038      input_path=`$CYGPATH -u "$shortmode_path"`
23039      new_path="$input_path"
23040    fi
23041  fi
23042
23043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23044  if test "x$test_cygdrive_prefix" = x; then
23045    # As a simple fix, exclude /usr/bin since it's not a real path.
23046    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23048      # a path prefixed by /cygdrive for fixpath to work.
23049      new_path="$CYGWIN_ROOT_PATH$input_path"
23050    fi
23051  fi
23052
23053  # remove trailing .exe if any
23054  new_path="${new_path/%.exe/}"
23055
23056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23057
23058  # First separate the path from the arguments. This will split at the first
23059  # space.
23060  complete="$DUMPBIN"
23061  path="${complete%% *}"
23062  tmp="$complete EOL"
23063  arguments="${tmp#* }"
23064
23065  # Input might be given as Windows format, start by converting to
23066  # unix format.
23067  new_path="$path"
23068
23069  windows_path="$new_path"
23070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23071    unix_path=`$CYGPATH -u "$windows_path"`
23072    new_path="$unix_path"
23073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23075    new_path="$unix_path"
23076  fi
23077
23078
23079  # Now try to locate executable using which
23080  new_path=`$WHICH "$new_path" 2> /dev/null`
23081
23082  if test "x$new_path" = x; then
23083    # Oops. Which didn't find the executable.
23084    # The splitting of arguments from the executable at a space might have been incorrect,
23085    # since paths with space are more likely in Windows. Give it another try with the whole
23086    # argument.
23087    path="$complete"
23088    arguments="EOL"
23089    new_path="$path"
23090
23091  windows_path="$new_path"
23092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23093    unix_path=`$CYGPATH -u "$windows_path"`
23094    new_path="$unix_path"
23095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23097    new_path="$unix_path"
23098  fi
23099
23100
23101    new_path=`$WHICH "$new_path" 2> /dev/null`
23102
23103    if test "x$new_path" = x; then
23104      # It's still not found. Now this is an unrecoverable error.
23105      { $as_echo "$as_me:$LINENO: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23106$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23107      has_space=`$ECHO "$complete" | $GREP " "`
23108      if test "x$has_space" != x; then
23109        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23111      fi
23112      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of DUMPBIN" >&5
23113$as_echo "$as_me: error: Cannot locate the the path of DUMPBIN" >&2;}
23114   { (exit 1); exit 1; }; }
23115    fi
23116  fi
23117
23118  # Now new_path has a complete unix path to the binary
23119  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23120    # Keep paths in /bin as-is, but remove trailing .exe if any
23121    new_path="${new_path/%.exe/}"
23122    # Do not save /bin paths to all_fixpath_prefixes!
23123  else
23124    # Not in mixed or Windows style, start by that.
23125    new_path=`cmd //c echo $new_path`
23126
23127  input_path="$new_path"
23128  # Check if we need to convert this using DOS-style short mode. If the path
23129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23130  # take no chances and rewrite it.
23131  # Note: m4 eats our [], so we need to use [ and ] instead.
23132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23133  if test "x$has_forbidden_chars" != x; then
23134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23136  fi
23137
23138    # Output is in $new_path
23139
23140  windows_path="$new_path"
23141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23142    unix_path=`$CYGPATH -u "$windows_path"`
23143    new_path="$unix_path"
23144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23146    new_path="$unix_path"
23147  fi
23148
23149    # remove trailing .exe if any
23150    new_path="${new_path/%.exe/}"
23151
23152    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23153    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23154  fi
23155
23156  else
23157    # We're on a posix platform. Hooray! :)
23158    # First separate the path from the arguments. This will split at the first
23159    # space.
23160    complete="$DUMPBIN"
23161    path="${complete%% *}"
23162    tmp="$complete EOL"
23163    arguments="${tmp#* }"
23164
23165    new_path=`$WHICH $path 2> /dev/null`
23166    if test "x$new_path" = x; then
23167      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23168      if test "x$is_absolute_path" != x; then
23169        { $as_echo "$as_me:$LINENO: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&5
23170$as_echo "$as_me: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&6;}
23171        new_path="$path"
23172      else
23173        { $as_echo "$as_me:$LINENO: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23174$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23175        has_space=`$ECHO "$complete" | $GREP " "`
23176        if test "x$has_space" != x; then
23177          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
23178$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23179        fi
23180        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of DUMPBIN" >&5
23181$as_echo "$as_me: error: Cannot locate the the path of DUMPBIN" >&2;}
23182   { (exit 1); exit 1; }; }
23183      fi
23184    fi
23185  fi
23186
23187  # Now join together the path and the arguments once again
23188  if test "x$arguments" != xEOL; then
23189      new_complete="$new_path ${arguments% *}"
23190  else
23191      new_complete="$new_path"
23192  fi
23193
23194  if test "x$complete" != "x$new_complete"; then
23195    DUMPBIN="$new_complete"
23196    { $as_echo "$as_me:$LINENO: Rewriting DUMPBIN to \"$new_complete\"" >&5
23197$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23198  fi
23199
23200
23201    COMPILER_TYPE=CL
23202    CCXXFLAGS="$CCXXFLAGS -nologo"
23203
23204fi
23205
23206
23207
23208
23209ac_ext=c
23210ac_cpp='$CPP $CPPFLAGS'
23211ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23212ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23213ac_compiler_gnu=$ac_cv_c_compiler_gnu
23214{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
23215$as_echo_n "checking how to run the C preprocessor... " >&6; }
23216# On Suns, sometimes $CPP names a directory.
23217if test -n "$CPP" && test -d "$CPP"; then
23218  CPP=
23219fi
23220if test -z "$CPP"; then
23221  if test "${ac_cv_prog_CPP+set}" = set; then
23222  $as_echo_n "(cached) " >&6
23223else
23224      # Double quotes because CPP needs to be expanded
23225    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23226    do
23227      ac_preproc_ok=false
23228for ac_c_preproc_warn_flag in '' yes
23229do
23230  # Use a header file that comes with gcc, so configuring glibc
23231  # with a fresh cross-compiler works.
23232  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23233  # <limits.h> exists even on freestanding compilers.
23234  # On the NeXT, cc -E runs the code through the compiler's parser,
23235  # not just through cpp. "Syntax error" is here to catch this case.
23236  cat >conftest.$ac_ext <<_ACEOF
23237/* confdefs.h.  */
23238_ACEOF
23239cat confdefs.h >>conftest.$ac_ext
23240cat >>conftest.$ac_ext <<_ACEOF
23241/* end confdefs.h.  */
23242#ifdef __STDC__
23243# include <limits.h>
23244#else
23245# include <assert.h>
23246#endif
23247		     Syntax error
23248_ACEOF
23249if { (ac_try="$ac_cpp conftest.$ac_ext"
23250case "(($ac_try" in
23251  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23252  *) ac_try_echo=$ac_try;;
23253esac
23254eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23255$as_echo "$ac_try_echo") >&5
23256  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23257  ac_status=$?
23258  grep -v '^ *+' conftest.er1 >conftest.err
23259  rm -f conftest.er1
23260  cat conftest.err >&5
23261  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23262  (exit $ac_status); } >/dev/null && {
23263	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23264	 test ! -s conftest.err
23265       }; then
23266  :
23267else
23268  $as_echo "$as_me: failed program was:" >&5
23269sed 's/^/| /' conftest.$ac_ext >&5
23270
23271  # Broken: fails on valid input.
23272continue
23273fi
23274
23275rm -f conftest.err conftest.$ac_ext
23276
23277  # OK, works on sane cases.  Now check whether nonexistent headers
23278  # can be detected and how.
23279  cat >conftest.$ac_ext <<_ACEOF
23280/* confdefs.h.  */
23281_ACEOF
23282cat confdefs.h >>conftest.$ac_ext
23283cat >>conftest.$ac_ext <<_ACEOF
23284/* end confdefs.h.  */
23285#include <ac_nonexistent.h>
23286_ACEOF
23287if { (ac_try="$ac_cpp conftest.$ac_ext"
23288case "(($ac_try" in
23289  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23290  *) ac_try_echo=$ac_try;;
23291esac
23292eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23293$as_echo "$ac_try_echo") >&5
23294  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23295  ac_status=$?
23296  grep -v '^ *+' conftest.er1 >conftest.err
23297  rm -f conftest.er1
23298  cat conftest.err >&5
23299  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23300  (exit $ac_status); } >/dev/null && {
23301	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23302	 test ! -s conftest.err
23303       }; then
23304  # Broken: success on invalid input.
23305continue
23306else
23307  $as_echo "$as_me: failed program was:" >&5
23308sed 's/^/| /' conftest.$ac_ext >&5
23309
23310  # Passes both tests.
23311ac_preproc_ok=:
23312break
23313fi
23314
23315rm -f conftest.err conftest.$ac_ext
23316
23317done
23318# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23319rm -f conftest.err conftest.$ac_ext
23320if $ac_preproc_ok; then
23321  break
23322fi
23323
23324    done
23325    ac_cv_prog_CPP=$CPP
23326
23327fi
23328  CPP=$ac_cv_prog_CPP
23329else
23330  ac_cv_prog_CPP=$CPP
23331fi
23332{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
23333$as_echo "$CPP" >&6; }
23334ac_preproc_ok=false
23335for ac_c_preproc_warn_flag in '' yes
23336do
23337  # Use a header file that comes with gcc, so configuring glibc
23338  # with a fresh cross-compiler works.
23339  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23340  # <limits.h> exists even on freestanding compilers.
23341  # On the NeXT, cc -E runs the code through the compiler's parser,
23342  # not just through cpp. "Syntax error" is here to catch this case.
23343  cat >conftest.$ac_ext <<_ACEOF
23344/* confdefs.h.  */
23345_ACEOF
23346cat confdefs.h >>conftest.$ac_ext
23347cat >>conftest.$ac_ext <<_ACEOF
23348/* end confdefs.h.  */
23349#ifdef __STDC__
23350# include <limits.h>
23351#else
23352# include <assert.h>
23353#endif
23354		     Syntax error
23355_ACEOF
23356if { (ac_try="$ac_cpp conftest.$ac_ext"
23357case "(($ac_try" in
23358  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23359  *) ac_try_echo=$ac_try;;
23360esac
23361eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23362$as_echo "$ac_try_echo") >&5
23363  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23364  ac_status=$?
23365  grep -v '^ *+' conftest.er1 >conftest.err
23366  rm -f conftest.er1
23367  cat conftest.err >&5
23368  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23369  (exit $ac_status); } >/dev/null && {
23370	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23371	 test ! -s conftest.err
23372       }; then
23373  :
23374else
23375  $as_echo "$as_me: failed program was:" >&5
23376sed 's/^/| /' conftest.$ac_ext >&5
23377
23378  # Broken: fails on valid input.
23379continue
23380fi
23381
23382rm -f conftest.err conftest.$ac_ext
23383
23384  # OK, works on sane cases.  Now check whether nonexistent headers
23385  # can be detected and how.
23386  cat >conftest.$ac_ext <<_ACEOF
23387/* confdefs.h.  */
23388_ACEOF
23389cat confdefs.h >>conftest.$ac_ext
23390cat >>conftest.$ac_ext <<_ACEOF
23391/* end confdefs.h.  */
23392#include <ac_nonexistent.h>
23393_ACEOF
23394if { (ac_try="$ac_cpp conftest.$ac_ext"
23395case "(($ac_try" in
23396  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23397  *) ac_try_echo=$ac_try;;
23398esac
23399eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23400$as_echo "$ac_try_echo") >&5
23401  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23402  ac_status=$?
23403  grep -v '^ *+' conftest.er1 >conftest.err
23404  rm -f conftest.er1
23405  cat conftest.err >&5
23406  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23407  (exit $ac_status); } >/dev/null && {
23408	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23409	 test ! -s conftest.err
23410       }; then
23411  # Broken: success on invalid input.
23412continue
23413else
23414  $as_echo "$as_me: failed program was:" >&5
23415sed 's/^/| /' conftest.$ac_ext >&5
23416
23417  # Passes both tests.
23418ac_preproc_ok=:
23419break
23420fi
23421
23422rm -f conftest.err conftest.$ac_ext
23423
23424done
23425# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23426rm -f conftest.err conftest.$ac_ext
23427if $ac_preproc_ok; then
23428  :
23429else
23430  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23432{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
23433See \`config.log' for more details." >&5
23434$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
23435See \`config.log' for more details." >&2;}
23436   { (exit 1); exit 1; }; }; }
23437fi
23438
23439ac_ext=cpp
23440ac_cpp='$CXXCPP $CPPFLAGS'
23441ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23442ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23443ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23444
23445
23446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23447
23448  # First separate the path from the arguments. This will split at the first
23449  # space.
23450  complete="$CPP"
23451  path="${complete%% *}"
23452  tmp="$complete EOL"
23453  arguments="${tmp#* }"
23454
23455  # Input might be given as Windows format, start by converting to
23456  # unix format.
23457  new_path=`$CYGPATH -u "$path"`
23458
23459  # Now try to locate executable using which
23460  new_path=`$WHICH "$new_path" 2> /dev/null`
23461  # bat and cmd files are not always considered executable in cygwin causing which
23462  # to not find them
23463  if test "x$new_path" = x \
23464           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23465           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23466    new_path=`$CYGPATH -u "$path"`
23467  fi
23468  if test "x$new_path" = x; then
23469    # Oops. Which didn't find the executable.
23470    # The splitting of arguments from the executable at a space might have been incorrect,
23471    # since paths with space are more likely in Windows. Give it another try with the whole
23472    # argument.
23473    path="$complete"
23474    arguments="EOL"
23475    new_path=`$CYGPATH -u "$path"`
23476    new_path=`$WHICH "$new_path" 2> /dev/null`
23477    # bat and cmd files are not always considered executable in cygwin causing which
23478    # to not find them
23479    if test "x$new_path" = x \
23480             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23481             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23482      new_path=`$CYGPATH -u "$path"`
23483    fi
23484    if test "x$new_path" = x; then
23485      # It's still not found. Now this is an unrecoverable error.
23486      { $as_echo "$as_me:$LINENO: The path of CPP, which resolves as \"$complete\", is not found." >&5
23487$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23488      has_space=`$ECHO "$complete" | $GREP " "`
23489      if test "x$has_space" != x; then
23490        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23492      fi
23493      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CPP" >&5
23494$as_echo "$as_me: error: Cannot locate the the path of CPP" >&2;}
23495   { (exit 1); exit 1; }; }
23496    fi
23497  fi
23498
23499  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23500  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23501  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23502  # "foo.exe" is OK but "foo" is an error.
23503  #
23504  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23505  # It is also a way to make sure we got the proper file name for the real test later on.
23506  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23507  if test "x$test_shortpath" = x; then
23508    # Short path failed, file does not exist as specified.
23509    # Try adding .exe or .cmd
23510    if test -f "${new_path}.exe"; then
23511       input_to_shortpath="${new_path}.exe"
23512    elif test -f "${new_path}.cmd"; then
23513       input_to_shortpath="${new_path}.cmd"
23514    else
23515      { $as_echo "$as_me:$LINENO: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23516$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23517      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23518$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23519      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CPP" >&5
23520$as_echo "$as_me: error: Cannot locate the the path of CPP" >&2;}
23521   { (exit 1); exit 1; }; }
23522    fi
23523  else
23524    input_to_shortpath="$new_path"
23525  fi
23526
23527  # Call helper function which possibly converts this using DOS-style short mode.
23528  # If so, the updated path is stored in $new_path.
23529  new_path="$input_to_shortpath"
23530
23531  input_path="$input_to_shortpath"
23532  # Check if we need to convert this using DOS-style short mode. If the path
23533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23534  # take no chances and rewrite it.
23535  # Note: m4 eats our [], so we need to use [ and ] instead.
23536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23537  if test "x$has_forbidden_chars" != x; then
23538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23542      # Going to short mode and back again did indeed matter. Since short mode is
23543      # case insensitive, let's make it lowercase to improve readability.
23544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23545      # Now convert it back to Unix-stile (cygpath)
23546      input_path=`$CYGPATH -u "$shortmode_path"`
23547      new_path="$input_path"
23548    fi
23549  fi
23550
23551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23552  if test "x$test_cygdrive_prefix" = x; then
23553    # As a simple fix, exclude /usr/bin since it's not a real path.
23554    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23556      # a path prefixed by /cygdrive for fixpath to work.
23557      new_path="$CYGWIN_ROOT_PATH$input_path"
23558    fi
23559  fi
23560
23561  # remove trailing .exe if any
23562  new_path="${new_path/%.exe/}"
23563
23564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23565
23566  # First separate the path from the arguments. This will split at the first
23567  # space.
23568  complete="$CPP"
23569  path="${complete%% *}"
23570  tmp="$complete EOL"
23571  arguments="${tmp#* }"
23572
23573  # Input might be given as Windows format, start by converting to
23574  # unix format.
23575  new_path="$path"
23576
23577  windows_path="$new_path"
23578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23579    unix_path=`$CYGPATH -u "$windows_path"`
23580    new_path="$unix_path"
23581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23583    new_path="$unix_path"
23584  fi
23585
23586
23587  # Now try to locate executable using which
23588  new_path=`$WHICH "$new_path" 2> /dev/null`
23589
23590  if test "x$new_path" = x; then
23591    # Oops. Which didn't find the executable.
23592    # The splitting of arguments from the executable at a space might have been incorrect,
23593    # since paths with space are more likely in Windows. Give it another try with the whole
23594    # argument.
23595    path="$complete"
23596    arguments="EOL"
23597    new_path="$path"
23598
23599  windows_path="$new_path"
23600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23601    unix_path=`$CYGPATH -u "$windows_path"`
23602    new_path="$unix_path"
23603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23605    new_path="$unix_path"
23606  fi
23607
23608
23609    new_path=`$WHICH "$new_path" 2> /dev/null`
23610
23611    if test "x$new_path" = x; then
23612      # It's still not found. Now this is an unrecoverable error.
23613      { $as_echo "$as_me:$LINENO: The path of CPP, which resolves as \"$complete\", is not found." >&5
23614$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23615      has_space=`$ECHO "$complete" | $GREP " "`
23616      if test "x$has_space" != x; then
23617        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23618$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23619      fi
23620      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CPP" >&5
23621$as_echo "$as_me: error: Cannot locate the the path of CPP" >&2;}
23622   { (exit 1); exit 1; }; }
23623    fi
23624  fi
23625
23626  # Now new_path has a complete unix path to the binary
23627  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23628    # Keep paths in /bin as-is, but remove trailing .exe if any
23629    new_path="${new_path/%.exe/}"
23630    # Do not save /bin paths to all_fixpath_prefixes!
23631  else
23632    # Not in mixed or Windows style, start by that.
23633    new_path=`cmd //c echo $new_path`
23634
23635  input_path="$new_path"
23636  # Check if we need to convert this using DOS-style short mode. If the path
23637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23638  # take no chances and rewrite it.
23639  # Note: m4 eats our [], so we need to use [ and ] instead.
23640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23641  if test "x$has_forbidden_chars" != x; then
23642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23643    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23644  fi
23645
23646    # Output is in $new_path
23647
23648  windows_path="$new_path"
23649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23650    unix_path=`$CYGPATH -u "$windows_path"`
23651    new_path="$unix_path"
23652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23654    new_path="$unix_path"
23655  fi
23656
23657    # remove trailing .exe if any
23658    new_path="${new_path/%.exe/}"
23659
23660    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23661    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23662  fi
23663
23664  else
23665    # We're on a posix platform. Hooray! :)
23666    # First separate the path from the arguments. This will split at the first
23667    # space.
23668    complete="$CPP"
23669    path="${complete%% *}"
23670    tmp="$complete EOL"
23671    arguments="${tmp#* }"
23672
23673    new_path=`$WHICH $path 2> /dev/null`
23674    if test "x$new_path" = x; then
23675      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23676      if test "x$is_absolute_path" != x; then
23677        { $as_echo "$as_me:$LINENO: Resolving CPP (as $path) with 'which' failed, using $path directly." >&5
23678$as_echo "$as_me: Resolving CPP (as $path) with 'which' failed, using $path directly." >&6;}
23679        new_path="$path"
23680      else
23681        { $as_echo "$as_me:$LINENO: The path of CPP, which resolves as \"$complete\", is not found." >&5
23682$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23683        has_space=`$ECHO "$complete" | $GREP " "`
23684        if test "x$has_space" != x; then
23685          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
23686$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23687        fi
23688        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CPP" >&5
23689$as_echo "$as_me: error: Cannot locate the the path of CPP" >&2;}
23690   { (exit 1); exit 1; }; }
23691      fi
23692    fi
23693  fi
23694
23695  # Now join together the path and the arguments once again
23696  if test "x$arguments" != xEOL; then
23697      new_complete="$new_path ${arguments% *}"
23698  else
23699      new_complete="$new_path"
23700  fi
23701
23702  if test "x$complete" != "x$new_complete"; then
23703    CPP="$new_complete"
23704    { $as_echo "$as_me:$LINENO: Rewriting CPP to \"$new_complete\"" >&5
23705$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23706  fi
23707
23708
23709ac_ext=cpp
23710ac_cpp='$CXXCPP $CPPFLAGS'
23711ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23712ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23713ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23714{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
23715$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23716if test -z "$CXXCPP"; then
23717  if test "${ac_cv_prog_CXXCPP+set}" = set; then
23718  $as_echo_n "(cached) " >&6
23719else
23720      # Double quotes because CXXCPP needs to be expanded
23721    for CXXCPP in "$CXX -E" "/lib/cpp"
23722    do
23723      ac_preproc_ok=false
23724for ac_cxx_preproc_warn_flag in '' yes
23725do
23726  # Use a header file that comes with gcc, so configuring glibc
23727  # with a fresh cross-compiler works.
23728  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23729  # <limits.h> exists even on freestanding compilers.
23730  # On the NeXT, cc -E runs the code through the compiler's parser,
23731  # not just through cpp. "Syntax error" is here to catch this case.
23732  cat >conftest.$ac_ext <<_ACEOF
23733/* confdefs.h.  */
23734_ACEOF
23735cat confdefs.h >>conftest.$ac_ext
23736cat >>conftest.$ac_ext <<_ACEOF
23737/* end confdefs.h.  */
23738#ifdef __STDC__
23739# include <limits.h>
23740#else
23741# include <assert.h>
23742#endif
23743		     Syntax error
23744_ACEOF
23745if { (ac_try="$ac_cpp conftest.$ac_ext"
23746case "(($ac_try" in
23747  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23748  *) ac_try_echo=$ac_try;;
23749esac
23750eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23751$as_echo "$ac_try_echo") >&5
23752  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23753  ac_status=$?
23754  grep -v '^ *+' conftest.er1 >conftest.err
23755  rm -f conftest.er1
23756  cat conftest.err >&5
23757  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23758  (exit $ac_status); } >/dev/null && {
23759	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
23760	 test ! -s conftest.err
23761       }; then
23762  :
23763else
23764  $as_echo "$as_me: failed program was:" >&5
23765sed 's/^/| /' conftest.$ac_ext >&5
23766
23767  # Broken: fails on valid input.
23768continue
23769fi
23770
23771rm -f conftest.err conftest.$ac_ext
23772
23773  # OK, works on sane cases.  Now check whether nonexistent headers
23774  # can be detected and how.
23775  cat >conftest.$ac_ext <<_ACEOF
23776/* confdefs.h.  */
23777_ACEOF
23778cat confdefs.h >>conftest.$ac_ext
23779cat >>conftest.$ac_ext <<_ACEOF
23780/* end confdefs.h.  */
23781#include <ac_nonexistent.h>
23782_ACEOF
23783if { (ac_try="$ac_cpp conftest.$ac_ext"
23784case "(($ac_try" in
23785  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23786  *) ac_try_echo=$ac_try;;
23787esac
23788eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23789$as_echo "$ac_try_echo") >&5
23790  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23791  ac_status=$?
23792  grep -v '^ *+' conftest.er1 >conftest.err
23793  rm -f conftest.er1
23794  cat conftest.err >&5
23795  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23796  (exit $ac_status); } >/dev/null && {
23797	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
23798	 test ! -s conftest.err
23799       }; then
23800  # Broken: success on invalid input.
23801continue
23802else
23803  $as_echo "$as_me: failed program was:" >&5
23804sed 's/^/| /' conftest.$ac_ext >&5
23805
23806  # Passes both tests.
23807ac_preproc_ok=:
23808break
23809fi
23810
23811rm -f conftest.err conftest.$ac_ext
23812
23813done
23814# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23815rm -f conftest.err conftest.$ac_ext
23816if $ac_preproc_ok; then
23817  break
23818fi
23819
23820    done
23821    ac_cv_prog_CXXCPP=$CXXCPP
23822
23823fi
23824  CXXCPP=$ac_cv_prog_CXXCPP
23825else
23826  ac_cv_prog_CXXCPP=$CXXCPP
23827fi
23828{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5
23829$as_echo "$CXXCPP" >&6; }
23830ac_preproc_ok=false
23831for ac_cxx_preproc_warn_flag in '' yes
23832do
23833  # Use a header file that comes with gcc, so configuring glibc
23834  # with a fresh cross-compiler works.
23835  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23836  # <limits.h> exists even on freestanding compilers.
23837  # On the NeXT, cc -E runs the code through the compiler's parser,
23838  # not just through cpp. "Syntax error" is here to catch this case.
23839  cat >conftest.$ac_ext <<_ACEOF
23840/* confdefs.h.  */
23841_ACEOF
23842cat confdefs.h >>conftest.$ac_ext
23843cat >>conftest.$ac_ext <<_ACEOF
23844/* end confdefs.h.  */
23845#ifdef __STDC__
23846# include <limits.h>
23847#else
23848# include <assert.h>
23849#endif
23850		     Syntax error
23851_ACEOF
23852if { (ac_try="$ac_cpp conftest.$ac_ext"
23853case "(($ac_try" in
23854  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23855  *) ac_try_echo=$ac_try;;
23856esac
23857eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23858$as_echo "$ac_try_echo") >&5
23859  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23860  ac_status=$?
23861  grep -v '^ *+' conftest.er1 >conftest.err
23862  rm -f conftest.er1
23863  cat conftest.err >&5
23864  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23865  (exit $ac_status); } >/dev/null && {
23866	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
23867	 test ! -s conftest.err
23868       }; then
23869  :
23870else
23871  $as_echo "$as_me: failed program was:" >&5
23872sed 's/^/| /' conftest.$ac_ext >&5
23873
23874  # Broken: fails on valid input.
23875continue
23876fi
23877
23878rm -f conftest.err conftest.$ac_ext
23879
23880  # OK, works on sane cases.  Now check whether nonexistent headers
23881  # can be detected and how.
23882  cat >conftest.$ac_ext <<_ACEOF
23883/* confdefs.h.  */
23884_ACEOF
23885cat confdefs.h >>conftest.$ac_ext
23886cat >>conftest.$ac_ext <<_ACEOF
23887/* end confdefs.h.  */
23888#include <ac_nonexistent.h>
23889_ACEOF
23890if { (ac_try="$ac_cpp conftest.$ac_ext"
23891case "(($ac_try" in
23892  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23893  *) ac_try_echo=$ac_try;;
23894esac
23895eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23896$as_echo "$ac_try_echo") >&5
23897  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23898  ac_status=$?
23899  grep -v '^ *+' conftest.er1 >conftest.err
23900  rm -f conftest.er1
23901  cat conftest.err >&5
23902  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23903  (exit $ac_status); } >/dev/null && {
23904	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
23905	 test ! -s conftest.err
23906       }; then
23907  # Broken: success on invalid input.
23908continue
23909else
23910  $as_echo "$as_me: failed program was:" >&5
23911sed 's/^/| /' conftest.$ac_ext >&5
23912
23913  # Passes both tests.
23914ac_preproc_ok=:
23915break
23916fi
23917
23918rm -f conftest.err conftest.$ac_ext
23919
23920done
23921# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23922rm -f conftest.err conftest.$ac_ext
23923if $ac_preproc_ok; then
23924  :
23925else
23926  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23927$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23928{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
23929See \`config.log' for more details." >&5
23930$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
23931See \`config.log' for more details." >&2;}
23932   { (exit 1); exit 1; }; }; }
23933fi
23934
23935ac_ext=cpp
23936ac_cpp='$CXXCPP $CPPFLAGS'
23937ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23938ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23939ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23940
23941
23942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23943
23944  # First separate the path from the arguments. This will split at the first
23945  # space.
23946  complete="$CXXCPP"
23947  path="${complete%% *}"
23948  tmp="$complete EOL"
23949  arguments="${tmp#* }"
23950
23951  # Input might be given as Windows format, start by converting to
23952  # unix format.
23953  new_path=`$CYGPATH -u "$path"`
23954
23955  # Now try to locate executable using which
23956  new_path=`$WHICH "$new_path" 2> /dev/null`
23957  # bat and cmd files are not always considered executable in cygwin causing which
23958  # to not find them
23959  if test "x$new_path" = x \
23960           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23961           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23962    new_path=`$CYGPATH -u "$path"`
23963  fi
23964  if test "x$new_path" = x; then
23965    # Oops. Which didn't find the executable.
23966    # The splitting of arguments from the executable at a space might have been incorrect,
23967    # since paths with space are more likely in Windows. Give it another try with the whole
23968    # argument.
23969    path="$complete"
23970    arguments="EOL"
23971    new_path=`$CYGPATH -u "$path"`
23972    new_path=`$WHICH "$new_path" 2> /dev/null`
23973    # bat and cmd files are not always considered executable in cygwin causing which
23974    # to not find them
23975    if test "x$new_path" = x \
23976             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23977             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23978      new_path=`$CYGPATH -u "$path"`
23979    fi
23980    if test "x$new_path" = x; then
23981      # It's still not found. Now this is an unrecoverable error.
23982      { $as_echo "$as_me:$LINENO: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23983$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23984      has_space=`$ECHO "$complete" | $GREP " "`
23985      if test "x$has_space" != x; then
23986        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23987$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23988      fi
23989      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXXCPP" >&5
23990$as_echo "$as_me: error: Cannot locate the the path of CXXCPP" >&2;}
23991   { (exit 1); exit 1; }; }
23992    fi
23993  fi
23994
23995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23998  # "foo.exe" is OK but "foo" is an error.
23999  #
24000  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24001  # It is also a way to make sure we got the proper file name for the real test later on.
24002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24003  if test "x$test_shortpath" = x; then
24004    # Short path failed, file does not exist as specified.
24005    # Try adding .exe or .cmd
24006    if test -f "${new_path}.exe"; then
24007       input_to_shortpath="${new_path}.exe"
24008    elif test -f "${new_path}.cmd"; then
24009       input_to_shortpath="${new_path}.cmd"
24010    else
24011      { $as_echo "$as_me:$LINENO: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24012$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24013      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24014$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24015      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXXCPP" >&5
24016$as_echo "$as_me: error: Cannot locate the the path of CXXCPP" >&2;}
24017   { (exit 1); exit 1; }; }
24018    fi
24019  else
24020    input_to_shortpath="$new_path"
24021  fi
24022
24023  # Call helper function which possibly converts this using DOS-style short mode.
24024  # If so, the updated path is stored in $new_path.
24025  new_path="$input_to_shortpath"
24026
24027  input_path="$input_to_shortpath"
24028  # Check if we need to convert this using DOS-style short mode. If the path
24029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24030  # take no chances and rewrite it.
24031  # Note: m4 eats our [], so we need to use [ and ] instead.
24032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24033  if test "x$has_forbidden_chars" != x; then
24034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24038      # Going to short mode and back again did indeed matter. Since short mode is
24039      # case insensitive, let's make it lowercase to improve readability.
24040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24041      # Now convert it back to Unix-stile (cygpath)
24042      input_path=`$CYGPATH -u "$shortmode_path"`
24043      new_path="$input_path"
24044    fi
24045  fi
24046
24047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24048  if test "x$test_cygdrive_prefix" = x; then
24049    # As a simple fix, exclude /usr/bin since it's not a real path.
24050    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24052      # a path prefixed by /cygdrive for fixpath to work.
24053      new_path="$CYGWIN_ROOT_PATH$input_path"
24054    fi
24055  fi
24056
24057  # remove trailing .exe if any
24058  new_path="${new_path/%.exe/}"
24059
24060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24061
24062  # First separate the path from the arguments. This will split at the first
24063  # space.
24064  complete="$CXXCPP"
24065  path="${complete%% *}"
24066  tmp="$complete EOL"
24067  arguments="${tmp#* }"
24068
24069  # Input might be given as Windows format, start by converting to
24070  # unix format.
24071  new_path="$path"
24072
24073  windows_path="$new_path"
24074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24075    unix_path=`$CYGPATH -u "$windows_path"`
24076    new_path="$unix_path"
24077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24079    new_path="$unix_path"
24080  fi
24081
24082
24083  # Now try to locate executable using which
24084  new_path=`$WHICH "$new_path" 2> /dev/null`
24085
24086  if test "x$new_path" = x; then
24087    # Oops. Which didn't find the executable.
24088    # The splitting of arguments from the executable at a space might have been incorrect,
24089    # since paths with space are more likely in Windows. Give it another try with the whole
24090    # argument.
24091    path="$complete"
24092    arguments="EOL"
24093    new_path="$path"
24094
24095  windows_path="$new_path"
24096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24097    unix_path=`$CYGPATH -u "$windows_path"`
24098    new_path="$unix_path"
24099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24101    new_path="$unix_path"
24102  fi
24103
24104
24105    new_path=`$WHICH "$new_path" 2> /dev/null`
24106
24107    if test "x$new_path" = x; then
24108      # It's still not found. Now this is an unrecoverable error.
24109      { $as_echo "$as_me:$LINENO: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24110$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24111      has_space=`$ECHO "$complete" | $GREP " "`
24112      if test "x$has_space" != x; then
24113        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24114$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24115      fi
24116      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXXCPP" >&5
24117$as_echo "$as_me: error: Cannot locate the the path of CXXCPP" >&2;}
24118   { (exit 1); exit 1; }; }
24119    fi
24120  fi
24121
24122  # Now new_path has a complete unix path to the binary
24123  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24124    # Keep paths in /bin as-is, but remove trailing .exe if any
24125    new_path="${new_path/%.exe/}"
24126    # Do not save /bin paths to all_fixpath_prefixes!
24127  else
24128    # Not in mixed or Windows style, start by that.
24129    new_path=`cmd //c echo $new_path`
24130
24131  input_path="$new_path"
24132  # Check if we need to convert this using DOS-style short mode. If the path
24133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24134  # take no chances and rewrite it.
24135  # Note: m4 eats our [], so we need to use [ and ] instead.
24136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24137  if test "x$has_forbidden_chars" != x; then
24138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24139    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24140  fi
24141
24142    # Output is in $new_path
24143
24144  windows_path="$new_path"
24145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24146    unix_path=`$CYGPATH -u "$windows_path"`
24147    new_path="$unix_path"
24148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24150    new_path="$unix_path"
24151  fi
24152
24153    # remove trailing .exe if any
24154    new_path="${new_path/%.exe/}"
24155
24156    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24157    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24158  fi
24159
24160  else
24161    # We're on a posix platform. Hooray! :)
24162    # First separate the path from the arguments. This will split at the first
24163    # space.
24164    complete="$CXXCPP"
24165    path="${complete%% *}"
24166    tmp="$complete EOL"
24167    arguments="${tmp#* }"
24168
24169    new_path=`$WHICH $path 2> /dev/null`
24170    if test "x$new_path" = x; then
24171      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24172      if test "x$is_absolute_path" != x; then
24173        { $as_echo "$as_me:$LINENO: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&5
24174$as_echo "$as_me: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&6;}
24175        new_path="$path"
24176      else
24177        { $as_echo "$as_me:$LINENO: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24178$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24179        has_space=`$ECHO "$complete" | $GREP " "`
24180        if test "x$has_space" != x; then
24181          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
24182$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24183        fi
24184        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXXCPP" >&5
24185$as_echo "$as_me: error: Cannot locate the the path of CXXCPP" >&2;}
24186   { (exit 1); exit 1; }; }
24187      fi
24188    fi
24189  fi
24190
24191  # Now join together the path and the arguments once again
24192  if test "x$arguments" != xEOL; then
24193      new_complete="$new_path ${arguments% *}"
24194  else
24195      new_complete="$new_path"
24196  fi
24197
24198  if test "x$complete" != "x$new_complete"; then
24199    CXXCPP="$new_complete"
24200    { $as_echo "$as_me:$LINENO: Rewriting CXXCPP to \"$new_complete\"" >&5
24201$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24202  fi
24203
24204
24205if test "x$COMPILE_TYPE" != "xcross"; then
24206    # If we are not cross compiling, use the same compilers for
24207    # building the build platform executables. The cross-compilation
24208    # case needed to be done earlier, but this can only be done after
24209    # the native tools have been localized.
24210    BUILD_CC="$CC"
24211    BUILD_CXX="$CXX"
24212    BUILD_LD="$LD"
24213fi
24214
24215# for solaris we really need solaris tools, and not gnu equivalent
24216#   these seems to normally reside in /usr/ccs/bin so add that to path before
24217#   starting to probe
24218#
24219#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24220#         so that it can be overriden --with-tools-dir
24221if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24222    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24223fi
24224
24225# Find the right assembler.
24226if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24227    # Extract the first word of "as", so it can be a program name with args.
24228set dummy as; ac_word=$2
24229{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
24230$as_echo_n "checking for $ac_word... " >&6; }
24231if test "${ac_cv_path_AS+set}" = set; then
24232  $as_echo_n "(cached) " >&6
24233else
24234  case $AS in
24235  [\\/]* | ?:[\\/]*)
24236  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24237  ;;
24238  *)
24239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24240for as_dir in $PATH
24241do
24242  IFS=$as_save_IFS
24243  test -z "$as_dir" && as_dir=.
24244  for ac_exec_ext in '' $ac_executable_extensions; do
24245  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24246    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24247    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24248    break 2
24249  fi
24250done
24251done
24252IFS=$as_save_IFS
24253
24254  ;;
24255esac
24256fi
24257AS=$ac_cv_path_AS
24258if test -n "$AS"; then
24259  { $as_echo "$as_me:$LINENO: result: $AS" >&5
24260$as_echo "$AS" >&6; }
24261else
24262  { $as_echo "$as_me:$LINENO: result: no" >&5
24263$as_echo "no" >&6; }
24264fi
24265
24266
24267
24268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24269
24270  # First separate the path from the arguments. This will split at the first
24271  # space.
24272  complete="$AS"
24273  path="${complete%% *}"
24274  tmp="$complete EOL"
24275  arguments="${tmp#* }"
24276
24277  # Input might be given as Windows format, start by converting to
24278  # unix format.
24279  new_path=`$CYGPATH -u "$path"`
24280
24281  # Now try to locate executable using which
24282  new_path=`$WHICH "$new_path" 2> /dev/null`
24283  # bat and cmd files are not always considered executable in cygwin causing which
24284  # to not find them
24285  if test "x$new_path" = x \
24286           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24287           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24288    new_path=`$CYGPATH -u "$path"`
24289  fi
24290  if test "x$new_path" = x; then
24291    # Oops. Which didn't find the executable.
24292    # The splitting of arguments from the executable at a space might have been incorrect,
24293    # since paths with space are more likely in Windows. Give it another try with the whole
24294    # argument.
24295    path="$complete"
24296    arguments="EOL"
24297    new_path=`$CYGPATH -u "$path"`
24298    new_path=`$WHICH "$new_path" 2> /dev/null`
24299    # bat and cmd files are not always considered executable in cygwin causing which
24300    # to not find them
24301    if test "x$new_path" = x \
24302             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24303             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24304      new_path=`$CYGPATH -u "$path"`
24305    fi
24306    if test "x$new_path" = x; then
24307      # It's still not found. Now this is an unrecoverable error.
24308      { $as_echo "$as_me:$LINENO: The path of AS, which resolves as \"$complete\", is not found." >&5
24309$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24310      has_space=`$ECHO "$complete" | $GREP " "`
24311      if test "x$has_space" != x; then
24312        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24313$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24314      fi
24315      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AS" >&5
24316$as_echo "$as_me: error: Cannot locate the the path of AS" >&2;}
24317   { (exit 1); exit 1; }; }
24318    fi
24319  fi
24320
24321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24324  # "foo.exe" is OK but "foo" is an error.
24325  #
24326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24327  # It is also a way to make sure we got the proper file name for the real test later on.
24328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24329  if test "x$test_shortpath" = x; then
24330    # Short path failed, file does not exist as specified.
24331    # Try adding .exe or .cmd
24332    if test -f "${new_path}.exe"; then
24333       input_to_shortpath="${new_path}.exe"
24334    elif test -f "${new_path}.cmd"; then
24335       input_to_shortpath="${new_path}.cmd"
24336    else
24337      { $as_echo "$as_me:$LINENO: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24338$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24339      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24340$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24341      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AS" >&5
24342$as_echo "$as_me: error: Cannot locate the the path of AS" >&2;}
24343   { (exit 1); exit 1; }; }
24344    fi
24345  else
24346    input_to_shortpath="$new_path"
24347  fi
24348
24349  # Call helper function which possibly converts this using DOS-style short mode.
24350  # If so, the updated path is stored in $new_path.
24351  new_path="$input_to_shortpath"
24352
24353  input_path="$input_to_shortpath"
24354  # Check if we need to convert this using DOS-style short mode. If the path
24355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24356  # take no chances and rewrite it.
24357  # Note: m4 eats our [], so we need to use [ and ] instead.
24358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24359  if test "x$has_forbidden_chars" != x; then
24360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24364      # Going to short mode and back again did indeed matter. Since short mode is
24365      # case insensitive, let's make it lowercase to improve readability.
24366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24367      # Now convert it back to Unix-stile (cygpath)
24368      input_path=`$CYGPATH -u "$shortmode_path"`
24369      new_path="$input_path"
24370    fi
24371  fi
24372
24373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24374  if test "x$test_cygdrive_prefix" = x; then
24375    # As a simple fix, exclude /usr/bin since it's not a real path.
24376    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24378      # a path prefixed by /cygdrive for fixpath to work.
24379      new_path="$CYGWIN_ROOT_PATH$input_path"
24380    fi
24381  fi
24382
24383  # remove trailing .exe if any
24384  new_path="${new_path/%.exe/}"
24385
24386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24387
24388  # First separate the path from the arguments. This will split at the first
24389  # space.
24390  complete="$AS"
24391  path="${complete%% *}"
24392  tmp="$complete EOL"
24393  arguments="${tmp#* }"
24394
24395  # Input might be given as Windows format, start by converting to
24396  # unix format.
24397  new_path="$path"
24398
24399  windows_path="$new_path"
24400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24401    unix_path=`$CYGPATH -u "$windows_path"`
24402    new_path="$unix_path"
24403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24405    new_path="$unix_path"
24406  fi
24407
24408
24409  # Now try to locate executable using which
24410  new_path=`$WHICH "$new_path" 2> /dev/null`
24411
24412  if test "x$new_path" = x; then
24413    # Oops. Which didn't find the executable.
24414    # The splitting of arguments from the executable at a space might have been incorrect,
24415    # since paths with space are more likely in Windows. Give it another try with the whole
24416    # argument.
24417    path="$complete"
24418    arguments="EOL"
24419    new_path="$path"
24420
24421  windows_path="$new_path"
24422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24423    unix_path=`$CYGPATH -u "$windows_path"`
24424    new_path="$unix_path"
24425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24427    new_path="$unix_path"
24428  fi
24429
24430
24431    new_path=`$WHICH "$new_path" 2> /dev/null`
24432
24433    if test "x$new_path" = x; then
24434      # It's still not found. Now this is an unrecoverable error.
24435      { $as_echo "$as_me:$LINENO: The path of AS, which resolves as \"$complete\", is not found." >&5
24436$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24437      has_space=`$ECHO "$complete" | $GREP " "`
24438      if test "x$has_space" != x; then
24439        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24441      fi
24442      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AS" >&5
24443$as_echo "$as_me: error: Cannot locate the the path of AS" >&2;}
24444   { (exit 1); exit 1; }; }
24445    fi
24446  fi
24447
24448  # Now new_path has a complete unix path to the binary
24449  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24450    # Keep paths in /bin as-is, but remove trailing .exe if any
24451    new_path="${new_path/%.exe/}"
24452    # Do not save /bin paths to all_fixpath_prefixes!
24453  else
24454    # Not in mixed or Windows style, start by that.
24455    new_path=`cmd //c echo $new_path`
24456
24457  input_path="$new_path"
24458  # Check if we need to convert this using DOS-style short mode. If the path
24459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24460  # take no chances and rewrite it.
24461  # Note: m4 eats our [], so we need to use [ and ] instead.
24462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24463  if test "x$has_forbidden_chars" != x; then
24464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24466  fi
24467
24468    # Output is in $new_path
24469
24470  windows_path="$new_path"
24471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24472    unix_path=`$CYGPATH -u "$windows_path"`
24473    new_path="$unix_path"
24474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24476    new_path="$unix_path"
24477  fi
24478
24479    # remove trailing .exe if any
24480    new_path="${new_path/%.exe/}"
24481
24482    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24483    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24484  fi
24485
24486  else
24487    # We're on a posix platform. Hooray! :)
24488    # First separate the path from the arguments. This will split at the first
24489    # space.
24490    complete="$AS"
24491    path="${complete%% *}"
24492    tmp="$complete EOL"
24493    arguments="${tmp#* }"
24494
24495    new_path=`$WHICH $path 2> /dev/null`
24496    if test "x$new_path" = x; then
24497      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24498      if test "x$is_absolute_path" != x; then
24499        { $as_echo "$as_me:$LINENO: Resolving AS (as $path) with 'which' failed, using $path directly." >&5
24500$as_echo "$as_me: Resolving AS (as $path) with 'which' failed, using $path directly." >&6;}
24501        new_path="$path"
24502      else
24503        { $as_echo "$as_me:$LINENO: The path of AS, which resolves as \"$complete\", is not found." >&5
24504$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24505        has_space=`$ECHO "$complete" | $GREP " "`
24506        if test "x$has_space" != x; then
24507          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
24508$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24509        fi
24510        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AS" >&5
24511$as_echo "$as_me: error: Cannot locate the the path of AS" >&2;}
24512   { (exit 1); exit 1; }; }
24513      fi
24514    fi
24515  fi
24516
24517  # Now join together the path and the arguments once again
24518  if test "x$arguments" != xEOL; then
24519      new_complete="$new_path ${arguments% *}"
24520  else
24521      new_complete="$new_path"
24522  fi
24523
24524  if test "x$complete" != "x$new_complete"; then
24525    AS="$new_complete"
24526    { $as_echo "$as_me:$LINENO: Rewriting AS to \"$new_complete\"" >&5
24527$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24528  fi
24529
24530else
24531    AS="$CC -c"
24532fi
24533
24534
24535if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24536    for ac_prog in gnm nm
24537do
24538  # Extract the first word of "$ac_prog", so it can be a program name with args.
24539set dummy $ac_prog; ac_word=$2
24540{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
24541$as_echo_n "checking for $ac_word... " >&6; }
24542if test "${ac_cv_path_NM+set}" = set; then
24543  $as_echo_n "(cached) " >&6
24544else
24545  case $NM in
24546  [\\/]* | ?:[\\/]*)
24547  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24548  ;;
24549  *)
24550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24551for as_dir in $PATH
24552do
24553  IFS=$as_save_IFS
24554  test -z "$as_dir" && as_dir=.
24555  for ac_exec_ext in '' $ac_executable_extensions; do
24556  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24557    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24558    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24559    break 2
24560  fi
24561done
24562done
24563IFS=$as_save_IFS
24564
24565  ;;
24566esac
24567fi
24568NM=$ac_cv_path_NM
24569if test -n "$NM"; then
24570  { $as_echo "$as_me:$LINENO: result: $NM" >&5
24571$as_echo "$NM" >&6; }
24572else
24573  { $as_echo "$as_me:$LINENO: result: no" >&5
24574$as_echo "no" >&6; }
24575fi
24576
24577
24578  test -n "$NM" && break
24579done
24580
24581
24582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24583
24584  # First separate the path from the arguments. This will split at the first
24585  # space.
24586  complete="$NM"
24587  path="${complete%% *}"
24588  tmp="$complete EOL"
24589  arguments="${tmp#* }"
24590
24591  # Input might be given as Windows format, start by converting to
24592  # unix format.
24593  new_path=`$CYGPATH -u "$path"`
24594
24595  # Now try to locate executable using which
24596  new_path=`$WHICH "$new_path" 2> /dev/null`
24597  # bat and cmd files are not always considered executable in cygwin causing which
24598  # to not find them
24599  if test "x$new_path" = x \
24600           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24601           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24602    new_path=`$CYGPATH -u "$path"`
24603  fi
24604  if test "x$new_path" = x; then
24605    # Oops. Which didn't find the executable.
24606    # The splitting of arguments from the executable at a space might have been incorrect,
24607    # since paths with space are more likely in Windows. Give it another try with the whole
24608    # argument.
24609    path="$complete"
24610    arguments="EOL"
24611    new_path=`$CYGPATH -u "$path"`
24612    new_path=`$WHICH "$new_path" 2> /dev/null`
24613    # bat and cmd files are not always considered executable in cygwin causing which
24614    # to not find them
24615    if test "x$new_path" = x \
24616             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24617             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24618      new_path=`$CYGPATH -u "$path"`
24619    fi
24620    if test "x$new_path" = x; then
24621      # It's still not found. Now this is an unrecoverable error.
24622      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
24623$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24624      has_space=`$ECHO "$complete" | $GREP " "`
24625      if test "x$has_space" != x; then
24626        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24628      fi
24629      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
24630$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
24631   { (exit 1); exit 1; }; }
24632    fi
24633  fi
24634
24635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24638  # "foo.exe" is OK but "foo" is an error.
24639  #
24640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24641  # It is also a way to make sure we got the proper file name for the real test later on.
24642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24643  if test "x$test_shortpath" = x; then
24644    # Short path failed, file does not exist as specified.
24645    # Try adding .exe or .cmd
24646    if test -f "${new_path}.exe"; then
24647       input_to_shortpath="${new_path}.exe"
24648    elif test -f "${new_path}.cmd"; then
24649       input_to_shortpath="${new_path}.cmd"
24650    else
24651      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24652$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24653      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24654$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24655      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
24656$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
24657   { (exit 1); exit 1; }; }
24658    fi
24659  else
24660    input_to_shortpath="$new_path"
24661  fi
24662
24663  # Call helper function which possibly converts this using DOS-style short mode.
24664  # If so, the updated path is stored in $new_path.
24665  new_path="$input_to_shortpath"
24666
24667  input_path="$input_to_shortpath"
24668  # Check if we need to convert this using DOS-style short mode. If the path
24669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24670  # take no chances and rewrite it.
24671  # Note: m4 eats our [], so we need to use [ and ] instead.
24672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24673  if test "x$has_forbidden_chars" != x; then
24674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24675    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24678      # Going to short mode and back again did indeed matter. Since short mode is
24679      # case insensitive, let's make it lowercase to improve readability.
24680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24681      # Now convert it back to Unix-stile (cygpath)
24682      input_path=`$CYGPATH -u "$shortmode_path"`
24683      new_path="$input_path"
24684    fi
24685  fi
24686
24687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24688  if test "x$test_cygdrive_prefix" = x; then
24689    # As a simple fix, exclude /usr/bin since it's not a real path.
24690    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24692      # a path prefixed by /cygdrive for fixpath to work.
24693      new_path="$CYGWIN_ROOT_PATH$input_path"
24694    fi
24695  fi
24696
24697  # remove trailing .exe if any
24698  new_path="${new_path/%.exe/}"
24699
24700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24701
24702  # First separate the path from the arguments. This will split at the first
24703  # space.
24704  complete="$NM"
24705  path="${complete%% *}"
24706  tmp="$complete EOL"
24707  arguments="${tmp#* }"
24708
24709  # Input might be given as Windows format, start by converting to
24710  # unix format.
24711  new_path="$path"
24712
24713  windows_path="$new_path"
24714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24715    unix_path=`$CYGPATH -u "$windows_path"`
24716    new_path="$unix_path"
24717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24719    new_path="$unix_path"
24720  fi
24721
24722
24723  # Now try to locate executable using which
24724  new_path=`$WHICH "$new_path" 2> /dev/null`
24725
24726  if test "x$new_path" = x; then
24727    # Oops. Which didn't find the executable.
24728    # The splitting of arguments from the executable at a space might have been incorrect,
24729    # since paths with space are more likely in Windows. Give it another try with the whole
24730    # argument.
24731    path="$complete"
24732    arguments="EOL"
24733    new_path="$path"
24734
24735  windows_path="$new_path"
24736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24737    unix_path=`$CYGPATH -u "$windows_path"`
24738    new_path="$unix_path"
24739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24741    new_path="$unix_path"
24742  fi
24743
24744
24745    new_path=`$WHICH "$new_path" 2> /dev/null`
24746
24747    if test "x$new_path" = x; then
24748      # It's still not found. Now this is an unrecoverable error.
24749      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
24750$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24751      has_space=`$ECHO "$complete" | $GREP " "`
24752      if test "x$has_space" != x; then
24753        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24755      fi
24756      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
24757$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
24758   { (exit 1); exit 1; }; }
24759    fi
24760  fi
24761
24762  # Now new_path has a complete unix path to the binary
24763  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24764    # Keep paths in /bin as-is, but remove trailing .exe if any
24765    new_path="${new_path/%.exe/}"
24766    # Do not save /bin paths to all_fixpath_prefixes!
24767  else
24768    # Not in mixed or Windows style, start by that.
24769    new_path=`cmd //c echo $new_path`
24770
24771  input_path="$new_path"
24772  # Check if we need to convert this using DOS-style short mode. If the path
24773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24774  # take no chances and rewrite it.
24775  # Note: m4 eats our [], so we need to use [ and ] instead.
24776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24777  if test "x$has_forbidden_chars" != x; then
24778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24780  fi
24781
24782    # Output is in $new_path
24783
24784  windows_path="$new_path"
24785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24786    unix_path=`$CYGPATH -u "$windows_path"`
24787    new_path="$unix_path"
24788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24790    new_path="$unix_path"
24791  fi
24792
24793    # remove trailing .exe if any
24794    new_path="${new_path/%.exe/}"
24795
24796    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24797    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24798  fi
24799
24800  else
24801    # We're on a posix platform. Hooray! :)
24802    # First separate the path from the arguments. This will split at the first
24803    # space.
24804    complete="$NM"
24805    path="${complete%% *}"
24806    tmp="$complete EOL"
24807    arguments="${tmp#* }"
24808
24809    new_path=`$WHICH $path 2> /dev/null`
24810    if test "x$new_path" = x; then
24811      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24812      if test "x$is_absolute_path" != x; then
24813        { $as_echo "$as_me:$LINENO: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
24814$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
24815        new_path="$path"
24816      else
24817        { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
24818$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24819        has_space=`$ECHO "$complete" | $GREP " "`
24820        if test "x$has_space" != x; then
24821          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
24822$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24823        fi
24824        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
24825$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
24826   { (exit 1); exit 1; }; }
24827      fi
24828    fi
24829  fi
24830
24831  # Now join together the path and the arguments once again
24832  if test "x$arguments" != xEOL; then
24833      new_complete="$new_path ${arguments% *}"
24834  else
24835      new_complete="$new_path"
24836  fi
24837
24838  if test "x$complete" != "x$new_complete"; then
24839    NM="$new_complete"
24840    { $as_echo "$as_me:$LINENO: Rewriting NM to \"$new_complete\"" >&5
24841$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24842  fi
24843
24844    # Extract the first word of "strip", so it can be a program name with args.
24845set dummy strip; ac_word=$2
24846{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
24847$as_echo_n "checking for $ac_word... " >&6; }
24848if test "${ac_cv_path_STRIP+set}" = set; then
24849  $as_echo_n "(cached) " >&6
24850else
24851  case $STRIP in
24852  [\\/]* | ?:[\\/]*)
24853  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24854  ;;
24855  *)
24856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24857for as_dir in $PATH
24858do
24859  IFS=$as_save_IFS
24860  test -z "$as_dir" && as_dir=.
24861  for ac_exec_ext in '' $ac_executable_extensions; do
24862  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24863    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24864    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24865    break 2
24866  fi
24867done
24868done
24869IFS=$as_save_IFS
24870
24871  ;;
24872esac
24873fi
24874STRIP=$ac_cv_path_STRIP
24875if test -n "$STRIP"; then
24876  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
24877$as_echo "$STRIP" >&6; }
24878else
24879  { $as_echo "$as_me:$LINENO: result: no" >&5
24880$as_echo "no" >&6; }
24881fi
24882
24883
24884
24885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24886
24887  # First separate the path from the arguments. This will split at the first
24888  # space.
24889  complete="$STRIP"
24890  path="${complete%% *}"
24891  tmp="$complete EOL"
24892  arguments="${tmp#* }"
24893
24894  # Input might be given as Windows format, start by converting to
24895  # unix format.
24896  new_path=`$CYGPATH -u "$path"`
24897
24898  # Now try to locate executable using which
24899  new_path=`$WHICH "$new_path" 2> /dev/null`
24900  # bat and cmd files are not always considered executable in cygwin causing which
24901  # to not find them
24902  if test "x$new_path" = x \
24903           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24904           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24905    new_path=`$CYGPATH -u "$path"`
24906  fi
24907  if test "x$new_path" = x; then
24908    # Oops. Which didn't find the executable.
24909    # The splitting of arguments from the executable at a space might have been incorrect,
24910    # since paths with space are more likely in Windows. Give it another try with the whole
24911    # argument.
24912    path="$complete"
24913    arguments="EOL"
24914    new_path=`$CYGPATH -u "$path"`
24915    new_path=`$WHICH "$new_path" 2> /dev/null`
24916    # bat and cmd files are not always considered executable in cygwin causing which
24917    # to not find them
24918    if test "x$new_path" = x \
24919             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24920             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24921      new_path=`$CYGPATH -u "$path"`
24922    fi
24923    if test "x$new_path" = x; then
24924      # It's still not found. Now this is an unrecoverable error.
24925      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24926$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24927      has_space=`$ECHO "$complete" | $GREP " "`
24928      if test "x$has_space" != x; then
24929        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24930$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24931      fi
24932      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
24933$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
24934   { (exit 1); exit 1; }; }
24935    fi
24936  fi
24937
24938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24941  # "foo.exe" is OK but "foo" is an error.
24942  #
24943  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24944  # It is also a way to make sure we got the proper file name for the real test later on.
24945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24946  if test "x$test_shortpath" = x; then
24947    # Short path failed, file does not exist as specified.
24948    # Try adding .exe or .cmd
24949    if test -f "${new_path}.exe"; then
24950       input_to_shortpath="${new_path}.exe"
24951    elif test -f "${new_path}.cmd"; then
24952       input_to_shortpath="${new_path}.cmd"
24953    else
24954      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
24955$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
24956      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24957$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24958      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
24959$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
24960   { (exit 1); exit 1; }; }
24961    fi
24962  else
24963    input_to_shortpath="$new_path"
24964  fi
24965
24966  # Call helper function which possibly converts this using DOS-style short mode.
24967  # If so, the updated path is stored in $new_path.
24968  new_path="$input_to_shortpath"
24969
24970  input_path="$input_to_shortpath"
24971  # Check if we need to convert this using DOS-style short mode. If the path
24972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24973  # take no chances and rewrite it.
24974  # Note: m4 eats our [], so we need to use [ and ] instead.
24975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24976  if test "x$has_forbidden_chars" != x; then
24977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24981      # Going to short mode and back again did indeed matter. Since short mode is
24982      # case insensitive, let's make it lowercase to improve readability.
24983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24984      # Now convert it back to Unix-stile (cygpath)
24985      input_path=`$CYGPATH -u "$shortmode_path"`
24986      new_path="$input_path"
24987    fi
24988  fi
24989
24990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24991  if test "x$test_cygdrive_prefix" = x; then
24992    # As a simple fix, exclude /usr/bin since it's not a real path.
24993    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24995      # a path prefixed by /cygdrive for fixpath to work.
24996      new_path="$CYGWIN_ROOT_PATH$input_path"
24997    fi
24998  fi
24999
25000  # remove trailing .exe if any
25001  new_path="${new_path/%.exe/}"
25002
25003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25004
25005  # First separate the path from the arguments. This will split at the first
25006  # space.
25007  complete="$STRIP"
25008  path="${complete%% *}"
25009  tmp="$complete EOL"
25010  arguments="${tmp#* }"
25011
25012  # Input might be given as Windows format, start by converting to
25013  # unix format.
25014  new_path="$path"
25015
25016  windows_path="$new_path"
25017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25018    unix_path=`$CYGPATH -u "$windows_path"`
25019    new_path="$unix_path"
25020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25022    new_path="$unix_path"
25023  fi
25024
25025
25026  # Now try to locate executable using which
25027  new_path=`$WHICH "$new_path" 2> /dev/null`
25028
25029  if test "x$new_path" = x; then
25030    # Oops. Which didn't find the executable.
25031    # The splitting of arguments from the executable at a space might have been incorrect,
25032    # since paths with space are more likely in Windows. Give it another try with the whole
25033    # argument.
25034    path="$complete"
25035    arguments="EOL"
25036    new_path="$path"
25037
25038  windows_path="$new_path"
25039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25040    unix_path=`$CYGPATH -u "$windows_path"`
25041    new_path="$unix_path"
25042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25044    new_path="$unix_path"
25045  fi
25046
25047
25048    new_path=`$WHICH "$new_path" 2> /dev/null`
25049
25050    if test "x$new_path" = x; then
25051      # It's still not found. Now this is an unrecoverable error.
25052      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25053$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25054      has_space=`$ECHO "$complete" | $GREP " "`
25055      if test "x$has_space" != x; then
25056        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25058      fi
25059      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
25060$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
25061   { (exit 1); exit 1; }; }
25062    fi
25063  fi
25064
25065  # Now new_path has a complete unix path to the binary
25066  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25067    # Keep paths in /bin as-is, but remove trailing .exe if any
25068    new_path="${new_path/%.exe/}"
25069    # Do not save /bin paths to all_fixpath_prefixes!
25070  else
25071    # Not in mixed or Windows style, start by that.
25072    new_path=`cmd //c echo $new_path`
25073
25074  input_path="$new_path"
25075  # Check if we need to convert this using DOS-style short mode. If the path
25076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25077  # take no chances and rewrite it.
25078  # Note: m4 eats our [], so we need to use [ and ] instead.
25079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25080  if test "x$has_forbidden_chars" != x; then
25081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25083  fi
25084
25085    # Output is in $new_path
25086
25087  windows_path="$new_path"
25088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25089    unix_path=`$CYGPATH -u "$windows_path"`
25090    new_path="$unix_path"
25091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25093    new_path="$unix_path"
25094  fi
25095
25096    # remove trailing .exe if any
25097    new_path="${new_path/%.exe/}"
25098
25099    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25100    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25101  fi
25102
25103  else
25104    # We're on a posix platform. Hooray! :)
25105    # First separate the path from the arguments. This will split at the first
25106    # space.
25107    complete="$STRIP"
25108    path="${complete%% *}"
25109    tmp="$complete EOL"
25110    arguments="${tmp#* }"
25111
25112    new_path=`$WHICH $path 2> /dev/null`
25113    if test "x$new_path" = x; then
25114      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25115      if test "x$is_absolute_path" != x; then
25116        { $as_echo "$as_me:$LINENO: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
25117$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
25118        new_path="$path"
25119      else
25120        { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25121$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25122        has_space=`$ECHO "$complete" | $GREP " "`
25123        if test "x$has_space" != x; then
25124          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
25125$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25126        fi
25127        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
25128$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
25129   { (exit 1); exit 1; }; }
25130      fi
25131    fi
25132  fi
25133
25134  # Now join together the path and the arguments once again
25135  if test "x$arguments" != xEOL; then
25136      new_complete="$new_path ${arguments% *}"
25137  else
25138      new_complete="$new_path"
25139  fi
25140
25141  if test "x$complete" != "x$new_complete"; then
25142    STRIP="$new_complete"
25143    { $as_echo "$as_me:$LINENO: Rewriting STRIP to \"$new_complete\"" >&5
25144$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25145  fi
25146
25147    # Extract the first word of "mcs", so it can be a program name with args.
25148set dummy mcs; ac_word=$2
25149{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
25150$as_echo_n "checking for $ac_word... " >&6; }
25151if test "${ac_cv_path_MCS+set}" = set; then
25152  $as_echo_n "(cached) " >&6
25153else
25154  case $MCS in
25155  [\\/]* | ?:[\\/]*)
25156  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25157  ;;
25158  *)
25159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25160for as_dir in $PATH
25161do
25162  IFS=$as_save_IFS
25163  test -z "$as_dir" && as_dir=.
25164  for ac_exec_ext in '' $ac_executable_extensions; do
25165  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25166    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25167    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25168    break 2
25169  fi
25170done
25171done
25172IFS=$as_save_IFS
25173
25174  ;;
25175esac
25176fi
25177MCS=$ac_cv_path_MCS
25178if test -n "$MCS"; then
25179  { $as_echo "$as_me:$LINENO: result: $MCS" >&5
25180$as_echo "$MCS" >&6; }
25181else
25182  { $as_echo "$as_me:$LINENO: result: no" >&5
25183$as_echo "no" >&6; }
25184fi
25185
25186
25187
25188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25189
25190  # First separate the path from the arguments. This will split at the first
25191  # space.
25192  complete="$MCS"
25193  path="${complete%% *}"
25194  tmp="$complete EOL"
25195  arguments="${tmp#* }"
25196
25197  # Input might be given as Windows format, start by converting to
25198  # unix format.
25199  new_path=`$CYGPATH -u "$path"`
25200
25201  # Now try to locate executable using which
25202  new_path=`$WHICH "$new_path" 2> /dev/null`
25203  # bat and cmd files are not always considered executable in cygwin causing which
25204  # to not find them
25205  if test "x$new_path" = x \
25206           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25207           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25208    new_path=`$CYGPATH -u "$path"`
25209  fi
25210  if test "x$new_path" = x; then
25211    # Oops. Which didn't find the executable.
25212    # The splitting of arguments from the executable at a space might have been incorrect,
25213    # since paths with space are more likely in Windows. Give it another try with the whole
25214    # argument.
25215    path="$complete"
25216    arguments="EOL"
25217    new_path=`$CYGPATH -u "$path"`
25218    new_path=`$WHICH "$new_path" 2> /dev/null`
25219    # bat and cmd files are not always considered executable in cygwin causing which
25220    # to not find them
25221    if test "x$new_path" = x \
25222             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25223             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25224      new_path=`$CYGPATH -u "$path"`
25225    fi
25226    if test "x$new_path" = x; then
25227      # It's still not found. Now this is an unrecoverable error.
25228      { $as_echo "$as_me:$LINENO: The path of MCS, which resolves as \"$complete\", is not found." >&5
25229$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25230      has_space=`$ECHO "$complete" | $GREP " "`
25231      if test "x$has_space" != x; then
25232        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25234      fi
25235      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MCS" >&5
25236$as_echo "$as_me: error: Cannot locate the the path of MCS" >&2;}
25237   { (exit 1); exit 1; }; }
25238    fi
25239  fi
25240
25241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25244  # "foo.exe" is OK but "foo" is an error.
25245  #
25246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25247  # It is also a way to make sure we got the proper file name for the real test later on.
25248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25249  if test "x$test_shortpath" = x; then
25250    # Short path failed, file does not exist as specified.
25251    # Try adding .exe or .cmd
25252    if test -f "${new_path}.exe"; then
25253       input_to_shortpath="${new_path}.exe"
25254    elif test -f "${new_path}.cmd"; then
25255       input_to_shortpath="${new_path}.cmd"
25256    else
25257      { $as_echo "$as_me:$LINENO: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25258$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25259      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25260$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25261      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MCS" >&5
25262$as_echo "$as_me: error: Cannot locate the the path of MCS" >&2;}
25263   { (exit 1); exit 1; }; }
25264    fi
25265  else
25266    input_to_shortpath="$new_path"
25267  fi
25268
25269  # Call helper function which possibly converts this using DOS-style short mode.
25270  # If so, the updated path is stored in $new_path.
25271  new_path="$input_to_shortpath"
25272
25273  input_path="$input_to_shortpath"
25274  # Check if we need to convert this using DOS-style short mode. If the path
25275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25276  # take no chances and rewrite it.
25277  # Note: m4 eats our [], so we need to use [ and ] instead.
25278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25279  if test "x$has_forbidden_chars" != x; then
25280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25284      # Going to short mode and back again did indeed matter. Since short mode is
25285      # case insensitive, let's make it lowercase to improve readability.
25286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25287      # Now convert it back to Unix-stile (cygpath)
25288      input_path=`$CYGPATH -u "$shortmode_path"`
25289      new_path="$input_path"
25290    fi
25291  fi
25292
25293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25294  if test "x$test_cygdrive_prefix" = x; then
25295    # As a simple fix, exclude /usr/bin since it's not a real path.
25296    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25298      # a path prefixed by /cygdrive for fixpath to work.
25299      new_path="$CYGWIN_ROOT_PATH$input_path"
25300    fi
25301  fi
25302
25303  # remove trailing .exe if any
25304  new_path="${new_path/%.exe/}"
25305
25306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25307
25308  # First separate the path from the arguments. This will split at the first
25309  # space.
25310  complete="$MCS"
25311  path="${complete%% *}"
25312  tmp="$complete EOL"
25313  arguments="${tmp#* }"
25314
25315  # Input might be given as Windows format, start by converting to
25316  # unix format.
25317  new_path="$path"
25318
25319  windows_path="$new_path"
25320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25321    unix_path=`$CYGPATH -u "$windows_path"`
25322    new_path="$unix_path"
25323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25325    new_path="$unix_path"
25326  fi
25327
25328
25329  # Now try to locate executable using which
25330  new_path=`$WHICH "$new_path" 2> /dev/null`
25331
25332  if test "x$new_path" = x; then
25333    # Oops. Which didn't find the executable.
25334    # The splitting of arguments from the executable at a space might have been incorrect,
25335    # since paths with space are more likely in Windows. Give it another try with the whole
25336    # argument.
25337    path="$complete"
25338    arguments="EOL"
25339    new_path="$path"
25340
25341  windows_path="$new_path"
25342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25343    unix_path=`$CYGPATH -u "$windows_path"`
25344    new_path="$unix_path"
25345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25347    new_path="$unix_path"
25348  fi
25349
25350
25351    new_path=`$WHICH "$new_path" 2> /dev/null`
25352
25353    if test "x$new_path" = x; then
25354      # It's still not found. Now this is an unrecoverable error.
25355      { $as_echo "$as_me:$LINENO: The path of MCS, which resolves as \"$complete\", is not found." >&5
25356$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25357      has_space=`$ECHO "$complete" | $GREP " "`
25358      if test "x$has_space" != x; then
25359        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25361      fi
25362      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MCS" >&5
25363$as_echo "$as_me: error: Cannot locate the the path of MCS" >&2;}
25364   { (exit 1); exit 1; }; }
25365    fi
25366  fi
25367
25368  # Now new_path has a complete unix path to the binary
25369  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25370    # Keep paths in /bin as-is, but remove trailing .exe if any
25371    new_path="${new_path/%.exe/}"
25372    # Do not save /bin paths to all_fixpath_prefixes!
25373  else
25374    # Not in mixed or Windows style, start by that.
25375    new_path=`cmd //c echo $new_path`
25376
25377  input_path="$new_path"
25378  # Check if we need to convert this using DOS-style short mode. If the path
25379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25380  # take no chances and rewrite it.
25381  # Note: m4 eats our [], so we need to use [ and ] instead.
25382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25383  if test "x$has_forbidden_chars" != x; then
25384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25386  fi
25387
25388    # Output is in $new_path
25389
25390  windows_path="$new_path"
25391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25392    unix_path=`$CYGPATH -u "$windows_path"`
25393    new_path="$unix_path"
25394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25396    new_path="$unix_path"
25397  fi
25398
25399    # remove trailing .exe if any
25400    new_path="${new_path/%.exe/}"
25401
25402    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25403    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25404  fi
25405
25406  else
25407    # We're on a posix platform. Hooray! :)
25408    # First separate the path from the arguments. This will split at the first
25409    # space.
25410    complete="$MCS"
25411    path="${complete%% *}"
25412    tmp="$complete EOL"
25413    arguments="${tmp#* }"
25414
25415    new_path=`$WHICH $path 2> /dev/null`
25416    if test "x$new_path" = x; then
25417      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25418      if test "x$is_absolute_path" != x; then
25419        { $as_echo "$as_me:$LINENO: Resolving MCS (as $path) with 'which' failed, using $path directly." >&5
25420$as_echo "$as_me: Resolving MCS (as $path) with 'which' failed, using $path directly." >&6;}
25421        new_path="$path"
25422      else
25423        { $as_echo "$as_me:$LINENO: The path of MCS, which resolves as \"$complete\", is not found." >&5
25424$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25425        has_space=`$ECHO "$complete" | $GREP " "`
25426        if test "x$has_space" != x; then
25427          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
25428$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25429        fi
25430        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MCS" >&5
25431$as_echo "$as_me: error: Cannot locate the the path of MCS" >&2;}
25432   { (exit 1); exit 1; }; }
25433      fi
25434    fi
25435  fi
25436
25437  # Now join together the path and the arguments once again
25438  if test "x$arguments" != xEOL; then
25439      new_complete="$new_path ${arguments% *}"
25440  else
25441      new_complete="$new_path"
25442  fi
25443
25444  if test "x$complete" != "x$new_complete"; then
25445    MCS="$new_complete"
25446    { $as_echo "$as_me:$LINENO: Rewriting MCS to \"$new_complete\"" >&5
25447$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25448  fi
25449
25450elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25451    if test -n "$ac_tool_prefix"; then
25452  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25453set dummy ${ac_tool_prefix}nm; ac_word=$2
25454{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
25455$as_echo_n "checking for $ac_word... " >&6; }
25456if test "${ac_cv_prog_NM+set}" = set; then
25457  $as_echo_n "(cached) " >&6
25458else
25459  if test -n "$NM"; then
25460  ac_cv_prog_NM="$NM" # Let the user override the test.
25461else
25462as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25463for as_dir in $PATH
25464do
25465  IFS=$as_save_IFS
25466  test -z "$as_dir" && as_dir=.
25467  for ac_exec_ext in '' $ac_executable_extensions; do
25468  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25469    ac_cv_prog_NM="${ac_tool_prefix}nm"
25470    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25471    break 2
25472  fi
25473done
25474done
25475IFS=$as_save_IFS
25476
25477fi
25478fi
25479NM=$ac_cv_prog_NM
25480if test -n "$NM"; then
25481  { $as_echo "$as_me:$LINENO: result: $NM" >&5
25482$as_echo "$NM" >&6; }
25483else
25484  { $as_echo "$as_me:$LINENO: result: no" >&5
25485$as_echo "no" >&6; }
25486fi
25487
25488
25489fi
25490if test -z "$ac_cv_prog_NM"; then
25491  ac_ct_NM=$NM
25492  # Extract the first word of "nm", so it can be a program name with args.
25493set dummy nm; ac_word=$2
25494{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
25495$as_echo_n "checking for $ac_word... " >&6; }
25496if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
25497  $as_echo_n "(cached) " >&6
25498else
25499  if test -n "$ac_ct_NM"; then
25500  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25501else
25502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25503for as_dir in $PATH
25504do
25505  IFS=$as_save_IFS
25506  test -z "$as_dir" && as_dir=.
25507  for ac_exec_ext in '' $ac_executable_extensions; do
25508  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25509    ac_cv_prog_ac_ct_NM="nm"
25510    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25511    break 2
25512  fi
25513done
25514done
25515IFS=$as_save_IFS
25516
25517fi
25518fi
25519ac_ct_NM=$ac_cv_prog_ac_ct_NM
25520if test -n "$ac_ct_NM"; then
25521  { $as_echo "$as_me:$LINENO: result: $ac_ct_NM" >&5
25522$as_echo "$ac_ct_NM" >&6; }
25523else
25524  { $as_echo "$as_me:$LINENO: result: no" >&5
25525$as_echo "no" >&6; }
25526fi
25527
25528  if test "x$ac_ct_NM" = x; then
25529    NM=""
25530  else
25531    case $cross_compiling:$ac_tool_warned in
25532yes:)
25533{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
25534$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25535ac_tool_warned=yes ;;
25536esac
25537    NM=$ac_ct_NM
25538  fi
25539else
25540  NM="$ac_cv_prog_NM"
25541fi
25542
25543
25544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25545
25546  # First separate the path from the arguments. This will split at the first
25547  # space.
25548  complete="$NM"
25549  path="${complete%% *}"
25550  tmp="$complete EOL"
25551  arguments="${tmp#* }"
25552
25553  # Input might be given as Windows format, start by converting to
25554  # unix format.
25555  new_path=`$CYGPATH -u "$path"`
25556
25557  # Now try to locate executable using which
25558  new_path=`$WHICH "$new_path" 2> /dev/null`
25559  # bat and cmd files are not always considered executable in cygwin causing which
25560  # to not find them
25561  if test "x$new_path" = x \
25562           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25563           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25564    new_path=`$CYGPATH -u "$path"`
25565  fi
25566  if test "x$new_path" = x; then
25567    # Oops. Which didn't find the executable.
25568    # The splitting of arguments from the executable at a space might have been incorrect,
25569    # since paths with space are more likely in Windows. Give it another try with the whole
25570    # argument.
25571    path="$complete"
25572    arguments="EOL"
25573    new_path=`$CYGPATH -u "$path"`
25574    new_path=`$WHICH "$new_path" 2> /dev/null`
25575    # bat and cmd files are not always considered executable in cygwin causing which
25576    # to not find them
25577    if test "x$new_path" = x \
25578             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25579             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25580      new_path=`$CYGPATH -u "$path"`
25581    fi
25582    if test "x$new_path" = x; then
25583      # It's still not found. Now this is an unrecoverable error.
25584      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
25585$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25586      has_space=`$ECHO "$complete" | $GREP " "`
25587      if test "x$has_space" != x; then
25588        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25589$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25590      fi
25591      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
25592$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
25593   { (exit 1); exit 1; }; }
25594    fi
25595  fi
25596
25597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25600  # "foo.exe" is OK but "foo" is an error.
25601  #
25602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25603  # It is also a way to make sure we got the proper file name for the real test later on.
25604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25605  if test "x$test_shortpath" = x; then
25606    # Short path failed, file does not exist as specified.
25607    # Try adding .exe or .cmd
25608    if test -f "${new_path}.exe"; then
25609       input_to_shortpath="${new_path}.exe"
25610    elif test -f "${new_path}.cmd"; then
25611       input_to_shortpath="${new_path}.cmd"
25612    else
25613      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25614$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25615      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25616$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25617      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
25618$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
25619   { (exit 1); exit 1; }; }
25620    fi
25621  else
25622    input_to_shortpath="$new_path"
25623  fi
25624
25625  # Call helper function which possibly converts this using DOS-style short mode.
25626  # If so, the updated path is stored in $new_path.
25627  new_path="$input_to_shortpath"
25628
25629  input_path="$input_to_shortpath"
25630  # Check if we need to convert this using DOS-style short mode. If the path
25631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25632  # take no chances and rewrite it.
25633  # Note: m4 eats our [], so we need to use [ and ] instead.
25634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25635  if test "x$has_forbidden_chars" != x; then
25636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25640      # Going to short mode and back again did indeed matter. Since short mode is
25641      # case insensitive, let's make it lowercase to improve readability.
25642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25643      # Now convert it back to Unix-stile (cygpath)
25644      input_path=`$CYGPATH -u "$shortmode_path"`
25645      new_path="$input_path"
25646    fi
25647  fi
25648
25649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25650  if test "x$test_cygdrive_prefix" = x; then
25651    # As a simple fix, exclude /usr/bin since it's not a real path.
25652    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25654      # a path prefixed by /cygdrive for fixpath to work.
25655      new_path="$CYGWIN_ROOT_PATH$input_path"
25656    fi
25657  fi
25658
25659  # remove trailing .exe if any
25660  new_path="${new_path/%.exe/}"
25661
25662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25663
25664  # First separate the path from the arguments. This will split at the first
25665  # space.
25666  complete="$NM"
25667  path="${complete%% *}"
25668  tmp="$complete EOL"
25669  arguments="${tmp#* }"
25670
25671  # Input might be given as Windows format, start by converting to
25672  # unix format.
25673  new_path="$path"
25674
25675  windows_path="$new_path"
25676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25677    unix_path=`$CYGPATH -u "$windows_path"`
25678    new_path="$unix_path"
25679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25681    new_path="$unix_path"
25682  fi
25683
25684
25685  # Now try to locate executable using which
25686  new_path=`$WHICH "$new_path" 2> /dev/null`
25687
25688  if test "x$new_path" = x; then
25689    # Oops. Which didn't find the executable.
25690    # The splitting of arguments from the executable at a space might have been incorrect,
25691    # since paths with space are more likely in Windows. Give it another try with the whole
25692    # argument.
25693    path="$complete"
25694    arguments="EOL"
25695    new_path="$path"
25696
25697  windows_path="$new_path"
25698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25699    unix_path=`$CYGPATH -u "$windows_path"`
25700    new_path="$unix_path"
25701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25703    new_path="$unix_path"
25704  fi
25705
25706
25707    new_path=`$WHICH "$new_path" 2> /dev/null`
25708
25709    if test "x$new_path" = x; then
25710      # It's still not found. Now this is an unrecoverable error.
25711      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
25712$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25713      has_space=`$ECHO "$complete" | $GREP " "`
25714      if test "x$has_space" != x; then
25715        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25717      fi
25718      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
25719$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
25720   { (exit 1); exit 1; }; }
25721    fi
25722  fi
25723
25724  # Now new_path has a complete unix path to the binary
25725  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25726    # Keep paths in /bin as-is, but remove trailing .exe if any
25727    new_path="${new_path/%.exe/}"
25728    # Do not save /bin paths to all_fixpath_prefixes!
25729  else
25730    # Not in mixed or Windows style, start by that.
25731    new_path=`cmd //c echo $new_path`
25732
25733  input_path="$new_path"
25734  # Check if we need to convert this using DOS-style short mode. If the path
25735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25736  # take no chances and rewrite it.
25737  # Note: m4 eats our [], so we need to use [ and ] instead.
25738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25739  if test "x$has_forbidden_chars" != x; then
25740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25742  fi
25743
25744    # Output is in $new_path
25745
25746  windows_path="$new_path"
25747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25748    unix_path=`$CYGPATH -u "$windows_path"`
25749    new_path="$unix_path"
25750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25752    new_path="$unix_path"
25753  fi
25754
25755    # remove trailing .exe if any
25756    new_path="${new_path/%.exe/}"
25757
25758    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25759    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25760  fi
25761
25762  else
25763    # We're on a posix platform. Hooray! :)
25764    # First separate the path from the arguments. This will split at the first
25765    # space.
25766    complete="$NM"
25767    path="${complete%% *}"
25768    tmp="$complete EOL"
25769    arguments="${tmp#* }"
25770
25771    new_path=`$WHICH $path 2> /dev/null`
25772    if test "x$new_path" = x; then
25773      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25774      if test "x$is_absolute_path" != x; then
25775        { $as_echo "$as_me:$LINENO: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
25776$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
25777        new_path="$path"
25778      else
25779        { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
25780$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25781        has_space=`$ECHO "$complete" | $GREP " "`
25782        if test "x$has_space" != x; then
25783          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
25784$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25785        fi
25786        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
25787$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
25788   { (exit 1); exit 1; }; }
25789      fi
25790    fi
25791  fi
25792
25793  # Now join together the path and the arguments once again
25794  if test "x$arguments" != xEOL; then
25795      new_complete="$new_path ${arguments% *}"
25796  else
25797      new_complete="$new_path"
25798  fi
25799
25800  if test "x$complete" != "x$new_complete"; then
25801    NM="$new_complete"
25802    { $as_echo "$as_me:$LINENO: Rewriting NM to \"$new_complete\"" >&5
25803$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25804  fi
25805
25806    if test -n "$ac_tool_prefix"; then
25807  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25808set dummy ${ac_tool_prefix}strip; ac_word=$2
25809{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
25810$as_echo_n "checking for $ac_word... " >&6; }
25811if test "${ac_cv_prog_STRIP+set}" = set; then
25812  $as_echo_n "(cached) " >&6
25813else
25814  if test -n "$STRIP"; then
25815  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25816else
25817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25818for as_dir in $PATH
25819do
25820  IFS=$as_save_IFS
25821  test -z "$as_dir" && as_dir=.
25822  for ac_exec_ext in '' $ac_executable_extensions; do
25823  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25824    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25825    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25826    break 2
25827  fi
25828done
25829done
25830IFS=$as_save_IFS
25831
25832fi
25833fi
25834STRIP=$ac_cv_prog_STRIP
25835if test -n "$STRIP"; then
25836  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
25837$as_echo "$STRIP" >&6; }
25838else
25839  { $as_echo "$as_me:$LINENO: result: no" >&5
25840$as_echo "no" >&6; }
25841fi
25842
25843
25844fi
25845if test -z "$ac_cv_prog_STRIP"; then
25846  ac_ct_STRIP=$STRIP
25847  # Extract the first word of "strip", so it can be a program name with args.
25848set dummy strip; ac_word=$2
25849{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
25850$as_echo_n "checking for $ac_word... " >&6; }
25851if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
25852  $as_echo_n "(cached) " >&6
25853else
25854  if test -n "$ac_ct_STRIP"; then
25855  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25856else
25857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25858for as_dir in $PATH
25859do
25860  IFS=$as_save_IFS
25861  test -z "$as_dir" && as_dir=.
25862  for ac_exec_ext in '' $ac_executable_extensions; do
25863  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25864    ac_cv_prog_ac_ct_STRIP="strip"
25865    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25866    break 2
25867  fi
25868done
25869done
25870IFS=$as_save_IFS
25871
25872fi
25873fi
25874ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25875if test -n "$ac_ct_STRIP"; then
25876  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
25877$as_echo "$ac_ct_STRIP" >&6; }
25878else
25879  { $as_echo "$as_me:$LINENO: result: no" >&5
25880$as_echo "no" >&6; }
25881fi
25882
25883  if test "x$ac_ct_STRIP" = x; then
25884    STRIP=""
25885  else
25886    case $cross_compiling:$ac_tool_warned in
25887yes:)
25888{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
25889$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25890ac_tool_warned=yes ;;
25891esac
25892    STRIP=$ac_ct_STRIP
25893  fi
25894else
25895  STRIP="$ac_cv_prog_STRIP"
25896fi
25897
25898
25899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25900
25901  # First separate the path from the arguments. This will split at the first
25902  # space.
25903  complete="$STRIP"
25904  path="${complete%% *}"
25905  tmp="$complete EOL"
25906  arguments="${tmp#* }"
25907
25908  # Input might be given as Windows format, start by converting to
25909  # unix format.
25910  new_path=`$CYGPATH -u "$path"`
25911
25912  # Now try to locate executable using which
25913  new_path=`$WHICH "$new_path" 2> /dev/null`
25914  # bat and cmd files are not always considered executable in cygwin causing which
25915  # to not find them
25916  if test "x$new_path" = x \
25917           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25918           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25919    new_path=`$CYGPATH -u "$path"`
25920  fi
25921  if test "x$new_path" = x; then
25922    # Oops. Which didn't find the executable.
25923    # The splitting of arguments from the executable at a space might have been incorrect,
25924    # since paths with space are more likely in Windows. Give it another try with the whole
25925    # argument.
25926    path="$complete"
25927    arguments="EOL"
25928    new_path=`$CYGPATH -u "$path"`
25929    new_path=`$WHICH "$new_path" 2> /dev/null`
25930    # bat and cmd files are not always considered executable in cygwin causing which
25931    # to not find them
25932    if test "x$new_path" = x \
25933             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25934             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25935      new_path=`$CYGPATH -u "$path"`
25936    fi
25937    if test "x$new_path" = x; then
25938      # It's still not found. Now this is an unrecoverable error.
25939      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25940$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25941      has_space=`$ECHO "$complete" | $GREP " "`
25942      if test "x$has_space" != x; then
25943        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25945      fi
25946      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
25947$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
25948   { (exit 1); exit 1; }; }
25949    fi
25950  fi
25951
25952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25955  # "foo.exe" is OK but "foo" is an error.
25956  #
25957  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25958  # It is also a way to make sure we got the proper file name for the real test later on.
25959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25960  if test "x$test_shortpath" = x; then
25961    # Short path failed, file does not exist as specified.
25962    # Try adding .exe or .cmd
25963    if test -f "${new_path}.exe"; then
25964       input_to_shortpath="${new_path}.exe"
25965    elif test -f "${new_path}.cmd"; then
25966       input_to_shortpath="${new_path}.cmd"
25967    else
25968      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25969$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25970      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25971$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25972      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
25973$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
25974   { (exit 1); exit 1; }; }
25975    fi
25976  else
25977    input_to_shortpath="$new_path"
25978  fi
25979
25980  # Call helper function which possibly converts this using DOS-style short mode.
25981  # If so, the updated path is stored in $new_path.
25982  new_path="$input_to_shortpath"
25983
25984  input_path="$input_to_shortpath"
25985  # Check if we need to convert this using DOS-style short mode. If the path
25986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25987  # take no chances and rewrite it.
25988  # Note: m4 eats our [], so we need to use [ and ] instead.
25989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25990  if test "x$has_forbidden_chars" != x; then
25991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25995      # Going to short mode and back again did indeed matter. Since short mode is
25996      # case insensitive, let's make it lowercase to improve readability.
25997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25998      # Now convert it back to Unix-stile (cygpath)
25999      input_path=`$CYGPATH -u "$shortmode_path"`
26000      new_path="$input_path"
26001    fi
26002  fi
26003
26004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26005  if test "x$test_cygdrive_prefix" = x; then
26006    # As a simple fix, exclude /usr/bin since it's not a real path.
26007    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26009      # a path prefixed by /cygdrive for fixpath to work.
26010      new_path="$CYGWIN_ROOT_PATH$input_path"
26011    fi
26012  fi
26013
26014  # remove trailing .exe if any
26015  new_path="${new_path/%.exe/}"
26016
26017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26018
26019  # First separate the path from the arguments. This will split at the first
26020  # space.
26021  complete="$STRIP"
26022  path="${complete%% *}"
26023  tmp="$complete EOL"
26024  arguments="${tmp#* }"
26025
26026  # Input might be given as Windows format, start by converting to
26027  # unix format.
26028  new_path="$path"
26029
26030  windows_path="$new_path"
26031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26032    unix_path=`$CYGPATH -u "$windows_path"`
26033    new_path="$unix_path"
26034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26036    new_path="$unix_path"
26037  fi
26038
26039
26040  # Now try to locate executable using which
26041  new_path=`$WHICH "$new_path" 2> /dev/null`
26042
26043  if test "x$new_path" = x; then
26044    # Oops. Which didn't find the executable.
26045    # The splitting of arguments from the executable at a space might have been incorrect,
26046    # since paths with space are more likely in Windows. Give it another try with the whole
26047    # argument.
26048    path="$complete"
26049    arguments="EOL"
26050    new_path="$path"
26051
26052  windows_path="$new_path"
26053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26054    unix_path=`$CYGPATH -u "$windows_path"`
26055    new_path="$unix_path"
26056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26058    new_path="$unix_path"
26059  fi
26060
26061
26062    new_path=`$WHICH "$new_path" 2> /dev/null`
26063
26064    if test "x$new_path" = x; then
26065      # It's still not found. Now this is an unrecoverable error.
26066      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26067$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26068      has_space=`$ECHO "$complete" | $GREP " "`
26069      if test "x$has_space" != x; then
26070        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26071$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26072      fi
26073      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
26074$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
26075   { (exit 1); exit 1; }; }
26076    fi
26077  fi
26078
26079  # Now new_path has a complete unix path to the binary
26080  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26081    # Keep paths in /bin as-is, but remove trailing .exe if any
26082    new_path="${new_path/%.exe/}"
26083    # Do not save /bin paths to all_fixpath_prefixes!
26084  else
26085    # Not in mixed or Windows style, start by that.
26086    new_path=`cmd //c echo $new_path`
26087
26088  input_path="$new_path"
26089  # Check if we need to convert this using DOS-style short mode. If the path
26090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26091  # take no chances and rewrite it.
26092  # Note: m4 eats our [], so we need to use [ and ] instead.
26093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26094  if test "x$has_forbidden_chars" != x; then
26095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26097  fi
26098
26099    # Output is in $new_path
26100
26101  windows_path="$new_path"
26102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26103    unix_path=`$CYGPATH -u "$windows_path"`
26104    new_path="$unix_path"
26105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26107    new_path="$unix_path"
26108  fi
26109
26110    # remove trailing .exe if any
26111    new_path="${new_path/%.exe/}"
26112
26113    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26114    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26115  fi
26116
26117  else
26118    # We're on a posix platform. Hooray! :)
26119    # First separate the path from the arguments. This will split at the first
26120    # space.
26121    complete="$STRIP"
26122    path="${complete%% *}"
26123    tmp="$complete EOL"
26124    arguments="${tmp#* }"
26125
26126    new_path=`$WHICH $path 2> /dev/null`
26127    if test "x$new_path" = x; then
26128      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26129      if test "x$is_absolute_path" != x; then
26130        { $as_echo "$as_me:$LINENO: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
26131$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
26132        new_path="$path"
26133      else
26134        { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26135$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26136        has_space=`$ECHO "$complete" | $GREP " "`
26137        if test "x$has_space" != x; then
26138          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
26139$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26140        fi
26141        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
26142$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
26143   { (exit 1); exit 1; }; }
26144      fi
26145    fi
26146  fi
26147
26148  # Now join together the path and the arguments once again
26149  if test "x$arguments" != xEOL; then
26150      new_complete="$new_path ${arguments% *}"
26151  else
26152      new_complete="$new_path"
26153  fi
26154
26155  if test "x$complete" != "x$new_complete"; then
26156    STRIP="$new_complete"
26157    { $as_echo "$as_me:$LINENO: Rewriting STRIP to \"$new_complete\"" >&5
26158$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26159  fi
26160
26161fi
26162
26163# objcopy is used for moving debug symbols to separate files when
26164# full debug symbols are enabled.
26165if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26166    if test -n "$ac_tool_prefix"; then
26167  for ac_prog in gobjcopy objcopy
26168  do
26169    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26170set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26171{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26172$as_echo_n "checking for $ac_word... " >&6; }
26173if test "${ac_cv_prog_OBJCOPY+set}" = set; then
26174  $as_echo_n "(cached) " >&6
26175else
26176  if test -n "$OBJCOPY"; then
26177  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26178else
26179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26180for as_dir in $PATH
26181do
26182  IFS=$as_save_IFS
26183  test -z "$as_dir" && as_dir=.
26184  for ac_exec_ext in '' $ac_executable_extensions; do
26185  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26186    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26187    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26188    break 2
26189  fi
26190done
26191done
26192IFS=$as_save_IFS
26193
26194fi
26195fi
26196OBJCOPY=$ac_cv_prog_OBJCOPY
26197if test -n "$OBJCOPY"; then
26198  { $as_echo "$as_me:$LINENO: result: $OBJCOPY" >&5
26199$as_echo "$OBJCOPY" >&6; }
26200else
26201  { $as_echo "$as_me:$LINENO: result: no" >&5
26202$as_echo "no" >&6; }
26203fi
26204
26205
26206    test -n "$OBJCOPY" && break
26207  done
26208fi
26209if test -z "$OBJCOPY"; then
26210  ac_ct_OBJCOPY=$OBJCOPY
26211  for ac_prog in gobjcopy objcopy
26212do
26213  # Extract the first word of "$ac_prog", so it can be a program name with args.
26214set dummy $ac_prog; ac_word=$2
26215{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26216$as_echo_n "checking for $ac_word... " >&6; }
26217if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then
26218  $as_echo_n "(cached) " >&6
26219else
26220  if test -n "$ac_ct_OBJCOPY"; then
26221  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26222else
26223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26224for as_dir in $PATH
26225do
26226  IFS=$as_save_IFS
26227  test -z "$as_dir" && as_dir=.
26228  for ac_exec_ext in '' $ac_executable_extensions; do
26229  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26230    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26231    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26232    break 2
26233  fi
26234done
26235done
26236IFS=$as_save_IFS
26237
26238fi
26239fi
26240ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26241if test -n "$ac_ct_OBJCOPY"; then
26242  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJCOPY" >&5
26243$as_echo "$ac_ct_OBJCOPY" >&6; }
26244else
26245  { $as_echo "$as_me:$LINENO: result: no" >&5
26246$as_echo "no" >&6; }
26247fi
26248
26249
26250  test -n "$ac_ct_OBJCOPY" && break
26251done
26252
26253  if test "x$ac_ct_OBJCOPY" = x; then
26254    OBJCOPY=""
26255  else
26256    case $cross_compiling:$ac_tool_warned in
26257yes:)
26258{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
26259$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26260ac_tool_warned=yes ;;
26261esac
26262    OBJCOPY=$ac_ct_OBJCOPY
26263  fi
26264fi
26265
26266
26267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26268
26269  # First separate the path from the arguments. This will split at the first
26270  # space.
26271  complete="$OBJCOPY"
26272  path="${complete%% *}"
26273  tmp="$complete EOL"
26274  arguments="${tmp#* }"
26275
26276  # Input might be given as Windows format, start by converting to
26277  # unix format.
26278  new_path=`$CYGPATH -u "$path"`
26279
26280  # Now try to locate executable using which
26281  new_path=`$WHICH "$new_path" 2> /dev/null`
26282  # bat and cmd files are not always considered executable in cygwin causing which
26283  # to not find them
26284  if test "x$new_path" = x \
26285           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26286           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26287    new_path=`$CYGPATH -u "$path"`
26288  fi
26289  if test "x$new_path" = x; then
26290    # Oops. Which didn't find the executable.
26291    # The splitting of arguments from the executable at a space might have been incorrect,
26292    # since paths with space are more likely in Windows. Give it another try with the whole
26293    # argument.
26294    path="$complete"
26295    arguments="EOL"
26296    new_path=`$CYGPATH -u "$path"`
26297    new_path=`$WHICH "$new_path" 2> /dev/null`
26298    # bat and cmd files are not always considered executable in cygwin causing which
26299    # to not find them
26300    if test "x$new_path" = x \
26301             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26302             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26303      new_path=`$CYGPATH -u "$path"`
26304    fi
26305    if test "x$new_path" = x; then
26306      # It's still not found. Now this is an unrecoverable error.
26307      { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26308$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26309      has_space=`$ECHO "$complete" | $GREP " "`
26310      if test "x$has_space" != x; then
26311        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26312$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26313      fi
26314      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26315$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26316   { (exit 1); exit 1; }; }
26317    fi
26318  fi
26319
26320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26323  # "foo.exe" is OK but "foo" is an error.
26324  #
26325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26326  # It is also a way to make sure we got the proper file name for the real test later on.
26327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26328  if test "x$test_shortpath" = x; then
26329    # Short path failed, file does not exist as specified.
26330    # Try adding .exe or .cmd
26331    if test -f "${new_path}.exe"; then
26332       input_to_shortpath="${new_path}.exe"
26333    elif test -f "${new_path}.cmd"; then
26334       input_to_shortpath="${new_path}.cmd"
26335    else
26336      { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26337$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26338      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26339$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26340      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26341$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26342   { (exit 1); exit 1; }; }
26343    fi
26344  else
26345    input_to_shortpath="$new_path"
26346  fi
26347
26348  # Call helper function which possibly converts this using DOS-style short mode.
26349  # If so, the updated path is stored in $new_path.
26350  new_path="$input_to_shortpath"
26351
26352  input_path="$input_to_shortpath"
26353  # Check if we need to convert this using DOS-style short mode. If the path
26354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26355  # take no chances and rewrite it.
26356  # Note: m4 eats our [], so we need to use [ and ] instead.
26357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26358  if test "x$has_forbidden_chars" != x; then
26359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26363      # Going to short mode and back again did indeed matter. Since short mode is
26364      # case insensitive, let's make it lowercase to improve readability.
26365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26366      # Now convert it back to Unix-stile (cygpath)
26367      input_path=`$CYGPATH -u "$shortmode_path"`
26368      new_path="$input_path"
26369    fi
26370  fi
26371
26372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26373  if test "x$test_cygdrive_prefix" = x; then
26374    # As a simple fix, exclude /usr/bin since it's not a real path.
26375    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26377      # a path prefixed by /cygdrive for fixpath to work.
26378      new_path="$CYGWIN_ROOT_PATH$input_path"
26379    fi
26380  fi
26381
26382  # remove trailing .exe if any
26383  new_path="${new_path/%.exe/}"
26384
26385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26386
26387  # First separate the path from the arguments. This will split at the first
26388  # space.
26389  complete="$OBJCOPY"
26390  path="${complete%% *}"
26391  tmp="$complete EOL"
26392  arguments="${tmp#* }"
26393
26394  # Input might be given as Windows format, start by converting to
26395  # unix format.
26396  new_path="$path"
26397
26398  windows_path="$new_path"
26399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26400    unix_path=`$CYGPATH -u "$windows_path"`
26401    new_path="$unix_path"
26402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26404    new_path="$unix_path"
26405  fi
26406
26407
26408  # Now try to locate executable using which
26409  new_path=`$WHICH "$new_path" 2> /dev/null`
26410
26411  if test "x$new_path" = x; then
26412    # Oops. Which didn't find the executable.
26413    # The splitting of arguments from the executable at a space might have been incorrect,
26414    # since paths with space are more likely in Windows. Give it another try with the whole
26415    # argument.
26416    path="$complete"
26417    arguments="EOL"
26418    new_path="$path"
26419
26420  windows_path="$new_path"
26421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26422    unix_path=`$CYGPATH -u "$windows_path"`
26423    new_path="$unix_path"
26424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26426    new_path="$unix_path"
26427  fi
26428
26429
26430    new_path=`$WHICH "$new_path" 2> /dev/null`
26431
26432    if test "x$new_path" = x; then
26433      # It's still not found. Now this is an unrecoverable error.
26434      { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26435$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26436      has_space=`$ECHO "$complete" | $GREP " "`
26437      if test "x$has_space" != x; then
26438        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26440      fi
26441      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26442$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26443   { (exit 1); exit 1; }; }
26444    fi
26445  fi
26446
26447  # Now new_path has a complete unix path to the binary
26448  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26449    # Keep paths in /bin as-is, but remove trailing .exe if any
26450    new_path="${new_path/%.exe/}"
26451    # Do not save /bin paths to all_fixpath_prefixes!
26452  else
26453    # Not in mixed or Windows style, start by that.
26454    new_path=`cmd //c echo $new_path`
26455
26456  input_path="$new_path"
26457  # Check if we need to convert this using DOS-style short mode. If the path
26458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26459  # take no chances and rewrite it.
26460  # Note: m4 eats our [], so we need to use [ and ] instead.
26461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26462  if test "x$has_forbidden_chars" != x; then
26463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26465  fi
26466
26467    # Output is in $new_path
26468
26469  windows_path="$new_path"
26470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26471    unix_path=`$CYGPATH -u "$windows_path"`
26472    new_path="$unix_path"
26473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26475    new_path="$unix_path"
26476  fi
26477
26478    # remove trailing .exe if any
26479    new_path="${new_path/%.exe/}"
26480
26481    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26482    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26483  fi
26484
26485  else
26486    # We're on a posix platform. Hooray! :)
26487    # First separate the path from the arguments. This will split at the first
26488    # space.
26489    complete="$OBJCOPY"
26490    path="${complete%% *}"
26491    tmp="$complete EOL"
26492    arguments="${tmp#* }"
26493
26494    new_path=`$WHICH $path 2> /dev/null`
26495    if test "x$new_path" = x; then
26496      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26497      if test "x$is_absolute_path" != x; then
26498        { $as_echo "$as_me:$LINENO: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5
26499$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;}
26500        new_path="$path"
26501      else
26502        { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26503$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26504        has_space=`$ECHO "$complete" | $GREP " "`
26505        if test "x$has_space" != x; then
26506          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
26507$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26508        fi
26509        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26510$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26511   { (exit 1); exit 1; }; }
26512      fi
26513    fi
26514  fi
26515
26516  # Now join together the path and the arguments once again
26517  if test "x$arguments" != xEOL; then
26518      new_complete="$new_path ${arguments% *}"
26519  else
26520      new_complete="$new_path"
26521  fi
26522
26523  if test "x$complete" != "x$new_complete"; then
26524    OBJCOPY="$new_complete"
26525    { $as_echo "$as_me:$LINENO: Rewriting OBJCOPY to \"$new_complete\"" >&5
26526$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26527  fi
26528
26529fi
26530
26531if test -n "$ac_tool_prefix"; then
26532  for ac_prog in gobjdump objdump
26533  do
26534    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26535set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26536{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26537$as_echo_n "checking for $ac_word... " >&6; }
26538if test "${ac_cv_prog_OBJDUMP+set}" = set; then
26539  $as_echo_n "(cached) " >&6
26540else
26541  if test -n "$OBJDUMP"; then
26542  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26543else
26544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26545for as_dir in $PATH
26546do
26547  IFS=$as_save_IFS
26548  test -z "$as_dir" && as_dir=.
26549  for ac_exec_ext in '' $ac_executable_extensions; do
26550  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26551    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26552    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26553    break 2
26554  fi
26555done
26556done
26557IFS=$as_save_IFS
26558
26559fi
26560fi
26561OBJDUMP=$ac_cv_prog_OBJDUMP
26562if test -n "$OBJDUMP"; then
26563  { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5
26564$as_echo "$OBJDUMP" >&6; }
26565else
26566  { $as_echo "$as_me:$LINENO: result: no" >&5
26567$as_echo "no" >&6; }
26568fi
26569
26570
26571    test -n "$OBJDUMP" && break
26572  done
26573fi
26574if test -z "$OBJDUMP"; then
26575  ac_ct_OBJDUMP=$OBJDUMP
26576  for ac_prog in gobjdump objdump
26577do
26578  # Extract the first word of "$ac_prog", so it can be a program name with args.
26579set dummy $ac_prog; ac_word=$2
26580{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26581$as_echo_n "checking for $ac_word... " >&6; }
26582if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
26583  $as_echo_n "(cached) " >&6
26584else
26585  if test -n "$ac_ct_OBJDUMP"; then
26586  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26587else
26588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26589for as_dir in $PATH
26590do
26591  IFS=$as_save_IFS
26592  test -z "$as_dir" && as_dir=.
26593  for ac_exec_ext in '' $ac_executable_extensions; do
26594  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26595    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26596    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26597    break 2
26598  fi
26599done
26600done
26601IFS=$as_save_IFS
26602
26603fi
26604fi
26605ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26606if test -n "$ac_ct_OBJDUMP"; then
26607  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
26608$as_echo "$ac_ct_OBJDUMP" >&6; }
26609else
26610  { $as_echo "$as_me:$LINENO: result: no" >&5
26611$as_echo "no" >&6; }
26612fi
26613
26614
26615  test -n "$ac_ct_OBJDUMP" && break
26616done
26617
26618  if test "x$ac_ct_OBJDUMP" = x; then
26619    OBJDUMP=""
26620  else
26621    case $cross_compiling:$ac_tool_warned in
26622yes:)
26623{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
26624$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26625ac_tool_warned=yes ;;
26626esac
26627    OBJDUMP=$ac_ct_OBJDUMP
26628  fi
26629fi
26630
26631if test "x$OBJDUMP" != x; then
26632  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26633
26634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26635
26636  # First separate the path from the arguments. This will split at the first
26637  # space.
26638  complete="$OBJDUMP"
26639  path="${complete%% *}"
26640  tmp="$complete EOL"
26641  arguments="${tmp#* }"
26642
26643  # Input might be given as Windows format, start by converting to
26644  # unix format.
26645  new_path=`$CYGPATH -u "$path"`
26646
26647  # Now try to locate executable using which
26648  new_path=`$WHICH "$new_path" 2> /dev/null`
26649  # bat and cmd files are not always considered executable in cygwin causing which
26650  # to not find them
26651  if test "x$new_path" = x \
26652           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26653           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26654    new_path=`$CYGPATH -u "$path"`
26655  fi
26656  if test "x$new_path" = x; then
26657    # Oops. Which didn't find the executable.
26658    # The splitting of arguments from the executable at a space might have been incorrect,
26659    # since paths with space are more likely in Windows. Give it another try with the whole
26660    # argument.
26661    path="$complete"
26662    arguments="EOL"
26663    new_path=`$CYGPATH -u "$path"`
26664    new_path=`$WHICH "$new_path" 2> /dev/null`
26665    # bat and cmd files are not always considered executable in cygwin causing which
26666    # to not find them
26667    if test "x$new_path" = x \
26668             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26669             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26670      new_path=`$CYGPATH -u "$path"`
26671    fi
26672    if test "x$new_path" = x; then
26673      # It's still not found. Now this is an unrecoverable error.
26674      { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26675$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26676      has_space=`$ECHO "$complete" | $GREP " "`
26677      if test "x$has_space" != x; then
26678        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26679$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26680      fi
26681      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26682$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26683   { (exit 1); exit 1; }; }
26684    fi
26685  fi
26686
26687  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26688  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26689  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26690  # "foo.exe" is OK but "foo" is an error.
26691  #
26692  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26693  # It is also a way to make sure we got the proper file name for the real test later on.
26694  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26695  if test "x$test_shortpath" = x; then
26696    # Short path failed, file does not exist as specified.
26697    # Try adding .exe or .cmd
26698    if test -f "${new_path}.exe"; then
26699       input_to_shortpath="${new_path}.exe"
26700    elif test -f "${new_path}.cmd"; then
26701       input_to_shortpath="${new_path}.cmd"
26702    else
26703      { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26704$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26705      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26706$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26707      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26708$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26709   { (exit 1); exit 1; }; }
26710    fi
26711  else
26712    input_to_shortpath="$new_path"
26713  fi
26714
26715  # Call helper function which possibly converts this using DOS-style short mode.
26716  # If so, the updated path is stored in $new_path.
26717  new_path="$input_to_shortpath"
26718
26719  input_path="$input_to_shortpath"
26720  # Check if we need to convert this using DOS-style short mode. If the path
26721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26722  # take no chances and rewrite it.
26723  # Note: m4 eats our [], so we need to use [ and ] instead.
26724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26725  if test "x$has_forbidden_chars" != x; then
26726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26730      # Going to short mode and back again did indeed matter. Since short mode is
26731      # case insensitive, let's make it lowercase to improve readability.
26732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26733      # Now convert it back to Unix-stile (cygpath)
26734      input_path=`$CYGPATH -u "$shortmode_path"`
26735      new_path="$input_path"
26736    fi
26737  fi
26738
26739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26740  if test "x$test_cygdrive_prefix" = x; then
26741    # As a simple fix, exclude /usr/bin since it's not a real path.
26742    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26744      # a path prefixed by /cygdrive for fixpath to work.
26745      new_path="$CYGWIN_ROOT_PATH$input_path"
26746    fi
26747  fi
26748
26749  # remove trailing .exe if any
26750  new_path="${new_path/%.exe/}"
26751
26752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26753
26754  # First separate the path from the arguments. This will split at the first
26755  # space.
26756  complete="$OBJDUMP"
26757  path="${complete%% *}"
26758  tmp="$complete EOL"
26759  arguments="${tmp#* }"
26760
26761  # Input might be given as Windows format, start by converting to
26762  # unix format.
26763  new_path="$path"
26764
26765  windows_path="$new_path"
26766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26767    unix_path=`$CYGPATH -u "$windows_path"`
26768    new_path="$unix_path"
26769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26771    new_path="$unix_path"
26772  fi
26773
26774
26775  # Now try to locate executable using which
26776  new_path=`$WHICH "$new_path" 2> /dev/null`
26777
26778  if test "x$new_path" = x; then
26779    # Oops. Which didn't find the executable.
26780    # The splitting of arguments from the executable at a space might have been incorrect,
26781    # since paths with space are more likely in Windows. Give it another try with the whole
26782    # argument.
26783    path="$complete"
26784    arguments="EOL"
26785    new_path="$path"
26786
26787  windows_path="$new_path"
26788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26789    unix_path=`$CYGPATH -u "$windows_path"`
26790    new_path="$unix_path"
26791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26793    new_path="$unix_path"
26794  fi
26795
26796
26797    new_path=`$WHICH "$new_path" 2> /dev/null`
26798
26799    if test "x$new_path" = x; then
26800      # It's still not found. Now this is an unrecoverable error.
26801      { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26802$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26803      has_space=`$ECHO "$complete" | $GREP " "`
26804      if test "x$has_space" != x; then
26805        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26807      fi
26808      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26809$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26810   { (exit 1); exit 1; }; }
26811    fi
26812  fi
26813
26814  # Now new_path has a complete unix path to the binary
26815  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26816    # Keep paths in /bin as-is, but remove trailing .exe if any
26817    new_path="${new_path/%.exe/}"
26818    # Do not save /bin paths to all_fixpath_prefixes!
26819  else
26820    # Not in mixed or Windows style, start by that.
26821    new_path=`cmd //c echo $new_path`
26822
26823  input_path="$new_path"
26824  # Check if we need to convert this using DOS-style short mode. If the path
26825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26826  # take no chances and rewrite it.
26827  # Note: m4 eats our [], so we need to use [ and ] instead.
26828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26829  if test "x$has_forbidden_chars" != x; then
26830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26832  fi
26833
26834    # Output is in $new_path
26835
26836  windows_path="$new_path"
26837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26838    unix_path=`$CYGPATH -u "$windows_path"`
26839    new_path="$unix_path"
26840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26842    new_path="$unix_path"
26843  fi
26844
26845    # remove trailing .exe if any
26846    new_path="${new_path/%.exe/}"
26847
26848    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26849    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26850  fi
26851
26852  else
26853    # We're on a posix platform. Hooray! :)
26854    # First separate the path from the arguments. This will split at the first
26855    # space.
26856    complete="$OBJDUMP"
26857    path="${complete%% *}"
26858    tmp="$complete EOL"
26859    arguments="${tmp#* }"
26860
26861    new_path=`$WHICH $path 2> /dev/null`
26862    if test "x$new_path" = x; then
26863      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26864      if test "x$is_absolute_path" != x; then
26865        { $as_echo "$as_me:$LINENO: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5
26866$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;}
26867        new_path="$path"
26868      else
26869        { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26870$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26871        has_space=`$ECHO "$complete" | $GREP " "`
26872        if test "x$has_space" != x; then
26873          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
26874$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26875        fi
26876        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26877$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26878   { (exit 1); exit 1; }; }
26879      fi
26880    fi
26881  fi
26882
26883  # Now join together the path and the arguments once again
26884  if test "x$arguments" != xEOL; then
26885      new_complete="$new_path ${arguments% *}"
26886  else
26887      new_complete="$new_path"
26888  fi
26889
26890  if test "x$complete" != "x$new_complete"; then
26891    OBJDUMP="$new_complete"
26892    { $as_echo "$as_me:$LINENO: Rewriting OBJDUMP to \"$new_complete\"" >&5
26893$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26894  fi
26895
26896fi
26897
26898if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26899   # Extract the first word of "lipo", so it can be a program name with args.
26900set dummy lipo; ac_word=$2
26901{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26902$as_echo_n "checking for $ac_word... " >&6; }
26903if test "${ac_cv_path_LIPO+set}" = set; then
26904  $as_echo_n "(cached) " >&6
26905else
26906  case $LIPO in
26907  [\\/]* | ?:[\\/]*)
26908  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26909  ;;
26910  *)
26911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26912for as_dir in $PATH
26913do
26914  IFS=$as_save_IFS
26915  test -z "$as_dir" && as_dir=.
26916  for ac_exec_ext in '' $ac_executable_extensions; do
26917  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26918    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26919    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26920    break 2
26921  fi
26922done
26923done
26924IFS=$as_save_IFS
26925
26926  ;;
26927esac
26928fi
26929LIPO=$ac_cv_path_LIPO
26930if test -n "$LIPO"; then
26931  { $as_echo "$as_me:$LINENO: result: $LIPO" >&5
26932$as_echo "$LIPO" >&6; }
26933else
26934  { $as_echo "$as_me:$LINENO: result: no" >&5
26935$as_echo "no" >&6; }
26936fi
26937
26938
26939
26940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26941
26942  # First separate the path from the arguments. This will split at the first
26943  # space.
26944  complete="$LIPO"
26945  path="${complete%% *}"
26946  tmp="$complete EOL"
26947  arguments="${tmp#* }"
26948
26949  # Input might be given as Windows format, start by converting to
26950  # unix format.
26951  new_path=`$CYGPATH -u "$path"`
26952
26953  # Now try to locate executable using which
26954  new_path=`$WHICH "$new_path" 2> /dev/null`
26955  # bat and cmd files are not always considered executable in cygwin causing which
26956  # to not find them
26957  if test "x$new_path" = x \
26958           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26959           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26960    new_path=`$CYGPATH -u "$path"`
26961  fi
26962  if test "x$new_path" = x; then
26963    # Oops. Which didn't find the executable.
26964    # The splitting of arguments from the executable at a space might have been incorrect,
26965    # since paths with space are more likely in Windows. Give it another try with the whole
26966    # argument.
26967    path="$complete"
26968    arguments="EOL"
26969    new_path=`$CYGPATH -u "$path"`
26970    new_path=`$WHICH "$new_path" 2> /dev/null`
26971    # bat and cmd files are not always considered executable in cygwin causing which
26972    # to not find them
26973    if test "x$new_path" = x \
26974             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26975             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26976      new_path=`$CYGPATH -u "$path"`
26977    fi
26978    if test "x$new_path" = x; then
26979      # It's still not found. Now this is an unrecoverable error.
26980      { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26981$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26982      has_space=`$ECHO "$complete" | $GREP " "`
26983      if test "x$has_space" != x; then
26984        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26986      fi
26987      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
26988$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
26989   { (exit 1); exit 1; }; }
26990    fi
26991  fi
26992
26993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26996  # "foo.exe" is OK but "foo" is an error.
26997  #
26998  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26999  # It is also a way to make sure we got the proper file name for the real test later on.
27000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27001  if test "x$test_shortpath" = x; then
27002    # Short path failed, file does not exist as specified.
27003    # Try adding .exe or .cmd
27004    if test -f "${new_path}.exe"; then
27005       input_to_shortpath="${new_path}.exe"
27006    elif test -f "${new_path}.cmd"; then
27007       input_to_shortpath="${new_path}.cmd"
27008    else
27009      { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27010$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27011      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27012$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27013      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
27014$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
27015   { (exit 1); exit 1; }; }
27016    fi
27017  else
27018    input_to_shortpath="$new_path"
27019  fi
27020
27021  # Call helper function which possibly converts this using DOS-style short mode.
27022  # If so, the updated path is stored in $new_path.
27023  new_path="$input_to_shortpath"
27024
27025  input_path="$input_to_shortpath"
27026  # Check if we need to convert this using DOS-style short mode. If the path
27027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27028  # take no chances and rewrite it.
27029  # Note: m4 eats our [], so we need to use [ and ] instead.
27030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27031  if test "x$has_forbidden_chars" != x; then
27032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27036      # Going to short mode and back again did indeed matter. Since short mode is
27037      # case insensitive, let's make it lowercase to improve readability.
27038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27039      # Now convert it back to Unix-stile (cygpath)
27040      input_path=`$CYGPATH -u "$shortmode_path"`
27041      new_path="$input_path"
27042    fi
27043  fi
27044
27045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27046  if test "x$test_cygdrive_prefix" = x; then
27047    # As a simple fix, exclude /usr/bin since it's not a real path.
27048    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27050      # a path prefixed by /cygdrive for fixpath to work.
27051      new_path="$CYGWIN_ROOT_PATH$input_path"
27052    fi
27053  fi
27054
27055  # remove trailing .exe if any
27056  new_path="${new_path/%.exe/}"
27057
27058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27059
27060  # First separate the path from the arguments. This will split at the first
27061  # space.
27062  complete="$LIPO"
27063  path="${complete%% *}"
27064  tmp="$complete EOL"
27065  arguments="${tmp#* }"
27066
27067  # Input might be given as Windows format, start by converting to
27068  # unix format.
27069  new_path="$path"
27070
27071  windows_path="$new_path"
27072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27073    unix_path=`$CYGPATH -u "$windows_path"`
27074    new_path="$unix_path"
27075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27077    new_path="$unix_path"
27078  fi
27079
27080
27081  # Now try to locate executable using which
27082  new_path=`$WHICH "$new_path" 2> /dev/null`
27083
27084  if test "x$new_path" = x; then
27085    # Oops. Which didn't find the executable.
27086    # The splitting of arguments from the executable at a space might have been incorrect,
27087    # since paths with space are more likely in Windows. Give it another try with the whole
27088    # argument.
27089    path="$complete"
27090    arguments="EOL"
27091    new_path="$path"
27092
27093  windows_path="$new_path"
27094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27095    unix_path=`$CYGPATH -u "$windows_path"`
27096    new_path="$unix_path"
27097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27099    new_path="$unix_path"
27100  fi
27101
27102
27103    new_path=`$WHICH "$new_path" 2> /dev/null`
27104
27105    if test "x$new_path" = x; then
27106      # It's still not found. Now this is an unrecoverable error.
27107      { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27108$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27109      has_space=`$ECHO "$complete" | $GREP " "`
27110      if test "x$has_space" != x; then
27111        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27113      fi
27114      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
27115$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
27116   { (exit 1); exit 1; }; }
27117    fi
27118  fi
27119
27120  # Now new_path has a complete unix path to the binary
27121  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27122    # Keep paths in /bin as-is, but remove trailing .exe if any
27123    new_path="${new_path/%.exe/}"
27124    # Do not save /bin paths to all_fixpath_prefixes!
27125  else
27126    # Not in mixed or Windows style, start by that.
27127    new_path=`cmd //c echo $new_path`
27128
27129  input_path="$new_path"
27130  # Check if we need to convert this using DOS-style short mode. If the path
27131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27132  # take no chances and rewrite it.
27133  # Note: m4 eats our [], so we need to use [ and ] instead.
27134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27135  if test "x$has_forbidden_chars" != x; then
27136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27137    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27138  fi
27139
27140    # Output is in $new_path
27141
27142  windows_path="$new_path"
27143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27144    unix_path=`$CYGPATH -u "$windows_path"`
27145    new_path="$unix_path"
27146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27148    new_path="$unix_path"
27149  fi
27150
27151    # remove trailing .exe if any
27152    new_path="${new_path/%.exe/}"
27153
27154    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27155    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27156  fi
27157
27158  else
27159    # We're on a posix platform. Hooray! :)
27160    # First separate the path from the arguments. This will split at the first
27161    # space.
27162    complete="$LIPO"
27163    path="${complete%% *}"
27164    tmp="$complete EOL"
27165    arguments="${tmp#* }"
27166
27167    new_path=`$WHICH $path 2> /dev/null`
27168    if test "x$new_path" = x; then
27169      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27170      if test "x$is_absolute_path" != x; then
27171        { $as_echo "$as_me:$LINENO: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5
27172$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;}
27173        new_path="$path"
27174      else
27175        { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27176$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27177        has_space=`$ECHO "$complete" | $GREP " "`
27178        if test "x$has_space" != x; then
27179          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
27180$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27181        fi
27182        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
27183$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
27184   { (exit 1); exit 1; }; }
27185      fi
27186    fi
27187  fi
27188
27189  # Now join together the path and the arguments once again
27190  if test "x$arguments" != xEOL; then
27191      new_complete="$new_path ${arguments% *}"
27192  else
27193      new_complete="$new_path"
27194  fi
27195
27196  if test "x$complete" != "x$new_complete"; then
27197    LIPO="$new_complete"
27198    { $as_echo "$as_me:$LINENO: Rewriting LIPO to \"$new_complete\"" >&5
27199$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27200  fi
27201
27202fi
27203
27204# Restore old path without tools dir
27205PATH="$OLD_PATH"
27206
27207
27208# FIXME: Currently we must test this after paths but before flags. Fix!
27209
27210# And we can test some aspects on the target using configure macros.
27211
27212
27213{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
27214$as_echo_n "checking for ANSI C header files... " >&6; }
27215if test "${ac_cv_header_stdc+set}" = set; then
27216  $as_echo_n "(cached) " >&6
27217else
27218  cat >conftest.$ac_ext <<_ACEOF
27219/* confdefs.h.  */
27220_ACEOF
27221cat confdefs.h >>conftest.$ac_ext
27222cat >>conftest.$ac_ext <<_ACEOF
27223/* end confdefs.h.  */
27224#include <stdlib.h>
27225#include <stdarg.h>
27226#include <string.h>
27227#include <float.h>
27228
27229int
27230main ()
27231{
27232
27233  ;
27234  return 0;
27235}
27236_ACEOF
27237rm -f conftest.$ac_objext
27238if { (ac_try="$ac_compile"
27239case "(($ac_try" in
27240  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27241  *) ac_try_echo=$ac_try;;
27242esac
27243eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27244$as_echo "$ac_try_echo") >&5
27245  (eval "$ac_compile") 2>conftest.er1
27246  ac_status=$?
27247  grep -v '^ *+' conftest.er1 >conftest.err
27248  rm -f conftest.er1
27249  cat conftest.err >&5
27250  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27251  (exit $ac_status); } && {
27252	 test -z "$ac_cxx_werror_flag" ||
27253	 test ! -s conftest.err
27254       } && test -s conftest.$ac_objext; then
27255  ac_cv_header_stdc=yes
27256else
27257  $as_echo "$as_me: failed program was:" >&5
27258sed 's/^/| /' conftest.$ac_ext >&5
27259
27260	ac_cv_header_stdc=no
27261fi
27262
27263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27264
27265if test $ac_cv_header_stdc = yes; then
27266  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27267  cat >conftest.$ac_ext <<_ACEOF
27268/* confdefs.h.  */
27269_ACEOF
27270cat confdefs.h >>conftest.$ac_ext
27271cat >>conftest.$ac_ext <<_ACEOF
27272/* end confdefs.h.  */
27273#include <string.h>
27274
27275_ACEOF
27276if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27277  $EGREP "memchr" >/dev/null 2>&1; then
27278  :
27279else
27280  ac_cv_header_stdc=no
27281fi
27282rm -f conftest*
27283
27284fi
27285
27286if test $ac_cv_header_stdc = yes; then
27287  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27288  cat >conftest.$ac_ext <<_ACEOF
27289/* confdefs.h.  */
27290_ACEOF
27291cat confdefs.h >>conftest.$ac_ext
27292cat >>conftest.$ac_ext <<_ACEOF
27293/* end confdefs.h.  */
27294#include <stdlib.h>
27295
27296_ACEOF
27297if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27298  $EGREP "free" >/dev/null 2>&1; then
27299  :
27300else
27301  ac_cv_header_stdc=no
27302fi
27303rm -f conftest*
27304
27305fi
27306
27307if test $ac_cv_header_stdc = yes; then
27308  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27309  if test "$cross_compiling" = yes; then
27310  :
27311else
27312  cat >conftest.$ac_ext <<_ACEOF
27313/* confdefs.h.  */
27314_ACEOF
27315cat confdefs.h >>conftest.$ac_ext
27316cat >>conftest.$ac_ext <<_ACEOF
27317/* end confdefs.h.  */
27318#include <ctype.h>
27319#include <stdlib.h>
27320#if ((' ' & 0x0FF) == 0x020)
27321# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27322# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27323#else
27324# define ISLOWER(c) \
27325		   (('a' <= (c) && (c) <= 'i') \
27326		     || ('j' <= (c) && (c) <= 'r') \
27327		     || ('s' <= (c) && (c) <= 'z'))
27328# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27329#endif
27330
27331#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27332int
27333main ()
27334{
27335  int i;
27336  for (i = 0; i < 256; i++)
27337    if (XOR (islower (i), ISLOWER (i))
27338	|| toupper (i) != TOUPPER (i))
27339      return 2;
27340  return 0;
27341}
27342_ACEOF
27343rm -f conftest$ac_exeext
27344if { (ac_try="$ac_link"
27345case "(($ac_try" in
27346  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27347  *) ac_try_echo=$ac_try;;
27348esac
27349eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27350$as_echo "$ac_try_echo") >&5
27351  (eval "$ac_link") 2>&5
27352  ac_status=$?
27353  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27354  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27355  { (case "(($ac_try" in
27356  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27357  *) ac_try_echo=$ac_try;;
27358esac
27359eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27360$as_echo "$ac_try_echo") >&5
27361  (eval "$ac_try") 2>&5
27362  ac_status=$?
27363  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27364  (exit $ac_status); }; }; then
27365  :
27366else
27367  $as_echo "$as_me: program exited with status $ac_status" >&5
27368$as_echo "$as_me: failed program was:" >&5
27369sed 's/^/| /' conftest.$ac_ext >&5
27370
27371( exit $ac_status )
27372ac_cv_header_stdc=no
27373fi
27374rm -rf conftest.dSYM
27375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27376fi
27377
27378
27379fi
27380fi
27381{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
27382$as_echo "$ac_cv_header_stdc" >&6; }
27383if test $ac_cv_header_stdc = yes; then
27384
27385cat >>confdefs.h <<\_ACEOF
27386#define STDC_HEADERS 1
27387_ACEOF
27388
27389fi
27390
27391# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27392
27393
27394
27395
27396
27397
27398
27399
27400
27401for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27402		  inttypes.h stdint.h unistd.h
27403do
27404as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27405{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
27406$as_echo_n "checking for $ac_header... " >&6; }
27407if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27408  $as_echo_n "(cached) " >&6
27409else
27410  cat >conftest.$ac_ext <<_ACEOF
27411/* confdefs.h.  */
27412_ACEOF
27413cat confdefs.h >>conftest.$ac_ext
27414cat >>conftest.$ac_ext <<_ACEOF
27415/* end confdefs.h.  */
27416$ac_includes_default
27417
27418#include <$ac_header>
27419_ACEOF
27420rm -f conftest.$ac_objext
27421if { (ac_try="$ac_compile"
27422case "(($ac_try" in
27423  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27424  *) ac_try_echo=$ac_try;;
27425esac
27426eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27427$as_echo "$ac_try_echo") >&5
27428  (eval "$ac_compile") 2>conftest.er1
27429  ac_status=$?
27430  grep -v '^ *+' conftest.er1 >conftest.err
27431  rm -f conftest.er1
27432  cat conftest.err >&5
27433  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27434  (exit $ac_status); } && {
27435	 test -z "$ac_cxx_werror_flag" ||
27436	 test ! -s conftest.err
27437       } && test -s conftest.$ac_objext; then
27438  eval "$as_ac_Header=yes"
27439else
27440  $as_echo "$as_me: failed program was:" >&5
27441sed 's/^/| /' conftest.$ac_ext >&5
27442
27443	eval "$as_ac_Header=no"
27444fi
27445
27446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27447fi
27448ac_res=`eval 'as_val=${'$as_ac_Header'}
27449		 $as_echo "$as_val"'`
27450	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
27451$as_echo "$ac_res" >&6; }
27452as_val=`eval 'as_val=${'$as_ac_Header'}
27453		 $as_echo "$as_val"'`
27454   if test "x$as_val" = x""yes; then
27455  cat >>confdefs.h <<_ACEOF
27456#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27457_ACEOF
27458
27459fi
27460
27461done
27462
27463
27464
27465###############################################################################
27466#
27467# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27468# (The JVM can use 32 or 64 bit Java pointers but that decision
27469# is made at runtime.)
27470#
27471if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27472  # Always specify -m flags on Solaris
27473
27474  # keep track of c/cxx flags that we added outselves...
27475  #   to prevent emitting warning...
27476  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27477  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27478  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27479
27480  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27481  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27482  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27483
27484  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27485  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27486  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27487
27488elif test "x$COMPILE_TYPE" = xreduced; then
27489  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27490    # Specify -m if running reduced on other Posix platforms
27491
27492  # keep track of c/cxx flags that we added outselves...
27493  #   to prevent emitting warning...
27494  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27495  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27496  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27497
27498  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27499  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27500  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27501
27502  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27503  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27504  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27505
27506  fi
27507fi
27508
27509# Make compilation sanity check
27510
27511for ac_header in stdio.h
27512do
27513as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27514if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27515  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
27516$as_echo_n "checking for $ac_header... " >&6; }
27517if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27518  $as_echo_n "(cached) " >&6
27519fi
27520ac_res=`eval 'as_val=${'$as_ac_Header'}
27521		 $as_echo "$as_val"'`
27522	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
27523$as_echo "$ac_res" >&6; }
27524else
27525  # Is the header compilable?
27526{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
27527$as_echo_n "checking $ac_header usability... " >&6; }
27528cat >conftest.$ac_ext <<_ACEOF
27529/* confdefs.h.  */
27530_ACEOF
27531cat confdefs.h >>conftest.$ac_ext
27532cat >>conftest.$ac_ext <<_ACEOF
27533/* end confdefs.h.  */
27534$ac_includes_default
27535#include <$ac_header>
27536_ACEOF
27537rm -f conftest.$ac_objext
27538if { (ac_try="$ac_compile"
27539case "(($ac_try" in
27540  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27541  *) ac_try_echo=$ac_try;;
27542esac
27543eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27544$as_echo "$ac_try_echo") >&5
27545  (eval "$ac_compile") 2>conftest.er1
27546  ac_status=$?
27547  grep -v '^ *+' conftest.er1 >conftest.err
27548  rm -f conftest.er1
27549  cat conftest.err >&5
27550  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27551  (exit $ac_status); } && {
27552	 test -z "$ac_cxx_werror_flag" ||
27553	 test ! -s conftest.err
27554       } && test -s conftest.$ac_objext; then
27555  ac_header_compiler=yes
27556else
27557  $as_echo "$as_me: failed program was:" >&5
27558sed 's/^/| /' conftest.$ac_ext >&5
27559
27560	ac_header_compiler=no
27561fi
27562
27563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27564{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27565$as_echo "$ac_header_compiler" >&6; }
27566
27567# Is the header present?
27568{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
27569$as_echo_n "checking $ac_header presence... " >&6; }
27570cat >conftest.$ac_ext <<_ACEOF
27571/* confdefs.h.  */
27572_ACEOF
27573cat confdefs.h >>conftest.$ac_ext
27574cat >>conftest.$ac_ext <<_ACEOF
27575/* end confdefs.h.  */
27576#include <$ac_header>
27577_ACEOF
27578if { (ac_try="$ac_cpp conftest.$ac_ext"
27579case "(($ac_try" in
27580  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27581  *) ac_try_echo=$ac_try;;
27582esac
27583eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27584$as_echo "$ac_try_echo") >&5
27585  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
27586  ac_status=$?
27587  grep -v '^ *+' conftest.er1 >conftest.err
27588  rm -f conftest.er1
27589  cat conftest.err >&5
27590  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27591  (exit $ac_status); } >/dev/null && {
27592	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
27593	 test ! -s conftest.err
27594       }; then
27595  ac_header_preproc=yes
27596else
27597  $as_echo "$as_me: failed program was:" >&5
27598sed 's/^/| /' conftest.$ac_ext >&5
27599
27600  ac_header_preproc=no
27601fi
27602
27603rm -f conftest.err conftest.$ac_ext
27604{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27605$as_echo "$ac_header_preproc" >&6; }
27606
27607# So?  What about this header?
27608case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
27609  yes:no: )
27610    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27611$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27612    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27613$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27614    ac_header_preproc=yes
27615    ;;
27616  no:yes:* )
27617    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27618$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27619    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27620$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27621    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27622$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27623    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27624$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27625    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27626$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27627    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27628$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27629    ( cat <<\_ASBOX
27630## ----------------------------------------- ##
27631## Report this to build-dev@openjdk.java.net ##
27632## ----------------------------------------- ##
27633_ASBOX
27634     ) | sed "s/^/$as_me: WARNING:     /" >&2
27635    ;;
27636esac
27637{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
27638$as_echo_n "checking for $ac_header... " >&6; }
27639if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27640  $as_echo_n "(cached) " >&6
27641else
27642  eval "$as_ac_Header=\$ac_header_preproc"
27643fi
27644ac_res=`eval 'as_val=${'$as_ac_Header'}
27645		 $as_echo "$as_val"'`
27646	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
27647$as_echo "$ac_res" >&6; }
27648
27649fi
27650as_val=`eval 'as_val=${'$as_ac_Header'}
27651		 $as_echo "$as_val"'`
27652   if test "x$as_val" = x""yes; then
27653  cat >>confdefs.h <<_ACEOF
27654#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27655_ACEOF
27656
27657else
27658
27659  { $as_echo "$as_me:$LINENO: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27660$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27661  if test "x$COMPILE_TYPE" = xreduced; then
27662    { $as_echo "$as_me:$LINENO: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27663$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27664  elif test "x$COMPILE_TYPE" = xcross; then
27665    { $as_echo "$as_me:$LINENO: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27666$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27667  fi
27668  { { $as_echo "$as_me:$LINENO: error: Cannot continue." >&5
27669$as_echo "$as_me: error: Cannot continue." >&2;}
27670   { (exit 1); exit 1; }; }
27671
27672fi
27673
27674done
27675
27676
27677# The cast to long int works around a bug in the HP C Compiler
27678# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27679# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27680# This bug is HP SR number 8606223364.
27681{ $as_echo "$as_me:$LINENO: checking size of int *" >&5
27682$as_echo_n "checking size of int *... " >&6; }
27683if test "${ac_cv_sizeof_int_p+set}" = set; then
27684  $as_echo_n "(cached) " >&6
27685else
27686  if test "$cross_compiling" = yes; then
27687  # Depending upon the size, compute the lo and hi bounds.
27688cat >conftest.$ac_ext <<_ACEOF
27689/* confdefs.h.  */
27690_ACEOF
27691cat confdefs.h >>conftest.$ac_ext
27692cat >>conftest.$ac_ext <<_ACEOF
27693/* end confdefs.h.  */
27694$ac_includes_default
27695int
27696main ()
27697{
27698static int test_array [1 - 2 * !(((long int) (sizeof (int *))) >= 0)];
27699test_array [0] = 0
27700
27701  ;
27702  return 0;
27703}
27704_ACEOF
27705rm -f conftest.$ac_objext
27706if { (ac_try="$ac_compile"
27707case "(($ac_try" in
27708  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27709  *) ac_try_echo=$ac_try;;
27710esac
27711eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27712$as_echo "$ac_try_echo") >&5
27713  (eval "$ac_compile") 2>conftest.er1
27714  ac_status=$?
27715  grep -v '^ *+' conftest.er1 >conftest.err
27716  rm -f conftest.er1
27717  cat conftest.err >&5
27718  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27719  (exit $ac_status); } && {
27720	 test -z "$ac_cxx_werror_flag" ||
27721	 test ! -s conftest.err
27722       } && test -s conftest.$ac_objext; then
27723  ac_lo=0 ac_mid=0
27724  while :; do
27725    cat >conftest.$ac_ext <<_ACEOF
27726/* confdefs.h.  */
27727_ACEOF
27728cat confdefs.h >>conftest.$ac_ext
27729cat >>conftest.$ac_ext <<_ACEOF
27730/* end confdefs.h.  */
27731$ac_includes_default
27732int
27733main ()
27734{
27735static int test_array [1 - 2 * !(((long int) (sizeof (int *))) <= $ac_mid)];
27736test_array [0] = 0
27737
27738  ;
27739  return 0;
27740}
27741_ACEOF
27742rm -f conftest.$ac_objext
27743if { (ac_try="$ac_compile"
27744case "(($ac_try" in
27745  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27746  *) ac_try_echo=$ac_try;;
27747esac
27748eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27749$as_echo "$ac_try_echo") >&5
27750  (eval "$ac_compile") 2>conftest.er1
27751  ac_status=$?
27752  grep -v '^ *+' conftest.er1 >conftest.err
27753  rm -f conftest.er1
27754  cat conftest.err >&5
27755  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27756  (exit $ac_status); } && {
27757	 test -z "$ac_cxx_werror_flag" ||
27758	 test ! -s conftest.err
27759       } && test -s conftest.$ac_objext; then
27760  ac_hi=$ac_mid; break
27761else
27762  $as_echo "$as_me: failed program was:" >&5
27763sed 's/^/| /' conftest.$ac_ext >&5
27764
27765	ac_lo=`expr $ac_mid + 1`
27766			if test $ac_lo -le $ac_mid; then
27767			  ac_lo= ac_hi=
27768			  break
27769			fi
27770			ac_mid=`expr 2 '*' $ac_mid + 1`
27771fi
27772
27773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27774  done
27775else
27776  $as_echo "$as_me: failed program was:" >&5
27777sed 's/^/| /' conftest.$ac_ext >&5
27778
27779	cat >conftest.$ac_ext <<_ACEOF
27780/* confdefs.h.  */
27781_ACEOF
27782cat confdefs.h >>conftest.$ac_ext
27783cat >>conftest.$ac_ext <<_ACEOF
27784/* end confdefs.h.  */
27785$ac_includes_default
27786int
27787main ()
27788{
27789static int test_array [1 - 2 * !(((long int) (sizeof (int *))) < 0)];
27790test_array [0] = 0
27791
27792  ;
27793  return 0;
27794}
27795_ACEOF
27796rm -f conftest.$ac_objext
27797if { (ac_try="$ac_compile"
27798case "(($ac_try" in
27799  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27800  *) ac_try_echo=$ac_try;;
27801esac
27802eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27803$as_echo "$ac_try_echo") >&5
27804  (eval "$ac_compile") 2>conftest.er1
27805  ac_status=$?
27806  grep -v '^ *+' conftest.er1 >conftest.err
27807  rm -f conftest.er1
27808  cat conftest.err >&5
27809  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27810  (exit $ac_status); } && {
27811	 test -z "$ac_cxx_werror_flag" ||
27812	 test ! -s conftest.err
27813       } && test -s conftest.$ac_objext; then
27814  ac_hi=-1 ac_mid=-1
27815  while :; do
27816    cat >conftest.$ac_ext <<_ACEOF
27817/* confdefs.h.  */
27818_ACEOF
27819cat confdefs.h >>conftest.$ac_ext
27820cat >>conftest.$ac_ext <<_ACEOF
27821/* end confdefs.h.  */
27822$ac_includes_default
27823int
27824main ()
27825{
27826static int test_array [1 - 2 * !(((long int) (sizeof (int *))) >= $ac_mid)];
27827test_array [0] = 0
27828
27829  ;
27830  return 0;
27831}
27832_ACEOF
27833rm -f conftest.$ac_objext
27834if { (ac_try="$ac_compile"
27835case "(($ac_try" in
27836  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27837  *) ac_try_echo=$ac_try;;
27838esac
27839eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27840$as_echo "$ac_try_echo") >&5
27841  (eval "$ac_compile") 2>conftest.er1
27842  ac_status=$?
27843  grep -v '^ *+' conftest.er1 >conftest.err
27844  rm -f conftest.er1
27845  cat conftest.err >&5
27846  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27847  (exit $ac_status); } && {
27848	 test -z "$ac_cxx_werror_flag" ||
27849	 test ! -s conftest.err
27850       } && test -s conftest.$ac_objext; then
27851  ac_lo=$ac_mid; break
27852else
27853  $as_echo "$as_me: failed program was:" >&5
27854sed 's/^/| /' conftest.$ac_ext >&5
27855
27856	ac_hi=`expr '(' $ac_mid ')' - 1`
27857			if test $ac_mid -le $ac_hi; then
27858			  ac_lo= ac_hi=
27859			  break
27860			fi
27861			ac_mid=`expr 2 '*' $ac_mid`
27862fi
27863
27864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27865  done
27866else
27867  $as_echo "$as_me: failed program was:" >&5
27868sed 's/^/| /' conftest.$ac_ext >&5
27869
27870	ac_lo= ac_hi=
27871fi
27872
27873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27874fi
27875
27876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27877# Binary search between lo and hi bounds.
27878while test "x$ac_lo" != "x$ac_hi"; do
27879  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
27880  cat >conftest.$ac_ext <<_ACEOF
27881/* confdefs.h.  */
27882_ACEOF
27883cat confdefs.h >>conftest.$ac_ext
27884cat >>conftest.$ac_ext <<_ACEOF
27885/* end confdefs.h.  */
27886$ac_includes_default
27887int
27888main ()
27889{
27890static int test_array [1 - 2 * !(((long int) (sizeof (int *))) <= $ac_mid)];
27891test_array [0] = 0
27892
27893  ;
27894  return 0;
27895}
27896_ACEOF
27897rm -f conftest.$ac_objext
27898if { (ac_try="$ac_compile"
27899case "(($ac_try" in
27900  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27901  *) ac_try_echo=$ac_try;;
27902esac
27903eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27904$as_echo "$ac_try_echo") >&5
27905  (eval "$ac_compile") 2>conftest.er1
27906  ac_status=$?
27907  grep -v '^ *+' conftest.er1 >conftest.err
27908  rm -f conftest.er1
27909  cat conftest.err >&5
27910  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27911  (exit $ac_status); } && {
27912	 test -z "$ac_cxx_werror_flag" ||
27913	 test ! -s conftest.err
27914       } && test -s conftest.$ac_objext; then
27915  ac_hi=$ac_mid
27916else
27917  $as_echo "$as_me: failed program was:" >&5
27918sed 's/^/| /' conftest.$ac_ext >&5
27919
27920	ac_lo=`expr '(' $ac_mid ')' + 1`
27921fi
27922
27923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27924done
27925case $ac_lo in
27926?*) ac_cv_sizeof_int_p=$ac_lo;;
27927'') if test "$ac_cv_type_int_p" = yes; then
27928     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27930{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int *)
27931See \`config.log' for more details." >&5
27932$as_echo "$as_me: error: cannot compute sizeof (int *)
27933See \`config.log' for more details." >&2;}
27934   { (exit 77); exit 77; }; }; }
27935   else
27936     ac_cv_sizeof_int_p=0
27937   fi ;;
27938esac
27939else
27940  cat >conftest.$ac_ext <<_ACEOF
27941/* confdefs.h.  */
27942_ACEOF
27943cat confdefs.h >>conftest.$ac_ext
27944cat >>conftest.$ac_ext <<_ACEOF
27945/* end confdefs.h.  */
27946$ac_includes_default
27947static long int longval () { return (long int) (sizeof (int *)); }
27948static unsigned long int ulongval () { return (long int) (sizeof (int *)); }
27949#include <stdio.h>
27950#include <stdlib.h>
27951int
27952main ()
27953{
27954
27955  FILE *f = fopen ("conftest.val", "w");
27956  if (! f)
27957    return 1;
27958  if (((long int) (sizeof (int *))) < 0)
27959    {
27960      long int i = longval ();
27961      if (i != ((long int) (sizeof (int *))))
27962	return 1;
27963      fprintf (f, "%ld", i);
27964    }
27965  else
27966    {
27967      unsigned long int i = ulongval ();
27968      if (i != ((long int) (sizeof (int *))))
27969	return 1;
27970      fprintf (f, "%lu", i);
27971    }
27972  /* Do not output a trailing newline, as this causes \r\n confusion
27973     on some platforms.  */
27974  return ferror (f) || fclose (f) != 0;
27975
27976  ;
27977  return 0;
27978}
27979_ACEOF
27980rm -f conftest$ac_exeext
27981if { (ac_try="$ac_link"
27982case "(($ac_try" in
27983  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27984  *) ac_try_echo=$ac_try;;
27985esac
27986eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27987$as_echo "$ac_try_echo") >&5
27988  (eval "$ac_link") 2>&5
27989  ac_status=$?
27990  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27991  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27992  { (case "(($ac_try" in
27993  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27994  *) ac_try_echo=$ac_try;;
27995esac
27996eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27997$as_echo "$ac_try_echo") >&5
27998  (eval "$ac_try") 2>&5
27999  ac_status=$?
28000  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28001  (exit $ac_status); }; }; then
28002  ac_cv_sizeof_int_p=`cat conftest.val`
28003else
28004  $as_echo "$as_me: program exited with status $ac_status" >&5
28005$as_echo "$as_me: failed program was:" >&5
28006sed 's/^/| /' conftest.$ac_ext >&5
28007
28008( exit $ac_status )
28009if test "$ac_cv_type_int_p" = yes; then
28010     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
28011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28012{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int *)
28013See \`config.log' for more details." >&5
28014$as_echo "$as_me: error: cannot compute sizeof (int *)
28015See \`config.log' for more details." >&2;}
28016   { (exit 77); exit 77; }; }; }
28017   else
28018     ac_cv_sizeof_int_p=0
28019   fi
28020fi
28021rm -rf conftest.dSYM
28022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28023fi
28024rm -f conftest.val
28025fi
28026{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int_p" >&5
28027$as_echo "$ac_cv_sizeof_int_p" >&6; }
28028
28029
28030
28031cat >>confdefs.h <<_ACEOF
28032#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28033_ACEOF
28034
28035
28036
28037if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28038  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28039  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28040fi
28041
28042if test "x$SIZEOF_INT_P" = x; then
28043    # The test failed, lets stick to the assumed value.
28044    { $as_echo "$as_me:$LINENO: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&5
28045$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28046else
28047    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28048
28049    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28050        { { $as_echo "$as_me:$LINENO: error: 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
28051$as_echo "$as_me: error: 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)" >&2;}
28052   { (exit 1); exit 1; }; }
28053    fi
28054fi
28055
28056{ $as_echo "$as_me:$LINENO: checking for target address size" >&5
28057$as_echo_n "checking for target address size... " >&6; }
28058{ $as_echo "$as_me:$LINENO: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28059$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28060
28061
28062###############################################################################
28063#
28064# Is the target little of big endian?
28065#
28066
28067 { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
28068$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28069if test "${ac_cv_c_bigendian+set}" = set; then
28070  $as_echo_n "(cached) " >&6
28071else
28072  ac_cv_c_bigendian=unknown
28073    # See if we're dealing with a universal compiler.
28074    cat >conftest.$ac_ext <<_ACEOF
28075/* confdefs.h.  */
28076_ACEOF
28077cat confdefs.h >>conftest.$ac_ext
28078cat >>conftest.$ac_ext <<_ACEOF
28079/* end confdefs.h.  */
28080#ifndef __APPLE_CC__
28081	       not a universal capable compiler
28082	     #endif
28083	     typedef int dummy;
28084
28085_ACEOF
28086rm -f conftest.$ac_objext
28087if { (ac_try="$ac_compile"
28088case "(($ac_try" in
28089  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28090  *) ac_try_echo=$ac_try;;
28091esac
28092eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28093$as_echo "$ac_try_echo") >&5
28094  (eval "$ac_compile") 2>conftest.er1
28095  ac_status=$?
28096  grep -v '^ *+' conftest.er1 >conftest.err
28097  rm -f conftest.er1
28098  cat conftest.err >&5
28099  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28100  (exit $ac_status); } && {
28101	 test -z "$ac_cxx_werror_flag" ||
28102	 test ! -s conftest.err
28103       } && test -s conftest.$ac_objext; then
28104
28105	# Check for potential -arch flags.  It is not universal unless
28106	# there are some -arch flags.  Note that *ppc* also matches
28107	# ppc64.  This check is also rather less than ideal.
28108	case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
28109	  *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
28110	esac
28111else
28112  $as_echo "$as_me: failed program was:" >&5
28113sed 's/^/| /' conftest.$ac_ext >&5
28114
28115
28116fi
28117
28118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28119    if test $ac_cv_c_bigendian = unknown; then
28120      # See if sys/param.h defines the BYTE_ORDER macro.
28121      cat >conftest.$ac_ext <<_ACEOF
28122/* confdefs.h.  */
28123_ACEOF
28124cat confdefs.h >>conftest.$ac_ext
28125cat >>conftest.$ac_ext <<_ACEOF
28126/* end confdefs.h.  */
28127#include <sys/types.h>
28128	     #include <sys/param.h>
28129
28130int
28131main ()
28132{
28133#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28134		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28135		     && LITTLE_ENDIAN)
28136	      bogus endian macros
28137	     #endif
28138
28139  ;
28140  return 0;
28141}
28142_ACEOF
28143rm -f conftest.$ac_objext
28144if { (ac_try="$ac_compile"
28145case "(($ac_try" in
28146  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28147  *) ac_try_echo=$ac_try;;
28148esac
28149eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28150$as_echo "$ac_try_echo") >&5
28151  (eval "$ac_compile") 2>conftest.er1
28152  ac_status=$?
28153  grep -v '^ *+' conftest.er1 >conftest.err
28154  rm -f conftest.er1
28155  cat conftest.err >&5
28156  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28157  (exit $ac_status); } && {
28158	 test -z "$ac_cxx_werror_flag" ||
28159	 test ! -s conftest.err
28160       } && test -s conftest.$ac_objext; then
28161  # It does; now see whether it defined to BIG_ENDIAN or not.
28162	 cat >conftest.$ac_ext <<_ACEOF
28163/* confdefs.h.  */
28164_ACEOF
28165cat confdefs.h >>conftest.$ac_ext
28166cat >>conftest.$ac_ext <<_ACEOF
28167/* end confdefs.h.  */
28168#include <sys/types.h>
28169		#include <sys/param.h>
28170
28171int
28172main ()
28173{
28174#if BYTE_ORDER != BIG_ENDIAN
28175		 not big endian
28176		#endif
28177
28178  ;
28179  return 0;
28180}
28181_ACEOF
28182rm -f conftest.$ac_objext
28183if { (ac_try="$ac_compile"
28184case "(($ac_try" in
28185  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28186  *) ac_try_echo=$ac_try;;
28187esac
28188eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28189$as_echo "$ac_try_echo") >&5
28190  (eval "$ac_compile") 2>conftest.er1
28191  ac_status=$?
28192  grep -v '^ *+' conftest.er1 >conftest.err
28193  rm -f conftest.er1
28194  cat conftest.err >&5
28195  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28196  (exit $ac_status); } && {
28197	 test -z "$ac_cxx_werror_flag" ||
28198	 test ! -s conftest.err
28199       } && test -s conftest.$ac_objext; then
28200  ac_cv_c_bigendian=yes
28201else
28202  $as_echo "$as_me: failed program was:" >&5
28203sed 's/^/| /' conftest.$ac_ext >&5
28204
28205	ac_cv_c_bigendian=no
28206fi
28207
28208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28209else
28210  $as_echo "$as_me: failed program was:" >&5
28211sed 's/^/| /' conftest.$ac_ext >&5
28212
28213
28214fi
28215
28216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28217    fi
28218    if test $ac_cv_c_bigendian = unknown; then
28219      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28220      cat >conftest.$ac_ext <<_ACEOF
28221/* confdefs.h.  */
28222_ACEOF
28223cat confdefs.h >>conftest.$ac_ext
28224cat >>conftest.$ac_ext <<_ACEOF
28225/* end confdefs.h.  */
28226#include <limits.h>
28227
28228int
28229main ()
28230{
28231#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28232	      bogus endian macros
28233	     #endif
28234
28235  ;
28236  return 0;
28237}
28238_ACEOF
28239rm -f conftest.$ac_objext
28240if { (ac_try="$ac_compile"
28241case "(($ac_try" in
28242  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28243  *) ac_try_echo=$ac_try;;
28244esac
28245eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28246$as_echo "$ac_try_echo") >&5
28247  (eval "$ac_compile") 2>conftest.er1
28248  ac_status=$?
28249  grep -v '^ *+' conftest.er1 >conftest.err
28250  rm -f conftest.er1
28251  cat conftest.err >&5
28252  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28253  (exit $ac_status); } && {
28254	 test -z "$ac_cxx_werror_flag" ||
28255	 test ! -s conftest.err
28256       } && test -s conftest.$ac_objext; then
28257  # It does; now see whether it defined to _BIG_ENDIAN or not.
28258	 cat >conftest.$ac_ext <<_ACEOF
28259/* confdefs.h.  */
28260_ACEOF
28261cat confdefs.h >>conftest.$ac_ext
28262cat >>conftest.$ac_ext <<_ACEOF
28263/* end confdefs.h.  */
28264#include <limits.h>
28265
28266int
28267main ()
28268{
28269#ifndef _BIG_ENDIAN
28270		 not big endian
28271		#endif
28272
28273  ;
28274  return 0;
28275}
28276_ACEOF
28277rm -f conftest.$ac_objext
28278if { (ac_try="$ac_compile"
28279case "(($ac_try" in
28280  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28281  *) ac_try_echo=$ac_try;;
28282esac
28283eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28284$as_echo "$ac_try_echo") >&5
28285  (eval "$ac_compile") 2>conftest.er1
28286  ac_status=$?
28287  grep -v '^ *+' conftest.er1 >conftest.err
28288  rm -f conftest.er1
28289  cat conftest.err >&5
28290  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28291  (exit $ac_status); } && {
28292	 test -z "$ac_cxx_werror_flag" ||
28293	 test ! -s conftest.err
28294       } && test -s conftest.$ac_objext; then
28295  ac_cv_c_bigendian=yes
28296else
28297  $as_echo "$as_me: failed program was:" >&5
28298sed 's/^/| /' conftest.$ac_ext >&5
28299
28300	ac_cv_c_bigendian=no
28301fi
28302
28303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28304else
28305  $as_echo "$as_me: failed program was:" >&5
28306sed 's/^/| /' conftest.$ac_ext >&5
28307
28308
28309fi
28310
28311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28312    fi
28313    if test $ac_cv_c_bigendian = unknown; then
28314      # Compile a test program.
28315      if test "$cross_compiling" = yes; then
28316  # Try to guess by grepping values from an object file.
28317	 cat >conftest.$ac_ext <<_ACEOF
28318/* confdefs.h.  */
28319_ACEOF
28320cat confdefs.h >>conftest.$ac_ext
28321cat >>conftest.$ac_ext <<_ACEOF
28322/* end confdefs.h.  */
28323short int ascii_mm[] =
28324		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28325		short int ascii_ii[] =
28326		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28327		int use_ascii (int i) {
28328		  return ascii_mm[i] + ascii_ii[i];
28329		}
28330		short int ebcdic_ii[] =
28331		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28332		short int ebcdic_mm[] =
28333		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28334		int use_ebcdic (int i) {
28335		  return ebcdic_mm[i] + ebcdic_ii[i];
28336		}
28337		extern int foo;
28338
28339int
28340main ()
28341{
28342return use_ascii (foo) == use_ebcdic (foo);
28343  ;
28344  return 0;
28345}
28346_ACEOF
28347rm -f conftest.$ac_objext
28348if { (ac_try="$ac_compile"
28349case "(($ac_try" in
28350  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28351  *) ac_try_echo=$ac_try;;
28352esac
28353eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28354$as_echo "$ac_try_echo") >&5
28355  (eval "$ac_compile") 2>conftest.er1
28356  ac_status=$?
28357  grep -v '^ *+' conftest.er1 >conftest.err
28358  rm -f conftest.er1
28359  cat conftest.err >&5
28360  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28361  (exit $ac_status); } && {
28362	 test -z "$ac_cxx_werror_flag" ||
28363	 test ! -s conftest.err
28364       } && test -s conftest.$ac_objext; then
28365  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28366	      ac_cv_c_bigendian=yes
28367	    fi
28368	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28369	      if test "$ac_cv_c_bigendian" = unknown; then
28370		ac_cv_c_bigendian=no
28371	      else
28372		# finding both strings is unlikely to happen, but who knows?
28373		ac_cv_c_bigendian=unknown
28374	      fi
28375	    fi
28376else
28377  $as_echo "$as_me: failed program was:" >&5
28378sed 's/^/| /' conftest.$ac_ext >&5
28379
28380
28381fi
28382
28383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28384else
28385  cat >conftest.$ac_ext <<_ACEOF
28386/* confdefs.h.  */
28387_ACEOF
28388cat confdefs.h >>conftest.$ac_ext
28389cat >>conftest.$ac_ext <<_ACEOF
28390/* end confdefs.h.  */
28391$ac_includes_default
28392int
28393main ()
28394{
28395
28396	     /* Are we little or big endian?  From Harbison&Steele.  */
28397	     union
28398	     {
28399	       long int l;
28400	       char c[sizeof (long int)];
28401	     } u;
28402	     u.l = 1;
28403	     return u.c[sizeof (long int) - 1] == 1;
28404
28405  ;
28406  return 0;
28407}
28408_ACEOF
28409rm -f conftest$ac_exeext
28410if { (ac_try="$ac_link"
28411case "(($ac_try" in
28412  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28413  *) ac_try_echo=$ac_try;;
28414esac
28415eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28416$as_echo "$ac_try_echo") >&5
28417  (eval "$ac_link") 2>&5
28418  ac_status=$?
28419  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28420  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28421  { (case "(($ac_try" in
28422  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28423  *) ac_try_echo=$ac_try;;
28424esac
28425eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28426$as_echo "$ac_try_echo") >&5
28427  (eval "$ac_try") 2>&5
28428  ac_status=$?
28429  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28430  (exit $ac_status); }; }; then
28431  ac_cv_c_bigendian=no
28432else
28433  $as_echo "$as_me: program exited with status $ac_status" >&5
28434$as_echo "$as_me: failed program was:" >&5
28435sed 's/^/| /' conftest.$ac_ext >&5
28436
28437( exit $ac_status )
28438ac_cv_c_bigendian=yes
28439fi
28440rm -rf conftest.dSYM
28441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28442fi
28443
28444
28445    fi
28446fi
28447{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
28448$as_echo "$ac_cv_c_bigendian" >&6; }
28449 case $ac_cv_c_bigendian in #(
28450   yes)
28451     ENDIAN="big";; #(
28452   no)
28453     ENDIAN="little" ;; #(
28454   universal)
28455     ENDIAN="universal_endianness"
28456     ;; #(
28457   *)
28458     ENDIAN="unknown" ;;
28459 esac
28460
28461
28462if test "x$ENDIAN" = xuniversal_endianness; then
28463    { { $as_echo "$as_me:$LINENO: error: Building with both big and little endianness is not supported" >&5
28464$as_echo "$as_me: error: Building with both big and little endianness is not supported" >&2;}
28465   { (exit 1); exit 1; }; }
28466fi
28467if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28468    { { $as_echo "$as_me:$LINENO: error: The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)" >&5
28469$as_echo "$as_me: error: The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)" >&2;}
28470   { (exit 1); exit 1; }; }
28471fi
28472
28473
28474# Configure flags for the tools
28475
28476
28477###############################################################################
28478#
28479# How to compile shared libraries.
28480#
28481
28482if test "x$GCC" = xyes; then
28483    COMPILER_NAME=gcc
28484    PICFLAG="-fPIC"
28485    LIBRARY_PREFIX=lib
28486    SHARED_LIBRARY='lib$1.so'
28487    STATIC_LIBRARY='lib$1.a'
28488    SHARED_LIBRARY_FLAGS="-shared"
28489    SHARED_LIBRARY_SUFFIX='.so'
28490    STATIC_LIBRARY_SUFFIX='.a'
28491    OBJ_SUFFIX='.o'
28492    EXE_SUFFIX=''
28493    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28494    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28495    C_FLAG_REORDER=''
28496    CXX_FLAG_REORDER=''
28497    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28498    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28499    LD="$CC"
28500    LDEXE="$CC"
28501    LDCXX="$CXX"
28502    LDEXECXX="$CXX"
28503    POST_STRIP_CMD="$STRIP -g"
28504
28505    # Linking is different on MacOSX
28506    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28507        # Might change in the future to clang.
28508        COMPILER_NAME=gcc
28509        SHARED_LIBRARY='lib$1.dylib'
28510        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28511        SHARED_LIBRARY_SUFFIX='.dylib'
28512        EXE_SUFFIX=''
28513        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28514        SET_SHARED_LIBRARY_MAPFILE=''
28515        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28516        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28517        POST_STRIP_CMD="$STRIP -S"
28518    fi
28519else
28520    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28521        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28522        COMPILER_NAME=ossc
28523        PICFLAG="-KPIC"
28524        LIBRARY_PREFIX=lib
28525        SHARED_LIBRARY='lib$1.so'
28526        STATIC_LIBRARY='lib$1.a'
28527        SHARED_LIBRARY_FLAGS="-G"
28528        SHARED_LIBRARY_SUFFIX='.so'
28529        STATIC_LIBRARY_SUFFIX='.a'
28530        OBJ_SUFFIX='.o'
28531        EXE_SUFFIX=''
28532        SET_SHARED_LIBRARY_NAME=''
28533        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28534	C_FLAG_REORDER='-xF'
28535	CXX_FLAG_REORDER='-xF'
28536        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28537        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28538        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28539        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28540        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28541        POST_STRIP_CMD="$STRIP -x"
28542        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28543    fi
28544    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28545        # If it is not gcc, then assume it is the MS Visual Studio compiler
28546        COMPILER_NAME=cl
28547        PICFLAG=""
28548        LIBRARY_PREFIX=
28549        SHARED_LIBRARY='$1.dll'
28550        STATIC_LIBRARY='$1.lib'
28551        SHARED_LIBRARY_FLAGS="-LD"
28552        SHARED_LIBRARY_SUFFIX='.dll'
28553        STATIC_LIBRARY_SUFFIX='.lib'
28554        OBJ_SUFFIX='.obj'
28555        EXE_SUFFIX='.exe'
28556        SET_SHARED_LIBRARY_NAME=''
28557        SET_SHARED_LIBRARY_MAPFILE=''
28558        SET_SHARED_LIBRARY_ORIGIN=''
28559        SET_EXECUTABLE_ORIGIN=''
28560    fi
28561fi
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576
28577
28578
28579
28580# The (cross) compiler is now configured, we can now test capabilities
28581# of the target platform.
28582
28583
28584
28585###############################################################################
28586#
28587# Setup the opt flags for different compilers
28588# and different operating systems.
28589#
28590
28591#
28592# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28593#
28594if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28595    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28596    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28597    CFLAGS="$CFLAGS -mstackrealign"
28598    { $as_echo "$as_me:$LINENO: checking if 32-bit compiler supports -mstackrealign" >&5
28599$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28600    cat >conftest.$ac_ext <<_ACEOF
28601/* confdefs.h.  */
28602_ACEOF
28603cat confdefs.h >>conftest.$ac_ext
28604cat >>conftest.$ac_ext <<_ACEOF
28605/* end confdefs.h.  */
28606int main() { return 0; }
28607_ACEOF
28608rm -f conftest.$ac_objext conftest$ac_exeext
28609if { (ac_try="$ac_link"
28610case "(($ac_try" in
28611  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28612  *) ac_try_echo=$ac_try;;
28613esac
28614eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28615$as_echo "$ac_try_echo") >&5
28616  (eval "$ac_link") 2>conftest.er1
28617  ac_status=$?
28618  grep -v '^ *+' conftest.er1 >conftest.err
28619  rm -f conftest.er1
28620  cat conftest.err >&5
28621  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28622  (exit $ac_status); } && {
28623	 test -z "$ac_cxx_werror_flag" ||
28624	 test ! -s conftest.err
28625       } && test -s conftest$ac_exeext && {
28626	 test "$cross_compiling" = yes ||
28627	 $as_test_x conftest$ac_exeext
28628       }; then
28629
28630		        { $as_echo "$as_me:$LINENO: result: yes" >&5
28631$as_echo "yes" >&6; }
28632
28633else
28634  $as_echo "$as_me: failed program was:" >&5
28635sed 's/^/| /' conftest.$ac_ext >&5
28636
28637
28638		        { $as_echo "$as_me:$LINENO: result: no" >&5
28639$as_echo "no" >&6; }
28640	                { { $as_echo "$as_me:$LINENO: error: The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." >&5
28641$as_echo "$as_me: error: The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." >&2;}
28642   { (exit 1); exit 1; }; }
28643
28644fi
28645
28646rm -rf conftest.dSYM
28647rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28648      conftest$ac_exeext conftest.$ac_ext
28649fi
28650
28651C_FLAG_DEPS="-MMD -MF"
28652CXX_FLAG_DEPS="-MMD -MF"
28653
28654case $COMPILER_TYPE in
28655  CC )
28656    D_FLAG="-g"
28657    case $COMPILER_NAME in
28658      gcc )
28659      	case $OPENJDK_TARGET_OS in
28660	  macosx )
28661	    # On MacOSX we optimize for size, something
28662	    # we should do for all platforms?
28663	    C_O_FLAG_HI="-Os"
28664	    C_O_FLAG_NORM="-Os"
28665	    C_O_FLAG_NONE=""
28666	    ;;
28667	  *)
28668	    C_O_FLAG_HI="-O3"
28669	    C_O_FLAG_NORM="-O2"
28670	    C_O_FLAG_NONE="-O0"
28671	    CFLAGS_DEBUG_SYMBOLS="-g"
28672	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28673	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28674	       CFLAGS_DEBUG_SYMBOLS="-g1"
28675	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28676	    fi
28677	    ;;
28678	esac
28679        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28680        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28681        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28682        ;;
28683      ossc )
28684        #
28685        # Forte has different names for this with their C++ compiler...
28686        #
28687        C_FLAG_DEPS="-xMMD -xMF"
28688        CXX_FLAG_DEPS="-xMMD -xMF"
28689
28690        # Extra options used with HIGHEST
28691        #
28692        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28693        #          done with care, there are some assumptions below that need to
28694        #          be understood about the use of pointers, and IEEE behavior.
28695        #
28696        # Use non-standard floating point mode (not IEEE 754)
28697        CC_HIGHEST="$CC_HIGHEST -fns"
28698        # Do some simplification of floating point arithmetic (not IEEE 754)
28699        CC_HIGHEST="$CC_HIGHEST -fsimple"
28700        # Use single precision floating point with 'float'
28701        CC_HIGHEST="$CC_HIGHEST -fsingle"
28702        # Assume memory references via basic pointer types do not alias
28703        #   (Source with excessing pointer casting and data access with mixed
28704        #    pointer types are not recommended)
28705        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28706        # Use intrinsic or inline versions for math/std functions
28707        #   (If you expect perfect errno behavior, do not use this)
28708        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28709        # Loop data dependency optimizations (need -xO3 or higher)
28710        CC_HIGHEST="$CC_HIGHEST -xdepend"
28711        # Pointer parameters to functions do not overlap
28712        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28713        #    If you pass in multiple pointers to the same data, do not use this)
28714        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28715        # Inline some library routines
28716        #   (If you expect perfect errno behavior, do not use this)
28717        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28718        # Use optimized math routines
28719        #   (If you expect perfect errno behavior, do not use this)
28720        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28721        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28722
28723        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28724          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28725          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28726        fi
28727
28728        case $OPENJDK_TARGET_CPU_ARCH in
28729          x86)
28730            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28731            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28732            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28733            C_O_FLAG_NONE="-xregs=no%frameptr"
28734            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28735            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28736            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28737            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28738            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28739               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28740               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28741            fi
28742            ;;
28743          sparc)
28744            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28745            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28746            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28747            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28748            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28749            C_O_FLAG_NONE=""
28750            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28751            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28752            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28753            CXX_O_FLAG_NONE=""
28754            ;;
28755        esac
28756
28757    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28758    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28759    esac
28760    ;;
28761  CL )
28762    D_FLAG=
28763    C_O_FLAG_HIGHEST="-O2"
28764    C_O_FLAG_HI="-O1"
28765    C_O_FLAG_NORM="-O1"
28766    C_O_FLAG_NONE="-Od"
28767    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28768    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28769    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28770    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28771    ;;
28772esac
28773
28774if test -z "$C_O_FLAG_HIGHEST"; then
28775   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28776fi
28777
28778if test -z "$CXX_O_FLAG_HIGHEST"; then
28779   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28780fi
28781
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28796   { $as_echo "$as_me:$LINENO: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28797$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28798fi
28799
28800if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28801   { $as_echo "$as_me:$LINENO: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28802$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28803fi
28804
28805if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28806   { $as_echo "$as_me:$LINENO: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28807$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28808fi
28809
28810
28811# Check whether --with-extra-cflags was given.
28812if test "${with_extra_cflags+set}" = set; then
28813  withval=$with_extra_cflags;
28814fi
28815
28816
28817
28818# Check whether --with-extra-cxxflags was given.
28819if test "${with_extra_cxxflags+set}" = set; then
28820  withval=$with_extra_cxxflags;
28821fi
28822
28823
28824
28825# Check whether --with-extra-ldflags was given.
28826if test "${with_extra_ldflags+set}" = set; then
28827  withval=$with_extra_ldflags;
28828fi
28829
28830
28831CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28832CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28833LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28834
28835# Hotspot needs these set in their legacy form
28836LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28837LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28838LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28839
28840
28841
28842
28843
28844###############################################################################
28845#
28846# Now setup the CFLAGS and LDFLAGS for the JDK build.
28847# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28848#
28849case $COMPILER_NAME in
28850      gcc )
28851      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28852                          -pipe \
28853                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28854	  case $OPENJDK_TARGET_CPU_ARCH in
28855	  arm )
28856            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28857	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28858	  ;;
28859	  ppc )
28860            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28861	  ;;
28862	  * )
28863	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28864	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28865          ;;
28866	  esac
28867          ;;
28868      ossc )
28869          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28870          case $OPENJDK_TARGET_CPU_ARCH in
28871          x86 )
28872            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28873       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28874          ;;
28875          esac
28876
28877      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28878      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28879
28880          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28881          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28882          ;;
28883      cl )
28884          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28885               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28886	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28887	       -DWIN32 -DIAL"
28888          case $OPENJDK_TARGET_CPU in
28889              x86 )
28890                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28891                  ;;
28892              x86_64 )
28893                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28894                  ;;
28895          esac
28896          ;;
28897esac
28898
28899###############################################################################
28900
28901CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28902
28903# The package path is used only on macosx?
28904PACKAGE_PATH=/opt/local
28905
28906
28907if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28908    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28909    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28910    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28911    #   Note: -Dmacro         is the same as    #define macro 1
28912    #         -Dmacro=	    is the same as    #define macro
28913    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28914        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28915    else
28916        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28917    fi
28918else
28919    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28920fi
28921if test "x$OPENJDK_TARGET_OS" = xlinux; then
28922    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28923fi
28924if test "x$OPENJDK_TARGET_OS" = xwindows; then
28925    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28926fi
28927if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28928    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28929fi
28930if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28931    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28932fi
28933if test "x$OPENJDK_TARGET_OS" = xbsd; then
28934    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28935fi
28936if test "x$DEBUG_LEVEL" = xrelease; then
28937    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28938    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28939        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28940    fi
28941else
28942    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28943fi
28944
28945CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28946CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28947
28948CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28949        -I${JDK_OUTPUTDIR}/include \
28950        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28951        -I${JDK_TOPDIR}/src/share/javavm/export \
28952        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28953        -I${JDK_TOPDIR}/src/share/native/common \
28954        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28955
28956# The shared libraries are compiled using the picflag.
28957CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28958CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28959
28960# Executable flags
28961CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28962CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28963
28964# Now this is odd. The JDK native libraries have to link against libjvm.so
28965# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28966# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28967# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28968# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28969# libraries will link to whatever is in memory. Yuck.
28970#
28971# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28972if test "x$COMPILER_NAME" = xcl; then
28973    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28974    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28975        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28976    fi
28977    # TODO: make -debug optional "--disable-full-debug-symbols"
28978    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28979    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28980    LDFLAGS_JDKLIB_SUFFIX=""
28981    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28982        LDFLAGS_STACK_SIZE=1048576
28983    else
28984        LDFLAGS_STACK_SIZE=327680
28985    fi
28986    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28987else
28988    if test "x$COMPILER_NAME" = xgcc; then
28989        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28990        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28991        if test -n "$HAS_GNU_HASH"; then
28992            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28993        fi
28994        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28995          # And since we now know that the linker is gnu, then add -z defs, to forbid
28996          # undefined symbols in object files.
28997          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28998          if test "x$DEBUG_LEVEL" = "xrelease"; then
28999              # When building release libraries, tell the linker optimize them.
29000              # Should this be supplied to the OSS linker as well?
29001              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29002          fi
29003        fi
29004    fi
29005    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29006                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server \
29007                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client \
29008                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29009
29010    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29011    if test "x$COMPILER_NAME" = xossc; then
29012        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29013    fi
29014
29015    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29016    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29017        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29018    fi
29019fi
29020
29021# Adjust flags according to debug level.
29022case $DEBUG_LEVEL in
29023      fastdebug )
29024              CFLAGS="$CFLAGS $D_FLAG"
29025              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29026              ;;
29027      slowdebug )
29028              CFLAGS="$CFLAGS $D_FLAG"
29029	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29030	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29031	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29032	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29033              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29034              ;;
29035esac
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051# Setup debug symbols (need objcopy from the toolchain for that)
29052
29053#
29054# ENABLE_DEBUG_SYMBOLS
29055# This must be done after the toolchain is setup, since we're looking at objcopy.
29056#
29057ENABLE_DEBUG_SYMBOLS=default
29058
29059# default on macosx is no...
29060if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29061   ENABLE_DEBUG_SYMBOLS=no
29062fi
29063
29064# Check whether --enable-debug-symbols was given.
29065if test "${enable_debug_symbols+set}" = set; then
29066  enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
29067fi
29068
29069
29070{ $as_echo "$as_me:$LINENO: checking if we should generate debug symbols" >&5
29071$as_echo_n "checking if we should generate debug symbols... " >&6; }
29072
29073if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
29074   # explicit enabling of enable-debug-symbols and can't find objcopy
29075   #   this is an error
29076   { { $as_echo "$as_me:$LINENO: error: Unable to find objcopy, cannot enable debug-symbols" >&5
29077$as_echo "$as_me: error: Unable to find objcopy, cannot enable debug-symbols" >&2;}
29078   { (exit 1); exit 1; }; }
29079fi
29080
29081if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
29082  # Default is on if objcopy is found, otherwise off
29083  if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29084     ENABLE_DEBUG_SYMBOLS=yes
29085  else
29086     ENABLE_DEBUG_SYMBOLS=no
29087  fi
29088fi
29089
29090{ $as_echo "$as_me:$LINENO: result: $ENABLE_DEBUG_SYMBOLS" >&5
29091$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29092
29093#
29094# ZIP_DEBUGINFO_FILES
29095#
29096ZIP_DEBUGINFO_FILES=yes
29097
29098# Check whether --enable-zip-debug-info was given.
29099if test "${enable_zip_debug_info+set}" = set; then
29100  enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
29101fi
29102
29103
29104{ $as_echo "$as_me:$LINENO: checking if we should zip debug-info files" >&5
29105$as_echo_n "checking if we should zip debug-info files... " >&6; }
29106{ $as_echo "$as_me:$LINENO: result: $ZIP_DEBUGINFO_FILES" >&5
29107$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
29108
29109# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
29110#   use that...
29111if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
29112   ZIP_DEBUGINFO_FILES=1
29113else
29114   ZIP_DEBUGINFO_FILES=0
29115fi
29116
29117
29118
29119
29120
29121
29122
29123###############################################################################
29124#
29125# Check dependencies for external and internal libraries.
29126#
29127###############################################################################
29128
29129
29130
29131###############################################################################
29132#
29133# OS specific settings that we never will need to probe.
29134#
29135if test "x$OPENJDK_TARGET_OS" = xlinux; then
29136    { $as_echo "$as_me:$LINENO: checking what is not needed on Linux?" >&5
29137$as_echo_n "checking what is not needed on Linux?... " >&6; }
29138    PULSE_NOT_NEEDED=yes
29139    { $as_echo "$as_me:$LINENO: result: pulse" >&5
29140$as_echo "pulse" >&6; }
29141fi
29142
29143if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29144    { $as_echo "$as_me:$LINENO: checking what is not needed on Solaris?" >&5
29145$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29146    ALSA_NOT_NEEDED=yes
29147    PULSE_NOT_NEEDED=yes
29148    { $as_echo "$as_me:$LINENO: result: alsa pulse" >&5
29149$as_echo "alsa pulse" >&6; }
29150fi
29151
29152if test "x$OPENJDK_TARGET_OS" = xwindows; then
29153    { $as_echo "$as_me:$LINENO: checking what is not needed on Windows?" >&5
29154$as_echo_n "checking what is not needed on Windows?... " >&6; }
29155    CUPS_NOT_NEEDED=yes
29156    ALSA_NOT_NEEDED=yes
29157    PULSE_NOT_NEEDED=yes
29158    X11_NOT_NEEDED=yes
29159    { $as_echo "$as_me:$LINENO: result: alsa cups pulse x11" >&5
29160$as_echo "alsa cups pulse x11" >&6; }
29161fi
29162
29163if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29164    { $as_echo "$as_me:$LINENO: checking what is not needed on MacOSX?" >&5
29165$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29166    ALSA_NOT_NEEDED=yes
29167    PULSE_NOT_NEEDED=yes
29168    X11_NOT_NEEDED=yes
29169    FREETYPE2_NOT_NEEDED=yes
29170    # If the java runtime framework is disabled, then we need X11.
29171    # This will be adjusted below.
29172    { $as_echo "$as_me:$LINENO: result: alsa pulse x11" >&5
29173$as_echo "alsa pulse x11" >&6; }
29174fi
29175
29176if test "x$OPENJDK_TARGET_OS" = xbsd; then
29177    { $as_echo "$as_me:$LINENO: checking what is not needed on bsd?" >&5
29178$as_echo_n "checking what is not needed on bsd?... " >&6; }
29179    ALSA_NOT_NEEDED=yes
29180    { $as_echo "$as_me:$LINENO: result: alsa" >&5
29181$as_echo "alsa" >&6; }
29182fi
29183
29184if test "x$OPENJDK" = "xfalse"; then
29185    FREETYPE2_NOT_NEEDED=yes
29186fi
29187
29188if test "x$SUPPORT_HEADFUL" = xno; then
29189    X11_NOT_NEEDED=yes
29190fi
29191
29192###############################################################################
29193#
29194# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29195# that uses this API.
29196#
29197# Check whether --enable-macosx-runtime-support was given.
29198if test "${enable_macosx_runtime_support+set}" = set; then
29199  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29200else
29201  MACOSX_RUNTIME_SUPPORT="no"
29202fi
29203
29204
29205USE_MACOSX_RUNTIME_SUPPORT=no
29206{ $as_echo "$as_me:$LINENO: checking for explicit Java runtime support in the OS" >&5
29207$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29208if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29209    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29210        MACOSX_RUNTIME_SUPPORT=yes
29211        USE_MACOSX_RUNTIME_SUPPORT=yes
29212        { $as_echo "$as_me:$LINENO: result: yes, does not need alsa freetype2 pulse and X11" >&5
29213$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29214    else
29215        { $as_echo "$as_me:$LINENO: result: yes, but explicitly disabled." >&5
29216$as_echo "yes, but explicitly disabled." >&6; }
29217    fi
29218else
29219    { $as_echo "$as_me:$LINENO: result: no" >&5
29220$as_echo "no" >&6; }
29221fi
29222
29223if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29224    { $as_echo "$as_me:$LINENO: checking what is not needed on an X11 build on MacOSX?" >&5
29225$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29226    X11_NOT_NEEDED=
29227    FREETYPE2_NOT_NEEDED=
29228    { $as_echo "$as_me:$LINENO: result: alsa pulse" >&5
29229$as_echo "alsa pulse" >&6; }
29230fi
29231
29232
29233
29234
29235###############################################################################
29236#
29237# Check for X Windows
29238#
29239
29240# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29241# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29242# --x-libraries for the sysroot, if that seems to be correct.
29243if test "x$SYS_ROOT" != "x/"; then
29244  if test "x$x_includes" = xNONE; then
29245    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29246      x_includes="$SYS_ROOT/usr/X11R6/include"
29247    fi
29248  fi
29249  if test "x$x_libraries" = xNONE; then
29250    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29251      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29252    fi
29253  fi
29254fi
29255
29256# Now let autoconf do it's magic
29257{ $as_echo "$as_me:$LINENO: checking for X" >&5
29258$as_echo_n "checking for X... " >&6; }
29259
29260
29261# Check whether --with-x was given.
29262if test "${with_x+set}" = set; then
29263  withval=$with_x;
29264fi
29265
29266# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29267if test "x$with_x" = xno; then
29268  # The user explicitly disabled X.
29269  have_x=disabled
29270else
29271  case $x_includes,$x_libraries in #(
29272    *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5
29273$as_echo "$as_me: error: cannot use X directory names containing '" >&2;}
29274   { (exit 1); exit 1; }; };; #(
29275    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
29276  $as_echo_n "(cached) " >&6
29277else
29278  # One or both of the vars are not set, and there is no cached value.
29279ac_x_includes=no ac_x_libraries=no
29280rm -f -r conftest.dir
29281if mkdir conftest.dir; then
29282  cd conftest.dir
29283  cat >Imakefile <<'_ACEOF'
29284incroot:
29285	@echo incroot='${INCROOT}'
29286usrlibdir:
29287	@echo usrlibdir='${USRLIBDIR}'
29288libdir:
29289	@echo libdir='${LIBDIR}'
29290_ACEOF
29291  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29292    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
29293    for ac_var in incroot usrlibdir libdir; do
29294      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29295    done
29296    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29297    for ac_extension in a so sl dylib la dll; do
29298      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29299	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29300	ac_im_usrlibdir=$ac_im_libdir; break
29301      fi
29302    done
29303    # Screen out bogus values from the imake configuration.  They are
29304    # bogus both because they are the default anyway, and because
29305    # using them would break gcc on systems where it needs fixed includes.
29306    case $ac_im_incroot in
29307	/usr/include) ac_x_includes= ;;
29308	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29309    esac
29310    case $ac_im_usrlibdir in
29311	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29312	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29313    esac
29314  fi
29315  cd ..
29316  rm -f -r conftest.dir
29317fi
29318
29319# Standard set of common directories for X headers.
29320# Check X11 before X11Rn because it is often a symlink to the current release.
29321ac_x_header_dirs='
29322/usr/X11/include
29323/usr/X11R6/include
29324/usr/X11R5/include
29325/usr/X11R4/include
29326
29327/usr/include/X11
29328/usr/include/X11R6
29329/usr/include/X11R5
29330/usr/include/X11R4
29331
29332/usr/local/X11/include
29333/usr/local/X11R6/include
29334/usr/local/X11R5/include
29335/usr/local/X11R4/include
29336
29337/usr/local/include/X11
29338/usr/local/include/X11R6
29339/usr/local/include/X11R5
29340/usr/local/include/X11R4
29341
29342/usr/X386/include
29343/usr/x386/include
29344/usr/XFree86/include/X11
29345
29346/usr/include
29347/usr/local/include
29348/usr/unsupported/include
29349/usr/athena/include
29350/usr/local/x11r5/include
29351/usr/lpp/Xamples/include
29352
29353/usr/openwin/include
29354/usr/openwin/share/include'
29355
29356if test "$ac_x_includes" = no; then
29357  # Guess where to find include files, by looking for Xlib.h.
29358  # First, try using that file with no special directory specified.
29359  cat >conftest.$ac_ext <<_ACEOF
29360/* confdefs.h.  */
29361_ACEOF
29362cat confdefs.h >>conftest.$ac_ext
29363cat >>conftest.$ac_ext <<_ACEOF
29364/* end confdefs.h.  */
29365#include <X11/Xlib.h>
29366_ACEOF
29367if { (ac_try="$ac_cpp conftest.$ac_ext"
29368case "(($ac_try" in
29369  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29370  *) ac_try_echo=$ac_try;;
29371esac
29372eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29373$as_echo "$ac_try_echo") >&5
29374  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29375  ac_status=$?
29376  grep -v '^ *+' conftest.er1 >conftest.err
29377  rm -f conftest.er1
29378  cat conftest.err >&5
29379  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29380  (exit $ac_status); } >/dev/null && {
29381	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
29382	 test ! -s conftest.err
29383       }; then
29384  # We can compile using X headers with no special include directory.
29385ac_x_includes=
29386else
29387  $as_echo "$as_me: failed program was:" >&5
29388sed 's/^/| /' conftest.$ac_ext >&5
29389
29390  for ac_dir in $ac_x_header_dirs; do
29391  if test -r "$ac_dir/X11/Xlib.h"; then
29392    ac_x_includes=$ac_dir
29393    break
29394  fi
29395done
29396fi
29397
29398rm -f conftest.err conftest.$ac_ext
29399fi # $ac_x_includes = no
29400
29401if test "$ac_x_libraries" = no; then
29402  # Check for the libraries.
29403  # See if we find them without any special options.
29404  # Don't add to $LIBS permanently.
29405  ac_save_LIBS=$LIBS
29406  LIBS="-lX11 $LIBS"
29407  cat >conftest.$ac_ext <<_ACEOF
29408/* confdefs.h.  */
29409_ACEOF
29410cat confdefs.h >>conftest.$ac_ext
29411cat >>conftest.$ac_ext <<_ACEOF
29412/* end confdefs.h.  */
29413#include <X11/Xlib.h>
29414int
29415main ()
29416{
29417XrmInitialize ()
29418  ;
29419  return 0;
29420}
29421_ACEOF
29422rm -f conftest.$ac_objext conftest$ac_exeext
29423if { (ac_try="$ac_link"
29424case "(($ac_try" in
29425  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29426  *) ac_try_echo=$ac_try;;
29427esac
29428eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29429$as_echo "$ac_try_echo") >&5
29430  (eval "$ac_link") 2>conftest.er1
29431  ac_status=$?
29432  grep -v '^ *+' conftest.er1 >conftest.err
29433  rm -f conftest.er1
29434  cat conftest.err >&5
29435  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29436  (exit $ac_status); } && {
29437	 test -z "$ac_cxx_werror_flag" ||
29438	 test ! -s conftest.err
29439       } && test -s conftest$ac_exeext && {
29440	 test "$cross_compiling" = yes ||
29441	 $as_test_x conftest$ac_exeext
29442       }; then
29443  LIBS=$ac_save_LIBS
29444# We can link X programs with no special library path.
29445ac_x_libraries=
29446else
29447  $as_echo "$as_me: failed program was:" >&5
29448sed 's/^/| /' conftest.$ac_ext >&5
29449
29450	LIBS=$ac_save_LIBS
29451for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29452do
29453  # Don't even attempt the hair of trying to link an X program!
29454  for ac_extension in a so sl dylib la dll; do
29455    if test -r "$ac_dir/libX11.$ac_extension"; then
29456      ac_x_libraries=$ac_dir
29457      break 2
29458    fi
29459  done
29460done
29461fi
29462
29463rm -rf conftest.dSYM
29464rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29465      conftest$ac_exeext conftest.$ac_ext
29466fi # $ac_x_libraries = no
29467
29468case $ac_x_includes,$ac_x_libraries in #(
29469  no,* | *,no | *\'*)
29470    # Didn't find X, or a directory has "'" in its name.
29471    ac_cv_have_x="have_x=no";; #(
29472  *)
29473    # Record where we found X for the cache.
29474    ac_cv_have_x="have_x=yes\
29475	ac_x_includes='$ac_x_includes'\
29476	ac_x_libraries='$ac_x_libraries'"
29477esac
29478fi
29479;; #(
29480    *) have_x=yes;;
29481  esac
29482  eval "$ac_cv_have_x"
29483fi # $with_x != no
29484
29485if test "$have_x" != yes; then
29486  { $as_echo "$as_me:$LINENO: result: $have_x" >&5
29487$as_echo "$have_x" >&6; }
29488  no_x=yes
29489else
29490  # If each of the values was on the command line, it overrides each guess.
29491  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29492  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29493  # Update the cache value to reflect the command line values.
29494  ac_cv_have_x="have_x=yes\
29495	ac_x_includes='$x_includes'\
29496	ac_x_libraries='$x_libraries'"
29497  { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
29498$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29499fi
29500
29501if test "$no_x" = yes; then
29502  # Not all programs may use this symbol, but it does not hurt to define it.
29503
29504cat >>confdefs.h <<\_ACEOF
29505#define X_DISPLAY_MISSING 1
29506_ACEOF
29507
29508  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29509else
29510  if test -n "$x_includes"; then
29511    X_CFLAGS="$X_CFLAGS -I$x_includes"
29512  fi
29513
29514  # It would also be nice to do this for all -L options, not just this one.
29515  if test -n "$x_libraries"; then
29516    X_LIBS="$X_LIBS -L$x_libraries"
29517    # For Solaris; some versions of Sun CC require a space after -R and
29518    # others require no space.  Words are not sufficient . . . .
29519    { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
29520$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29521    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29522    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29523    ac_cxx_werror_flag=yes
29524    cat >conftest.$ac_ext <<_ACEOF
29525/* confdefs.h.  */
29526_ACEOF
29527cat confdefs.h >>conftest.$ac_ext
29528cat >>conftest.$ac_ext <<_ACEOF
29529/* end confdefs.h.  */
29530
29531int
29532main ()
29533{
29534
29535  ;
29536  return 0;
29537}
29538_ACEOF
29539rm -f conftest.$ac_objext conftest$ac_exeext
29540if { (ac_try="$ac_link"
29541case "(($ac_try" in
29542  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29543  *) ac_try_echo=$ac_try;;
29544esac
29545eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29546$as_echo "$ac_try_echo") >&5
29547  (eval "$ac_link") 2>conftest.er1
29548  ac_status=$?
29549  grep -v '^ *+' conftest.er1 >conftest.err
29550  rm -f conftest.er1
29551  cat conftest.err >&5
29552  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29553  (exit $ac_status); } && {
29554	 test -z "$ac_cxx_werror_flag" ||
29555	 test ! -s conftest.err
29556       } && test -s conftest$ac_exeext && {
29557	 test "$cross_compiling" = yes ||
29558	 $as_test_x conftest$ac_exeext
29559       }; then
29560  { $as_echo "$as_me:$LINENO: result: no" >&5
29561$as_echo "no" >&6; }
29562       X_LIBS="$X_LIBS -R$x_libraries"
29563else
29564  $as_echo "$as_me: failed program was:" >&5
29565sed 's/^/| /' conftest.$ac_ext >&5
29566
29567	LIBS="$ac_xsave_LIBS -R $x_libraries"
29568       cat >conftest.$ac_ext <<_ACEOF
29569/* confdefs.h.  */
29570_ACEOF
29571cat confdefs.h >>conftest.$ac_ext
29572cat >>conftest.$ac_ext <<_ACEOF
29573/* end confdefs.h.  */
29574
29575int
29576main ()
29577{
29578
29579  ;
29580  return 0;
29581}
29582_ACEOF
29583rm -f conftest.$ac_objext conftest$ac_exeext
29584if { (ac_try="$ac_link"
29585case "(($ac_try" in
29586  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29587  *) ac_try_echo=$ac_try;;
29588esac
29589eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29590$as_echo "$ac_try_echo") >&5
29591  (eval "$ac_link") 2>conftest.er1
29592  ac_status=$?
29593  grep -v '^ *+' conftest.er1 >conftest.err
29594  rm -f conftest.er1
29595  cat conftest.err >&5
29596  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29597  (exit $ac_status); } && {
29598	 test -z "$ac_cxx_werror_flag" ||
29599	 test ! -s conftest.err
29600       } && test -s conftest$ac_exeext && {
29601	 test "$cross_compiling" = yes ||
29602	 $as_test_x conftest$ac_exeext
29603       }; then
29604  { $as_echo "$as_me:$LINENO: result: yes" >&5
29605$as_echo "yes" >&6; }
29606	  X_LIBS="$X_LIBS -R $x_libraries"
29607else
29608  $as_echo "$as_me: failed program was:" >&5
29609sed 's/^/| /' conftest.$ac_ext >&5
29610
29611	{ $as_echo "$as_me:$LINENO: result: neither works" >&5
29612$as_echo "neither works" >&6; }
29613fi
29614
29615rm -rf conftest.dSYM
29616rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29617      conftest$ac_exeext conftest.$ac_ext
29618fi
29619
29620rm -rf conftest.dSYM
29621rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29622      conftest$ac_exeext conftest.$ac_ext
29623    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29624    LIBS=$ac_xsave_LIBS
29625  fi
29626
29627  # Check for system-dependent libraries X programs must link with.
29628  # Do this before checking for the system-independent R6 libraries
29629  # (-lICE), since we may need -lsocket or whatever for X linking.
29630
29631  if test "$ISC" = yes; then
29632    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29633  else
29634    # Martyn Johnson says this is needed for Ultrix, if the X
29635    # libraries were built with DECnet support.  And Karl Berry says
29636    # the Alpha needs dnet_stub (dnet does not exist).
29637    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29638    cat >conftest.$ac_ext <<_ACEOF
29639/* confdefs.h.  */
29640_ACEOF
29641cat confdefs.h >>conftest.$ac_ext
29642cat >>conftest.$ac_ext <<_ACEOF
29643/* end confdefs.h.  */
29644
29645/* Override any GCC internal prototype to avoid an error.
29646   Use char because int might match the return type of a GCC
29647   builtin and then its argument prototype would still apply.  */
29648#ifdef __cplusplus
29649extern "C"
29650#endif
29651char XOpenDisplay ();
29652int
29653main ()
29654{
29655return XOpenDisplay ();
29656  ;
29657  return 0;
29658}
29659_ACEOF
29660rm -f conftest.$ac_objext conftest$ac_exeext
29661if { (ac_try="$ac_link"
29662case "(($ac_try" in
29663  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29664  *) ac_try_echo=$ac_try;;
29665esac
29666eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29667$as_echo "$ac_try_echo") >&5
29668  (eval "$ac_link") 2>conftest.er1
29669  ac_status=$?
29670  grep -v '^ *+' conftest.er1 >conftest.err
29671  rm -f conftest.er1
29672  cat conftest.err >&5
29673  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29674  (exit $ac_status); } && {
29675	 test -z "$ac_cxx_werror_flag" ||
29676	 test ! -s conftest.err
29677       } && test -s conftest$ac_exeext && {
29678	 test "$cross_compiling" = yes ||
29679	 $as_test_x conftest$ac_exeext
29680       }; then
29681  :
29682else
29683  $as_echo "$as_me: failed program was:" >&5
29684sed 's/^/| /' conftest.$ac_ext >&5
29685
29686	{ $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
29687$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29688if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
29689  $as_echo_n "(cached) " >&6
29690else
29691  ac_check_lib_save_LIBS=$LIBS
29692LIBS="-ldnet  $LIBS"
29693cat >conftest.$ac_ext <<_ACEOF
29694/* confdefs.h.  */
29695_ACEOF
29696cat confdefs.h >>conftest.$ac_ext
29697cat >>conftest.$ac_ext <<_ACEOF
29698/* end confdefs.h.  */
29699
29700/* Override any GCC internal prototype to avoid an error.
29701   Use char because int might match the return type of a GCC
29702   builtin and then its argument prototype would still apply.  */
29703#ifdef __cplusplus
29704extern "C"
29705#endif
29706char dnet_ntoa ();
29707int
29708main ()
29709{
29710return dnet_ntoa ();
29711  ;
29712  return 0;
29713}
29714_ACEOF
29715rm -f conftest.$ac_objext conftest$ac_exeext
29716if { (ac_try="$ac_link"
29717case "(($ac_try" in
29718  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29719  *) ac_try_echo=$ac_try;;
29720esac
29721eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29722$as_echo "$ac_try_echo") >&5
29723  (eval "$ac_link") 2>conftest.er1
29724  ac_status=$?
29725  grep -v '^ *+' conftest.er1 >conftest.err
29726  rm -f conftest.er1
29727  cat conftest.err >&5
29728  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29729  (exit $ac_status); } && {
29730	 test -z "$ac_cxx_werror_flag" ||
29731	 test ! -s conftest.err
29732       } && test -s conftest$ac_exeext && {
29733	 test "$cross_compiling" = yes ||
29734	 $as_test_x conftest$ac_exeext
29735       }; then
29736  ac_cv_lib_dnet_dnet_ntoa=yes
29737else
29738  $as_echo "$as_me: failed program was:" >&5
29739sed 's/^/| /' conftest.$ac_ext >&5
29740
29741	ac_cv_lib_dnet_dnet_ntoa=no
29742fi
29743
29744rm -rf conftest.dSYM
29745rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29746      conftest$ac_exeext conftest.$ac_ext
29747LIBS=$ac_check_lib_save_LIBS
29748fi
29749{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29750$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29751if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then
29752  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29753fi
29754
29755    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
29756      { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
29757$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
29758if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
29759  $as_echo_n "(cached) " >&6
29760else
29761  ac_check_lib_save_LIBS=$LIBS
29762LIBS="-ldnet_stub  $LIBS"
29763cat >conftest.$ac_ext <<_ACEOF
29764/* confdefs.h.  */
29765_ACEOF
29766cat confdefs.h >>conftest.$ac_ext
29767cat >>conftest.$ac_ext <<_ACEOF
29768/* end confdefs.h.  */
29769
29770/* Override any GCC internal prototype to avoid an error.
29771   Use char because int might match the return type of a GCC
29772   builtin and then its argument prototype would still apply.  */
29773#ifdef __cplusplus
29774extern "C"
29775#endif
29776char dnet_ntoa ();
29777int
29778main ()
29779{
29780return dnet_ntoa ();
29781  ;
29782  return 0;
29783}
29784_ACEOF
29785rm -f conftest.$ac_objext conftest$ac_exeext
29786if { (ac_try="$ac_link"
29787case "(($ac_try" in
29788  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29789  *) ac_try_echo=$ac_try;;
29790esac
29791eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29792$as_echo "$ac_try_echo") >&5
29793  (eval "$ac_link") 2>conftest.er1
29794  ac_status=$?
29795  grep -v '^ *+' conftest.er1 >conftest.err
29796  rm -f conftest.er1
29797  cat conftest.err >&5
29798  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29799  (exit $ac_status); } && {
29800	 test -z "$ac_cxx_werror_flag" ||
29801	 test ! -s conftest.err
29802       } && test -s conftest$ac_exeext && {
29803	 test "$cross_compiling" = yes ||
29804	 $as_test_x conftest$ac_exeext
29805       }; then
29806  ac_cv_lib_dnet_stub_dnet_ntoa=yes
29807else
29808  $as_echo "$as_me: failed program was:" >&5
29809sed 's/^/| /' conftest.$ac_ext >&5
29810
29811	ac_cv_lib_dnet_stub_dnet_ntoa=no
29812fi
29813
29814rm -rf conftest.dSYM
29815rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29816      conftest$ac_exeext conftest.$ac_ext
29817LIBS=$ac_check_lib_save_LIBS
29818fi
29819{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
29820$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
29821if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then
29822  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
29823fi
29824
29825    fi
29826fi
29827
29828rm -rf conftest.dSYM
29829rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29830      conftest$ac_exeext conftest.$ac_ext
29831    LIBS="$ac_xsave_LIBS"
29832
29833    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
29834    # to get the SysV transport functions.
29835    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
29836    # needs -lnsl.
29837    # The nsl library prevents programs from opening the X display
29838    # on Irix 5.2, according to T.E. Dickey.
29839    # The functions gethostbyname, getservbyname, and inet_addr are
29840    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
29841    { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5
29842$as_echo_n "checking for gethostbyname... " >&6; }
29843if test "${ac_cv_func_gethostbyname+set}" = set; then
29844  $as_echo_n "(cached) " >&6
29845else
29846  cat >conftest.$ac_ext <<_ACEOF
29847/* confdefs.h.  */
29848_ACEOF
29849cat confdefs.h >>conftest.$ac_ext
29850cat >>conftest.$ac_ext <<_ACEOF
29851/* end confdefs.h.  */
29852/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
29853   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
29854#define gethostbyname innocuous_gethostbyname
29855
29856/* System header to define __stub macros and hopefully few prototypes,
29857    which can conflict with char gethostbyname (); below.
29858    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
29859    <limits.h> exists even on freestanding compilers.  */
29860
29861#ifdef __STDC__
29862# include <limits.h>
29863#else
29864# include <assert.h>
29865#endif
29866
29867#undef gethostbyname
29868
29869/* Override any GCC internal prototype to avoid an error.
29870   Use char because int might match the return type of a GCC
29871   builtin and then its argument prototype would still apply.  */
29872#ifdef __cplusplus
29873extern "C"
29874#endif
29875char gethostbyname ();
29876/* The GNU C library defines this for functions which it implements
29877    to always fail with ENOSYS.  Some functions are actually named
29878    something starting with __ and the normal name is an alias.  */
29879#if defined __stub_gethostbyname || defined __stub___gethostbyname
29880choke me
29881#endif
29882
29883int
29884main ()
29885{
29886return gethostbyname ();
29887  ;
29888  return 0;
29889}
29890_ACEOF
29891rm -f conftest.$ac_objext conftest$ac_exeext
29892if { (ac_try="$ac_link"
29893case "(($ac_try" in
29894  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29895  *) ac_try_echo=$ac_try;;
29896esac
29897eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29898$as_echo "$ac_try_echo") >&5
29899  (eval "$ac_link") 2>conftest.er1
29900  ac_status=$?
29901  grep -v '^ *+' conftest.er1 >conftest.err
29902  rm -f conftest.er1
29903  cat conftest.err >&5
29904  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29905  (exit $ac_status); } && {
29906	 test -z "$ac_cxx_werror_flag" ||
29907	 test ! -s conftest.err
29908       } && test -s conftest$ac_exeext && {
29909	 test "$cross_compiling" = yes ||
29910	 $as_test_x conftest$ac_exeext
29911       }; then
29912  ac_cv_func_gethostbyname=yes
29913else
29914  $as_echo "$as_me: failed program was:" >&5
29915sed 's/^/| /' conftest.$ac_ext >&5
29916
29917	ac_cv_func_gethostbyname=no
29918fi
29919
29920rm -rf conftest.dSYM
29921rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29922      conftest$ac_exeext conftest.$ac_ext
29923fi
29924{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
29925$as_echo "$ac_cv_func_gethostbyname" >&6; }
29926
29927    if test $ac_cv_func_gethostbyname = no; then
29928      { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
29929$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
29930if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
29931  $as_echo_n "(cached) " >&6
29932else
29933  ac_check_lib_save_LIBS=$LIBS
29934LIBS="-lnsl  $LIBS"
29935cat >conftest.$ac_ext <<_ACEOF
29936/* confdefs.h.  */
29937_ACEOF
29938cat confdefs.h >>conftest.$ac_ext
29939cat >>conftest.$ac_ext <<_ACEOF
29940/* end confdefs.h.  */
29941
29942/* Override any GCC internal prototype to avoid an error.
29943   Use char because int might match the return type of a GCC
29944   builtin and then its argument prototype would still apply.  */
29945#ifdef __cplusplus
29946extern "C"
29947#endif
29948char gethostbyname ();
29949int
29950main ()
29951{
29952return gethostbyname ();
29953  ;
29954  return 0;
29955}
29956_ACEOF
29957rm -f conftest.$ac_objext conftest$ac_exeext
29958if { (ac_try="$ac_link"
29959case "(($ac_try" in
29960  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29961  *) ac_try_echo=$ac_try;;
29962esac
29963eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29964$as_echo "$ac_try_echo") >&5
29965  (eval "$ac_link") 2>conftest.er1
29966  ac_status=$?
29967  grep -v '^ *+' conftest.er1 >conftest.err
29968  rm -f conftest.er1
29969  cat conftest.err >&5
29970  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29971  (exit $ac_status); } && {
29972	 test -z "$ac_cxx_werror_flag" ||
29973	 test ! -s conftest.err
29974       } && test -s conftest$ac_exeext && {
29975	 test "$cross_compiling" = yes ||
29976	 $as_test_x conftest$ac_exeext
29977       }; then
29978  ac_cv_lib_nsl_gethostbyname=yes
29979else
29980  $as_echo "$as_me: failed program was:" >&5
29981sed 's/^/| /' conftest.$ac_ext >&5
29982
29983	ac_cv_lib_nsl_gethostbyname=no
29984fi
29985
29986rm -rf conftest.dSYM
29987rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29988      conftest$ac_exeext conftest.$ac_ext
29989LIBS=$ac_check_lib_save_LIBS
29990fi
29991{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
29992$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29993if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
29994  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29995fi
29996
29997      if test $ac_cv_lib_nsl_gethostbyname = no; then
29998	{ $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
29999$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30000if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
30001  $as_echo_n "(cached) " >&6
30002else
30003  ac_check_lib_save_LIBS=$LIBS
30004LIBS="-lbsd  $LIBS"
30005cat >conftest.$ac_ext <<_ACEOF
30006/* confdefs.h.  */
30007_ACEOF
30008cat confdefs.h >>conftest.$ac_ext
30009cat >>conftest.$ac_ext <<_ACEOF
30010/* end confdefs.h.  */
30011
30012/* Override any GCC internal prototype to avoid an error.
30013   Use char because int might match the return type of a GCC
30014   builtin and then its argument prototype would still apply.  */
30015#ifdef __cplusplus
30016extern "C"
30017#endif
30018char gethostbyname ();
30019int
30020main ()
30021{
30022return gethostbyname ();
30023  ;
30024  return 0;
30025}
30026_ACEOF
30027rm -f conftest.$ac_objext conftest$ac_exeext
30028if { (ac_try="$ac_link"
30029case "(($ac_try" in
30030  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30031  *) ac_try_echo=$ac_try;;
30032esac
30033eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30034$as_echo "$ac_try_echo") >&5
30035  (eval "$ac_link") 2>conftest.er1
30036  ac_status=$?
30037  grep -v '^ *+' conftest.er1 >conftest.err
30038  rm -f conftest.er1
30039  cat conftest.err >&5
30040  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30041  (exit $ac_status); } && {
30042	 test -z "$ac_cxx_werror_flag" ||
30043	 test ! -s conftest.err
30044       } && test -s conftest$ac_exeext && {
30045	 test "$cross_compiling" = yes ||
30046	 $as_test_x conftest$ac_exeext
30047       }; then
30048  ac_cv_lib_bsd_gethostbyname=yes
30049else
30050  $as_echo "$as_me: failed program was:" >&5
30051sed 's/^/| /' conftest.$ac_ext >&5
30052
30053	ac_cv_lib_bsd_gethostbyname=no
30054fi
30055
30056rm -rf conftest.dSYM
30057rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30058      conftest$ac_exeext conftest.$ac_ext
30059LIBS=$ac_check_lib_save_LIBS
30060fi
30061{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
30062$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30063if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then
30064  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30065fi
30066
30067      fi
30068    fi
30069
30070    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30071    # socket/setsockopt and other routines are undefined under SCO ODT
30072    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30073    # on later versions), says Simon Leinen: it contains gethostby*
30074    # variants that don't use the name server (or something).  -lsocket
30075    # must be given before -lnsl if both are needed.  We assume that
30076    # if connect needs -lnsl, so does gethostbyname.
30077    { $as_echo "$as_me:$LINENO: checking for connect" >&5
30078$as_echo_n "checking for connect... " >&6; }
30079if test "${ac_cv_func_connect+set}" = set; then
30080  $as_echo_n "(cached) " >&6
30081else
30082  cat >conftest.$ac_ext <<_ACEOF
30083/* confdefs.h.  */
30084_ACEOF
30085cat confdefs.h >>conftest.$ac_ext
30086cat >>conftest.$ac_ext <<_ACEOF
30087/* end confdefs.h.  */
30088/* Define connect to an innocuous variant, in case <limits.h> declares connect.
30089   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
30090#define connect innocuous_connect
30091
30092/* System header to define __stub macros and hopefully few prototypes,
30093    which can conflict with char connect (); below.
30094    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30095    <limits.h> exists even on freestanding compilers.  */
30096
30097#ifdef __STDC__
30098# include <limits.h>
30099#else
30100# include <assert.h>
30101#endif
30102
30103#undef connect
30104
30105/* Override any GCC internal prototype to avoid an error.
30106   Use char because int might match the return type of a GCC
30107   builtin and then its argument prototype would still apply.  */
30108#ifdef __cplusplus
30109extern "C"
30110#endif
30111char connect ();
30112/* The GNU C library defines this for functions which it implements
30113    to always fail with ENOSYS.  Some functions are actually named
30114    something starting with __ and the normal name is an alias.  */
30115#if defined __stub_connect || defined __stub___connect
30116choke me
30117#endif
30118
30119int
30120main ()
30121{
30122return connect ();
30123  ;
30124  return 0;
30125}
30126_ACEOF
30127rm -f conftest.$ac_objext conftest$ac_exeext
30128if { (ac_try="$ac_link"
30129case "(($ac_try" in
30130  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30131  *) ac_try_echo=$ac_try;;
30132esac
30133eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30134$as_echo "$ac_try_echo") >&5
30135  (eval "$ac_link") 2>conftest.er1
30136  ac_status=$?
30137  grep -v '^ *+' conftest.er1 >conftest.err
30138  rm -f conftest.er1
30139  cat conftest.err >&5
30140  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30141  (exit $ac_status); } && {
30142	 test -z "$ac_cxx_werror_flag" ||
30143	 test ! -s conftest.err
30144       } && test -s conftest$ac_exeext && {
30145	 test "$cross_compiling" = yes ||
30146	 $as_test_x conftest$ac_exeext
30147       }; then
30148  ac_cv_func_connect=yes
30149else
30150  $as_echo "$as_me: failed program was:" >&5
30151sed 's/^/| /' conftest.$ac_ext >&5
30152
30153	ac_cv_func_connect=no
30154fi
30155
30156rm -rf conftest.dSYM
30157rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30158      conftest$ac_exeext conftest.$ac_ext
30159fi
30160{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
30161$as_echo "$ac_cv_func_connect" >&6; }
30162
30163    if test $ac_cv_func_connect = no; then
30164      { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
30165$as_echo_n "checking for connect in -lsocket... " >&6; }
30166if test "${ac_cv_lib_socket_connect+set}" = set; then
30167  $as_echo_n "(cached) " >&6
30168else
30169  ac_check_lib_save_LIBS=$LIBS
30170LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30171cat >conftest.$ac_ext <<_ACEOF
30172/* confdefs.h.  */
30173_ACEOF
30174cat confdefs.h >>conftest.$ac_ext
30175cat >>conftest.$ac_ext <<_ACEOF
30176/* end confdefs.h.  */
30177
30178/* Override any GCC internal prototype to avoid an error.
30179   Use char because int might match the return type of a GCC
30180   builtin and then its argument prototype would still apply.  */
30181#ifdef __cplusplus
30182extern "C"
30183#endif
30184char connect ();
30185int
30186main ()
30187{
30188return connect ();
30189  ;
30190  return 0;
30191}
30192_ACEOF
30193rm -f conftest.$ac_objext conftest$ac_exeext
30194if { (ac_try="$ac_link"
30195case "(($ac_try" in
30196  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30197  *) ac_try_echo=$ac_try;;
30198esac
30199eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30200$as_echo "$ac_try_echo") >&5
30201  (eval "$ac_link") 2>conftest.er1
30202  ac_status=$?
30203  grep -v '^ *+' conftest.er1 >conftest.err
30204  rm -f conftest.er1
30205  cat conftest.err >&5
30206  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30207  (exit $ac_status); } && {
30208	 test -z "$ac_cxx_werror_flag" ||
30209	 test ! -s conftest.err
30210       } && test -s conftest$ac_exeext && {
30211	 test "$cross_compiling" = yes ||
30212	 $as_test_x conftest$ac_exeext
30213       }; then
30214  ac_cv_lib_socket_connect=yes
30215else
30216  $as_echo "$as_me: failed program was:" >&5
30217sed 's/^/| /' conftest.$ac_ext >&5
30218
30219	ac_cv_lib_socket_connect=no
30220fi
30221
30222rm -rf conftest.dSYM
30223rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30224      conftest$ac_exeext conftest.$ac_ext
30225LIBS=$ac_check_lib_save_LIBS
30226fi
30227{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
30228$as_echo "$ac_cv_lib_socket_connect" >&6; }
30229if test "x$ac_cv_lib_socket_connect" = x""yes; then
30230  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30231fi
30232
30233    fi
30234
30235    # Guillermo Gomez says -lposix is necessary on A/UX.
30236    { $as_echo "$as_me:$LINENO: checking for remove" >&5
30237$as_echo_n "checking for remove... " >&6; }
30238if test "${ac_cv_func_remove+set}" = set; then
30239  $as_echo_n "(cached) " >&6
30240else
30241  cat >conftest.$ac_ext <<_ACEOF
30242/* confdefs.h.  */
30243_ACEOF
30244cat confdefs.h >>conftest.$ac_ext
30245cat >>conftest.$ac_ext <<_ACEOF
30246/* end confdefs.h.  */
30247/* Define remove to an innocuous variant, in case <limits.h> declares remove.
30248   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
30249#define remove innocuous_remove
30250
30251/* System header to define __stub macros and hopefully few prototypes,
30252    which can conflict with char remove (); below.
30253    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30254    <limits.h> exists even on freestanding compilers.  */
30255
30256#ifdef __STDC__
30257# include <limits.h>
30258#else
30259# include <assert.h>
30260#endif
30261
30262#undef remove
30263
30264/* Override any GCC internal prototype to avoid an error.
30265   Use char because int might match the return type of a GCC
30266   builtin and then its argument prototype would still apply.  */
30267#ifdef __cplusplus
30268extern "C"
30269#endif
30270char remove ();
30271/* The GNU C library defines this for functions which it implements
30272    to always fail with ENOSYS.  Some functions are actually named
30273    something starting with __ and the normal name is an alias.  */
30274#if defined __stub_remove || defined __stub___remove
30275choke me
30276#endif
30277
30278int
30279main ()
30280{
30281return remove ();
30282  ;
30283  return 0;
30284}
30285_ACEOF
30286rm -f conftest.$ac_objext conftest$ac_exeext
30287if { (ac_try="$ac_link"
30288case "(($ac_try" in
30289  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30290  *) ac_try_echo=$ac_try;;
30291esac
30292eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30293$as_echo "$ac_try_echo") >&5
30294  (eval "$ac_link") 2>conftest.er1
30295  ac_status=$?
30296  grep -v '^ *+' conftest.er1 >conftest.err
30297  rm -f conftest.er1
30298  cat conftest.err >&5
30299  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30300  (exit $ac_status); } && {
30301	 test -z "$ac_cxx_werror_flag" ||
30302	 test ! -s conftest.err
30303       } && test -s conftest$ac_exeext && {
30304	 test "$cross_compiling" = yes ||
30305	 $as_test_x conftest$ac_exeext
30306       }; then
30307  ac_cv_func_remove=yes
30308else
30309  $as_echo "$as_me: failed program was:" >&5
30310sed 's/^/| /' conftest.$ac_ext >&5
30311
30312	ac_cv_func_remove=no
30313fi
30314
30315rm -rf conftest.dSYM
30316rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30317      conftest$ac_exeext conftest.$ac_ext
30318fi
30319{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
30320$as_echo "$ac_cv_func_remove" >&6; }
30321
30322    if test $ac_cv_func_remove = no; then
30323      { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5
30324$as_echo_n "checking for remove in -lposix... " >&6; }
30325if test "${ac_cv_lib_posix_remove+set}" = set; then
30326  $as_echo_n "(cached) " >&6
30327else
30328  ac_check_lib_save_LIBS=$LIBS
30329LIBS="-lposix  $LIBS"
30330cat >conftest.$ac_ext <<_ACEOF
30331/* confdefs.h.  */
30332_ACEOF
30333cat confdefs.h >>conftest.$ac_ext
30334cat >>conftest.$ac_ext <<_ACEOF
30335/* end confdefs.h.  */
30336
30337/* Override any GCC internal prototype to avoid an error.
30338   Use char because int might match the return type of a GCC
30339   builtin and then its argument prototype would still apply.  */
30340#ifdef __cplusplus
30341extern "C"
30342#endif
30343char remove ();
30344int
30345main ()
30346{
30347return remove ();
30348  ;
30349  return 0;
30350}
30351_ACEOF
30352rm -f conftest.$ac_objext conftest$ac_exeext
30353if { (ac_try="$ac_link"
30354case "(($ac_try" in
30355  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30356  *) ac_try_echo=$ac_try;;
30357esac
30358eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30359$as_echo "$ac_try_echo") >&5
30360  (eval "$ac_link") 2>conftest.er1
30361  ac_status=$?
30362  grep -v '^ *+' conftest.er1 >conftest.err
30363  rm -f conftest.er1
30364  cat conftest.err >&5
30365  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30366  (exit $ac_status); } && {
30367	 test -z "$ac_cxx_werror_flag" ||
30368	 test ! -s conftest.err
30369       } && test -s conftest$ac_exeext && {
30370	 test "$cross_compiling" = yes ||
30371	 $as_test_x conftest$ac_exeext
30372       }; then
30373  ac_cv_lib_posix_remove=yes
30374else
30375  $as_echo "$as_me: failed program was:" >&5
30376sed 's/^/| /' conftest.$ac_ext >&5
30377
30378	ac_cv_lib_posix_remove=no
30379fi
30380
30381rm -rf conftest.dSYM
30382rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30383      conftest$ac_exeext conftest.$ac_ext
30384LIBS=$ac_check_lib_save_LIBS
30385fi
30386{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
30387$as_echo "$ac_cv_lib_posix_remove" >&6; }
30388if test "x$ac_cv_lib_posix_remove" = x""yes; then
30389  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30390fi
30391
30392    fi
30393
30394    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30395    { $as_echo "$as_me:$LINENO: checking for shmat" >&5
30396$as_echo_n "checking for shmat... " >&6; }
30397if test "${ac_cv_func_shmat+set}" = set; then
30398  $as_echo_n "(cached) " >&6
30399else
30400  cat >conftest.$ac_ext <<_ACEOF
30401/* confdefs.h.  */
30402_ACEOF
30403cat confdefs.h >>conftest.$ac_ext
30404cat >>conftest.$ac_ext <<_ACEOF
30405/* end confdefs.h.  */
30406/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
30407   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
30408#define shmat innocuous_shmat
30409
30410/* System header to define __stub macros and hopefully few prototypes,
30411    which can conflict with char shmat (); below.
30412    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30413    <limits.h> exists even on freestanding compilers.  */
30414
30415#ifdef __STDC__
30416# include <limits.h>
30417#else
30418# include <assert.h>
30419#endif
30420
30421#undef shmat
30422
30423/* Override any GCC internal prototype to avoid an error.
30424   Use char because int might match the return type of a GCC
30425   builtin and then its argument prototype would still apply.  */
30426#ifdef __cplusplus
30427extern "C"
30428#endif
30429char shmat ();
30430/* The GNU C library defines this for functions which it implements
30431    to always fail with ENOSYS.  Some functions are actually named
30432    something starting with __ and the normal name is an alias.  */
30433#if defined __stub_shmat || defined __stub___shmat
30434choke me
30435#endif
30436
30437int
30438main ()
30439{
30440return shmat ();
30441  ;
30442  return 0;
30443}
30444_ACEOF
30445rm -f conftest.$ac_objext conftest$ac_exeext
30446if { (ac_try="$ac_link"
30447case "(($ac_try" in
30448  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30449  *) ac_try_echo=$ac_try;;
30450esac
30451eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30452$as_echo "$ac_try_echo") >&5
30453  (eval "$ac_link") 2>conftest.er1
30454  ac_status=$?
30455  grep -v '^ *+' conftest.er1 >conftest.err
30456  rm -f conftest.er1
30457  cat conftest.err >&5
30458  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30459  (exit $ac_status); } && {
30460	 test -z "$ac_cxx_werror_flag" ||
30461	 test ! -s conftest.err
30462       } && test -s conftest$ac_exeext && {
30463	 test "$cross_compiling" = yes ||
30464	 $as_test_x conftest$ac_exeext
30465       }; then
30466  ac_cv_func_shmat=yes
30467else
30468  $as_echo "$as_me: failed program was:" >&5
30469sed 's/^/| /' conftest.$ac_ext >&5
30470
30471	ac_cv_func_shmat=no
30472fi
30473
30474rm -rf conftest.dSYM
30475rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30476      conftest$ac_exeext conftest.$ac_ext
30477fi
30478{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
30479$as_echo "$ac_cv_func_shmat" >&6; }
30480
30481    if test $ac_cv_func_shmat = no; then
30482      { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
30483$as_echo_n "checking for shmat in -lipc... " >&6; }
30484if test "${ac_cv_lib_ipc_shmat+set}" = set; then
30485  $as_echo_n "(cached) " >&6
30486else
30487  ac_check_lib_save_LIBS=$LIBS
30488LIBS="-lipc  $LIBS"
30489cat >conftest.$ac_ext <<_ACEOF
30490/* confdefs.h.  */
30491_ACEOF
30492cat confdefs.h >>conftest.$ac_ext
30493cat >>conftest.$ac_ext <<_ACEOF
30494/* end confdefs.h.  */
30495
30496/* Override any GCC internal prototype to avoid an error.
30497   Use char because int might match the return type of a GCC
30498   builtin and then its argument prototype would still apply.  */
30499#ifdef __cplusplus
30500extern "C"
30501#endif
30502char shmat ();
30503int
30504main ()
30505{
30506return shmat ();
30507  ;
30508  return 0;
30509}
30510_ACEOF
30511rm -f conftest.$ac_objext conftest$ac_exeext
30512if { (ac_try="$ac_link"
30513case "(($ac_try" in
30514  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30515  *) ac_try_echo=$ac_try;;
30516esac
30517eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30518$as_echo "$ac_try_echo") >&5
30519  (eval "$ac_link") 2>conftest.er1
30520  ac_status=$?
30521  grep -v '^ *+' conftest.er1 >conftest.err
30522  rm -f conftest.er1
30523  cat conftest.err >&5
30524  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30525  (exit $ac_status); } && {
30526	 test -z "$ac_cxx_werror_flag" ||
30527	 test ! -s conftest.err
30528       } && test -s conftest$ac_exeext && {
30529	 test "$cross_compiling" = yes ||
30530	 $as_test_x conftest$ac_exeext
30531       }; then
30532  ac_cv_lib_ipc_shmat=yes
30533else
30534  $as_echo "$as_me: failed program was:" >&5
30535sed 's/^/| /' conftest.$ac_ext >&5
30536
30537	ac_cv_lib_ipc_shmat=no
30538fi
30539
30540rm -rf conftest.dSYM
30541rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30542      conftest$ac_exeext conftest.$ac_ext
30543LIBS=$ac_check_lib_save_LIBS
30544fi
30545{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
30546$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30547if test "x$ac_cv_lib_ipc_shmat" = x""yes; then
30548  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30549fi
30550
30551    fi
30552  fi
30553
30554  # Check for libraries that X11R6 Xt/Xaw programs need.
30555  ac_save_LDFLAGS=$LDFLAGS
30556  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30557  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30558  # check for ICE first), but we must link in the order -lSM -lICE or
30559  # we get undefined symbols.  So assume we have SM if we have ICE.
30560  # These have to be linked with before -lX11, unlike the other
30561  # libraries we check for below, so use a different variable.
30562  # John Interrante, Karl Berry
30563  { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
30564$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30565if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
30566  $as_echo_n "(cached) " >&6
30567else
30568  ac_check_lib_save_LIBS=$LIBS
30569LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30570cat >conftest.$ac_ext <<_ACEOF
30571/* confdefs.h.  */
30572_ACEOF
30573cat confdefs.h >>conftest.$ac_ext
30574cat >>conftest.$ac_ext <<_ACEOF
30575/* end confdefs.h.  */
30576
30577/* Override any GCC internal prototype to avoid an error.
30578   Use char because int might match the return type of a GCC
30579   builtin and then its argument prototype would still apply.  */
30580#ifdef __cplusplus
30581extern "C"
30582#endif
30583char IceConnectionNumber ();
30584int
30585main ()
30586{
30587return IceConnectionNumber ();
30588  ;
30589  return 0;
30590}
30591_ACEOF
30592rm -f conftest.$ac_objext conftest$ac_exeext
30593if { (ac_try="$ac_link"
30594case "(($ac_try" in
30595  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30596  *) ac_try_echo=$ac_try;;
30597esac
30598eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30599$as_echo "$ac_try_echo") >&5
30600  (eval "$ac_link") 2>conftest.er1
30601  ac_status=$?
30602  grep -v '^ *+' conftest.er1 >conftest.err
30603  rm -f conftest.er1
30604  cat conftest.err >&5
30605  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30606  (exit $ac_status); } && {
30607	 test -z "$ac_cxx_werror_flag" ||
30608	 test ! -s conftest.err
30609       } && test -s conftest$ac_exeext && {
30610	 test "$cross_compiling" = yes ||
30611	 $as_test_x conftest$ac_exeext
30612       }; then
30613  ac_cv_lib_ICE_IceConnectionNumber=yes
30614else
30615  $as_echo "$as_me: failed program was:" >&5
30616sed 's/^/| /' conftest.$ac_ext >&5
30617
30618	ac_cv_lib_ICE_IceConnectionNumber=no
30619fi
30620
30621rm -rf conftest.dSYM
30622rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30623      conftest$ac_exeext conftest.$ac_ext
30624LIBS=$ac_check_lib_save_LIBS
30625fi
30626{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30627$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30628if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then
30629  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30630fi
30631
30632  LDFLAGS=$ac_save_LDFLAGS
30633
30634fi
30635
30636
30637if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30638
30639    # Print a helpful message on how to acquire the necessary build dependency.
30640    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30641    MISSING_DEPENDENCY=x11
30642    PKGHANDLER_COMMAND=
30643
30644    case $PKGHANDLER in
30645	apt-get)
30646                apt_help     $MISSING_DEPENDENCY ;;
30647    yum)
30648                yum_help     $MISSING_DEPENDENCY ;;
30649	port)
30650                port_help    $MISSING_DEPENDENCY ;;
30651	pkgutil)
30652                pkgutil_help $MISSING_DEPENDENCY ;;
30653	pkgadd)
30654                pkgadd_help  $MISSING_DEPENDENCY ;;
30655    * )
30656      break ;;
30657    esac
30658
30659    if test "x$PKGHANDLER_COMMAND" != x; then
30660        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30661    fi
30662
30663    { { $as_echo "$as_me:$LINENO: error: Could not find X11 libraries. $HELP_MSG" >&5
30664$as_echo "$as_me: error: Could not find X11 libraries. $HELP_MSG" >&2;}
30665   { (exit 1); exit 1; }; }
30666fi
30667
30668# Some of the old makefiles require a setting of OPENWIN_HOME
30669# Since the X11R6 directory has disappeared on later Linuxes,
30670# we need to probe for it.
30671if test "x$OPENJDK_TARGET_OS" = xlinux; then
30672    if test -d "$SYS_ROOT/usr/X11R6"; then
30673        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30674    fi
30675    if test -d "$SYS_ROOT/usr/include/X11"; then
30676        OPENWIN_HOME="$SYS_ROOT/usr"
30677    fi
30678fi
30679if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30680    OPENWIN_HOME="/usr/openwin"
30681fi
30682
30683
30684
30685#
30686# Weird Sol10 something check...TODO change to try compile
30687#
30688if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30689  if test "`uname -r`" = "5.10"; then
30690     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30691     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30692     fi
30693  fi
30694fi
30695
30696ac_ext=c
30697ac_cpp='$CPP $CPPFLAGS'
30698ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30699ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30700ac_compiler_gnu=$ac_cv_c_compiler_gnu
30701
30702OLD_CFLAGS="$CFLAGS"
30703CFLAGS="$CFLAGS $X_CFLAGS"
30704
30705# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30706
30707
30708
30709for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30710do
30711as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30712{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
30713$as_echo_n "checking for $ac_header... " >&6; }
30714if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
30715  $as_echo_n "(cached) " >&6
30716else
30717  cat >conftest.$ac_ext <<_ACEOF
30718/* confdefs.h.  */
30719_ACEOF
30720cat confdefs.h >>conftest.$ac_ext
30721cat >>conftest.$ac_ext <<_ACEOF
30722/* end confdefs.h.  */
30723 # include <X11/Xlib.h>
30724                   # include <X11/Xutil.h>
30725
30726
30727#include <$ac_header>
30728_ACEOF
30729rm -f conftest.$ac_objext
30730if { (ac_try="$ac_compile"
30731case "(($ac_try" in
30732  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30733  *) ac_try_echo=$ac_try;;
30734esac
30735eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30736$as_echo "$ac_try_echo") >&5
30737  (eval "$ac_compile") 2>conftest.er1
30738  ac_status=$?
30739  grep -v '^ *+' conftest.er1 >conftest.err
30740  rm -f conftest.er1
30741  cat conftest.err >&5
30742  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30743  (exit $ac_status); } && {
30744	 test -z "$ac_c_werror_flag" ||
30745	 test ! -s conftest.err
30746       } && test -s conftest.$ac_objext; then
30747  eval "$as_ac_Header=yes"
30748else
30749  $as_echo "$as_me: failed program was:" >&5
30750sed 's/^/| /' conftest.$ac_ext >&5
30751
30752	eval "$as_ac_Header=no"
30753fi
30754
30755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30756fi
30757ac_res=`eval 'as_val=${'$as_ac_Header'}
30758		 $as_echo "$as_val"'`
30759	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
30760$as_echo "$ac_res" >&6; }
30761as_val=`eval 'as_val=${'$as_ac_Header'}
30762		 $as_echo "$as_val"'`
30763   if test "x$as_val" = x""yes; then
30764  cat >>confdefs.h <<_ACEOF
30765#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30766_ACEOF
30767 X11_A_OK=yes
30768else
30769  X11_A_OK=no
30770fi
30771
30772done
30773
30774
30775CFLAGS="$OLD_CFLAGS"
30776ac_ext=cpp
30777ac_cpp='$CXXCPP $CPPFLAGS'
30778ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30779ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30780ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30781
30782
30783if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30784
30785    # Print a helpful message on how to acquire the necessary build dependency.
30786    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30787    MISSING_DEPENDENCY=x11
30788    PKGHANDLER_COMMAND=
30789
30790    case $PKGHANDLER in
30791	apt-get)
30792                apt_help     $MISSING_DEPENDENCY ;;
30793    yum)
30794                yum_help     $MISSING_DEPENDENCY ;;
30795	port)
30796                port_help    $MISSING_DEPENDENCY ;;
30797	pkgutil)
30798                pkgutil_help $MISSING_DEPENDENCY ;;
30799	pkgadd)
30800                pkgadd_help  $MISSING_DEPENDENCY ;;
30801    * )
30802      break ;;
30803    esac
30804
30805    if test "x$PKGHANDLER_COMMAND" != x; then
30806        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30807    fi
30808
30809    { { $as_echo "$as_me:$LINENO: error: Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" >&5
30810$as_echo "$as_me: error: Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" >&2;}
30811   { (exit 1); exit 1; }; }
30812fi
30813
30814
30815
30816
30817
30818
30819###############################################################################
30820#
30821# The common unix printing system cups is used to print from java.
30822#
30823
30824# Check whether --with-cups was given.
30825if test "${with_cups+set}" = set; then
30826  withval=$with_cups;
30827fi
30828
30829
30830# Check whether --with-cups-include was given.
30831if test "${with_cups_include+set}" = set; then
30832  withval=$with_cups_include;
30833fi
30834
30835
30836if test "x$CUPS_NOT_NEEDED" = xyes; then
30837	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30838		{ $as_echo "$as_me:$LINENO: WARNING: cups not used, so --with-cups is ignored" >&5
30839$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30840	fi
30841	CUPS_CFLAGS=
30842else
30843	CUPS_FOUND=no
30844
30845	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30846	    { { $as_echo "$as_me:$LINENO: error: It is not possible to disable the use of cups. Remove the --without-cups option." >&5
30847$as_echo "$as_me: error: It is not possible to disable the use of cups. Remove the --without-cups option." >&2;}
30848   { (exit 1); exit 1; }; }
30849	fi
30850
30851	if test "x${with_cups}" != x; then
30852	    CUPS_CFLAGS="-I${with_cups}/include"
30853	    CUPS_FOUND=yes
30854	fi
30855	if test "x${with_cups_include}" != x; then
30856	    CUPS_CFLAGS="-I${with_cups_include}"
30857	    CUPS_FOUND=yes
30858	fi
30859	if test "x$CUPS_FOUND" = xno; then
30860
30861
30862    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30863        # Source the builddeps file again, to make sure it uses the latest variables!
30864        . $builddepsfile
30865        # Look for a target and build machine specific resource!
30866        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30867        if test "x$resource" = x; then
30868            # Ok, lets instead look for a target specific resource
30869            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30870        fi
30871        if test "x$resource" = x; then
30872            # Ok, lets instead look for a build specific resource
30873            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30874        fi
30875        if test "x$resource" = x; then
30876            # Ok, lets instead look for a generic resource
30877            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30878            resource=${builddep_cups}
30879        fi
30880        if test "x$resource" != x; then
30881            { $as_echo "$as_me:$LINENO: Using builddeps $resource for cups" >&5
30882$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30883	    # If the resource in the builddeps.conf file is an existing directory,
30884	    # for example /java/linux/cups
30885	    if test -d ${resource}; then
30886	       depdir=${resource}
30887	    else
30888
30889# cups is for example mymodule
30890# $resource is for example libs/general/libmymod_1_2_3.zip
30891# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30892# $with_builddeps_dir is for example /localhome/builddeps
30893# depdir is the name of the variable into which we store the depdir, eg MYMOD
30894# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30895# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30896    filename=`basename $resource`
30897    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30898    filebase=${filename%%.*}
30899    extension=${filename#*.}
30900    installdir=$with_builddeps_dir/$filebase
30901    if test ! -f $installdir/$filename.unpacked; then
30902        { $as_echo "$as_me:$LINENO: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30903$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30904        if test ! -d $installdir; then
30905            mkdir -p $installdir
30906        fi
30907        if test ! -d $installdir; then
30908            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
30909$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
30910   { (exit 1); exit 1; }; }
30911        fi
30912        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30913        touch $tmpfile
30914        if test ! -f $tmpfile; then
30915            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
30916$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
30917   { (exit 1); exit 1; }; }
30918        fi
30919
30920    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30921    # $tmpfile is the local file name for the downloaded file.
30922    VALID_TOOL=no
30923    if test "x$BDEPS_FTP" = xwget; then
30924       VALID_TOOL=yes
30925       wget -O $tmpfile $with_builddeps_server/$resource
30926    fi
30927    if test "x$BDEPS_FTP" = xlftp; then
30928       VALID_TOOL=yes
30929       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30930    fi
30931    if test "x$BDEPS_FTP" = xftp; then
30932        VALID_TOOL=yes
30933        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30934        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30935        FTPUSERPWD=${FTPSERVER%%@*}
30936        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30937            FTPUSER=${userpwd%%:*}
30938            FTPPWD=${userpwd#*@}
30939            FTPSERVER=${FTPSERVER#*@}
30940        else
30941            FTPUSER=ftp
30942            FTPPWD=ftp
30943        fi
30944        # the "pass" command does not work on some
30945        # ftp clients (read ftp.exe) but if it works,
30946        # passive mode is better!
30947        (\
30948            echo "user $FTPUSER $FTPPWD"        ;\
30949            echo "pass"                         ;\
30950            echo "bin"                          ;\
30951            echo "get $FTPPATH $tmpfile"              ;\
30952        ) | ftp -in $FTPSERVER
30953    fi
30954    if test "x$VALID_TOOL" != xyes; then
30955       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
30956$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
30957   { (exit 1); exit 1; }; }
30958    fi
30959
30960        mv $tmpfile $installdir/$filename
30961        if test ! -s $installdir/$filename; then
30962            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
30963$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
30964   { (exit 1); exit 1; }; }
30965        fi
30966        case "$extension" in
30967            zip)  echo "Unzipping $installdir/$filename..."
30968               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30969            ;;
30970            tar.gz) echo "Untaring $installdir/$filename..."
30971               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30972            ;;
30973            tgz) echo "Untaring $installdir/$filename..."
30974               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30975            ;;
30976            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
30977$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
30978   { (exit 1); exit 1; }; }
30979            ;;
30980        esac
30981    fi
30982    if test -f $installdir/$filename.unpacked; then
30983        depdir=$installdir
30984    fi
30985
30986	    fi
30987            # Source the builddeps file again, because in the previous command, the depdir
30988            # was updated to point at the current build dependency install directory.
30989            . $builddepsfile
30990            # Now extract variables from the builddeps.conf files.
30991            theroot=${builddep_cups_ROOT}
30992            thecflags=${builddep_cups_CFLAGS}
30993            thelibs=${builddep_cups_LIBS}
30994            if test "x$depdir" = x; then
30995                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency cups" >&5
30996$as_echo "$as_me: error: Could not download build dependency cups" >&2;}
30997   { (exit 1); exit 1; }; }
30998            fi
30999            CUPS=$depdir
31000            if test "x$theroot" != x; then
31001               CUPS="$theroot"
31002            fi
31003            if test "x$thecflags" != x; then
31004               CUPS_CFLAGS="$thecflags"
31005            fi
31006            if test "x$thelibs" != x; then
31007               CUPS_LIBS="$thelibs"
31008            fi
31009            CUPS_FOUND=yes
31010
31011        fi
31012
31013    fi
31014
31015	fi
31016	if test "x$CUPS_FOUND" = xno; then
31017	    # Are the cups headers installed in the default /usr/include location?
31018
31019
31020for ac_header in cups/cups.h cups/ppd.h
31021do
31022as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31023if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
31024  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
31025$as_echo_n "checking for $ac_header... " >&6; }
31026if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
31027  $as_echo_n "(cached) " >&6
31028fi
31029ac_res=`eval 'as_val=${'$as_ac_Header'}
31030		 $as_echo "$as_val"'`
31031	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
31032$as_echo "$ac_res" >&6; }
31033else
31034  # Is the header compilable?
31035{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
31036$as_echo_n "checking $ac_header usability... " >&6; }
31037cat >conftest.$ac_ext <<_ACEOF
31038/* confdefs.h.  */
31039_ACEOF
31040cat confdefs.h >>conftest.$ac_ext
31041cat >>conftest.$ac_ext <<_ACEOF
31042/* end confdefs.h.  */
31043$ac_includes_default
31044#include <$ac_header>
31045_ACEOF
31046rm -f conftest.$ac_objext
31047if { (ac_try="$ac_compile"
31048case "(($ac_try" in
31049  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31050  *) ac_try_echo=$ac_try;;
31051esac
31052eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31053$as_echo "$ac_try_echo") >&5
31054  (eval "$ac_compile") 2>conftest.er1
31055  ac_status=$?
31056  grep -v '^ *+' conftest.er1 >conftest.err
31057  rm -f conftest.er1
31058  cat conftest.err >&5
31059  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31060  (exit $ac_status); } && {
31061	 test -z "$ac_cxx_werror_flag" ||
31062	 test ! -s conftest.err
31063       } && test -s conftest.$ac_objext; then
31064  ac_header_compiler=yes
31065else
31066  $as_echo "$as_me: failed program was:" >&5
31067sed 's/^/| /' conftest.$ac_ext >&5
31068
31069	ac_header_compiler=no
31070fi
31071
31072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31073{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
31074$as_echo "$ac_header_compiler" >&6; }
31075
31076# Is the header present?
31077{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
31078$as_echo_n "checking $ac_header presence... " >&6; }
31079cat >conftest.$ac_ext <<_ACEOF
31080/* confdefs.h.  */
31081_ACEOF
31082cat confdefs.h >>conftest.$ac_ext
31083cat >>conftest.$ac_ext <<_ACEOF
31084/* end confdefs.h.  */
31085#include <$ac_header>
31086_ACEOF
31087if { (ac_try="$ac_cpp conftest.$ac_ext"
31088case "(($ac_try" in
31089  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31090  *) ac_try_echo=$ac_try;;
31091esac
31092eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31093$as_echo "$ac_try_echo") >&5
31094  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
31095  ac_status=$?
31096  grep -v '^ *+' conftest.er1 >conftest.err
31097  rm -f conftest.er1
31098  cat conftest.err >&5
31099  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31100  (exit $ac_status); } >/dev/null && {
31101	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
31102	 test ! -s conftest.err
31103       }; then
31104  ac_header_preproc=yes
31105else
31106  $as_echo "$as_me: failed program was:" >&5
31107sed 's/^/| /' conftest.$ac_ext >&5
31108
31109  ac_header_preproc=no
31110fi
31111
31112rm -f conftest.err conftest.$ac_ext
31113{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
31114$as_echo "$ac_header_preproc" >&6; }
31115
31116# So?  What about this header?
31117case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
31118  yes:no: )
31119    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
31120$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
31121    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
31122$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
31123    ac_header_preproc=yes
31124    ;;
31125  no:yes:* )
31126    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
31127$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
31128    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
31129$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
31130    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
31131$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
31132    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
31133$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
31134    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
31135$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
31136    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
31137$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
31138    ( cat <<\_ASBOX
31139## ----------------------------------------- ##
31140## Report this to build-dev@openjdk.java.net ##
31141## ----------------------------------------- ##
31142_ASBOX
31143     ) | sed "s/^/$as_me: WARNING:     /" >&2
31144    ;;
31145esac
31146{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
31147$as_echo_n "checking for $ac_header... " >&6; }
31148if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
31149  $as_echo_n "(cached) " >&6
31150else
31151  eval "$as_ac_Header=\$ac_header_preproc"
31152fi
31153ac_res=`eval 'as_val=${'$as_ac_Header'}
31154		 $as_echo "$as_val"'`
31155	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
31156$as_echo "$ac_res" >&6; }
31157
31158fi
31159as_val=`eval 'as_val=${'$as_ac_Header'}
31160		 $as_echo "$as_val"'`
31161   if test "x$as_val" = x""yes; then
31162  cat >>confdefs.h <<_ACEOF
31163#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31164_ACEOF
31165 CUPS_FOUND=yes
31166	                      CUPS_CFLAGS=
31167	                      DEFAULT_CUPS=yes
31168fi
31169
31170done
31171
31172	fi
31173	if test "x$CUPS_FOUND" = xno; then
31174	    # Getting nervous now? Lets poke around for standard Solaris third-party
31175	    # package installation locations.
31176	    { $as_echo "$as_me:$LINENO: checking for cups headers" >&5
31177$as_echo_n "checking for cups headers... " >&6; }
31178	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31179	       # An SFW package seems to be installed!
31180	       CUPS_FOUND=yes
31181	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31182	    elif test -s /opt/csw/include/cups/cups.h; then
31183	       # A CSW package seems to be installed!
31184	       CUPS_FOUND=yes
31185	       CUPS_CFLAGS="-I/opt/csw/include"
31186	    fi
31187	    { $as_echo "$as_me:$LINENO: result: $CUPS_FOUND" >&5
31188$as_echo "$CUPS_FOUND" >&6; }
31189	fi
31190	if test "x$CUPS_FOUND" = xno; then
31191
31192    # Print a helpful message on how to acquire the necessary build dependency.
31193    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31194    MISSING_DEPENDENCY=cups
31195    PKGHANDLER_COMMAND=
31196
31197    case $PKGHANDLER in
31198	apt-get)
31199                apt_help     $MISSING_DEPENDENCY ;;
31200    yum)
31201                yum_help     $MISSING_DEPENDENCY ;;
31202	port)
31203                port_help    $MISSING_DEPENDENCY ;;
31204	pkgutil)
31205                pkgutil_help $MISSING_DEPENDENCY ;;
31206	pkgadd)
31207                pkgadd_help  $MISSING_DEPENDENCY ;;
31208    * )
31209      break ;;
31210    esac
31211
31212    if test "x$PKGHANDLER_COMMAND" != x; then
31213        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31214    fi
31215
31216	    { { $as_echo "$as_me:$LINENO: error: Could not find cups! $HELP_MSG " >&5
31217$as_echo "$as_me: error: Could not find cups! $HELP_MSG " >&2;}
31218   { (exit 1); exit 1; }; }
31219	fi
31220fi
31221
31222
31223
31224
31225
31226
31227###############################################################################
31228#
31229# The ubiquitous freetype2 library is used to render fonts.
31230#
31231
31232# Check whether --with-freetype was given.
31233if test "${with_freetype+set}" = set; then
31234  withval=$with_freetype;
31235fi
31236
31237
31238# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31239USING_SYSTEM_FT_LIB=false
31240
31241if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31242	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31243		{ $as_echo "$as_me:$LINENO: WARNING: freetype not used, so --with-freetype is ignored" >&5
31244$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31245	fi
31246	FREETYPE2_CFLAGS=
31247	FREETYPE2_LIBS=
31248        FREETYPE2_LIB_PATH=
31249else
31250	FREETYPE2_FOUND=no
31251
31252	if test "x$with_freetype" != x; then
31253
31254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31255
31256  # Input might be given as Windows format, start by converting to
31257  # unix format.
31258  path="$with_freetype"
31259  new_path=`$CYGPATH -u "$path"`
31260
31261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31264  # "foo.exe" is OK but "foo" is an error.
31265  #
31266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31267  # It is also a way to make sure we got the proper file name for the real test later on.
31268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31269  if test "x$test_shortpath" = x; then
31270    { $as_echo "$as_me:$LINENO: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31271$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31272    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of with_freetype" >&5
31273$as_echo "$as_me: error: Cannot locate the the path of with_freetype" >&2;}
31274   { (exit 1); exit 1; }; }
31275  fi
31276
31277  # Call helper function which possibly converts this using DOS-style short mode.
31278  # If so, the updated path is stored in $new_path.
31279
31280  input_path="$new_path"
31281  # Check if we need to convert this using DOS-style short mode. If the path
31282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31283  # take no chances and rewrite it.
31284  # Note: m4 eats our [], so we need to use [ and ] instead.
31285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31286  if test "x$has_forbidden_chars" != x; then
31287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31291      # Going to short mode and back again did indeed matter. Since short mode is
31292      # case insensitive, let's make it lowercase to improve readability.
31293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31294      # Now convert it back to Unix-stile (cygpath)
31295      input_path=`$CYGPATH -u "$shortmode_path"`
31296      new_path="$input_path"
31297    fi
31298  fi
31299
31300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31301  if test "x$test_cygdrive_prefix" = x; then
31302    # As a simple fix, exclude /usr/bin since it's not a real path.
31303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31305      # a path prefixed by /cygdrive for fixpath to work.
31306      new_path="$CYGWIN_ROOT_PATH$input_path"
31307    fi
31308  fi
31309
31310
31311  if test "x$path" != "x$new_path"; then
31312    with_freetype="$new_path"
31313    { $as_echo "$as_me:$LINENO: Rewriting with_freetype to \"$new_path\"" >&5
31314$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31315  fi
31316
31317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31318
31319  path="$with_freetype"
31320  has_colon=`$ECHO $path | $GREP ^.:`
31321  new_path="$path"
31322  if test "x$has_colon" = x; then
31323    # Not in mixed or Windows style, start by that.
31324    new_path=`cmd //c echo $path`
31325  fi
31326
31327
31328  input_path="$new_path"
31329  # Check if we need to convert this using DOS-style short mode. If the path
31330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31331  # take no chances and rewrite it.
31332  # Note: m4 eats our [], so we need to use [ and ] instead.
31333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31334  if test "x$has_forbidden_chars" != x; then
31335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31337  fi
31338
31339
31340  windows_path="$new_path"
31341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31342    unix_path=`$CYGPATH -u "$windows_path"`
31343    new_path="$unix_path"
31344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31346    new_path="$unix_path"
31347  fi
31348
31349  if test "x$path" != "x$new_path"; then
31350    with_freetype="$new_path"
31351    { $as_echo "$as_me:$LINENO: Rewriting with_freetype to \"$new_path\"" >&5
31352$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31353  fi
31354
31355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31357
31358  else
31359    # We're on a posix platform. Hooray! :)
31360    path="$with_freetype"
31361
31362    if test ! -f "$path" && test ! -d "$path"; then
31363      { { $as_echo "$as_me:$LINENO: error: The path of with_freetype, which resolves as \"$path\", is not found." >&5
31364$as_echo "$as_me: error: The path of with_freetype, which resolves as \"$path\", is not found." >&2;}
31365   { (exit 1); exit 1; }; }
31366    fi
31367
31368    has_space=`$ECHO "$path" | $GREP " "`
31369    if test "x$has_space" != x; then
31370      { $as_echo "$as_me:$LINENO: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31371$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31372      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
31373$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
31374   { (exit 1); exit 1; }; }
31375    fi
31376  fi
31377
31378	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31379            FREETYPE2_LIB_PATH="$with_freetype/lib"
31380            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31381                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31382                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31383            fi
31384            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31385                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31386            fi
31387	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31388            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31389                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31390            fi
31391 	    FREETYPE2_FOUND=yes
31392   	    if test "x$FREETYPE2_FOUND" = xyes; then
31393	        # Verify that the directories exist
31394                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31395		   { { $as_echo "$as_me:$LINENO: error: Could not find the expected directories $with_freetype/lib and $with_freetype/include" >&5
31396$as_echo "$as_me: error: Could not find the expected directories $with_freetype/lib and $with_freetype/include" >&2;}
31397   { (exit 1); exit 1; }; }
31398		fi
31399	        # List the contents of the lib.
31400		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31401                if test "x$FREETYPELIB" = x; then
31402		   { { $as_echo "$as_me:$LINENO: error: Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" >&5
31403$as_echo "$as_me: error: Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" >&2;}
31404   { (exit 1); exit 1; }; }
31405		fi
31406	        # Check one h-file
31407                if ! test -s "$with_freetype/include/ft2build.h"; then
31408		   { { $as_echo "$as_me:$LINENO: error: Could not find $with_freetype/include/ft2build.h" >&5
31409$as_echo "$as_me: error: Could not find $with_freetype/include/ft2build.h" >&2;}
31410   { (exit 1); exit 1; }; }
31411		fi
31412            fi
31413        fi
31414	if test "x$FREETYPE2_FOUND" = xno; then
31415
31416
31417    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31418        # Source the builddeps file again, to make sure it uses the latest variables!
31419        . $builddepsfile
31420        # Look for a target and build machine specific resource!
31421        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31422        if test "x$resource" = x; then
31423            # Ok, lets instead look for a target specific resource
31424            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31425        fi
31426        if test "x$resource" = x; then
31427            # Ok, lets instead look for a build specific resource
31428            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31429        fi
31430        if test "x$resource" = x; then
31431            # Ok, lets instead look for a generic resource
31432            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31433            resource=${builddep_freetype2}
31434        fi
31435        if test "x$resource" != x; then
31436            { $as_echo "$as_me:$LINENO: Using builddeps $resource for freetype2" >&5
31437$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31438	    # If the resource in the builddeps.conf file is an existing directory,
31439	    # for example /java/linux/cups
31440	    if test -d ${resource}; then
31441	       depdir=${resource}
31442	    else
31443
31444# freetype2 is for example mymodule
31445# $resource is for example libs/general/libmymod_1_2_3.zip
31446# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31447# $with_builddeps_dir is for example /localhome/builddeps
31448# depdir is the name of the variable into which we store the depdir, eg MYMOD
31449# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31450# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31451    filename=`basename $resource`
31452    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31453    filebase=${filename%%.*}
31454    extension=${filename#*.}
31455    installdir=$with_builddeps_dir/$filebase
31456    if test ! -f $installdir/$filename.unpacked; then
31457        { $as_echo "$as_me:$LINENO: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31458$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31459        if test ! -d $installdir; then
31460            mkdir -p $installdir
31461        fi
31462        if test ! -d $installdir; then
31463            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
31464$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
31465   { (exit 1); exit 1; }; }
31466        fi
31467        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31468        touch $tmpfile
31469        if test ! -f $tmpfile; then
31470            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
31471$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
31472   { (exit 1); exit 1; }; }
31473        fi
31474
31475    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31476    # $tmpfile is the local file name for the downloaded file.
31477    VALID_TOOL=no
31478    if test "x$BDEPS_FTP" = xwget; then
31479       VALID_TOOL=yes
31480       wget -O $tmpfile $with_builddeps_server/$resource
31481    fi
31482    if test "x$BDEPS_FTP" = xlftp; then
31483       VALID_TOOL=yes
31484       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31485    fi
31486    if test "x$BDEPS_FTP" = xftp; then
31487        VALID_TOOL=yes
31488        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31489        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31490        FTPUSERPWD=${FTPSERVER%%@*}
31491        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31492            FTPUSER=${userpwd%%:*}
31493            FTPPWD=${userpwd#*@}
31494            FTPSERVER=${FTPSERVER#*@}
31495        else
31496            FTPUSER=ftp
31497            FTPPWD=ftp
31498        fi
31499        # the "pass" command does not work on some
31500        # ftp clients (read ftp.exe) but if it works,
31501        # passive mode is better!
31502        (\
31503            echo "user $FTPUSER $FTPPWD"        ;\
31504            echo "pass"                         ;\
31505            echo "bin"                          ;\
31506            echo "get $FTPPATH $tmpfile"              ;\
31507        ) | ftp -in $FTPSERVER
31508    fi
31509    if test "x$VALID_TOOL" != xyes; then
31510       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
31511$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
31512   { (exit 1); exit 1; }; }
31513    fi
31514
31515        mv $tmpfile $installdir/$filename
31516        if test ! -s $installdir/$filename; then
31517            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
31518$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
31519   { (exit 1); exit 1; }; }
31520        fi
31521        case "$extension" in
31522            zip)  echo "Unzipping $installdir/$filename..."
31523               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31524            ;;
31525            tar.gz) echo "Untaring $installdir/$filename..."
31526               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31527            ;;
31528            tgz) echo "Untaring $installdir/$filename..."
31529               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31530            ;;
31531            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
31532$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
31533   { (exit 1); exit 1; }; }
31534            ;;
31535        esac
31536    fi
31537    if test -f $installdir/$filename.unpacked; then
31538        depdir=$installdir
31539    fi
31540
31541	    fi
31542            # Source the builddeps file again, because in the previous command, the depdir
31543            # was updated to point at the current build dependency install directory.
31544            . $builddepsfile
31545            # Now extract variables from the builddeps.conf files.
31546            theroot=${builddep_freetype2_ROOT}
31547            thecflags=${builddep_freetype2_CFLAGS}
31548            thelibs=${builddep_freetype2_LIBS}
31549            if test "x$depdir" = x; then
31550                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency freetype2" >&5
31551$as_echo "$as_me: error: Could not download build dependency freetype2" >&2;}
31552   { (exit 1); exit 1; }; }
31553            fi
31554            FREETYPE2=$depdir
31555            if test "x$theroot" != x; then
31556               FREETYPE2="$theroot"
31557            fi
31558            if test "x$thecflags" != x; then
31559               FREETYPE2_CFLAGS="$thecflags"
31560            fi
31561            if test "x$thelibs" != x; then
31562               FREETYPE2_LIBS="$thelibs"
31563            fi
31564            FREETYPE2_FOUND=yes
31565            else FREETYPE2_FOUND=no
31566
31567        fi
31568        else FREETYPE2_FOUND=no
31569
31570    fi
31571
31572            USING_SYSTEM_FT_LIB=true
31573	fi
31574	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31575            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31576
31577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31578
31579  # Input might be given as Windows format, start by converting to
31580  # unix format.
31581  path="$FREETYPELOCATION"
31582  new_path=`$CYGPATH -u "$path"`
31583
31584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31587  # "foo.exe" is OK but "foo" is an error.
31588  #
31589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31590  # It is also a way to make sure we got the proper file name for the real test later on.
31591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31592  if test "x$test_shortpath" = x; then
31593    { $as_echo "$as_me:$LINENO: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31594$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31595    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FREETYPELOCATION" >&5
31596$as_echo "$as_me: error: Cannot locate the the path of FREETYPELOCATION" >&2;}
31597   { (exit 1); exit 1; }; }
31598  fi
31599
31600  # Call helper function which possibly converts this using DOS-style short mode.
31601  # If so, the updated path is stored in $new_path.
31602
31603  input_path="$new_path"
31604  # Check if we need to convert this using DOS-style short mode. If the path
31605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31606  # take no chances and rewrite it.
31607  # Note: m4 eats our [], so we need to use [ and ] instead.
31608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31609  if test "x$has_forbidden_chars" != x; then
31610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31614      # Going to short mode and back again did indeed matter. Since short mode is
31615      # case insensitive, let's make it lowercase to improve readability.
31616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31617      # Now convert it back to Unix-stile (cygpath)
31618      input_path=`$CYGPATH -u "$shortmode_path"`
31619      new_path="$input_path"
31620    fi
31621  fi
31622
31623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31624  if test "x$test_cygdrive_prefix" = x; then
31625    # As a simple fix, exclude /usr/bin since it's not a real path.
31626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31628      # a path prefixed by /cygdrive for fixpath to work.
31629      new_path="$CYGWIN_ROOT_PATH$input_path"
31630    fi
31631  fi
31632
31633
31634  if test "x$path" != "x$new_path"; then
31635    FREETYPELOCATION="$new_path"
31636    { $as_echo "$as_me:$LINENO: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31637$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31638  fi
31639
31640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31641
31642  path="$FREETYPELOCATION"
31643  has_colon=`$ECHO $path | $GREP ^.:`
31644  new_path="$path"
31645  if test "x$has_colon" = x; then
31646    # Not in mixed or Windows style, start by that.
31647    new_path=`cmd //c echo $path`
31648  fi
31649
31650
31651  input_path="$new_path"
31652  # Check if we need to convert this using DOS-style short mode. If the path
31653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31654  # take no chances and rewrite it.
31655  # Note: m4 eats our [], so we need to use [ and ] instead.
31656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31657  if test "x$has_forbidden_chars" != x; then
31658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31660  fi
31661
31662
31663  windows_path="$new_path"
31664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31665    unix_path=`$CYGPATH -u "$windows_path"`
31666    new_path="$unix_path"
31667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31669    new_path="$unix_path"
31670  fi
31671
31672  if test "x$path" != "x$new_path"; then
31673    FREETYPELOCATION="$new_path"
31674    { $as_echo "$as_me:$LINENO: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31675$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31676  fi
31677
31678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31680
31681  else
31682    # We're on a posix platform. Hooray! :)
31683    path="$FREETYPELOCATION"
31684
31685    if test ! -f "$path" && test ! -d "$path"; then
31686      { { $as_echo "$as_me:$LINENO: error: The path of FREETYPELOCATION, which resolves as \"$path\", is not found." >&5
31687$as_echo "$as_me: error: The path of FREETYPELOCATION, which resolves as \"$path\", is not found." >&2;}
31688   { (exit 1); exit 1; }; }
31689    fi
31690
31691    has_space=`$ECHO "$path" | $GREP " "`
31692    if test "x$has_space" != x; then
31693      { $as_echo "$as_me:$LINENO: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31694$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31695      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
31696$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
31697   { (exit 1); exit 1; }; }
31698    fi
31699  fi
31700
31701	    { $as_echo "$as_me:$LINENO: checking for freetype in some standard windows locations" >&5
31702$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31703	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31704	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31705	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31706 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31707                if ! test -s "$FREETYPE2_LIBS"; then
31708		   { { $as_echo "$as_me:$LINENO: error: Could not find $FREETYPE2_LIBS" >&5
31709$as_echo "$as_me: error: Could not find $FREETYPE2_LIBS" >&2;}
31710   { (exit 1); exit 1; }; }
31711		fi
31712                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31713		   { { $as_echo "$as_me:$LINENO: error: Could not find $FREETYPE2_LIB_PATH/freetype.dll" >&5
31714$as_echo "$as_me: error: Could not find $FREETYPE2_LIB_PATH/freetype.dll" >&2;}
31715   { (exit 1); exit 1; }; }
31716		fi
31717                USING_SYSTEM_FT_LIB=true
31718                FREETYPE2_FOUND=yes
31719	    fi
31720	    { $as_echo "$as_me:$LINENO: result: $FREETYPE2_FOUND" >&5
31721$as_echo "$FREETYPE2_FOUND" >&6; }
31722        fi
31723	if test "x$FREETYPE2_FOUND" = xno; then
31724
31725pkg_failed=no
31726{ $as_echo "$as_me:$LINENO: checking for FREETYPE2" >&5
31727$as_echo_n "checking for FREETYPE2... " >&6; }
31728
31729if test -n "$FREETYPE2_CFLAGS"; then
31730    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31731 elif test -n "$PKG_CONFIG"; then
31732    if test -n "$PKG_CONFIG" && \
31733    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5
31734  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31735  ac_status=$?
31736  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31737  (exit $ac_status); }; then
31738  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31739else
31740  pkg_failed=yes
31741fi
31742 else
31743    pkg_failed=untried
31744fi
31745if test -n "$FREETYPE2_LIBS"; then
31746    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31747 elif test -n "$PKG_CONFIG"; then
31748    if test -n "$PKG_CONFIG" && \
31749    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5
31750  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31751  ac_status=$?
31752  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31753  (exit $ac_status); }; then
31754  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31755else
31756  pkg_failed=yes
31757fi
31758 else
31759    pkg_failed=untried
31760fi
31761
31762
31763
31764if test $pkg_failed = yes; then
31765
31766if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31767        _pkg_short_errors_supported=yes
31768else
31769        _pkg_short_errors_supported=no
31770fi
31771        if test $_pkg_short_errors_supported = yes; then
31772	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31773        else
31774	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31775        fi
31776	# Put the nasty error message in config.log where it belongs
31777	echo "$FREETYPE2_PKG_ERRORS" >&5
31778
31779	{ $as_echo "$as_me:$LINENO: result: no" >&5
31780$as_echo "no" >&6; }
31781                FREETYPE2_FOUND=no
31782elif test $pkg_failed = untried; then
31783	FREETYPE2_FOUND=no
31784else
31785	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31786	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31787        { $as_echo "$as_me:$LINENO: result: yes" >&5
31788$as_echo "yes" >&6; }
31789	FREETYPE2_FOUND=yes
31790fi
31791            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31792            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31793            USING_SYSTEM_FT_LIB=true
31794            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31795            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31796              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31797            fi
31798	fi
31799	if test "x$FREETYPE2_FOUND" = xno; then
31800	    { $as_echo "$as_me:$LINENO: checking for freetype in some standard locations" >&5
31801$as_echo_n "checking for freetype in some standard locations... " >&6; }
31802
31803	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
31804	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
31805	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
31806	    fi
31807	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
31808	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
31809	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31810	    fi
31811
31812	    PREV_CXXCFLAGS="$CXXFLAGS"
31813	    PREV_LDFLAGS="$LDFLAGS"
31814	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31815	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31816	    cat >conftest.$ac_ext <<_ACEOF
31817/* confdefs.h.  */
31818_ACEOF
31819cat confdefs.h >>conftest.$ac_ext
31820cat >>conftest.$ac_ext <<_ACEOF
31821/* end confdefs.h.  */
31822#include<ft2build.h>
31823	                    #include FT_FREETYPE_H
31824	                   int main() { return 0; }
31825
31826_ACEOF
31827rm -f conftest.$ac_objext conftest$ac_exeext
31828if { (ac_try="$ac_link"
31829case "(($ac_try" in
31830  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31831  *) ac_try_echo=$ac_try;;
31832esac
31833eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31834$as_echo "$ac_try_echo") >&5
31835  (eval "$ac_link") 2>conftest.er1
31836  ac_status=$?
31837  grep -v '^ *+' conftest.er1 >conftest.err
31838  rm -f conftest.er1
31839  cat conftest.err >&5
31840  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31841  (exit $ac_status); } && {
31842	 test -z "$ac_cxx_werror_flag" ||
31843	 test ! -s conftest.err
31844       } && test -s conftest$ac_exeext && {
31845	 test "$cross_compiling" = yes ||
31846	 $as_test_x conftest$ac_exeext
31847       }; then
31848
31849	                      # Yes, the default cflags and libs did the trick.
31850	                      FREETYPE2_FOUND=yes
31851	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31852	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31853
31854else
31855  $as_echo "$as_me: failed program was:" >&5
31856sed 's/^/| /' conftest.$ac_ext >&5
31857
31858
31859	                      FREETYPE2_FOUND=no
31860
31861fi
31862
31863rm -rf conftest.dSYM
31864rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
31865      conftest$ac_exeext conftest.$ac_ext
31866            CXXCFLAGS="$PREV_CXXFLAGS"
31867	    LDFLAGS="$PREV_LDFLAGS"
31868	    { $as_echo "$as_me:$LINENO: result: $FREETYPE2_FOUND" >&5
31869$as_echo "$FREETYPE2_FOUND" >&6; }
31870            USING_SYSTEM_FT_LIB=true
31871	fi
31872	if test "x$FREETYPE2_FOUND" = xno; then
31873
31874    # Print a helpful message on how to acquire the necessary build dependency.
31875    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31876    MISSING_DEPENDENCY=freetype2
31877    PKGHANDLER_COMMAND=
31878
31879    case $PKGHANDLER in
31880	apt-get)
31881                apt_help     $MISSING_DEPENDENCY ;;
31882    yum)
31883                yum_help     $MISSING_DEPENDENCY ;;
31884	port)
31885                port_help    $MISSING_DEPENDENCY ;;
31886	pkgutil)
31887                pkgutil_help $MISSING_DEPENDENCY ;;
31888	pkgadd)
31889                pkgadd_help  $MISSING_DEPENDENCY ;;
31890    * )
31891      break ;;
31892    esac
31893
31894    if test "x$PKGHANDLER_COMMAND" != x; then
31895        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31896    fi
31897
31898		{ { $as_echo "$as_me:$LINENO: error: Could not find freetype2! $HELP_MSG " >&5
31899$as_echo "$as_me: error: Could not find freetype2! $HELP_MSG " >&2;}
31900   { (exit 1); exit 1; }; }
31901	fi
31902
31903        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31904            # AC_CHECK_LIB does not support use of cl.exe
31905            PREV_LDFLAGS="$LDFLAGS"
31906            LDFLAGS="$FREETYPE2_LIBS"
31907            { $as_echo "$as_me:$LINENO: checking for FT_Init_FreeType in -lfreetype" >&5
31908$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31909if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then
31910  $as_echo_n "(cached) " >&6
31911else
31912  ac_check_lib_save_LIBS=$LIBS
31913LIBS="-lfreetype  $LIBS"
31914cat >conftest.$ac_ext <<_ACEOF
31915/* confdefs.h.  */
31916_ACEOF
31917cat confdefs.h >>conftest.$ac_ext
31918cat >>conftest.$ac_ext <<_ACEOF
31919/* end confdefs.h.  */
31920
31921/* Override any GCC internal prototype to avoid an error.
31922   Use char because int might match the return type of a GCC
31923   builtin and then its argument prototype would still apply.  */
31924#ifdef __cplusplus
31925extern "C"
31926#endif
31927char FT_Init_FreeType ();
31928int
31929main ()
31930{
31931return FT_Init_FreeType ();
31932  ;
31933  return 0;
31934}
31935_ACEOF
31936rm -f conftest.$ac_objext conftest$ac_exeext
31937if { (ac_try="$ac_link"
31938case "(($ac_try" in
31939  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31940  *) ac_try_echo=$ac_try;;
31941esac
31942eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31943$as_echo "$ac_try_echo") >&5
31944  (eval "$ac_link") 2>conftest.er1
31945  ac_status=$?
31946  grep -v '^ *+' conftest.er1 >conftest.err
31947  rm -f conftest.er1
31948  cat conftest.err >&5
31949  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31950  (exit $ac_status); } && {
31951	 test -z "$ac_cxx_werror_flag" ||
31952	 test ! -s conftest.err
31953       } && test -s conftest$ac_exeext && {
31954	 test "$cross_compiling" = yes ||
31955	 $as_test_x conftest$ac_exeext
31956       }; then
31957  ac_cv_lib_freetype_FT_Init_FreeType=yes
31958else
31959  $as_echo "$as_me: failed program was:" >&5
31960sed 's/^/| /' conftest.$ac_ext >&5
31961
31962	ac_cv_lib_freetype_FT_Init_FreeType=no
31963fi
31964
31965rm -rf conftest.dSYM
31966rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
31967      conftest$ac_exeext conftest.$ac_ext
31968LIBS=$ac_check_lib_save_LIBS
31969fi
31970{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31971$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31972if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then
31973  FREETYPE2_FOUND=true
31974else
31975  { { $as_echo "$as_me:$LINENO: error: Could not find freetype2! $HELP_MSG " >&5
31976$as_echo "$as_me: error: Could not find freetype2! $HELP_MSG " >&2;}
31977   { (exit 1); exit 1; }; }
31978fi
31979
31980            LDFLAGS="$PREV_LDFLAGS"
31981        fi
31982fi
31983
31984
31985
31986
31987
31988
31989
31990
31991
31992###############################################################################
31993#
31994# Check for alsa headers and libraries. Used on Linux/GNU systems.
31995#
31996
31997# Check whether --with-alsa was given.
31998if test "${with_alsa+set}" = set; then
31999  withval=$with_alsa;
32000fi
32001
32002
32003# Check whether --with-alsa-include was given.
32004if test "${with_alsa_include+set}" = set; then
32005  withval=$with_alsa_include;
32006fi
32007
32008
32009# Check whether --with-alsa-lib was given.
32010if test "${with_alsa_lib+set}" = set; then
32011  withval=$with_alsa_lib;
32012fi
32013
32014
32015if test "x$ALSA_NOT_NEEDED" = xyes; then
32016	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
32017		{ $as_echo "$as_me:$LINENO: WARNING: alsa not used, so --with-alsa is ignored" >&5
32018$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
32019	fi
32020	ALSA_CFLAGS=
32021	ALSA_LIBS=
32022else
32023	ALSA_FOUND=no
32024
32025	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
32026	    { { $as_echo "$as_me:$LINENO: error: It is not possible to disable the use of alsa. Remove the --without-alsa option." >&5
32027$as_echo "$as_me: error: It is not possible to disable the use of alsa. Remove the --without-alsa option." >&2;}
32028   { (exit 1); exit 1; }; }
32029	fi
32030
32031	if test "x${with_alsa}" != x; then
32032	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
32033	    ALSA_CFLAGS="-I${with_alsa}/include"
32034	    ALSA_FOUND=yes
32035	fi
32036	if test "x${with_alsa_include}" != x; then
32037	    ALSA_CFLAGS="-I${with_alsa_include}"
32038	    ALSA_FOUND=yes
32039	fi
32040	if test "x${with_alsa_lib}" != x; then
32041	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
32042	    ALSA_FOUND=yes
32043	fi
32044	if test "x$ALSA_FOUND" = xno; then
32045
32046
32047    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
32048        # Source the builddeps file again, to make sure it uses the latest variables!
32049        . $builddepsfile
32050        # Look for a target and build machine specific resource!
32051        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
32052        if test "x$resource" = x; then
32053            # Ok, lets instead look for a target specific resource
32054            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
32055        fi
32056        if test "x$resource" = x; then
32057            # Ok, lets instead look for a build specific resource
32058            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
32059        fi
32060        if test "x$resource" = x; then
32061            # Ok, lets instead look for a generic resource
32062            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
32063            resource=${builddep_alsa}
32064        fi
32065        if test "x$resource" != x; then
32066            { $as_echo "$as_me:$LINENO: Using builddeps $resource for alsa" >&5
32067$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
32068	    # If the resource in the builddeps.conf file is an existing directory,
32069	    # for example /java/linux/cups
32070	    if test -d ${resource}; then
32071	       depdir=${resource}
32072	    else
32073
32074# alsa is for example mymodule
32075# $resource is for example libs/general/libmymod_1_2_3.zip
32076# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
32077# $with_builddeps_dir is for example /localhome/builddeps
32078# depdir is the name of the variable into which we store the depdir, eg MYMOD
32079# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
32080# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
32081    filename=`basename $resource`
32082    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
32083    filebase=${filename%%.*}
32084    extension=${filename#*.}
32085    installdir=$with_builddeps_dir/$filebase
32086    if test ! -f $installdir/$filename.unpacked; then
32087        { $as_echo "$as_me:$LINENO: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
32088$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
32089        if test ! -d $installdir; then
32090            mkdir -p $installdir
32091        fi
32092        if test ! -d $installdir; then
32093            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
32094$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
32095   { (exit 1); exit 1; }; }
32096        fi
32097        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
32098        touch $tmpfile
32099        if test ! -f $tmpfile; then
32100            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
32101$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
32102   { (exit 1); exit 1; }; }
32103        fi
32104
32105    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
32106    # $tmpfile is the local file name for the downloaded file.
32107    VALID_TOOL=no
32108    if test "x$BDEPS_FTP" = xwget; then
32109       VALID_TOOL=yes
32110       wget -O $tmpfile $with_builddeps_server/$resource
32111    fi
32112    if test "x$BDEPS_FTP" = xlftp; then
32113       VALID_TOOL=yes
32114       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
32115    fi
32116    if test "x$BDEPS_FTP" = xftp; then
32117        VALID_TOOL=yes
32118        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
32119        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
32120        FTPUSERPWD=${FTPSERVER%%@*}
32121        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
32122            FTPUSER=${userpwd%%:*}
32123            FTPPWD=${userpwd#*@}
32124            FTPSERVER=${FTPSERVER#*@}
32125        else
32126            FTPUSER=ftp
32127            FTPPWD=ftp
32128        fi
32129        # the "pass" command does not work on some
32130        # ftp clients (read ftp.exe) but if it works,
32131        # passive mode is better!
32132        (\
32133            echo "user $FTPUSER $FTPPWD"        ;\
32134            echo "pass"                         ;\
32135            echo "bin"                          ;\
32136            echo "get $FTPPATH $tmpfile"              ;\
32137        ) | ftp -in $FTPSERVER
32138    fi
32139    if test "x$VALID_TOOL" != xyes; then
32140       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
32141$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
32142   { (exit 1); exit 1; }; }
32143    fi
32144
32145        mv $tmpfile $installdir/$filename
32146        if test ! -s $installdir/$filename; then
32147            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
32148$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
32149   { (exit 1); exit 1; }; }
32150        fi
32151        case "$extension" in
32152            zip)  echo "Unzipping $installdir/$filename..."
32153               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32154            ;;
32155            tar.gz) echo "Untaring $installdir/$filename..."
32156               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32157            ;;
32158            tgz) echo "Untaring $installdir/$filename..."
32159               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32160            ;;
32161            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
32162$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
32163   { (exit 1); exit 1; }; }
32164            ;;
32165        esac
32166    fi
32167    if test -f $installdir/$filename.unpacked; then
32168        depdir=$installdir
32169    fi
32170
32171	    fi
32172            # Source the builddeps file again, because in the previous command, the depdir
32173            # was updated to point at the current build dependency install directory.
32174            . $builddepsfile
32175            # Now extract variables from the builddeps.conf files.
32176            theroot=${builddep_alsa_ROOT}
32177            thecflags=${builddep_alsa_CFLAGS}
32178            thelibs=${builddep_alsa_LIBS}
32179            if test "x$depdir" = x; then
32180                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency alsa" >&5
32181$as_echo "$as_me: error: Could not download build dependency alsa" >&2;}
32182   { (exit 1); exit 1; }; }
32183            fi
32184            ALSA=$depdir
32185            if test "x$theroot" != x; then
32186               ALSA="$theroot"
32187            fi
32188            if test "x$thecflags" != x; then
32189               ALSA_CFLAGS="$thecflags"
32190            fi
32191            if test "x$thelibs" != x; then
32192               ALSA_LIBS="$thelibs"
32193            fi
32194            ALSA_FOUND=yes
32195            else ALSA_FOUND=no
32196
32197        fi
32198        else ALSA_FOUND=no
32199
32200    fi
32201
32202	fi
32203	if test "x$ALSA_FOUND" = xno; then
32204
32205pkg_failed=no
32206{ $as_echo "$as_me:$LINENO: checking for ALSA" >&5
32207$as_echo_n "checking for ALSA... " >&6; }
32208
32209if test -n "$ALSA_CFLAGS"; then
32210    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32211 elif test -n "$PKG_CONFIG"; then
32212    if test -n "$PKG_CONFIG" && \
32213    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&5
32214  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32215  ac_status=$?
32216  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32217  (exit $ac_status); }; then
32218  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32219else
32220  pkg_failed=yes
32221fi
32222 else
32223    pkg_failed=untried
32224fi
32225if test -n "$ALSA_LIBS"; then
32226    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32227 elif test -n "$PKG_CONFIG"; then
32228    if test -n "$PKG_CONFIG" && \
32229    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&5
32230  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32231  ac_status=$?
32232  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32233  (exit $ac_status); }; then
32234  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32235else
32236  pkg_failed=yes
32237fi
32238 else
32239    pkg_failed=untried
32240fi
32241
32242
32243
32244if test $pkg_failed = yes; then
32245
32246if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32247        _pkg_short_errors_supported=yes
32248else
32249        _pkg_short_errors_supported=no
32250fi
32251        if test $_pkg_short_errors_supported = yes; then
32252	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32253        else
32254	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32255        fi
32256	# Put the nasty error message in config.log where it belongs
32257	echo "$ALSA_PKG_ERRORS" >&5
32258
32259	{ $as_echo "$as_me:$LINENO: result: no" >&5
32260$as_echo "no" >&6; }
32261                ALSA_FOUND=no
32262elif test $pkg_failed = untried; then
32263	ALSA_FOUND=no
32264else
32265	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32266	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32267        { $as_echo "$as_me:$LINENO: result: yes" >&5
32268$as_echo "yes" >&6; }
32269	ALSA_FOUND=yes
32270fi
32271	fi
32272	if test "x$ALSA_FOUND" = xno; then
32273
32274for ac_header in alsa/asoundlib.h
32275do
32276as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
32277if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
32278  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
32279$as_echo_n "checking for $ac_header... " >&6; }
32280if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
32281  $as_echo_n "(cached) " >&6
32282fi
32283ac_res=`eval 'as_val=${'$as_ac_Header'}
32284		 $as_echo "$as_val"'`
32285	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
32286$as_echo "$ac_res" >&6; }
32287else
32288  # Is the header compilable?
32289{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
32290$as_echo_n "checking $ac_header usability... " >&6; }
32291cat >conftest.$ac_ext <<_ACEOF
32292/* confdefs.h.  */
32293_ACEOF
32294cat confdefs.h >>conftest.$ac_ext
32295cat >>conftest.$ac_ext <<_ACEOF
32296/* end confdefs.h.  */
32297$ac_includes_default
32298#include <$ac_header>
32299_ACEOF
32300rm -f conftest.$ac_objext
32301if { (ac_try="$ac_compile"
32302case "(($ac_try" in
32303  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32304  *) ac_try_echo=$ac_try;;
32305esac
32306eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32307$as_echo "$ac_try_echo") >&5
32308  (eval "$ac_compile") 2>conftest.er1
32309  ac_status=$?
32310  grep -v '^ *+' conftest.er1 >conftest.err
32311  rm -f conftest.er1
32312  cat conftest.err >&5
32313  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32314  (exit $ac_status); } && {
32315	 test -z "$ac_cxx_werror_flag" ||
32316	 test ! -s conftest.err
32317       } && test -s conftest.$ac_objext; then
32318  ac_header_compiler=yes
32319else
32320  $as_echo "$as_me: failed program was:" >&5
32321sed 's/^/| /' conftest.$ac_ext >&5
32322
32323	ac_header_compiler=no
32324fi
32325
32326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32327{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
32328$as_echo "$ac_header_compiler" >&6; }
32329
32330# Is the header present?
32331{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
32332$as_echo_n "checking $ac_header presence... " >&6; }
32333cat >conftest.$ac_ext <<_ACEOF
32334/* confdefs.h.  */
32335_ACEOF
32336cat confdefs.h >>conftest.$ac_ext
32337cat >>conftest.$ac_ext <<_ACEOF
32338/* end confdefs.h.  */
32339#include <$ac_header>
32340_ACEOF
32341if { (ac_try="$ac_cpp conftest.$ac_ext"
32342case "(($ac_try" in
32343  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32344  *) ac_try_echo=$ac_try;;
32345esac
32346eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32347$as_echo "$ac_try_echo") >&5
32348  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
32349  ac_status=$?
32350  grep -v '^ *+' conftest.er1 >conftest.err
32351  rm -f conftest.er1
32352  cat conftest.err >&5
32353  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32354  (exit $ac_status); } >/dev/null && {
32355	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
32356	 test ! -s conftest.err
32357       }; then
32358  ac_header_preproc=yes
32359else
32360  $as_echo "$as_me: failed program was:" >&5
32361sed 's/^/| /' conftest.$ac_ext >&5
32362
32363  ac_header_preproc=no
32364fi
32365
32366rm -f conftest.err conftest.$ac_ext
32367{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
32368$as_echo "$ac_header_preproc" >&6; }
32369
32370# So?  What about this header?
32371case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
32372  yes:no: )
32373    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
32374$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
32375    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
32376$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
32377    ac_header_preproc=yes
32378    ;;
32379  no:yes:* )
32380    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
32381$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
32382    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
32383$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
32384    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
32385$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
32386    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
32387$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
32388    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
32389$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
32390    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
32391$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
32392    ( cat <<\_ASBOX
32393## ----------------------------------------- ##
32394## Report this to build-dev@openjdk.java.net ##
32395## ----------------------------------------- ##
32396_ASBOX
32397     ) | sed "s/^/$as_me: WARNING:     /" >&2
32398    ;;
32399esac
32400{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
32401$as_echo_n "checking for $ac_header... " >&6; }
32402if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
32403  $as_echo_n "(cached) " >&6
32404else
32405  eval "$as_ac_Header=\$ac_header_preproc"
32406fi
32407ac_res=`eval 'as_val=${'$as_ac_Header'}
32408		 $as_echo "$as_val"'`
32409	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
32410$as_echo "$ac_res" >&6; }
32411
32412fi
32413as_val=`eval 'as_val=${'$as_ac_Header'}
32414		 $as_echo "$as_val"'`
32415   if test "x$as_val" = x""yes; then
32416  cat >>confdefs.h <<_ACEOF
32417#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
32418_ACEOF
32419 ALSA_FOUND=yes
32420	                      ALSA_CFLAGS=-Iignoreme
32421	                      ALSA_LIBS=-lasound
32422	                      DEFAULT_ALSA=yes
32423else
32424  ALSA_FOUND=no
32425fi
32426
32427done
32428
32429	fi
32430	if test "x$ALSA_FOUND" = xno; then
32431
32432    # Print a helpful message on how to acquire the necessary build dependency.
32433    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32434    MISSING_DEPENDENCY=alsa
32435    PKGHANDLER_COMMAND=
32436
32437    case $PKGHANDLER in
32438	apt-get)
32439                apt_help     $MISSING_DEPENDENCY ;;
32440    yum)
32441                yum_help     $MISSING_DEPENDENCY ;;
32442	port)
32443                port_help    $MISSING_DEPENDENCY ;;
32444	pkgutil)
32445                pkgutil_help $MISSING_DEPENDENCY ;;
32446	pkgadd)
32447                pkgadd_help  $MISSING_DEPENDENCY ;;
32448    * )
32449      break ;;
32450    esac
32451
32452    if test "x$PKGHANDLER_COMMAND" != x; then
32453        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32454    fi
32455
32456	    { { $as_echo "$as_me:$LINENO: error: Could not find alsa! $HELP_MSG " >&5
32457$as_echo "$as_me: error: Could not find alsa! $HELP_MSG " >&2;}
32458   { (exit 1); exit 1; }; }
32459	fi
32460fi
32461
32462
32463
32464
32465
32466
32467
32468###############################################################################
32469#
32470# Check for the jpeg library
32471#
32472
32473USE_EXTERNAL_LIBJPEG=true
32474
32475{ $as_echo "$as_me:$LINENO: checking for main in -ljpeg" >&5
32476$as_echo_n "checking for main in -ljpeg... " >&6; }
32477if test "${ac_cv_lib_jpeg_main+set}" = set; then
32478  $as_echo_n "(cached) " >&6
32479else
32480  ac_check_lib_save_LIBS=$LIBS
32481LIBS="-ljpeg  $LIBS"
32482cat >conftest.$ac_ext <<_ACEOF
32483/* confdefs.h.  */
32484_ACEOF
32485cat confdefs.h >>conftest.$ac_ext
32486cat >>conftest.$ac_ext <<_ACEOF
32487/* end confdefs.h.  */
32488
32489
32490int
32491main ()
32492{
32493return main ();
32494  ;
32495  return 0;
32496}
32497_ACEOF
32498rm -f conftest.$ac_objext conftest$ac_exeext
32499if { (ac_try="$ac_link"
32500case "(($ac_try" in
32501  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32502  *) ac_try_echo=$ac_try;;
32503esac
32504eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32505$as_echo "$ac_try_echo") >&5
32506  (eval "$ac_link") 2>conftest.er1
32507  ac_status=$?
32508  grep -v '^ *+' conftest.er1 >conftest.err
32509  rm -f conftest.er1
32510  cat conftest.err >&5
32511  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32512  (exit $ac_status); } && {
32513	 test -z "$ac_cxx_werror_flag" ||
32514	 test ! -s conftest.err
32515       } && test -s conftest$ac_exeext && {
32516	 test "$cross_compiling" = yes ||
32517	 $as_test_x conftest$ac_exeext
32518       }; then
32519  ac_cv_lib_jpeg_main=yes
32520else
32521  $as_echo "$as_me: failed program was:" >&5
32522sed 's/^/| /' conftest.$ac_ext >&5
32523
32524	ac_cv_lib_jpeg_main=no
32525fi
32526
32527rm -rf conftest.dSYM
32528rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32529      conftest$ac_exeext conftest.$ac_ext
32530LIBS=$ac_check_lib_save_LIBS
32531fi
32532{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_main" >&5
32533$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32534if test "x$ac_cv_lib_jpeg_main" = x""yes; then
32535  cat >>confdefs.h <<_ACEOF
32536#define HAVE_LIBJPEG 1
32537_ACEOF
32538
32539  LIBS="-ljpeg $LIBS"
32540
32541else
32542   USE_EXTERNAL_LIBJPEG=false
32543               { $as_echo "$as_me:$LINENO: Will use jpeg decoder bundled with the OpenJDK source" >&5
32544$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32545
32546fi
32547
32548
32549
32550###############################################################################
32551#
32552# Check for the gif library
32553#
32554
32555USE_EXTERNAL_LIBJPEG=true
32556
32557{ $as_echo "$as_me:$LINENO: checking for main in -lgif" >&5
32558$as_echo_n "checking for main in -lgif... " >&6; }
32559if test "${ac_cv_lib_gif_main+set}" = set; then
32560  $as_echo_n "(cached) " >&6
32561else
32562  ac_check_lib_save_LIBS=$LIBS
32563LIBS="-lgif  $LIBS"
32564cat >conftest.$ac_ext <<_ACEOF
32565/* confdefs.h.  */
32566_ACEOF
32567cat confdefs.h >>conftest.$ac_ext
32568cat >>conftest.$ac_ext <<_ACEOF
32569/* end confdefs.h.  */
32570
32571
32572int
32573main ()
32574{
32575return main ();
32576  ;
32577  return 0;
32578}
32579_ACEOF
32580rm -f conftest.$ac_objext conftest$ac_exeext
32581if { (ac_try="$ac_link"
32582case "(($ac_try" in
32583  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32584  *) ac_try_echo=$ac_try;;
32585esac
32586eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32587$as_echo "$ac_try_echo") >&5
32588  (eval "$ac_link") 2>conftest.er1
32589  ac_status=$?
32590  grep -v '^ *+' conftest.er1 >conftest.err
32591  rm -f conftest.er1
32592  cat conftest.err >&5
32593  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32594  (exit $ac_status); } && {
32595	 test -z "$ac_cxx_werror_flag" ||
32596	 test ! -s conftest.err
32597       } && test -s conftest$ac_exeext && {
32598	 test "$cross_compiling" = yes ||
32599	 $as_test_x conftest$ac_exeext
32600       }; then
32601  ac_cv_lib_gif_main=yes
32602else
32603  $as_echo "$as_me: failed program was:" >&5
32604sed 's/^/| /' conftest.$ac_ext >&5
32605
32606	ac_cv_lib_gif_main=no
32607fi
32608
32609rm -rf conftest.dSYM
32610rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32611      conftest$ac_exeext conftest.$ac_ext
32612LIBS=$ac_check_lib_save_LIBS
32613fi
32614{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gif_main" >&5
32615$as_echo "$ac_cv_lib_gif_main" >&6; }
32616if test "x$ac_cv_lib_gif_main" = x""yes; then
32617  cat >>confdefs.h <<_ACEOF
32618#define HAVE_LIBGIF 1
32619_ACEOF
32620
32621  LIBS="-lgif $LIBS"
32622
32623else
32624   USE_EXTERNAL_LIBGIF=false
32625               { $as_echo "$as_me:$LINENO: Will use gif decoder bundled with the OpenJDK source" >&5
32626$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
32627
32628fi
32629
32630
32631
32632###############################################################################
32633#
32634# Check for the zlib library
32635#
32636
32637
32638# Check whether --with-zlib was given.
32639if test "${with_zlib+set}" = set; then
32640  withval=$with_zlib;
32641fi
32642
32643
32644{ $as_echo "$as_me:$LINENO: checking for compress in -lz" >&5
32645$as_echo_n "checking for compress in -lz... " >&6; }
32646if test "${ac_cv_lib_z_compress+set}" = set; then
32647  $as_echo_n "(cached) " >&6
32648else
32649  ac_check_lib_save_LIBS=$LIBS
32650LIBS="-lz  $LIBS"
32651cat >conftest.$ac_ext <<_ACEOF
32652/* confdefs.h.  */
32653_ACEOF
32654cat confdefs.h >>conftest.$ac_ext
32655cat >>conftest.$ac_ext <<_ACEOF
32656/* end confdefs.h.  */
32657
32658/* Override any GCC internal prototype to avoid an error.
32659   Use char because int might match the return type of a GCC
32660   builtin and then its argument prototype would still apply.  */
32661#ifdef __cplusplus
32662extern "C"
32663#endif
32664char compress ();
32665int
32666main ()
32667{
32668return compress ();
32669  ;
32670  return 0;
32671}
32672_ACEOF
32673rm -f conftest.$ac_objext conftest$ac_exeext
32674if { (ac_try="$ac_link"
32675case "(($ac_try" in
32676  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32677  *) ac_try_echo=$ac_try;;
32678esac
32679eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32680$as_echo "$ac_try_echo") >&5
32681  (eval "$ac_link") 2>conftest.er1
32682  ac_status=$?
32683  grep -v '^ *+' conftest.er1 >conftest.err
32684  rm -f conftest.er1
32685  cat conftest.err >&5
32686  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32687  (exit $ac_status); } && {
32688	 test -z "$ac_cxx_werror_flag" ||
32689	 test ! -s conftest.err
32690       } && test -s conftest$ac_exeext && {
32691	 test "$cross_compiling" = yes ||
32692	 $as_test_x conftest$ac_exeext
32693       }; then
32694  ac_cv_lib_z_compress=yes
32695else
32696  $as_echo "$as_me: failed program was:" >&5
32697sed 's/^/| /' conftest.$ac_ext >&5
32698
32699	ac_cv_lib_z_compress=no
32700fi
32701
32702rm -rf conftest.dSYM
32703rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32704      conftest$ac_exeext conftest.$ac_ext
32705LIBS=$ac_check_lib_save_LIBS
32706fi
32707{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5
32708$as_echo "$ac_cv_lib_z_compress" >&6; }
32709if test "x$ac_cv_lib_z_compress" = x""yes; then
32710   ZLIB_FOUND=yes
32711else
32712   ZLIB_FOUND=no
32713fi
32714
32715
32716{ $as_echo "$as_me:$LINENO: checking for which zlib to use" >&5
32717$as_echo_n "checking for which zlib to use... " >&6; }
32718
32719DEFAULT_ZLIB=bundled
32720if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32721#
32722# On macosx default is system...on others default is
32723#
32724    DEFAULT_ZLIB=system
32725fi
32726
32727if test "x${ZLIB_FOUND}" != "xyes"; then
32728#
32729# If we don't find any system...set default to bundled
32730#
32731    DEFAULT_ZLIB=bundled
32732fi
32733
32734#
32735# If user didn't specify, use DEFAULT_ZLIB
32736#
32737if test "x${with_zlib}" = "x"; then
32738    with_zlib=${DEFAULT_ZLIB}
32739fi
32740
32741if test "x${with_zlib}" = "xbundled"; then
32742    USE_EXTERNAL_LIBZ=false
32743    { $as_echo "$as_me:$LINENO: result: bundled" >&5
32744$as_echo "bundled" >&6; }
32745elif test "x${with_zlib}" = "xsystem"; then
32746    if test "x${ZLIB_FOUND}" = "xyes"; then
32747        USE_EXTERNAL_LIBZ=true
32748        { $as_echo "$as_me:$LINENO: result: system" >&5
32749$as_echo "system" >&6; }
32750    else
32751        { $as_echo "$as_me:$LINENO: result: system not found" >&5
32752$as_echo "system not found" >&6; }
32753        { { $as_echo "$as_me:$LINENO: error: --with-zlib=system specified, but no zlib found!" >&5
32754$as_echo "$as_me: error: --with-zlib=system specified, but no zlib found!" >&2;}
32755   { (exit 1); exit 1; }; }
32756    fi
32757else
32758    { { $as_echo "$as_me:$LINENO: error: Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" >&5
32759$as_echo "$as_me: error: Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" >&2;}
32760   { (exit 1); exit 1; }; }
32761fi
32762
32763
32764
32765###############################################################################
32766LIBZIP_CAN_USE_MMAP=true
32767
32768
32769
32770###############################################################################
32771#
32772# Check if altzone exists in time.h
32773#
32774
32775cat >conftest.$ac_ext <<_ACEOF
32776/* confdefs.h.  */
32777_ACEOF
32778cat confdefs.h >>conftest.$ac_ext
32779cat >>conftest.$ac_ext <<_ACEOF
32780/* end confdefs.h.  */
32781#include <time.h>
32782int
32783main ()
32784{
32785return (int)altzone;
32786  ;
32787  return 0;
32788}
32789_ACEOF
32790rm -f conftest.$ac_objext conftest$ac_exeext
32791if { (ac_try="$ac_link"
32792case "(($ac_try" in
32793  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32794  *) ac_try_echo=$ac_try;;
32795esac
32796eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32797$as_echo "$ac_try_echo") >&5
32798  (eval "$ac_link") 2>conftest.er1
32799  ac_status=$?
32800  grep -v '^ *+' conftest.er1 >conftest.err
32801  rm -f conftest.er1
32802  cat conftest.err >&5
32803  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32804  (exit $ac_status); } && {
32805	 test -z "$ac_cxx_werror_flag" ||
32806	 test ! -s conftest.err
32807       } && test -s conftest$ac_exeext && {
32808	 test "$cross_compiling" = yes ||
32809	 $as_test_x conftest$ac_exeext
32810       }; then
32811  has_altzone=yes
32812else
32813  $as_echo "$as_me: failed program was:" >&5
32814sed 's/^/| /' conftest.$ac_ext >&5
32815
32816	has_altzone=no
32817fi
32818
32819rm -rf conftest.dSYM
32820rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32821      conftest$ac_exeext conftest.$ac_ext
32822if test "x$has_altzone" = xyes; then
32823
32824cat >>confdefs.h <<\_ACEOF
32825#define HAVE_ALTZONE 1
32826_ACEOF
32827
32828fi
32829
32830###############################################################################
32831#
32832# Check the maths library
32833#
32834
32835
32836{ $as_echo "$as_me:$LINENO: checking for cos in -lm" >&5
32837$as_echo_n "checking for cos in -lm... " >&6; }
32838if test "${ac_cv_lib_m_cos+set}" = set; then
32839  $as_echo_n "(cached) " >&6
32840else
32841  ac_check_lib_save_LIBS=$LIBS
32842LIBS="-lm  $LIBS"
32843cat >conftest.$ac_ext <<_ACEOF
32844/* confdefs.h.  */
32845_ACEOF
32846cat confdefs.h >>conftest.$ac_ext
32847cat >>conftest.$ac_ext <<_ACEOF
32848/* end confdefs.h.  */
32849
32850/* Override any GCC internal prototype to avoid an error.
32851   Use char because int might match the return type of a GCC
32852   builtin and then its argument prototype would still apply.  */
32853#ifdef __cplusplus
32854extern "C"
32855#endif
32856char cos ();
32857int
32858main ()
32859{
32860return cos ();
32861  ;
32862  return 0;
32863}
32864_ACEOF
32865rm -f conftest.$ac_objext conftest$ac_exeext
32866if { (ac_try="$ac_link"
32867case "(($ac_try" in
32868  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32869  *) ac_try_echo=$ac_try;;
32870esac
32871eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32872$as_echo "$ac_try_echo") >&5
32873  (eval "$ac_link") 2>conftest.er1
32874  ac_status=$?
32875  grep -v '^ *+' conftest.er1 >conftest.err
32876  rm -f conftest.er1
32877  cat conftest.err >&5
32878  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32879  (exit $ac_status); } && {
32880	 test -z "$ac_cxx_werror_flag" ||
32881	 test ! -s conftest.err
32882       } && test -s conftest$ac_exeext && {
32883	 test "$cross_compiling" = yes ||
32884	 $as_test_x conftest$ac_exeext
32885       }; then
32886  ac_cv_lib_m_cos=yes
32887else
32888  $as_echo "$as_me: failed program was:" >&5
32889sed 's/^/| /' conftest.$ac_ext >&5
32890
32891	ac_cv_lib_m_cos=no
32892fi
32893
32894rm -rf conftest.dSYM
32895rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32896      conftest$ac_exeext conftest.$ac_ext
32897LIBS=$ac_check_lib_save_LIBS
32898fi
32899{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5
32900$as_echo "$ac_cv_lib_m_cos" >&6; }
32901if test "x$ac_cv_lib_m_cos" = x""yes; then
32902  cat >>confdefs.h <<_ACEOF
32903#define HAVE_LIBM 1
32904_ACEOF
32905
32906  LIBS="-lm $LIBS"
32907
32908else
32909
32910                  { $as_echo "$as_me:$LINENO: Maths library was not found" >&5
32911$as_echo "$as_me: Maths library was not found" >&6;}
32912
32913fi
32914
32915
32916
32917###############################################################################
32918#
32919# Check for libdl.so
32920
32921save_LIBS="$LIBS"
32922LIBS=""
32923
32924{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
32925$as_echo_n "checking for dlopen in -ldl... " >&6; }
32926if test "${ac_cv_lib_dl_dlopen+set}" = set; then
32927  $as_echo_n "(cached) " >&6
32928else
32929  ac_check_lib_save_LIBS=$LIBS
32930LIBS="-ldl  $LIBS"
32931cat >conftest.$ac_ext <<_ACEOF
32932/* confdefs.h.  */
32933_ACEOF
32934cat confdefs.h >>conftest.$ac_ext
32935cat >>conftest.$ac_ext <<_ACEOF
32936/* end confdefs.h.  */
32937
32938/* Override any GCC internal prototype to avoid an error.
32939   Use char because int might match the return type of a GCC
32940   builtin and then its argument prototype would still apply.  */
32941#ifdef __cplusplus
32942extern "C"
32943#endif
32944char dlopen ();
32945int
32946main ()
32947{
32948return dlopen ();
32949  ;
32950  return 0;
32951}
32952_ACEOF
32953rm -f conftest.$ac_objext conftest$ac_exeext
32954if { (ac_try="$ac_link"
32955case "(($ac_try" in
32956  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32957  *) ac_try_echo=$ac_try;;
32958esac
32959eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32960$as_echo "$ac_try_echo") >&5
32961  (eval "$ac_link") 2>conftest.er1
32962  ac_status=$?
32963  grep -v '^ *+' conftest.er1 >conftest.err
32964  rm -f conftest.er1
32965  cat conftest.err >&5
32966  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32967  (exit $ac_status); } && {
32968	 test -z "$ac_cxx_werror_flag" ||
32969	 test ! -s conftest.err
32970       } && test -s conftest$ac_exeext && {
32971	 test "$cross_compiling" = yes ||
32972	 $as_test_x conftest$ac_exeext
32973       }; then
32974  ac_cv_lib_dl_dlopen=yes
32975else
32976  $as_echo "$as_me: failed program was:" >&5
32977sed 's/^/| /' conftest.$ac_ext >&5
32978
32979	ac_cv_lib_dl_dlopen=no
32980fi
32981
32982rm -rf conftest.dSYM
32983rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32984      conftest$ac_exeext conftest.$ac_ext
32985LIBS=$ac_check_lib_save_LIBS
32986fi
32987{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
32988$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32989if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
32990  cat >>confdefs.h <<_ACEOF
32991#define HAVE_LIBDL 1
32992_ACEOF
32993
32994  LIBS="-ldl $LIBS"
32995
32996fi
32997
32998LIBDL="$LIBS"
32999
33000LIBS="$save_LIBS"
33001
33002
33003
33004###############################################################################
33005#
33006# statically link libstdc++ before C++ ABI is stablized on Linux unless
33007# dynamic build is configured on command line.
33008#
33009# Check whether --enable-static-link-stdc++ was given.
33010if test "${enable_static_link_stdc+++set}" = set; then
33011  enableval=$enable_static_link_stdc++;
33012else
33013
33014		enable_static_link_stdc__=yes
33015
33016fi
33017
33018
33019if test "x$OPENJDK_TARGET_OS" = xlinux; then
33020    # Test if -lstdc++ works.
33021    { $as_echo "$as_me:$LINENO: checking if dynamic link of stdc++ is possible" >&5
33022$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
33023    ac_ext=cpp
33024ac_cpp='$CXXCPP $CPPFLAGS'
33025ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33026ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33027ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33028
33029    OLD_CXXFLAGS="$CXXFLAGS"
33030    CXXFLAGS="$CXXFLAGS -lstdc++"
33031    cat >conftest.$ac_ext <<_ACEOF
33032/* confdefs.h.  */
33033_ACEOF
33034cat confdefs.h >>conftest.$ac_ext
33035cat >>conftest.$ac_ext <<_ACEOF
33036/* end confdefs.h.  */
33037
33038int
33039main ()
33040{
33041return 0;
33042  ;
33043  return 0;
33044}
33045_ACEOF
33046rm -f conftest.$ac_objext conftest$ac_exeext
33047if { (ac_try="$ac_link"
33048case "(($ac_try" in
33049  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33050  *) ac_try_echo=$ac_try;;
33051esac
33052eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
33053$as_echo "$ac_try_echo") >&5
33054  (eval "$ac_link") 2>conftest.er1
33055  ac_status=$?
33056  grep -v '^ *+' conftest.er1 >conftest.err
33057  rm -f conftest.er1
33058  cat conftest.err >&5
33059  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33060  (exit $ac_status); } && {
33061	 test -z "$ac_cxx_werror_flag" ||
33062	 test ! -s conftest.err
33063       } && test -s conftest$ac_exeext && {
33064	 test "$cross_compiling" = yes ||
33065	 $as_test_x conftest$ac_exeext
33066       }; then
33067  has_dynamic_libstdcxx=yes
33068else
33069  $as_echo "$as_me: failed program was:" >&5
33070sed 's/^/| /' conftest.$ac_ext >&5
33071
33072	has_dynamic_libstdcxx=no
33073fi
33074
33075rm -rf conftest.dSYM
33076rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
33077      conftest$ac_exeext conftest.$ac_ext
33078    CXXFLAGS="$OLD_CXXFLAGS"
33079    ac_ext=cpp
33080ac_cpp='$CXXCPP $CPPFLAGS'
33081ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33082ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33083ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33084
33085    { $as_echo "$as_me:$LINENO: result: $has_dynamic_libstdcxx" >&5
33086$as_echo "$has_dynamic_libstdcxx" >&6; }
33087
33088    # Test if stdc++ can be linked statically.
33089    { $as_echo "$as_me:$LINENO: checking if static link of stdc++ is possible" >&5
33090$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
33091    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
33092    ac_ext=cpp
33093ac_cpp='$CXXCPP $CPPFLAGS'
33094ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33095ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33096ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33097
33098    OLD_LIBS="$LIBS"
33099    OLD_CXX="$CXX"
33100    LIBS="$STATIC_STDCXX_FLAGS"
33101    CXX="$CC"
33102    cat >conftest.$ac_ext <<_ACEOF
33103/* confdefs.h.  */
33104_ACEOF
33105cat confdefs.h >>conftest.$ac_ext
33106cat >>conftest.$ac_ext <<_ACEOF
33107/* end confdefs.h.  */
33108
33109int
33110main ()
33111{
33112return 0;
33113  ;
33114  return 0;
33115}
33116_ACEOF
33117rm -f conftest.$ac_objext conftest$ac_exeext
33118if { (ac_try="$ac_link"
33119case "(($ac_try" in
33120  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33121  *) ac_try_echo=$ac_try;;
33122esac
33123eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
33124$as_echo "$ac_try_echo") >&5
33125  (eval "$ac_link") 2>conftest.er1
33126  ac_status=$?
33127  grep -v '^ *+' conftest.er1 >conftest.err
33128  rm -f conftest.er1
33129  cat conftest.err >&5
33130  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33131  (exit $ac_status); } && {
33132	 test -z "$ac_cxx_werror_flag" ||
33133	 test ! -s conftest.err
33134       } && test -s conftest$ac_exeext && {
33135	 test "$cross_compiling" = yes ||
33136	 $as_test_x conftest$ac_exeext
33137       }; then
33138  has_static_libstdcxx=yes
33139else
33140  $as_echo "$as_me: failed program was:" >&5
33141sed 's/^/| /' conftest.$ac_ext >&5
33142
33143	has_static_libstdcxx=no
33144fi
33145
33146rm -rf conftest.dSYM
33147rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
33148      conftest$ac_exeext conftest.$ac_ext
33149    LIBS="$OLD_LIBS"
33150    CXX="$OLD_CXX"
33151    ac_ext=cpp
33152ac_cpp='$CXXCPP $CPPFLAGS'
33153ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33154ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33155ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33156
33157    { $as_echo "$as_me:$LINENO: result: $has_static_libstdcxx" >&5
33158$as_echo "$has_static_libstdcxx" >&6; }
33159
33160    if test "x$has_static_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
33161        { { $as_echo "$as_me:$LINENO: error: I cannot link to stdc++! Neither dynamically nor statically." >&5
33162$as_echo "$as_me: error: I cannot link to stdc++! Neither dynamically nor statically." >&2;}
33163   { (exit 1); exit 1; }; }
33164    fi
33165
33166    if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
33167        { $as_echo "$as_me:$LINENO: Static linking of libstdc++ was not possible reverting to dynamic linking." >&5
33168$as_echo "$as_me: Static linking of libstdc++ was not possible reverting to dynamic linking." >&6;}
33169        enable_static_link_stdc__=no
33170    fi
33171
33172    if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
33173        { $as_echo "$as_me:$LINENO: Dynamic linking of libstdc++ was not possible reverting to static linking." >&5
33174$as_echo "$as_me: Dynamic linking of libstdc++ was not possible reverting to static linking." >&6;}
33175        enable_static_link_stdc__=yes
33176    fi
33177
33178    { $as_echo "$as_me:$LINENO: checking how to link with libstdc++" >&5
33179$as_echo_n "checking how to link with libstdc++... " >&6; }
33180    if test "x$enable_static_link_stdc__" = xyes; then
33181        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
33182        LDCXX="$CC"
33183        STATIC_CXX_SETTING="STATIC_CXX=true"
33184        { $as_echo "$as_me:$LINENO: result: static" >&5
33185$as_echo "static" >&6; }
33186    else
33187        LIBCXX="$LIBCXX -lstdc++"
33188        LDCXX="$CXX"
33189        STATIC_CXX_SETTING="STATIC_CXX=false"
33190        { $as_echo "$as_me:$LINENO: result: dynamic" >&5
33191$as_echo "dynamic" >&6; }
33192    fi
33193fi
33194
33195
33196# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
33197if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
33198    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
33199fi
33200
33201# TODO better (platform agnostic) test
33202if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
33203    LIBCXX="-lstdc++"
33204fi
33205
33206
33207
33208
33209
33210# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
33211
33212# When using cygwin or msys, we need a wrapper binary that renames
33213# /cygdrive/c/ arguments into c:/ arguments and peeks into
33214# @files and rewrites these too! This wrapper binary is
33215# called fixpath.
33216FIXPATH=
33217if test "x$OPENJDK_BUILD_OS" = xwindows; then
33218    { $as_echo "$as_me:$LINENO: checking if fixpath can be created" >&5
33219$as_echo_n "checking if fixpath can be created... " >&6; }
33220    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
33221    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
33222    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
33223      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
33224      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
33225      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
33226      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
33227    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
33228      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
33229      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
33230
33231      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
33232      # @ was chosen as separator to minimize risk of other tools messing around with it
33233      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
33234      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
33235
33236      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
33237    fi
33238    rm -f $OUTPUT_ROOT/fixpath*
33239    cd $OUTPUT_ROOT
33240    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
33241    cd $CURDIR
33242
33243    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
33244        { $as_echo "$as_me:$LINENO: result: no" >&5
33245$as_echo "no" >&6; }
33246        cat $OUTPUT_ROOT/fixpath1.log
33247        { { $as_echo "$as_me:$LINENO: error: Could not create $OUTPUT_ROOT/fixpath.exe" >&5
33248$as_echo "$as_me: error: Could not create $OUTPUT_ROOT/fixpath.exe" >&2;}
33249   { (exit 1); exit 1; }; }
33250    fi
33251    { $as_echo "$as_me:$LINENO: result: yes" >&5
33252$as_echo "yes" >&6; }
33253    { $as_echo "$as_me:$LINENO: checking if fixpath.exe works" >&5
33254$as_echo_n "checking if fixpath.exe works... " >&6; }
33255    cd $OUTPUT_ROOT
33256    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
33257    cd $CURDIR
33258    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
33259        { $as_echo "$as_me:$LINENO: result: no" >&5
33260$as_echo "no" >&6; }
33261        cat $OUTPUT_ROOT/fixpath2.log
33262        { { $as_echo "$as_me:$LINENO: error: fixpath did not work!" >&5
33263$as_echo "$as_me: error: fixpath did not work!" >&2;}
33264   { (exit 1); exit 1; }; }
33265    fi
33266    { $as_echo "$as_me:$LINENO: result: yes" >&5
33267$as_echo "yes" >&6; }
33268    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
33269fi
33270
33271
33272
33273
33274###############################################################################
33275#
33276# We need to do some final tweaking, when everything else is done.
33277#
33278###############################################################################
33279
33280
33281HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
33282
33283
33284# The name of the Service Agent jar.
33285SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
33286if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
33287    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
33288fi
33289
33290
33291
33292
33293###############################################################################
33294#
33295# Configure parts of the build that only affect the build performance,
33296# not the result.
33297#
33298###############################################################################
33299
33300
33301# How many cores do we have on this build system?
33302
33303# Check whether --with-num-cores was given.
33304if test "${with_num_cores+set}" = set; then
33305  withval=$with_num_cores;
33306fi
33307
33308if test "x$with_num_cores" = x; then
33309    # The number of cores were not specified, try to probe them.
33310
33311    { $as_echo "$as_me:$LINENO: checking for number of cores" >&5
33312$as_echo_n "checking for number of cores... " >&6; }
33313    NUM_CORES=1
33314    FOUND_CORES=no
33315
33316    if test -f /proc/cpuinfo; then
33317        # Looks like a Linux (or cygwin) system
33318        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
33319        FOUND_CORES=yes
33320    elif test -x /usr/sbin/psrinfo; then
33321        # Looks like a Solaris system
33322        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
33323        FOUND_CORES=yes
33324    elif test -x /usr/sbin/system_profiler; then
33325        # Looks like a MacOSX system
33326        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
33327        FOUND_CORES=yes
33328    elif test -n "$NUMBER_OF_PROCESSORS"; then
33329        # On windows, look in the env
33330        NUM_CORES=$NUMBER_OF_PROCESSORS
33331        FOUND_CORES=yes
33332    fi
33333
33334    # For c/c++ code we run twice as many concurrent build
33335    # jobs than we have cores, otherwise we will stall on io.
33336    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
33337
33338    if test "x$FOUND_CORES" = xyes; then
33339        { $as_echo "$as_me:$LINENO: result: $NUM_CORES" >&5
33340$as_echo "$NUM_CORES" >&6; }
33341    else
33342        { $as_echo "$as_me:$LINENO: result: could not detect number of cores, defaulting to 1" >&5
33343$as_echo "could not detect number of cores, defaulting to 1" >&6; }
33344        { $as_echo "$as_me:$LINENO: WARNING: This will disable all parallelism from build!" >&5
33345$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
33346    fi
33347
33348
33349else
33350    NUM_CORES=$with_num_cores
33351    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
33352fi
33353
33354
33355
33356
33357# How much memory do we have on this build system?
33358
33359# Check whether --with-memory-size was given.
33360if test "${with_memory_size+set}" = set; then
33361  withval=$with_memory_size;
33362fi
33363
33364if test "x$with_memory_size" = x; then
33365    # The memory size was not specified, try to probe it.
33366
33367    { $as_echo "$as_me:$LINENO: checking for memory size" >&5
33368$as_echo_n "checking for memory size... " >&6; }
33369    # Default to 1024 MB
33370    MEMORY_SIZE=1024
33371    FOUND_MEM=no
33372
33373    if test -f /proc/meminfo; then
33374        # Looks like a Linux (or cygwin) system
33375        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33376        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33377        FOUND_MEM=yes
33378    elif test -x /usr/sbin/prtconf; then
33379        # Looks like a Solaris system
33380        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33381        FOUND_MEM=yes
33382    elif test -x /usr/sbin/system_profiler; then
33383        # Looks like a MacOSX system
33384        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33385        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33386        FOUND_MEM=yes
33387    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33388        # Windows, but without cygwin
33389        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33390        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33391        FOUND_MEM=yes
33392    fi
33393
33394    if test "x$FOUND_MEM" = xyes; then
33395        { $as_echo "$as_me:$LINENO: result: $MEMORY_SIZE MB" >&5
33396$as_echo "$MEMORY_SIZE MB" >&6; }
33397    else
33398        { $as_echo "$as_me:$LINENO: result: could not detect memory size, defaulting to 1024 MB" >&5
33399$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33400        { $as_echo "$as_me:$LINENO: WARNING: This might seriously impact build performance!" >&5
33401$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33402    fi
33403
33404else
33405    MEMORY_SIZE=$with_memory_size
33406fi
33407
33408
33409
33410# Setup smart javac (after cores and memory have been setup)
33411
33412
33413# Check whether --with-sjavac-server-java was given.
33414if test "${with_sjavac_server_java+set}" = set; then
33415  withval=$with_sjavac_server_java;
33416fi
33417
33418
33419if test "x$with_sjavac_server_java" != x; then
33420    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33421    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33422    if test "x$FOUND_VERSION" = x; then
33423        { { $as_echo "$as_me:$LINENO: error: Could not execute server java: $SJAVAC_SERVER_JAVA" >&5
33424$as_echo "$as_me: error: Could not execute server java: $SJAVAC_SERVER_JAVA" >&2;}
33425   { (exit 1); exit 1; }; }
33426    fi
33427else
33428    SJAVAC_SERVER_JAVA=""
33429    # Hotspot specific options.
33430
33431    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
33432    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
33433    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
33434    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
33435    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33436        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33437    fi
33438
33439    # JRockit specific options.
33440
33441    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
33442    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
33443    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
33444    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
33445    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33446        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33447    fi
33448
33449    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33450fi
33451
33452
33453
33454# Check whether --with-sjavac-server-cores was given.
33455if test "${with_sjavac_server_cores+set}" = set; then
33456  withval=$with_sjavac_server_cores;
33457fi
33458
33459if test "x$with_sjavac_server_cores" != x; then
33460    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
33461else
33462    if test "$NUM_CORES" -gt 16; then
33463        # We set this arbitrary limit because we want to limit the heap
33464        # size of the javac server.
33465        # In the future we will make the javac compilers in the server
33466        # share more and more state, thus enabling us to use more and
33467        # more concurrent threads in the server.
33468        SJAVAC_SERVER_CORES="16"
33469    else
33470        SJAVAC_SERVER_CORES="$NUM_CORES"
33471    fi
33472
33473    if test "$MEMORY_SIZE" -gt "17000"; then
33474        MAX_HEAP_MEM=10000
33475
33476    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33477    # If so, then append -d64 to SJAVAC_SERVER_JAVA
33478    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
33479    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
33480    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33481        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33482    fi
33483
33484
33485    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33486    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
33487    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
33488    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
33489    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33490        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33491    fi
33492
33493    elif test "$MEMORY_SIZE" -gt "10000"; then
33494        MAX_HEAP_MEM=6000
33495
33496    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33497    # If so, then append -d64 to SJAVAC_SERVER_JAVA
33498    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
33499    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
33500    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33501        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33502    fi
33503
33504
33505    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33506    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
33507    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
33508    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
33509    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33510        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33511    fi
33512
33513    elif test "$MEMORY_SIZE" -gt "5000"; then
33514        MAX_HEAP_MEM=3000
33515
33516    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33517    # If so, then append -d64 to SJAVAC_SERVER_JAVA
33518    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
33519    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
33520    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33521        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33522    fi
33523
33524
33525    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33526    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
33527    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
33528    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
33529    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33530        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33531    fi
33532
33533    elif test "$MEMORY_SIZE" -gt "3800"; then
33534        MAX_HEAP_MEM=2500
33535
33536    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33537    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
33538    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
33539    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
33540    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33541        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33542    fi
33543
33544    elif test "$MEMORY_SIZE" -gt "1900"; then
33545        MAX_HEAP_MEM=1200
33546
33547    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33548    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
33549    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
33550    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
33551    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33552        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
33553    fi
33554
33555    elif test "$MEMORY_SIZE" -gt "1000"; then
33556        MAX_HEAP_MEM=900
33557
33558    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33559    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
33560    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
33561    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
33562    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33563        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33564    fi
33565
33566    else
33567        MAX_HEAP_MEM=512
33568
33569    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33570    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
33571    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
33572    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
33573    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33574        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33575    fi
33576
33577    fi
33578
33579
33580    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33581    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
33582    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
33583    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
33584    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33585        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
33586    fi
33587
33588
33589    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33590    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
33591    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
33592    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
33593    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33594        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
33595    fi
33596
33597
33598    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33599    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
33600    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
33601    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
33602    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33603        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
33604    fi
33605
33606
33607    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
33608    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
33609        { $as_echo "$as_me:$LINENO: checking if number of server cores must be reduced" >&5
33610$as_echo_n "checking if number of server cores must be reduced... " >&6; }
33611        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
33612        { $as_echo "$as_me:$LINENO: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
33613$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
33614    fi
33615fi
33616
33617
33618{ $as_echo "$as_me:$LINENO: checking whether to use sjavac" >&5
33619$as_echo_n "checking whether to use sjavac... " >&6; }
33620# Check whether --enable-sjavac was given.
33621if test "${enable_sjavac+set}" = set; then
33622  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33623else
33624  ENABLE_SJAVAC='no'
33625fi
33626
33627{ $as_echo "$as_me:$LINENO: result: $ENABLE_SJAVAC" >&5
33628$as_echo "$ENABLE_SJAVAC" >&6; }
33629
33630
33631if test "x$ENABLE_SJAVAC" = xyes; then
33632    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33633else
33634    SJAVAC_SERVER_DIR=
33635fi
33636
33637
33638
33639
33640# Can the C/C++ compiler use precompiled headers?
33641
33642
33643###############################################################################
33644#
33645# Can the C/C++ compiler use precompiled headers?
33646#
33647# Check whether --enable-precompiled-headers was given.
33648if test "${enable_precompiled_headers+set}" = set; then
33649  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled-headers}
33650else
33651  ENABLE_PRECOMPH=yes
33652fi
33653
33654
33655USE_PRECOMPILED_HEADER=1
33656if test "x$ENABLE_PRECOMPH" = xno; then
33657    USE_PRECOMPILED_HEADER=0
33658fi
33659
33660if test "x$ENABLE_PRECOMPH" = xyes; then
33661    # Check that the compiler actually supports precomp headers.
33662    if test "x$GCC" = xyes; then
33663         { $as_echo "$as_me:$LINENO: checking that precompiled headers work" >&5
33664$as_echo_n "checking that precompiled headers work... " >&6; }
33665         echo "int alfa();" > conftest.h
33666         $CXX -x c++-header conftest.h -o conftest.hpp.gch
33667         if test ! -f conftest.hpp.gch; then
33668             echo Precompiled header is not working!
33669             USE_PRECOMPILED_HEADER=0
33670             { $as_echo "$as_me:$LINENO: result: no" >&5
33671$as_echo "no" >&6; }
33672         else
33673             { $as_echo "$as_me:$LINENO: result: yes" >&5
33674$as_echo "yes" >&6; }
33675         fi
33676         rm -f conftest.h
33677    fi
33678fi
33679
33680
33681
33682
33683# Setup use of ccache, if available
33684
33685    # Check whether --enable-ccache was given.
33686if test "${enable_ccache+set}" = set; then
33687  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33688else
33689  ENABLE_CCACHE=yes
33690fi
33691
33692    if test "x$ENABLE_CCACHE" = xyes; then
33693        # Extract the first word of "ccache", so it can be a program name with args.
33694set dummy ccache; ac_word=$2
33695{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
33696$as_echo_n "checking for $ac_word... " >&6; }
33697if test "${ac_cv_path_CCACHE+set}" = set; then
33698  $as_echo_n "(cached) " >&6
33699else
33700  case $CCACHE in
33701  [\\/]* | ?:[\\/]*)
33702  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33703  ;;
33704  *)
33705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33706for as_dir in $PATH
33707do
33708  IFS=$as_save_IFS
33709  test -z "$as_dir" && as_dir=.
33710  for ac_exec_ext in '' $ac_executable_extensions; do
33711  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33712    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33713    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
33714    break 2
33715  fi
33716done
33717done
33718IFS=$as_save_IFS
33719
33720  ;;
33721esac
33722fi
33723CCACHE=$ac_cv_path_CCACHE
33724if test -n "$CCACHE"; then
33725  { $as_echo "$as_me:$LINENO: result: $CCACHE" >&5
33726$as_echo "$CCACHE" >&6; }
33727else
33728  { $as_echo "$as_me:$LINENO: result: no" >&5
33729$as_echo "no" >&6; }
33730fi
33731
33732
33733    else
33734        { $as_echo "$as_me:$LINENO: checking for ccache" >&5
33735$as_echo_n "checking for ccache... " >&6; }
33736        { $as_echo "$as_me:$LINENO: result: explicitly disabled" >&5
33737$as_echo "explicitly disabled" >&6; }
33738        CCACHE=
33739    fi
33740
33741
33742
33743# Check whether --with-ccache-dir was given.
33744if test "${with_ccache_dir+set}" = set; then
33745  withval=$with_ccache_dir;
33746fi
33747
33748
33749    if test "x$with_ccache_dir" != x; then
33750        # When using a non home ccache directory, assume the use is to share ccache files
33751        # with other users. Thus change the umask.
33752        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33753    fi
33754    CCACHE_FOUND=""
33755    if test "x$CCACHE" != x; then
33756
33757    if test "x$CCACHE" != x; then
33758        CCACHE_FOUND="true"
33759        # Only use ccache if it is 3.1.4 or later, which supports
33760        # precompiled headers.
33761        { $as_echo "$as_me:$LINENO: checking if ccache supports precompiled headers" >&5
33762$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33763        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33764        if test "x$HAS_GOOD_CCACHE" = x; then
33765            { $as_echo "$as_me:$LINENO: result: no, disabling ccache" >&5
33766$as_echo "no, disabling ccache" >&6; }
33767            CCACHE=
33768        else
33769            { $as_echo "$as_me:$LINENO: result: yes" >&5
33770$as_echo "yes" >&6; }
33771            { $as_echo "$as_me:$LINENO: checking if C-compiler supports ccache precompiled headers" >&5
33772$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33773            PUSHED_FLAGS="$CXXFLAGS"
33774            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33775            cat >conftest.$ac_ext <<_ACEOF
33776/* confdefs.h.  */
33777_ACEOF
33778cat confdefs.h >>conftest.$ac_ext
33779cat >>conftest.$ac_ext <<_ACEOF
33780/* end confdefs.h.  */
33781
33782int
33783main ()
33784{
33785
33786  ;
33787  return 0;
33788}
33789_ACEOF
33790rm -f conftest.$ac_objext
33791if { (ac_try="$ac_compile"
33792case "(($ac_try" in
33793  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33794  *) ac_try_echo=$ac_try;;
33795esac
33796eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
33797$as_echo "$ac_try_echo") >&5
33798  (eval "$ac_compile") 2>conftest.er1
33799  ac_status=$?
33800  grep -v '^ *+' conftest.er1 >conftest.err
33801  rm -f conftest.er1
33802  cat conftest.err >&5
33803  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33804  (exit $ac_status); } && {
33805	 test -z "$ac_cxx_werror_flag" ||
33806	 test ! -s conftest.err
33807       } && test -s conftest.$ac_objext; then
33808  CC_KNOWS_CCACHE_TRICK=yes
33809else
33810  $as_echo "$as_me: failed program was:" >&5
33811sed 's/^/| /' conftest.$ac_ext >&5
33812
33813	CC_KNOWS_CCACHE_TRICK=no
33814fi
33815
33816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33817            CXXFLAGS="$PUSHED_FLAGS"
33818            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33819                { $as_echo "$as_me:$LINENO: result: yes" >&5
33820$as_echo "yes" >&6; }
33821            else
33822                { $as_echo "$as_me:$LINENO: result: no, disabling ccaching of precompiled headers" >&5
33823$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33824                CCACHE=
33825            fi
33826        fi
33827    fi
33828
33829    if test "x$CCACHE" != x; then
33830        CCACHE_SLOPPINESS=time_macros
33831        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33832        CCACHE_FLAGS=-fpch-preprocess
33833
33834        if test "x$SET_CCACHE_DIR" != x; then
33835            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33836	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33837        fi
33838    fi
33839
33840    fi
33841
33842
33843###############################################################################
33844#
33845# And now the finish...
33846#
33847###############################################################################
33848
33849# Check for some common pitfalls
33850
33851
33852{ $as_echo "$as_me:$LINENO: checking if build directory is on local disk" >&5
33853$as_echo_n "checking if build directory is on local disk... " >&6; }
33854
33855	# df -l lists only local disks; if the given directory is not found then
33856	# a non-zero exit code is given
33857  if test "x$DF" = x; then
33858    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33859      # msys does not have df; use Windows "net use" instead.
33860      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33861      if test "x$IS_NETWORK_DISK" = x; then
33862        OUTPUT_DIR_IS_LOCAL="yes"
33863      else
33864        OUTPUT_DIR_IS_LOCAL="no"
33865      fi
33866    else
33867      # No df here, say it's local
33868      OUTPUT_DIR_IS_LOCAL="yes"
33869    fi
33870  else
33871    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33872      OUTPUT_DIR_IS_LOCAL="yes"
33873    else
33874      OUTPUT_DIR_IS_LOCAL="no"
33875    fi
33876  fi
33877
33878{ $as_echo "$as_me:$LINENO: result: $OUTPUT_DIR_IS_LOCAL" >&5
33879$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33880
33881# Check if the user has any old-style ALT_ variables set.
33882FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33883
33884# Before generating output files, test if they exist. If they do, this is a reconfigure.
33885# Since we can't properly handle the dependencies for this, warn the user about the situation
33886if test -e $OUTPUT_ROOT/spec.gmk; then
33887  IS_RECONFIGURE=yes
33888else
33889  IS_RECONFIGURE=no
33890fi
33891
33892if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33893  HIDE_PERFORMANCE_HINTS=yes
33894else
33895  HIDE_PERFORMANCE_HINTS=no
33896  # Hide it the next time around...
33897  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33898fi
33899
33900
33901
33902# At the end, call the custom hook. (Dummy macro if no custom sources available)
33903
33904
33905# We're messing a bit with internal autoconf variables to put the config.status
33906# in the output directory instead of the current directory.
33907CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33908# Create the actual output files. Now the main work of configure is done.
33909cat >confcache <<\_ACEOF
33910# This file is a shell script that caches the results of configure
33911# tests run on this system so they can be shared between configure
33912# scripts and configure runs, see configure's option --config-cache.
33913# It is not useful on other systems.  If it contains results you don't
33914# want to keep, you may remove or edit it.
33915#
33916# config.status only pays attention to the cache file if you give it
33917# the --recheck option to rerun configure.
33918#
33919# `ac_cv_env_foo' variables (set or unset) will be overridden when
33920# loading this file, other *unset* `ac_cv_foo' will be assigned the
33921# following values.
33922
33923_ACEOF
33924
33925# The following way of writing the cache mishandles newlines in values,
33926# but we know of no workaround that is simple, portable, and efficient.
33927# So, we kill variables containing newlines.
33928# Ultrix sh set writes to stderr and can't be redirected directly,
33929# and sets the high bit in the cache file unless we assign to the vars.
33930(
33931  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33932    eval ac_val=\$$ac_var
33933    case $ac_val in #(
33934    *${as_nl}*)
33935      case $ac_var in #(
33936      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
33937$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33938      esac
33939      case $ac_var in #(
33940      _ | IFS | as_nl) ;; #(
33941      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33942      *) $as_unset $ac_var ;;
33943      esac ;;
33944    esac
33945  done
33946
33947  (set) 2>&1 |
33948    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33949    *${as_nl}ac_space=\ *)
33950      # `set' does not quote correctly, so add quotes (double-quote
33951      # substitution turns \\\\ into \\, and sed turns \\ into \).
33952      sed -n \
33953	"s/'/'\\\\''/g;
33954	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33955      ;; #(
33956    *)
33957      # `set' quotes correctly as required by POSIX, so do not add quotes.
33958      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33959      ;;
33960    esac |
33961    sort
33962) |
33963  sed '
33964     /^ac_cv_env_/b end
33965     t clear
33966     :clear
33967     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33968     t end
33969     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33970     :end' >>confcache
33971if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33972  if test -w "$cache_file"; then
33973    test "x$cache_file" != "x/dev/null" &&
33974      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
33975$as_echo "$as_me: updating cache $cache_file" >&6;}
33976    cat confcache >$cache_file
33977  else
33978    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
33979$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33980  fi
33981fi
33982rm -f confcache
33983
33984test "x$prefix" = xNONE && prefix=$ac_default_prefix
33985# Let make expand exec_prefix.
33986test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33987
33988DEFS=-DHAVE_CONFIG_H
33989
33990ac_libobjs=
33991ac_ltlibobjs=
33992for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33993  # 1. Remove the extension, and $U if already installed.
33994  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33995  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33996  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33997  #    will be set to the directory where LIBOBJS objects are built.
33998  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33999  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
34000done
34001LIBOBJS=$ac_libobjs
34002
34003LTLIBOBJS=$ac_ltlibobjs
34004
34005
34006
34007: ${CONFIG_STATUS=./config.status}
34008ac_write_fail=0
34009ac_clean_files_save=$ac_clean_files
34010ac_clean_files="$ac_clean_files $CONFIG_STATUS"
34011{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
34012$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
34013cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34014#! $SHELL
34015# Generated by $as_me.
34016# Run this file to recreate the current configuration.
34017# Compiler output produced by configure, useful for debugging
34018# configure, is in config.log if it exists.
34019
34020debug=false
34021ac_cs_recheck=false
34022ac_cs_silent=false
34023SHELL=\${CONFIG_SHELL-$SHELL}
34024_ACEOF
34025
34026cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34027## --------------------- ##
34028## M4sh Initialization.  ##
34029## --------------------- ##
34030
34031# Be more Bourne compatible
34032DUALCASE=1; export DUALCASE # for MKS sh
34033if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
34034  emulate sh
34035  NULLCMD=:
34036  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
34037  # is contrary to our usage.  Disable this feature.
34038  alias -g '${1+"$@"}'='"$@"'
34039  setopt NO_GLOB_SUBST
34040else
34041  case `(set -o) 2>/dev/null` in
34042  *posix*) set -o posix ;;
34043esac
34044
34045fi
34046
34047
34048
34049
34050# PATH needs CR
34051# Avoid depending upon Character Ranges.
34052as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34053as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34054as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34055as_cr_digits='0123456789'
34056as_cr_alnum=$as_cr_Letters$as_cr_digits
34057
34058as_nl='
34059'
34060export as_nl
34061# Printing a long string crashes Solaris 7 /usr/bin/printf.
34062as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
34063as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
34064as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
34065if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
34066  as_echo='printf %s\n'
34067  as_echo_n='printf %s'
34068else
34069  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
34070    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
34071    as_echo_n='/usr/ucb/echo -n'
34072  else
34073    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
34074    as_echo_n_body='eval
34075      arg=$1;
34076      case $arg in
34077      *"$as_nl"*)
34078	expr "X$arg" : "X\\(.*\\)$as_nl";
34079	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
34080      esac;
34081      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
34082    '
34083    export as_echo_n_body
34084    as_echo_n='sh -c $as_echo_n_body as_echo'
34085  fi
34086  export as_echo_body
34087  as_echo='sh -c $as_echo_body as_echo'
34088fi
34089
34090# The user is always right.
34091if test "${PATH_SEPARATOR+set}" != set; then
34092  PATH_SEPARATOR=:
34093  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
34094    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
34095      PATH_SEPARATOR=';'
34096  }
34097fi
34098
34099# Support unset when possible.
34100if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
34101  as_unset=unset
34102else
34103  as_unset=false
34104fi
34105
34106
34107# IFS
34108# We need space, tab and new line, in precisely that order.  Quoting is
34109# there to prevent editors from complaining about space-tab.
34110# (If _AS_PATH_WALK were called with IFS unset, it would disable word
34111# splitting by setting IFS to empty value.)
34112IFS=" ""	$as_nl"
34113
34114# Find who we are.  Look in the path if we contain no directory separator.
34115case $0 in
34116  *[\\/]* ) as_myself=$0 ;;
34117  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34118for as_dir in $PATH
34119do
34120  IFS=$as_save_IFS
34121  test -z "$as_dir" && as_dir=.
34122  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
34123done
34124IFS=$as_save_IFS
34125
34126     ;;
34127esac
34128# We did not find ourselves, most probably we were run as `sh COMMAND'
34129# in which case we are not to be found in the path.
34130if test "x$as_myself" = x; then
34131  as_myself=$0
34132fi
34133if test ! -f "$as_myself"; then
34134  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
34135  { (exit 1); exit 1; }
34136fi
34137
34138# Work around bugs in pre-3.0 UWIN ksh.
34139for as_var in ENV MAIL MAILPATH
34140do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
34141done
34142PS1='$ '
34143PS2='> '
34144PS4='+ '
34145
34146# NLS nuisances.
34147LC_ALL=C
34148export LC_ALL
34149LANGUAGE=C
34150export LANGUAGE
34151
34152# Required to use basename.
34153if expr a : '\(a\)' >/dev/null 2>&1 &&
34154   test "X`expr 00001 : '.*\(...\)'`" = X001; then
34155  as_expr=expr
34156else
34157  as_expr=false
34158fi
34159
34160if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
34161  as_basename=basename
34162else
34163  as_basename=false
34164fi
34165
34166
34167# Name of the executable.
34168as_me=`$as_basename -- "$0" ||
34169$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34170	 X"$0" : 'X\(//\)$' \| \
34171	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
34172$as_echo X/"$0" |
34173    sed '/^.*\/\([^/][^/]*\)\/*$/{
34174	    s//\1/
34175	    q
34176	  }
34177	  /^X\/\(\/\/\)$/{
34178	    s//\1/
34179	    q
34180	  }
34181	  /^X\/\(\/\).*/{
34182	    s//\1/
34183	    q
34184	  }
34185	  s/.*/./; q'`
34186
34187# CDPATH.
34188$as_unset CDPATH
34189
34190
34191
34192  as_lineno_1=$LINENO
34193  as_lineno_2=$LINENO
34194  test "x$as_lineno_1" != "x$as_lineno_2" &&
34195  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
34196
34197  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
34198  # uniformly replaced by the line number.  The first 'sed' inserts a
34199  # line-number line after each line using $LINENO; the second 'sed'
34200  # does the real work.  The second script uses 'N' to pair each
34201  # line-number line with the line containing $LINENO, and appends
34202  # trailing '-' during substitution so that $LINENO is not a special
34203  # case at line end.
34204  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
34205  # scripts with optimization help from Paolo Bonzini.  Blame Lee
34206  # E. McMahon (1931-1989) for sed's syntax.  :-)
34207  sed -n '
34208    p
34209    /[$]LINENO/=
34210  ' <$as_myself |
34211    sed '
34212      s/[$]LINENO.*/&-/
34213      t lineno
34214      b
34215      :lineno
34216      N
34217      :loop
34218      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
34219      t loop
34220      s/-\n.*//
34221    ' >$as_me.lineno &&
34222  chmod +x "$as_me.lineno" ||
34223    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
34224   { (exit 1); exit 1; }; }
34225
34226  # Don't try to exec as it changes $[0], causing all sort of problems
34227  # (the dirname of $[0] is not the place where we might find the
34228  # original and so on.  Autoconf is especially sensitive to this).
34229  . "./$as_me.lineno"
34230  # Exit status is that of the last command.
34231  exit
34232}
34233
34234
34235if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
34236  as_dirname=dirname
34237else
34238  as_dirname=false
34239fi
34240
34241ECHO_C= ECHO_N= ECHO_T=
34242case `echo -n x` in
34243-n*)
34244  case `echo 'x\c'` in
34245  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
34246  *)   ECHO_C='\c';;
34247  esac;;
34248*)
34249  ECHO_N='-n';;
34250esac
34251if expr a : '\(a\)' >/dev/null 2>&1 &&
34252   test "X`expr 00001 : '.*\(...\)'`" = X001; then
34253  as_expr=expr
34254else
34255  as_expr=false
34256fi
34257
34258rm -f conf$$ conf$$.exe conf$$.file
34259if test -d conf$$.dir; then
34260  rm -f conf$$.dir/conf$$.file
34261else
34262  rm -f conf$$.dir
34263  mkdir conf$$.dir 2>/dev/null
34264fi
34265if (echo >conf$$.file) 2>/dev/null; then
34266  if ln -s conf$$.file conf$$ 2>/dev/null; then
34267    as_ln_s='ln -s'
34268    # ... but there are two gotchas:
34269    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34270    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34271    # In both cases, we have to default to `cp -p'.
34272    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34273      as_ln_s='cp -p'
34274  elif ln conf$$.file conf$$ 2>/dev/null; then
34275    as_ln_s=ln
34276  else
34277    as_ln_s='cp -p'
34278  fi
34279else
34280  as_ln_s='cp -p'
34281fi
34282rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34283rmdir conf$$.dir 2>/dev/null
34284
34285if mkdir -p . 2>/dev/null; then
34286  as_mkdir_p=:
34287else
34288  test -d ./-p && rmdir ./-p
34289  as_mkdir_p=false
34290fi
34291
34292if test -x / >/dev/null 2>&1; then
34293  as_test_x='test -x'
34294else
34295  if ls -dL / >/dev/null 2>&1; then
34296    as_ls_L_option=L
34297  else
34298    as_ls_L_option=
34299  fi
34300  as_test_x='
34301    eval sh -c '\''
34302      if test -d "$1"; then
34303	test -d "$1/.";
34304      else
34305	case $1 in
34306	-*)set "./$1";;
34307	esac;
34308	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
34309	???[sx]*):;;*)false;;esac;fi
34310    '\'' sh
34311  '
34312fi
34313as_executable_p=$as_test_x
34314
34315# Sed expression to map a string onto a valid CPP name.
34316as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34317
34318# Sed expression to map a string onto a valid variable name.
34319as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34320
34321
34322exec 6>&1
34323
34324# Save the log message, to keep $[0] and so on meaningful, and to
34325# report actual input values of CONFIG_FILES etc. instead of their
34326# values after options handling.
34327ac_log="
34328This file was extended by OpenJDK $as_me jdk8, which was
34329generated by GNU Autoconf 2.63.  Invocation command line was
34330
34331  CONFIG_FILES    = $CONFIG_FILES
34332  CONFIG_HEADERS  = $CONFIG_HEADERS
34333  CONFIG_LINKS    = $CONFIG_LINKS
34334  CONFIG_COMMANDS = $CONFIG_COMMANDS
34335  $ $0 $@
34336
34337on `(hostname || uname -n) 2>/dev/null | sed 1q`
34338"
34339
34340_ACEOF
34341
34342case $ac_config_files in *"
34343"*) set x $ac_config_files; shift; ac_config_files=$*;;
34344esac
34345
34346case $ac_config_headers in *"
34347"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34348esac
34349
34350
34351cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34352# Files that config.status was made for.
34353config_files="$ac_config_files"
34354config_headers="$ac_config_headers"
34355
34356_ACEOF
34357
34358cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34359ac_cs_usage="\
34360\`$as_me' instantiates files from templates according to the
34361current configuration.
34362
34363Usage: $0 [OPTION]... [FILE]...
34364
34365  -h, --help       print this help, then exit
34366  -V, --version    print version number and configuration settings, then exit
34367  -q, --quiet, --silent
34368                   do not print progress messages
34369  -d, --debug      don't remove temporary files
34370      --recheck    update $as_me by reconfiguring in the same conditions
34371      --file=FILE[:TEMPLATE]
34372                   instantiate the configuration file FILE
34373      --header=FILE[:TEMPLATE]
34374                   instantiate the configuration header FILE
34375
34376Configuration files:
34377$config_files
34378
34379Configuration headers:
34380$config_headers
34381
34382Report bugs to <bug-autoconf@gnu.org>."
34383
34384_ACEOF
34385cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34386ac_cs_version="\\
34387OpenJDK config.status jdk8
34388configured by $0, generated by GNU Autoconf 2.63,
34389  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
34390
34391Copyright (C) 2008 Free Software Foundation, Inc.
34392This config.status script is free software; the Free Software Foundation
34393gives unlimited permission to copy, distribute and modify it."
34394
34395ac_pwd='$ac_pwd'
34396srcdir='$srcdir'
34397AWK='$AWK'
34398test -n "\$AWK" || AWK=awk
34399_ACEOF
34400
34401cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34402# The default lists apply if the user does not specify any file.
34403ac_need_defaults=:
34404while test $# != 0
34405do
34406  case $1 in
34407  --*=*)
34408    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34409    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34410    ac_shift=:
34411    ;;
34412  *)
34413    ac_option=$1
34414    ac_optarg=$2
34415    ac_shift=shift
34416    ;;
34417  esac
34418
34419  case $ac_option in
34420  # Handling of the options.
34421  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34422    ac_cs_recheck=: ;;
34423  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34424    $as_echo "$ac_cs_version"; exit ;;
34425  --debug | --debu | --deb | --de | --d | -d )
34426    debug=: ;;
34427  --file | --fil | --fi | --f )
34428    $ac_shift
34429    case $ac_optarg in
34430    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34431    esac
34432    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
34433    ac_need_defaults=false;;
34434  --header | --heade | --head | --hea )
34435    $ac_shift
34436    case $ac_optarg in
34437    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34438    esac
34439    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
34440    ac_need_defaults=false;;
34441  --he | --h)
34442    # Conflict between --help and --header
34443    { $as_echo "$as_me: error: ambiguous option: $1
34444Try \`$0 --help' for more information." >&2
34445   { (exit 1); exit 1; }; };;
34446  --help | --hel | -h )
34447    $as_echo "$ac_cs_usage"; exit ;;
34448  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34449  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34450    ac_cs_silent=: ;;
34451
34452  # This is an error.
34453  -*) { $as_echo "$as_me: error: unrecognized option: $1
34454Try \`$0 --help' for more information." >&2
34455   { (exit 1); exit 1; }; } ;;
34456
34457  *) ac_config_targets="$ac_config_targets $1"
34458     ac_need_defaults=false ;;
34459
34460  esac
34461  shift
34462done
34463
34464ac_configure_extra_args=
34465
34466if $ac_cs_silent; then
34467  exec 6>/dev/null
34468  ac_configure_extra_args="$ac_configure_extra_args --silent"
34469fi
34470
34471_ACEOF
34472cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34473if \$ac_cs_recheck; then
34474  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34475  shift
34476  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34477  CONFIG_SHELL='$SHELL'
34478  export CONFIG_SHELL
34479  exec "\$@"
34480fi
34481
34482_ACEOF
34483cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34484exec 5>>config.log
34485{
34486  echo
34487  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34488## Running $as_me. ##
34489_ASBOX
34490  $as_echo "$ac_log"
34491} >&5
34492
34493_ACEOF
34494cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34495_ACEOF
34496
34497cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34498
34499# Handling of arguments.
34500for ac_config_target in $ac_config_targets
34501do
34502  case $ac_config_target in
34503    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34504    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34505    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34506    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34507    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34508    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34509    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34510
34511  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
34512$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
34513   { (exit 1); exit 1; }; };;
34514  esac
34515done
34516
34517
34518# If the user did not use the arguments to specify the items to instantiate,
34519# then the envvar interface is used.  Set only those that are not.
34520# We use the long form for the default assignment because of an extremely
34521# bizarre bug on SunOS 4.1.3.
34522if $ac_need_defaults; then
34523  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34524  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34525fi
34526
34527# Have a temporary directory for convenience.  Make it in the build tree
34528# simply because there is no reason against having it here, and in addition,
34529# creating and moving files from /tmp can sometimes cause problems.
34530# Hook for its removal unless debugging.
34531# Note that there is a small window in which the directory will not be cleaned:
34532# after its creation but before its name has been assigned to `$tmp'.
34533$debug ||
34534{
34535  tmp=
34536  trap 'exit_status=$?
34537  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34538' 0
34539  trap '{ (exit 1); exit 1; }' 1 2 13 15
34540}
34541# Create a (secure) tmp directory for tmp files.
34542
34543{
34544  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34545  test -n "$tmp" && test -d "$tmp"
34546}  ||
34547{
34548  tmp=./conf$$-$RANDOM
34549  (umask 077 && mkdir "$tmp")
34550} ||
34551{
34552   $as_echo "$as_me: cannot create a temporary directory in ." >&2
34553   { (exit 1); exit 1; }
34554}
34555
34556# Set up the scripts for CONFIG_FILES section.
34557# No need to generate them if there are no CONFIG_FILES.
34558# This happens for instance with `./config.status config.h'.
34559if test -n "$CONFIG_FILES"; then
34560
34561
34562ac_cr='
34563'
34564ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34565if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34566  ac_cs_awk_cr='\\r'
34567else
34568  ac_cs_awk_cr=$ac_cr
34569fi
34570
34571echo 'BEGIN {' >"$tmp/subs1.awk" &&
34572_ACEOF
34573
34574
34575{
34576  echo "cat >conf$$subs.awk <<_ACEOF" &&
34577  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34578  echo "_ACEOF"
34579} >conf$$subs.sh ||
34580  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
34581$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
34582   { (exit 1); exit 1; }; }
34583ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
34584ac_delim='%!_!# '
34585for ac_last_try in false false false false false :; do
34586  . ./conf$$subs.sh ||
34587    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
34588$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
34589   { (exit 1); exit 1; }; }
34590
34591  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34592  if test $ac_delim_n = $ac_delim_num; then
34593    break
34594  elif $ac_last_try; then
34595    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
34596$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
34597   { (exit 1); exit 1; }; }
34598  else
34599    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34600  fi
34601done
34602rm -f conf$$subs.sh
34603
34604cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34605cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34606_ACEOF
34607sed -n '
34608h
34609s/^/S["/; s/!.*/"]=/
34610p
34611g
34612s/^[^!]*!//
34613:repl
34614t repl
34615s/'"$ac_delim"'$//
34616t delim
34617:nl
34618h
34619s/\(.\{148\}\).*/\1/
34620t more1
34621s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34622p
34623n
34624b repl
34625:more1
34626s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34627p
34628g
34629s/.\{148\}//
34630t nl
34631:delim
34632h
34633s/\(.\{148\}\).*/\1/
34634t more2
34635s/["\\]/\\&/g; s/^/"/; s/$/"/
34636p
34637b
34638:more2
34639s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34640p
34641g
34642s/.\{148\}//
34643t delim
34644' <conf$$subs.awk | sed '
34645/^[^""]/{
34646  N
34647  s/\n//
34648}
34649' >>$CONFIG_STATUS || ac_write_fail=1
34650rm -f conf$$subs.awk
34651cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34652_ACAWK
34653cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34654  for (key in S) S_is_set[key] = 1
34655  FS = ""
34656
34657}
34658{
34659  line = $ 0
34660  nfields = split(line, field, "@")
34661  substed = 0
34662  len = length(field[1])
34663  for (i = 2; i < nfields; i++) {
34664    key = field[i]
34665    keylen = length(key)
34666    if (S_is_set[key]) {
34667      value = S[key]
34668      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34669      len += length(value) + length(field[++i])
34670      substed = 1
34671    } else
34672      len += 1 + keylen
34673  }
34674
34675  print line
34676}
34677
34678_ACAWK
34679_ACEOF
34680cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34681if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34682  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34683else
34684  cat
34685fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34686  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
34687$as_echo "$as_me: error: could not setup config files machinery" >&2;}
34688   { (exit 1); exit 1; }; }
34689_ACEOF
34690
34691# VPATH may cause trouble with some makes, so we remove $(srcdir),
34692# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
34693# trailing colons and then remove the whole line if VPATH becomes empty
34694# (actually we leave an empty line to preserve line numbers).
34695if test "x$srcdir" = x.; then
34696  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
34697s/:*\$(srcdir):*/:/
34698s/:*\${srcdir}:*/:/
34699s/:*@srcdir@:*/:/
34700s/^\([^=]*=[	 ]*\):*/\1/
34701s/:*$//
34702s/^[^=]*=[	 ]*$//
34703}'
34704fi
34705
34706cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34707fi # test -n "$CONFIG_FILES"
34708
34709# Set up the scripts for CONFIG_HEADERS section.
34710# No need to generate them if there are no CONFIG_HEADERS.
34711# This happens for instance with `./config.status Makefile'.
34712if test -n "$CONFIG_HEADERS"; then
34713cat >"$tmp/defines.awk" <<\_ACAWK ||
34714BEGIN {
34715_ACEOF
34716
34717# Transform confdefs.h into an awk script `defines.awk', embedded as
34718# here-document in config.status, that substitutes the proper values into
34719# config.h.in to produce config.h.
34720
34721# Create a delimiter string that does not exist in confdefs.h, to ease
34722# handling of long lines.
34723ac_delim='%!_!# '
34724for ac_last_try in false false :; do
34725  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34726  if test -z "$ac_t"; then
34727    break
34728  elif $ac_last_try; then
34729    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
34730$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
34731   { (exit 1); exit 1; }; }
34732  else
34733    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34734  fi
34735done
34736
34737# For the awk script, D is an array of macro values keyed by name,
34738# likewise P contains macro parameters if any.  Preserve backslash
34739# newline sequences.
34740
34741ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34742sed -n '
34743s/.\{148\}/&'"$ac_delim"'/g
34744t rset
34745:rset
34746s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34747t def
34748d
34749:def
34750s/\\$//
34751t bsnl
34752s/["\\]/\\&/g
34753s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34754D["\1"]=" \3"/p
34755s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34756d
34757:bsnl
34758s/["\\]/\\&/g
34759s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34760D["\1"]=" \3\\\\\\n"\\/p
34761t cont
34762s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34763t cont
34764d
34765:cont
34766n
34767s/.\{148\}/&'"$ac_delim"'/g
34768t clear
34769:clear
34770s/\\$//
34771t bsnlc
34772s/["\\]/\\&/g; s/^/"/; s/$/"/p
34773d
34774:bsnlc
34775s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34776b cont
34777' <confdefs.h | sed '
34778s/'"$ac_delim"'/"\\\
34779"/g' >>$CONFIG_STATUS || ac_write_fail=1
34780
34781cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34782  for (key in D) D_is_set[key] = 1
34783  FS = ""
34784}
34785/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34786  line = \$ 0
34787  split(line, arg, " ")
34788  if (arg[1] == "#") {
34789    defundef = arg[2]
34790    mac1 = arg[3]
34791  } else {
34792    defundef = substr(arg[1], 2)
34793    mac1 = arg[2]
34794  }
34795  split(mac1, mac2, "(") #)
34796  macro = mac2[1]
34797  prefix = substr(line, 1, index(line, defundef) - 1)
34798  if (D_is_set[macro]) {
34799    # Preserve the white space surrounding the "#".
34800    print prefix "define", macro P[macro] D[macro]
34801    next
34802  } else {
34803    # Replace #undef with comments.  This is necessary, for example,
34804    # in the case of _POSIX_SOURCE, which is predefined and required
34805    # on some systems where configure will not decide to define it.
34806    if (defundef == "undef") {
34807      print "/*", prefix defundef, macro, "*/"
34808      next
34809    }
34810  }
34811}
34812{ print }
34813_ACAWK
34814_ACEOF
34815cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34816  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
34817$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
34818   { (exit 1); exit 1; }; }
34819fi # test -n "$CONFIG_HEADERS"
34820
34821
34822eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34823shift
34824for ac_tag
34825do
34826  case $ac_tag in
34827  :[FHLC]) ac_mode=$ac_tag; continue;;
34828  esac
34829  case $ac_mode$ac_tag in
34830  :[FHL]*:*);;
34831  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
34832$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
34833   { (exit 1); exit 1; }; };;
34834  :[FH]-) ac_tag=-:-;;
34835  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34836  esac
34837  ac_save_IFS=$IFS
34838  IFS=:
34839  set x $ac_tag
34840  IFS=$ac_save_IFS
34841  shift
34842  ac_file=$1
34843  shift
34844
34845  case $ac_mode in
34846  :L) ac_source=$1;;
34847  :[FH])
34848    ac_file_inputs=
34849    for ac_f
34850    do
34851      case $ac_f in
34852      -) ac_f="$tmp/stdin";;
34853      *) # Look for the file first in the build tree, then in the source tree
34854	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34855	 # because $ac_f cannot contain `:'.
34856	 test -f "$ac_f" ||
34857	   case $ac_f in
34858	   [\\/$]*) false;;
34859	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34860	   esac ||
34861	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
34862$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
34863   { (exit 1); exit 1; }; };;
34864      esac
34865      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34866      ac_file_inputs="$ac_file_inputs '$ac_f'"
34867    done
34868
34869    # Let's still pretend it is `configure' which instantiates (i.e., don't
34870    # use $as_me), people would be surprised to read:
34871    #    /* config.h.  Generated by config.status.  */
34872    configure_input='Generated from '`
34873	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34874	`' by configure.'
34875    if test x"$ac_file" != x-; then
34876      configure_input="$ac_file.  $configure_input"
34877      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
34878$as_echo "$as_me: creating $ac_file" >&6;}
34879    fi
34880    # Neutralize special characters interpreted by sed in replacement strings.
34881    case $configure_input in #(
34882    *\&* | *\|* | *\\* )
34883       ac_sed_conf_input=`$as_echo "$configure_input" |
34884       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34885    *) ac_sed_conf_input=$configure_input;;
34886    esac
34887
34888    case $ac_tag in
34889    *:-:* | *:-) cat >"$tmp/stdin" \
34890      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
34891$as_echo "$as_me: error: could not create $ac_file" >&2;}
34892   { (exit 1); exit 1; }; } ;;
34893    esac
34894    ;;
34895  esac
34896
34897  ac_dir=`$as_dirname -- "$ac_file" ||
34898$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34899	 X"$ac_file" : 'X\(//\)[^/]' \| \
34900	 X"$ac_file" : 'X\(//\)$' \| \
34901	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34902$as_echo X"$ac_file" |
34903    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34904	    s//\1/
34905	    q
34906	  }
34907	  /^X\(\/\/\)[^/].*/{
34908	    s//\1/
34909	    q
34910	  }
34911	  /^X\(\/\/\)$/{
34912	    s//\1/
34913	    q
34914	  }
34915	  /^X\(\/\).*/{
34916	    s//\1/
34917	    q
34918	  }
34919	  s/.*/./; q'`
34920  { as_dir="$ac_dir"
34921  case $as_dir in #(
34922  -*) as_dir=./$as_dir;;
34923  esac
34924  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
34925    as_dirs=
34926    while :; do
34927      case $as_dir in #(
34928      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34929      *) as_qdir=$as_dir;;
34930      esac
34931      as_dirs="'$as_qdir' $as_dirs"
34932      as_dir=`$as_dirname -- "$as_dir" ||
34933$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34934	 X"$as_dir" : 'X\(//\)[^/]' \| \
34935	 X"$as_dir" : 'X\(//\)$' \| \
34936	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34937$as_echo X"$as_dir" |
34938    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34939	    s//\1/
34940	    q
34941	  }
34942	  /^X\(\/\/\)[^/].*/{
34943	    s//\1/
34944	    q
34945	  }
34946	  /^X\(\/\/\)$/{
34947	    s//\1/
34948	    q
34949	  }
34950	  /^X\(\/\).*/{
34951	    s//\1/
34952	    q
34953	  }
34954	  s/.*/./; q'`
34955      test -d "$as_dir" && break
34956    done
34957    test -z "$as_dirs" || eval "mkdir $as_dirs"
34958  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
34959$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
34960   { (exit 1); exit 1; }; }; }
34961  ac_builddir=.
34962
34963case "$ac_dir" in
34964.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34965*)
34966  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34967  # A ".." for each directory in $ac_dir_suffix.
34968  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34969  case $ac_top_builddir_sub in
34970  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34971  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34972  esac ;;
34973esac
34974ac_abs_top_builddir=$ac_pwd
34975ac_abs_builddir=$ac_pwd$ac_dir_suffix
34976# for backward compatibility:
34977ac_top_builddir=$ac_top_build_prefix
34978
34979case $srcdir in
34980  .)  # We are building in place.
34981    ac_srcdir=.
34982    ac_top_srcdir=$ac_top_builddir_sub
34983    ac_abs_top_srcdir=$ac_pwd ;;
34984  [\\/]* | ?:[\\/]* )  # Absolute name.
34985    ac_srcdir=$srcdir$ac_dir_suffix;
34986    ac_top_srcdir=$srcdir
34987    ac_abs_top_srcdir=$srcdir ;;
34988  *) # Relative name.
34989    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34990    ac_top_srcdir=$ac_top_build_prefix$srcdir
34991    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34992esac
34993ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34994
34995
34996  case $ac_mode in
34997  :F)
34998  #
34999  # CONFIG_FILE
35000  #
35001
35002_ACEOF
35003
35004cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35005# If the template does not know about datarootdir, expand it.
35006# FIXME: This hack should be removed a few years after 2.60.
35007ac_datarootdir_hack=; ac_datarootdir_seen=
35008
35009ac_sed_dataroot='
35010/datarootdir/ {
35011  p
35012  q
35013}
35014/@datadir@/p
35015/@docdir@/p
35016/@infodir@/p
35017/@localedir@/p
35018/@mandir@/p
35019'
35020case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
35021*datarootdir*) ac_datarootdir_seen=yes;;
35022*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
35023  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
35024$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
35025_ACEOF
35026cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35027  ac_datarootdir_hack='
35028  s&@datadir@&$datadir&g
35029  s&@docdir@&$docdir&g
35030  s&@infodir@&$infodir&g
35031  s&@localedir@&$localedir&g
35032  s&@mandir@&$mandir&g
35033    s&\\\${datarootdir}&$datarootdir&g' ;;
35034esac
35035_ACEOF
35036
35037# Neutralize VPATH when `$srcdir' = `.'.
35038# Shell code in configure.ac might set extrasub.
35039# FIXME: do we really want to maintain this feature?
35040cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35041ac_sed_extra="$ac_vpsub
35042$extrasub
35043_ACEOF
35044cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35045:t
35046/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
35047s|@configure_input@|$ac_sed_conf_input|;t t
35048s&@top_builddir@&$ac_top_builddir_sub&;t t
35049s&@top_build_prefix@&$ac_top_build_prefix&;t t
35050s&@srcdir@&$ac_srcdir&;t t
35051s&@abs_srcdir@&$ac_abs_srcdir&;t t
35052s&@top_srcdir@&$ac_top_srcdir&;t t
35053s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
35054s&@builddir@&$ac_builddir&;t t
35055s&@abs_builddir@&$ac_abs_builddir&;t t
35056s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
35057$ac_datarootdir_hack
35058"
35059eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
35060  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
35061$as_echo "$as_me: error: could not create $ac_file" >&2;}
35062   { (exit 1); exit 1; }; }
35063
35064test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
35065  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
35066  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
35067  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35068which seems to be undefined.  Please make sure it is defined." >&5
35069$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35070which seems to be undefined.  Please make sure it is defined." >&2;}
35071
35072  rm -f "$tmp/stdin"
35073  case $ac_file in
35074  -) cat "$tmp/out" && rm -f "$tmp/out";;
35075  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
35076  esac \
35077  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
35078$as_echo "$as_me: error: could not create $ac_file" >&2;}
35079   { (exit 1); exit 1; }; }
35080 ;;
35081  :H)
35082  #
35083  # CONFIG_HEADER
35084  #
35085  if test x"$ac_file" != x-; then
35086    {
35087      $as_echo "/* $configure_input  */" \
35088      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
35089    } >"$tmp/config.h" \
35090      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
35091$as_echo "$as_me: error: could not create $ac_file" >&2;}
35092   { (exit 1); exit 1; }; }
35093    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
35094      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
35095$as_echo "$as_me: $ac_file is unchanged" >&6;}
35096    else
35097      rm -f "$ac_file"
35098      mv "$tmp/config.h" "$ac_file" \
35099	|| { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
35100$as_echo "$as_me: error: could not create $ac_file" >&2;}
35101   { (exit 1); exit 1; }; }
35102    fi
35103  else
35104    $as_echo "/* $configure_input  */" \
35105      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
35106      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
35107$as_echo "$as_me: error: could not create -" >&2;}
35108   { (exit 1); exit 1; }; }
35109  fi
35110 ;;
35111
35112
35113  esac
35114
35115done # for ac_tag
35116
35117
35118{ (exit 0); exit 0; }
35119_ACEOF
35120chmod +x $CONFIG_STATUS
35121ac_clean_files=$ac_clean_files_save
35122
35123test $ac_write_fail = 0 ||
35124  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
35125$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
35126   { (exit 1); exit 1; }; }
35127
35128
35129# configure is writing to config.log, and then calls config.status.
35130# config.status does its own redirection, appending to config.log.
35131# Unfortunately, on DOS this fails, as config.log is still kept open
35132# by configure, so config.status won't be able to write to it; its
35133# output is simply discarded.  So we exec the FD to /dev/null,
35134# effectively closing config.log, so it can be properly (re)opened and
35135# appended to by config.status.  When coming back to configure, we
35136# need to make the FD available again.
35137if test "$no_create" != yes; then
35138  ac_cs_success=:
35139  ac_config_status_args=
35140  test "$silent" = yes &&
35141    ac_config_status_args="$ac_config_status_args --quiet"
35142  exec 5>/dev/null
35143  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
35144  exec 5>>config.log
35145  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
35146  # would make configure fail if this is the last instruction.
35147  $ac_cs_success || { (exit 1); exit 1; }
35148fi
35149if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
35150  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
35151$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
35152fi
35153
35154
35155# Make the compare script executable
35156$CHMOD +x $OUTPUT_ROOT/compare.sh
35157
35158# Finally output some useful information to the user
35159
35160# Finally output some useful information to the user
35161
35162if test "x$CCACHE_FOUND" != x; then
35163	if  test "x$HAS_GOOD_CCACHE" = x; then
35164		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
35165		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
35166	else
35167		CCACHE_STATUS="installed and in use"
35168	fi
35169else
35170	if test "x$GCC" = xyes; then
35171		CCACHE_STATUS="not installed (consider installing)"
35172		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
35173	else
35174		CCACHE_STATUS="not available for your system"
35175	fi
35176fi
35177
35178printf "\n"
35179printf "====================================================\n"
35180printf "A new configuration has been successfully created in\n"
35181printf "$OUTPUT_ROOT\n"
35182if test "x$CONFIGURE_COMMAND_LINE" != x; then
35183	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
35184else
35185	printf "using default settings.\n"
35186fi
35187
35188printf "\n"
35189printf "Configuration summary:\n"
35190printf "* Debug level:    $DEBUG_LEVEL\n"
35191printf "* JDK variant:    $JDK_VARIANT\n"
35192printf "* JVM variants:   $with_jvm_variants\n"
35193printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
35194
35195printf "\n"
35196printf "Tools summary:\n"
35197if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
35198  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
35199fi
35200printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
35201printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
35202printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
35203
35204printf "\n"
35205printf "Build performance summary:\n"
35206printf "* Cores to use:   $NUM_CORES\n"
35207printf "* Memory limit:   $MEMORY_SIZE MB\n"
35208printf "* ccache status:  $CCACHE_STATUS\n"
35209printf "\n"
35210
35211if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
35212	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
35213	printf "$CCACHE_HELP_MSG\n"
35214
35215    # Print a helpful message on how to acquire the necessary build dependency.
35216    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
35217    MISSING_DEPENDENCY=ccache
35218    PKGHANDLER_COMMAND=
35219
35220    case $PKGHANDLER in
35221	apt-get)
35222                apt_help     $MISSING_DEPENDENCY ;;
35223    yum)
35224                yum_help     $MISSING_DEPENDENCY ;;
35225	port)
35226                port_help    $MISSING_DEPENDENCY ;;
35227	pkgutil)
35228                pkgutil_help $MISSING_DEPENDENCY ;;
35229	pkgadd)
35230                pkgadd_help  $MISSING_DEPENDENCY ;;
35231    * )
35232      break ;;
35233    esac
35234
35235    if test "x$PKGHANDLER_COMMAND" != x; then
35236        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35237    fi
35238
35239	printf "$HELP_MSG\n"
35240	printf "\n"
35241fi
35242
35243if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
35244	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
35245	printf "will result in longer build times.\n"
35246	printf "\n"
35247fi
35248
35249if test "x$FOUND_ALT_VARIABLES" != "x"; then
35250	printf "WARNING: You have old-style ALT_ environment variables set.\n"
35251	printf "These are not respected, and will be ignored. It is recommended\n"
35252	printf "that you clean your environment. The following variables are set:\n"
35253	printf "$FOUND_ALT_VARIABLES\n"
35254	printf "\n"
35255fi
35256
35257if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
35258	printf "WARNING: Your build output directory is not on a local disk.\n"
35259	printf "This will severely degrade build performance!\n"
35260	printf "It is recommended that you create an output directory on a local disk,\n"
35261	printf "and run the configure script again from that directory.\n"
35262	printf "\n"
35263fi
35264
35265if test "x$IS_RECONFIGURE" = "xyes"; then
35266	printf "WARNING: The result of this configuration has overridden an older\n"
35267	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
35268	printf "proper build. Failure to do so might result in strange build problems.\n"
35269	printf "\n"
35270fi
35271
35272