generated-configure.sh revision 510:582c696033f5
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
1038with_stdc++lib
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  --enable-sjavac         use sjavac to do fast incremental compiles
1716                          [disabled]
1717  --disable-precompiled-headers
1718                          disable using precompiled headers when compiling C++
1719                          [enabled]
1720  --disable-ccache        disable using ccache to speed up recompilations
1721                          [enabled]
1722
1723Optional Packages:
1724  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1725  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1726  --with-custom-make-dir  use this directory for custom build/make files
1727  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1728                          support it), e.g. --with-target-bits=32 [guessed]
1729  --with-sys-root         pass this sys-root to the compilers and tools (for
1730                          cross-compiling)
1731  --with-tools-dir        search this directory for compilers and tools (for
1732                          cross-compiling)
1733  --with-devkit           use this directory as base for tools-dir and
1734                          sys-root (for cross-compiling)
1735  --with-jdk-variant      JDK variant to build (normal) [normal]
1736  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1737                          client, kernel, zero, zeroshark) [server]
1738  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1739                          [release]
1740  --with-conf-name        use this as the name of the configuration [generated
1741                          from important configuration options]
1742  --with-builddeps-conf   use this configuration file for the builddeps
1743  --with-builddeps-server download and use build dependencies from this server
1744                          url
1745  --with-builddeps-dir    store downloaded build dependencies here
1746                          [/localhome/builddeps]
1747  --with-builddeps-group  chgrp the downloaded build dependencies to this
1748                          group
1749  --with-cacerts-file     specify alternative cacerts file
1750  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1751  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1752                          invocations of the Boot JDK, overriding the default
1753                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1754                          -enableassertions"
1755  --with-add-source-root  for each and every source directory, look in this
1756                          additional source root for the same directory; if it
1757                          exists and have files in it, include it in the build
1758  --with-override-source-root
1759                          for each and every source directory, look in this
1760                          override source root for the same directory; if it
1761                          exists, use that directory instead and ignore the
1762                          directory in the original source root
1763  --with-adds-and-overrides
1764                          use the subdirs 'adds' and 'overrides' in the
1765                          specified directory as add-source-root and
1766                          override-source-root
1767  --with-override-langtools
1768                          use this langtools dir for the build
1769  --with-override-corba   use this corba dir for the build
1770  --with-override-jaxp    use this jaxp dir for the build
1771  --with-override-jaxws   use this jaxws dir for the build
1772  --with-override-hotspot use this hotspot dir for the build
1773  --with-override-jdk     use this jdk dir for the build
1774  --with-import-hotspot   import hotspot binaries from this jdk image or
1775                          hotspot build dist dir instead of building from
1776                          source
1777  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1778                          only) [probed]
1779  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1780  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1781  --with-extra-ldflags    extra flags to be used when linking jdk
1782  --with-x                use the X Window System
1783  --with-cups             specify prefix directory for the cups package
1784                          (expecting the headers under PATH/include)
1785  --with-cups-include     specify directory for the cups include files
1786  --with-freetype         specify prefix directory for the freetype2 package
1787                          (expecting the libraries under PATH/lib and the
1788                          headers under PATH/include)
1789  --with-alsa             specify prefix directory for the alsa package
1790                          (expecting the libraries under PATH/lib and the
1791                          headers under PATH/include)
1792  --with-alsa-include     specify directory for the alsa include files
1793  --with-alsa-lib         specify directory for the alsa library
1794  --with-zlib             use zlib from build system or OpenJDK source
1795                          (system, bundled) [bundled]
1796  --with-stdc++lib=<static>,<dynamic>,<default>
1797                          force linking of the C++ runtime on Linux to either
1798                          static or dynamic, default is static with dynamic as
1799                          fallback
1800  --with-num-cores        number of cores in the build system, e.g.
1801                          --with-num-cores=8 [probed]
1802  --with-memory-size      memory (in MB) available in the build system, e.g.
1803                          --with-memory-size=1024 [probed]
1804  --with-sjavac-server-java
1805                          use this java binary for running the sjavac
1806                          background server [Boot JDK java]
1807  --with-sjavac-server-cores
1808                          use at most this number of concurrent threads on the
1809                          sjavac server [probed]
1810  --with-ccache-dir       where to store ccache files [~/.ccache]
1811
1812Some influential environment variables:
1813  PKG_CONFIG  path to pkg-config utility
1814  CC          C compiler command
1815  CFLAGS      C compiler flags
1816  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1817              nonstandard directory <lib dir>
1818  LIBS        libraries to pass to the linker, e.g. -l<library>
1819  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1820              you have headers in a nonstandard directory <include dir>
1821  CXX         C++ compiler command
1822  CXXFLAGS    C++ compiler flags
1823  OBJC        Objective C compiler command
1824  OBJCFLAGS   Objective C compiler flags
1825  CPP         C preprocessor
1826  CXXCPP      C++ preprocessor
1827  XMKMF       Path to xmkmf, Makefile generator for X Window System
1828  FREETYPE2_CFLAGS
1829              C compiler flags for FREETYPE2, overriding pkg-config
1830  FREETYPE2_LIBS
1831              linker flags for FREETYPE2, overriding pkg-config
1832  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1833  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1834
1835Use these variables to override the choices made by `configure' or to help
1836it to find libraries and programs with nonstandard names/locations.
1837
1838Report bugs to <build-dev@openjdk.java.net>.
1839_ACEOF
1840ac_status=$?
1841fi
1842
1843if test "$ac_init_help" = "recursive"; then
1844  # If there are subdirs, report their specific --help.
1845  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1846    test -d "$ac_dir" ||
1847      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1848      continue
1849    ac_builddir=.
1850
1851case "$ac_dir" in
1852.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1853*)
1854  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1855  # A ".." for each directory in $ac_dir_suffix.
1856  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1857  case $ac_top_builddir_sub in
1858  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1859  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1860  esac ;;
1861esac
1862ac_abs_top_builddir=$ac_pwd
1863ac_abs_builddir=$ac_pwd$ac_dir_suffix
1864# for backward compatibility:
1865ac_top_builddir=$ac_top_build_prefix
1866
1867case $srcdir in
1868  .)  # We are building in place.
1869    ac_srcdir=.
1870    ac_top_srcdir=$ac_top_builddir_sub
1871    ac_abs_top_srcdir=$ac_pwd ;;
1872  [\\/]* | ?:[\\/]* )  # Absolute name.
1873    ac_srcdir=$srcdir$ac_dir_suffix;
1874    ac_top_srcdir=$srcdir
1875    ac_abs_top_srcdir=$srcdir ;;
1876  *) # Relative name.
1877    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1878    ac_top_srcdir=$ac_top_build_prefix$srcdir
1879    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1880esac
1881ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1882
1883    cd "$ac_dir" || { ac_status=$?; continue; }
1884    # Check for guested configure.
1885    if test -f "$ac_srcdir/configure.gnu"; then
1886      echo &&
1887      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1888    elif test -f "$ac_srcdir/configure"; then
1889      echo &&
1890      $SHELL "$ac_srcdir/configure" --help=recursive
1891    else
1892      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1893    fi || ac_status=$?
1894    cd "$ac_pwd" || { ac_status=$?; break; }
1895  done
1896fi
1897
1898test -n "$ac_init_help" && exit $ac_status
1899if $ac_init_version; then
1900  cat <<\_ACEOF
1901OpenJDK configure jdk8
1902generated by GNU Autoconf 2.63
1903
1904Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
19052002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1906This configure script is free software; the Free Software Foundation
1907gives unlimited permission to copy, distribute and modify it.
1908_ACEOF
1909  exit
1910fi
1911cat >config.log <<_ACEOF
1912This file contains any messages produced by compilers while
1913running configure, to aid debugging if configure makes a mistake.
1914
1915It was created by OpenJDK $as_me jdk8, which was
1916generated by GNU Autoconf 2.63.  Invocation command line was
1917
1918  $ $0 $@
1919
1920_ACEOF
1921exec 5>>config.log
1922{
1923cat <<_ASUNAME
1924## --------- ##
1925## Platform. ##
1926## --------- ##
1927
1928hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1929uname -m = `(uname -m) 2>/dev/null || echo unknown`
1930uname -r = `(uname -r) 2>/dev/null || echo unknown`
1931uname -s = `(uname -s) 2>/dev/null || echo unknown`
1932uname -v = `(uname -v) 2>/dev/null || echo unknown`
1933
1934/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1935/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1936
1937/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1938/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1939/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1940/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1941/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1942/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1943/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1944
1945_ASUNAME
1946
1947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1948for as_dir in $PATH
1949do
1950  IFS=$as_save_IFS
1951  test -z "$as_dir" && as_dir=.
1952  $as_echo "PATH: $as_dir"
1953done
1954IFS=$as_save_IFS
1955
1956} >&5
1957
1958cat >&5 <<_ACEOF
1959
1960
1961## ----------- ##
1962## Core tests. ##
1963## ----------- ##
1964
1965_ACEOF
1966
1967
1968# Keep a trace of the command line.
1969# Strip out --no-create and --no-recursion so they do not pile up.
1970# Strip out --silent because we don't want to record it for future runs.
1971# Also quote any args containing shell meta-characters.
1972# Make two passes to allow for proper duplicate-argument suppression.
1973ac_configure_args=
1974ac_configure_args0=
1975ac_configure_args1=
1976ac_must_keep_next=false
1977for ac_pass in 1 2
1978do
1979  for ac_arg
1980  do
1981    case $ac_arg in
1982    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1983    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1984    | -silent | --silent | --silen | --sile | --sil)
1985      continue ;;
1986    *\'*)
1987      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1988    esac
1989    case $ac_pass in
1990    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1991    2)
1992      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1993      if test $ac_must_keep_next = true; then
1994	ac_must_keep_next=false # Got value, back to normal.
1995      else
1996	case $ac_arg in
1997	  *=* | --config-cache | -C | -disable-* | --disable-* \
1998	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1999	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2000	  | -with-* | --with-* | -without-* | --without-* | --x)
2001	    case "$ac_configure_args0 " in
2002	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2003	    esac
2004	    ;;
2005	  -* ) ac_must_keep_next=true ;;
2006	esac
2007      fi
2008      ac_configure_args="$ac_configure_args '$ac_arg'"
2009      ;;
2010    esac
2011  done
2012done
2013$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
2014$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
2015
2016# When interrupted or exit'd, cleanup temporary files, and complete
2017# config.log.  We remove comments because anyway the quotes in there
2018# would cause problems or look ugly.
2019# WARNING: Use '\'' to represent an apostrophe within the trap.
2020# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2021trap 'exit_status=$?
2022  # Save into config.log some information that might help in debugging.
2023  {
2024    echo
2025
2026    cat <<\_ASBOX
2027## ---------------- ##
2028## Cache variables. ##
2029## ---------------- ##
2030_ASBOX
2031    echo
2032    # The following way of writing the cache mishandles newlines in values,
2033(
2034  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2035    eval ac_val=\$$ac_var
2036    case $ac_val in #(
2037    *${as_nl}*)
2038      case $ac_var in #(
2039      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
2040$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2041      esac
2042      case $ac_var in #(
2043      _ | IFS | as_nl) ;; #(
2044      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2045      *) $as_unset $ac_var ;;
2046      esac ;;
2047    esac
2048  done
2049  (set) 2>&1 |
2050    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2051    *${as_nl}ac_space=\ *)
2052      sed -n \
2053	"s/'\''/'\''\\\\'\'''\''/g;
2054	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2055      ;; #(
2056    *)
2057      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2058      ;;
2059    esac |
2060    sort
2061)
2062    echo
2063
2064    cat <<\_ASBOX
2065## ----------------- ##
2066## Output variables. ##
2067## ----------------- ##
2068_ASBOX
2069    echo
2070    for ac_var in $ac_subst_vars
2071    do
2072      eval ac_val=\$$ac_var
2073      case $ac_val in
2074      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2075      esac
2076      $as_echo "$ac_var='\''$ac_val'\''"
2077    done | sort
2078    echo
2079
2080    if test -n "$ac_subst_files"; then
2081      cat <<\_ASBOX
2082## ------------------- ##
2083## File substitutions. ##
2084## ------------------- ##
2085_ASBOX
2086      echo
2087      for ac_var in $ac_subst_files
2088      do
2089	eval ac_val=\$$ac_var
2090	case $ac_val in
2091	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2092	esac
2093	$as_echo "$ac_var='\''$ac_val'\''"
2094      done | sort
2095      echo
2096    fi
2097
2098    if test -s confdefs.h; then
2099      cat <<\_ASBOX
2100## ----------- ##
2101## confdefs.h. ##
2102## ----------- ##
2103_ASBOX
2104      echo
2105      cat confdefs.h
2106      echo
2107    fi
2108    test "$ac_signal" != 0 &&
2109      $as_echo "$as_me: caught signal $ac_signal"
2110    $as_echo "$as_me: exit $exit_status"
2111  } >&5
2112  rm -f core *.core core.conftest.* &&
2113    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2114    exit $exit_status
2115' 0
2116for ac_signal in 1 2 13 15; do
2117  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
2118done
2119ac_signal=0
2120
2121# confdefs.h avoids OS command line length limits that DEFS can exceed.
2122rm -f -r conftest* confdefs.h
2123
2124# Predefined preprocessor variables.
2125
2126cat >>confdefs.h <<_ACEOF
2127#define PACKAGE_NAME "$PACKAGE_NAME"
2128_ACEOF
2129
2130
2131cat >>confdefs.h <<_ACEOF
2132#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2133_ACEOF
2134
2135
2136cat >>confdefs.h <<_ACEOF
2137#define PACKAGE_VERSION "$PACKAGE_VERSION"
2138_ACEOF
2139
2140
2141cat >>confdefs.h <<_ACEOF
2142#define PACKAGE_STRING "$PACKAGE_STRING"
2143_ACEOF
2144
2145
2146cat >>confdefs.h <<_ACEOF
2147#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2148_ACEOF
2149
2150
2151# Let the site file select an alternate cache file if it wants to.
2152# Prefer an explicitly selected file to automatically selected ones.
2153ac_site_file1=NONE
2154ac_site_file2=NONE
2155if test -n "$CONFIG_SITE"; then
2156  ac_site_file1=$CONFIG_SITE
2157elif test "x$prefix" != xNONE; then
2158  ac_site_file1=$prefix/share/config.site
2159  ac_site_file2=$prefix/etc/config.site
2160else
2161  ac_site_file1=$ac_default_prefix/share/config.site
2162  ac_site_file2=$ac_default_prefix/etc/config.site
2163fi
2164for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2165do
2166  test "x$ac_site_file" = xNONE && continue
2167  if test -r "$ac_site_file"; then
2168    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
2169$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2170    sed 's/^/| /' "$ac_site_file" >&5
2171    . "$ac_site_file"
2172  fi
2173done
2174
2175if test -r "$cache_file"; then
2176  # Some versions of bash will fail to source /dev/null (special
2177  # files actually), so we avoid doing that.
2178  if test -f "$cache_file"; then
2179    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
2180$as_echo "$as_me: loading cache $cache_file" >&6;}
2181    case $cache_file in
2182      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2183      *)                      . "./$cache_file";;
2184    esac
2185  fi
2186else
2187  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
2188$as_echo "$as_me: creating cache $cache_file" >&6;}
2189  >$cache_file
2190fi
2191
2192# Check that the precious variables saved in the cache have kept the same
2193# value.
2194ac_cache_corrupted=false
2195for ac_var in $ac_precious_vars; do
2196  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2197  eval ac_new_set=\$ac_env_${ac_var}_set
2198  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2199  eval ac_new_val=\$ac_env_${ac_var}_value
2200  case $ac_old_set,$ac_new_set in
2201    set,)
2202      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2203$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2204      ac_cache_corrupted=: ;;
2205    ,set)
2206      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
2207$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2208      ac_cache_corrupted=: ;;
2209    ,);;
2210    *)
2211      if test "x$ac_old_val" != "x$ac_new_val"; then
2212	# differences in whitespace do not lead to failure.
2213	ac_old_val_w=`echo x $ac_old_val`
2214	ac_new_val_w=`echo x $ac_new_val`
2215	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2216	  { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
2217$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2218	  ac_cache_corrupted=:
2219	else
2220	  { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2221$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2222	  eval $ac_var=\$ac_old_val
2223	fi
2224	{ $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
2225$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2226	{ $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
2227$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2228      fi;;
2229  esac
2230  # Pass precious variables to config.status.
2231  if test "$ac_new_set" = set; then
2232    case $ac_new_val in
2233    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2234    *) ac_arg=$ac_var=$ac_new_val ;;
2235    esac
2236    case " $ac_configure_args " in
2237      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2238      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
2239    esac
2240  fi
2241done
2242if $ac_cache_corrupted; then
2243  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2244$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2245  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
2246$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2247  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
2248$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
2249   { (exit 1); exit 1; }; }
2250fi
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276ac_ext=c
2277ac_cpp='$CPP $CPPFLAGS'
2278ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2279ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2280ac_compiler_gnu=$ac_cv_c_compiler_gnu
2281
2282
2283
2284ac_aux_dir=
2285for ac_dir in build-aux "$srcdir"/build-aux; do
2286  if test -f "$ac_dir/install-sh"; then
2287    ac_aux_dir=$ac_dir
2288    ac_install_sh="$ac_aux_dir/install-sh -c"
2289    break
2290  elif test -f "$ac_dir/install.sh"; then
2291    ac_aux_dir=$ac_dir
2292    ac_install_sh="$ac_aux_dir/install.sh -c"
2293    break
2294  elif test -f "$ac_dir/shtool"; then
2295    ac_aux_dir=$ac_dir
2296    ac_install_sh="$ac_aux_dir/shtool install -c"
2297    break
2298  fi
2299done
2300if test -z "$ac_aux_dir"; then
2301  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&5
2302$as_echo "$as_me: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&2;}
2303   { (exit 1); exit 1; }; }
2304fi
2305
2306# These three variables are undocumented and unsupported,
2307# and are intended to be withdrawn in a future Autoconf release.
2308# They can cause serious problems if a builder's source tree is in a directory
2309# whose full name contains unusual characters.
2310ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2311ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2312ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2313
2314
2315# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2316#
2317# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2318#
2319# This program is free software; you can redistribute it and/or modify
2320# it under the terms of the GNU General Public License as published by
2321# the Free Software Foundation; either version 2 of the License, or
2322# (at your option) any later version.
2323#
2324# This program is distributed in the hope that it will be useful, but
2325# WITHOUT ANY WARRANTY; without even the implied warranty of
2326# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2327# General Public License for more details.
2328#
2329# You should have received a copy of the GNU General Public License
2330# along with this program; if not, write to the Free Software
2331# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2332#
2333# As a special exception to the GNU General Public License, if you
2334# distribute this file as part of a program that contains a
2335# configuration script generated by Autoconf, you may include it under
2336# the same distribution terms that you use for the rest of that program.
2337
2338# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2339# ----------------------------------
2340# PKG_PROG_PKG_CONFIG
2341
2342# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2343#
2344# Check to see whether a particular set of modules exists.  Similar
2345# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2346#
2347#
2348# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2349# this or PKG_CHECK_MODULES is called, or make sure to call
2350# PKG_CHECK_EXISTS manually
2351# --------------------------------------------------------------
2352
2353
2354
2355# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2356# ---------------------------------------------
2357# _PKG_CONFIG
2358
2359# _PKG_SHORT_ERRORS_SUPPORTED
2360# -----------------------------
2361# _PKG_SHORT_ERRORS_SUPPORTED
2362
2363
2364# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2365# [ACTION-IF-NOT-FOUND])
2366#
2367#
2368# Note that if there is a possibility the first call to
2369# PKG_CHECK_MODULES might not happen, you should be sure to include an
2370# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2371#
2372#
2373# --------------------------------------------------------------
2374# PKG_CHECK_MODULES
2375
2376
2377# Include these first...
2378#
2379# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2380# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2381#
2382# This code is free software; you can redistribute it and/or modify it
2383# under the terms of the GNU General Public License version 2 only, as
2384# published by the Free Software Foundation.  Oracle designates this
2385# particular file as subject to the "Classpath" exception as provided
2386# by Oracle in the LICENSE file that accompanied this code.
2387#
2388# This code is distributed in the hope that it will be useful, but WITHOUT
2389# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2390# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2391# version 2 for more details (a copy is included in the LICENSE file that
2392# accompanied this code).
2393#
2394# You should have received a copy of the GNU General Public License version
2395# 2 along with this work; if not, write to the Free Software Foundation,
2396# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2397#
2398# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2399# or visit www.oracle.com if you need additional information or have any
2400# questions.
2401#
2402
2403
2404
2405# This will make sure the given variable points to a full and proper
2406# path. This means:
2407# 1) There will be no spaces in the path. On posix platforms,
2408#    spaces in the path will result in an error. On Windows,
2409#    the path will be rewritten using short-style to be space-free.
2410# 2) The path will be absolute, and it will be in unix-style (on
2411#     cygwin).
2412# $1: The name of the variable to fix
2413
2414
2415# This will make sure the given variable points to a executable
2416# with a full and proper path. This means:
2417# 1) There will be no spaces in the path. On posix platforms,
2418#    spaces in the path will result in an error. On Windows,
2419#    the path will be rewritten using short-style to be space-free.
2420# 2) The path will be absolute, and it will be in unix-style (on
2421#     cygwin).
2422# Any arguments given to the executable is preserved.
2423# If the input variable does not have a directory specification, then
2424# it need to be in the PATH.
2425# $1: The name of the variable to fix
2426
2427
2428
2429
2430
2431
2432# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
2433# $1: variable to check
2434# $2: executable name to print in warning (optional)
2435
2436
2437# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
2438# Arguments as AC_PATH_PROG:
2439# $1: variable to set
2440# $2: executable name to look for
2441
2442
2443# Setup the most fundamental tools that relies on not much else to set up,
2444# but is used by much of the early bootstrap code.
2445
2446
2447# Setup basic configuration paths, and platform-specific stuff related to PATHs.
2448
2449
2450
2451
2452
2453
2454
2455#%%% Simple tools %%%
2456
2457# Check if we have found a usable version of make
2458# $1: the path to a potential make binary (or empty)
2459# $2: the description on how we found this
2460
2461
2462# Goes looking for a usable version of GNU make.
2463
2464
2465
2466
2467
2468
2469# Check if build directory is on local disk. If not possible to determine,
2470# we prefer to claim it's local.
2471# Argument 1: directory to test
2472# Argument 2: what to do if it is on local disk
2473# Argument 3: what to do otherwise (remote disk or failure)
2474
2475
2476
2477
2478#
2479# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2480# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2481#
2482# This code is free software; you can redistribute it and/or modify it
2483# under the terms of the GNU General Public License version 2 only, as
2484# published by the Free Software Foundation.  Oracle designates this
2485# particular file as subject to the "Classpath" exception as provided
2486# by Oracle in the LICENSE file that accompanied this code.
2487#
2488# This code is distributed in the hope that it will be useful, but WITHOUT
2489# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2490# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2491# version 2 for more details (a copy is included in the LICENSE file that
2492# accompanied this code).
2493#
2494# You should have received a copy of the GNU General Public License version
2495# 2 along with this work; if not, write to the Free Software Foundation,
2496# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2497#
2498# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2499# or visit www.oracle.com if you need additional information or have any
2500# questions.
2501#
2502
2503
2504
2505
2506
2507# Helper function which possibly converts a path using DOS-style short mode.
2508# If so, the updated path is stored in $new_path.
2509# $1: The path to check
2510
2511
2512# Helper function which possibly converts a path using DOS-style short mode.
2513# If so, the updated path is stored in $new_path.
2514# $1: The path to check
2515
2516
2517# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
2518# and could probably be heavily simplified. However, all changes in this
2519# area tend to need lot of testing in different scenarios, and in lack of
2520# proper unit testing, cleaning this up has not been deemed worth the effort
2521# at the moment.
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531# Setup basic configuration paths, and platform-specific stuff related to PATHs.
2532
2533
2534
2535
2536#
2537# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2538# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2539#
2540# This code is free software; you can redistribute it and/or modify it
2541# under the terms of the GNU General Public License version 2 only, as
2542# published by the Free Software Foundation.  Oracle designates this
2543# particular file as subject to the "Classpath" exception as provided
2544# by Oracle in the LICENSE file that accompanied this code.
2545#
2546# This code is distributed in the hope that it will be useful, but WITHOUT
2547# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2548# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2549# version 2 for more details (a copy is included in the LICENSE file that
2550# accompanied this code).
2551#
2552# You should have received a copy of the GNU General Public License version
2553# 2 along with this work; if not, write to the Free Software Foundation,
2554# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2555#
2556# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2557# or visit www.oracle.com if you need additional information or have any
2558# questions.
2559#
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571# ... then the rest
2572#
2573# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2574# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2575#
2576# This code is free software; you can redistribute it and/or modify it
2577# under the terms of the GNU General Public License version 2 only, as
2578# published by the Free Software Foundation.  Oracle designates this
2579# particular file as subject to the "Classpath" exception as provided
2580# by Oracle in the LICENSE file that accompanied this code.
2581#
2582# This code is distributed in the hope that it will be useful, but WITHOUT
2583# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2584# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2585# version 2 for more details (a copy is included in the LICENSE file that
2586# accompanied this code).
2587#
2588# You should have received a copy of the GNU General Public License version
2589# 2 along with this work; if not, write to the Free Software Foundation,
2590# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2591#
2592# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2593# or visit www.oracle.com if you need additional information or have any
2594# questions.
2595#
2596
2597# Execute the check given as argument, and verify the result
2598# If the Boot JDK was previously found, do nothing
2599# $1 A command line (typically autoconf macro) to execute
2600
2601
2602# Test: Is bootjdk explicitely set by command line arguments?
2603
2604
2605# Test: Is bootjdk available from builddeps?
2606
2607
2608# Test: Is $JAVA_HOME set?
2609
2610
2611# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
2612
2613
2614# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
2615
2616
2617# Look for a jdk in the given path. If there are multiple, try to select the newest.
2618# If found, set BOOT_JDK and BOOT_JDK_FOUND.
2619# $1 = Path to directory containing jdk installations.
2620# $2 = String to append to the found JDK directory to get the proper JDK home
2621
2622
2623# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
2624# environmental variable as base for where to look.
2625# $1 Name of an environmal variable, assumed to point to the Program Files directory.
2626
2627
2628# Test: Is there a JDK installed in default, well-known locations?
2629
2630
2631# Check that a command-line tool in the Boot JDK is correct
2632# $1 = name of variable to assign
2633# $2 = name of binary
2634
2635
2636###############################################################################
2637#
2638# We need a Boot JDK to bootstrap the build.
2639#
2640
2641
2642
2643
2644
2645#
2646# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2647# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2648#
2649# This code is free software; you can redistribute it and/or modify it
2650# under the terms of the GNU General Public License version 2 only, as
2651# published by the Free Software Foundation.  Oracle designates this
2652# particular file as subject to the "Classpath" exception as provided
2653# by Oracle in the LICENSE file that accompanied this code.
2654#
2655# This code is distributed in the hope that it will be useful, but WITHOUT
2656# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2657# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2658# version 2 for more details (a copy is included in the LICENSE file that
2659# accompanied this code).
2660#
2661# You should have received a copy of the GNU General Public License version
2662# 2 along with this work; if not, write to the Free Software Foundation,
2663# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2664#
2665# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2666# or visit www.oracle.com if you need additional information or have any
2667# questions.
2668#
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687#
2688# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2689# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2690#
2691# This code is free software; you can redistribute it and/or modify it
2692# under the terms of the GNU General Public License version 2 only, as
2693# published by the Free Software Foundation.  Oracle designates this
2694# particular file as subject to the "Classpath" exception as provided
2695# by Oracle in the LICENSE file that accompanied this code.
2696#
2697# This code is distributed in the hope that it will be useful, but WITHOUT
2698# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2699# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2700# version 2 for more details (a copy is included in the LICENSE file that
2701# accompanied this code).
2702#
2703# You should have received a copy of the GNU General Public License version
2704# 2 along with this work; if not, write to the Free Software Foundation,
2705# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2706#
2707# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2708# or visit www.oracle.com if you need additional information or have any
2709# questions.
2710#
2711
2712
2713
2714
2715
2716cygwin_help() {
2717    case $1 in
2718    unzip)
2719        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
2720    zip)
2721        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
2722    make)
2723        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
2724    * )
2725       break ;;
2726    esac
2727}
2728
2729apt_help() {
2730    case $1 in
2731    devkit)
2732        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
2733    openjdk)
2734        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
2735    alsa)
2736        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
2737    cups)
2738        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
2739    freetype2)
2740        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
2741    pulse)
2742        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
2743    x11)
2744        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
2745    ccache)
2746        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
2747    * )
2748       break ;;
2749    esac
2750}
2751
2752yum_help() {
2753    case $1 in
2754    devkit)
2755        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
2756    openjdk)
2757        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
2758    alsa)
2759        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
2760    cups)
2761        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
2762    freetype2)
2763        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
2764    pulse)
2765        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
2766    x11)
2767        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
2768    ccache)
2769        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
2770    * )
2771       break ;;
2772    esac
2773}
2774
2775port_help() {
2776    PKGHANDLER_COMMAND=""
2777}
2778
2779pkgutil_help() {
2780    PKGHANDLER_COMMAND=""
2781}
2782
2783pkgadd_help() {
2784    PKGHANDLER_COMMAND=""
2785}
2786
2787
2788
2789#
2790# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2791# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2792#
2793# This code is free software; you can redistribute it and/or modify it
2794# under the terms of the GNU General Public License version 2 only, as
2795# published by the Free Software Foundation.  Oracle designates this
2796# particular file as subject to the "Classpath" exception as provided
2797# by Oracle in the LICENSE file that accompanied this code.
2798#
2799# This code is distributed in the hope that it will be useful, but WITHOUT
2800# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2801# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2802# version 2 for more details (a copy is included in the LICENSE file that
2803# accompanied this code).
2804#
2805# You should have received a copy of the GNU General Public License version
2806# 2 along with this work; if not, write to the Free Software Foundation,
2807# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2808#
2809# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2810# or visit www.oracle.com if you need additional information or have any
2811# questions.
2812#
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828# Support for customization of the build process. Some build files
2829# will include counterparts from this location, if they exist. This allows
2830# for a degree of customization of the build targets and the rules/recipes
2831# to create them
2832
2833# Check whether --with-custom-make-dir was given.
2834if test "${with_custom_make_dir+set}" = set; then
2835  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
2836fi
2837
2838
2839
2840#
2841# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2842# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2843#
2844# This code is free software; you can redistribute it and/or modify it
2845# under the terms of the GNU General Public License version 2 only, as
2846# published by the Free Software Foundation.  Oracle designates this
2847# particular file as subject to the "Classpath" exception as provided
2848# by Oracle in the LICENSE file that accompanied this code.
2849#
2850# This code is distributed in the hope that it will be useful, but WITHOUT
2851# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2852# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2853# version 2 for more details (a copy is included in the LICENSE file that
2854# accompanied this code).
2855#
2856# You should have received a copy of the GNU General Public License version
2857# 2 along with this work; if not, write to the Free Software Foundation,
2858# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2859#
2860# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2861# or visit www.oracle.com if you need additional information or have any
2862# questions.
2863#
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879#
2880# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2881# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2882#
2883# This code is free software; you can redistribute it and/or modify it
2884# under the terms of the GNU General Public License version 2 only, as
2885# published by the Free Software Foundation.  Oracle designates this
2886# particular file as subject to the "Classpath" exception as provided
2887# by Oracle in the LICENSE file that accompanied this code.
2888#
2889# This code is distributed in the hope that it will be useful, but WITHOUT
2890# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2891# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2892# version 2 for more details (a copy is included in the LICENSE file that
2893# accompanied this code).
2894#
2895# You should have received a copy of the GNU General Public License version
2896# 2 along with this work; if not, write to the Free Software Foundation,
2897# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2898#
2899# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2900# or visit www.oracle.com if you need additional information or have any
2901# questions.
2902#
2903
2904# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
2905# Converts autoconf style CPU name to OpenJDK style, into
2906# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
2907
2908
2909# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
2910# Converts autoconf style OS name to OpenJDK style, into
2911# VAR_OS and VAR_OS_API.
2912
2913
2914# Expects $host_os $host_cpu $build_os and $build_cpu
2915# and $with_target_bits to have been setup!
2916#
2917# Translate the standard triplet(quadruplet) definition
2918# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
2919# OPENJDK_BUILD_OS, etc.
2920
2921
2922# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
2923# accordingly. Must be done after setting up build and target system, but before
2924# doing anything else with these values.
2925
2926
2927    # Setup the legacy variables, for controlling the old makefiles.
2928    #
2929
2930
2931
2932
2933#%%% Build and target systems %%%
2934
2935
2936
2937
2938# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
2939# Add -mX to various FLAGS variables.
2940
2941
2942
2943
2944
2945
2946#
2947# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2948# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2949#
2950# This code is free software; you can redistribute it and/or modify it
2951# under the terms of the GNU General Public License version 2 only, as
2952# published by the Free Software Foundation.  Oracle designates this
2953# particular file as subject to the "Classpath" exception as provided
2954# by Oracle in the LICENSE file that accompanied this code.
2955#
2956# This code is distributed in the hope that it will be useful, but WITHOUT
2957# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2958# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2959# version 2 for more details (a copy is included in the LICENSE file that
2960# accompanied this code).
2961#
2962# You should have received a copy of the GNU General Public License version
2963# 2 along with this work; if not, write to the Free Software Foundation,
2964# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2965#
2966# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2967# or visit www.oracle.com if you need additional information or have any
2968# questions.
2969#
2970
2971
2972
2973
2974
2975
2976
2977
2978#
2979# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2980# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2981#
2982# This code is free software; you can redistribute it and/or modify it
2983# under the terms of the GNU General Public License version 2 only, as
2984# published by the Free Software Foundation.  Oracle designates this
2985# particular file as subject to the "Classpath" exception as provided
2986# by Oracle in the LICENSE file that accompanied this code.
2987#
2988# This code is distributed in the hope that it will be useful, but WITHOUT
2989# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2990# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2991# version 2 for more details (a copy is included in the LICENSE file that
2992# accompanied this code).
2993#
2994# You should have received a copy of the GNU General Public License version
2995# 2 along with this work; if not, write to the Free Software Foundation,
2996# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2997#
2998# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2999# or visit www.oracle.com if you need additional information or have any
3000# questions.
3001#
3002
3003# $1 = compiler to test (CC or CXX)
3004# $2 = human readable name of compiler (C or C++)
3005
3006
3007
3008
3009
3010# $1 = compiler to test (CC or CXX)
3011# $2 = human readable name of compiler (C or C++)
3012# $3 = list of compiler names to search for
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025#
3026# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3027# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3028#
3029# This code is free software; you can redistribute it and/or modify it
3030# under the terms of the GNU General Public License version 2 only, as
3031# published by the Free Software Foundation.  Oracle designates this
3032# particular file as subject to the "Classpath" exception as provided
3033# by Oracle in the LICENSE file that accompanied this code.
3034#
3035# This code is distributed in the hope that it will be useful, but WITHOUT
3036# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3037# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3038# version 2 for more details (a copy is included in the LICENSE file that
3039# accompanied this code).
3040#
3041# You should have received a copy of the GNU General Public License version
3042# 2 along with this work; if not, write to the Free Software Foundation,
3043# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3044#
3045# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3046# or visit www.oracle.com if you need additional information or have any
3047# questions.
3048#
3049
3050
3051
3052
3053
3054
3055
3056# Check if the VS env variables were setup prior to running configure.
3057# If not, then find vcvarsall.bat and run it automatically, and integrate
3058# the set env variables into the spec file.
3059
3060
3061
3062
3063
3064
3065# This line needs to be here, verbatim, after all includes and the dummy hook
3066# definitions. It is replaced with custom functionality when building
3067# custom sources.
3068#CUSTOM_AUTOCONF_INCLUDE
3069
3070# Do not change or remove the following line, it is needed for consistency checks:
3071DATE_WHEN_GENERATED=1352916966
3072
3073###############################################################################
3074#
3075# Initialization / Boot-strapping
3076#
3077# The bootstrapping process needs to solve the "chicken or the egg" problem,
3078# thus it jumps back and forth, each time gaining something needed later on.
3079#
3080###############################################################################
3081
3082# Basic initialization that must happen first of all
3083
3084# Save the original command line. This is passed to us by the wrapper configure script.
3085
3086DATE_WHEN_CONFIGURED=`LANG=C date`
3087
3088{ $as_echo "$as_me:$LINENO: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3089$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3090{ $as_echo "$as_me:$LINENO: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3091$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3092
3093
3094
3095# Start with tools that do not need have cross compilation support
3096# and can be expected to be found in the default PATH. These tools are
3097# used by configure. Nor are these tools expected to be found in the
3098# devkit from the builddeps server either, since they are
3099# needed to download the devkit.
3100
3101# First are all the simple required tools.
3102
3103    for ac_prog in basename
3104do
3105  # Extract the first word of "$ac_prog", so it can be a program name with args.
3106set dummy $ac_prog; ac_word=$2
3107{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3108$as_echo_n "checking for $ac_word... " >&6; }
3109if test "${ac_cv_path_BASENAME+set}" = set; then
3110  $as_echo_n "(cached) " >&6
3111else
3112  case $BASENAME in
3113  [\\/]* | ?:[\\/]*)
3114  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3115  ;;
3116  *)
3117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3118for as_dir in $PATH
3119do
3120  IFS=$as_save_IFS
3121  test -z "$as_dir" && as_dir=.
3122  for ac_exec_ext in '' $ac_executable_extensions; do
3123  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3124    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3125    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3126    break 2
3127  fi
3128done
3129done
3130IFS=$as_save_IFS
3131
3132  ;;
3133esac
3134fi
3135BASENAME=$ac_cv_path_BASENAME
3136if test -n "$BASENAME"; then
3137  { $as_echo "$as_me:$LINENO: result: $BASENAME" >&5
3138$as_echo "$BASENAME" >&6; }
3139else
3140  { $as_echo "$as_me:$LINENO: result: no" >&5
3141$as_echo "no" >&6; }
3142fi
3143
3144
3145  test -n "$BASENAME" && break
3146done
3147
3148
3149    if test "x$BASENAME" = x; then
3150        if test "xbasename" = x; then
3151          PROG_NAME=basename
3152        else
3153          PROG_NAME=basename
3154        fi
3155        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3156$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3157        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3158$as_echo "$as_me: error: Cannot continue" >&2;}
3159   { (exit 1); exit 1; }; }
3160    fi
3161
3162
3163
3164    for ac_prog in bash
3165do
3166  # Extract the first word of "$ac_prog", so it can be a program name with args.
3167set dummy $ac_prog; ac_word=$2
3168{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3169$as_echo_n "checking for $ac_word... " >&6; }
3170if test "${ac_cv_path_BASH+set}" = set; then
3171  $as_echo_n "(cached) " >&6
3172else
3173  case $BASH in
3174  [\\/]* | ?:[\\/]*)
3175  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3176  ;;
3177  *)
3178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3179for as_dir in $PATH
3180do
3181  IFS=$as_save_IFS
3182  test -z "$as_dir" && as_dir=.
3183  for ac_exec_ext in '' $ac_executable_extensions; do
3184  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3185    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3186    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3187    break 2
3188  fi
3189done
3190done
3191IFS=$as_save_IFS
3192
3193  ;;
3194esac
3195fi
3196BASH=$ac_cv_path_BASH
3197if test -n "$BASH"; then
3198  { $as_echo "$as_me:$LINENO: result: $BASH" >&5
3199$as_echo "$BASH" >&6; }
3200else
3201  { $as_echo "$as_me:$LINENO: result: no" >&5
3202$as_echo "no" >&6; }
3203fi
3204
3205
3206  test -n "$BASH" && break
3207done
3208
3209
3210    if test "x$BASH" = x; then
3211        if test "xbash" = x; then
3212          PROG_NAME=bash
3213        else
3214          PROG_NAME=bash
3215        fi
3216        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3217$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3218        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3219$as_echo "$as_me: error: Cannot continue" >&2;}
3220   { (exit 1); exit 1; }; }
3221    fi
3222
3223
3224
3225    for ac_prog in cat
3226do
3227  # Extract the first word of "$ac_prog", so it can be a program name with args.
3228set dummy $ac_prog; ac_word=$2
3229{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3230$as_echo_n "checking for $ac_word... " >&6; }
3231if test "${ac_cv_path_CAT+set}" = set; then
3232  $as_echo_n "(cached) " >&6
3233else
3234  case $CAT in
3235  [\\/]* | ?:[\\/]*)
3236  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3237  ;;
3238  *)
3239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3240for as_dir in $PATH
3241do
3242  IFS=$as_save_IFS
3243  test -z "$as_dir" && as_dir=.
3244  for ac_exec_ext in '' $ac_executable_extensions; do
3245  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3246    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3247    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3248    break 2
3249  fi
3250done
3251done
3252IFS=$as_save_IFS
3253
3254  ;;
3255esac
3256fi
3257CAT=$ac_cv_path_CAT
3258if test -n "$CAT"; then
3259  { $as_echo "$as_me:$LINENO: result: $CAT" >&5
3260$as_echo "$CAT" >&6; }
3261else
3262  { $as_echo "$as_me:$LINENO: result: no" >&5
3263$as_echo "no" >&6; }
3264fi
3265
3266
3267  test -n "$CAT" && break
3268done
3269
3270
3271    if test "x$CAT" = x; then
3272        if test "xcat" = x; then
3273          PROG_NAME=cat
3274        else
3275          PROG_NAME=cat
3276        fi
3277        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3278$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3279        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3280$as_echo "$as_me: error: Cannot continue" >&2;}
3281   { (exit 1); exit 1; }; }
3282    fi
3283
3284
3285
3286    for ac_prog in chmod
3287do
3288  # Extract the first word of "$ac_prog", so it can be a program name with args.
3289set dummy $ac_prog; ac_word=$2
3290{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3291$as_echo_n "checking for $ac_word... " >&6; }
3292if test "${ac_cv_path_CHMOD+set}" = set; then
3293  $as_echo_n "(cached) " >&6
3294else
3295  case $CHMOD in
3296  [\\/]* | ?:[\\/]*)
3297  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3298  ;;
3299  *)
3300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3301for as_dir in $PATH
3302do
3303  IFS=$as_save_IFS
3304  test -z "$as_dir" && as_dir=.
3305  for ac_exec_ext in '' $ac_executable_extensions; do
3306  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3307    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3308    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3309    break 2
3310  fi
3311done
3312done
3313IFS=$as_save_IFS
3314
3315  ;;
3316esac
3317fi
3318CHMOD=$ac_cv_path_CHMOD
3319if test -n "$CHMOD"; then
3320  { $as_echo "$as_me:$LINENO: result: $CHMOD" >&5
3321$as_echo "$CHMOD" >&6; }
3322else
3323  { $as_echo "$as_me:$LINENO: result: no" >&5
3324$as_echo "no" >&6; }
3325fi
3326
3327
3328  test -n "$CHMOD" && break
3329done
3330
3331
3332    if test "x$CHMOD" = x; then
3333        if test "xchmod" = x; then
3334          PROG_NAME=chmod
3335        else
3336          PROG_NAME=chmod
3337        fi
3338        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3339$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3340        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3341$as_echo "$as_me: error: Cannot continue" >&2;}
3342   { (exit 1); exit 1; }; }
3343    fi
3344
3345
3346
3347    for ac_prog in cmp
3348do
3349  # Extract the first word of "$ac_prog", so it can be a program name with args.
3350set dummy $ac_prog; ac_word=$2
3351{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3352$as_echo_n "checking for $ac_word... " >&6; }
3353if test "${ac_cv_path_CMP+set}" = set; then
3354  $as_echo_n "(cached) " >&6
3355else
3356  case $CMP in
3357  [\\/]* | ?:[\\/]*)
3358  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3359  ;;
3360  *)
3361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3362for as_dir in $PATH
3363do
3364  IFS=$as_save_IFS
3365  test -z "$as_dir" && as_dir=.
3366  for ac_exec_ext in '' $ac_executable_extensions; do
3367  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3368    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3369    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3370    break 2
3371  fi
3372done
3373done
3374IFS=$as_save_IFS
3375
3376  ;;
3377esac
3378fi
3379CMP=$ac_cv_path_CMP
3380if test -n "$CMP"; then
3381  { $as_echo "$as_me:$LINENO: result: $CMP" >&5
3382$as_echo "$CMP" >&6; }
3383else
3384  { $as_echo "$as_me:$LINENO: result: no" >&5
3385$as_echo "no" >&6; }
3386fi
3387
3388
3389  test -n "$CMP" && break
3390done
3391
3392
3393    if test "x$CMP" = x; then
3394        if test "xcmp" = x; then
3395          PROG_NAME=cmp
3396        else
3397          PROG_NAME=cmp
3398        fi
3399        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3400$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3401        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3402$as_echo "$as_me: error: Cannot continue" >&2;}
3403   { (exit 1); exit 1; }; }
3404    fi
3405
3406
3407
3408    for ac_prog in cp
3409do
3410  # Extract the first word of "$ac_prog", so it can be a program name with args.
3411set dummy $ac_prog; ac_word=$2
3412{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3413$as_echo_n "checking for $ac_word... " >&6; }
3414if test "${ac_cv_path_CP+set}" = set; then
3415  $as_echo_n "(cached) " >&6
3416else
3417  case $CP in
3418  [\\/]* | ?:[\\/]*)
3419  ac_cv_path_CP="$CP" # Let the user override the test with a path.
3420  ;;
3421  *)
3422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3423for as_dir in $PATH
3424do
3425  IFS=$as_save_IFS
3426  test -z "$as_dir" && as_dir=.
3427  for ac_exec_ext in '' $ac_executable_extensions; do
3428  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3429    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
3430    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3431    break 2
3432  fi
3433done
3434done
3435IFS=$as_save_IFS
3436
3437  ;;
3438esac
3439fi
3440CP=$ac_cv_path_CP
3441if test -n "$CP"; then
3442  { $as_echo "$as_me:$LINENO: result: $CP" >&5
3443$as_echo "$CP" >&6; }
3444else
3445  { $as_echo "$as_me:$LINENO: result: no" >&5
3446$as_echo "no" >&6; }
3447fi
3448
3449
3450  test -n "$CP" && break
3451done
3452
3453
3454    if test "x$CP" = x; then
3455        if test "xcp" = x; then
3456          PROG_NAME=cp
3457        else
3458          PROG_NAME=cp
3459        fi
3460        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3461$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3462        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3463$as_echo "$as_me: error: Cannot continue" >&2;}
3464   { (exit 1); exit 1; }; }
3465    fi
3466
3467
3468
3469    for ac_prog in cut
3470do
3471  # Extract the first word of "$ac_prog", so it can be a program name with args.
3472set dummy $ac_prog; ac_word=$2
3473{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3474$as_echo_n "checking for $ac_word... " >&6; }
3475if test "${ac_cv_path_CUT+set}" = set; then
3476  $as_echo_n "(cached) " >&6
3477else
3478  case $CUT in
3479  [\\/]* | ?:[\\/]*)
3480  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
3481  ;;
3482  *)
3483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3484for as_dir in $PATH
3485do
3486  IFS=$as_save_IFS
3487  test -z "$as_dir" && as_dir=.
3488  for ac_exec_ext in '' $ac_executable_extensions; do
3489  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3490    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
3491    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3492    break 2
3493  fi
3494done
3495done
3496IFS=$as_save_IFS
3497
3498  ;;
3499esac
3500fi
3501CUT=$ac_cv_path_CUT
3502if test -n "$CUT"; then
3503  { $as_echo "$as_me:$LINENO: result: $CUT" >&5
3504$as_echo "$CUT" >&6; }
3505else
3506  { $as_echo "$as_me:$LINENO: result: no" >&5
3507$as_echo "no" >&6; }
3508fi
3509
3510
3511  test -n "$CUT" && break
3512done
3513
3514
3515    if test "x$CUT" = x; then
3516        if test "xcut" = x; then
3517          PROG_NAME=cut
3518        else
3519          PROG_NAME=cut
3520        fi
3521        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3522$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3523        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3524$as_echo "$as_me: error: Cannot continue" >&2;}
3525   { (exit 1); exit 1; }; }
3526    fi
3527
3528
3529
3530    for ac_prog in date
3531do
3532  # Extract the first word of "$ac_prog", so it can be a program name with args.
3533set dummy $ac_prog; ac_word=$2
3534{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3535$as_echo_n "checking for $ac_word... " >&6; }
3536if test "${ac_cv_path_DATE+set}" = set; then
3537  $as_echo_n "(cached) " >&6
3538else
3539  case $DATE in
3540  [\\/]* | ?:[\\/]*)
3541  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
3542  ;;
3543  *)
3544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3545for as_dir in $PATH
3546do
3547  IFS=$as_save_IFS
3548  test -z "$as_dir" && as_dir=.
3549  for ac_exec_ext in '' $ac_executable_extensions; do
3550  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3551    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
3552    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3553    break 2
3554  fi
3555done
3556done
3557IFS=$as_save_IFS
3558
3559  ;;
3560esac
3561fi
3562DATE=$ac_cv_path_DATE
3563if test -n "$DATE"; then
3564  { $as_echo "$as_me:$LINENO: result: $DATE" >&5
3565$as_echo "$DATE" >&6; }
3566else
3567  { $as_echo "$as_me:$LINENO: result: no" >&5
3568$as_echo "no" >&6; }
3569fi
3570
3571
3572  test -n "$DATE" && break
3573done
3574
3575
3576    if test "x$DATE" = x; then
3577        if test "xdate" = x; then
3578          PROG_NAME=date
3579        else
3580          PROG_NAME=date
3581        fi
3582        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3583$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3584        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3585$as_echo "$as_me: error: Cannot continue" >&2;}
3586   { (exit 1); exit 1; }; }
3587    fi
3588
3589
3590
3591    for ac_prog in gdiff diff
3592do
3593  # Extract the first word of "$ac_prog", so it can be a program name with args.
3594set dummy $ac_prog; ac_word=$2
3595{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3596$as_echo_n "checking for $ac_word... " >&6; }
3597if test "${ac_cv_path_DIFF+set}" = set; then
3598  $as_echo_n "(cached) " >&6
3599else
3600  case $DIFF in
3601  [\\/]* | ?:[\\/]*)
3602  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
3603  ;;
3604  *)
3605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3606for as_dir in $PATH
3607do
3608  IFS=$as_save_IFS
3609  test -z "$as_dir" && as_dir=.
3610  for ac_exec_ext in '' $ac_executable_extensions; do
3611  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3612    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
3613    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3614    break 2
3615  fi
3616done
3617done
3618IFS=$as_save_IFS
3619
3620  ;;
3621esac
3622fi
3623DIFF=$ac_cv_path_DIFF
3624if test -n "$DIFF"; then
3625  { $as_echo "$as_me:$LINENO: result: $DIFF" >&5
3626$as_echo "$DIFF" >&6; }
3627else
3628  { $as_echo "$as_me:$LINENO: result: no" >&5
3629$as_echo "no" >&6; }
3630fi
3631
3632
3633  test -n "$DIFF" && break
3634done
3635
3636
3637    if test "x$DIFF" = x; then
3638        if test "xgdiff diff" = x; then
3639          PROG_NAME=diff
3640        else
3641          PROG_NAME=gdiff diff
3642        fi
3643        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3644$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3645        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3646$as_echo "$as_me: error: Cannot continue" >&2;}
3647   { (exit 1); exit 1; }; }
3648    fi
3649
3650
3651
3652    for ac_prog in dirname
3653do
3654  # Extract the first word of "$ac_prog", so it can be a program name with args.
3655set dummy $ac_prog; ac_word=$2
3656{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3657$as_echo_n "checking for $ac_word... " >&6; }
3658if test "${ac_cv_path_DIRNAME+set}" = set; then
3659  $as_echo_n "(cached) " >&6
3660else
3661  case $DIRNAME in
3662  [\\/]* | ?:[\\/]*)
3663  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
3664  ;;
3665  *)
3666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH
3668do
3669  IFS=$as_save_IFS
3670  test -z "$as_dir" && as_dir=.
3671  for ac_exec_ext in '' $ac_executable_extensions; do
3672  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3673    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
3674    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3675    break 2
3676  fi
3677done
3678done
3679IFS=$as_save_IFS
3680
3681  ;;
3682esac
3683fi
3684DIRNAME=$ac_cv_path_DIRNAME
3685if test -n "$DIRNAME"; then
3686  { $as_echo "$as_me:$LINENO: result: $DIRNAME" >&5
3687$as_echo "$DIRNAME" >&6; }
3688else
3689  { $as_echo "$as_me:$LINENO: result: no" >&5
3690$as_echo "no" >&6; }
3691fi
3692
3693
3694  test -n "$DIRNAME" && break
3695done
3696
3697
3698    if test "x$DIRNAME" = x; then
3699        if test "xdirname" = x; then
3700          PROG_NAME=dirname
3701        else
3702          PROG_NAME=dirname
3703        fi
3704        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3705$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3706        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3707$as_echo "$as_me: error: Cannot continue" >&2;}
3708   { (exit 1); exit 1; }; }
3709    fi
3710
3711
3712
3713    for ac_prog in echo
3714do
3715  # Extract the first word of "$ac_prog", so it can be a program name with args.
3716set dummy $ac_prog; ac_word=$2
3717{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3718$as_echo_n "checking for $ac_word... " >&6; }
3719if test "${ac_cv_path_ECHO+set}" = set; then
3720  $as_echo_n "(cached) " >&6
3721else
3722  case $ECHO in
3723  [\\/]* | ?:[\\/]*)
3724  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
3725  ;;
3726  *)
3727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3728for as_dir in $PATH
3729do
3730  IFS=$as_save_IFS
3731  test -z "$as_dir" && as_dir=.
3732  for ac_exec_ext in '' $ac_executable_extensions; do
3733  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3734    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
3735    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3736    break 2
3737  fi
3738done
3739done
3740IFS=$as_save_IFS
3741
3742  ;;
3743esac
3744fi
3745ECHO=$ac_cv_path_ECHO
3746if test -n "$ECHO"; then
3747  { $as_echo "$as_me:$LINENO: result: $ECHO" >&5
3748$as_echo "$ECHO" >&6; }
3749else
3750  { $as_echo "$as_me:$LINENO: result: no" >&5
3751$as_echo "no" >&6; }
3752fi
3753
3754
3755  test -n "$ECHO" && break
3756done
3757
3758
3759    if test "x$ECHO" = x; then
3760        if test "xecho" = x; then
3761          PROG_NAME=echo
3762        else
3763          PROG_NAME=echo
3764        fi
3765        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3766$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3767        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3768$as_echo "$as_me: error: Cannot continue" >&2;}
3769   { (exit 1); exit 1; }; }
3770    fi
3771
3772
3773
3774    for ac_prog in expr
3775do
3776  # Extract the first word of "$ac_prog", so it can be a program name with args.
3777set dummy $ac_prog; ac_word=$2
3778{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3779$as_echo_n "checking for $ac_word... " >&6; }
3780if test "${ac_cv_path_EXPR+set}" = set; then
3781  $as_echo_n "(cached) " >&6
3782else
3783  case $EXPR in
3784  [\\/]* | ?:[\\/]*)
3785  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
3786  ;;
3787  *)
3788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3789for as_dir in $PATH
3790do
3791  IFS=$as_save_IFS
3792  test -z "$as_dir" && as_dir=.
3793  for ac_exec_ext in '' $ac_executable_extensions; do
3794  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3795    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
3796    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3797    break 2
3798  fi
3799done
3800done
3801IFS=$as_save_IFS
3802
3803  ;;
3804esac
3805fi
3806EXPR=$ac_cv_path_EXPR
3807if test -n "$EXPR"; then
3808  { $as_echo "$as_me:$LINENO: result: $EXPR" >&5
3809$as_echo "$EXPR" >&6; }
3810else
3811  { $as_echo "$as_me:$LINENO: result: no" >&5
3812$as_echo "no" >&6; }
3813fi
3814
3815
3816  test -n "$EXPR" && break
3817done
3818
3819
3820    if test "x$EXPR" = x; then
3821        if test "xexpr" = x; then
3822          PROG_NAME=expr
3823        else
3824          PROG_NAME=expr
3825        fi
3826        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3827$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3828        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3829$as_echo "$as_me: error: Cannot continue" >&2;}
3830   { (exit 1); exit 1; }; }
3831    fi
3832
3833
3834
3835    for ac_prog in file
3836do
3837  # Extract the first word of "$ac_prog", so it can be a program name with args.
3838set dummy $ac_prog; ac_word=$2
3839{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3840$as_echo_n "checking for $ac_word... " >&6; }
3841if test "${ac_cv_path_FILE+set}" = set; then
3842  $as_echo_n "(cached) " >&6
3843else
3844  case $FILE in
3845  [\\/]* | ?:[\\/]*)
3846  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
3847  ;;
3848  *)
3849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3850for as_dir in $PATH
3851do
3852  IFS=$as_save_IFS
3853  test -z "$as_dir" && as_dir=.
3854  for ac_exec_ext in '' $ac_executable_extensions; do
3855  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3856    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
3857    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3858    break 2
3859  fi
3860done
3861done
3862IFS=$as_save_IFS
3863
3864  ;;
3865esac
3866fi
3867FILE=$ac_cv_path_FILE
3868if test -n "$FILE"; then
3869  { $as_echo "$as_me:$LINENO: result: $FILE" >&5
3870$as_echo "$FILE" >&6; }
3871else
3872  { $as_echo "$as_me:$LINENO: result: no" >&5
3873$as_echo "no" >&6; }
3874fi
3875
3876
3877  test -n "$FILE" && break
3878done
3879
3880
3881    if test "x$FILE" = x; then
3882        if test "xfile" = x; then
3883          PROG_NAME=file
3884        else
3885          PROG_NAME=file
3886        fi
3887        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3888$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3889        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3890$as_echo "$as_me: error: Cannot continue" >&2;}
3891   { (exit 1); exit 1; }; }
3892    fi
3893
3894
3895
3896    for ac_prog in find
3897do
3898  # Extract the first word of "$ac_prog", so it can be a program name with args.
3899set dummy $ac_prog; ac_word=$2
3900{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3901$as_echo_n "checking for $ac_word... " >&6; }
3902if test "${ac_cv_path_FIND+set}" = set; then
3903  $as_echo_n "(cached) " >&6
3904else
3905  case $FIND in
3906  [\\/]* | ?:[\\/]*)
3907  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
3908  ;;
3909  *)
3910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3911for as_dir in $PATH
3912do
3913  IFS=$as_save_IFS
3914  test -z "$as_dir" && as_dir=.
3915  for ac_exec_ext in '' $ac_executable_extensions; do
3916  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3917    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
3918    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3919    break 2
3920  fi
3921done
3922done
3923IFS=$as_save_IFS
3924
3925  ;;
3926esac
3927fi
3928FIND=$ac_cv_path_FIND
3929if test -n "$FIND"; then
3930  { $as_echo "$as_me:$LINENO: result: $FIND" >&5
3931$as_echo "$FIND" >&6; }
3932else
3933  { $as_echo "$as_me:$LINENO: result: no" >&5
3934$as_echo "no" >&6; }
3935fi
3936
3937
3938  test -n "$FIND" && break
3939done
3940
3941
3942    if test "x$FIND" = x; then
3943        if test "xfind" = x; then
3944          PROG_NAME=find
3945        else
3946          PROG_NAME=find
3947        fi
3948        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
3949$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3950        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
3951$as_echo "$as_me: error: Cannot continue" >&2;}
3952   { (exit 1); exit 1; }; }
3953    fi
3954
3955
3956
3957    for ac_prog in head
3958do
3959  # Extract the first word of "$ac_prog", so it can be a program name with args.
3960set dummy $ac_prog; ac_word=$2
3961{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3962$as_echo_n "checking for $ac_word... " >&6; }
3963if test "${ac_cv_path_HEAD+set}" = set; then
3964  $as_echo_n "(cached) " >&6
3965else
3966  case $HEAD in
3967  [\\/]* | ?:[\\/]*)
3968  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
3969  ;;
3970  *)
3971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3972for as_dir in $PATH
3973do
3974  IFS=$as_save_IFS
3975  test -z "$as_dir" && as_dir=.
3976  for ac_exec_ext in '' $ac_executable_extensions; do
3977  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3978    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
3979    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3980    break 2
3981  fi
3982done
3983done
3984IFS=$as_save_IFS
3985
3986  ;;
3987esac
3988fi
3989HEAD=$ac_cv_path_HEAD
3990if test -n "$HEAD"; then
3991  { $as_echo "$as_me:$LINENO: result: $HEAD" >&5
3992$as_echo "$HEAD" >&6; }
3993else
3994  { $as_echo "$as_me:$LINENO: result: no" >&5
3995$as_echo "no" >&6; }
3996fi
3997
3998
3999  test -n "$HEAD" && break
4000done
4001
4002
4003    if test "x$HEAD" = x; then
4004        if test "xhead" = x; then
4005          PROG_NAME=head
4006        else
4007          PROG_NAME=head
4008        fi
4009        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4010$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4011        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4012$as_echo "$as_me: error: Cannot continue" >&2;}
4013   { (exit 1); exit 1; }; }
4014    fi
4015
4016
4017
4018    for ac_prog in ln
4019do
4020  # Extract the first word of "$ac_prog", so it can be a program name with args.
4021set dummy $ac_prog; ac_word=$2
4022{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4023$as_echo_n "checking for $ac_word... " >&6; }
4024if test "${ac_cv_path_LN+set}" = set; then
4025  $as_echo_n "(cached) " >&6
4026else
4027  case $LN in
4028  [\\/]* | ?:[\\/]*)
4029  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4030  ;;
4031  *)
4032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4033for as_dir in $PATH
4034do
4035  IFS=$as_save_IFS
4036  test -z "$as_dir" && as_dir=.
4037  for ac_exec_ext in '' $ac_executable_extensions; do
4038  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4039    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4040    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4041    break 2
4042  fi
4043done
4044done
4045IFS=$as_save_IFS
4046
4047  ;;
4048esac
4049fi
4050LN=$ac_cv_path_LN
4051if test -n "$LN"; then
4052  { $as_echo "$as_me:$LINENO: result: $LN" >&5
4053$as_echo "$LN" >&6; }
4054else
4055  { $as_echo "$as_me:$LINENO: result: no" >&5
4056$as_echo "no" >&6; }
4057fi
4058
4059
4060  test -n "$LN" && break
4061done
4062
4063
4064    if test "x$LN" = x; then
4065        if test "xln" = x; then
4066          PROG_NAME=ln
4067        else
4068          PROG_NAME=ln
4069        fi
4070        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4071$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4072        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4073$as_echo "$as_me: error: Cannot continue" >&2;}
4074   { (exit 1); exit 1; }; }
4075    fi
4076
4077
4078
4079    for ac_prog in ls
4080do
4081  # Extract the first word of "$ac_prog", so it can be a program name with args.
4082set dummy $ac_prog; ac_word=$2
4083{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4084$as_echo_n "checking for $ac_word... " >&6; }
4085if test "${ac_cv_path_LS+set}" = set; then
4086  $as_echo_n "(cached) " >&6
4087else
4088  case $LS in
4089  [\\/]* | ?:[\\/]*)
4090  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4091  ;;
4092  *)
4093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4094for as_dir in $PATH
4095do
4096  IFS=$as_save_IFS
4097  test -z "$as_dir" && as_dir=.
4098  for ac_exec_ext in '' $ac_executable_extensions; do
4099  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4100    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4101    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4102    break 2
4103  fi
4104done
4105done
4106IFS=$as_save_IFS
4107
4108  ;;
4109esac
4110fi
4111LS=$ac_cv_path_LS
4112if test -n "$LS"; then
4113  { $as_echo "$as_me:$LINENO: result: $LS" >&5
4114$as_echo "$LS" >&6; }
4115else
4116  { $as_echo "$as_me:$LINENO: result: no" >&5
4117$as_echo "no" >&6; }
4118fi
4119
4120
4121  test -n "$LS" && break
4122done
4123
4124
4125    if test "x$LS" = x; then
4126        if test "xls" = x; then
4127          PROG_NAME=ls
4128        else
4129          PROG_NAME=ls
4130        fi
4131        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4132$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4133        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4134$as_echo "$as_me: error: Cannot continue" >&2;}
4135   { (exit 1); exit 1; }; }
4136    fi
4137
4138
4139
4140    for ac_prog in mkdir
4141do
4142  # Extract the first word of "$ac_prog", so it can be a program name with args.
4143set dummy $ac_prog; ac_word=$2
4144{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4145$as_echo_n "checking for $ac_word... " >&6; }
4146if test "${ac_cv_path_MKDIR+set}" = set; then
4147  $as_echo_n "(cached) " >&6
4148else
4149  case $MKDIR in
4150  [\\/]* | ?:[\\/]*)
4151  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4152  ;;
4153  *)
4154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4155for as_dir in $PATH
4156do
4157  IFS=$as_save_IFS
4158  test -z "$as_dir" && as_dir=.
4159  for ac_exec_ext in '' $ac_executable_extensions; do
4160  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4161    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4162    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4163    break 2
4164  fi
4165done
4166done
4167IFS=$as_save_IFS
4168
4169  ;;
4170esac
4171fi
4172MKDIR=$ac_cv_path_MKDIR
4173if test -n "$MKDIR"; then
4174  { $as_echo "$as_me:$LINENO: result: $MKDIR" >&5
4175$as_echo "$MKDIR" >&6; }
4176else
4177  { $as_echo "$as_me:$LINENO: result: no" >&5
4178$as_echo "no" >&6; }
4179fi
4180
4181
4182  test -n "$MKDIR" && break
4183done
4184
4185
4186    if test "x$MKDIR" = x; then
4187        if test "xmkdir" = x; then
4188          PROG_NAME=mkdir
4189        else
4190          PROG_NAME=mkdir
4191        fi
4192        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4193$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4194        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4195$as_echo "$as_me: error: Cannot continue" >&2;}
4196   { (exit 1); exit 1; }; }
4197    fi
4198
4199
4200
4201    for ac_prog in mktemp
4202do
4203  # Extract the first word of "$ac_prog", so it can be a program name with args.
4204set dummy $ac_prog; ac_word=$2
4205{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4206$as_echo_n "checking for $ac_word... " >&6; }
4207if test "${ac_cv_path_MKTEMP+set}" = set; then
4208  $as_echo_n "(cached) " >&6
4209else
4210  case $MKTEMP in
4211  [\\/]* | ?:[\\/]*)
4212  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4213  ;;
4214  *)
4215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4216for as_dir in $PATH
4217do
4218  IFS=$as_save_IFS
4219  test -z "$as_dir" && as_dir=.
4220  for ac_exec_ext in '' $ac_executable_extensions; do
4221  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4222    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4223    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4224    break 2
4225  fi
4226done
4227done
4228IFS=$as_save_IFS
4229
4230  ;;
4231esac
4232fi
4233MKTEMP=$ac_cv_path_MKTEMP
4234if test -n "$MKTEMP"; then
4235  { $as_echo "$as_me:$LINENO: result: $MKTEMP" >&5
4236$as_echo "$MKTEMP" >&6; }
4237else
4238  { $as_echo "$as_me:$LINENO: result: no" >&5
4239$as_echo "no" >&6; }
4240fi
4241
4242
4243  test -n "$MKTEMP" && break
4244done
4245
4246
4247    if test "x$MKTEMP" = x; then
4248        if test "xmktemp" = x; then
4249          PROG_NAME=mktemp
4250        else
4251          PROG_NAME=mktemp
4252        fi
4253        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4254$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4255        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4256$as_echo "$as_me: error: Cannot continue" >&2;}
4257   { (exit 1); exit 1; }; }
4258    fi
4259
4260
4261
4262    for ac_prog in mv
4263do
4264  # Extract the first word of "$ac_prog", so it can be a program name with args.
4265set dummy $ac_prog; ac_word=$2
4266{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4267$as_echo_n "checking for $ac_word... " >&6; }
4268if test "${ac_cv_path_MV+set}" = set; then
4269  $as_echo_n "(cached) " >&6
4270else
4271  case $MV in
4272  [\\/]* | ?:[\\/]*)
4273  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4274  ;;
4275  *)
4276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4277for as_dir in $PATH
4278do
4279  IFS=$as_save_IFS
4280  test -z "$as_dir" && as_dir=.
4281  for ac_exec_ext in '' $ac_executable_extensions; do
4282  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4283    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4284    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4285    break 2
4286  fi
4287done
4288done
4289IFS=$as_save_IFS
4290
4291  ;;
4292esac
4293fi
4294MV=$ac_cv_path_MV
4295if test -n "$MV"; then
4296  { $as_echo "$as_me:$LINENO: result: $MV" >&5
4297$as_echo "$MV" >&6; }
4298else
4299  { $as_echo "$as_me:$LINENO: result: no" >&5
4300$as_echo "no" >&6; }
4301fi
4302
4303
4304  test -n "$MV" && break
4305done
4306
4307
4308    if test "x$MV" = x; then
4309        if test "xmv" = x; then
4310          PROG_NAME=mv
4311        else
4312          PROG_NAME=mv
4313        fi
4314        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4315$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4316        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4317$as_echo "$as_me: error: Cannot continue" >&2;}
4318   { (exit 1); exit 1; }; }
4319    fi
4320
4321
4322
4323    for ac_prog in printf
4324do
4325  # Extract the first word of "$ac_prog", so it can be a program name with args.
4326set dummy $ac_prog; ac_word=$2
4327{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4328$as_echo_n "checking for $ac_word... " >&6; }
4329if test "${ac_cv_path_PRINTF+set}" = set; then
4330  $as_echo_n "(cached) " >&6
4331else
4332  case $PRINTF in
4333  [\\/]* | ?:[\\/]*)
4334  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
4335  ;;
4336  *)
4337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4338for as_dir in $PATH
4339do
4340  IFS=$as_save_IFS
4341  test -z "$as_dir" && as_dir=.
4342  for ac_exec_ext in '' $ac_executable_extensions; do
4343  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4344    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
4345    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4346    break 2
4347  fi
4348done
4349done
4350IFS=$as_save_IFS
4351
4352  ;;
4353esac
4354fi
4355PRINTF=$ac_cv_path_PRINTF
4356if test -n "$PRINTF"; then
4357  { $as_echo "$as_me:$LINENO: result: $PRINTF" >&5
4358$as_echo "$PRINTF" >&6; }
4359else
4360  { $as_echo "$as_me:$LINENO: result: no" >&5
4361$as_echo "no" >&6; }
4362fi
4363
4364
4365  test -n "$PRINTF" && break
4366done
4367
4368
4369    if test "x$PRINTF" = x; then
4370        if test "xprintf" = x; then
4371          PROG_NAME=printf
4372        else
4373          PROG_NAME=printf
4374        fi
4375        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4376$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4377        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4378$as_echo "$as_me: error: Cannot continue" >&2;}
4379   { (exit 1); exit 1; }; }
4380    fi
4381
4382
4383
4384    for ac_prog in pwd
4385do
4386  # Extract the first word of "$ac_prog", so it can be a program name with args.
4387set dummy $ac_prog; ac_word=$2
4388{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4389$as_echo_n "checking for $ac_word... " >&6; }
4390if test "${ac_cv_path_THEPWDCMD+set}" = set; then
4391  $as_echo_n "(cached) " >&6
4392else
4393  case $THEPWDCMD in
4394  [\\/]* | ?:[\\/]*)
4395  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
4396  ;;
4397  *)
4398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4399for as_dir in $PATH
4400do
4401  IFS=$as_save_IFS
4402  test -z "$as_dir" && as_dir=.
4403  for ac_exec_ext in '' $ac_executable_extensions; do
4404  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4405    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
4406    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4407    break 2
4408  fi
4409done
4410done
4411IFS=$as_save_IFS
4412
4413  ;;
4414esac
4415fi
4416THEPWDCMD=$ac_cv_path_THEPWDCMD
4417if test -n "$THEPWDCMD"; then
4418  { $as_echo "$as_me:$LINENO: result: $THEPWDCMD" >&5
4419$as_echo "$THEPWDCMD" >&6; }
4420else
4421  { $as_echo "$as_me:$LINENO: result: no" >&5
4422$as_echo "no" >&6; }
4423fi
4424
4425
4426  test -n "$THEPWDCMD" && break
4427done
4428
4429
4430    if test "x$THEPWDCMD" = x; then
4431        if test "xpwd" = x; then
4432          PROG_NAME=thepwdcmd
4433        else
4434          PROG_NAME=pwd
4435        fi
4436        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4437$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4438        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4439$as_echo "$as_me: error: Cannot continue" >&2;}
4440   { (exit 1); exit 1; }; }
4441    fi
4442
4443
4444
4445    for ac_prog in rm
4446do
4447  # Extract the first word of "$ac_prog", so it can be a program name with args.
4448set dummy $ac_prog; ac_word=$2
4449{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4450$as_echo_n "checking for $ac_word... " >&6; }
4451if test "${ac_cv_path_RM+set}" = set; then
4452  $as_echo_n "(cached) " >&6
4453else
4454  case $RM in
4455  [\\/]* | ?:[\\/]*)
4456  ac_cv_path_RM="$RM" # Let the user override the test with a path.
4457  ;;
4458  *)
4459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4460for as_dir in $PATH
4461do
4462  IFS=$as_save_IFS
4463  test -z "$as_dir" && as_dir=.
4464  for ac_exec_ext in '' $ac_executable_extensions; do
4465  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4466    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
4467    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4468    break 2
4469  fi
4470done
4471done
4472IFS=$as_save_IFS
4473
4474  ;;
4475esac
4476fi
4477RM=$ac_cv_path_RM
4478if test -n "$RM"; then
4479  { $as_echo "$as_me:$LINENO: result: $RM" >&5
4480$as_echo "$RM" >&6; }
4481else
4482  { $as_echo "$as_me:$LINENO: result: no" >&5
4483$as_echo "no" >&6; }
4484fi
4485
4486
4487  test -n "$RM" && break
4488done
4489
4490
4491    if test "x$RM" = x; then
4492        if test "xrm" = x; then
4493          PROG_NAME=rm
4494        else
4495          PROG_NAME=rm
4496        fi
4497        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4498$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4499        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4500$as_echo "$as_me: error: Cannot continue" >&2;}
4501   { (exit 1); exit 1; }; }
4502    fi
4503
4504
4505
4506    for ac_prog in sh
4507do
4508  # Extract the first word of "$ac_prog", so it can be a program name with args.
4509set dummy $ac_prog; ac_word=$2
4510{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4511$as_echo_n "checking for $ac_word... " >&6; }
4512if test "${ac_cv_path_SH+set}" = set; then
4513  $as_echo_n "(cached) " >&6
4514else
4515  case $SH in
4516  [\\/]* | ?:[\\/]*)
4517  ac_cv_path_SH="$SH" # Let the user override the test with a path.
4518  ;;
4519  *)
4520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4521for as_dir in $PATH
4522do
4523  IFS=$as_save_IFS
4524  test -z "$as_dir" && as_dir=.
4525  for ac_exec_ext in '' $ac_executable_extensions; do
4526  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4527    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
4528    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4529    break 2
4530  fi
4531done
4532done
4533IFS=$as_save_IFS
4534
4535  ;;
4536esac
4537fi
4538SH=$ac_cv_path_SH
4539if test -n "$SH"; then
4540  { $as_echo "$as_me:$LINENO: result: $SH" >&5
4541$as_echo "$SH" >&6; }
4542else
4543  { $as_echo "$as_me:$LINENO: result: no" >&5
4544$as_echo "no" >&6; }
4545fi
4546
4547
4548  test -n "$SH" && break
4549done
4550
4551
4552    if test "x$SH" = x; then
4553        if test "xsh" = x; then
4554          PROG_NAME=sh
4555        else
4556          PROG_NAME=sh
4557        fi
4558        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4559$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4560        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4561$as_echo "$as_me: error: Cannot continue" >&2;}
4562   { (exit 1); exit 1; }; }
4563    fi
4564
4565
4566
4567    for ac_prog in sort
4568do
4569  # Extract the first word of "$ac_prog", so it can be a program name with args.
4570set dummy $ac_prog; ac_word=$2
4571{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4572$as_echo_n "checking for $ac_word... " >&6; }
4573if test "${ac_cv_path_SORT+set}" = set; then
4574  $as_echo_n "(cached) " >&6
4575else
4576  case $SORT in
4577  [\\/]* | ?:[\\/]*)
4578  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
4579  ;;
4580  *)
4581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4582for as_dir in $PATH
4583do
4584  IFS=$as_save_IFS
4585  test -z "$as_dir" && as_dir=.
4586  for ac_exec_ext in '' $ac_executable_extensions; do
4587  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4588    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
4589    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4590    break 2
4591  fi
4592done
4593done
4594IFS=$as_save_IFS
4595
4596  ;;
4597esac
4598fi
4599SORT=$ac_cv_path_SORT
4600if test -n "$SORT"; then
4601  { $as_echo "$as_me:$LINENO: result: $SORT" >&5
4602$as_echo "$SORT" >&6; }
4603else
4604  { $as_echo "$as_me:$LINENO: result: no" >&5
4605$as_echo "no" >&6; }
4606fi
4607
4608
4609  test -n "$SORT" && break
4610done
4611
4612
4613    if test "x$SORT" = x; then
4614        if test "xsort" = x; then
4615          PROG_NAME=sort
4616        else
4617          PROG_NAME=sort
4618        fi
4619        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4620$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4621        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4622$as_echo "$as_me: error: Cannot continue" >&2;}
4623   { (exit 1); exit 1; }; }
4624    fi
4625
4626
4627
4628    for ac_prog in tail
4629do
4630  # Extract the first word of "$ac_prog", so it can be a program name with args.
4631set dummy $ac_prog; ac_word=$2
4632{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4633$as_echo_n "checking for $ac_word... " >&6; }
4634if test "${ac_cv_path_TAIL+set}" = set; then
4635  $as_echo_n "(cached) " >&6
4636else
4637  case $TAIL in
4638  [\\/]* | ?:[\\/]*)
4639  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
4640  ;;
4641  *)
4642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4643for as_dir in $PATH
4644do
4645  IFS=$as_save_IFS
4646  test -z "$as_dir" && as_dir=.
4647  for ac_exec_ext in '' $ac_executable_extensions; do
4648  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4649    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
4650    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4651    break 2
4652  fi
4653done
4654done
4655IFS=$as_save_IFS
4656
4657  ;;
4658esac
4659fi
4660TAIL=$ac_cv_path_TAIL
4661if test -n "$TAIL"; then
4662  { $as_echo "$as_me:$LINENO: result: $TAIL" >&5
4663$as_echo "$TAIL" >&6; }
4664else
4665  { $as_echo "$as_me:$LINENO: result: no" >&5
4666$as_echo "no" >&6; }
4667fi
4668
4669
4670  test -n "$TAIL" && break
4671done
4672
4673
4674    if test "x$TAIL" = x; then
4675        if test "xtail" = x; then
4676          PROG_NAME=tail
4677        else
4678          PROG_NAME=tail
4679        fi
4680        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4681$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4682        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4683$as_echo "$as_me: error: Cannot continue" >&2;}
4684   { (exit 1); exit 1; }; }
4685    fi
4686
4687
4688
4689    for ac_prog in tar
4690do
4691  # Extract the first word of "$ac_prog", so it can be a program name with args.
4692set dummy $ac_prog; ac_word=$2
4693{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4694$as_echo_n "checking for $ac_word... " >&6; }
4695if test "${ac_cv_path_TAR+set}" = set; then
4696  $as_echo_n "(cached) " >&6
4697else
4698  case $TAR in
4699  [\\/]* | ?:[\\/]*)
4700  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4701  ;;
4702  *)
4703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4704for as_dir in $PATH
4705do
4706  IFS=$as_save_IFS
4707  test -z "$as_dir" && as_dir=.
4708  for ac_exec_ext in '' $ac_executable_extensions; do
4709  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4710    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4711    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4712    break 2
4713  fi
4714done
4715done
4716IFS=$as_save_IFS
4717
4718  ;;
4719esac
4720fi
4721TAR=$ac_cv_path_TAR
4722if test -n "$TAR"; then
4723  { $as_echo "$as_me:$LINENO: result: $TAR" >&5
4724$as_echo "$TAR" >&6; }
4725else
4726  { $as_echo "$as_me:$LINENO: result: no" >&5
4727$as_echo "no" >&6; }
4728fi
4729
4730
4731  test -n "$TAR" && break
4732done
4733
4734
4735    if test "x$TAR" = x; then
4736        if test "xtar" = x; then
4737          PROG_NAME=tar
4738        else
4739          PROG_NAME=tar
4740        fi
4741        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4742$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4743        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4744$as_echo "$as_me: error: Cannot continue" >&2;}
4745   { (exit 1); exit 1; }; }
4746    fi
4747
4748
4749
4750    for ac_prog in tee
4751do
4752  # Extract the first word of "$ac_prog", so it can be a program name with args.
4753set dummy $ac_prog; ac_word=$2
4754{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4755$as_echo_n "checking for $ac_word... " >&6; }
4756if test "${ac_cv_path_TEE+set}" = set; then
4757  $as_echo_n "(cached) " >&6
4758else
4759  case $TEE in
4760  [\\/]* | ?:[\\/]*)
4761  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
4762  ;;
4763  *)
4764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4765for as_dir in $PATH
4766do
4767  IFS=$as_save_IFS
4768  test -z "$as_dir" && as_dir=.
4769  for ac_exec_ext in '' $ac_executable_extensions; do
4770  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4771    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
4772    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4773    break 2
4774  fi
4775done
4776done
4777IFS=$as_save_IFS
4778
4779  ;;
4780esac
4781fi
4782TEE=$ac_cv_path_TEE
4783if test -n "$TEE"; then
4784  { $as_echo "$as_me:$LINENO: result: $TEE" >&5
4785$as_echo "$TEE" >&6; }
4786else
4787  { $as_echo "$as_me:$LINENO: result: no" >&5
4788$as_echo "no" >&6; }
4789fi
4790
4791
4792  test -n "$TEE" && break
4793done
4794
4795
4796    if test "x$TEE" = x; then
4797        if test "xtee" = x; then
4798          PROG_NAME=tee
4799        else
4800          PROG_NAME=tee
4801        fi
4802        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4803$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4804        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4805$as_echo "$as_me: error: Cannot continue" >&2;}
4806   { (exit 1); exit 1; }; }
4807    fi
4808
4809
4810
4811    for ac_prog in touch
4812do
4813  # Extract the first word of "$ac_prog", so it can be a program name with args.
4814set dummy $ac_prog; ac_word=$2
4815{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4816$as_echo_n "checking for $ac_word... " >&6; }
4817if test "${ac_cv_path_TOUCH+set}" = set; then
4818  $as_echo_n "(cached) " >&6
4819else
4820  case $TOUCH in
4821  [\\/]* | ?:[\\/]*)
4822  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
4823  ;;
4824  *)
4825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4826for as_dir in $PATH
4827do
4828  IFS=$as_save_IFS
4829  test -z "$as_dir" && as_dir=.
4830  for ac_exec_ext in '' $ac_executable_extensions; do
4831  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4832    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
4833    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4834    break 2
4835  fi
4836done
4837done
4838IFS=$as_save_IFS
4839
4840  ;;
4841esac
4842fi
4843TOUCH=$ac_cv_path_TOUCH
4844if test -n "$TOUCH"; then
4845  { $as_echo "$as_me:$LINENO: result: $TOUCH" >&5
4846$as_echo "$TOUCH" >&6; }
4847else
4848  { $as_echo "$as_me:$LINENO: result: no" >&5
4849$as_echo "no" >&6; }
4850fi
4851
4852
4853  test -n "$TOUCH" && break
4854done
4855
4856
4857    if test "x$TOUCH" = x; then
4858        if test "xtouch" = x; then
4859          PROG_NAME=touch
4860        else
4861          PROG_NAME=touch
4862        fi
4863        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4864$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4865        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4866$as_echo "$as_me: error: Cannot continue" >&2;}
4867   { (exit 1); exit 1; }; }
4868    fi
4869
4870
4871
4872    for ac_prog in tr
4873do
4874  # Extract the first word of "$ac_prog", so it can be a program name with args.
4875set dummy $ac_prog; ac_word=$2
4876{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4877$as_echo_n "checking for $ac_word... " >&6; }
4878if test "${ac_cv_path_TR+set}" = set; then
4879  $as_echo_n "(cached) " >&6
4880else
4881  case $TR in
4882  [\\/]* | ?:[\\/]*)
4883  ac_cv_path_TR="$TR" # Let the user override the test with a path.
4884  ;;
4885  *)
4886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4887for as_dir in $PATH
4888do
4889  IFS=$as_save_IFS
4890  test -z "$as_dir" && as_dir=.
4891  for ac_exec_ext in '' $ac_executable_extensions; do
4892  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4893    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
4894    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4895    break 2
4896  fi
4897done
4898done
4899IFS=$as_save_IFS
4900
4901  ;;
4902esac
4903fi
4904TR=$ac_cv_path_TR
4905if test -n "$TR"; then
4906  { $as_echo "$as_me:$LINENO: result: $TR" >&5
4907$as_echo "$TR" >&6; }
4908else
4909  { $as_echo "$as_me:$LINENO: result: no" >&5
4910$as_echo "no" >&6; }
4911fi
4912
4913
4914  test -n "$TR" && break
4915done
4916
4917
4918    if test "x$TR" = x; then
4919        if test "xtr" = x; then
4920          PROG_NAME=tr
4921        else
4922          PROG_NAME=tr
4923        fi
4924        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4925$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4926        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4927$as_echo "$as_me: error: Cannot continue" >&2;}
4928   { (exit 1); exit 1; }; }
4929    fi
4930
4931
4932
4933    for ac_prog in uname
4934do
4935  # Extract the first word of "$ac_prog", so it can be a program name with args.
4936set dummy $ac_prog; ac_word=$2
4937{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4938$as_echo_n "checking for $ac_word... " >&6; }
4939if test "${ac_cv_path_UNAME+set}" = set; then
4940  $as_echo_n "(cached) " >&6
4941else
4942  case $UNAME in
4943  [\\/]* | ?:[\\/]*)
4944  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
4945  ;;
4946  *)
4947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4948for as_dir in $PATH
4949do
4950  IFS=$as_save_IFS
4951  test -z "$as_dir" && as_dir=.
4952  for ac_exec_ext in '' $ac_executable_extensions; do
4953  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4954    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
4955    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4956    break 2
4957  fi
4958done
4959done
4960IFS=$as_save_IFS
4961
4962  ;;
4963esac
4964fi
4965UNAME=$ac_cv_path_UNAME
4966if test -n "$UNAME"; then
4967  { $as_echo "$as_me:$LINENO: result: $UNAME" >&5
4968$as_echo "$UNAME" >&6; }
4969else
4970  { $as_echo "$as_me:$LINENO: result: no" >&5
4971$as_echo "no" >&6; }
4972fi
4973
4974
4975  test -n "$UNAME" && break
4976done
4977
4978
4979    if test "x$UNAME" = x; then
4980        if test "xuname" = x; then
4981          PROG_NAME=uname
4982        else
4983          PROG_NAME=uname
4984        fi
4985        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
4986$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4987        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
4988$as_echo "$as_me: error: Cannot continue" >&2;}
4989   { (exit 1); exit 1; }; }
4990    fi
4991
4992
4993
4994    for ac_prog in uniq
4995do
4996  # Extract the first word of "$ac_prog", so it can be a program name with args.
4997set dummy $ac_prog; ac_word=$2
4998{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4999$as_echo_n "checking for $ac_word... " >&6; }
5000if test "${ac_cv_path_UNIQ+set}" = set; then
5001  $as_echo_n "(cached) " >&6
5002else
5003  case $UNIQ in
5004  [\\/]* | ?:[\\/]*)
5005  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5006  ;;
5007  *)
5008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5009for as_dir in $PATH
5010do
5011  IFS=$as_save_IFS
5012  test -z "$as_dir" && as_dir=.
5013  for ac_exec_ext in '' $ac_executable_extensions; do
5014  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5015    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5016    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5017    break 2
5018  fi
5019done
5020done
5021IFS=$as_save_IFS
5022
5023  ;;
5024esac
5025fi
5026UNIQ=$ac_cv_path_UNIQ
5027if test -n "$UNIQ"; then
5028  { $as_echo "$as_me:$LINENO: result: $UNIQ" >&5
5029$as_echo "$UNIQ" >&6; }
5030else
5031  { $as_echo "$as_me:$LINENO: result: no" >&5
5032$as_echo "no" >&6; }
5033fi
5034
5035
5036  test -n "$UNIQ" && break
5037done
5038
5039
5040    if test "x$UNIQ" = x; then
5041        if test "xuniq" = x; then
5042          PROG_NAME=uniq
5043        else
5044          PROG_NAME=uniq
5045        fi
5046        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5047$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5048        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5049$as_echo "$as_me: error: Cannot continue" >&2;}
5050   { (exit 1); exit 1; }; }
5051    fi
5052
5053
5054
5055    for ac_prog in wc
5056do
5057  # Extract the first word of "$ac_prog", so it can be a program name with args.
5058set dummy $ac_prog; ac_word=$2
5059{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5060$as_echo_n "checking for $ac_word... " >&6; }
5061if test "${ac_cv_path_WC+set}" = set; then
5062  $as_echo_n "(cached) " >&6
5063else
5064  case $WC in
5065  [\\/]* | ?:[\\/]*)
5066  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5067  ;;
5068  *)
5069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5070for as_dir in $PATH
5071do
5072  IFS=$as_save_IFS
5073  test -z "$as_dir" && as_dir=.
5074  for ac_exec_ext in '' $ac_executable_extensions; do
5075  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5076    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5077    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5078    break 2
5079  fi
5080done
5081done
5082IFS=$as_save_IFS
5083
5084  ;;
5085esac
5086fi
5087WC=$ac_cv_path_WC
5088if test -n "$WC"; then
5089  { $as_echo "$as_me:$LINENO: result: $WC" >&5
5090$as_echo "$WC" >&6; }
5091else
5092  { $as_echo "$as_me:$LINENO: result: no" >&5
5093$as_echo "no" >&6; }
5094fi
5095
5096
5097  test -n "$WC" && break
5098done
5099
5100
5101    if test "x$WC" = x; then
5102        if test "xwc" = x; then
5103          PROG_NAME=wc
5104        else
5105          PROG_NAME=wc
5106        fi
5107        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5108$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5109        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5110$as_echo "$as_me: error: Cannot continue" >&2;}
5111   { (exit 1); exit 1; }; }
5112    fi
5113
5114
5115
5116    for ac_prog in which
5117do
5118  # Extract the first word of "$ac_prog", so it can be a program name with args.
5119set dummy $ac_prog; ac_word=$2
5120{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5121$as_echo_n "checking for $ac_word... " >&6; }
5122if test "${ac_cv_path_WHICH+set}" = set; then
5123  $as_echo_n "(cached) " >&6
5124else
5125  case $WHICH in
5126  [\\/]* | ?:[\\/]*)
5127  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5128  ;;
5129  *)
5130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5131for as_dir in $PATH
5132do
5133  IFS=$as_save_IFS
5134  test -z "$as_dir" && as_dir=.
5135  for ac_exec_ext in '' $ac_executable_extensions; do
5136  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5137    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5138    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5139    break 2
5140  fi
5141done
5142done
5143IFS=$as_save_IFS
5144
5145  ;;
5146esac
5147fi
5148WHICH=$ac_cv_path_WHICH
5149if test -n "$WHICH"; then
5150  { $as_echo "$as_me:$LINENO: result: $WHICH" >&5
5151$as_echo "$WHICH" >&6; }
5152else
5153  { $as_echo "$as_me:$LINENO: result: no" >&5
5154$as_echo "no" >&6; }
5155fi
5156
5157
5158  test -n "$WHICH" && break
5159done
5160
5161
5162    if test "x$WHICH" = x; then
5163        if test "xwhich" = x; then
5164          PROG_NAME=which
5165        else
5166          PROG_NAME=which
5167        fi
5168        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5169$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5170        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5171$as_echo "$as_me: error: Cannot continue" >&2;}
5172   { (exit 1); exit 1; }; }
5173    fi
5174
5175
5176
5177    for ac_prog in xargs
5178do
5179  # Extract the first word of "$ac_prog", so it can be a program name with args.
5180set dummy $ac_prog; ac_word=$2
5181{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5182$as_echo_n "checking for $ac_word... " >&6; }
5183if test "${ac_cv_path_XARGS+set}" = set; then
5184  $as_echo_n "(cached) " >&6
5185else
5186  case $XARGS in
5187  [\\/]* | ?:[\\/]*)
5188  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5189  ;;
5190  *)
5191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5192for as_dir in $PATH
5193do
5194  IFS=$as_save_IFS
5195  test -z "$as_dir" && as_dir=.
5196  for ac_exec_ext in '' $ac_executable_extensions; do
5197  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5198    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5199    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5200    break 2
5201  fi
5202done
5203done
5204IFS=$as_save_IFS
5205
5206  ;;
5207esac
5208fi
5209XARGS=$ac_cv_path_XARGS
5210if test -n "$XARGS"; then
5211  { $as_echo "$as_me:$LINENO: result: $XARGS" >&5
5212$as_echo "$XARGS" >&6; }
5213else
5214  { $as_echo "$as_me:$LINENO: result: no" >&5
5215$as_echo "no" >&6; }
5216fi
5217
5218
5219  test -n "$XARGS" && break
5220done
5221
5222
5223    if test "x$XARGS" = x; then
5224        if test "xxargs" = x; then
5225          PROG_NAME=xargs
5226        else
5227          PROG_NAME=xargs
5228        fi
5229        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5230$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5231        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5232$as_echo "$as_me: error: Cannot continue" >&2;}
5233   { (exit 1); exit 1; }; }
5234    fi
5235
5236
5237
5238# Then required tools that require some special treatment.
5239for ac_prog in gawk mawk nawk awk
5240do
5241  # Extract the first word of "$ac_prog", so it can be a program name with args.
5242set dummy $ac_prog; ac_word=$2
5243{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5244$as_echo_n "checking for $ac_word... " >&6; }
5245if test "${ac_cv_prog_AWK+set}" = set; then
5246  $as_echo_n "(cached) " >&6
5247else
5248  if test -n "$AWK"; then
5249  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5250else
5251as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5252for as_dir in $PATH
5253do
5254  IFS=$as_save_IFS
5255  test -z "$as_dir" && as_dir=.
5256  for ac_exec_ext in '' $ac_executable_extensions; do
5257  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5258    ac_cv_prog_AWK="$ac_prog"
5259    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5260    break 2
5261  fi
5262done
5263done
5264IFS=$as_save_IFS
5265
5266fi
5267fi
5268AWK=$ac_cv_prog_AWK
5269if test -n "$AWK"; then
5270  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
5271$as_echo "$AWK" >&6; }
5272else
5273  { $as_echo "$as_me:$LINENO: result: no" >&5
5274$as_echo "no" >&6; }
5275fi
5276
5277
5278  test -n "$AWK" && break
5279done
5280
5281
5282    if test "x$AWK" = x; then
5283        if test "x" = x; then
5284          PROG_NAME=awk
5285        else
5286          PROG_NAME=
5287        fi
5288        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5289$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5290        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5291$as_echo "$as_me: error: Cannot continue" >&2;}
5292   { (exit 1); exit 1; }; }
5293    fi
5294
5295{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
5296$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5297if test "${ac_cv_path_GREP+set}" = set; then
5298  $as_echo_n "(cached) " >&6
5299else
5300  if test -z "$GREP"; then
5301  ac_path_GREP_found=false
5302  # Loop through the user's path and test for each of PROGNAME-LIST
5303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5304for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5305do
5306  IFS=$as_save_IFS
5307  test -z "$as_dir" && as_dir=.
5308  for ac_prog in grep ggrep; do
5309    for ac_exec_ext in '' $ac_executable_extensions; do
5310      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5311      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5312# Check for GNU ac_path_GREP and select it if it is found.
5313  # Check for GNU $ac_path_GREP
5314case `"$ac_path_GREP" --version 2>&1` in
5315*GNU*)
5316  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5317*)
5318  ac_count=0
5319  $as_echo_n 0123456789 >"conftest.in"
5320  while :
5321  do
5322    cat "conftest.in" "conftest.in" >"conftest.tmp"
5323    mv "conftest.tmp" "conftest.in"
5324    cp "conftest.in" "conftest.nl"
5325    $as_echo 'GREP' >> "conftest.nl"
5326    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5327    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5328    ac_count=`expr $ac_count + 1`
5329    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5330      # Best one so far, save it but keep looking for a better one
5331      ac_cv_path_GREP="$ac_path_GREP"
5332      ac_path_GREP_max=$ac_count
5333    fi
5334    # 10*(2^10) chars as input seems more than enough
5335    test $ac_count -gt 10 && break
5336  done
5337  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5338esac
5339
5340      $ac_path_GREP_found && break 3
5341    done
5342  done
5343done
5344IFS=$as_save_IFS
5345  if test -z "$ac_cv_path_GREP"; then
5346    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5347$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5348   { (exit 1); exit 1; }; }
5349  fi
5350else
5351  ac_cv_path_GREP=$GREP
5352fi
5353
5354fi
5355{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
5356$as_echo "$ac_cv_path_GREP" >&6; }
5357 GREP="$ac_cv_path_GREP"
5358
5359
5360
5361    if test "x$GREP" = x; then
5362        if test "x" = x; then
5363          PROG_NAME=grep
5364        else
5365          PROG_NAME=
5366        fi
5367        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5368$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5369        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5370$as_echo "$as_me: error: Cannot continue" >&2;}
5371   { (exit 1); exit 1; }; }
5372    fi
5373
5374{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
5375$as_echo_n "checking for egrep... " >&6; }
5376if test "${ac_cv_path_EGREP+set}" = set; then
5377  $as_echo_n "(cached) " >&6
5378else
5379  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5380   then ac_cv_path_EGREP="$GREP -E"
5381   else
5382     if test -z "$EGREP"; then
5383  ac_path_EGREP_found=false
5384  # Loop through the user's path and test for each of PROGNAME-LIST
5385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5386for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5387do
5388  IFS=$as_save_IFS
5389  test -z "$as_dir" && as_dir=.
5390  for ac_prog in egrep; do
5391    for ac_exec_ext in '' $ac_executable_extensions; do
5392      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5393      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5394# Check for GNU ac_path_EGREP and select it if it is found.
5395  # Check for GNU $ac_path_EGREP
5396case `"$ac_path_EGREP" --version 2>&1` in
5397*GNU*)
5398  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5399*)
5400  ac_count=0
5401  $as_echo_n 0123456789 >"conftest.in"
5402  while :
5403  do
5404    cat "conftest.in" "conftest.in" >"conftest.tmp"
5405    mv "conftest.tmp" "conftest.in"
5406    cp "conftest.in" "conftest.nl"
5407    $as_echo 'EGREP' >> "conftest.nl"
5408    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5409    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5410    ac_count=`expr $ac_count + 1`
5411    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5412      # Best one so far, save it but keep looking for a better one
5413      ac_cv_path_EGREP="$ac_path_EGREP"
5414      ac_path_EGREP_max=$ac_count
5415    fi
5416    # 10*(2^10) chars as input seems more than enough
5417    test $ac_count -gt 10 && break
5418  done
5419  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5420esac
5421
5422      $ac_path_EGREP_found && break 3
5423    done
5424  done
5425done
5426IFS=$as_save_IFS
5427  if test -z "$ac_cv_path_EGREP"; then
5428    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5429$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5430   { (exit 1); exit 1; }; }
5431  fi
5432else
5433  ac_cv_path_EGREP=$EGREP
5434fi
5435
5436   fi
5437fi
5438{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
5439$as_echo "$ac_cv_path_EGREP" >&6; }
5440 EGREP="$ac_cv_path_EGREP"
5441
5442
5443
5444    if test "x$EGREP" = x; then
5445        if test "x" = x; then
5446          PROG_NAME=egrep
5447        else
5448          PROG_NAME=
5449        fi
5450        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5451$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5452        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5453$as_echo "$as_me: error: Cannot continue" >&2;}
5454   { (exit 1); exit 1; }; }
5455    fi
5456
5457{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5
5458$as_echo_n "checking for fgrep... " >&6; }
5459if test "${ac_cv_path_FGREP+set}" = set; then
5460  $as_echo_n "(cached) " >&6
5461else
5462  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5463   then ac_cv_path_FGREP="$GREP -F"
5464   else
5465     if test -z "$FGREP"; then
5466  ac_path_FGREP_found=false
5467  # Loop through the user's path and test for each of PROGNAME-LIST
5468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5469for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5470do
5471  IFS=$as_save_IFS
5472  test -z "$as_dir" && as_dir=.
5473  for ac_prog in fgrep; do
5474    for ac_exec_ext in '' $ac_executable_extensions; do
5475      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
5476      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
5477# Check for GNU ac_path_FGREP and select it if it is found.
5478  # Check for GNU $ac_path_FGREP
5479case `"$ac_path_FGREP" --version 2>&1` in
5480*GNU*)
5481  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
5482*)
5483  ac_count=0
5484  $as_echo_n 0123456789 >"conftest.in"
5485  while :
5486  do
5487    cat "conftest.in" "conftest.in" >"conftest.tmp"
5488    mv "conftest.tmp" "conftest.in"
5489    cp "conftest.in" "conftest.nl"
5490    $as_echo 'FGREP' >> "conftest.nl"
5491    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
5492    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5493    ac_count=`expr $ac_count + 1`
5494    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
5495      # Best one so far, save it but keep looking for a better one
5496      ac_cv_path_FGREP="$ac_path_FGREP"
5497      ac_path_FGREP_max=$ac_count
5498    fi
5499    # 10*(2^10) chars as input seems more than enough
5500    test $ac_count -gt 10 && break
5501  done
5502  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5503esac
5504
5505      $ac_path_FGREP_found && break 3
5506    done
5507  done
5508done
5509IFS=$as_save_IFS
5510  if test -z "$ac_cv_path_FGREP"; then
5511    { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5512$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5513   { (exit 1); exit 1; }; }
5514  fi
5515else
5516  ac_cv_path_FGREP=$FGREP
5517fi
5518
5519   fi
5520fi
5521{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5
5522$as_echo "$ac_cv_path_FGREP" >&6; }
5523 FGREP="$ac_cv_path_FGREP"
5524
5525
5526
5527    if test "x$FGREP" = x; then
5528        if test "x" = x; then
5529          PROG_NAME=fgrep
5530        else
5531          PROG_NAME=
5532        fi
5533        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5534$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5535        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5536$as_echo "$as_me: error: Cannot continue" >&2;}
5537   { (exit 1); exit 1; }; }
5538    fi
5539
5540{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
5541$as_echo_n "checking for a sed that does not truncate output... " >&6; }
5542if test "${ac_cv_path_SED+set}" = set; then
5543  $as_echo_n "(cached) " >&6
5544else
5545            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
5546     for ac_i in 1 2 3 4 5 6 7; do
5547       ac_script="$ac_script$as_nl$ac_script"
5548     done
5549     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
5550     $as_unset ac_script || ac_script=
5551     if test -z "$SED"; then
5552  ac_path_SED_found=false
5553  # Loop through the user's path and test for each of PROGNAME-LIST
5554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5555for as_dir in $PATH
5556do
5557  IFS=$as_save_IFS
5558  test -z "$as_dir" && as_dir=.
5559  for ac_prog in sed gsed; do
5560    for ac_exec_ext in '' $ac_executable_extensions; do
5561      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
5562      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
5563# Check for GNU ac_path_SED and select it if it is found.
5564  # Check for GNU $ac_path_SED
5565case `"$ac_path_SED" --version 2>&1` in
5566*GNU*)
5567  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
5568*)
5569  ac_count=0
5570  $as_echo_n 0123456789 >"conftest.in"
5571  while :
5572  do
5573    cat "conftest.in" "conftest.in" >"conftest.tmp"
5574    mv "conftest.tmp" "conftest.in"
5575    cp "conftest.in" "conftest.nl"
5576    $as_echo '' >> "conftest.nl"
5577    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
5578    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5579    ac_count=`expr $ac_count + 1`
5580    if test $ac_count -gt ${ac_path_SED_max-0}; then
5581      # Best one so far, save it but keep looking for a better one
5582      ac_cv_path_SED="$ac_path_SED"
5583      ac_path_SED_max=$ac_count
5584    fi
5585    # 10*(2^10) chars as input seems more than enough
5586    test $ac_count -gt 10 && break
5587  done
5588  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5589esac
5590
5591      $ac_path_SED_found && break 3
5592    done
5593  done
5594done
5595IFS=$as_save_IFS
5596  if test -z "$ac_cv_path_SED"; then
5597    { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5
5598$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;}
5599   { (exit 1); exit 1; }; }
5600  fi
5601else
5602  ac_cv_path_SED=$SED
5603fi
5604
5605fi
5606{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5
5607$as_echo "$ac_cv_path_SED" >&6; }
5608 SED="$ac_cv_path_SED"
5609  rm -f conftest.sed
5610
5611
5612    if test "x$SED" = x; then
5613        if test "x" = x; then
5614          PROG_NAME=sed
5615        else
5616          PROG_NAME=
5617        fi
5618        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5619$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5620        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5621$as_echo "$as_me: error: Cannot continue" >&2;}
5622   { (exit 1); exit 1; }; }
5623    fi
5624
5625
5626for ac_prog in nawk gawk awk
5627do
5628  # Extract the first word of "$ac_prog", so it can be a program name with args.
5629set dummy $ac_prog; ac_word=$2
5630{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5631$as_echo_n "checking for $ac_word... " >&6; }
5632if test "${ac_cv_path_NAWK+set}" = set; then
5633  $as_echo_n "(cached) " >&6
5634else
5635  case $NAWK in
5636  [\\/]* | ?:[\\/]*)
5637  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
5638  ;;
5639  *)
5640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5641for as_dir in $PATH
5642do
5643  IFS=$as_save_IFS
5644  test -z "$as_dir" && as_dir=.
5645  for ac_exec_ext in '' $ac_executable_extensions; do
5646  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5647    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
5648    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5649    break 2
5650  fi
5651done
5652done
5653IFS=$as_save_IFS
5654
5655  ;;
5656esac
5657fi
5658NAWK=$ac_cv_path_NAWK
5659if test -n "$NAWK"; then
5660  { $as_echo "$as_me:$LINENO: result: $NAWK" >&5
5661$as_echo "$NAWK" >&6; }
5662else
5663  { $as_echo "$as_me:$LINENO: result: no" >&5
5664$as_echo "no" >&6; }
5665fi
5666
5667
5668  test -n "$NAWK" && break
5669done
5670
5671
5672    if test "x$NAWK" = x; then
5673        if test "x" = x; then
5674          PROG_NAME=nawk
5675        else
5676          PROG_NAME=
5677        fi
5678        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
5679$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5680        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
5681$as_echo "$as_me: error: Cannot continue" >&2;}
5682   { (exit 1); exit 1; }; }
5683    fi
5684
5685
5686# Always force rm.
5687RM="$RM -f"
5688
5689# These are not required on all platforms
5690# Extract the first word of "cygpath", so it can be a program name with args.
5691set dummy cygpath; ac_word=$2
5692{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5693$as_echo_n "checking for $ac_word... " >&6; }
5694if test "${ac_cv_path_CYGPATH+set}" = set; then
5695  $as_echo_n "(cached) " >&6
5696else
5697  case $CYGPATH in
5698  [\\/]* | ?:[\\/]*)
5699  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
5700  ;;
5701  *)
5702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5703for as_dir in $PATH
5704do
5705  IFS=$as_save_IFS
5706  test -z "$as_dir" && as_dir=.
5707  for ac_exec_ext in '' $ac_executable_extensions; do
5708  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5709    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
5710    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5711    break 2
5712  fi
5713done
5714done
5715IFS=$as_save_IFS
5716
5717  ;;
5718esac
5719fi
5720CYGPATH=$ac_cv_path_CYGPATH
5721if test -n "$CYGPATH"; then
5722  { $as_echo "$as_me:$LINENO: result: $CYGPATH" >&5
5723$as_echo "$CYGPATH" >&6; }
5724else
5725  { $as_echo "$as_me:$LINENO: result: no" >&5
5726$as_echo "no" >&6; }
5727fi
5728
5729
5730# Extract the first word of "readlink", so it can be a program name with args.
5731set dummy readlink; ac_word=$2
5732{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5733$as_echo_n "checking for $ac_word... " >&6; }
5734if test "${ac_cv_path_READLINK+set}" = set; then
5735  $as_echo_n "(cached) " >&6
5736else
5737  case $READLINK in
5738  [\\/]* | ?:[\\/]*)
5739  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
5740  ;;
5741  *)
5742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5743for as_dir in $PATH
5744do
5745  IFS=$as_save_IFS
5746  test -z "$as_dir" && as_dir=.
5747  for ac_exec_ext in '' $ac_executable_extensions; do
5748  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5749    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
5750    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5751    break 2
5752  fi
5753done
5754done
5755IFS=$as_save_IFS
5756
5757  ;;
5758esac
5759fi
5760READLINK=$ac_cv_path_READLINK
5761if test -n "$READLINK"; then
5762  { $as_echo "$as_me:$LINENO: result: $READLINK" >&5
5763$as_echo "$READLINK" >&6; }
5764else
5765  { $as_echo "$as_me:$LINENO: result: no" >&5
5766$as_echo "no" >&6; }
5767fi
5768
5769
5770# Extract the first word of "df", so it can be a program name with args.
5771set dummy df; ac_word=$2
5772{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5773$as_echo_n "checking for $ac_word... " >&6; }
5774if test "${ac_cv_path_DF+set}" = set; then
5775  $as_echo_n "(cached) " >&6
5776else
5777  case $DF in
5778  [\\/]* | ?:[\\/]*)
5779  ac_cv_path_DF="$DF" # Let the user override the test with a path.
5780  ;;
5781  *)
5782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5783for as_dir in $PATH
5784do
5785  IFS=$as_save_IFS
5786  test -z "$as_dir" && as_dir=.
5787  for ac_exec_ext in '' $ac_executable_extensions; do
5788  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5789    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
5790    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5791    break 2
5792  fi
5793done
5794done
5795IFS=$as_save_IFS
5796
5797  ;;
5798esac
5799fi
5800DF=$ac_cv_path_DF
5801if test -n "$DF"; then
5802  { $as_echo "$as_me:$LINENO: result: $DF" >&5
5803$as_echo "$DF" >&6; }
5804else
5805  { $as_echo "$as_me:$LINENO: result: no" >&5
5806$as_echo "no" >&6; }
5807fi
5808
5809
5810# Extract the first word of "SetFile", so it can be a program name with args.
5811set dummy SetFile; ac_word=$2
5812{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5813$as_echo_n "checking for $ac_word... " >&6; }
5814if test "${ac_cv_path_SETFILE+set}" = set; then
5815  $as_echo_n "(cached) " >&6
5816else
5817  case $SETFILE in
5818  [\\/]* | ?:[\\/]*)
5819  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
5820  ;;
5821  *)
5822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5823for as_dir in $PATH
5824do
5825  IFS=$as_save_IFS
5826  test -z "$as_dir" && as_dir=.
5827  for ac_exec_ext in '' $ac_executable_extensions; do
5828  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5829    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
5830    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5831    break 2
5832  fi
5833done
5834done
5835IFS=$as_save_IFS
5836
5837  ;;
5838esac
5839fi
5840SETFILE=$ac_cv_path_SETFILE
5841if test -n "$SETFILE"; then
5842  { $as_echo "$as_me:$LINENO: result: $SETFILE" >&5
5843$as_echo "$SETFILE" >&6; }
5844else
5845  { $as_echo "$as_me:$LINENO: result: no" >&5
5846$as_echo "no" >&6; }
5847fi
5848
5849
5850
5851
5852# Now we can determine OpenJDK build and target platforms. This is required to
5853# have early on.
5854
5855# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
5856# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
5857# product you're building. The target of this build is called "host". Since this is confusing to most people, we
5858# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
5859# to use the configure naming style.
5860# Make sure we can run config.sub.
5861$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5862  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
5863$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
5864   { (exit 1); exit 1; }; }
5865
5866{ $as_echo "$as_me:$LINENO: checking build system type" >&5
5867$as_echo_n "checking build system type... " >&6; }
5868if test "${ac_cv_build+set}" = set; then
5869  $as_echo_n "(cached) " >&6
5870else
5871  ac_build_alias=$build_alias
5872test "x$ac_build_alias" = x &&
5873  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5874test "x$ac_build_alias" = x &&
5875  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
5876$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
5877   { (exit 1); exit 1; }; }
5878ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5879  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
5880$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
5881   { (exit 1); exit 1; }; }
5882
5883fi
5884{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
5885$as_echo "$ac_cv_build" >&6; }
5886case $ac_cv_build in
5887*-*-*) ;;
5888*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
5889$as_echo "$as_me: error: invalid value of canonical build" >&2;}
5890   { (exit 1); exit 1; }; };;
5891esac
5892build=$ac_cv_build
5893ac_save_IFS=$IFS; IFS='-'
5894set x $ac_cv_build
5895shift
5896build_cpu=$1
5897build_vendor=$2
5898shift; shift
5899# Remember, the first character of IFS is used to create $*,
5900# except with old shells:
5901build_os=$*
5902IFS=$ac_save_IFS
5903case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5904
5905
5906{ $as_echo "$as_me:$LINENO: checking host system type" >&5
5907$as_echo_n "checking host system type... " >&6; }
5908if test "${ac_cv_host+set}" = set; then
5909  $as_echo_n "(cached) " >&6
5910else
5911  if test "x$host_alias" = x; then
5912  ac_cv_host=$ac_cv_build
5913else
5914  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5915    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
5916$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
5917   { (exit 1); exit 1; }; }
5918fi
5919
5920fi
5921{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
5922$as_echo "$ac_cv_host" >&6; }
5923case $ac_cv_host in
5924*-*-*) ;;
5925*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
5926$as_echo "$as_me: error: invalid value of canonical host" >&2;}
5927   { (exit 1); exit 1; }; };;
5928esac
5929host=$ac_cv_host
5930ac_save_IFS=$IFS; IFS='-'
5931set x $ac_cv_host
5932shift
5933host_cpu=$1
5934host_vendor=$2
5935shift; shift
5936# Remember, the first character of IFS is used to create $*,
5937# except with old shells:
5938host_os=$*
5939IFS=$ac_save_IFS
5940case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5941
5942
5943{ $as_echo "$as_me:$LINENO: checking target system type" >&5
5944$as_echo_n "checking target system type... " >&6; }
5945if test "${ac_cv_target+set}" = set; then
5946  $as_echo_n "(cached) " >&6
5947else
5948  if test "x$target_alias" = x; then
5949  ac_cv_target=$ac_cv_host
5950else
5951  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
5952    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
5953$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
5954   { (exit 1); exit 1; }; }
5955fi
5956
5957fi
5958{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5
5959$as_echo "$ac_cv_target" >&6; }
5960case $ac_cv_target in
5961*-*-*) ;;
5962*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
5963$as_echo "$as_me: error: invalid value of canonical target" >&2;}
5964   { (exit 1); exit 1; }; };;
5965esac
5966target=$ac_cv_target
5967ac_save_IFS=$IFS; IFS='-'
5968set x $ac_cv_target
5969shift
5970target_cpu=$1
5971target_vendor=$2
5972shift; shift
5973# Remember, the first character of IFS is used to create $*,
5974# except with old shells:
5975target_os=$*
5976IFS=$ac_save_IFS
5977case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
5978
5979
5980# The aliases save the names the user supplied, while $host etc.
5981# will get canonicalized.
5982test -n "$target_alias" &&
5983  test "$program_prefix$program_suffix$program_transform_name" = \
5984    NONENONEs,x,x, &&
5985  program_prefix=${target_alias}-
5986
5987
5988    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
5989    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
5990    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
5991    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
5992    OPENJDK_TARGET_AUTOCONF_NAME="$host"
5993    OPENJDK_BUILD_AUTOCONF_NAME="$build"
5994
5995
5996
5997    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
5998
5999  case "$build_os" in
6000    *linux*)
6001      VAR_OS=linux
6002      VAR_OS_API=posix
6003      VAR_OS_ENV=linux
6004      ;;
6005    *solaris*)
6006      VAR_OS=solaris
6007      VAR_OS_API=posix
6008      VAR_OS_ENV=solaris
6009      ;;
6010    *darwin*)
6011      VAR_OS=macosx
6012      VAR_OS_API=posix
6013      VAR_OS_ENV=macosx
6014      ;;
6015    *bsd*)
6016      VAR_OS=bsd
6017      VAR_OS_API=posix
6018      VAR_OS_ENV=bsd
6019      ;;
6020    *cygwin*)
6021      VAR_OS=windows
6022      VAR_OS_API=winapi
6023      VAR_OS_ENV=windows.cygwin
6024      ;;
6025    *mingw*)
6026      VAR_OS=windows
6027      VAR_OS_API=winapi
6028      VAR_OS_ENV=windows.msys
6029      ;;
6030    *)
6031      { { $as_echo "$as_me:$LINENO: error: unsupported operating system $build_os" >&5
6032$as_echo "$as_me: error: unsupported operating system $build_os" >&2;}
6033   { (exit 1); exit 1; }; }
6034      ;;
6035  esac
6036
6037
6038  # First argument is the cpu name from the trip/quad
6039  case "$build_cpu" in
6040    x86_64)
6041      VAR_CPU=x86_64
6042      VAR_CPU_ARCH=x86
6043      VAR_CPU_BITS=64
6044      VAR_CPU_ENDIAN=little
6045      ;;
6046    i?86)
6047      VAR_CPU=x86
6048      VAR_CPU_ARCH=x86
6049      VAR_CPU_BITS=32
6050      VAR_CPU_ENDIAN=little
6051      ;;
6052    arm*)
6053      VAR_CPU=arm
6054      VAR_CPU_ARCH=arm
6055      VAR_CPU_BITS=32
6056      VAR_CPU_ENDIAN=little
6057      ;;
6058    powerpc)
6059      VAR_CPU=ppc
6060      VAR_CPU_ARCH=ppc
6061      VAR_CPU_BITS=32
6062      VAR_CPU_ENDIAN=big
6063       ;;
6064    powerpc64)
6065      VAR_CPU=ppc64
6066      VAR_CPU_ARCH=ppc
6067      VAR_CPU_BITS=64
6068      VAR_CPU_ENDIAN=big
6069       ;;
6070    sparc)
6071      VAR_CPU=sparc
6072      VAR_CPU_ARCH=sparc
6073      VAR_CPU_BITS=32
6074      VAR_CPU_ENDIAN=big
6075       ;;
6076    sparcv9)
6077      VAR_CPU=sparcv9
6078      VAR_CPU_ARCH=sparc
6079      VAR_CPU_BITS=64
6080      VAR_CPU_ENDIAN=big
6081       ;;
6082    *)
6083      { { $as_echo "$as_me:$LINENO: error: unsupported cpu $build_cpu" >&5
6084$as_echo "$as_me: error: unsupported cpu $build_cpu" >&2;}
6085   { (exit 1); exit 1; }; }
6086      ;;
6087  esac
6088
6089    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6090    OPENJDK_BUILD_OS="$VAR_OS"
6091    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6092    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6093    OPENJDK_BUILD_CPU="$VAR_CPU"
6094    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6095    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6096    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6097
6098
6099
6100
6101
6102
6103
6104    { $as_echo "$as_me:$LINENO: checking openjdk-build os-cpu" >&5
6105$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6106    { $as_echo "$as_me:$LINENO: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6107$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6108
6109    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6110
6111  case "$host_os" in
6112    *linux*)
6113      VAR_OS=linux
6114      VAR_OS_API=posix
6115      VAR_OS_ENV=linux
6116      ;;
6117    *solaris*)
6118      VAR_OS=solaris
6119      VAR_OS_API=posix
6120      VAR_OS_ENV=solaris
6121      ;;
6122    *darwin*)
6123      VAR_OS=macosx
6124      VAR_OS_API=posix
6125      VAR_OS_ENV=macosx
6126      ;;
6127    *bsd*)
6128      VAR_OS=bsd
6129      VAR_OS_API=posix
6130      VAR_OS_ENV=bsd
6131      ;;
6132    *cygwin*)
6133      VAR_OS=windows
6134      VAR_OS_API=winapi
6135      VAR_OS_ENV=windows.cygwin
6136      ;;
6137    *mingw*)
6138      VAR_OS=windows
6139      VAR_OS_API=winapi
6140      VAR_OS_ENV=windows.msys
6141      ;;
6142    *)
6143      { { $as_echo "$as_me:$LINENO: error: unsupported operating system $host_os" >&5
6144$as_echo "$as_me: error: unsupported operating system $host_os" >&2;}
6145   { (exit 1); exit 1; }; }
6146      ;;
6147  esac
6148
6149
6150  # First argument is the cpu name from the trip/quad
6151  case "$host_cpu" in
6152    x86_64)
6153      VAR_CPU=x86_64
6154      VAR_CPU_ARCH=x86
6155      VAR_CPU_BITS=64
6156      VAR_CPU_ENDIAN=little
6157      ;;
6158    i?86)
6159      VAR_CPU=x86
6160      VAR_CPU_ARCH=x86
6161      VAR_CPU_BITS=32
6162      VAR_CPU_ENDIAN=little
6163      ;;
6164    arm*)
6165      VAR_CPU=arm
6166      VAR_CPU_ARCH=arm
6167      VAR_CPU_BITS=32
6168      VAR_CPU_ENDIAN=little
6169      ;;
6170    powerpc)
6171      VAR_CPU=ppc
6172      VAR_CPU_ARCH=ppc
6173      VAR_CPU_BITS=32
6174      VAR_CPU_ENDIAN=big
6175       ;;
6176    powerpc64)
6177      VAR_CPU=ppc64
6178      VAR_CPU_ARCH=ppc
6179      VAR_CPU_BITS=64
6180      VAR_CPU_ENDIAN=big
6181       ;;
6182    sparc)
6183      VAR_CPU=sparc
6184      VAR_CPU_ARCH=sparc
6185      VAR_CPU_BITS=32
6186      VAR_CPU_ENDIAN=big
6187       ;;
6188    sparcv9)
6189      VAR_CPU=sparcv9
6190      VAR_CPU_ARCH=sparc
6191      VAR_CPU_BITS=64
6192      VAR_CPU_ENDIAN=big
6193       ;;
6194    *)
6195      { { $as_echo "$as_me:$LINENO: error: unsupported cpu $host_cpu" >&5
6196$as_echo "$as_me: error: unsupported cpu $host_cpu" >&2;}
6197   { (exit 1); exit 1; }; }
6198      ;;
6199  esac
6200
6201    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6202    OPENJDK_TARGET_OS="$VAR_OS"
6203    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6204    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6205    OPENJDK_TARGET_CPU="$VAR_CPU"
6206    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6207    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6208    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6209
6210
6211
6212
6213
6214
6215
6216    { $as_echo "$as_me:$LINENO: checking openjdk-target os-cpu" >&5
6217$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6218    { $as_echo "$as_me:$LINENO: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6219$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6220
6221
6222
6223# Check whether --with-target-bits was given.
6224if test "${with_target_bits+set}" = set; then
6225  withval=$with_target_bits;
6226fi
6227
6228
6229  # We have three types of compiles:
6230  # native  == normal compilation, target system == build system
6231  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6232  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6233  #
6234  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6235    # We're doing a proper cross-compilation
6236    COMPILE_TYPE="cross"
6237  else
6238    COMPILE_TYPE="native"
6239  fi
6240
6241  if test "x$with_target_bits" != x; then
6242    if test "x$COMPILE_TYPE" = "xcross"; then
6243      { { $as_echo "$as_me:$LINENO: error: It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." >&5
6244$as_echo "$as_me: error: It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." >&2;}
6245   { (exit 1); exit 1; }; }
6246    fi
6247
6248    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6249      # A reduced build is requested
6250      COMPILE_TYPE="reduced"
6251      OPENJDK_TARGET_CPU_BITS=32
6252      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6253        OPENJDK_TARGET_CPU=x86
6254      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6255        OPENJDK_TARGET_CPU=sparc
6256      else
6257        { { $as_echo "$as_me:$LINENO: error: Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" >&5
6258$as_echo "$as_me: error: Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" >&2;}
6259   { (exit 1); exit 1; }; }
6260      fi
6261    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6262      { { $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
6263$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;}
6264   { (exit 1); exit 1; }; }
6265    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6266      { $as_echo "$as_me:$LINENO: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6267$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6268    else
6269      { { $as_echo "$as_me:$LINENO: error: --with-target-bits can only be 32 or 64, you specified $with_target_bits!" >&5
6270$as_echo "$as_me: error: --with-target-bits can only be 32 or 64, you specified $with_target_bits!" >&2;}
6271   { (exit 1); exit 1; }; }
6272    fi
6273  fi
6274
6275
6276{ $as_echo "$as_me:$LINENO: checking compilation type" >&5
6277$as_echo_n "checking compilation type... " >&6; }
6278{ $as_echo "$as_me:$LINENO: result: $COMPILE_TYPE" >&5
6279$as_echo "$COMPILE_TYPE" >&6; }
6280
6281
6282    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6283       REQUIRED_OS_NAME=SunOS
6284       REQUIRED_OS_VERSION=5.10
6285    fi
6286    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6287       REQUIRED_OS_NAME=Linux
6288       REQUIRED_OS_VERSION=2.6
6289    fi
6290    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6291        REQUIRED_OS_NAME=Windows
6292        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6293            REQUIRED_OS_VERSION=5.2
6294        else
6295            REQUIRED_OS_VERSION=5.1
6296        fi
6297    fi
6298    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6299        REQUIRED_OS_NAME=Darwin
6300        REQUIRED_OS_VERSION=11.2
6301    fi
6302
6303
6304
6305
6306
6307    # Also store the legacy naming of the cpu.
6308    # Ie i586 and amd64 instead of x86 and x86_64
6309    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6310    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6311      OPENJDK_TARGET_CPU_LEGACY="i586"
6312    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6313      # On all platforms except MacOSX replace x86_64 with amd64.
6314      OPENJDK_TARGET_CPU_LEGACY="amd64"
6315    fi
6316
6317
6318    # And the second legacy naming of the cpu.
6319    # Ie i386 and amd64 instead of x86 and x86_64.
6320    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6321    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6322      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6323    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6324      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6325    fi
6326
6327
6328    # This is the name of the cpu (but using i386 and amd64 instead of
6329    # x86 and x86_64, respectively), preceeded by a /, to be used when
6330    # locating libraries. On macosx, it's empty, though.
6331    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6332    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6333        OPENJDK_TARGET_CPU_LIBDIR=""
6334    fi
6335
6336
6337    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6338    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6339    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6340    OPENJDK_TARGET_CPU_ISADIR=""
6341    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6342      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6343          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6344      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6345          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6346      fi
6347    fi
6348
6349
6350    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6351    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6352    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6353      # On linux only, we replace x86 with i386.
6354      OPENJDK_TARGET_CPU_OSARCH="i386"
6355    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6356      # On all platforms except macosx, we replace x86_64 with amd64.
6357      OPENJDK_TARGET_CPU_OSARCH="amd64"
6358    fi
6359
6360
6361    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6362    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6363      OPENJDK_TARGET_CPU_JLI="i386"
6364    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6365      # On all platforms except macosx, we replace x86_64 with amd64.
6366      OPENJDK_TARGET_CPU_JLI="amd64"
6367    fi
6368    # Now setup the -D flags for building libjli.
6369    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6370    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6371      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
6372        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
6373      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
6374        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
6375      fi
6376    fi
6377
6378
6379    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
6380    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
6381        OPENJDK_TARGET_OS_API_DIR="solaris"
6382    fi
6383    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
6384        OPENJDK_TARGET_OS_API_DIR="windows"
6385    fi
6386
6387
6388    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6389        A_LP64="LP64:="
6390        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
6391        # unpack200.exe
6392        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
6393            ADD_LP64="-D_LP64=1"
6394        fi
6395    fi
6396    LP64=$A_LP64
6397
6398
6399    if test "x$COMPILE_TYPE" = "xcross"; then
6400      # FIXME: ... or should this include reduced builds..?
6401      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
6402    else
6403      DEFINE_CROSS_COMPILE_ARCH=""
6404    fi
6405
6406
6407
6408
6409# Continue setting up basic stuff. Most remaining code require fundamental tools.
6410
6411# Locate the directory of this script.
6412SCRIPT="$0"
6413
6414    if test "x$OPENJDK_BUILD_OS" != xwindows; then
6415        # Follow a chain of symbolic links. Use readlink
6416        # where it exists, else fall back to horribly
6417        # complicated shell code.
6418        if test "x$READLINK_TESTED" != yes; then
6419            # On MacOSX there is a readlink tool with a different
6420            # purpose than the GNU readlink tool. Check the found readlink.
6421            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
6422            if test "x$ISGNU" = x; then
6423                 # A readlink that we do not know how to use.
6424                 # Are there other non-GNU readlinks out there?
6425                 READLINK_TESTED=yes
6426                 READLINK=
6427            fi
6428        fi
6429
6430        if test "x$READLINK" != x; then
6431            SCRIPT=`$READLINK -f $SCRIPT`
6432        else
6433            STARTDIR=$PWD
6434            COUNTER=0
6435            sym_link_dir=`$DIRNAME $SCRIPT`
6436            sym_link_file=`$BASENAME $SCRIPT`
6437            while test $COUNTER -lt 20; do
6438                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
6439                if test "x$ISLINK" == x; then
6440                    # This is not a symbolic link! We are done!
6441                    break
6442                fi
6443                # The link might be relative! We have to use cd to travel safely.
6444                cd $sym_link_dir
6445                # ... and we must get the to the absolute path, not one using symbolic links.
6446                cd `pwd -P`
6447                cd `$DIRNAME $ISLINK`
6448                sym_link_dir=`$THEPWDCMD`
6449                sym_link_file=`$BASENAME $ISLINK`
6450                let COUNTER=COUNTER+1
6451            done
6452            cd $STARTDIR
6453            SCRIPT=$sym_link_dir/$sym_link_file
6454        fi
6455    fi
6456
6457AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
6458
6459# Where is the source? It is located two levels above the configure script.
6460CURDIR="$PWD"
6461cd "$AUTOCONF_DIR/../.."
6462SRC_ROOT="`pwd`"
6463
6464if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6465  PATH_SEP=";"
6466
6467  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
6468  if test $SRC_ROOT_LENGTH -gt 100; then
6469      { { $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
6470$as_echo "$as_me: error: Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" >&2;}
6471   { (exit 1); exit 1; }; }
6472  fi
6473
6474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6475    { $as_echo "$as_me:$LINENO: checking cygwin release" >&5
6476$as_echo_n "checking cygwin release... " >&6; }
6477    CYGWIN_VERSION=`$UNAME -r`
6478    { $as_echo "$as_me:$LINENO: result: $CYGWIN_VERSION" >&5
6479$as_echo "$CYGWIN_VERSION" >&6; }
6480    WINDOWS_ENV_VENDOR='cygwin'
6481    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
6482
6483    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
6484    if test "x$CYGWIN_VERSION_OK" = x; then
6485      { $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
6486$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;}
6487      { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
6488$as_echo "$as_me: error: Cannot continue" >&2;}
6489   { (exit 1); exit 1; }; }
6490    fi
6491    if test "x$CYGPATH" = x; then
6492        { { $as_echo "$as_me:$LINENO: error: Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" >&5
6493$as_echo "$as_me: error: Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" >&2;}
6494   { (exit 1); exit 1; }; }
6495    fi
6496    { $as_echo "$as_me:$LINENO: checking cygwin root directory as unix-style path" >&5
6497$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
6498    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6499    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
6500    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
6501    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
6502    { $as_echo "$as_me:$LINENO: result: $CYGWIN_ROOT_PATH" >&5
6503$as_echo "$CYGWIN_ROOT_PATH" >&6; }
6504    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
6505    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
6506    if test "x$test_cygdrive_prefix" = x; then
6507        { { $as_echo "$as_me:$LINENO: error: Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." >&5
6508$as_echo "$as_me: error: Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." >&2;}
6509   { (exit 1); exit 1; }; }
6510    fi
6511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6512    { $as_echo "$as_me:$LINENO: checking msys release" >&5
6513$as_echo_n "checking msys release... " >&6; }
6514    MSYS_VERSION=`$UNAME -r`
6515    { $as_echo "$as_me:$LINENO: result: $MSYS_VERSION" >&5
6516$as_echo "$MSYS_VERSION" >&6; }
6517
6518    WINDOWS_ENV_VENDOR='msys'
6519    WINDOWS_ENV_VERSION="$MSYS_VERSION"
6520
6521    { $as_echo "$as_me:$LINENO: checking msys root directory as unix-style path" >&5
6522$as_echo_n "checking msys root directory as unix-style path... " >&6; }
6523    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6524    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
6525
6526  windows_path="$MSYS_ROOT_PATH"
6527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6528    unix_path=`$CYGPATH -u "$windows_path"`
6529    MSYS_ROOT_PATH="$unix_path"
6530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
6532    MSYS_ROOT_PATH="$unix_path"
6533  fi
6534
6535    { $as_echo "$as_me:$LINENO: result: $MSYS_ROOT_PATH" >&5
6536$as_echo "$MSYS_ROOT_PATH" >&6; }
6537    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
6538  else
6539    { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment. Neither cygwin nor msys was detected." >&5
6540$as_echo "$as_me: error: Unknown Windows environment. Neither cygwin nor msys was detected." >&2;}
6541   { (exit 1); exit 1; }; }
6542  fi
6543
6544  # Test if windows or unix (cygwin/msys) find is first in path.
6545  { $as_echo "$as_me:$LINENO: checking what kind of 'find' is first on the PATH" >&5
6546$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
6547  FIND_BINARY_OUTPUT=`find --version 2>&1`
6548  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
6549    { $as_echo "$as_me:$LINENO: result: unix style" >&5
6550$as_echo "unix style" >&6; }
6551  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
6552    { $as_echo "$as_me:$LINENO: result: Windows" >&5
6553$as_echo "Windows" >&6; }
6554    { $as_echo "$as_me:$LINENO: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
6555$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
6556    { $as_echo "$as_me:$LINENO: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
6557$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
6558    { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
6559$as_echo "$as_me: error: Cannot continue" >&2;}
6560   { (exit 1); exit 1; }; }
6561  else
6562    { $as_echo "$as_me:$LINENO: result: unknown" >&5
6563$as_echo "unknown" >&6; }
6564    { $as_echo "$as_me:$LINENO: WARNING: It seems that your find utility is non-standard." >&5
6565$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
6566  fi
6567
6568else
6569  PATH_SEP=":"
6570fi
6571
6572
6573
6574cd "$CURDIR"
6575
6576
6577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6578
6579  # Input might be given as Windows format, start by converting to
6580  # unix format.
6581  path="$SRC_ROOT"
6582  new_path=`$CYGPATH -u "$path"`
6583
6584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
6585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
6586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
6587  # "foo.exe" is OK but "foo" is an error.
6588  #
6589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
6590  # It is also a way to make sure we got the proper file name for the real test later on.
6591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
6592  if test "x$test_shortpath" = x; then
6593    { $as_echo "$as_me:$LINENO: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
6594$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
6595    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of SRC_ROOT" >&5
6596$as_echo "$as_me: error: Cannot locate the the path of SRC_ROOT" >&2;}
6597   { (exit 1); exit 1; }; }
6598  fi
6599
6600  # Call helper function which possibly converts this using DOS-style short mode.
6601  # If so, the updated path is stored in $new_path.
6602
6603  input_path="$new_path"
6604  # Check if we need to convert this using DOS-style short mode. If the path
6605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
6606  # take no chances and rewrite it.
6607  # Note: m4 eats our [], so we need to use [ and ] instead.
6608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
6609  if test "x$has_forbidden_chars" != x; then
6610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
6611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
6612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
6613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
6614      # Going to short mode and back again did indeed matter. Since short mode is
6615      # case insensitive, let's make it lowercase to improve readability.
6616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
6617      # Now convert it back to Unix-stile (cygpath)
6618      input_path=`$CYGPATH -u "$shortmode_path"`
6619      new_path="$input_path"
6620    fi
6621  fi
6622
6623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
6624  if test "x$test_cygdrive_prefix" = x; then
6625    # As a simple fix, exclude /usr/bin since it's not a real path.
6626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
6627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
6628      # a path prefixed by /cygdrive for fixpath to work.
6629      new_path="$CYGWIN_ROOT_PATH$input_path"
6630    fi
6631  fi
6632
6633
6634  if test "x$path" != "x$new_path"; then
6635    SRC_ROOT="$new_path"
6636    { $as_echo "$as_me:$LINENO: Rewriting SRC_ROOT to \"$new_path\"" >&5
6637$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
6638  fi
6639
6640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6641
6642  path="$SRC_ROOT"
6643  has_colon=`$ECHO $path | $GREP ^.:`
6644  new_path="$path"
6645  if test "x$has_colon" = x; then
6646    # Not in mixed or Windows style, start by that.
6647    new_path=`cmd //c echo $path`
6648  fi
6649
6650
6651  input_path="$new_path"
6652  # Check if we need to convert this using DOS-style short mode. If the path
6653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
6654  # take no chances and rewrite it.
6655  # Note: m4 eats our [], so we need to use [ and ] instead.
6656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
6657  if test "x$has_forbidden_chars" != x; then
6658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
6659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
6660  fi
6661
6662
6663  windows_path="$new_path"
6664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6665    unix_path=`$CYGPATH -u "$windows_path"`
6666    new_path="$unix_path"
6667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
6669    new_path="$unix_path"
6670  fi
6671
6672  if test "x$path" != "x$new_path"; then
6673    SRC_ROOT="$new_path"
6674    { $as_echo "$as_me:$LINENO: Rewriting SRC_ROOT to \"$new_path\"" >&5
6675$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
6676  fi
6677
6678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
6679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
6680
6681  else
6682    # We're on a posix platform. Hooray! :)
6683    path="$SRC_ROOT"
6684
6685    if test ! -f "$path" && test ! -d "$path"; then
6686      { { $as_echo "$as_me:$LINENO: error: The path of SRC_ROOT, which resolves as \"$path\", is not found." >&5
6687$as_echo "$as_me: error: The path of SRC_ROOT, which resolves as \"$path\", is not found." >&2;}
6688   { (exit 1); exit 1; }; }
6689    fi
6690
6691    has_space=`$ECHO "$path" | $GREP " "`
6692    if test "x$has_space" != x; then
6693      { $as_echo "$as_me:$LINENO: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
6694$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
6695      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
6696$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
6697   { (exit 1); exit 1; }; }
6698    fi
6699  fi
6700
6701
6702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6703
6704  # Input might be given as Windows format, start by converting to
6705  # unix format.
6706  path="$CURDIR"
6707  new_path=`$CYGPATH -u "$path"`
6708
6709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
6710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
6711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
6712  # "foo.exe" is OK but "foo" is an error.
6713  #
6714  # This test is therefore slightly more accurate than "test -f" to check for file precense.
6715  # It is also a way to make sure we got the proper file name for the real test later on.
6716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
6717  if test "x$test_shortpath" = x; then
6718    { $as_echo "$as_me:$LINENO: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
6719$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
6720    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CURDIR" >&5
6721$as_echo "$as_me: error: Cannot locate the the path of CURDIR" >&2;}
6722   { (exit 1); exit 1; }; }
6723  fi
6724
6725  # Call helper function which possibly converts this using DOS-style short mode.
6726  # If so, the updated path is stored in $new_path.
6727
6728  input_path="$new_path"
6729  # Check if we need to convert this using DOS-style short mode. If the path
6730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
6731  # take no chances and rewrite it.
6732  # Note: m4 eats our [], so we need to use [ and ] instead.
6733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
6734  if test "x$has_forbidden_chars" != x; then
6735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
6736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
6737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
6738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
6739      # Going to short mode and back again did indeed matter. Since short mode is
6740      # case insensitive, let's make it lowercase to improve readability.
6741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
6742      # Now convert it back to Unix-stile (cygpath)
6743      input_path=`$CYGPATH -u "$shortmode_path"`
6744      new_path="$input_path"
6745    fi
6746  fi
6747
6748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
6749  if test "x$test_cygdrive_prefix" = x; then
6750    # As a simple fix, exclude /usr/bin since it's not a real path.
6751    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
6752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
6753      # a path prefixed by /cygdrive for fixpath to work.
6754      new_path="$CYGWIN_ROOT_PATH$input_path"
6755    fi
6756  fi
6757
6758
6759  if test "x$path" != "x$new_path"; then
6760    CURDIR="$new_path"
6761    { $as_echo "$as_me:$LINENO: Rewriting CURDIR to \"$new_path\"" >&5
6762$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
6763  fi
6764
6765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6766
6767  path="$CURDIR"
6768  has_colon=`$ECHO $path | $GREP ^.:`
6769  new_path="$path"
6770  if test "x$has_colon" = x; then
6771    # Not in mixed or Windows style, start by that.
6772    new_path=`cmd //c echo $path`
6773  fi
6774
6775
6776  input_path="$new_path"
6777  # Check if we need to convert this using DOS-style short mode. If the path
6778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
6779  # take no chances and rewrite it.
6780  # Note: m4 eats our [], so we need to use [ and ] instead.
6781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
6782  if test "x$has_forbidden_chars" != x; then
6783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
6784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
6785  fi
6786
6787
6788  windows_path="$new_path"
6789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6790    unix_path=`$CYGPATH -u "$windows_path"`
6791    new_path="$unix_path"
6792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
6794    new_path="$unix_path"
6795  fi
6796
6797  if test "x$path" != "x$new_path"; then
6798    CURDIR="$new_path"
6799    { $as_echo "$as_me:$LINENO: Rewriting CURDIR to \"$new_path\"" >&5
6800$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
6801  fi
6802
6803  # Save the first 10 bytes of this path to the storage, so fixpath can work.
6804  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
6805
6806  else
6807    # We're on a posix platform. Hooray! :)
6808    path="$CURDIR"
6809
6810    if test ! -f "$path" && test ! -d "$path"; then
6811      { { $as_echo "$as_me:$LINENO: error: The path of CURDIR, which resolves as \"$path\", is not found." >&5
6812$as_echo "$as_me: error: The path of CURDIR, which resolves as \"$path\", is not found." >&2;}
6813   { (exit 1); exit 1; }; }
6814    fi
6815
6816    has_space=`$ECHO "$path" | $GREP " "`
6817    if test "x$has_space" != x; then
6818      { $as_echo "$as_me:$LINENO: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
6819$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
6820      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
6821$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
6822   { (exit 1); exit 1; }; }
6823    fi
6824  fi
6825
6826
6827if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
6828    # Add extra search paths on solaris for utilities like ar and as etc...
6829    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
6830fi
6831
6832# You can force the sys-root if the sys-root encoded into the cross compiler tools
6833# is not correct.
6834
6835# Check whether --with-sys-root was given.
6836if test "${with_sys_root+set}" = set; then
6837  withval=$with_sys_root;
6838fi
6839
6840
6841if test "x$with_sys_root" != x; then
6842  SYS_ROOT=$with_sys_root
6843else
6844  SYS_ROOT=/
6845fi
6846
6847
6848
6849# Check whether --with-tools-dir was given.
6850if test "${with_tools_dir+set}" = set; then
6851  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
6852fi
6853
6854
6855
6856# Check whether --with-devkit was given.
6857if test "${with_devkit+set}" = set; then
6858  withval=$with_devkit;
6859    if test "x$with_sys_root" != x; then
6860      { { $as_echo "$as_me:$LINENO: error: Cannot specify both --with-devkit and --with-sys-root at the same time" >&5
6861$as_echo "$as_me: error: Cannot specify both --with-devkit and --with-sys-root at the same time" >&2;}
6862   { (exit 1); exit 1; }; }
6863    fi
6864    if test "x$with_tools_dir" != x; then
6865      { { $as_echo "$as_me:$LINENO: error: Cannot specify both --with-devkit and --with-tools-dir at the same time" >&5
6866$as_echo "$as_me: error: Cannot specify both --with-devkit and --with-tools-dir at the same time" >&2;}
6867   { (exit 1); exit 1; }; }
6868    fi
6869    TOOLS_DIR=$with_devkit/bin
6870    SYS_ROOT=$with_devkit/$host_alias/libc
6871
6872fi
6873
6874
6875
6876
6877# Setup default logging of stdout and stderr to build.log in the output root.
6878BUILD_LOG='$(OUTPUT_ROOT)/build.log'
6879BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
6880BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
6881
6882
6883
6884
6885
6886# These are needed to be able to create a configuration name (and thus the output directory)
6887
6888###############################################################################
6889#
6890# Check which variant of the JDK that we want to build.
6891# Currently we have:
6892#    normal:   standard edition
6893# but the custom make system may add other variants
6894#
6895# Effectively the JDK variant gives a name to a specific set of
6896# modules to compile into the JDK. In the future, these modules
6897# might even be Jigsaw modules.
6898#
6899{ $as_echo "$as_me:$LINENO: checking which variant of the JDK to build" >&5
6900$as_echo_n "checking which variant of the JDK to build... " >&6; }
6901
6902# Check whether --with-jdk-variant was given.
6903if test "${with_jdk_variant+set}" = set; then
6904  withval=$with_jdk_variant;
6905fi
6906
6907
6908if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
6909    JDK_VARIANT="normal"
6910else
6911    { { $as_echo "$as_me:$LINENO: error: The available JDK variants are: normal" >&5
6912$as_echo "$as_me: error: The available JDK variants are: normal" >&2;}
6913   { (exit 1); exit 1; }; }
6914fi
6915
6916
6917
6918{ $as_echo "$as_me:$LINENO: result: $JDK_VARIANT" >&5
6919$as_echo "$JDK_VARIANT" >&6; }
6920
6921
6922
6923###############################################################################
6924#
6925# Check which variants of the JVM that we want to build.
6926# Currently we have:
6927#    server: normal interpreter and a tiered C1/C2 compiler
6928#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
6929#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
6930#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
6931#    zero: no machine code interpreter, no compiler
6932#    zeroshark: zero interpreter and shark/llvm compiler backend
6933{ $as_echo "$as_me:$LINENO: checking which variants of the JVM to build" >&5
6934$as_echo_n "checking which variants of the JVM to build... " >&6; }
6935
6936# Check whether --with-jvm-variants was given.
6937if test "${with_jvm_variants+set}" = set; then
6938  withval=$with_jvm_variants;
6939fi
6940
6941
6942if test "x$with_jvm_variants" = x; then
6943     with_jvm_variants="server"
6944fi
6945
6946JVM_VARIANTS=",$with_jvm_variants,"
6947TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
6948
6949if test "x$TEST_VARIANTS" != "x,"; then
6950   { { $as_echo "$as_me:$LINENO: error: The available JVM variants are: server, client, kernel, zero, zeroshark" >&5
6951$as_echo "$as_me: error: The available JVM variants are: server, client, kernel, zero, zeroshark" >&2;}
6952   { (exit 1); exit 1; }; }
6953fi
6954{ $as_echo "$as_me:$LINENO: result: $with_jvm_variants" >&5
6955$as_echo "$with_jvm_variants" >&6; }
6956
6957JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
6958JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
6959JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
6960JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
6961JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
6962
6963if test "x$JVM_VARIANT_CLIENT" = xtrue; then
6964    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6965        { { $as_echo "$as_me:$LINENO: error: You cannot build a client JVM for a 64-bit machine." >&5
6966$as_echo "$as_me: error: You cannot build a client JVM for a 64-bit machine." >&2;}
6967   { (exit 1); exit 1; }; }
6968    fi
6969fi
6970if test "x$JVM_VARIANT_KERNEL" = xtrue; then
6971    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6972        { { $as_echo "$as_me:$LINENO: error: You cannot build a kernel JVM for a 64-bit machine." >&5
6973$as_echo "$as_me: error: You cannot build a kernel JVM for a 64-bit machine." >&2;}
6974   { (exit 1); exit 1; }; }
6975    fi
6976fi
6977
6978# Replace the commas with AND for use in the build directory name.
6979ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
6980COUNT_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/'`
6981if test "x$COUNT_VARIANTS" != "x,1"; then
6982    BUILDING_MULTIPLE_JVM_VARIANTS=yes
6983else
6984    BUILDING_MULTIPLE_JVM_VARIANTS=no
6985fi
6986
6987
6988
6989
6990
6991
6992
6993
6994if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6995   MACOSX_UNIVERSAL="true"
6996fi
6997
6998
6999
7000
7001
7002###############################################################################
7003#
7004# Set the debug level
7005#    release: no debug information, all optimizations, no asserts.
7006#    fastdebug: debug information (-g), all optimizations, all asserts
7007#    slowdebug: debug information (-g), no optimizations, all asserts
7008#
7009DEBUG_LEVEL="release"
7010{ $as_echo "$as_me:$LINENO: checking which debug level to use" >&5
7011$as_echo_n "checking which debug level to use... " >&6; }
7012# Check whether --enable-debug was given.
7013if test "${enable_debug+set}" = set; then
7014  enableval=$enable_debug;
7015        ENABLE_DEBUG="${enableval}"
7016        DEBUG_LEVEL="fastdebug"
7017
7018else
7019  ENABLE_DEBUG="no"
7020fi
7021
7022
7023
7024# Check whether --with-debug-level was given.
7025if test "${with_debug_level+set}" = set; then
7026  withval=$with_debug_level;
7027        DEBUG_LEVEL="${withval}"
7028        if test "x$ENABLE_DEBUG" = xyes; then
7029			{ { $as_echo "$as_me:$LINENO: error: You cannot use both --enable-debug and --with-debug-level at the same time." >&5
7030$as_echo "$as_me: error: You cannot use both --enable-debug and --with-debug-level at the same time." >&2;}
7031   { (exit 1); exit 1; }; }
7032        fi
7033
7034fi
7035
7036{ $as_echo "$as_me:$LINENO: result: $DEBUG_LEVEL" >&5
7037$as_echo "$DEBUG_LEVEL" >&6; }
7038
7039if test "x$DEBUG_LEVEL" != xrelease && \
7040   test "x$DEBUG_LEVEL" != xfastdebug && \
7041   test "x$DEBUG_LEVEL" != xslowdebug; then
7042   { { $as_echo "$as_me:$LINENO: error: Allowed debug levels are: release, fastdebug and slowdebug" >&5
7043$as_echo "$as_me: error: Allowed debug levels are: release, fastdebug and slowdebug" >&2;}
7044   { (exit 1); exit 1; }; }
7045fi
7046
7047
7048###############################################################################
7049#
7050# Setup legacy vars/targets and new vars to deal with different debug levels.
7051#
7052
7053case $DEBUG_LEVEL in
7054      release )
7055          VARIANT="OPT"
7056          FASTDEBUG="false"
7057          DEBUG_CLASSFILES="false"
7058          BUILD_VARIANT_RELEASE=""
7059          HOTSPOT_DEBUG_LEVEL="product"
7060          HOTSPOT_EXPORT="product"
7061           ;;
7062      fastdebug )
7063          VARIANT="DBG"
7064          FASTDEBUG="true"
7065          DEBUG_CLASSFILES="true"
7066          BUILD_VARIANT_RELEASE="-fastdebug"
7067          HOTSPOT_DEBUG_LEVEL="fastdebug"
7068          HOTSPOT_EXPORT="fastdebug"
7069           ;;
7070      slowdebug )
7071          VARIANT="DBG"
7072          FASTDEBUG="false"
7073          DEBUG_CLASSFILES="true"
7074          BUILD_VARIANT_RELEASE="-debug"
7075          HOTSPOT_DEBUG_LEVEL="jvmg"
7076          HOTSPOT_EXPORT="debug"
7077           ;;
7078esac
7079
7080#####
7081# Generate the legacy makefile targets for hotspot.
7082# The hotspot api for selecting the build artifacts, really, needs to be improved.
7083#
7084HOTSPOT_TARGET=""
7085
7086if test "x$JVM_VARIANT_SERVER" = xtrue; then
7087    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7088fi
7089
7090if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7091    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7092fi
7093
7094if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7095    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7096fi
7097
7098if test "x$JVM_VARIANT_ZERO" = xtrue; then
7099    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7100fi
7101
7102if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7103    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7104fi
7105
7106HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7107
7108# On Macosx universal binaries are produced, but they only contain
7109# 64 bit intel. This invalidates control of which jvms are built
7110# from configure, but only server is valid anyway. Fix this
7111# when hotspot makefiles are rewritten.
7112if test "x$MACOSX_UNIVERSAL" = xtrue; then
7113    HOTSPOT_TARGET=universal_product
7114fi
7115
7116#####
7117
7118
7119
7120
7121
7122
7123
7124
7125# With basic setup done, call the custom early hook.
7126
7127
7128# To properly create a configuration name, we need to have the OpenJDK target
7129# and options (variants and debug level) parsed.
7130
7131
7132
7133# Check whether --with-conf-name was given.
7134if test "${with_conf_name+set}" = set; then
7135  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7136fi
7137
7138
7139# Test from where we are running configure, in or outside of src root.
7140if 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
7141    # We are running configure from the src root.
7142    # Create a default ./build/target-variant-debuglevel output root.
7143    if test "x${CONF_NAME}" = x; then
7144        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7145    fi
7146    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7147    $MKDIR -p "$OUTPUT_ROOT"
7148    if test ! -d "$OUTPUT_ROOT"; then
7149        { { $as_echo "$as_me:$LINENO: error: Could not create build directory $OUTPUT_ROOT" >&5
7150$as_echo "$as_me: error: Could not create build directory $OUTPUT_ROOT" >&2;}
7151   { (exit 1); exit 1; }; }
7152    fi
7153else
7154    # We are running configure from outside of the src dir.
7155    # Then use the current directory as output dir!
7156    # If configuration is situated in normal build directory, just use the build
7157    # directory name as configuration name, otherwise use the complete path.
7158    if test "x${CONF_NAME}" = x; then
7159        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7160    fi
7161    OUTPUT_ROOT="$CURDIR"
7162
7163    # WARNING: This might be a bad thing to do. You need to be sure you want to
7164    # have a configuration in this directory. Do some sanity checks!
7165
7166    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7167      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7168      # other files
7169      files_present=`$LS $OUTPUT_ROOT`
7170      # Configure has already touched config.log and confdefs.h in the current dir when this check
7171      # is performed.
7172      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7173                                             | $TR -d '\n'`
7174      if test "x$filtered_files" != x; then
7175        { $as_echo "$as_me:$LINENO: Current directory is $CURDIR." >&5
7176$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7177        { $as_echo "$as_me:$LINENO: Since this is not the source root, configure will output the configuration here" >&5
7178$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7179        { $as_echo "$as_me:$LINENO: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7180$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7181        { $as_echo "$as_me:$LINENO: However, this directory is not empty. This is not allowed, since it could" >&5
7182$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7183        { $as_echo "$as_me:$LINENO: seriously mess up just about everything." >&5
7184$as_echo "$as_me: seriously mess up just about everything." >&6;}
7185        { $as_echo "$as_me:$LINENO: Try 'cd $SRC_ROOT' and restart configure" >&5
7186$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7187        { $as_echo "$as_me:$LINENO: (or create a new empty directory and cd to it)." >&5
7188$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7189        { { $as_echo "$as_me:$LINENO: error: Will not continue creating configuration in $CURDIR" >&5
7190$as_echo "$as_me: error: Will not continue creating configuration in $CURDIR" >&2;}
7191   { (exit 1); exit 1; }; }
7192      fi
7193    fi
7194fi
7195{ $as_echo "$as_me:$LINENO: checking what configuration name to use" >&5
7196$as_echo_n "checking what configuration name to use... " >&6; }
7197{ $as_echo "$as_me:$LINENO: result: $CONF_NAME" >&5
7198$as_echo "$CONF_NAME" >&6; }
7199
7200
7201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7202
7203  # Input might be given as Windows format, start by converting to
7204  # unix format.
7205  path="$OUTPUT_ROOT"
7206  new_path=`$CYGPATH -u "$path"`
7207
7208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7211  # "foo.exe" is OK but "foo" is an error.
7212  #
7213  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7214  # It is also a way to make sure we got the proper file name for the real test later on.
7215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7216  if test "x$test_shortpath" = x; then
7217    { $as_echo "$as_me:$LINENO: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7218$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7219    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OUTPUT_ROOT" >&5
7220$as_echo "$as_me: error: Cannot locate the the path of OUTPUT_ROOT" >&2;}
7221   { (exit 1); exit 1; }; }
7222  fi
7223
7224  # Call helper function which possibly converts this using DOS-style short mode.
7225  # If so, the updated path is stored in $new_path.
7226
7227  input_path="$new_path"
7228  # Check if we need to convert this using DOS-style short mode. If the path
7229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7230  # take no chances and rewrite it.
7231  # Note: m4 eats our [], so we need to use [ and ] instead.
7232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7233  if test "x$has_forbidden_chars" != x; then
7234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7238      # Going to short mode and back again did indeed matter. Since short mode is
7239      # case insensitive, let's make it lowercase to improve readability.
7240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7241      # Now convert it back to Unix-stile (cygpath)
7242      input_path=`$CYGPATH -u "$shortmode_path"`
7243      new_path="$input_path"
7244    fi
7245  fi
7246
7247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7248  if test "x$test_cygdrive_prefix" = x; then
7249    # As a simple fix, exclude /usr/bin since it's not a real path.
7250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7252      # a path prefixed by /cygdrive for fixpath to work.
7253      new_path="$CYGWIN_ROOT_PATH$input_path"
7254    fi
7255  fi
7256
7257
7258  if test "x$path" != "x$new_path"; then
7259    OUTPUT_ROOT="$new_path"
7260    { $as_echo "$as_me:$LINENO: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7261$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7262  fi
7263
7264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7265
7266  path="$OUTPUT_ROOT"
7267  has_colon=`$ECHO $path | $GREP ^.:`
7268  new_path="$path"
7269  if test "x$has_colon" = x; then
7270    # Not in mixed or Windows style, start by that.
7271    new_path=`cmd //c echo $path`
7272  fi
7273
7274
7275  input_path="$new_path"
7276  # Check if we need to convert this using DOS-style short mode. If the path
7277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7278  # take no chances and rewrite it.
7279  # Note: m4 eats our [], so we need to use [ and ] instead.
7280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7281  if test "x$has_forbidden_chars" != x; then
7282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7284  fi
7285
7286
7287  windows_path="$new_path"
7288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7289    unix_path=`$CYGPATH -u "$windows_path"`
7290    new_path="$unix_path"
7291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7293    new_path="$unix_path"
7294  fi
7295
7296  if test "x$path" != "x$new_path"; then
7297    OUTPUT_ROOT="$new_path"
7298    { $as_echo "$as_me:$LINENO: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7299$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7300  fi
7301
7302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7304
7305  else
7306    # We're on a posix platform. Hooray! :)
7307    path="$OUTPUT_ROOT"
7308
7309    if test ! -f "$path" && test ! -d "$path"; then
7310      { { $as_echo "$as_me:$LINENO: error: The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." >&5
7311$as_echo "$as_me: error: The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." >&2;}
7312   { (exit 1); exit 1; }; }
7313    fi
7314
7315    has_space=`$ECHO "$path" | $GREP " "`
7316    if test "x$has_space" != x; then
7317      { $as_echo "$as_me:$LINENO: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7318$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7319      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
7320$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
7321   { (exit 1); exit 1; }; }
7322    fi
7323  fi
7324
7325
7326SPEC=$OUTPUT_ROOT/spec.gmk
7327
7328CONF_NAME=$CONF_NAME
7329
7330OUTPUT_ROOT=$OUTPUT_ROOT
7331
7332
7333# Most of the probed defines are put into config.h
7334ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7335
7336# The spec.gmk file contains all variables for the make system.
7337ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7338
7339# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7340ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7341
7342# The bootcycle-spec.gmk file contains support for boot cycle builds.
7343ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7344
7345# The compare.sh is used to compare the build output to other builds.
7346ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7347
7348# Spec.sh is currently used by compare-objects.sh
7349ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7350
7351# The generated Makefile knows where the spec.gmk is and where the source is.
7352# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7353# which will look for generated configurations
7354ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7355
7356
7357# Save the arguments given to us
7358echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7359
7360
7361# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
7362
7363    for ac_prog in apt-get yum port pkgutil pkgadd
7364do
7365  # Extract the first word of "$ac_prog", so it can be a program name with args.
7366set dummy $ac_prog; ac_word=$2
7367{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7368$as_echo_n "checking for $ac_word... " >&6; }
7369if test "${ac_cv_prog_PKGHANDLER+set}" = set; then
7370  $as_echo_n "(cached) " >&6
7371else
7372  if test -n "$PKGHANDLER"; then
7373  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
7374else
7375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7376for as_dir in $PATH
7377do
7378  IFS=$as_save_IFS
7379  test -z "$as_dir" && as_dir=.
7380  for ac_exec_ext in '' $ac_executable_extensions; do
7381  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7382    ac_cv_prog_PKGHANDLER="$ac_prog"
7383    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7384    break 2
7385  fi
7386done
7387done
7388IFS=$as_save_IFS
7389
7390fi
7391fi
7392PKGHANDLER=$ac_cv_prog_PKGHANDLER
7393if test -n "$PKGHANDLER"; then
7394  { $as_echo "$as_me:$LINENO: result: $PKGHANDLER" >&5
7395$as_echo "$PKGHANDLER" >&6; }
7396else
7397  { $as_echo "$as_me:$LINENO: result: no" >&5
7398$as_echo "no" >&6; }
7399fi
7400
7401
7402  test -n "$PKGHANDLER" && break
7403done
7404
7405
7406
7407# Setup tools that requires more complex handling, or that is not needed by the configure script.
7408
7409
7410  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
7411  if test "x$MAKE" != x; then
7412    # User has supplied a make, test it.
7413    if test ! -f "$MAKE"; then
7414      { { $as_echo "$as_me:$LINENO: error: The specified make (by MAKE=$MAKE) is not found." >&5
7415$as_echo "$as_me: error: The specified make (by MAKE=$MAKE) is not found." >&2;}
7416   { (exit 1); exit 1; }; }
7417    fi
7418
7419  MAKE_CANDIDATE=""$MAKE""
7420  DESCRIPTION="user supplied MAKE=$MAKE"
7421  if test "x$MAKE_CANDIDATE" != x; then
7422    { $as_echo "$as_me:$LINENO: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7423$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7424    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7425    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7426    if test "x$IS_GNU_MAKE" = x; then
7427      { $as_echo "$as_me:$LINENO: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7428$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7429    else
7430      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7431      if test "x$IS_MODERN_MAKE" = x; then
7432        { $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
7433$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;}
7434      else
7435        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7436          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7437            MAKE_EXPECTED_ENV='cygwin'
7438          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7439            MAKE_EXPECTED_ENV='msys'
7440          else
7441            { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment" >&5
7442$as_echo "$as_me: error: Unknown Windows environment" >&2;}
7443   { (exit 1); exit 1; }; }
7444          fi
7445          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7446          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7447        else
7448          # Not relevant for non-Windows
7449          IS_MAKE_CORRECT_ENV=true
7450        fi
7451        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7452          { $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
7453$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;}
7454        else
7455          FOUND_MAKE=$MAKE_CANDIDATE
7456
7457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7458
7459  # First separate the path from the arguments. This will split at the first
7460  # space.
7461  complete="$FOUND_MAKE"
7462  path="${complete%% *}"
7463  tmp="$complete EOL"
7464  arguments="${tmp#* }"
7465
7466  # Input might be given as Windows format, start by converting to
7467  # unix format.
7468  new_path=`$CYGPATH -u "$path"`
7469
7470  # Now try to locate executable using which
7471  new_path=`$WHICH "$new_path" 2> /dev/null`
7472  # bat and cmd files are not always considered executable in cygwin causing which
7473  # to not find them
7474  if test "x$new_path" = x \
7475           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7476           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7477    new_path=`$CYGPATH -u "$path"`
7478  fi
7479  if test "x$new_path" = x; then
7480    # Oops. Which didn't find the executable.
7481    # The splitting of arguments from the executable at a space might have been incorrect,
7482    # since paths with space are more likely in Windows. Give it another try with the whole
7483    # argument.
7484    path="$complete"
7485    arguments="EOL"
7486    new_path=`$CYGPATH -u "$path"`
7487    new_path=`$WHICH "$new_path" 2> /dev/null`
7488    # bat and cmd files are not always considered executable in cygwin causing which
7489    # to not find them
7490    if test "x$new_path" = x \
7491             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7492             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7493      new_path=`$CYGPATH -u "$path"`
7494    fi
7495    if test "x$new_path" = x; then
7496      # It's still not found. Now this is an unrecoverable error.
7497      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7498$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7499      has_space=`$ECHO "$complete" | $GREP " "`
7500      if test "x$has_space" != x; then
7501        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7503      fi
7504      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7505$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7506   { (exit 1); exit 1; }; }
7507    fi
7508  fi
7509
7510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7513  # "foo.exe" is OK but "foo" is an error.
7514  #
7515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7516  # It is also a way to make sure we got the proper file name for the real test later on.
7517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7518  if test "x$test_shortpath" = x; then
7519    # Short path failed, file does not exist as specified.
7520    # Try adding .exe or .cmd
7521    if test -f "${new_path}.exe"; then
7522       input_to_shortpath="${new_path}.exe"
7523    elif test -f "${new_path}.cmd"; then
7524       input_to_shortpath="${new_path}.cmd"
7525    else
7526      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
7527$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
7528      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
7529$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
7530      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7531$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7532   { (exit 1); exit 1; }; }
7533    fi
7534  else
7535    input_to_shortpath="$new_path"
7536  fi
7537
7538  # Call helper function which possibly converts this using DOS-style short mode.
7539  # If so, the updated path is stored in $new_path.
7540  new_path="$input_to_shortpath"
7541
7542  input_path="$input_to_shortpath"
7543  # Check if we need to convert this using DOS-style short mode. If the path
7544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7545  # take no chances and rewrite it.
7546  # Note: m4 eats our [], so we need to use [ and ] instead.
7547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7548  if test "x$has_forbidden_chars" != x; then
7549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7553      # Going to short mode and back again did indeed matter. Since short mode is
7554      # case insensitive, let's make it lowercase to improve readability.
7555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7556      # Now convert it back to Unix-stile (cygpath)
7557      input_path=`$CYGPATH -u "$shortmode_path"`
7558      new_path="$input_path"
7559    fi
7560  fi
7561
7562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7563  if test "x$test_cygdrive_prefix" = x; then
7564    # As a simple fix, exclude /usr/bin since it's not a real path.
7565    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
7566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7567      # a path prefixed by /cygdrive for fixpath to work.
7568      new_path="$CYGWIN_ROOT_PATH$input_path"
7569    fi
7570  fi
7571
7572  # remove trailing .exe if any
7573  new_path="${new_path/%.exe/}"
7574
7575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7576
7577  # First separate the path from the arguments. This will split at the first
7578  # space.
7579  complete="$FOUND_MAKE"
7580  path="${complete%% *}"
7581  tmp="$complete EOL"
7582  arguments="${tmp#* }"
7583
7584  # Input might be given as Windows format, start by converting to
7585  # unix format.
7586  new_path="$path"
7587
7588  windows_path="$new_path"
7589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7590    unix_path=`$CYGPATH -u "$windows_path"`
7591    new_path="$unix_path"
7592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7594    new_path="$unix_path"
7595  fi
7596
7597
7598  # Now try to locate executable using which
7599  new_path=`$WHICH "$new_path" 2> /dev/null`
7600
7601  if test "x$new_path" = x; then
7602    # Oops. Which didn't find the executable.
7603    # The splitting of arguments from the executable at a space might have been incorrect,
7604    # since paths with space are more likely in Windows. Give it another try with the whole
7605    # argument.
7606    path="$complete"
7607    arguments="EOL"
7608    new_path="$path"
7609
7610  windows_path="$new_path"
7611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7612    unix_path=`$CYGPATH -u "$windows_path"`
7613    new_path="$unix_path"
7614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7616    new_path="$unix_path"
7617  fi
7618
7619
7620    new_path=`$WHICH "$new_path" 2> /dev/null`
7621
7622    if test "x$new_path" = x; then
7623      # It's still not found. Now this is an unrecoverable error.
7624      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7625$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7626      has_space=`$ECHO "$complete" | $GREP " "`
7627      if test "x$has_space" != x; then
7628        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7630      fi
7631      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7632$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7633   { (exit 1); exit 1; }; }
7634    fi
7635  fi
7636
7637  # Now new_path has a complete unix path to the binary
7638  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
7639    # Keep paths in /bin as-is, but remove trailing .exe if any
7640    new_path="${new_path/%.exe/}"
7641    # Do not save /bin paths to all_fixpath_prefixes!
7642  else
7643    # Not in mixed or Windows style, start by that.
7644    new_path=`cmd //c echo $new_path`
7645
7646  input_path="$new_path"
7647  # Check if we need to convert this using DOS-style short mode. If the path
7648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7649  # take no chances and rewrite it.
7650  # Note: m4 eats our [], so we need to use [ and ] instead.
7651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7652  if test "x$has_forbidden_chars" != x; then
7653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7655  fi
7656
7657    # Output is in $new_path
7658
7659  windows_path="$new_path"
7660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7661    unix_path=`$CYGPATH -u "$windows_path"`
7662    new_path="$unix_path"
7663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7665    new_path="$unix_path"
7666  fi
7667
7668    # remove trailing .exe if any
7669    new_path="${new_path/%.exe/}"
7670
7671    # Save the first 10 bytes of this path to the storage, so fixpath can work.
7672    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7673  fi
7674
7675  else
7676    # We're on a posix platform. Hooray! :)
7677    # First separate the path from the arguments. This will split at the first
7678    # space.
7679    complete="$FOUND_MAKE"
7680    path="${complete%% *}"
7681    tmp="$complete EOL"
7682    arguments="${tmp#* }"
7683
7684    new_path=`$WHICH $path 2> /dev/null`
7685    if test "x$new_path" = x; then
7686      is_absolute_path=`$ECHO "$path" | $GREP ^/`
7687      if test "x$is_absolute_path" != x; then
7688        { $as_echo "$as_me:$LINENO: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
7689$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
7690        new_path="$path"
7691      else
7692        { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7693$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7694        has_space=`$ECHO "$complete" | $GREP " "`
7695        if test "x$has_space" != x; then
7696          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
7697$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
7698        fi
7699        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7700$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7701   { (exit 1); exit 1; }; }
7702      fi
7703    fi
7704  fi
7705
7706  # Now join together the path and the arguments once again
7707  if test "x$arguments" != xEOL; then
7708      new_complete="$new_path ${arguments% *}"
7709  else
7710      new_complete="$new_path"
7711  fi
7712
7713  if test "x$complete" != "x$new_complete"; then
7714    FOUND_MAKE="$new_complete"
7715    { $as_echo "$as_me:$LINENO: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
7716$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
7717  fi
7718
7719        fi
7720      fi
7721    fi
7722  fi
7723
7724    if test "x$FOUND_MAKE" = x; then
7725      { { $as_echo "$as_me:$LINENO: error: The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." >&5
7726$as_echo "$as_me: error: The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." >&2;}
7727   { (exit 1); exit 1; }; }
7728    fi
7729  else
7730    # Try our hardest to locate a correct version of GNU make
7731    for ac_prog in gmake
7732do
7733  # Extract the first word of "$ac_prog", so it can be a program name with args.
7734set dummy $ac_prog; ac_word=$2
7735{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7736$as_echo_n "checking for $ac_word... " >&6; }
7737if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then
7738  $as_echo_n "(cached) " >&6
7739else
7740  case $CHECK_GMAKE in
7741  [\\/]* | ?:[\\/]*)
7742  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
7743  ;;
7744  *)
7745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7746for as_dir in $PATH
7747do
7748  IFS=$as_save_IFS
7749  test -z "$as_dir" && as_dir=.
7750  for ac_exec_ext in '' $ac_executable_extensions; do
7751  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7752    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
7753    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7754    break 2
7755  fi
7756done
7757done
7758IFS=$as_save_IFS
7759
7760  ;;
7761esac
7762fi
7763CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
7764if test -n "$CHECK_GMAKE"; then
7765  { $as_echo "$as_me:$LINENO: result: $CHECK_GMAKE" >&5
7766$as_echo "$CHECK_GMAKE" >&6; }
7767else
7768  { $as_echo "$as_me:$LINENO: result: no" >&5
7769$as_echo "no" >&6; }
7770fi
7771
7772
7773  test -n "$CHECK_GMAKE" && break
7774done
7775
7776
7777  MAKE_CANDIDATE=""$CHECK_GMAKE""
7778  DESCRIPTION="gmake in PATH"
7779  if test "x$MAKE_CANDIDATE" != x; then
7780    { $as_echo "$as_me:$LINENO: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7781$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7782    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7783    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7784    if test "x$IS_GNU_MAKE" = x; then
7785      { $as_echo "$as_me:$LINENO: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7786$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7787    else
7788      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7789      if test "x$IS_MODERN_MAKE" = x; then
7790        { $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
7791$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;}
7792      else
7793        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7794          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7795            MAKE_EXPECTED_ENV='cygwin'
7796          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7797            MAKE_EXPECTED_ENV='msys'
7798          else
7799            { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment" >&5
7800$as_echo "$as_me: error: Unknown Windows environment" >&2;}
7801   { (exit 1); exit 1; }; }
7802          fi
7803          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7804          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7805        else
7806          # Not relevant for non-Windows
7807          IS_MAKE_CORRECT_ENV=true
7808        fi
7809        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7810          { $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
7811$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;}
7812        else
7813          FOUND_MAKE=$MAKE_CANDIDATE
7814
7815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7816
7817  # First separate the path from the arguments. This will split at the first
7818  # space.
7819  complete="$FOUND_MAKE"
7820  path="${complete%% *}"
7821  tmp="$complete EOL"
7822  arguments="${tmp#* }"
7823
7824  # Input might be given as Windows format, start by converting to
7825  # unix format.
7826  new_path=`$CYGPATH -u "$path"`
7827
7828  # Now try to locate executable using which
7829  new_path=`$WHICH "$new_path" 2> /dev/null`
7830  # bat and cmd files are not always considered executable in cygwin causing which
7831  # to not find them
7832  if test "x$new_path" = x \
7833           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7834           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7835    new_path=`$CYGPATH -u "$path"`
7836  fi
7837  if test "x$new_path" = x; then
7838    # Oops. Which didn't find the executable.
7839    # The splitting of arguments from the executable at a space might have been incorrect,
7840    # since paths with space are more likely in Windows. Give it another try with the whole
7841    # argument.
7842    path="$complete"
7843    arguments="EOL"
7844    new_path=`$CYGPATH -u "$path"`
7845    new_path=`$WHICH "$new_path" 2> /dev/null`
7846    # bat and cmd files are not always considered executable in cygwin causing which
7847    # to not find them
7848    if test "x$new_path" = x \
7849             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7850             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7851      new_path=`$CYGPATH -u "$path"`
7852    fi
7853    if test "x$new_path" = x; then
7854      # It's still not found. Now this is an unrecoverable error.
7855      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7856$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7857      has_space=`$ECHO "$complete" | $GREP " "`
7858      if test "x$has_space" != x; then
7859        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7860$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7861      fi
7862      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7863$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7864   { (exit 1); exit 1; }; }
7865    fi
7866  fi
7867
7868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7871  # "foo.exe" is OK but "foo" is an error.
7872  #
7873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7874  # It is also a way to make sure we got the proper file name for the real test later on.
7875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7876  if test "x$test_shortpath" = x; then
7877    # Short path failed, file does not exist as specified.
7878    # Try adding .exe or .cmd
7879    if test -f "${new_path}.exe"; then
7880       input_to_shortpath="${new_path}.exe"
7881    elif test -f "${new_path}.cmd"; then
7882       input_to_shortpath="${new_path}.cmd"
7883    else
7884      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
7885$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
7886      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
7887$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
7888      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7889$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7890   { (exit 1); exit 1; }; }
7891    fi
7892  else
7893    input_to_shortpath="$new_path"
7894  fi
7895
7896  # Call helper function which possibly converts this using DOS-style short mode.
7897  # If so, the updated path is stored in $new_path.
7898  new_path="$input_to_shortpath"
7899
7900  input_path="$input_to_shortpath"
7901  # Check if we need to convert this using DOS-style short mode. If the path
7902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7903  # take no chances and rewrite it.
7904  # Note: m4 eats our [], so we need to use [ and ] instead.
7905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7906  if test "x$has_forbidden_chars" != x; then
7907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7911      # Going to short mode and back again did indeed matter. Since short mode is
7912      # case insensitive, let's make it lowercase to improve readability.
7913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7914      # Now convert it back to Unix-stile (cygpath)
7915      input_path=`$CYGPATH -u "$shortmode_path"`
7916      new_path="$input_path"
7917    fi
7918  fi
7919
7920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7921  if test "x$test_cygdrive_prefix" = x; then
7922    # As a simple fix, exclude /usr/bin since it's not a real path.
7923    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
7924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7925      # a path prefixed by /cygdrive for fixpath to work.
7926      new_path="$CYGWIN_ROOT_PATH$input_path"
7927    fi
7928  fi
7929
7930  # remove trailing .exe if any
7931  new_path="${new_path/%.exe/}"
7932
7933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7934
7935  # First separate the path from the arguments. This will split at the first
7936  # space.
7937  complete="$FOUND_MAKE"
7938  path="${complete%% *}"
7939  tmp="$complete EOL"
7940  arguments="${tmp#* }"
7941
7942  # Input might be given as Windows format, start by converting to
7943  # unix format.
7944  new_path="$path"
7945
7946  windows_path="$new_path"
7947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7948    unix_path=`$CYGPATH -u "$windows_path"`
7949    new_path="$unix_path"
7950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7952    new_path="$unix_path"
7953  fi
7954
7955
7956  # Now try to locate executable using which
7957  new_path=`$WHICH "$new_path" 2> /dev/null`
7958
7959  if test "x$new_path" = x; then
7960    # Oops. Which didn't find the executable.
7961    # The splitting of arguments from the executable at a space might have been incorrect,
7962    # since paths with space are more likely in Windows. Give it another try with the whole
7963    # argument.
7964    path="$complete"
7965    arguments="EOL"
7966    new_path="$path"
7967
7968  windows_path="$new_path"
7969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7970    unix_path=`$CYGPATH -u "$windows_path"`
7971    new_path="$unix_path"
7972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7974    new_path="$unix_path"
7975  fi
7976
7977
7978    new_path=`$WHICH "$new_path" 2> /dev/null`
7979
7980    if test "x$new_path" = x; then
7981      # It's still not found. Now this is an unrecoverable error.
7982      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7983$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7984      has_space=`$ECHO "$complete" | $GREP " "`
7985      if test "x$has_space" != x; then
7986        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7987$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7988      fi
7989      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7990$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7991   { (exit 1); exit 1; }; }
7992    fi
7993  fi
7994
7995  # Now new_path has a complete unix path to the binary
7996  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
7997    # Keep paths in /bin as-is, but remove trailing .exe if any
7998    new_path="${new_path/%.exe/}"
7999    # Do not save /bin paths to all_fixpath_prefixes!
8000  else
8001    # Not in mixed or Windows style, start by that.
8002    new_path=`cmd //c echo $new_path`
8003
8004  input_path="$new_path"
8005  # Check if we need to convert this using DOS-style short mode. If the path
8006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8007  # take no chances and rewrite it.
8008  # Note: m4 eats our [], so we need to use [ and ] instead.
8009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8010  if test "x$has_forbidden_chars" != x; then
8011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8013  fi
8014
8015    # Output is in $new_path
8016
8017  windows_path="$new_path"
8018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8019    unix_path=`$CYGPATH -u "$windows_path"`
8020    new_path="$unix_path"
8021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8023    new_path="$unix_path"
8024  fi
8025
8026    # remove trailing .exe if any
8027    new_path="${new_path/%.exe/}"
8028
8029    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8030    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8031  fi
8032
8033  else
8034    # We're on a posix platform. Hooray! :)
8035    # First separate the path from the arguments. This will split at the first
8036    # space.
8037    complete="$FOUND_MAKE"
8038    path="${complete%% *}"
8039    tmp="$complete EOL"
8040    arguments="${tmp#* }"
8041
8042    new_path=`$WHICH $path 2> /dev/null`
8043    if test "x$new_path" = x; then
8044      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8045      if test "x$is_absolute_path" != x; then
8046        { $as_echo "$as_me:$LINENO: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8047$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8048        new_path="$path"
8049      else
8050        { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8052        has_space=`$ECHO "$complete" | $GREP " "`
8053        if test "x$has_space" != x; then
8054          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
8055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8056        fi
8057        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8058$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8059   { (exit 1); exit 1; }; }
8060      fi
8061    fi
8062  fi
8063
8064  # Now join together the path and the arguments once again
8065  if test "x$arguments" != xEOL; then
8066      new_complete="$new_path ${arguments% *}"
8067  else
8068      new_complete="$new_path"
8069  fi
8070
8071  if test "x$complete" != "x$new_complete"; then
8072    FOUND_MAKE="$new_complete"
8073    { $as_echo "$as_me:$LINENO: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8074$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8075  fi
8076
8077        fi
8078      fi
8079    fi
8080  fi
8081
8082
8083    if test "x$FOUND_MAKE" = x; then
8084      for ac_prog in make
8085do
8086  # Extract the first word of "$ac_prog", so it can be a program name with args.
8087set dummy $ac_prog; ac_word=$2
8088{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8089$as_echo_n "checking for $ac_word... " >&6; }
8090if test "${ac_cv_path_CHECK_MAKE+set}" = set; then
8091  $as_echo_n "(cached) " >&6
8092else
8093  case $CHECK_MAKE in
8094  [\\/]* | ?:[\\/]*)
8095  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8096  ;;
8097  *)
8098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8099for as_dir in $PATH
8100do
8101  IFS=$as_save_IFS
8102  test -z "$as_dir" && as_dir=.
8103  for ac_exec_ext in '' $ac_executable_extensions; do
8104  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8105    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8106    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8107    break 2
8108  fi
8109done
8110done
8111IFS=$as_save_IFS
8112
8113  ;;
8114esac
8115fi
8116CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8117if test -n "$CHECK_MAKE"; then
8118  { $as_echo "$as_me:$LINENO: result: $CHECK_MAKE" >&5
8119$as_echo "$CHECK_MAKE" >&6; }
8120else
8121  { $as_echo "$as_me:$LINENO: result: no" >&5
8122$as_echo "no" >&6; }
8123fi
8124
8125
8126  test -n "$CHECK_MAKE" && break
8127done
8128
8129
8130  MAKE_CANDIDATE=""$CHECK_MAKE""
8131  DESCRIPTION="make in PATH"
8132  if test "x$MAKE_CANDIDATE" != x; then
8133    { $as_echo "$as_me:$LINENO: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8134$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8135    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8136    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8137    if test "x$IS_GNU_MAKE" = x; then
8138      { $as_echo "$as_me:$LINENO: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8139$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8140    else
8141      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8142      if test "x$IS_MODERN_MAKE" = x; then
8143        { $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
8144$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;}
8145      else
8146        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8147          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8148            MAKE_EXPECTED_ENV='cygwin'
8149          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8150            MAKE_EXPECTED_ENV='msys'
8151          else
8152            { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment" >&5
8153$as_echo "$as_me: error: Unknown Windows environment" >&2;}
8154   { (exit 1); exit 1; }; }
8155          fi
8156          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8157          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8158        else
8159          # Not relevant for non-Windows
8160          IS_MAKE_CORRECT_ENV=true
8161        fi
8162        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8163          { $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
8164$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;}
8165        else
8166          FOUND_MAKE=$MAKE_CANDIDATE
8167
8168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8169
8170  # First separate the path from the arguments. This will split at the first
8171  # space.
8172  complete="$FOUND_MAKE"
8173  path="${complete%% *}"
8174  tmp="$complete EOL"
8175  arguments="${tmp#* }"
8176
8177  # Input might be given as Windows format, start by converting to
8178  # unix format.
8179  new_path=`$CYGPATH -u "$path"`
8180
8181  # Now try to locate executable using which
8182  new_path=`$WHICH "$new_path" 2> /dev/null`
8183  # bat and cmd files are not always considered executable in cygwin causing which
8184  # to not find them
8185  if test "x$new_path" = x \
8186           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8187           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8188    new_path=`$CYGPATH -u "$path"`
8189  fi
8190  if test "x$new_path" = x; then
8191    # Oops. Which didn't find the executable.
8192    # The splitting of arguments from the executable at a space might have been incorrect,
8193    # since paths with space are more likely in Windows. Give it another try with the whole
8194    # argument.
8195    path="$complete"
8196    arguments="EOL"
8197    new_path=`$CYGPATH -u "$path"`
8198    new_path=`$WHICH "$new_path" 2> /dev/null`
8199    # bat and cmd files are not always considered executable in cygwin causing which
8200    # to not find them
8201    if test "x$new_path" = x \
8202             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8203             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8204      new_path=`$CYGPATH -u "$path"`
8205    fi
8206    if test "x$new_path" = x; then
8207      # It's still not found. Now this is an unrecoverable error.
8208      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8209$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8210      has_space=`$ECHO "$complete" | $GREP " "`
8211      if test "x$has_space" != x; then
8212        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8213$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8214      fi
8215      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8216$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8217   { (exit 1); exit 1; }; }
8218    fi
8219  fi
8220
8221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8224  # "foo.exe" is OK but "foo" is an error.
8225  #
8226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8227  # It is also a way to make sure we got the proper file name for the real test later on.
8228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8229  if test "x$test_shortpath" = x; then
8230    # Short path failed, file does not exist as specified.
8231    # Try adding .exe or .cmd
8232    if test -f "${new_path}.exe"; then
8233       input_to_shortpath="${new_path}.exe"
8234    elif test -f "${new_path}.cmd"; then
8235       input_to_shortpath="${new_path}.cmd"
8236    else
8237      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8238$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8239      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8240$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8241      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8242$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8243   { (exit 1); exit 1; }; }
8244    fi
8245  else
8246    input_to_shortpath="$new_path"
8247  fi
8248
8249  # Call helper function which possibly converts this using DOS-style short mode.
8250  # If so, the updated path is stored in $new_path.
8251  new_path="$input_to_shortpath"
8252
8253  input_path="$input_to_shortpath"
8254  # Check if we need to convert this using DOS-style short mode. If the path
8255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8256  # take no chances and rewrite it.
8257  # Note: m4 eats our [], so we need to use [ and ] instead.
8258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8259  if test "x$has_forbidden_chars" != x; then
8260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8264      # Going to short mode and back again did indeed matter. Since short mode is
8265      # case insensitive, let's make it lowercase to improve readability.
8266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8267      # Now convert it back to Unix-stile (cygpath)
8268      input_path=`$CYGPATH -u "$shortmode_path"`
8269      new_path="$input_path"
8270    fi
8271  fi
8272
8273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8274  if test "x$test_cygdrive_prefix" = x; then
8275    # As a simple fix, exclude /usr/bin since it's not a real path.
8276    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8278      # a path prefixed by /cygdrive for fixpath to work.
8279      new_path="$CYGWIN_ROOT_PATH$input_path"
8280    fi
8281  fi
8282
8283  # remove trailing .exe if any
8284  new_path="${new_path/%.exe/}"
8285
8286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8287
8288  # First separate the path from the arguments. This will split at the first
8289  # space.
8290  complete="$FOUND_MAKE"
8291  path="${complete%% *}"
8292  tmp="$complete EOL"
8293  arguments="${tmp#* }"
8294
8295  # Input might be given as Windows format, start by converting to
8296  # unix format.
8297  new_path="$path"
8298
8299  windows_path="$new_path"
8300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8301    unix_path=`$CYGPATH -u "$windows_path"`
8302    new_path="$unix_path"
8303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8305    new_path="$unix_path"
8306  fi
8307
8308
8309  # Now try to locate executable using which
8310  new_path=`$WHICH "$new_path" 2> /dev/null`
8311
8312  if test "x$new_path" = x; then
8313    # Oops. Which didn't find the executable.
8314    # The splitting of arguments from the executable at a space might have been incorrect,
8315    # since paths with space are more likely in Windows. Give it another try with the whole
8316    # argument.
8317    path="$complete"
8318    arguments="EOL"
8319    new_path="$path"
8320
8321  windows_path="$new_path"
8322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8323    unix_path=`$CYGPATH -u "$windows_path"`
8324    new_path="$unix_path"
8325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8327    new_path="$unix_path"
8328  fi
8329
8330
8331    new_path=`$WHICH "$new_path" 2> /dev/null`
8332
8333    if test "x$new_path" = x; then
8334      # It's still not found. Now this is an unrecoverable error.
8335      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8336$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8337      has_space=`$ECHO "$complete" | $GREP " "`
8338      if test "x$has_space" != x; then
8339        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8340$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8341      fi
8342      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8343$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8344   { (exit 1); exit 1; }; }
8345    fi
8346  fi
8347
8348  # Now new_path has a complete unix path to the binary
8349  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8350    # Keep paths in /bin as-is, but remove trailing .exe if any
8351    new_path="${new_path/%.exe/}"
8352    # Do not save /bin paths to all_fixpath_prefixes!
8353  else
8354    # Not in mixed or Windows style, start by that.
8355    new_path=`cmd //c echo $new_path`
8356
8357  input_path="$new_path"
8358  # Check if we need to convert this using DOS-style short mode. If the path
8359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8360  # take no chances and rewrite it.
8361  # Note: m4 eats our [], so we need to use [ and ] instead.
8362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8363  if test "x$has_forbidden_chars" != x; then
8364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8366  fi
8367
8368    # Output is in $new_path
8369
8370  windows_path="$new_path"
8371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8372    unix_path=`$CYGPATH -u "$windows_path"`
8373    new_path="$unix_path"
8374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8376    new_path="$unix_path"
8377  fi
8378
8379    # remove trailing .exe if any
8380    new_path="${new_path/%.exe/}"
8381
8382    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8383    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8384  fi
8385
8386  else
8387    # We're on a posix platform. Hooray! :)
8388    # First separate the path from the arguments. This will split at the first
8389    # space.
8390    complete="$FOUND_MAKE"
8391    path="${complete%% *}"
8392    tmp="$complete EOL"
8393    arguments="${tmp#* }"
8394
8395    new_path=`$WHICH $path 2> /dev/null`
8396    if test "x$new_path" = x; then
8397      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8398      if test "x$is_absolute_path" != x; then
8399        { $as_echo "$as_me:$LINENO: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8400$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8401        new_path="$path"
8402      else
8403        { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8404$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8405        has_space=`$ECHO "$complete" | $GREP " "`
8406        if test "x$has_space" != x; then
8407          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
8408$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8409        fi
8410        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8411$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8412   { (exit 1); exit 1; }; }
8413      fi
8414    fi
8415  fi
8416
8417  # Now join together the path and the arguments once again
8418  if test "x$arguments" != xEOL; then
8419      new_complete="$new_path ${arguments% *}"
8420  else
8421      new_complete="$new_path"
8422  fi
8423
8424  if test "x$complete" != "x$new_complete"; then
8425    FOUND_MAKE="$new_complete"
8426    { $as_echo "$as_me:$LINENO: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8427$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8428  fi
8429
8430        fi
8431      fi
8432    fi
8433  fi
8434
8435    fi
8436
8437    if test "x$FOUND_MAKE" = x; then
8438      if test "x$TOOLS_DIR" != x; then
8439        # We have a tools-dir, check that as well before giving up.
8440        OLD_PATH=$PATH
8441        PATH=$TOOLS_DIR:$PATH
8442        for ac_prog in gmake
8443do
8444  # Extract the first word of "$ac_prog", so it can be a program name with args.
8445set dummy $ac_prog; ac_word=$2
8446{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8447$as_echo_n "checking for $ac_word... " >&6; }
8448if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then
8449  $as_echo_n "(cached) " >&6
8450else
8451  case $CHECK_TOOLSDIR_GMAKE in
8452  [\\/]* | ?:[\\/]*)
8453  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
8454  ;;
8455  *)
8456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8457for as_dir in $PATH
8458do
8459  IFS=$as_save_IFS
8460  test -z "$as_dir" && as_dir=.
8461  for ac_exec_ext in '' $ac_executable_extensions; do
8462  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8463    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8464    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8465    break 2
8466  fi
8467done
8468done
8469IFS=$as_save_IFS
8470
8471  ;;
8472esac
8473fi
8474CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
8475if test -n "$CHECK_TOOLSDIR_GMAKE"; then
8476  { $as_echo "$as_me:$LINENO: result: $CHECK_TOOLSDIR_GMAKE" >&5
8477$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
8478else
8479  { $as_echo "$as_me:$LINENO: result: no" >&5
8480$as_echo "no" >&6; }
8481fi
8482
8483
8484  test -n "$CHECK_TOOLSDIR_GMAKE" && break
8485done
8486
8487
8488  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
8489  DESCRIPTION="gmake in tools-dir"
8490  if test "x$MAKE_CANDIDATE" != x; then
8491    { $as_echo "$as_me:$LINENO: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8492$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8493    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8494    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8495    if test "x$IS_GNU_MAKE" = x; then
8496      { $as_echo "$as_me:$LINENO: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8497$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8498    else
8499      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8500      if test "x$IS_MODERN_MAKE" = x; then
8501        { $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
8502$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;}
8503      else
8504        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8505          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8506            MAKE_EXPECTED_ENV='cygwin'
8507          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8508            MAKE_EXPECTED_ENV='msys'
8509          else
8510            { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment" >&5
8511$as_echo "$as_me: error: Unknown Windows environment" >&2;}
8512   { (exit 1); exit 1; }; }
8513          fi
8514          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8515          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8516        else
8517          # Not relevant for non-Windows
8518          IS_MAKE_CORRECT_ENV=true
8519        fi
8520        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8521          { $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
8522$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;}
8523        else
8524          FOUND_MAKE=$MAKE_CANDIDATE
8525
8526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8527
8528  # First separate the path from the arguments. This will split at the first
8529  # space.
8530  complete="$FOUND_MAKE"
8531  path="${complete%% *}"
8532  tmp="$complete EOL"
8533  arguments="${tmp#* }"
8534
8535  # Input might be given as Windows format, start by converting to
8536  # unix format.
8537  new_path=`$CYGPATH -u "$path"`
8538
8539  # Now try to locate executable using which
8540  new_path=`$WHICH "$new_path" 2> /dev/null`
8541  # bat and cmd files are not always considered executable in cygwin causing which
8542  # to not find them
8543  if test "x$new_path" = x \
8544           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8545           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8546    new_path=`$CYGPATH -u "$path"`
8547  fi
8548  if test "x$new_path" = x; then
8549    # Oops. Which didn't find the executable.
8550    # The splitting of arguments from the executable at a space might have been incorrect,
8551    # since paths with space are more likely in Windows. Give it another try with the whole
8552    # argument.
8553    path="$complete"
8554    arguments="EOL"
8555    new_path=`$CYGPATH -u "$path"`
8556    new_path=`$WHICH "$new_path" 2> /dev/null`
8557    # bat and cmd files are not always considered executable in cygwin causing which
8558    # to not find them
8559    if test "x$new_path" = x \
8560             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8561             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8562      new_path=`$CYGPATH -u "$path"`
8563    fi
8564    if test "x$new_path" = x; then
8565      # It's still not found. Now this is an unrecoverable error.
8566      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8567$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8568      has_space=`$ECHO "$complete" | $GREP " "`
8569      if test "x$has_space" != x; then
8570        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8571$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8572      fi
8573      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8574$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8575   { (exit 1); exit 1; }; }
8576    fi
8577  fi
8578
8579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8582  # "foo.exe" is OK but "foo" is an error.
8583  #
8584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8585  # It is also a way to make sure we got the proper file name for the real test later on.
8586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8587  if test "x$test_shortpath" = x; then
8588    # Short path failed, file does not exist as specified.
8589    # Try adding .exe or .cmd
8590    if test -f "${new_path}.exe"; then
8591       input_to_shortpath="${new_path}.exe"
8592    elif test -f "${new_path}.cmd"; then
8593       input_to_shortpath="${new_path}.cmd"
8594    else
8595      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8596$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8597      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8598$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8599      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8600$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8601   { (exit 1); exit 1; }; }
8602    fi
8603  else
8604    input_to_shortpath="$new_path"
8605  fi
8606
8607  # Call helper function which possibly converts this using DOS-style short mode.
8608  # If so, the updated path is stored in $new_path.
8609  new_path="$input_to_shortpath"
8610
8611  input_path="$input_to_shortpath"
8612  # Check if we need to convert this using DOS-style short mode. If the path
8613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8614  # take no chances and rewrite it.
8615  # Note: m4 eats our [], so we need to use [ and ] instead.
8616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8617  if test "x$has_forbidden_chars" != x; then
8618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8622      # Going to short mode and back again did indeed matter. Since short mode is
8623      # case insensitive, let's make it lowercase to improve readability.
8624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8625      # Now convert it back to Unix-stile (cygpath)
8626      input_path=`$CYGPATH -u "$shortmode_path"`
8627      new_path="$input_path"
8628    fi
8629  fi
8630
8631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8632  if test "x$test_cygdrive_prefix" = x; then
8633    # As a simple fix, exclude /usr/bin since it's not a real path.
8634    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8636      # a path prefixed by /cygdrive for fixpath to work.
8637      new_path="$CYGWIN_ROOT_PATH$input_path"
8638    fi
8639  fi
8640
8641  # remove trailing .exe if any
8642  new_path="${new_path/%.exe/}"
8643
8644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8645
8646  # First separate the path from the arguments. This will split at the first
8647  # space.
8648  complete="$FOUND_MAKE"
8649  path="${complete%% *}"
8650  tmp="$complete EOL"
8651  arguments="${tmp#* }"
8652
8653  # Input might be given as Windows format, start by converting to
8654  # unix format.
8655  new_path="$path"
8656
8657  windows_path="$new_path"
8658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8659    unix_path=`$CYGPATH -u "$windows_path"`
8660    new_path="$unix_path"
8661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8663    new_path="$unix_path"
8664  fi
8665
8666
8667  # Now try to locate executable using which
8668  new_path=`$WHICH "$new_path" 2> /dev/null`
8669
8670  if test "x$new_path" = x; then
8671    # Oops. Which didn't find the executable.
8672    # The splitting of arguments from the executable at a space might have been incorrect,
8673    # since paths with space are more likely in Windows. Give it another try with the whole
8674    # argument.
8675    path="$complete"
8676    arguments="EOL"
8677    new_path="$path"
8678
8679  windows_path="$new_path"
8680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8681    unix_path=`$CYGPATH -u "$windows_path"`
8682    new_path="$unix_path"
8683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8685    new_path="$unix_path"
8686  fi
8687
8688
8689    new_path=`$WHICH "$new_path" 2> /dev/null`
8690
8691    if test "x$new_path" = x; then
8692      # It's still not found. Now this is an unrecoverable error.
8693      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8694$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8695      has_space=`$ECHO "$complete" | $GREP " "`
8696      if test "x$has_space" != x; then
8697        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8698$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8699      fi
8700      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8701$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8702   { (exit 1); exit 1; }; }
8703    fi
8704  fi
8705
8706  # Now new_path has a complete unix path to the binary
8707  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8708    # Keep paths in /bin as-is, but remove trailing .exe if any
8709    new_path="${new_path/%.exe/}"
8710    # Do not save /bin paths to all_fixpath_prefixes!
8711  else
8712    # Not in mixed or Windows style, start by that.
8713    new_path=`cmd //c echo $new_path`
8714
8715  input_path="$new_path"
8716  # Check if we need to convert this using DOS-style short mode. If the path
8717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8718  # take no chances and rewrite it.
8719  # Note: m4 eats our [], so we need to use [ and ] instead.
8720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8721  if test "x$has_forbidden_chars" != x; then
8722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8724  fi
8725
8726    # Output is in $new_path
8727
8728  windows_path="$new_path"
8729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8730    unix_path=`$CYGPATH -u "$windows_path"`
8731    new_path="$unix_path"
8732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8734    new_path="$unix_path"
8735  fi
8736
8737    # remove trailing .exe if any
8738    new_path="${new_path/%.exe/}"
8739
8740    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8741    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8742  fi
8743
8744  else
8745    # We're on a posix platform. Hooray! :)
8746    # First separate the path from the arguments. This will split at the first
8747    # space.
8748    complete="$FOUND_MAKE"
8749    path="${complete%% *}"
8750    tmp="$complete EOL"
8751    arguments="${tmp#* }"
8752
8753    new_path=`$WHICH $path 2> /dev/null`
8754    if test "x$new_path" = x; then
8755      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8756      if test "x$is_absolute_path" != x; then
8757        { $as_echo "$as_me:$LINENO: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8758$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8759        new_path="$path"
8760      else
8761        { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8762$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8763        has_space=`$ECHO "$complete" | $GREP " "`
8764        if test "x$has_space" != x; then
8765          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
8766$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8767        fi
8768        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8769$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8770   { (exit 1); exit 1; }; }
8771      fi
8772    fi
8773  fi
8774
8775  # Now join together the path and the arguments once again
8776  if test "x$arguments" != xEOL; then
8777      new_complete="$new_path ${arguments% *}"
8778  else
8779      new_complete="$new_path"
8780  fi
8781
8782  if test "x$complete" != "x$new_complete"; then
8783    FOUND_MAKE="$new_complete"
8784    { $as_echo "$as_me:$LINENO: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8785$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8786  fi
8787
8788        fi
8789      fi
8790    fi
8791  fi
8792
8793        if test "x$FOUND_MAKE" = x; then
8794          for ac_prog in make
8795do
8796  # Extract the first word of "$ac_prog", so it can be a program name with args.
8797set dummy $ac_prog; ac_word=$2
8798{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8799$as_echo_n "checking for $ac_word... " >&6; }
8800if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then
8801  $as_echo_n "(cached) " >&6
8802else
8803  case $CHECK_TOOLSDIR_MAKE in
8804  [\\/]* | ?:[\\/]*)
8805  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
8806  ;;
8807  *)
8808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8809for as_dir in $PATH
8810do
8811  IFS=$as_save_IFS
8812  test -z "$as_dir" && as_dir=.
8813  for ac_exec_ext in '' $ac_executable_extensions; do
8814  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8815    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
8816    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8817    break 2
8818  fi
8819done
8820done
8821IFS=$as_save_IFS
8822
8823  ;;
8824esac
8825fi
8826CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
8827if test -n "$CHECK_TOOLSDIR_MAKE"; then
8828  { $as_echo "$as_me:$LINENO: result: $CHECK_TOOLSDIR_MAKE" >&5
8829$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
8830else
8831  { $as_echo "$as_me:$LINENO: result: no" >&5
8832$as_echo "no" >&6; }
8833fi
8834
8835
8836  test -n "$CHECK_TOOLSDIR_MAKE" && break
8837done
8838
8839
8840  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
8841  DESCRIPTION="make in tools-dir"
8842  if test "x$MAKE_CANDIDATE" != x; then
8843    { $as_echo "$as_me:$LINENO: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8844$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8845    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8846    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8847    if test "x$IS_GNU_MAKE" = x; then
8848      { $as_echo "$as_me:$LINENO: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8849$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8850    else
8851      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8852      if test "x$IS_MODERN_MAKE" = x; then
8853        { $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
8854$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;}
8855      else
8856        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8857          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8858            MAKE_EXPECTED_ENV='cygwin'
8859          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8860            MAKE_EXPECTED_ENV='msys'
8861          else
8862            { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment" >&5
8863$as_echo "$as_me: error: Unknown Windows environment" >&2;}
8864   { (exit 1); exit 1; }; }
8865          fi
8866          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8867          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8868        else
8869          # Not relevant for non-Windows
8870          IS_MAKE_CORRECT_ENV=true
8871        fi
8872        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8873          { $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
8874$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;}
8875        else
8876          FOUND_MAKE=$MAKE_CANDIDATE
8877
8878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8879
8880  # First separate the path from the arguments. This will split at the first
8881  # space.
8882  complete="$FOUND_MAKE"
8883  path="${complete%% *}"
8884  tmp="$complete EOL"
8885  arguments="${tmp#* }"
8886
8887  # Input might be given as Windows format, start by converting to
8888  # unix format.
8889  new_path=`$CYGPATH -u "$path"`
8890
8891  # Now try to locate executable using which
8892  new_path=`$WHICH "$new_path" 2> /dev/null`
8893  # bat and cmd files are not always considered executable in cygwin causing which
8894  # to not find them
8895  if test "x$new_path" = x \
8896           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8897           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8898    new_path=`$CYGPATH -u "$path"`
8899  fi
8900  if test "x$new_path" = x; then
8901    # Oops. Which didn't find the executable.
8902    # The splitting of arguments from the executable at a space might have been incorrect,
8903    # since paths with space are more likely in Windows. Give it another try with the whole
8904    # argument.
8905    path="$complete"
8906    arguments="EOL"
8907    new_path=`$CYGPATH -u "$path"`
8908    new_path=`$WHICH "$new_path" 2> /dev/null`
8909    # bat and cmd files are not always considered executable in cygwin causing which
8910    # to not find them
8911    if test "x$new_path" = x \
8912             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8913             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8914      new_path=`$CYGPATH -u "$path"`
8915    fi
8916    if test "x$new_path" = x; then
8917      # It's still not found. Now this is an unrecoverable error.
8918      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8919$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8920      has_space=`$ECHO "$complete" | $GREP " "`
8921      if test "x$has_space" != x; then
8922        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8923$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8924      fi
8925      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8926$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8927   { (exit 1); exit 1; }; }
8928    fi
8929  fi
8930
8931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8934  # "foo.exe" is OK but "foo" is an error.
8935  #
8936  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8937  # It is also a way to make sure we got the proper file name for the real test later on.
8938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8939  if test "x$test_shortpath" = x; then
8940    # Short path failed, file does not exist as specified.
8941    # Try adding .exe or .cmd
8942    if test -f "${new_path}.exe"; then
8943       input_to_shortpath="${new_path}.exe"
8944    elif test -f "${new_path}.cmd"; then
8945       input_to_shortpath="${new_path}.cmd"
8946    else
8947      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8948$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8949      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8950$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8951      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8952$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8953   { (exit 1); exit 1; }; }
8954    fi
8955  else
8956    input_to_shortpath="$new_path"
8957  fi
8958
8959  # Call helper function which possibly converts this using DOS-style short mode.
8960  # If so, the updated path is stored in $new_path.
8961  new_path="$input_to_shortpath"
8962
8963  input_path="$input_to_shortpath"
8964  # Check if we need to convert this using DOS-style short mode. If the path
8965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8966  # take no chances and rewrite it.
8967  # Note: m4 eats our [], so we need to use [ and ] instead.
8968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8969  if test "x$has_forbidden_chars" != x; then
8970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8974      # Going to short mode and back again did indeed matter. Since short mode is
8975      # case insensitive, let's make it lowercase to improve readability.
8976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8977      # Now convert it back to Unix-stile (cygpath)
8978      input_path=`$CYGPATH -u "$shortmode_path"`
8979      new_path="$input_path"
8980    fi
8981  fi
8982
8983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8984  if test "x$test_cygdrive_prefix" = x; then
8985    # As a simple fix, exclude /usr/bin since it's not a real path.
8986    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8988      # a path prefixed by /cygdrive for fixpath to work.
8989      new_path="$CYGWIN_ROOT_PATH$input_path"
8990    fi
8991  fi
8992
8993  # remove trailing .exe if any
8994  new_path="${new_path/%.exe/}"
8995
8996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8997
8998  # First separate the path from the arguments. This will split at the first
8999  # space.
9000  complete="$FOUND_MAKE"
9001  path="${complete%% *}"
9002  tmp="$complete EOL"
9003  arguments="${tmp#* }"
9004
9005  # Input might be given as Windows format, start by converting to
9006  # unix format.
9007  new_path="$path"
9008
9009  windows_path="$new_path"
9010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9011    unix_path=`$CYGPATH -u "$windows_path"`
9012    new_path="$unix_path"
9013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9015    new_path="$unix_path"
9016  fi
9017
9018
9019  # Now try to locate executable using which
9020  new_path=`$WHICH "$new_path" 2> /dev/null`
9021
9022  if test "x$new_path" = x; then
9023    # Oops. Which didn't find the executable.
9024    # The splitting of arguments from the executable at a space might have been incorrect,
9025    # since paths with space are more likely in Windows. Give it another try with the whole
9026    # argument.
9027    path="$complete"
9028    arguments="EOL"
9029    new_path="$path"
9030
9031  windows_path="$new_path"
9032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9033    unix_path=`$CYGPATH -u "$windows_path"`
9034    new_path="$unix_path"
9035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9037    new_path="$unix_path"
9038  fi
9039
9040
9041    new_path=`$WHICH "$new_path" 2> /dev/null`
9042
9043    if test "x$new_path" = x; then
9044      # It's still not found. Now this is an unrecoverable error.
9045      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9046$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9047      has_space=`$ECHO "$complete" | $GREP " "`
9048      if test "x$has_space" != x; then
9049        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9051      fi
9052      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
9053$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
9054   { (exit 1); exit 1; }; }
9055    fi
9056  fi
9057
9058  # Now new_path has a complete unix path to the binary
9059  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9060    # Keep paths in /bin as-is, but remove trailing .exe if any
9061    new_path="${new_path/%.exe/}"
9062    # Do not save /bin paths to all_fixpath_prefixes!
9063  else
9064    # Not in mixed or Windows style, start by that.
9065    new_path=`cmd //c echo $new_path`
9066
9067  input_path="$new_path"
9068  # Check if we need to convert this using DOS-style short mode. If the path
9069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9070  # take no chances and rewrite it.
9071  # Note: m4 eats our [], so we need to use [ and ] instead.
9072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9073  if test "x$has_forbidden_chars" != x; then
9074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9075    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9076  fi
9077
9078    # Output is in $new_path
9079
9080  windows_path="$new_path"
9081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9082    unix_path=`$CYGPATH -u "$windows_path"`
9083    new_path="$unix_path"
9084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9086    new_path="$unix_path"
9087  fi
9088
9089    # remove trailing .exe if any
9090    new_path="${new_path/%.exe/}"
9091
9092    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9093    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9094  fi
9095
9096  else
9097    # We're on a posix platform. Hooray! :)
9098    # First separate the path from the arguments. This will split at the first
9099    # space.
9100    complete="$FOUND_MAKE"
9101    path="${complete%% *}"
9102    tmp="$complete EOL"
9103    arguments="${tmp#* }"
9104
9105    new_path=`$WHICH $path 2> /dev/null`
9106    if test "x$new_path" = x; then
9107      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9108      if test "x$is_absolute_path" != x; then
9109        { $as_echo "$as_me:$LINENO: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9110$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9111        new_path="$path"
9112      else
9113        { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9114$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9115        has_space=`$ECHO "$complete" | $GREP " "`
9116        if test "x$has_space" != x; then
9117          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
9118$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9119        fi
9120        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
9121$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
9122   { (exit 1); exit 1; }; }
9123      fi
9124    fi
9125  fi
9126
9127  # Now join together the path and the arguments once again
9128  if test "x$arguments" != xEOL; then
9129      new_complete="$new_path ${arguments% *}"
9130  else
9131      new_complete="$new_path"
9132  fi
9133
9134  if test "x$complete" != "x$new_complete"; then
9135    FOUND_MAKE="$new_complete"
9136    { $as_echo "$as_me:$LINENO: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9137$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9138  fi
9139
9140        fi
9141      fi
9142    fi
9143  fi
9144
9145        fi
9146        PATH=$OLD_PATH
9147      fi
9148    fi
9149
9150    if test "x$FOUND_MAKE" = x; then
9151      { { $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
9152$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;}
9153   { (exit 1); exit 1; }; }
9154    fi
9155  fi
9156
9157  MAKE=$FOUND_MAKE
9158
9159  { $as_echo "$as_me:$LINENO: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9160$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9161
9162
9163
9164    # Test if find supports -delete
9165    { $as_echo "$as_me:$LINENO: checking if find supports -delete" >&5
9166$as_echo_n "checking if find supports -delete... " >&6; }
9167    FIND_DELETE="-delete"
9168
9169    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9170
9171    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9172
9173    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9174    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9175        # No, it does not.
9176        rm $DELETEDIR/TestIfFindSupportsDelete
9177        FIND_DELETE="-exec rm \{\} \+"
9178        { $as_echo "$as_me:$LINENO: result: no" >&5
9179$as_echo "no" >&6; }
9180    else
9181        { $as_echo "$as_me:$LINENO: result: yes" >&5
9182$as_echo "yes" >&6; }
9183    fi
9184    rmdir $DELETEDIR
9185
9186
9187
9188# These tools might not be installed by default,
9189# need hint on how to install them.
9190
9191    for ac_prog in unzip
9192do
9193  # Extract the first word of "$ac_prog", so it can be a program name with args.
9194set dummy $ac_prog; ac_word=$2
9195{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9196$as_echo_n "checking for $ac_word... " >&6; }
9197if test "${ac_cv_path_UNZIP+set}" = set; then
9198  $as_echo_n "(cached) " >&6
9199else
9200  case $UNZIP in
9201  [\\/]* | ?:[\\/]*)
9202  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9203  ;;
9204  *)
9205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9206for as_dir in $PATH
9207do
9208  IFS=$as_save_IFS
9209  test -z "$as_dir" && as_dir=.
9210  for ac_exec_ext in '' $ac_executable_extensions; do
9211  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9212    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9213    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9214    break 2
9215  fi
9216done
9217done
9218IFS=$as_save_IFS
9219
9220  ;;
9221esac
9222fi
9223UNZIP=$ac_cv_path_UNZIP
9224if test -n "$UNZIP"; then
9225  { $as_echo "$as_me:$LINENO: result: $UNZIP" >&5
9226$as_echo "$UNZIP" >&6; }
9227else
9228  { $as_echo "$as_me:$LINENO: result: no" >&5
9229$as_echo "no" >&6; }
9230fi
9231
9232
9233  test -n "$UNZIP" && break
9234done
9235
9236
9237    if test "x$UNZIP" = x; then
9238        if test "xunzip" = x; then
9239          PROG_NAME=unzip
9240        else
9241          PROG_NAME=unzip
9242        fi
9243        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
9244$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9245        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
9246$as_echo "$as_me: error: Cannot continue" >&2;}
9247   { (exit 1); exit 1; }; }
9248    fi
9249
9250
9251
9252    for ac_prog in zip
9253do
9254  # Extract the first word of "$ac_prog", so it can be a program name with args.
9255set dummy $ac_prog; ac_word=$2
9256{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9257$as_echo_n "checking for $ac_word... " >&6; }
9258if test "${ac_cv_path_ZIP+set}" = set; then
9259  $as_echo_n "(cached) " >&6
9260else
9261  case $ZIP in
9262  [\\/]* | ?:[\\/]*)
9263  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9264  ;;
9265  *)
9266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9267for as_dir in $PATH
9268do
9269  IFS=$as_save_IFS
9270  test -z "$as_dir" && as_dir=.
9271  for ac_exec_ext in '' $ac_executable_extensions; do
9272  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9273    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9274    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9275    break 2
9276  fi
9277done
9278done
9279IFS=$as_save_IFS
9280
9281  ;;
9282esac
9283fi
9284ZIP=$ac_cv_path_ZIP
9285if test -n "$ZIP"; then
9286  { $as_echo "$as_me:$LINENO: result: $ZIP" >&5
9287$as_echo "$ZIP" >&6; }
9288else
9289  { $as_echo "$as_me:$LINENO: result: no" >&5
9290$as_echo "no" >&6; }
9291fi
9292
9293
9294  test -n "$ZIP" && break
9295done
9296
9297
9298    if test "x$ZIP" = x; then
9299        if test "xzip" = x; then
9300          PROG_NAME=zip
9301        else
9302          PROG_NAME=zip
9303        fi
9304        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
9305$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9306        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
9307$as_echo "$as_me: error: Cannot continue" >&2;}
9308   { (exit 1); exit 1; }; }
9309    fi
9310
9311
9312
9313# Non-required basic tools
9314
9315# Extract the first word of "ldd", so it can be a program name with args.
9316set dummy ldd; ac_word=$2
9317{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9318$as_echo_n "checking for $ac_word... " >&6; }
9319if test "${ac_cv_path_LDD+set}" = set; then
9320  $as_echo_n "(cached) " >&6
9321else
9322  case $LDD in
9323  [\\/]* | ?:[\\/]*)
9324  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9325  ;;
9326  *)
9327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9328for as_dir in $PATH
9329do
9330  IFS=$as_save_IFS
9331  test -z "$as_dir" && as_dir=.
9332  for ac_exec_ext in '' $ac_executable_extensions; do
9333  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9334    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9335    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9336    break 2
9337  fi
9338done
9339done
9340IFS=$as_save_IFS
9341
9342  ;;
9343esac
9344fi
9345LDD=$ac_cv_path_LDD
9346if test -n "$LDD"; then
9347  { $as_echo "$as_me:$LINENO: result: $LDD" >&5
9348$as_echo "$LDD" >&6; }
9349else
9350  { $as_echo "$as_me:$LINENO: result: no" >&5
9351$as_echo "no" >&6; }
9352fi
9353
9354
9355if test "x$LDD" = "x"; then
9356    # List shared lib dependencies is used for
9357    # debug output and checking for forbidden dependencies.
9358    # We can build without it.
9359    LDD="true"
9360fi
9361# Extract the first word of "otool", so it can be a program name with args.
9362set dummy otool; ac_word=$2
9363{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9364$as_echo_n "checking for $ac_word... " >&6; }
9365if test "${ac_cv_path_OTOOL+set}" = set; then
9366  $as_echo_n "(cached) " >&6
9367else
9368  case $OTOOL in
9369  [\\/]* | ?:[\\/]*)
9370  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
9371  ;;
9372  *)
9373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9374for as_dir in $PATH
9375do
9376  IFS=$as_save_IFS
9377  test -z "$as_dir" && as_dir=.
9378  for ac_exec_ext in '' $ac_executable_extensions; do
9379  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9380    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
9381    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9382    break 2
9383  fi
9384done
9385done
9386IFS=$as_save_IFS
9387
9388  ;;
9389esac
9390fi
9391OTOOL=$ac_cv_path_OTOOL
9392if test -n "$OTOOL"; then
9393  { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5
9394$as_echo "$OTOOL" >&6; }
9395else
9396  { $as_echo "$as_me:$LINENO: result: no" >&5
9397$as_echo "no" >&6; }
9398fi
9399
9400
9401if test "x$OTOOL" = "x"; then
9402   OTOOL="true"
9403fi
9404for ac_prog in readelf greadelf
9405do
9406  # Extract the first word of "$ac_prog", so it can be a program name with args.
9407set dummy $ac_prog; ac_word=$2
9408{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9409$as_echo_n "checking for $ac_word... " >&6; }
9410if test "${ac_cv_path_READELF+set}" = set; then
9411  $as_echo_n "(cached) " >&6
9412else
9413  case $READELF in
9414  [\\/]* | ?:[\\/]*)
9415  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
9416  ;;
9417  *)
9418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9419for as_dir in $PATH
9420do
9421  IFS=$as_save_IFS
9422  test -z "$as_dir" && as_dir=.
9423  for ac_exec_ext in '' $ac_executable_extensions; do
9424  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9425    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
9426    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9427    break 2
9428  fi
9429done
9430done
9431IFS=$as_save_IFS
9432
9433  ;;
9434esac
9435fi
9436READELF=$ac_cv_path_READELF
9437if test -n "$READELF"; then
9438  { $as_echo "$as_me:$LINENO: result: $READELF" >&5
9439$as_echo "$READELF" >&6; }
9440else
9441  { $as_echo "$as_me:$LINENO: result: no" >&5
9442$as_echo "no" >&6; }
9443fi
9444
9445
9446  test -n "$READELF" && break
9447done
9448
9449# Extract the first word of "hg", so it can be a program name with args.
9450set dummy hg; ac_word=$2
9451{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9452$as_echo_n "checking for $ac_word... " >&6; }
9453if test "${ac_cv_path_HG+set}" = set; then
9454  $as_echo_n "(cached) " >&6
9455else
9456  case $HG in
9457  [\\/]* | ?:[\\/]*)
9458  ac_cv_path_HG="$HG" # Let the user override the test with a path.
9459  ;;
9460  *)
9461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9462for as_dir in $PATH
9463do
9464  IFS=$as_save_IFS
9465  test -z "$as_dir" && as_dir=.
9466  for ac_exec_ext in '' $ac_executable_extensions; do
9467  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9468    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
9469    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9470    break 2
9471  fi
9472done
9473done
9474IFS=$as_save_IFS
9475
9476  ;;
9477esac
9478fi
9479HG=$ac_cv_path_HG
9480if test -n "$HG"; then
9481  { $as_echo "$as_me:$LINENO: result: $HG" >&5
9482$as_echo "$HG" >&6; }
9483else
9484  { $as_echo "$as_me:$LINENO: result: no" >&5
9485$as_echo "no" >&6; }
9486fi
9487
9488
9489# Extract the first word of "stat", so it can be a program name with args.
9490set dummy stat; ac_word=$2
9491{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9492$as_echo_n "checking for $ac_word... " >&6; }
9493if test "${ac_cv_path_STAT+set}" = set; then
9494  $as_echo_n "(cached) " >&6
9495else
9496  case $STAT in
9497  [\\/]* | ?:[\\/]*)
9498  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
9499  ;;
9500  *)
9501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9502for as_dir in $PATH
9503do
9504  IFS=$as_save_IFS
9505  test -z "$as_dir" && as_dir=.
9506  for ac_exec_ext in '' $ac_executable_extensions; do
9507  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9508    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
9509    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9510    break 2
9511  fi
9512done
9513done
9514IFS=$as_save_IFS
9515
9516  ;;
9517esac
9518fi
9519STAT=$ac_cv_path_STAT
9520if test -n "$STAT"; then
9521  { $as_echo "$as_me:$LINENO: result: $STAT" >&5
9522$as_echo "$STAT" >&6; }
9523else
9524  { $as_echo "$as_me:$LINENO: result: no" >&5
9525$as_echo "no" >&6; }
9526fi
9527
9528
9529# Extract the first word of "time", so it can be a program name with args.
9530set dummy time; ac_word=$2
9531{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9532$as_echo_n "checking for $ac_word... " >&6; }
9533if test "${ac_cv_path_TIME+set}" = set; then
9534  $as_echo_n "(cached) " >&6
9535else
9536  case $TIME in
9537  [\\/]* | ?:[\\/]*)
9538  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
9539  ;;
9540  *)
9541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9542for as_dir in $PATH
9543do
9544  IFS=$as_save_IFS
9545  test -z "$as_dir" && as_dir=.
9546  for ac_exec_ext in '' $ac_executable_extensions; do
9547  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9548    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
9549    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9550    break 2
9551  fi
9552done
9553done
9554IFS=$as_save_IFS
9555
9556  ;;
9557esac
9558fi
9559TIME=$ac_cv_path_TIME
9560if test -n "$TIME"; then
9561  { $as_echo "$as_me:$LINENO: result: $TIME" >&5
9562$as_echo "$TIME" >&6; }
9563else
9564  { $as_echo "$as_me:$LINENO: result: no" >&5
9565$as_echo "no" >&6; }
9566fi
9567
9568
9569
9570if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
9571
9572    for ac_prog in comm
9573do
9574  # Extract the first word of "$ac_prog", so it can be a program name with args.
9575set dummy $ac_prog; ac_word=$2
9576{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9577$as_echo_n "checking for $ac_word... " >&6; }
9578if test "${ac_cv_path_COMM+set}" = set; then
9579  $as_echo_n "(cached) " >&6
9580else
9581  case $COMM in
9582  [\\/]* | ?:[\\/]*)
9583  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
9584  ;;
9585  *)
9586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9587for as_dir in $PATH
9588do
9589  IFS=$as_save_IFS
9590  test -z "$as_dir" && as_dir=.
9591  for ac_exec_ext in '' $ac_executable_extensions; do
9592  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9593    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
9594    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9595    break 2
9596  fi
9597done
9598done
9599IFS=$as_save_IFS
9600
9601  ;;
9602esac
9603fi
9604COMM=$ac_cv_path_COMM
9605if test -n "$COMM"; then
9606  { $as_echo "$as_me:$LINENO: result: $COMM" >&5
9607$as_echo "$COMM" >&6; }
9608else
9609  { $as_echo "$as_me:$LINENO: result: no" >&5
9610$as_echo "no" >&6; }
9611fi
9612
9613
9614  test -n "$COMM" && break
9615done
9616
9617
9618    if test "x$COMM" = x; then
9619        if test "xcomm" = x; then
9620          PROG_NAME=comm
9621        else
9622          PROG_NAME=comm
9623        fi
9624        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
9625$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9626        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
9627$as_echo "$as_me: error: Cannot continue" >&2;}
9628   { (exit 1); exit 1; }; }
9629    fi
9630
9631
9632fi
9633
9634
9635# Check if pkg-config is available.
9636
9637
9638if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9639	if test -n "$ac_tool_prefix"; then
9640  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9641set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9642{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9643$as_echo_n "checking for $ac_word... " >&6; }
9644if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9645  $as_echo_n "(cached) " >&6
9646else
9647  case $PKG_CONFIG in
9648  [\\/]* | ?:[\\/]*)
9649  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9650  ;;
9651  *)
9652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9653for as_dir in $PATH
9654do
9655  IFS=$as_save_IFS
9656  test -z "$as_dir" && as_dir=.
9657  for ac_exec_ext in '' $ac_executable_extensions; do
9658  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9659    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9660    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9661    break 2
9662  fi
9663done
9664done
9665IFS=$as_save_IFS
9666
9667  ;;
9668esac
9669fi
9670PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9671if test -n "$PKG_CONFIG"; then
9672  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
9673$as_echo "$PKG_CONFIG" >&6; }
9674else
9675  { $as_echo "$as_me:$LINENO: result: no" >&5
9676$as_echo "no" >&6; }
9677fi
9678
9679
9680fi
9681if test -z "$ac_cv_path_PKG_CONFIG"; then
9682  ac_pt_PKG_CONFIG=$PKG_CONFIG
9683  # Extract the first word of "pkg-config", so it can be a program name with args.
9684set dummy pkg-config; ac_word=$2
9685{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9686$as_echo_n "checking for $ac_word... " >&6; }
9687if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
9688  $as_echo_n "(cached) " >&6
9689else
9690  case $ac_pt_PKG_CONFIG in
9691  [\\/]* | ?:[\\/]*)
9692  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9693  ;;
9694  *)
9695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9696for as_dir in $PATH
9697do
9698  IFS=$as_save_IFS
9699  test -z "$as_dir" && as_dir=.
9700  for ac_exec_ext in '' $ac_executable_extensions; do
9701  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9702    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9703    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9704    break 2
9705  fi
9706done
9707done
9708IFS=$as_save_IFS
9709
9710  ;;
9711esac
9712fi
9713ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9714if test -n "$ac_pt_PKG_CONFIG"; then
9715  { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
9716$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9717else
9718  { $as_echo "$as_me:$LINENO: result: no" >&5
9719$as_echo "no" >&6; }
9720fi
9721
9722  if test "x$ac_pt_PKG_CONFIG" = x; then
9723    PKG_CONFIG=""
9724  else
9725    case $cross_compiling:$ac_tool_warned in
9726yes:)
9727{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
9728$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9729ac_tool_warned=yes ;;
9730esac
9731    PKG_CONFIG=$ac_pt_PKG_CONFIG
9732  fi
9733else
9734  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9735fi
9736
9737fi
9738if test -n "$PKG_CONFIG"; then
9739	_pkg_min_version=0.9.0
9740	{ $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
9741$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9742	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9743		{ $as_echo "$as_me:$LINENO: result: yes" >&5
9744$as_echo "yes" >&6; }
9745	else
9746		{ $as_echo "$as_me:$LINENO: result: no" >&5
9747$as_echo "no" >&6; }
9748		PKG_CONFIG=""
9749	fi
9750
9751fi
9752
9753# After basic tools have been setup, we can check build os specific details.
9754
9755###############################################################################
9756
9757# Note that this is the build platform OS version!
9758
9759OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
9760OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
9761OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
9762OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
9763
9764
9765
9766
9767
9768# Setup builddeps, for automatic downloading of tools we need.
9769# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
9770# boot-jdk setup, but we need to have basic tools setup first.
9771
9772
9773# Check whether --with-builddeps-conf was given.
9774if test "${with_builddeps_conf+set}" = set; then
9775  withval=$with_builddeps_conf;
9776fi
9777
9778
9779
9780# Check whether --with-builddeps-server was given.
9781if test "${with_builddeps_server+set}" = set; then
9782  withval=$with_builddeps_server;
9783fi
9784
9785
9786
9787# Check whether --with-builddeps-dir was given.
9788if test "${with_builddeps_dir+set}" = set; then
9789  withval=$with_builddeps_dir;
9790else
9791  with_builddeps_dir=/localhome/builddeps
9792fi
9793
9794
9795
9796# Check whether --with-builddeps-group was given.
9797if test "${with_builddeps_group+set}" = set; then
9798  withval=$with_builddeps_group;
9799fi
9800
9801
9802
9803
9804    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
9805        if test "x$with_builddeps_conf" != x; then
9806            { $as_echo "$as_me:$LINENO: checking for supplied builddeps configuration file" >&5
9807$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
9808            builddepsfile=$with_builddeps_conf
9809            if test -s $builddepsfile; then
9810                . $builddepsfile
9811                { $as_echo "$as_me:$LINENO: result: loaded!" >&5
9812$as_echo "loaded!" >&6; }
9813            else
9814               { { $as_echo "$as_me:$LINENO: error: The given builddeps conf file $with_builddeps_conf could not be loaded!" >&5
9815$as_echo "$as_me: error: The given builddeps conf file $with_builddeps_conf could not be loaded!" >&2;}
9816   { (exit 1); exit 1; }; }
9817           fi
9818        else
9819            { $as_echo "$as_me:$LINENO: checking for builddeps.conf files in sources..." >&5
9820$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
9821            builddepsfile=`mktemp`
9822            touch $builddepsfile
9823            # Put all found confs into a single file.
9824            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
9825            # Source the file to acquire the variables
9826            if test -s $builddepsfile; then
9827                . $builddepsfile
9828                { $as_echo "$as_me:$LINENO: result: found at least one!" >&5
9829$as_echo "found at least one!" >&6; }
9830            else
9831               { { $as_echo "$as_me:$LINENO: error: Could not find any builddeps.conf at all!" >&5
9832$as_echo "$as_me: error: Could not find any builddeps.conf at all!" >&2;}
9833   { (exit 1); exit 1; }; }
9834           fi
9835        fi
9836        # Create build and target names that use _ instead of "-" and ".".
9837        # This is necessary to use them in variable names.
9838        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
9839        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
9840        # Extract rewrite information for build and target
9841        eval rewritten_build=\${REWRITE_${build_var}}
9842        if test "x$rewritten_build" = x; then
9843            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
9844            echo Build stays the same $rewritten_build
9845        else
9846            echo Rewriting build for builddeps into $rewritten_build
9847        fi
9848        eval rewritten_target=\${REWRITE_${target_var}}
9849        if test "x$rewritten_target" = x; then
9850            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
9851            echo Target stays the same $rewritten_target
9852        else
9853            echo Rewriting target for builddeps into $rewritten_target
9854        fi
9855        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
9856        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
9857    fi
9858    for ac_prog in 7z unzip
9859do
9860  # Extract the first word of "$ac_prog", so it can be a program name with args.
9861set dummy $ac_prog; ac_word=$2
9862{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9863$as_echo_n "checking for $ac_word... " >&6; }
9864if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then
9865  $as_echo_n "(cached) " >&6
9866else
9867  if test -n "$BDEPS_UNZIP"; then
9868  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
9869else
9870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9871for as_dir in $PATH
9872do
9873  IFS=$as_save_IFS
9874  test -z "$as_dir" && as_dir=.
9875  for ac_exec_ext in '' $ac_executable_extensions; do
9876  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9877    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
9878    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9879    break 2
9880  fi
9881done
9882done
9883IFS=$as_save_IFS
9884
9885fi
9886fi
9887BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
9888if test -n "$BDEPS_UNZIP"; then
9889  { $as_echo "$as_me:$LINENO: result: $BDEPS_UNZIP" >&5
9890$as_echo "$BDEPS_UNZIP" >&6; }
9891else
9892  { $as_echo "$as_me:$LINENO: result: no" >&5
9893$as_echo "no" >&6; }
9894fi
9895
9896
9897  test -n "$BDEPS_UNZIP" && break
9898done
9899
9900    if test "x$BDEPS_UNZIP" = x7z; then
9901        BDEPS_UNZIP="7z x"
9902    fi
9903
9904    for ac_prog in wget lftp ftp
9905do
9906  # Extract the first word of "$ac_prog", so it can be a program name with args.
9907set dummy $ac_prog; ac_word=$2
9908{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9909$as_echo_n "checking for $ac_word... " >&6; }
9910if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then
9911  $as_echo_n "(cached) " >&6
9912else
9913  if test -n "$BDEPS_FTP"; then
9914  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
9915else
9916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9917for as_dir in $PATH
9918do
9919  IFS=$as_save_IFS
9920  test -z "$as_dir" && as_dir=.
9921  for ac_exec_ext in '' $ac_executable_extensions; do
9922  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9923    ac_cv_prog_BDEPS_FTP="$ac_prog"
9924    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9925    break 2
9926  fi
9927done
9928done
9929IFS=$as_save_IFS
9930
9931fi
9932fi
9933BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
9934if test -n "$BDEPS_FTP"; then
9935  { $as_echo "$as_me:$LINENO: result: $BDEPS_FTP" >&5
9936$as_echo "$BDEPS_FTP" >&6; }
9937else
9938  { $as_echo "$as_me:$LINENO: result: no" >&5
9939$as_echo "no" >&6; }
9940fi
9941
9942
9943  test -n "$BDEPS_FTP" && break
9944done
9945
9946
9947
9948###############################################################################
9949#
9950# Determine OpenJDK variants, options and version numbers.
9951#
9952###############################################################################
9953
9954# We need build & target for this.
9955
9956
9957###############################################################################
9958#
9959# Should we build only OpenJDK even if closed sources are present?
9960#
9961# Check whether --enable-openjdk-only was given.
9962if test "${enable_openjdk_only+set}" = set; then
9963  enableval=$enable_openjdk_only;
9964else
9965  enable_openjdk_only="no"
9966fi
9967
9968
9969{ $as_echo "$as_me:$LINENO: checking for presence of closed sources" >&5
9970$as_echo_n "checking for presence of closed sources... " >&6; }
9971if test -d "$SRC_ROOT/jdk/src/closed"; then
9972    CLOSED_SOURCE_PRESENT=yes
9973else
9974    CLOSED_SOURCE_PRESENT=no
9975fi
9976{ $as_echo "$as_me:$LINENO: result: $CLOSED_SOURCE_PRESENT" >&5
9977$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
9978
9979{ $as_echo "$as_me:$LINENO: checking if closed source is supressed (openjdk-only)" >&5
9980$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
9981SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
9982{ $as_echo "$as_me:$LINENO: result: $SUPRESS_CLOSED_SOURCE" >&5
9983$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
9984
9985if test "x$CLOSED_SOURCE_PRESENT" = xno; then
9986  OPENJDK=true
9987  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
9988    { $as_echo "$as_me:$LINENO: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
9989$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
9990  fi
9991else
9992  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
9993    OPENJDK=true
9994  else
9995    OPENJDK=false
9996  fi
9997fi
9998
9999if test "x$OPENJDK" = "xtrue"; then
10000    SET_OPENJDK="OPENJDK=true"
10001fi
10002
10003
10004
10005###############################################################################
10006#
10007# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10008# We always build headless support.
10009#
10010{ $as_echo "$as_me:$LINENO: checking headful support" >&5
10011$as_echo_n "checking headful support... " >&6; }
10012# Check whether --enable-headful was given.
10013if test "${enable_headful+set}" = set; then
10014  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10015else
10016  SUPPORT_HEADFUL=yes
10017fi
10018
10019
10020SUPPORT_HEADLESS=yes
10021BUILD_HEADLESS="BUILD_HEADLESS:=true"
10022
10023if test "x$SUPPORT_HEADFUL" = xyes; then
10024    # We are building both headful and headless.
10025    headful_msg="inlude support for both headful and headless"
10026fi
10027
10028if test "x$SUPPORT_HEADFUL" = xno; then
10029    # Thus we are building headless only.
10030    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10031    headful_msg="headless only"
10032fi
10033
10034{ $as_echo "$as_me:$LINENO: result: $headful_msg" >&5
10035$as_echo "$headful_msg" >&6; }
10036
10037
10038
10039
10040
10041# Control wether Hotspot runs Queens test after build.
10042# Check whether --enable-hotspot-test-in-build was given.
10043if test "${enable_hotspot_test_in_build+set}" = set; then
10044  enableval=$enable_hotspot_test_in_build;
10045else
10046  enable_hotspot_test_in_build=no
10047fi
10048
10049if test "x$enable_hotspot_test_in_build" = "xyes"; then
10050    TEST_IN_BUILD=true
10051else
10052    TEST_IN_BUILD=false
10053fi
10054
10055
10056###############################################################################
10057#
10058# Choose cacerts source file
10059#
10060
10061# Check whether --with-cacerts-file was given.
10062if test "${with_cacerts_file+set}" = set; then
10063  withval=$with_cacerts_file;
10064fi
10065
10066if test "x$with_cacerts_file" != x; then
10067    CACERTS_FILE=$with_cacerts_file
10068else
10069    if test "x$OPENJDK" = "xtrue"; then
10070        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10071    else
10072        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10073    fi
10074fi
10075
10076
10077###############################################################################
10078#
10079# Enable or disable unlimited crypto
10080#
10081# Check whether --enable-unlimited-crypto was given.
10082if test "${enable_unlimited_crypto+set}" = set; then
10083  enableval=$enable_unlimited_crypto;
10084else
10085  enable_unlimited_crypto=no
10086fi
10087
10088if test "x$enable_unlimited_crypto" = "xyes"; then
10089    UNLIMITED_CRYPTO=true
10090else
10091    UNLIMITED_CRYPTO=false
10092fi
10093
10094
10095###############################################################################
10096#
10097# Compress jars
10098#
10099COMPRESS_JARS=false
10100
10101
10102
10103
10104# Source the version numbers
10105. $AUTOCONF_DIR/version.numbers
10106if test "x$OPENJDK" = "xfalse"; then
10107    . $AUTOCONF_DIR/closed.version.numbers
10108fi
10109# Now set the JDK version, milestone, build number etc.
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124COPYRIGHT_YEAR=`date +'%Y'`
10125
10126
10127RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
10128
10129
10130if test "x$JDK_UPDATE_VERSION" != x; then
10131    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10132else
10133    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10134fi
10135
10136
10137if test "x$MILESTONE" != x; then
10138    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
10139else
10140    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
10141fi
10142
10143
10144if test "x$JDK_BUILD_NUMBER" != x; then
10145    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
10146else
10147    JDK_BUILD_NUMBER=b00
10148    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10149    # Avoid [:alnum:] since it depends on the locale.
10150    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10151    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10152    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
10153fi
10154
10155COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10156
10157
10158
10159###############################################################################
10160#
10161# Setup BootJDK, used to bootstrap the build.
10162#
10163###############################################################################
10164
10165
10166BOOT_JDK_FOUND=no
10167
10168# Check whether --with-boot-jdk was given.
10169if test "${with_boot_jdk+set}" = set; then
10170  withval=$with_boot_jdk;
10171fi
10172
10173
10174# We look for the Boot JDK through various means, going from more certain to
10175# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10176# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10177# must check if this is indeed valid; otherwise we'll continue looking.
10178
10179# Test: Is bootjdk explicitely set by command line arguments?
10180
10181  if test "x$BOOT_JDK_FOUND" = xno; then
10182    # Now execute the test
10183
10184if test "x$with_boot_jdk" != x; then
10185    BOOT_JDK=$with_boot_jdk
10186    BOOT_JDK_FOUND=maybe
10187    { $as_echo "$as_me:$LINENO: Found potential Boot JDK using configure arguments" >&5
10188$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10189fi
10190
10191
10192    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10193    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10194      # Do we have a bin/java?
10195      if test ! -x "$BOOT_JDK/bin/java"; then
10196        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10198        BOOT_JDK_FOUND=no
10199      else
10200        # Do we have a bin/javac?
10201        if test ! -x "$BOOT_JDK/bin/javac"; then
10202          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10204          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
10205$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10206          BOOT_JDK_FOUND=no
10207        else
10208          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10209          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10210            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10212            BOOT_JDK_FOUND=no
10213          else
10214            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10215            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10216
10217            # Extra M4 quote needed to protect [] in grep expression.
10218            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10219            if test "x$FOUND_VERSION_78" = x; then
10220              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10222              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
10223$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10224              BOOT_JDK_FOUND=no
10225            else
10226              # We're done! :-)
10227              BOOT_JDK_FOUND=yes
10228
10229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10230
10231  # Input might be given as Windows format, start by converting to
10232  # unix format.
10233  path="$BOOT_JDK"
10234  new_path=`$CYGPATH -u "$path"`
10235
10236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10239  # "foo.exe" is OK but "foo" is an error.
10240  #
10241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10242  # It is also a way to make sure we got the proper file name for the real test later on.
10243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10244  if test "x$test_shortpath" = x; then
10245    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10246$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10247    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
10248$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
10249   { (exit 1); exit 1; }; }
10250  fi
10251
10252  # Call helper function which possibly converts this using DOS-style short mode.
10253  # If so, the updated path is stored in $new_path.
10254
10255  input_path="$new_path"
10256  # Check if we need to convert this using DOS-style short mode. If the path
10257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10258  # take no chances and rewrite it.
10259  # Note: m4 eats our [], so we need to use [ and ] instead.
10260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10261  if test "x$has_forbidden_chars" != x; then
10262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10266      # Going to short mode and back again did indeed matter. Since short mode is
10267      # case insensitive, let's make it lowercase to improve readability.
10268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10269      # Now convert it back to Unix-stile (cygpath)
10270      input_path=`$CYGPATH -u "$shortmode_path"`
10271      new_path="$input_path"
10272    fi
10273  fi
10274
10275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10276  if test "x$test_cygdrive_prefix" = x; then
10277    # As a simple fix, exclude /usr/bin since it's not a real path.
10278    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10280      # a path prefixed by /cygdrive for fixpath to work.
10281      new_path="$CYGWIN_ROOT_PATH$input_path"
10282    fi
10283  fi
10284
10285
10286  if test "x$path" != "x$new_path"; then
10287    BOOT_JDK="$new_path"
10288    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
10289$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10290  fi
10291
10292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10293
10294  path="$BOOT_JDK"
10295  has_colon=`$ECHO $path | $GREP ^.:`
10296  new_path="$path"
10297  if test "x$has_colon" = x; then
10298    # Not in mixed or Windows style, start by that.
10299    new_path=`cmd //c echo $path`
10300  fi
10301
10302
10303  input_path="$new_path"
10304  # Check if we need to convert this using DOS-style short mode. If the path
10305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10306  # take no chances and rewrite it.
10307  # Note: m4 eats our [], so we need to use [ and ] instead.
10308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10309  if test "x$has_forbidden_chars" != x; then
10310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10311    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10312  fi
10313
10314
10315  windows_path="$new_path"
10316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10317    unix_path=`$CYGPATH -u "$windows_path"`
10318    new_path="$unix_path"
10319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10321    new_path="$unix_path"
10322  fi
10323
10324  if test "x$path" != "x$new_path"; then
10325    BOOT_JDK="$new_path"
10326    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
10327$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10328  fi
10329
10330  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10331  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10332
10333  else
10334    # We're on a posix platform. Hooray! :)
10335    path="$BOOT_JDK"
10336
10337    if test ! -f "$path" && test ! -d "$path"; then
10338      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
10339$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
10340   { (exit 1); exit 1; }; }
10341    fi
10342
10343    has_space=`$ECHO "$path" | $GREP " "`
10344    if test "x$has_space" != x; then
10345      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10346$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10347      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
10348$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
10349   { (exit 1); exit 1; }; }
10350    fi
10351  fi
10352
10353              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
10354$as_echo_n "checking for Boot JDK... " >&6; }
10355              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
10356$as_echo "$BOOT_JDK" >&6; }
10357              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
10358$as_echo_n "checking Boot JDK version... " >&6; }
10359              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10360              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
10361$as_echo "$BOOT_JDK_VERSION" >&6; }
10362            fi # end check jdk version
10363          fi # end check rt.jar
10364        fi # end check javac
10365      fi # end check java
10366    fi # end check boot jdk found
10367  fi
10368
10369if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
10370  # Having specified an argument which is incorrect will produce an instant failure;
10371  # we should not go on looking
10372  { { $as_echo "$as_me:$LINENO: error: The path given by --with-boot-jdk does not contain a valid Boot JDK" >&5
10373$as_echo "$as_me: error: The path given by --with-boot-jdk does not contain a valid Boot JDK" >&2;}
10374   { (exit 1); exit 1; }; }
10375fi
10376
10377# Test: Is bootjdk available from builddeps?
10378
10379  if test "x$BOOT_JDK_FOUND" = xno; then
10380    # Now execute the test
10381
10382
10383
10384    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10385        # Source the builddeps file again, to make sure it uses the latest variables!
10386        . $builddepsfile
10387        # Look for a target and build machine specific resource!
10388        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10389        if test "x$resource" = x; then
10390            # Ok, lets instead look for a target specific resource
10391            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
10392        fi
10393        if test "x$resource" = x; then
10394            # Ok, lets instead look for a build specific resource
10395            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
10396        fi
10397        if test "x$resource" = x; then
10398            # Ok, lets instead look for a generic resource
10399            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
10400            resource=${builddep_bootjdk}
10401        fi
10402        if test "x$resource" != x; then
10403            { $as_echo "$as_me:$LINENO: Using builddeps $resource for bootjdk" >&5
10404$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
10405	    # If the resource in the builddeps.conf file is an existing directory,
10406	    # for example /java/linux/cups
10407	    if test -d ${resource}; then
10408	       depdir=${resource}
10409	    else
10410
10411# bootjdk is for example mymodule
10412# $resource is for example libs/general/libmymod_1_2_3.zip
10413# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10414# $with_builddeps_dir is for example /localhome/builddeps
10415# depdir is the name of the variable into which we store the depdir, eg MYMOD
10416# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10417# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10418    filename=`basename $resource`
10419    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10420    filebase=${filename%%.*}
10421    extension=${filename#*.}
10422    installdir=$with_builddeps_dir/$filebase
10423    if test ! -f $installdir/$filename.unpacked; then
10424        { $as_echo "$as_me:$LINENO: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
10425$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10426        if test ! -d $installdir; then
10427            mkdir -p $installdir
10428        fi
10429        if test ! -d $installdir; then
10430            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
10431$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
10432   { (exit 1); exit 1; }; }
10433        fi
10434        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
10435        touch $tmpfile
10436        if test ! -f $tmpfile; then
10437            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
10438$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
10439   { (exit 1); exit 1; }; }
10440        fi
10441
10442    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10443    # $tmpfile is the local file name for the downloaded file.
10444    VALID_TOOL=no
10445    if test "x$BDEPS_FTP" = xwget; then
10446       VALID_TOOL=yes
10447       wget -O $tmpfile $with_builddeps_server/$resource
10448    fi
10449    if test "x$BDEPS_FTP" = xlftp; then
10450       VALID_TOOL=yes
10451       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10452    fi
10453    if test "x$BDEPS_FTP" = xftp; then
10454        VALID_TOOL=yes
10455        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
10456        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
10457        FTPUSERPWD=${FTPSERVER%%@*}
10458        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
10459            FTPUSER=${userpwd%%:*}
10460            FTPPWD=${userpwd#*@}
10461            FTPSERVER=${FTPSERVER#*@}
10462        else
10463            FTPUSER=ftp
10464            FTPPWD=ftp
10465        fi
10466        # the "pass" command does not work on some
10467        # ftp clients (read ftp.exe) but if it works,
10468        # passive mode is better!
10469        (\
10470            echo "user $FTPUSER $FTPPWD"        ;\
10471            echo "pass"                         ;\
10472            echo "bin"                          ;\
10473            echo "get $FTPPATH $tmpfile"              ;\
10474        ) | ftp -in $FTPSERVER
10475    fi
10476    if test "x$VALID_TOOL" != xyes; then
10477       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
10478$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
10479   { (exit 1); exit 1; }; }
10480    fi
10481
10482        mv $tmpfile $installdir/$filename
10483        if test ! -s $installdir/$filename; then
10484            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
10485$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
10486   { (exit 1); exit 1; }; }
10487        fi
10488        case "$extension" in
10489            zip)  echo "Unzipping $installdir/$filename..."
10490               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
10491            ;;
10492            tar.gz) echo "Untaring $installdir/$filename..."
10493               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10494            ;;
10495            tgz) echo "Untaring $installdir/$filename..."
10496               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10497            ;;
10498            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
10499$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
10500   { (exit 1); exit 1; }; }
10501            ;;
10502        esac
10503    fi
10504    if test -f $installdir/$filename.unpacked; then
10505        depdir=$installdir
10506    fi
10507
10508	    fi
10509            # Source the builddeps file again, because in the previous command, the depdir
10510            # was updated to point at the current build dependency install directory.
10511            . $builddepsfile
10512            # Now extract variables from the builddeps.conf files.
10513            theroot=${builddep_bootjdk_ROOT}
10514            thecflags=${builddep_bootjdk_CFLAGS}
10515            thelibs=${builddep_bootjdk_LIBS}
10516            if test "x$depdir" = x; then
10517                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency bootjdk" >&5
10518$as_echo "$as_me: error: Could not download build dependency bootjdk" >&2;}
10519   { (exit 1); exit 1; }; }
10520            fi
10521            BOOT_JDK=$depdir
10522            if test "x$theroot" != x; then
10523               BOOT_JDK="$theroot"
10524            fi
10525            if test "x$thecflags" != x; then
10526               BOOT_JDK_CFLAGS="$thecflags"
10527            fi
10528            if test "x$thelibs" != x; then
10529               BOOT_JDK_LIBS="$thelibs"
10530            fi
10531            BOOT_JDK_FOUND=maybe
10532            else BOOT_JDK_FOUND=no
10533
10534        fi
10535        else BOOT_JDK_FOUND=no
10536
10537    fi
10538
10539
10540
10541    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10542    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10543      # Do we have a bin/java?
10544      if test ! -x "$BOOT_JDK/bin/java"; then
10545        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10547        BOOT_JDK_FOUND=no
10548      else
10549        # Do we have a bin/javac?
10550        if test ! -x "$BOOT_JDK/bin/javac"; then
10551          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10553          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
10554$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10555          BOOT_JDK_FOUND=no
10556        else
10557          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10558          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10559            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10561            BOOT_JDK_FOUND=no
10562          else
10563            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10564            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10565
10566            # Extra M4 quote needed to protect [] in grep expression.
10567            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10568            if test "x$FOUND_VERSION_78" = x; then
10569              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10571              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
10572$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10573              BOOT_JDK_FOUND=no
10574            else
10575              # We're done! :-)
10576              BOOT_JDK_FOUND=yes
10577
10578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10579
10580  # Input might be given as Windows format, start by converting to
10581  # unix format.
10582  path="$BOOT_JDK"
10583  new_path=`$CYGPATH -u "$path"`
10584
10585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10588  # "foo.exe" is OK but "foo" is an error.
10589  #
10590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10591  # It is also a way to make sure we got the proper file name for the real test later on.
10592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10593  if test "x$test_shortpath" = x; then
10594    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10595$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10596    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
10597$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
10598   { (exit 1); exit 1; }; }
10599  fi
10600
10601  # Call helper function which possibly converts this using DOS-style short mode.
10602  # If so, the updated path is stored in $new_path.
10603
10604  input_path="$new_path"
10605  # Check if we need to convert this using DOS-style short mode. If the path
10606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10607  # take no chances and rewrite it.
10608  # Note: m4 eats our [], so we need to use [ and ] instead.
10609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10610  if test "x$has_forbidden_chars" != x; then
10611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10615      # Going to short mode and back again did indeed matter. Since short mode is
10616      # case insensitive, let's make it lowercase to improve readability.
10617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10618      # Now convert it back to Unix-stile (cygpath)
10619      input_path=`$CYGPATH -u "$shortmode_path"`
10620      new_path="$input_path"
10621    fi
10622  fi
10623
10624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10625  if test "x$test_cygdrive_prefix" = x; then
10626    # As a simple fix, exclude /usr/bin since it's not a real path.
10627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10629      # a path prefixed by /cygdrive for fixpath to work.
10630      new_path="$CYGWIN_ROOT_PATH$input_path"
10631    fi
10632  fi
10633
10634
10635  if test "x$path" != "x$new_path"; then
10636    BOOT_JDK="$new_path"
10637    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
10638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10639  fi
10640
10641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10642
10643  path="$BOOT_JDK"
10644  has_colon=`$ECHO $path | $GREP ^.:`
10645  new_path="$path"
10646  if test "x$has_colon" = x; then
10647    # Not in mixed or Windows style, start by that.
10648    new_path=`cmd //c echo $path`
10649  fi
10650
10651
10652  input_path="$new_path"
10653  # Check if we need to convert this using DOS-style short mode. If the path
10654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10655  # take no chances and rewrite it.
10656  # Note: m4 eats our [], so we need to use [ and ] instead.
10657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10658  if test "x$has_forbidden_chars" != x; then
10659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10661  fi
10662
10663
10664  windows_path="$new_path"
10665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10666    unix_path=`$CYGPATH -u "$windows_path"`
10667    new_path="$unix_path"
10668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10670    new_path="$unix_path"
10671  fi
10672
10673  if test "x$path" != "x$new_path"; then
10674    BOOT_JDK="$new_path"
10675    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
10676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10677  fi
10678
10679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10681
10682  else
10683    # We're on a posix platform. Hooray! :)
10684    path="$BOOT_JDK"
10685
10686    if test ! -f "$path" && test ! -d "$path"; then
10687      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
10688$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
10689   { (exit 1); exit 1; }; }
10690    fi
10691
10692    has_space=`$ECHO "$path" | $GREP " "`
10693    if test "x$has_space" != x; then
10694      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10695$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10696      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
10697$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
10698   { (exit 1); exit 1; }; }
10699    fi
10700  fi
10701
10702              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
10703$as_echo_n "checking for Boot JDK... " >&6; }
10704              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
10705$as_echo "$BOOT_JDK" >&6; }
10706              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
10707$as_echo_n "checking Boot JDK version... " >&6; }
10708              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10709              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
10710$as_echo "$BOOT_JDK_VERSION" >&6; }
10711            fi # end check jdk version
10712          fi # end check rt.jar
10713        fi # end check javac
10714      fi # end check java
10715    fi # end check boot jdk found
10716  fi
10717
10718
10719# Test: Is $JAVA_HOME set?
10720
10721  if test "x$BOOT_JDK_FOUND" = xno; then
10722    # Now execute the test
10723
10724    if test "x$JAVA_HOME" != x; then
10725        JAVA_HOME_PROCESSED="$JAVA_HOME"
10726
10727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10728
10729  # Input might be given as Windows format, start by converting to
10730  # unix format.
10731  path="$JAVA_HOME_PROCESSED"
10732  new_path=`$CYGPATH -u "$path"`
10733
10734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10737  # "foo.exe" is OK but "foo" is an error.
10738  #
10739  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10740  # It is also a way to make sure we got the proper file name for the real test later on.
10741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10742  if test "x$test_shortpath" = x; then
10743    { $as_echo "$as_me:$LINENO: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
10744$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
10745    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of JAVA_HOME_PROCESSED" >&5
10746$as_echo "$as_me: error: Cannot locate the the path of JAVA_HOME_PROCESSED" >&2;}
10747   { (exit 1); exit 1; }; }
10748  fi
10749
10750  # Call helper function which possibly converts this using DOS-style short mode.
10751  # If so, the updated path is stored in $new_path.
10752
10753  input_path="$new_path"
10754  # Check if we need to convert this using DOS-style short mode. If the path
10755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10756  # take no chances and rewrite it.
10757  # Note: m4 eats our [], so we need to use [ and ] instead.
10758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10759  if test "x$has_forbidden_chars" != x; then
10760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10764      # Going to short mode and back again did indeed matter. Since short mode is
10765      # case insensitive, let's make it lowercase to improve readability.
10766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10767      # Now convert it back to Unix-stile (cygpath)
10768      input_path=`$CYGPATH -u "$shortmode_path"`
10769      new_path="$input_path"
10770    fi
10771  fi
10772
10773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10774  if test "x$test_cygdrive_prefix" = x; then
10775    # As a simple fix, exclude /usr/bin since it's not a real path.
10776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10778      # a path prefixed by /cygdrive for fixpath to work.
10779      new_path="$CYGWIN_ROOT_PATH$input_path"
10780    fi
10781  fi
10782
10783
10784  if test "x$path" != "x$new_path"; then
10785    JAVA_HOME_PROCESSED="$new_path"
10786    { $as_echo "$as_me:$LINENO: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
10787$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
10788  fi
10789
10790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10791
10792  path="$JAVA_HOME_PROCESSED"
10793  has_colon=`$ECHO $path | $GREP ^.:`
10794  new_path="$path"
10795  if test "x$has_colon" = x; then
10796    # Not in mixed or Windows style, start by that.
10797    new_path=`cmd //c echo $path`
10798  fi
10799
10800
10801  input_path="$new_path"
10802  # Check if we need to convert this using DOS-style short mode. If the path
10803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10804  # take no chances and rewrite it.
10805  # Note: m4 eats our [], so we need to use [ and ] instead.
10806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10807  if test "x$has_forbidden_chars" != x; then
10808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10810  fi
10811
10812
10813  windows_path="$new_path"
10814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10815    unix_path=`$CYGPATH -u "$windows_path"`
10816    new_path="$unix_path"
10817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10819    new_path="$unix_path"
10820  fi
10821
10822  if test "x$path" != "x$new_path"; then
10823    JAVA_HOME_PROCESSED="$new_path"
10824    { $as_echo "$as_me:$LINENO: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
10825$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
10826  fi
10827
10828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10830
10831  else
10832    # We're on a posix platform. Hooray! :)
10833    path="$JAVA_HOME_PROCESSED"
10834
10835    if test ! -f "$path" && test ! -d "$path"; then
10836      { { $as_echo "$as_me:$LINENO: error: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." >&5
10837$as_echo "$as_me: error: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." >&2;}
10838   { (exit 1); exit 1; }; }
10839    fi
10840
10841    has_space=`$ECHO "$path" | $GREP " "`
10842    if test "x$has_space" != x; then
10843      { $as_echo "$as_me:$LINENO: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
10844$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
10845      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
10846$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
10847   { (exit 1); exit 1; }; }
10848    fi
10849  fi
10850
10851        if test ! -d "$JAVA_HOME_PROCESSED"; then
10852            { $as_echo "$as_me:$LINENO: Your JAVA_HOME points to a non-existing directory!" >&5
10853$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
10854        else
10855          # Aha, the user has set a JAVA_HOME
10856          # let us use that as the Boot JDK.
10857          BOOT_JDK="$JAVA_HOME_PROCESSED"
10858          BOOT_JDK_FOUND=maybe
10859          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using JAVA_HOME" >&5
10860$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
10861        fi
10862    fi
10863
10864
10865    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10866    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10867      # Do we have a bin/java?
10868      if test ! -x "$BOOT_JDK/bin/java"; then
10869        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10870$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10871        BOOT_JDK_FOUND=no
10872      else
10873        # Do we have a bin/javac?
10874        if test ! -x "$BOOT_JDK/bin/javac"; then
10875          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10876$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10877          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
10878$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10879          BOOT_JDK_FOUND=no
10880        else
10881          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10882          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10883            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10885            BOOT_JDK_FOUND=no
10886          else
10887            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10888            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10889
10890            # Extra M4 quote needed to protect [] in grep expression.
10891            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10892            if test "x$FOUND_VERSION_78" = x; then
10893              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10894$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10895              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
10896$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10897              BOOT_JDK_FOUND=no
10898            else
10899              # We're done! :-)
10900              BOOT_JDK_FOUND=yes
10901
10902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10903
10904  # Input might be given as Windows format, start by converting to
10905  # unix format.
10906  path="$BOOT_JDK"
10907  new_path=`$CYGPATH -u "$path"`
10908
10909  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10910  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10911  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10912  # "foo.exe" is OK but "foo" is an error.
10913  #
10914  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10915  # It is also a way to make sure we got the proper file name for the real test later on.
10916  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10917  if test "x$test_shortpath" = x; then
10918    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10919$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10920    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
10921$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
10922   { (exit 1); exit 1; }; }
10923  fi
10924
10925  # Call helper function which possibly converts this using DOS-style short mode.
10926  # If so, the updated path is stored in $new_path.
10927
10928  input_path="$new_path"
10929  # Check if we need to convert this using DOS-style short mode. If the path
10930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10931  # take no chances and rewrite it.
10932  # Note: m4 eats our [], so we need to use [ and ] instead.
10933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10934  if test "x$has_forbidden_chars" != x; then
10935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10939      # Going to short mode and back again did indeed matter. Since short mode is
10940      # case insensitive, let's make it lowercase to improve readability.
10941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10942      # Now convert it back to Unix-stile (cygpath)
10943      input_path=`$CYGPATH -u "$shortmode_path"`
10944      new_path="$input_path"
10945    fi
10946  fi
10947
10948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10949  if test "x$test_cygdrive_prefix" = x; then
10950    # As a simple fix, exclude /usr/bin since it's not a real path.
10951    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10953      # a path prefixed by /cygdrive for fixpath to work.
10954      new_path="$CYGWIN_ROOT_PATH$input_path"
10955    fi
10956  fi
10957
10958
10959  if test "x$path" != "x$new_path"; then
10960    BOOT_JDK="$new_path"
10961    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
10962$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10963  fi
10964
10965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10966
10967  path="$BOOT_JDK"
10968  has_colon=`$ECHO $path | $GREP ^.:`
10969  new_path="$path"
10970  if test "x$has_colon" = x; then
10971    # Not in mixed or Windows style, start by that.
10972    new_path=`cmd //c echo $path`
10973  fi
10974
10975
10976  input_path="$new_path"
10977  # Check if we need to convert this using DOS-style short mode. If the path
10978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10979  # take no chances and rewrite it.
10980  # Note: m4 eats our [], so we need to use [ and ] instead.
10981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10982  if test "x$has_forbidden_chars" != x; then
10983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10984    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10985  fi
10986
10987
10988  windows_path="$new_path"
10989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10990    unix_path=`$CYGPATH -u "$windows_path"`
10991    new_path="$unix_path"
10992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10994    new_path="$unix_path"
10995  fi
10996
10997  if test "x$path" != "x$new_path"; then
10998    BOOT_JDK="$new_path"
10999    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11000$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11001  fi
11002
11003  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11004  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11005
11006  else
11007    # We're on a posix platform. Hooray! :)
11008    path="$BOOT_JDK"
11009
11010    if test ! -f "$path" && test ! -d "$path"; then
11011      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
11012$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
11013   { (exit 1); exit 1; }; }
11014    fi
11015
11016    has_space=`$ECHO "$path" | $GREP " "`
11017    if test "x$has_space" != x; then
11018      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11020      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
11021$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
11022   { (exit 1); exit 1; }; }
11023    fi
11024  fi
11025
11026              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
11027$as_echo_n "checking for Boot JDK... " >&6; }
11028              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
11029$as_echo "$BOOT_JDK" >&6; }
11030              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
11031$as_echo_n "checking Boot JDK version... " >&6; }
11032              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11033              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
11034$as_echo "$BOOT_JDK_VERSION" >&6; }
11035            fi # end check jdk version
11036          fi # end check rt.jar
11037        fi # end check javac
11038      fi # end check java
11039    fi # end check boot jdk found
11040  fi
11041
11042
11043# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11044
11045  if test "x$BOOT_JDK_FOUND" = xno; then
11046    # Now execute the test
11047
11048    if test -x /usr/libexec/java_home; then
11049        BOOT_JDK=`/usr/libexec/java_home`
11050        BOOT_JDK_FOUND=maybe
11051        { $as_echo "$as_me:$LINENO: Found potential Boot JDK using /usr/libexec/java_home" >&5
11052$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11053    fi
11054
11055
11056    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11057    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11058      # Do we have a bin/java?
11059      if test ! -x "$BOOT_JDK/bin/java"; then
11060        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11062        BOOT_JDK_FOUND=no
11063      else
11064        # Do we have a bin/javac?
11065        if test ! -x "$BOOT_JDK/bin/javac"; then
11066          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11068          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
11069$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11070          BOOT_JDK_FOUND=no
11071        else
11072          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11073          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11074            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11075$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11076            BOOT_JDK_FOUND=no
11077          else
11078            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11079            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11080
11081            # Extra M4 quote needed to protect [] in grep expression.
11082            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11083            if test "x$FOUND_VERSION_78" = x; then
11084              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11085$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11086              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
11087$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11088              BOOT_JDK_FOUND=no
11089            else
11090              # We're done! :-)
11091              BOOT_JDK_FOUND=yes
11092
11093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11094
11095  # Input might be given as Windows format, start by converting to
11096  # unix format.
11097  path="$BOOT_JDK"
11098  new_path=`$CYGPATH -u "$path"`
11099
11100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11103  # "foo.exe" is OK but "foo" is an error.
11104  #
11105  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11106  # It is also a way to make sure we got the proper file name for the real test later on.
11107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11108  if test "x$test_shortpath" = x; then
11109    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11110$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11111    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
11112$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
11113   { (exit 1); exit 1; }; }
11114  fi
11115
11116  # Call helper function which possibly converts this using DOS-style short mode.
11117  # If so, the updated path is stored in $new_path.
11118
11119  input_path="$new_path"
11120  # Check if we need to convert this using DOS-style short mode. If the path
11121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11122  # take no chances and rewrite it.
11123  # Note: m4 eats our [], so we need to use [ and ] instead.
11124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11125  if test "x$has_forbidden_chars" != x; then
11126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11130      # Going to short mode and back again did indeed matter. Since short mode is
11131      # case insensitive, let's make it lowercase to improve readability.
11132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11133      # Now convert it back to Unix-stile (cygpath)
11134      input_path=`$CYGPATH -u "$shortmode_path"`
11135      new_path="$input_path"
11136    fi
11137  fi
11138
11139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11140  if test "x$test_cygdrive_prefix" = x; then
11141    # As a simple fix, exclude /usr/bin since it's not a real path.
11142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11144      # a path prefixed by /cygdrive for fixpath to work.
11145      new_path="$CYGWIN_ROOT_PATH$input_path"
11146    fi
11147  fi
11148
11149
11150  if test "x$path" != "x$new_path"; then
11151    BOOT_JDK="$new_path"
11152    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11153$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11154  fi
11155
11156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11157
11158  path="$BOOT_JDK"
11159  has_colon=`$ECHO $path | $GREP ^.:`
11160  new_path="$path"
11161  if test "x$has_colon" = x; then
11162    # Not in mixed or Windows style, start by that.
11163    new_path=`cmd //c echo $path`
11164  fi
11165
11166
11167  input_path="$new_path"
11168  # Check if we need to convert this using DOS-style short mode. If the path
11169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11170  # take no chances and rewrite it.
11171  # Note: m4 eats our [], so we need to use [ and ] instead.
11172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11173  if test "x$has_forbidden_chars" != x; then
11174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11176  fi
11177
11178
11179  windows_path="$new_path"
11180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11181    unix_path=`$CYGPATH -u "$windows_path"`
11182    new_path="$unix_path"
11183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11185    new_path="$unix_path"
11186  fi
11187
11188  if test "x$path" != "x$new_path"; then
11189    BOOT_JDK="$new_path"
11190    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11192  fi
11193
11194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11196
11197  else
11198    # We're on a posix platform. Hooray! :)
11199    path="$BOOT_JDK"
11200
11201    if test ! -f "$path" && test ! -d "$path"; then
11202      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
11203$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
11204   { (exit 1); exit 1; }; }
11205    fi
11206
11207    has_space=`$ECHO "$path" | $GREP " "`
11208    if test "x$has_space" != x; then
11209      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11210$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11211      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
11212$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
11213   { (exit 1); exit 1; }; }
11214    fi
11215  fi
11216
11217              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
11218$as_echo_n "checking for Boot JDK... " >&6; }
11219              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
11220$as_echo "$BOOT_JDK" >&6; }
11221              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
11222$as_echo_n "checking Boot JDK version... " >&6; }
11223              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11224              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
11225$as_echo "$BOOT_JDK_VERSION" >&6; }
11226            fi # end check jdk version
11227          fi # end check rt.jar
11228        fi # end check javac
11229      fi # end check java
11230    fi # end check boot jdk found
11231  fi
11232
11233
11234# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11235
11236  if test "x$BOOT_JDK_FOUND" = xno; then
11237    # Now execute the test
11238
11239    # Extract the first word of "javac", so it can be a program name with args.
11240set dummy javac; ac_word=$2
11241{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
11242$as_echo_n "checking for $ac_word... " >&6; }
11243if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then
11244  $as_echo_n "(cached) " >&6
11245else
11246  case $JAVAC_CHECK in
11247  [\\/]* | ?:[\\/]*)
11248  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11249  ;;
11250  *)
11251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11252for as_dir in $PATH
11253do
11254  IFS=$as_save_IFS
11255  test -z "$as_dir" && as_dir=.
11256  for ac_exec_ext in '' $ac_executable_extensions; do
11257  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11258    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11259    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11260    break 2
11261  fi
11262done
11263done
11264IFS=$as_save_IFS
11265
11266  ;;
11267esac
11268fi
11269JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11270if test -n "$JAVAC_CHECK"; then
11271  { $as_echo "$as_me:$LINENO: result: $JAVAC_CHECK" >&5
11272$as_echo "$JAVAC_CHECK" >&6; }
11273else
11274  { $as_echo "$as_me:$LINENO: result: no" >&5
11275$as_echo "no" >&6; }
11276fi
11277
11278
11279    # Extract the first word of "java", so it can be a program name with args.
11280set dummy java; ac_word=$2
11281{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
11282$as_echo_n "checking for $ac_word... " >&6; }
11283if test "${ac_cv_path_JAVA_CHECK+set}" = set; then
11284  $as_echo_n "(cached) " >&6
11285else
11286  case $JAVA_CHECK in
11287  [\\/]* | ?:[\\/]*)
11288  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11289  ;;
11290  *)
11291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11292for as_dir in $PATH
11293do
11294  IFS=$as_save_IFS
11295  test -z "$as_dir" && as_dir=.
11296  for ac_exec_ext in '' $ac_executable_extensions; do
11297  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11298    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11299    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11300    break 2
11301  fi
11302done
11303done
11304IFS=$as_save_IFS
11305
11306  ;;
11307esac
11308fi
11309JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11310if test -n "$JAVA_CHECK"; then
11311  { $as_echo "$as_me:$LINENO: result: $JAVA_CHECK" >&5
11312$as_echo "$JAVA_CHECK" >&6; }
11313else
11314  { $as_echo "$as_me:$LINENO: result: no" >&5
11315$as_echo "no" >&6; }
11316fi
11317
11318
11319    BINARY="$JAVAC_CHECK"
11320    if test "x$JAVAC_CHECK" = x; then
11321        BINARY="$JAVA_CHECK"
11322    fi
11323    if test "x$BINARY" != x; then
11324        # So there is a java(c) binary, it might be part of a JDK.
11325        # Lets find the JDK/JRE directory by following symbolic links.
11326        # Linux/GNU systems often have links from /usr/bin/java to
11327        # /etc/alternatives/java to the real JDK binary.
11328
11329    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11330        # Follow a chain of symbolic links. Use readlink
11331        # where it exists, else fall back to horribly
11332        # complicated shell code.
11333        if test "x$READLINK_TESTED" != yes; then
11334            # On MacOSX there is a readlink tool with a different
11335            # purpose than the GNU readlink tool. Check the found readlink.
11336            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
11337            if test "x$ISGNU" = x; then
11338                 # A readlink that we do not know how to use.
11339                 # Are there other non-GNU readlinks out there?
11340                 READLINK_TESTED=yes
11341                 READLINK=
11342            fi
11343        fi
11344
11345        if test "x$READLINK" != x; then
11346            BINARY=`$READLINK -f $BINARY`
11347        else
11348            STARTDIR=$PWD
11349            COUNTER=0
11350            sym_link_dir=`$DIRNAME $BINARY`
11351            sym_link_file=`$BASENAME $BINARY`
11352            while test $COUNTER -lt 20; do
11353                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11354                if test "x$ISLINK" == x; then
11355                    # This is not a symbolic link! We are done!
11356                    break
11357                fi
11358                # The link might be relative! We have to use cd to travel safely.
11359                cd $sym_link_dir
11360                # ... and we must get the to the absolute path, not one using symbolic links.
11361                cd `pwd -P`
11362                cd `$DIRNAME $ISLINK`
11363                sym_link_dir=`$THEPWDCMD`
11364                sym_link_file=`$BASENAME $ISLINK`
11365                let COUNTER=COUNTER+1
11366            done
11367            cd $STARTDIR
11368            BINARY=$sym_link_dir/$sym_link_file
11369        fi
11370    fi
11371
11372        BOOT_JDK=`dirname "$BINARY"`
11373        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11374        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11375            # Looks like we found ourselves an JDK
11376            BOOT_JDK_FOUND=maybe
11377            { $as_echo "$as_me:$LINENO: Found potential Boot JDK using java(c) in PATH" >&5
11378$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11379        fi
11380    fi
11381
11382
11383    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11384    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11385      # Do we have a bin/java?
11386      if test ! -x "$BOOT_JDK/bin/java"; then
11387        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11389        BOOT_JDK_FOUND=no
11390      else
11391        # Do we have a bin/javac?
11392        if test ! -x "$BOOT_JDK/bin/javac"; then
11393          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11395          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
11396$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11397          BOOT_JDK_FOUND=no
11398        else
11399          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11400          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11401            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11403            BOOT_JDK_FOUND=no
11404          else
11405            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11406            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11407
11408            # Extra M4 quote needed to protect [] in grep expression.
11409            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11410            if test "x$FOUND_VERSION_78" = x; then
11411              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11412$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11413              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
11414$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11415              BOOT_JDK_FOUND=no
11416            else
11417              # We're done! :-)
11418              BOOT_JDK_FOUND=yes
11419
11420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11421
11422  # Input might be given as Windows format, start by converting to
11423  # unix format.
11424  path="$BOOT_JDK"
11425  new_path=`$CYGPATH -u "$path"`
11426
11427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11430  # "foo.exe" is OK but "foo" is an error.
11431  #
11432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11433  # It is also a way to make sure we got the proper file name for the real test later on.
11434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11435  if test "x$test_shortpath" = x; then
11436    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11437$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11438    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
11439$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
11440   { (exit 1); exit 1; }; }
11441  fi
11442
11443  # Call helper function which possibly converts this using DOS-style short mode.
11444  # If so, the updated path is stored in $new_path.
11445
11446  input_path="$new_path"
11447  # Check if we need to convert this using DOS-style short mode. If the path
11448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11449  # take no chances and rewrite it.
11450  # Note: m4 eats our [], so we need to use [ and ] instead.
11451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11452  if test "x$has_forbidden_chars" != x; then
11453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11454    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11455    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11456    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11457      # Going to short mode and back again did indeed matter. Since short mode is
11458      # case insensitive, let's make it lowercase to improve readability.
11459      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11460      # Now convert it back to Unix-stile (cygpath)
11461      input_path=`$CYGPATH -u "$shortmode_path"`
11462      new_path="$input_path"
11463    fi
11464  fi
11465
11466  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11467  if test "x$test_cygdrive_prefix" = x; then
11468    # As a simple fix, exclude /usr/bin since it's not a real path.
11469    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11470      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11471      # a path prefixed by /cygdrive for fixpath to work.
11472      new_path="$CYGWIN_ROOT_PATH$input_path"
11473    fi
11474  fi
11475
11476
11477  if test "x$path" != "x$new_path"; then
11478    BOOT_JDK="$new_path"
11479    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11480$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11481  fi
11482
11483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11484
11485  path="$BOOT_JDK"
11486  has_colon=`$ECHO $path | $GREP ^.:`
11487  new_path="$path"
11488  if test "x$has_colon" = x; then
11489    # Not in mixed or Windows style, start by that.
11490    new_path=`cmd //c echo $path`
11491  fi
11492
11493
11494  input_path="$new_path"
11495  # Check if we need to convert this using DOS-style short mode. If the path
11496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11497  # take no chances and rewrite it.
11498  # Note: m4 eats our [], so we need to use [ and ] instead.
11499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11500  if test "x$has_forbidden_chars" != x; then
11501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11502    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11503  fi
11504
11505
11506  windows_path="$new_path"
11507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11508    unix_path=`$CYGPATH -u "$windows_path"`
11509    new_path="$unix_path"
11510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11512    new_path="$unix_path"
11513  fi
11514
11515  if test "x$path" != "x$new_path"; then
11516    BOOT_JDK="$new_path"
11517    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11518$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11519  fi
11520
11521  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11522  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11523
11524  else
11525    # We're on a posix platform. Hooray! :)
11526    path="$BOOT_JDK"
11527
11528    if test ! -f "$path" && test ! -d "$path"; then
11529      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
11530$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
11531   { (exit 1); exit 1; }; }
11532    fi
11533
11534    has_space=`$ECHO "$path" | $GREP " "`
11535    if test "x$has_space" != x; then
11536      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11537$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11538      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
11539$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
11540   { (exit 1); exit 1; }; }
11541    fi
11542  fi
11543
11544              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
11545$as_echo_n "checking for Boot JDK... " >&6; }
11546              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
11547$as_echo "$BOOT_JDK" >&6; }
11548              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
11549$as_echo_n "checking Boot JDK version... " >&6; }
11550              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11551              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
11552$as_echo "$BOOT_JDK_VERSION" >&6; }
11553            fi # end check jdk version
11554          fi # end check rt.jar
11555        fi # end check javac
11556      fi # end check java
11557    fi # end check boot jdk found
11558  fi
11559
11560
11561# Test: Is there a JDK installed in default, well-known locations?
11562
11563  if test "x$BOOT_JDK_FOUND" = xno; then
11564    # Now execute the test
11565
11566  if test "x$OPENJDK_TARGET_OS" = xwindows; then
11567
11568  if test "x$BOOT_JDK_FOUND" = xno; then
11569    # Now execute the test
11570
11571  if test "x$ProgramW6432" != x; then
11572    VIRTUAL_DIR="$ProgramW6432/Java"
11573
11574  windows_path="$VIRTUAL_DIR"
11575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11576    unix_path=`$CYGPATH -u "$windows_path"`
11577    VIRTUAL_DIR="$unix_path"
11578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11580    VIRTUAL_DIR="$unix_path"
11581  fi
11582
11583
11584  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
11585  BOOT_JDK_SUFFIX=""
11586  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
11587  if test "x$ALL_JDKS_FOUND" != x; then
11588    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
11589
11590  if test "x$BOOT_JDK_FOUND" = xno; then
11591    # Now execute the test
11592
11593        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
11594        if test -d "$BOOT_JDK"; then
11595          BOOT_JDK_FOUND=maybe
11596          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
11597$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
11598        fi
11599
11600
11601    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11602    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11603      # Do we have a bin/java?
11604      if test ! -x "$BOOT_JDK/bin/java"; then
11605        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11607        BOOT_JDK_FOUND=no
11608      else
11609        # Do we have a bin/javac?
11610        if test ! -x "$BOOT_JDK/bin/javac"; then
11611          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11613          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
11614$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11615          BOOT_JDK_FOUND=no
11616        else
11617          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11618          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11619            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11621            BOOT_JDK_FOUND=no
11622          else
11623            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11624            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11625
11626            # Extra M4 quote needed to protect [] in grep expression.
11627            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11628            if test "x$FOUND_VERSION_78" = x; then
11629              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11631              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
11632$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11633              BOOT_JDK_FOUND=no
11634            else
11635              # We're done! :-)
11636              BOOT_JDK_FOUND=yes
11637
11638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11639
11640  # Input might be given as Windows format, start by converting to
11641  # unix format.
11642  path="$BOOT_JDK"
11643  new_path=`$CYGPATH -u "$path"`
11644
11645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11648  # "foo.exe" is OK but "foo" is an error.
11649  #
11650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11651  # It is also a way to make sure we got the proper file name for the real test later on.
11652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11653  if test "x$test_shortpath" = x; then
11654    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11655$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11656    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
11657$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
11658   { (exit 1); exit 1; }; }
11659  fi
11660
11661  # Call helper function which possibly converts this using DOS-style short mode.
11662  # If so, the updated path is stored in $new_path.
11663
11664  input_path="$new_path"
11665  # Check if we need to convert this using DOS-style short mode. If the path
11666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11667  # take no chances and rewrite it.
11668  # Note: m4 eats our [], so we need to use [ and ] instead.
11669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11670  if test "x$has_forbidden_chars" != x; then
11671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11675      # Going to short mode and back again did indeed matter. Since short mode is
11676      # case insensitive, let's make it lowercase to improve readability.
11677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11678      # Now convert it back to Unix-stile (cygpath)
11679      input_path=`$CYGPATH -u "$shortmode_path"`
11680      new_path="$input_path"
11681    fi
11682  fi
11683
11684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11685  if test "x$test_cygdrive_prefix" = x; then
11686    # As a simple fix, exclude /usr/bin since it's not a real path.
11687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11689      # a path prefixed by /cygdrive for fixpath to work.
11690      new_path="$CYGWIN_ROOT_PATH$input_path"
11691    fi
11692  fi
11693
11694
11695  if test "x$path" != "x$new_path"; then
11696    BOOT_JDK="$new_path"
11697    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11699  fi
11700
11701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11702
11703  path="$BOOT_JDK"
11704  has_colon=`$ECHO $path | $GREP ^.:`
11705  new_path="$path"
11706  if test "x$has_colon" = x; then
11707    # Not in mixed or Windows style, start by that.
11708    new_path=`cmd //c echo $path`
11709  fi
11710
11711
11712  input_path="$new_path"
11713  # Check if we need to convert this using DOS-style short mode. If the path
11714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11715  # take no chances and rewrite it.
11716  # Note: m4 eats our [], so we need to use [ and ] instead.
11717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11718  if test "x$has_forbidden_chars" != x; then
11719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11721  fi
11722
11723
11724  windows_path="$new_path"
11725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11726    unix_path=`$CYGPATH -u "$windows_path"`
11727    new_path="$unix_path"
11728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11730    new_path="$unix_path"
11731  fi
11732
11733  if test "x$path" != "x$new_path"; then
11734    BOOT_JDK="$new_path"
11735    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11737  fi
11738
11739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11741
11742  else
11743    # We're on a posix platform. Hooray! :)
11744    path="$BOOT_JDK"
11745
11746    if test ! -f "$path" && test ! -d "$path"; then
11747      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
11748$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
11749   { (exit 1); exit 1; }; }
11750    fi
11751
11752    has_space=`$ECHO "$path" | $GREP " "`
11753    if test "x$has_space" != x; then
11754      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11756      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
11757$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
11758   { (exit 1); exit 1; }; }
11759    fi
11760  fi
11761
11762              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
11763$as_echo_n "checking for Boot JDK... " >&6; }
11764              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
11765$as_echo "$BOOT_JDK" >&6; }
11766              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
11767$as_echo_n "checking Boot JDK version... " >&6; }
11768              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11769              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
11770$as_echo "$BOOT_JDK_VERSION" >&6; }
11771            fi # end check jdk version
11772          fi # end check rt.jar
11773        fi # end check javac
11774      fi # end check java
11775    fi # end check boot jdk found
11776  fi
11777
11778    done
11779  fi
11780
11781  fi
11782
11783
11784    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11785    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11786      # Do we have a bin/java?
11787      if test ! -x "$BOOT_JDK/bin/java"; then
11788        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11790        BOOT_JDK_FOUND=no
11791      else
11792        # Do we have a bin/javac?
11793        if test ! -x "$BOOT_JDK/bin/javac"; then
11794          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11796          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
11797$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11798          BOOT_JDK_FOUND=no
11799        else
11800          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11801          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11802            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11804            BOOT_JDK_FOUND=no
11805          else
11806            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11807            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11808
11809            # Extra M4 quote needed to protect [] in grep expression.
11810            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11811            if test "x$FOUND_VERSION_78" = x; then
11812              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11814              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
11815$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11816              BOOT_JDK_FOUND=no
11817            else
11818              # We're done! :-)
11819              BOOT_JDK_FOUND=yes
11820
11821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11822
11823  # Input might be given as Windows format, start by converting to
11824  # unix format.
11825  path="$BOOT_JDK"
11826  new_path=`$CYGPATH -u "$path"`
11827
11828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11831  # "foo.exe" is OK but "foo" is an error.
11832  #
11833  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11834  # It is also a way to make sure we got the proper file name for the real test later on.
11835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11836  if test "x$test_shortpath" = x; then
11837    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11838$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11839    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
11840$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
11841   { (exit 1); exit 1; }; }
11842  fi
11843
11844  # Call helper function which possibly converts this using DOS-style short mode.
11845  # If so, the updated path is stored in $new_path.
11846
11847  input_path="$new_path"
11848  # Check if we need to convert this using DOS-style short mode. If the path
11849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11850  # take no chances and rewrite it.
11851  # Note: m4 eats our [], so we need to use [ and ] instead.
11852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11853  if test "x$has_forbidden_chars" != x; then
11854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11858      # Going to short mode and back again did indeed matter. Since short mode is
11859      # case insensitive, let's make it lowercase to improve readability.
11860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11861      # Now convert it back to Unix-stile (cygpath)
11862      input_path=`$CYGPATH -u "$shortmode_path"`
11863      new_path="$input_path"
11864    fi
11865  fi
11866
11867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11868  if test "x$test_cygdrive_prefix" = x; then
11869    # As a simple fix, exclude /usr/bin since it's not a real path.
11870    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11872      # a path prefixed by /cygdrive for fixpath to work.
11873      new_path="$CYGWIN_ROOT_PATH$input_path"
11874    fi
11875  fi
11876
11877
11878  if test "x$path" != "x$new_path"; then
11879    BOOT_JDK="$new_path"
11880    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11882  fi
11883
11884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11885
11886  path="$BOOT_JDK"
11887  has_colon=`$ECHO $path | $GREP ^.:`
11888  new_path="$path"
11889  if test "x$has_colon" = x; then
11890    # Not in mixed or Windows style, start by that.
11891    new_path=`cmd //c echo $path`
11892  fi
11893
11894
11895  input_path="$new_path"
11896  # Check if we need to convert this using DOS-style short mode. If the path
11897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11898  # take no chances and rewrite it.
11899  # Note: m4 eats our [], so we need to use [ and ] instead.
11900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11901  if test "x$has_forbidden_chars" != x; then
11902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11904  fi
11905
11906
11907  windows_path="$new_path"
11908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11909    unix_path=`$CYGPATH -u "$windows_path"`
11910    new_path="$unix_path"
11911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11913    new_path="$unix_path"
11914  fi
11915
11916  if test "x$path" != "x$new_path"; then
11917    BOOT_JDK="$new_path"
11918    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11919$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11920  fi
11921
11922  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11923  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11924
11925  else
11926    # We're on a posix platform. Hooray! :)
11927    path="$BOOT_JDK"
11928
11929    if test ! -f "$path" && test ! -d "$path"; then
11930      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
11931$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
11932   { (exit 1); exit 1; }; }
11933    fi
11934
11935    has_space=`$ECHO "$path" | $GREP " "`
11936    if test "x$has_space" != x; then
11937      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11938$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11939      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
11940$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
11941   { (exit 1); exit 1; }; }
11942    fi
11943  fi
11944
11945              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
11946$as_echo_n "checking for Boot JDK... " >&6; }
11947              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
11948$as_echo "$BOOT_JDK" >&6; }
11949              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
11950$as_echo_n "checking Boot JDK version... " >&6; }
11951              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11952              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
11953$as_echo "$BOOT_JDK_VERSION" >&6; }
11954            fi # end check jdk version
11955          fi # end check rt.jar
11956        fi # end check javac
11957      fi # end check java
11958    fi # end check boot jdk found
11959  fi
11960
11961
11962  if test "x$BOOT_JDK_FOUND" = xno; then
11963    # Now execute the test
11964
11965  if test "x$PROGRAMW6432" != x; then
11966    VIRTUAL_DIR="$PROGRAMW6432/Java"
11967
11968  windows_path="$VIRTUAL_DIR"
11969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11970    unix_path=`$CYGPATH -u "$windows_path"`
11971    VIRTUAL_DIR="$unix_path"
11972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11974    VIRTUAL_DIR="$unix_path"
11975  fi
11976
11977
11978  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
11979  BOOT_JDK_SUFFIX=""
11980  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
11981  if test "x$ALL_JDKS_FOUND" != x; then
11982    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
11983
11984  if test "x$BOOT_JDK_FOUND" = xno; then
11985    # Now execute the test
11986
11987        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
11988        if test -d "$BOOT_JDK"; then
11989          BOOT_JDK_FOUND=maybe
11990          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
11991$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
11992        fi
11993
11994
11995    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11996    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11997      # Do we have a bin/java?
11998      if test ! -x "$BOOT_JDK/bin/java"; then
11999        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12001        BOOT_JDK_FOUND=no
12002      else
12003        # Do we have a bin/javac?
12004        if test ! -x "$BOOT_JDK/bin/javac"; then
12005          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12007          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12008$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12009          BOOT_JDK_FOUND=no
12010        else
12011          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12012          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12013            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12015            BOOT_JDK_FOUND=no
12016          else
12017            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12018            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12019
12020            # Extra M4 quote needed to protect [] in grep expression.
12021            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12022            if test "x$FOUND_VERSION_78" = x; then
12023              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12025              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12026$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12027              BOOT_JDK_FOUND=no
12028            else
12029              # We're done! :-)
12030              BOOT_JDK_FOUND=yes
12031
12032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12033
12034  # Input might be given as Windows format, start by converting to
12035  # unix format.
12036  path="$BOOT_JDK"
12037  new_path=`$CYGPATH -u "$path"`
12038
12039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12042  # "foo.exe" is OK but "foo" is an error.
12043  #
12044  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12045  # It is also a way to make sure we got the proper file name for the real test later on.
12046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12047  if test "x$test_shortpath" = x; then
12048    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12049$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12050    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
12051$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
12052   { (exit 1); exit 1; }; }
12053  fi
12054
12055  # Call helper function which possibly converts this using DOS-style short mode.
12056  # If so, the updated path is stored in $new_path.
12057
12058  input_path="$new_path"
12059  # Check if we need to convert this using DOS-style short mode. If the path
12060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12061  # take no chances and rewrite it.
12062  # Note: m4 eats our [], so we need to use [ and ] instead.
12063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12064  if test "x$has_forbidden_chars" != x; then
12065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12069      # Going to short mode and back again did indeed matter. Since short mode is
12070      # case insensitive, let's make it lowercase to improve readability.
12071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12072      # Now convert it back to Unix-stile (cygpath)
12073      input_path=`$CYGPATH -u "$shortmode_path"`
12074      new_path="$input_path"
12075    fi
12076  fi
12077
12078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12079  if test "x$test_cygdrive_prefix" = x; then
12080    # As a simple fix, exclude /usr/bin since it's not a real path.
12081    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12083      # a path prefixed by /cygdrive for fixpath to work.
12084      new_path="$CYGWIN_ROOT_PATH$input_path"
12085    fi
12086  fi
12087
12088
12089  if test "x$path" != "x$new_path"; then
12090    BOOT_JDK="$new_path"
12091    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12092$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12093  fi
12094
12095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12096
12097  path="$BOOT_JDK"
12098  has_colon=`$ECHO $path | $GREP ^.:`
12099  new_path="$path"
12100  if test "x$has_colon" = x; then
12101    # Not in mixed or Windows style, start by that.
12102    new_path=`cmd //c echo $path`
12103  fi
12104
12105
12106  input_path="$new_path"
12107  # Check if we need to convert this using DOS-style short mode. If the path
12108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12109  # take no chances and rewrite it.
12110  # Note: m4 eats our [], so we need to use [ and ] instead.
12111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12112  if test "x$has_forbidden_chars" != x; then
12113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12114    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12115  fi
12116
12117
12118  windows_path="$new_path"
12119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12120    unix_path=`$CYGPATH -u "$windows_path"`
12121    new_path="$unix_path"
12122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12124    new_path="$unix_path"
12125  fi
12126
12127  if test "x$path" != "x$new_path"; then
12128    BOOT_JDK="$new_path"
12129    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12130$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12131  fi
12132
12133  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12134  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12135
12136  else
12137    # We're on a posix platform. Hooray! :)
12138    path="$BOOT_JDK"
12139
12140    if test ! -f "$path" && test ! -d "$path"; then
12141      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
12142$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
12143   { (exit 1); exit 1; }; }
12144    fi
12145
12146    has_space=`$ECHO "$path" | $GREP " "`
12147    if test "x$has_space" != x; then
12148      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12149$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12150      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
12151$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
12152   { (exit 1); exit 1; }; }
12153    fi
12154  fi
12155
12156              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
12157$as_echo_n "checking for Boot JDK... " >&6; }
12158              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
12159$as_echo "$BOOT_JDK" >&6; }
12160              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
12161$as_echo_n "checking Boot JDK version... " >&6; }
12162              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12163              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
12164$as_echo "$BOOT_JDK_VERSION" >&6; }
12165            fi # end check jdk version
12166          fi # end check rt.jar
12167        fi # end check javac
12168      fi # end check java
12169    fi # end check boot jdk found
12170  fi
12171
12172    done
12173  fi
12174
12175  fi
12176
12177
12178    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12179    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12180      # Do we have a bin/java?
12181      if test ! -x "$BOOT_JDK/bin/java"; then
12182        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12184        BOOT_JDK_FOUND=no
12185      else
12186        # Do we have a bin/javac?
12187        if test ! -x "$BOOT_JDK/bin/javac"; then
12188          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12190          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12191$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12192          BOOT_JDK_FOUND=no
12193        else
12194          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12195          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12196            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12198            BOOT_JDK_FOUND=no
12199          else
12200            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12201            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12202
12203            # Extra M4 quote needed to protect [] in grep expression.
12204            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12205            if test "x$FOUND_VERSION_78" = x; then
12206              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12208              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12209$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12210              BOOT_JDK_FOUND=no
12211            else
12212              # We're done! :-)
12213              BOOT_JDK_FOUND=yes
12214
12215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12216
12217  # Input might be given as Windows format, start by converting to
12218  # unix format.
12219  path="$BOOT_JDK"
12220  new_path=`$CYGPATH -u "$path"`
12221
12222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12225  # "foo.exe" is OK but "foo" is an error.
12226  #
12227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12228  # It is also a way to make sure we got the proper file name for the real test later on.
12229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12230  if test "x$test_shortpath" = x; then
12231    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12233    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
12234$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
12235   { (exit 1); exit 1; }; }
12236  fi
12237
12238  # Call helper function which possibly converts this using DOS-style short mode.
12239  # If so, the updated path is stored in $new_path.
12240
12241  input_path="$new_path"
12242  # Check if we need to convert this using DOS-style short mode. If the path
12243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12244  # take no chances and rewrite it.
12245  # Note: m4 eats our [], so we need to use [ and ] instead.
12246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12247  if test "x$has_forbidden_chars" != x; then
12248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12252      # Going to short mode and back again did indeed matter. Since short mode is
12253      # case insensitive, let's make it lowercase to improve readability.
12254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12255      # Now convert it back to Unix-stile (cygpath)
12256      input_path=`$CYGPATH -u "$shortmode_path"`
12257      new_path="$input_path"
12258    fi
12259  fi
12260
12261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12262  if test "x$test_cygdrive_prefix" = x; then
12263    # As a simple fix, exclude /usr/bin since it's not a real path.
12264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12266      # a path prefixed by /cygdrive for fixpath to work.
12267      new_path="$CYGWIN_ROOT_PATH$input_path"
12268    fi
12269  fi
12270
12271
12272  if test "x$path" != "x$new_path"; then
12273    BOOT_JDK="$new_path"
12274    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12275$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12276  fi
12277
12278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12279
12280  path="$BOOT_JDK"
12281  has_colon=`$ECHO $path | $GREP ^.:`
12282  new_path="$path"
12283  if test "x$has_colon" = x; then
12284    # Not in mixed or Windows style, start by that.
12285    new_path=`cmd //c echo $path`
12286  fi
12287
12288
12289  input_path="$new_path"
12290  # Check if we need to convert this using DOS-style short mode. If the path
12291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12292  # take no chances and rewrite it.
12293  # Note: m4 eats our [], so we need to use [ and ] instead.
12294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12295  if test "x$has_forbidden_chars" != x; then
12296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12298  fi
12299
12300
12301  windows_path="$new_path"
12302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12303    unix_path=`$CYGPATH -u "$windows_path"`
12304    new_path="$unix_path"
12305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12307    new_path="$unix_path"
12308  fi
12309
12310  if test "x$path" != "x$new_path"; then
12311    BOOT_JDK="$new_path"
12312    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12313$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12314  fi
12315
12316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12318
12319  else
12320    # We're on a posix platform. Hooray! :)
12321    path="$BOOT_JDK"
12322
12323    if test ! -f "$path" && test ! -d "$path"; then
12324      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
12325$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
12326   { (exit 1); exit 1; }; }
12327    fi
12328
12329    has_space=`$ECHO "$path" | $GREP " "`
12330    if test "x$has_space" != x; then
12331      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12332$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12333      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
12334$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
12335   { (exit 1); exit 1; }; }
12336    fi
12337  fi
12338
12339              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
12340$as_echo_n "checking for Boot JDK... " >&6; }
12341              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
12342$as_echo "$BOOT_JDK" >&6; }
12343              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
12344$as_echo_n "checking Boot JDK version... " >&6; }
12345              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12346              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
12347$as_echo "$BOOT_JDK_VERSION" >&6; }
12348            fi # end check jdk version
12349          fi # end check rt.jar
12350        fi # end check javac
12351      fi # end check java
12352    fi # end check boot jdk found
12353  fi
12354
12355
12356  if test "x$BOOT_JDK_FOUND" = xno; then
12357    # Now execute the test
12358
12359  if test "x$PROGRAMFILES" != x; then
12360    VIRTUAL_DIR="$PROGRAMFILES/Java"
12361
12362  windows_path="$VIRTUAL_DIR"
12363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12364    unix_path=`$CYGPATH -u "$windows_path"`
12365    VIRTUAL_DIR="$unix_path"
12366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12368    VIRTUAL_DIR="$unix_path"
12369  fi
12370
12371
12372  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12373  BOOT_JDK_SUFFIX=""
12374  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12375  if test "x$ALL_JDKS_FOUND" != x; then
12376    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12377
12378  if test "x$BOOT_JDK_FOUND" = xno; then
12379    # Now execute the test
12380
12381        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12382        if test -d "$BOOT_JDK"; then
12383          BOOT_JDK_FOUND=maybe
12384          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12385$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12386        fi
12387
12388
12389    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12390    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12391      # Do we have a bin/java?
12392      if test ! -x "$BOOT_JDK/bin/java"; then
12393        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12395        BOOT_JDK_FOUND=no
12396      else
12397        # Do we have a bin/javac?
12398        if test ! -x "$BOOT_JDK/bin/javac"; then
12399          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12400$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12401          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12402$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12403          BOOT_JDK_FOUND=no
12404        else
12405          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12406          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12407            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12409            BOOT_JDK_FOUND=no
12410          else
12411            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12412            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12413
12414            # Extra M4 quote needed to protect [] in grep expression.
12415            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12416            if test "x$FOUND_VERSION_78" = x; then
12417              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12419              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12420$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12421              BOOT_JDK_FOUND=no
12422            else
12423              # We're done! :-)
12424              BOOT_JDK_FOUND=yes
12425
12426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12427
12428  # Input might be given as Windows format, start by converting to
12429  # unix format.
12430  path="$BOOT_JDK"
12431  new_path=`$CYGPATH -u "$path"`
12432
12433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12436  # "foo.exe" is OK but "foo" is an error.
12437  #
12438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12439  # It is also a way to make sure we got the proper file name for the real test later on.
12440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12441  if test "x$test_shortpath" = x; then
12442    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12443$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12444    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
12445$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
12446   { (exit 1); exit 1; }; }
12447  fi
12448
12449  # Call helper function which possibly converts this using DOS-style short mode.
12450  # If so, the updated path is stored in $new_path.
12451
12452  input_path="$new_path"
12453  # Check if we need to convert this using DOS-style short mode. If the path
12454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12455  # take no chances and rewrite it.
12456  # Note: m4 eats our [], so we need to use [ and ] instead.
12457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12458  if test "x$has_forbidden_chars" != x; then
12459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12463      # Going to short mode and back again did indeed matter. Since short mode is
12464      # case insensitive, let's make it lowercase to improve readability.
12465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12466      # Now convert it back to Unix-stile (cygpath)
12467      input_path=`$CYGPATH -u "$shortmode_path"`
12468      new_path="$input_path"
12469    fi
12470  fi
12471
12472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12473  if test "x$test_cygdrive_prefix" = x; then
12474    # As a simple fix, exclude /usr/bin since it's not a real path.
12475    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12477      # a path prefixed by /cygdrive for fixpath to work.
12478      new_path="$CYGWIN_ROOT_PATH$input_path"
12479    fi
12480  fi
12481
12482
12483  if test "x$path" != "x$new_path"; then
12484    BOOT_JDK="$new_path"
12485    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12486$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12487  fi
12488
12489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12490
12491  path="$BOOT_JDK"
12492  has_colon=`$ECHO $path | $GREP ^.:`
12493  new_path="$path"
12494  if test "x$has_colon" = x; then
12495    # Not in mixed or Windows style, start by that.
12496    new_path=`cmd //c echo $path`
12497  fi
12498
12499
12500  input_path="$new_path"
12501  # Check if we need to convert this using DOS-style short mode. If the path
12502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12503  # take no chances and rewrite it.
12504  # Note: m4 eats our [], so we need to use [ and ] instead.
12505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12506  if test "x$has_forbidden_chars" != x; then
12507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12509  fi
12510
12511
12512  windows_path="$new_path"
12513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12514    unix_path=`$CYGPATH -u "$windows_path"`
12515    new_path="$unix_path"
12516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12518    new_path="$unix_path"
12519  fi
12520
12521  if test "x$path" != "x$new_path"; then
12522    BOOT_JDK="$new_path"
12523    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12524$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12525  fi
12526
12527  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12528  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12529
12530  else
12531    # We're on a posix platform. Hooray! :)
12532    path="$BOOT_JDK"
12533
12534    if test ! -f "$path" && test ! -d "$path"; then
12535      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
12536$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
12537   { (exit 1); exit 1; }; }
12538    fi
12539
12540    has_space=`$ECHO "$path" | $GREP " "`
12541    if test "x$has_space" != x; then
12542      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12543$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12544      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
12545$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
12546   { (exit 1); exit 1; }; }
12547    fi
12548  fi
12549
12550              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
12551$as_echo_n "checking for Boot JDK... " >&6; }
12552              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
12553$as_echo "$BOOT_JDK" >&6; }
12554              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
12555$as_echo_n "checking Boot JDK version... " >&6; }
12556              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12557              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
12558$as_echo "$BOOT_JDK_VERSION" >&6; }
12559            fi # end check jdk version
12560          fi # end check rt.jar
12561        fi # end check javac
12562      fi # end check java
12563    fi # end check boot jdk found
12564  fi
12565
12566    done
12567  fi
12568
12569  fi
12570
12571
12572    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12573    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12574      # Do we have a bin/java?
12575      if test ! -x "$BOOT_JDK/bin/java"; then
12576        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12578        BOOT_JDK_FOUND=no
12579      else
12580        # Do we have a bin/javac?
12581        if test ! -x "$BOOT_JDK/bin/javac"; then
12582          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12583$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12584          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12585$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12586          BOOT_JDK_FOUND=no
12587        else
12588          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12589          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12590            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12592            BOOT_JDK_FOUND=no
12593          else
12594            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12595            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12596
12597            # Extra M4 quote needed to protect [] in grep expression.
12598            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12599            if test "x$FOUND_VERSION_78" = x; then
12600              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12602              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12603$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12604              BOOT_JDK_FOUND=no
12605            else
12606              # We're done! :-)
12607              BOOT_JDK_FOUND=yes
12608
12609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12610
12611  # Input might be given as Windows format, start by converting to
12612  # unix format.
12613  path="$BOOT_JDK"
12614  new_path=`$CYGPATH -u "$path"`
12615
12616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12619  # "foo.exe" is OK but "foo" is an error.
12620  #
12621  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12622  # It is also a way to make sure we got the proper file name for the real test later on.
12623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12624  if test "x$test_shortpath" = x; then
12625    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12626$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12627    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
12628$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
12629   { (exit 1); exit 1; }; }
12630  fi
12631
12632  # Call helper function which possibly converts this using DOS-style short mode.
12633  # If so, the updated path is stored in $new_path.
12634
12635  input_path="$new_path"
12636  # Check if we need to convert this using DOS-style short mode. If the path
12637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12638  # take no chances and rewrite it.
12639  # Note: m4 eats our [], so we need to use [ and ] instead.
12640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12641  if test "x$has_forbidden_chars" != x; then
12642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12646      # Going to short mode and back again did indeed matter. Since short mode is
12647      # case insensitive, let's make it lowercase to improve readability.
12648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12649      # Now convert it back to Unix-stile (cygpath)
12650      input_path=`$CYGPATH -u "$shortmode_path"`
12651      new_path="$input_path"
12652    fi
12653  fi
12654
12655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12656  if test "x$test_cygdrive_prefix" = x; then
12657    # As a simple fix, exclude /usr/bin since it's not a real path.
12658    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12660      # a path prefixed by /cygdrive for fixpath to work.
12661      new_path="$CYGWIN_ROOT_PATH$input_path"
12662    fi
12663  fi
12664
12665
12666  if test "x$path" != "x$new_path"; then
12667    BOOT_JDK="$new_path"
12668    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12669$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12670  fi
12671
12672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12673
12674  path="$BOOT_JDK"
12675  has_colon=`$ECHO $path | $GREP ^.:`
12676  new_path="$path"
12677  if test "x$has_colon" = x; then
12678    # Not in mixed or Windows style, start by that.
12679    new_path=`cmd //c echo $path`
12680  fi
12681
12682
12683  input_path="$new_path"
12684  # Check if we need to convert this using DOS-style short mode. If the path
12685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12686  # take no chances and rewrite it.
12687  # Note: m4 eats our [], so we need to use [ and ] instead.
12688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12689  if test "x$has_forbidden_chars" != x; then
12690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12692  fi
12693
12694
12695  windows_path="$new_path"
12696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12697    unix_path=`$CYGPATH -u "$windows_path"`
12698    new_path="$unix_path"
12699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12701    new_path="$unix_path"
12702  fi
12703
12704  if test "x$path" != "x$new_path"; then
12705    BOOT_JDK="$new_path"
12706    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12708  fi
12709
12710  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12711  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12712
12713  else
12714    # We're on a posix platform. Hooray! :)
12715    path="$BOOT_JDK"
12716
12717    if test ! -f "$path" && test ! -d "$path"; then
12718      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
12719$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
12720   { (exit 1); exit 1; }; }
12721    fi
12722
12723    has_space=`$ECHO "$path" | $GREP " "`
12724    if test "x$has_space" != x; then
12725      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12726$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12727      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
12728$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
12729   { (exit 1); exit 1; }; }
12730    fi
12731  fi
12732
12733              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
12734$as_echo_n "checking for Boot JDK... " >&6; }
12735              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
12736$as_echo "$BOOT_JDK" >&6; }
12737              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
12738$as_echo_n "checking Boot JDK version... " >&6; }
12739              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12740              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
12741$as_echo "$BOOT_JDK_VERSION" >&6; }
12742            fi # end check jdk version
12743          fi # end check rt.jar
12744        fi # end check javac
12745      fi # end check java
12746    fi # end check boot jdk found
12747  fi
12748
12749
12750  if test "x$BOOT_JDK_FOUND" = xno; then
12751    # Now execute the test
12752
12753  if test "x$ProgramFiles" != x; then
12754    VIRTUAL_DIR="$ProgramFiles/Java"
12755
12756  windows_path="$VIRTUAL_DIR"
12757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12758    unix_path=`$CYGPATH -u "$windows_path"`
12759    VIRTUAL_DIR="$unix_path"
12760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12762    VIRTUAL_DIR="$unix_path"
12763  fi
12764
12765
12766  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12767  BOOT_JDK_SUFFIX=""
12768  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12769  if test "x$ALL_JDKS_FOUND" != x; then
12770    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12771
12772  if test "x$BOOT_JDK_FOUND" = xno; then
12773    # Now execute the test
12774
12775        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12776        if test -d "$BOOT_JDK"; then
12777          BOOT_JDK_FOUND=maybe
12778          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12779$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12780        fi
12781
12782
12783    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12784    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12785      # Do we have a bin/java?
12786      if test ! -x "$BOOT_JDK/bin/java"; then
12787        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12789        BOOT_JDK_FOUND=no
12790      else
12791        # Do we have a bin/javac?
12792        if test ! -x "$BOOT_JDK/bin/javac"; then
12793          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12795          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12796$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12797          BOOT_JDK_FOUND=no
12798        else
12799          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12800          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12801            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12803            BOOT_JDK_FOUND=no
12804          else
12805            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12806            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12807
12808            # Extra M4 quote needed to protect [] in grep expression.
12809            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12810            if test "x$FOUND_VERSION_78" = x; then
12811              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12813              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12814$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12815              BOOT_JDK_FOUND=no
12816            else
12817              # We're done! :-)
12818              BOOT_JDK_FOUND=yes
12819
12820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12821
12822  # Input might be given as Windows format, start by converting to
12823  # unix format.
12824  path="$BOOT_JDK"
12825  new_path=`$CYGPATH -u "$path"`
12826
12827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12830  # "foo.exe" is OK but "foo" is an error.
12831  #
12832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12833  # It is also a way to make sure we got the proper file name for the real test later on.
12834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12835  if test "x$test_shortpath" = x; then
12836    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12838    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
12839$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
12840   { (exit 1); exit 1; }; }
12841  fi
12842
12843  # Call helper function which possibly converts this using DOS-style short mode.
12844  # If so, the updated path is stored in $new_path.
12845
12846  input_path="$new_path"
12847  # Check if we need to convert this using DOS-style short mode. If the path
12848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12849  # take no chances and rewrite it.
12850  # Note: m4 eats our [], so we need to use [ and ] instead.
12851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12852  if test "x$has_forbidden_chars" != x; then
12853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12857      # Going to short mode and back again did indeed matter. Since short mode is
12858      # case insensitive, let's make it lowercase to improve readability.
12859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12860      # Now convert it back to Unix-stile (cygpath)
12861      input_path=`$CYGPATH -u "$shortmode_path"`
12862      new_path="$input_path"
12863    fi
12864  fi
12865
12866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12867  if test "x$test_cygdrive_prefix" = x; then
12868    # As a simple fix, exclude /usr/bin since it's not a real path.
12869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12871      # a path prefixed by /cygdrive for fixpath to work.
12872      new_path="$CYGWIN_ROOT_PATH$input_path"
12873    fi
12874  fi
12875
12876
12877  if test "x$path" != "x$new_path"; then
12878    BOOT_JDK="$new_path"
12879    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12880$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12881  fi
12882
12883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12884
12885  path="$BOOT_JDK"
12886  has_colon=`$ECHO $path | $GREP ^.:`
12887  new_path="$path"
12888  if test "x$has_colon" = x; then
12889    # Not in mixed or Windows style, start by that.
12890    new_path=`cmd //c echo $path`
12891  fi
12892
12893
12894  input_path="$new_path"
12895  # Check if we need to convert this using DOS-style short mode. If the path
12896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12897  # take no chances and rewrite it.
12898  # Note: m4 eats our [], so we need to use [ and ] instead.
12899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12900  if test "x$has_forbidden_chars" != x; then
12901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12903  fi
12904
12905
12906  windows_path="$new_path"
12907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12908    unix_path=`$CYGPATH -u "$windows_path"`
12909    new_path="$unix_path"
12910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12912    new_path="$unix_path"
12913  fi
12914
12915  if test "x$path" != "x$new_path"; then
12916    BOOT_JDK="$new_path"
12917    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12918$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12919  fi
12920
12921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12923
12924  else
12925    # We're on a posix platform. Hooray! :)
12926    path="$BOOT_JDK"
12927
12928    if test ! -f "$path" && test ! -d "$path"; then
12929      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
12930$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
12931   { (exit 1); exit 1; }; }
12932    fi
12933
12934    has_space=`$ECHO "$path" | $GREP " "`
12935    if test "x$has_space" != x; then
12936      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12937$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12938      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
12939$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
12940   { (exit 1); exit 1; }; }
12941    fi
12942  fi
12943
12944              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
12945$as_echo_n "checking for Boot JDK... " >&6; }
12946              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
12947$as_echo "$BOOT_JDK" >&6; }
12948              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
12949$as_echo_n "checking Boot JDK version... " >&6; }
12950              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12951              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
12952$as_echo "$BOOT_JDK_VERSION" >&6; }
12953            fi # end check jdk version
12954          fi # end check rt.jar
12955        fi # end check javac
12956      fi # end check java
12957    fi # end check boot jdk found
12958  fi
12959
12960    done
12961  fi
12962
12963  fi
12964
12965
12966    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12967    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12968      # Do we have a bin/java?
12969      if test ! -x "$BOOT_JDK/bin/java"; then
12970        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12972        BOOT_JDK_FOUND=no
12973      else
12974        # Do we have a bin/javac?
12975        if test ! -x "$BOOT_JDK/bin/javac"; then
12976          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12978          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12979$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12980          BOOT_JDK_FOUND=no
12981        else
12982          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12983          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12984            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12986            BOOT_JDK_FOUND=no
12987          else
12988            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12989            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12990
12991            # Extra M4 quote needed to protect [] in grep expression.
12992            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12993            if test "x$FOUND_VERSION_78" = x; then
12994              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12996              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12997$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12998              BOOT_JDK_FOUND=no
12999            else
13000              # We're done! :-)
13001              BOOT_JDK_FOUND=yes
13002
13003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13004
13005  # Input might be given as Windows format, start by converting to
13006  # unix format.
13007  path="$BOOT_JDK"
13008  new_path=`$CYGPATH -u "$path"`
13009
13010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13013  # "foo.exe" is OK but "foo" is an error.
13014  #
13015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13016  # It is also a way to make sure we got the proper file name for the real test later on.
13017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13018  if test "x$test_shortpath" = x; then
13019    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13020$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13021    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13022$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13023   { (exit 1); exit 1; }; }
13024  fi
13025
13026  # Call helper function which possibly converts this using DOS-style short mode.
13027  # If so, the updated path is stored in $new_path.
13028
13029  input_path="$new_path"
13030  # Check if we need to convert this using DOS-style short mode. If the path
13031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13032  # take no chances and rewrite it.
13033  # Note: m4 eats our [], so we need to use [ and ] instead.
13034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13035  if test "x$has_forbidden_chars" != x; then
13036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13040      # Going to short mode and back again did indeed matter. Since short mode is
13041      # case insensitive, let's make it lowercase to improve readability.
13042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13043      # Now convert it back to Unix-stile (cygpath)
13044      input_path=`$CYGPATH -u "$shortmode_path"`
13045      new_path="$input_path"
13046    fi
13047  fi
13048
13049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13050  if test "x$test_cygdrive_prefix" = x; then
13051    # As a simple fix, exclude /usr/bin since it's not a real path.
13052    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13054      # a path prefixed by /cygdrive for fixpath to work.
13055      new_path="$CYGWIN_ROOT_PATH$input_path"
13056    fi
13057  fi
13058
13059
13060  if test "x$path" != "x$new_path"; then
13061    BOOT_JDK="$new_path"
13062    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13063$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13064  fi
13065
13066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13067
13068  path="$BOOT_JDK"
13069  has_colon=`$ECHO $path | $GREP ^.:`
13070  new_path="$path"
13071  if test "x$has_colon" = x; then
13072    # Not in mixed or Windows style, start by that.
13073    new_path=`cmd //c echo $path`
13074  fi
13075
13076
13077  input_path="$new_path"
13078  # Check if we need to convert this using DOS-style short mode. If the path
13079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13080  # take no chances and rewrite it.
13081  # Note: m4 eats our [], so we need to use [ and ] instead.
13082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13083  if test "x$has_forbidden_chars" != x; then
13084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13086  fi
13087
13088
13089  windows_path="$new_path"
13090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13091    unix_path=`$CYGPATH -u "$windows_path"`
13092    new_path="$unix_path"
13093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13095    new_path="$unix_path"
13096  fi
13097
13098  if test "x$path" != "x$new_path"; then
13099    BOOT_JDK="$new_path"
13100    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13101$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13102  fi
13103
13104  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13105  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13106
13107  else
13108    # We're on a posix platform. Hooray! :)
13109    path="$BOOT_JDK"
13110
13111    if test ! -f "$path" && test ! -d "$path"; then
13112      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
13113$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
13114   { (exit 1); exit 1; }; }
13115    fi
13116
13117    has_space=`$ECHO "$path" | $GREP " "`
13118    if test "x$has_space" != x; then
13119      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13121      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
13122$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
13123   { (exit 1); exit 1; }; }
13124    fi
13125  fi
13126
13127              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
13128$as_echo_n "checking for Boot JDK... " >&6; }
13129              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
13130$as_echo "$BOOT_JDK" >&6; }
13131              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
13132$as_echo_n "checking Boot JDK version... " >&6; }
13133              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13134              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13135$as_echo "$BOOT_JDK_VERSION" >&6; }
13136            fi # end check jdk version
13137          fi # end check rt.jar
13138        fi # end check javac
13139      fi # end check java
13140    fi # end check boot jdk found
13141  fi
13142
13143
13144  if test "x$BOOT_JDK_FOUND" = xno; then
13145    # Now execute the test
13146
13147  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13148  BOOT_JDK_SUFFIX=""
13149  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13150  if test "x$ALL_JDKS_FOUND" != x; then
13151    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13152
13153  if test "x$BOOT_JDK_FOUND" = xno; then
13154    # Now execute the test
13155
13156        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13157        if test -d "$BOOT_JDK"; then
13158          BOOT_JDK_FOUND=maybe
13159          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13160$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13161        fi
13162
13163
13164    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13165    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13166      # Do we have a bin/java?
13167      if test ! -x "$BOOT_JDK/bin/java"; then
13168        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13170        BOOT_JDK_FOUND=no
13171      else
13172        # Do we have a bin/javac?
13173        if test ! -x "$BOOT_JDK/bin/javac"; then
13174          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13176          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13177$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13178          BOOT_JDK_FOUND=no
13179        else
13180          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13181          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13182            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13184            BOOT_JDK_FOUND=no
13185          else
13186            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13187            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13188
13189            # Extra M4 quote needed to protect [] in grep expression.
13190            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13191            if test "x$FOUND_VERSION_78" = x; then
13192              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13194              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
13195$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13196              BOOT_JDK_FOUND=no
13197            else
13198              # We're done! :-)
13199              BOOT_JDK_FOUND=yes
13200
13201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13202
13203  # Input might be given as Windows format, start by converting to
13204  # unix format.
13205  path="$BOOT_JDK"
13206  new_path=`$CYGPATH -u "$path"`
13207
13208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13211  # "foo.exe" is OK but "foo" is an error.
13212  #
13213  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13214  # It is also a way to make sure we got the proper file name for the real test later on.
13215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13216  if test "x$test_shortpath" = x; then
13217    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13218$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13219    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13220$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13221   { (exit 1); exit 1; }; }
13222  fi
13223
13224  # Call helper function which possibly converts this using DOS-style short mode.
13225  # If so, the updated path is stored in $new_path.
13226
13227  input_path="$new_path"
13228  # Check if we need to convert this using DOS-style short mode. If the path
13229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13230  # take no chances and rewrite it.
13231  # Note: m4 eats our [], so we need to use [ and ] instead.
13232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13233  if test "x$has_forbidden_chars" != x; then
13234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13238      # Going to short mode and back again did indeed matter. Since short mode is
13239      # case insensitive, let's make it lowercase to improve readability.
13240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13241      # Now convert it back to Unix-stile (cygpath)
13242      input_path=`$CYGPATH -u "$shortmode_path"`
13243      new_path="$input_path"
13244    fi
13245  fi
13246
13247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13248  if test "x$test_cygdrive_prefix" = x; then
13249    # As a simple fix, exclude /usr/bin since it's not a real path.
13250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13252      # a path prefixed by /cygdrive for fixpath to work.
13253      new_path="$CYGWIN_ROOT_PATH$input_path"
13254    fi
13255  fi
13256
13257
13258  if test "x$path" != "x$new_path"; then
13259    BOOT_JDK="$new_path"
13260    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13261$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13262  fi
13263
13264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13265
13266  path="$BOOT_JDK"
13267  has_colon=`$ECHO $path | $GREP ^.:`
13268  new_path="$path"
13269  if test "x$has_colon" = x; then
13270    # Not in mixed or Windows style, start by that.
13271    new_path=`cmd //c echo $path`
13272  fi
13273
13274
13275  input_path="$new_path"
13276  # Check if we need to convert this using DOS-style short mode. If the path
13277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13278  # take no chances and rewrite it.
13279  # Note: m4 eats our [], so we need to use [ and ] instead.
13280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13281  if test "x$has_forbidden_chars" != x; then
13282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13284  fi
13285
13286
13287  windows_path="$new_path"
13288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13289    unix_path=`$CYGPATH -u "$windows_path"`
13290    new_path="$unix_path"
13291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13293    new_path="$unix_path"
13294  fi
13295
13296  if test "x$path" != "x$new_path"; then
13297    BOOT_JDK="$new_path"
13298    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13299$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13300  fi
13301
13302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13304
13305  else
13306    # We're on a posix platform. Hooray! :)
13307    path="$BOOT_JDK"
13308
13309    if test ! -f "$path" && test ! -d "$path"; then
13310      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
13311$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
13312   { (exit 1); exit 1; }; }
13313    fi
13314
13315    has_space=`$ECHO "$path" | $GREP " "`
13316    if test "x$has_space" != x; then
13317      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13318$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13319      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
13320$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
13321   { (exit 1); exit 1; }; }
13322    fi
13323  fi
13324
13325              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
13326$as_echo_n "checking for Boot JDK... " >&6; }
13327              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
13328$as_echo "$BOOT_JDK" >&6; }
13329              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
13330$as_echo_n "checking Boot JDK version... " >&6; }
13331              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13332              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13333$as_echo "$BOOT_JDK_VERSION" >&6; }
13334            fi # end check jdk version
13335          fi # end check rt.jar
13336        fi # end check javac
13337      fi # end check java
13338    fi # end check boot jdk found
13339  fi
13340
13341    done
13342  fi
13343
13344
13345    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13346    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13347      # Do we have a bin/java?
13348      if test ! -x "$BOOT_JDK/bin/java"; then
13349        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13351        BOOT_JDK_FOUND=no
13352      else
13353        # Do we have a bin/javac?
13354        if test ! -x "$BOOT_JDK/bin/javac"; then
13355          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13357          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13358$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13359          BOOT_JDK_FOUND=no
13360        else
13361          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13362          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13363            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13365            BOOT_JDK_FOUND=no
13366          else
13367            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13368            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13369
13370            # Extra M4 quote needed to protect [] in grep expression.
13371            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13372            if test "x$FOUND_VERSION_78" = x; then
13373              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13375              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
13376$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13377              BOOT_JDK_FOUND=no
13378            else
13379              # We're done! :-)
13380              BOOT_JDK_FOUND=yes
13381
13382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13383
13384  # Input might be given as Windows format, start by converting to
13385  # unix format.
13386  path="$BOOT_JDK"
13387  new_path=`$CYGPATH -u "$path"`
13388
13389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13392  # "foo.exe" is OK but "foo" is an error.
13393  #
13394  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13395  # It is also a way to make sure we got the proper file name for the real test later on.
13396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13397  if test "x$test_shortpath" = x; then
13398    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13399$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13400    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13401$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13402   { (exit 1); exit 1; }; }
13403  fi
13404
13405  # Call helper function which possibly converts this using DOS-style short mode.
13406  # If so, the updated path is stored in $new_path.
13407
13408  input_path="$new_path"
13409  # Check if we need to convert this using DOS-style short mode. If the path
13410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13411  # take no chances and rewrite it.
13412  # Note: m4 eats our [], so we need to use [ and ] instead.
13413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13414  if test "x$has_forbidden_chars" != x; then
13415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13419      # Going to short mode and back again did indeed matter. Since short mode is
13420      # case insensitive, let's make it lowercase to improve readability.
13421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13422      # Now convert it back to Unix-stile (cygpath)
13423      input_path=`$CYGPATH -u "$shortmode_path"`
13424      new_path="$input_path"
13425    fi
13426  fi
13427
13428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13429  if test "x$test_cygdrive_prefix" = x; then
13430    # As a simple fix, exclude /usr/bin since it's not a real path.
13431    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13433      # a path prefixed by /cygdrive for fixpath to work.
13434      new_path="$CYGWIN_ROOT_PATH$input_path"
13435    fi
13436  fi
13437
13438
13439  if test "x$path" != "x$new_path"; then
13440    BOOT_JDK="$new_path"
13441    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13442$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13443  fi
13444
13445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13446
13447  path="$BOOT_JDK"
13448  has_colon=`$ECHO $path | $GREP ^.:`
13449  new_path="$path"
13450  if test "x$has_colon" = x; then
13451    # Not in mixed or Windows style, start by that.
13452    new_path=`cmd //c echo $path`
13453  fi
13454
13455
13456  input_path="$new_path"
13457  # Check if we need to convert this using DOS-style short mode. If the path
13458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13459  # take no chances and rewrite it.
13460  # Note: m4 eats our [], so we need to use [ and ] instead.
13461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13462  if test "x$has_forbidden_chars" != x; then
13463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13465  fi
13466
13467
13468  windows_path="$new_path"
13469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13470    unix_path=`$CYGPATH -u "$windows_path"`
13471    new_path="$unix_path"
13472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13474    new_path="$unix_path"
13475  fi
13476
13477  if test "x$path" != "x$new_path"; then
13478    BOOT_JDK="$new_path"
13479    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13480$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13481  fi
13482
13483  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13484  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13485
13486  else
13487    # We're on a posix platform. Hooray! :)
13488    path="$BOOT_JDK"
13489
13490    if test ! -f "$path" && test ! -d "$path"; then
13491      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
13492$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
13493   { (exit 1); exit 1; }; }
13494    fi
13495
13496    has_space=`$ECHO "$path" | $GREP " "`
13497    if test "x$has_space" != x; then
13498      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13499$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13500      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
13501$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
13502   { (exit 1); exit 1; }; }
13503    fi
13504  fi
13505
13506              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
13507$as_echo_n "checking for Boot JDK... " >&6; }
13508              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
13509$as_echo "$BOOT_JDK" >&6; }
13510              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
13511$as_echo_n "checking Boot JDK version... " >&6; }
13512              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13513              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13514$as_echo "$BOOT_JDK_VERSION" >&6; }
13515            fi # end check jdk version
13516          fi # end check rt.jar
13517        fi # end check javac
13518      fi # end check java
13519    fi # end check boot jdk found
13520  fi
13521
13522  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
13523
13524  if test "x$BOOT_JDK_FOUND" = xno; then
13525    # Now execute the test
13526
13527  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
13528  BOOT_JDK_SUFFIX="/Contents/Home"
13529  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13530  if test "x$ALL_JDKS_FOUND" != x; then
13531    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13532
13533  if test "x$BOOT_JDK_FOUND" = xno; then
13534    # Now execute the test
13535
13536        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13537        if test -d "$BOOT_JDK"; then
13538          BOOT_JDK_FOUND=maybe
13539          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13540$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13541        fi
13542
13543
13544    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13545    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13546      # Do we have a bin/java?
13547      if test ! -x "$BOOT_JDK/bin/java"; then
13548        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13549$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13550        BOOT_JDK_FOUND=no
13551      else
13552        # Do we have a bin/javac?
13553        if test ! -x "$BOOT_JDK/bin/javac"; then
13554          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13556          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13557$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13558          BOOT_JDK_FOUND=no
13559        else
13560          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13561          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13562            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13564            BOOT_JDK_FOUND=no
13565          else
13566            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13567            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13568
13569            # Extra M4 quote needed to protect [] in grep expression.
13570            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13571            if test "x$FOUND_VERSION_78" = x; then
13572              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13574              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
13575$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13576              BOOT_JDK_FOUND=no
13577            else
13578              # We're done! :-)
13579              BOOT_JDK_FOUND=yes
13580
13581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13582
13583  # Input might be given as Windows format, start by converting to
13584  # unix format.
13585  path="$BOOT_JDK"
13586  new_path=`$CYGPATH -u "$path"`
13587
13588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13591  # "foo.exe" is OK but "foo" is an error.
13592  #
13593  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13594  # It is also a way to make sure we got the proper file name for the real test later on.
13595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13596  if test "x$test_shortpath" = x; then
13597    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13598$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13599    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13600$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13601   { (exit 1); exit 1; }; }
13602  fi
13603
13604  # Call helper function which possibly converts this using DOS-style short mode.
13605  # If so, the updated path is stored in $new_path.
13606
13607  input_path="$new_path"
13608  # Check if we need to convert this using DOS-style short mode. If the path
13609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13610  # take no chances and rewrite it.
13611  # Note: m4 eats our [], so we need to use [ and ] instead.
13612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13613  if test "x$has_forbidden_chars" != x; then
13614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13618      # Going to short mode and back again did indeed matter. Since short mode is
13619      # case insensitive, let's make it lowercase to improve readability.
13620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13621      # Now convert it back to Unix-stile (cygpath)
13622      input_path=`$CYGPATH -u "$shortmode_path"`
13623      new_path="$input_path"
13624    fi
13625  fi
13626
13627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13628  if test "x$test_cygdrive_prefix" = x; then
13629    # As a simple fix, exclude /usr/bin since it's not a real path.
13630    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13632      # a path prefixed by /cygdrive for fixpath to work.
13633      new_path="$CYGWIN_ROOT_PATH$input_path"
13634    fi
13635  fi
13636
13637
13638  if test "x$path" != "x$new_path"; then
13639    BOOT_JDK="$new_path"
13640    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13641$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13642  fi
13643
13644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13645
13646  path="$BOOT_JDK"
13647  has_colon=`$ECHO $path | $GREP ^.:`
13648  new_path="$path"
13649  if test "x$has_colon" = x; then
13650    # Not in mixed or Windows style, start by that.
13651    new_path=`cmd //c echo $path`
13652  fi
13653
13654
13655  input_path="$new_path"
13656  # Check if we need to convert this using DOS-style short mode. If the path
13657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13658  # take no chances and rewrite it.
13659  # Note: m4 eats our [], so we need to use [ and ] instead.
13660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13661  if test "x$has_forbidden_chars" != x; then
13662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13664  fi
13665
13666
13667  windows_path="$new_path"
13668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13669    unix_path=`$CYGPATH -u "$windows_path"`
13670    new_path="$unix_path"
13671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13673    new_path="$unix_path"
13674  fi
13675
13676  if test "x$path" != "x$new_path"; then
13677    BOOT_JDK="$new_path"
13678    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13679$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13680  fi
13681
13682  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13683  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13684
13685  else
13686    # We're on a posix platform. Hooray! :)
13687    path="$BOOT_JDK"
13688
13689    if test ! -f "$path" && test ! -d "$path"; then
13690      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
13691$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
13692   { (exit 1); exit 1; }; }
13693    fi
13694
13695    has_space=`$ECHO "$path" | $GREP " "`
13696    if test "x$has_space" != x; then
13697      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13699      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
13700$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
13701   { (exit 1); exit 1; }; }
13702    fi
13703  fi
13704
13705              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
13706$as_echo_n "checking for Boot JDK... " >&6; }
13707              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
13708$as_echo "$BOOT_JDK" >&6; }
13709              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
13710$as_echo_n "checking Boot JDK version... " >&6; }
13711              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13712              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13713$as_echo "$BOOT_JDK_VERSION" >&6; }
13714            fi # end check jdk version
13715          fi # end check rt.jar
13716        fi # end check javac
13717      fi # end check java
13718    fi # end check boot jdk found
13719  fi
13720
13721    done
13722  fi
13723
13724
13725    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13726    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13727      # Do we have a bin/java?
13728      if test ! -x "$BOOT_JDK/bin/java"; then
13729        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13731        BOOT_JDK_FOUND=no
13732      else
13733        # Do we have a bin/javac?
13734        if test ! -x "$BOOT_JDK/bin/javac"; then
13735          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13736$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13737          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13738$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13739          BOOT_JDK_FOUND=no
13740        else
13741          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13742          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13743            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13745            BOOT_JDK_FOUND=no
13746          else
13747            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13748            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13749
13750            # Extra M4 quote needed to protect [] in grep expression.
13751            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13752            if test "x$FOUND_VERSION_78" = x; then
13753              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13754$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13755              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
13756$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13757              BOOT_JDK_FOUND=no
13758            else
13759              # We're done! :-)
13760              BOOT_JDK_FOUND=yes
13761
13762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13763
13764  # Input might be given as Windows format, start by converting to
13765  # unix format.
13766  path="$BOOT_JDK"
13767  new_path=`$CYGPATH -u "$path"`
13768
13769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13772  # "foo.exe" is OK but "foo" is an error.
13773  #
13774  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13775  # It is also a way to make sure we got the proper file name for the real test later on.
13776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13777  if test "x$test_shortpath" = x; then
13778    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13779$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13780    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13781$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13782   { (exit 1); exit 1; }; }
13783  fi
13784
13785  # Call helper function which possibly converts this using DOS-style short mode.
13786  # If so, the updated path is stored in $new_path.
13787
13788  input_path="$new_path"
13789  # Check if we need to convert this using DOS-style short mode. If the path
13790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13791  # take no chances and rewrite it.
13792  # Note: m4 eats our [], so we need to use [ and ] instead.
13793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13794  if test "x$has_forbidden_chars" != x; then
13795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13799      # Going to short mode and back again did indeed matter. Since short mode is
13800      # case insensitive, let's make it lowercase to improve readability.
13801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13802      # Now convert it back to Unix-stile (cygpath)
13803      input_path=`$CYGPATH -u "$shortmode_path"`
13804      new_path="$input_path"
13805    fi
13806  fi
13807
13808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13809  if test "x$test_cygdrive_prefix" = x; then
13810    # As a simple fix, exclude /usr/bin since it's not a real path.
13811    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13813      # a path prefixed by /cygdrive for fixpath to work.
13814      new_path="$CYGWIN_ROOT_PATH$input_path"
13815    fi
13816  fi
13817
13818
13819  if test "x$path" != "x$new_path"; then
13820    BOOT_JDK="$new_path"
13821    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13822$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13823  fi
13824
13825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13826
13827  path="$BOOT_JDK"
13828  has_colon=`$ECHO $path | $GREP ^.:`
13829  new_path="$path"
13830  if test "x$has_colon" = x; then
13831    # Not in mixed or Windows style, start by that.
13832    new_path=`cmd //c echo $path`
13833  fi
13834
13835
13836  input_path="$new_path"
13837  # Check if we need to convert this using DOS-style short mode. If the path
13838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13839  # take no chances and rewrite it.
13840  # Note: m4 eats our [], so we need to use [ and ] instead.
13841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13842  if test "x$has_forbidden_chars" != x; then
13843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13844    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13845  fi
13846
13847
13848  windows_path="$new_path"
13849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13850    unix_path=`$CYGPATH -u "$windows_path"`
13851    new_path="$unix_path"
13852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13854    new_path="$unix_path"
13855  fi
13856
13857  if test "x$path" != "x$new_path"; then
13858    BOOT_JDK="$new_path"
13859    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13860$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13861  fi
13862
13863  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13864  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13865
13866  else
13867    # We're on a posix platform. Hooray! :)
13868    path="$BOOT_JDK"
13869
13870    if test ! -f "$path" && test ! -d "$path"; then
13871      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
13872$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
13873   { (exit 1); exit 1; }; }
13874    fi
13875
13876    has_space=`$ECHO "$path" | $GREP " "`
13877    if test "x$has_space" != x; then
13878      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13879$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13880      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
13881$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
13882   { (exit 1); exit 1; }; }
13883    fi
13884  fi
13885
13886              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
13887$as_echo_n "checking for Boot JDK... " >&6; }
13888              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
13889$as_echo "$BOOT_JDK" >&6; }
13890              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
13891$as_echo_n "checking Boot JDK version... " >&6; }
13892              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13893              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13894$as_echo "$BOOT_JDK_VERSION" >&6; }
13895            fi # end check jdk version
13896          fi # end check rt.jar
13897        fi # end check javac
13898      fi # end check java
13899    fi # end check boot jdk found
13900  fi
13901
13902
13903  if test "x$BOOT_JDK_FOUND" = xno; then
13904    # Now execute the test
13905
13906  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
13907  BOOT_JDK_SUFFIX="/Contents/Home"
13908  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13909  if test "x$ALL_JDKS_FOUND" != x; then
13910    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13911
13912  if test "x$BOOT_JDK_FOUND" = xno; then
13913    # Now execute the test
13914
13915        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13916        if test -d "$BOOT_JDK"; then
13917          BOOT_JDK_FOUND=maybe
13918          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13919$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13920        fi
13921
13922
13923    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13924    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13925      # Do we have a bin/java?
13926      if test ! -x "$BOOT_JDK/bin/java"; then
13927        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13929        BOOT_JDK_FOUND=no
13930      else
13931        # Do we have a bin/javac?
13932        if test ! -x "$BOOT_JDK/bin/javac"; then
13933          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13934$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13935          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13936$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13937          BOOT_JDK_FOUND=no
13938        else
13939          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13940          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13941            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13942$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13943            BOOT_JDK_FOUND=no
13944          else
13945            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13946            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13947
13948            # Extra M4 quote needed to protect [] in grep expression.
13949            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13950            if test "x$FOUND_VERSION_78" = x; then
13951              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13952$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13953              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
13954$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13955              BOOT_JDK_FOUND=no
13956            else
13957              # We're done! :-)
13958              BOOT_JDK_FOUND=yes
13959
13960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13961
13962  # Input might be given as Windows format, start by converting to
13963  # unix format.
13964  path="$BOOT_JDK"
13965  new_path=`$CYGPATH -u "$path"`
13966
13967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13970  # "foo.exe" is OK but "foo" is an error.
13971  #
13972  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13973  # It is also a way to make sure we got the proper file name for the real test later on.
13974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13975  if test "x$test_shortpath" = x; then
13976    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13977$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13978    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13979$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13980   { (exit 1); exit 1; }; }
13981  fi
13982
13983  # Call helper function which possibly converts this using DOS-style short mode.
13984  # If so, the updated path is stored in $new_path.
13985
13986  input_path="$new_path"
13987  # Check if we need to convert this using DOS-style short mode. If the path
13988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13989  # take no chances and rewrite it.
13990  # Note: m4 eats our [], so we need to use [ and ] instead.
13991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13992  if test "x$has_forbidden_chars" != x; then
13993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13997      # Going to short mode and back again did indeed matter. Since short mode is
13998      # case insensitive, let's make it lowercase to improve readability.
13999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14000      # Now convert it back to Unix-stile (cygpath)
14001      input_path=`$CYGPATH -u "$shortmode_path"`
14002      new_path="$input_path"
14003    fi
14004  fi
14005
14006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14007  if test "x$test_cygdrive_prefix" = x; then
14008    # As a simple fix, exclude /usr/bin since it's not a real path.
14009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14011      # a path prefixed by /cygdrive for fixpath to work.
14012      new_path="$CYGWIN_ROOT_PATH$input_path"
14013    fi
14014  fi
14015
14016
14017  if test "x$path" != "x$new_path"; then
14018    BOOT_JDK="$new_path"
14019    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14020$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14021  fi
14022
14023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14024
14025  path="$BOOT_JDK"
14026  has_colon=`$ECHO $path | $GREP ^.:`
14027  new_path="$path"
14028  if test "x$has_colon" = x; then
14029    # Not in mixed or Windows style, start by that.
14030    new_path=`cmd //c echo $path`
14031  fi
14032
14033
14034  input_path="$new_path"
14035  # Check if we need to convert this using DOS-style short mode. If the path
14036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14037  # take no chances and rewrite it.
14038  # Note: m4 eats our [], so we need to use [ and ] instead.
14039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14040  if test "x$has_forbidden_chars" != x; then
14041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14043  fi
14044
14045
14046  windows_path="$new_path"
14047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14048    unix_path=`$CYGPATH -u "$windows_path"`
14049    new_path="$unix_path"
14050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14052    new_path="$unix_path"
14053  fi
14054
14055  if test "x$path" != "x$new_path"; then
14056    BOOT_JDK="$new_path"
14057    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14058$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14059  fi
14060
14061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14063
14064  else
14065    # We're on a posix platform. Hooray! :)
14066    path="$BOOT_JDK"
14067
14068    if test ! -f "$path" && test ! -d "$path"; then
14069      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
14070$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
14071   { (exit 1); exit 1; }; }
14072    fi
14073
14074    has_space=`$ECHO "$path" | $GREP " "`
14075    if test "x$has_space" != x; then
14076      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14077$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14078      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
14079$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
14080   { (exit 1); exit 1; }; }
14081    fi
14082  fi
14083
14084              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
14085$as_echo_n "checking for Boot JDK... " >&6; }
14086              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
14087$as_echo "$BOOT_JDK" >&6; }
14088              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
14089$as_echo_n "checking Boot JDK version... " >&6; }
14090              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14091              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
14092$as_echo "$BOOT_JDK_VERSION" >&6; }
14093            fi # end check jdk version
14094          fi # end check rt.jar
14095        fi # end check javac
14096      fi # end check java
14097    fi # end check boot jdk found
14098  fi
14099
14100    done
14101  fi
14102
14103
14104    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14105    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14106      # Do we have a bin/java?
14107      if test ! -x "$BOOT_JDK/bin/java"; then
14108        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14110        BOOT_JDK_FOUND=no
14111      else
14112        # Do we have a bin/javac?
14113        if test ! -x "$BOOT_JDK/bin/javac"; then
14114          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14116          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
14117$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14118          BOOT_JDK_FOUND=no
14119        else
14120          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14121          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14122            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14124            BOOT_JDK_FOUND=no
14125          else
14126            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14127            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14128
14129            # Extra M4 quote needed to protect [] in grep expression.
14130            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14131            if test "x$FOUND_VERSION_78" = x; then
14132              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14133$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14134              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
14135$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14136              BOOT_JDK_FOUND=no
14137            else
14138              # We're done! :-)
14139              BOOT_JDK_FOUND=yes
14140
14141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14142
14143  # Input might be given as Windows format, start by converting to
14144  # unix format.
14145  path="$BOOT_JDK"
14146  new_path=`$CYGPATH -u "$path"`
14147
14148  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14149  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14150  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14151  # "foo.exe" is OK but "foo" is an error.
14152  #
14153  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14154  # It is also a way to make sure we got the proper file name for the real test later on.
14155  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14156  if test "x$test_shortpath" = x; then
14157    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14158$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14159    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
14160$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
14161   { (exit 1); exit 1; }; }
14162  fi
14163
14164  # Call helper function which possibly converts this using DOS-style short mode.
14165  # If so, the updated path is stored in $new_path.
14166
14167  input_path="$new_path"
14168  # Check if we need to convert this using DOS-style short mode. If the path
14169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14170  # take no chances and rewrite it.
14171  # Note: m4 eats our [], so we need to use [ and ] instead.
14172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14173  if test "x$has_forbidden_chars" != x; then
14174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14178      # Going to short mode and back again did indeed matter. Since short mode is
14179      # case insensitive, let's make it lowercase to improve readability.
14180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14181      # Now convert it back to Unix-stile (cygpath)
14182      input_path=`$CYGPATH -u "$shortmode_path"`
14183      new_path="$input_path"
14184    fi
14185  fi
14186
14187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14188  if test "x$test_cygdrive_prefix" = x; then
14189    # As a simple fix, exclude /usr/bin since it's not a real path.
14190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14192      # a path prefixed by /cygdrive for fixpath to work.
14193      new_path="$CYGWIN_ROOT_PATH$input_path"
14194    fi
14195  fi
14196
14197
14198  if test "x$path" != "x$new_path"; then
14199    BOOT_JDK="$new_path"
14200    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14201$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14202  fi
14203
14204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14205
14206  path="$BOOT_JDK"
14207  has_colon=`$ECHO $path | $GREP ^.:`
14208  new_path="$path"
14209  if test "x$has_colon" = x; then
14210    # Not in mixed or Windows style, start by that.
14211    new_path=`cmd //c echo $path`
14212  fi
14213
14214
14215  input_path="$new_path"
14216  # Check if we need to convert this using DOS-style short mode. If the path
14217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14218  # take no chances and rewrite it.
14219  # Note: m4 eats our [], so we need to use [ and ] instead.
14220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14221  if test "x$has_forbidden_chars" != x; then
14222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14224  fi
14225
14226
14227  windows_path="$new_path"
14228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14229    unix_path=`$CYGPATH -u "$windows_path"`
14230    new_path="$unix_path"
14231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14233    new_path="$unix_path"
14234  fi
14235
14236  if test "x$path" != "x$new_path"; then
14237    BOOT_JDK="$new_path"
14238    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14239$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14240  fi
14241
14242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14244
14245  else
14246    # We're on a posix platform. Hooray! :)
14247    path="$BOOT_JDK"
14248
14249    if test ! -f "$path" && test ! -d "$path"; then
14250      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
14251$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
14252   { (exit 1); exit 1; }; }
14253    fi
14254
14255    has_space=`$ECHO "$path" | $GREP " "`
14256    if test "x$has_space" != x; then
14257      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14258$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14259      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
14260$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
14261   { (exit 1); exit 1; }; }
14262    fi
14263  fi
14264
14265              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
14266$as_echo_n "checking for Boot JDK... " >&6; }
14267              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
14268$as_echo "$BOOT_JDK" >&6; }
14269              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
14270$as_echo_n "checking Boot JDK version... " >&6; }
14271              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14272              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
14273$as_echo "$BOOT_JDK_VERSION" >&6; }
14274            fi # end check jdk version
14275          fi # end check rt.jar
14276        fi # end check javac
14277      fi # end check java
14278    fi # end check boot jdk found
14279  fi
14280
14281  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14282
14283  if test "x$BOOT_JDK_FOUND" = xno; then
14284    # Now execute the test
14285
14286  BOOT_JDK_PREFIX="/usr/lib/jvm"
14287  BOOT_JDK_SUFFIX=""
14288  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14289  if test "x$ALL_JDKS_FOUND" != x; then
14290    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14291
14292  if test "x$BOOT_JDK_FOUND" = xno; then
14293    # Now execute the test
14294
14295        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14296        if test -d "$BOOT_JDK"; then
14297          BOOT_JDK_FOUND=maybe
14298          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14299$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14300        fi
14301
14302
14303    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14304    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14305      # Do we have a bin/java?
14306      if test ! -x "$BOOT_JDK/bin/java"; then
14307        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14308$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14309        BOOT_JDK_FOUND=no
14310      else
14311        # Do we have a bin/javac?
14312        if test ! -x "$BOOT_JDK/bin/javac"; then
14313          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14315          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
14316$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14317          BOOT_JDK_FOUND=no
14318        else
14319          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14320          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14321            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14323            BOOT_JDK_FOUND=no
14324          else
14325            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14326            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14327
14328            # Extra M4 quote needed to protect [] in grep expression.
14329            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14330            if test "x$FOUND_VERSION_78" = x; then
14331              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14333              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
14334$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14335              BOOT_JDK_FOUND=no
14336            else
14337              # We're done! :-)
14338              BOOT_JDK_FOUND=yes
14339
14340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14341
14342  # Input might be given as Windows format, start by converting to
14343  # unix format.
14344  path="$BOOT_JDK"
14345  new_path=`$CYGPATH -u "$path"`
14346
14347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14350  # "foo.exe" is OK but "foo" is an error.
14351  #
14352  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14353  # It is also a way to make sure we got the proper file name for the real test later on.
14354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14355  if test "x$test_shortpath" = x; then
14356    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14357$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14358    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
14359$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
14360   { (exit 1); exit 1; }; }
14361  fi
14362
14363  # Call helper function which possibly converts this using DOS-style short mode.
14364  # If so, the updated path is stored in $new_path.
14365
14366  input_path="$new_path"
14367  # Check if we need to convert this using DOS-style short mode. If the path
14368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14369  # take no chances and rewrite it.
14370  # Note: m4 eats our [], so we need to use [ and ] instead.
14371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14372  if test "x$has_forbidden_chars" != x; then
14373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14377      # Going to short mode and back again did indeed matter. Since short mode is
14378      # case insensitive, let's make it lowercase to improve readability.
14379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14380      # Now convert it back to Unix-stile (cygpath)
14381      input_path=`$CYGPATH -u "$shortmode_path"`
14382      new_path="$input_path"
14383    fi
14384  fi
14385
14386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14387  if test "x$test_cygdrive_prefix" = x; then
14388    # As a simple fix, exclude /usr/bin since it's not a real path.
14389    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14391      # a path prefixed by /cygdrive for fixpath to work.
14392      new_path="$CYGWIN_ROOT_PATH$input_path"
14393    fi
14394  fi
14395
14396
14397  if test "x$path" != "x$new_path"; then
14398    BOOT_JDK="$new_path"
14399    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14400$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14401  fi
14402
14403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14404
14405  path="$BOOT_JDK"
14406  has_colon=`$ECHO $path | $GREP ^.:`
14407  new_path="$path"
14408  if test "x$has_colon" = x; then
14409    # Not in mixed or Windows style, start by that.
14410    new_path=`cmd //c echo $path`
14411  fi
14412
14413
14414  input_path="$new_path"
14415  # Check if we need to convert this using DOS-style short mode. If the path
14416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14417  # take no chances and rewrite it.
14418  # Note: m4 eats our [], so we need to use [ and ] instead.
14419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14420  if test "x$has_forbidden_chars" != x; then
14421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14423  fi
14424
14425
14426  windows_path="$new_path"
14427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14428    unix_path=`$CYGPATH -u "$windows_path"`
14429    new_path="$unix_path"
14430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14432    new_path="$unix_path"
14433  fi
14434
14435  if test "x$path" != "x$new_path"; then
14436    BOOT_JDK="$new_path"
14437    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14438$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14439  fi
14440
14441  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14442  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14443
14444  else
14445    # We're on a posix platform. Hooray! :)
14446    path="$BOOT_JDK"
14447
14448    if test ! -f "$path" && test ! -d "$path"; then
14449      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
14450$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
14451   { (exit 1); exit 1; }; }
14452    fi
14453
14454    has_space=`$ECHO "$path" | $GREP " "`
14455    if test "x$has_space" != x; then
14456      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14457$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14458      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
14459$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
14460   { (exit 1); exit 1; }; }
14461    fi
14462  fi
14463
14464              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
14465$as_echo_n "checking for Boot JDK... " >&6; }
14466              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
14467$as_echo "$BOOT_JDK" >&6; }
14468              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
14469$as_echo_n "checking Boot JDK version... " >&6; }
14470              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14471              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
14472$as_echo "$BOOT_JDK_VERSION" >&6; }
14473            fi # end check jdk version
14474          fi # end check rt.jar
14475        fi # end check javac
14476      fi # end check java
14477    fi # end check boot jdk found
14478  fi
14479
14480    done
14481  fi
14482
14483
14484    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14485    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14486      # Do we have a bin/java?
14487      if test ! -x "$BOOT_JDK/bin/java"; then
14488        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14490        BOOT_JDK_FOUND=no
14491      else
14492        # Do we have a bin/javac?
14493        if test ! -x "$BOOT_JDK/bin/javac"; then
14494          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14496          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
14497$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14498          BOOT_JDK_FOUND=no
14499        else
14500          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14501          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14502            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14504            BOOT_JDK_FOUND=no
14505          else
14506            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14507            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14508
14509            # Extra M4 quote needed to protect [] in grep expression.
14510            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14511            if test "x$FOUND_VERSION_78" = x; then
14512              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14514              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
14515$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14516              BOOT_JDK_FOUND=no
14517            else
14518              # We're done! :-)
14519              BOOT_JDK_FOUND=yes
14520
14521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14522
14523  # Input might be given as Windows format, start by converting to
14524  # unix format.
14525  path="$BOOT_JDK"
14526  new_path=`$CYGPATH -u "$path"`
14527
14528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14531  # "foo.exe" is OK but "foo" is an error.
14532  #
14533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14534  # It is also a way to make sure we got the proper file name for the real test later on.
14535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14536  if test "x$test_shortpath" = x; then
14537    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14538$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14539    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
14540$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
14541   { (exit 1); exit 1; }; }
14542  fi
14543
14544  # Call helper function which possibly converts this using DOS-style short mode.
14545  # If so, the updated path is stored in $new_path.
14546
14547  input_path="$new_path"
14548  # Check if we need to convert this using DOS-style short mode. If the path
14549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14550  # take no chances and rewrite it.
14551  # Note: m4 eats our [], so we need to use [ and ] instead.
14552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14553  if test "x$has_forbidden_chars" != x; then
14554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14558      # Going to short mode and back again did indeed matter. Since short mode is
14559      # case insensitive, let's make it lowercase to improve readability.
14560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14561      # Now convert it back to Unix-stile (cygpath)
14562      input_path=`$CYGPATH -u "$shortmode_path"`
14563      new_path="$input_path"
14564    fi
14565  fi
14566
14567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14568  if test "x$test_cygdrive_prefix" = x; then
14569    # As a simple fix, exclude /usr/bin since it's not a real path.
14570    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14572      # a path prefixed by /cygdrive for fixpath to work.
14573      new_path="$CYGWIN_ROOT_PATH$input_path"
14574    fi
14575  fi
14576
14577
14578  if test "x$path" != "x$new_path"; then
14579    BOOT_JDK="$new_path"
14580    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14581$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14582  fi
14583
14584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14585
14586  path="$BOOT_JDK"
14587  has_colon=`$ECHO $path | $GREP ^.:`
14588  new_path="$path"
14589  if test "x$has_colon" = x; then
14590    # Not in mixed or Windows style, start by that.
14591    new_path=`cmd //c echo $path`
14592  fi
14593
14594
14595  input_path="$new_path"
14596  # Check if we need to convert this using DOS-style short mode. If the path
14597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14598  # take no chances and rewrite it.
14599  # Note: m4 eats our [], so we need to use [ and ] instead.
14600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14601  if test "x$has_forbidden_chars" != x; then
14602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14604  fi
14605
14606
14607  windows_path="$new_path"
14608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14609    unix_path=`$CYGPATH -u "$windows_path"`
14610    new_path="$unix_path"
14611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14613    new_path="$unix_path"
14614  fi
14615
14616  if test "x$path" != "x$new_path"; then
14617    BOOT_JDK="$new_path"
14618    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14620  fi
14621
14622  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14623  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14624
14625  else
14626    # We're on a posix platform. Hooray! :)
14627    path="$BOOT_JDK"
14628
14629    if test ! -f "$path" && test ! -d "$path"; then
14630      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
14631$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
14632   { (exit 1); exit 1; }; }
14633    fi
14634
14635    has_space=`$ECHO "$path" | $GREP " "`
14636    if test "x$has_space" != x; then
14637      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14638$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14639      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
14640$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
14641   { (exit 1); exit 1; }; }
14642    fi
14643  fi
14644
14645              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
14646$as_echo_n "checking for Boot JDK... " >&6; }
14647              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
14648$as_echo "$BOOT_JDK" >&6; }
14649              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
14650$as_echo_n "checking Boot JDK version... " >&6; }
14651              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14652              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
14653$as_echo "$BOOT_JDK_VERSION" >&6; }
14654            fi # end check jdk version
14655          fi # end check rt.jar
14656        fi # end check javac
14657      fi # end check java
14658    fi # end check boot jdk found
14659  fi
14660
14661  fi
14662
14663
14664    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14665    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14666      # Do we have a bin/java?
14667      if test ! -x "$BOOT_JDK/bin/java"; then
14668        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14669$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14670        BOOT_JDK_FOUND=no
14671      else
14672        # Do we have a bin/javac?
14673        if test ! -x "$BOOT_JDK/bin/javac"; then
14674          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14676          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
14677$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14678          BOOT_JDK_FOUND=no
14679        else
14680          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14681          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14682            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14684            BOOT_JDK_FOUND=no
14685          else
14686            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14687            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14688
14689            # Extra M4 quote needed to protect [] in grep expression.
14690            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14691            if test "x$FOUND_VERSION_78" = x; then
14692              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14694              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
14695$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14696              BOOT_JDK_FOUND=no
14697            else
14698              # We're done! :-)
14699              BOOT_JDK_FOUND=yes
14700
14701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14702
14703  # Input might be given as Windows format, start by converting to
14704  # unix format.
14705  path="$BOOT_JDK"
14706  new_path=`$CYGPATH -u "$path"`
14707
14708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14711  # "foo.exe" is OK but "foo" is an error.
14712  #
14713  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14714  # It is also a way to make sure we got the proper file name for the real test later on.
14715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14716  if test "x$test_shortpath" = x; then
14717    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14718$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14719    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
14720$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
14721   { (exit 1); exit 1; }; }
14722  fi
14723
14724  # Call helper function which possibly converts this using DOS-style short mode.
14725  # If so, the updated path is stored in $new_path.
14726
14727  input_path="$new_path"
14728  # Check if we need to convert this using DOS-style short mode. If the path
14729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14730  # take no chances and rewrite it.
14731  # Note: m4 eats our [], so we need to use [ and ] instead.
14732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14733  if test "x$has_forbidden_chars" != x; then
14734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14738      # Going to short mode and back again did indeed matter. Since short mode is
14739      # case insensitive, let's make it lowercase to improve readability.
14740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14741      # Now convert it back to Unix-stile (cygpath)
14742      input_path=`$CYGPATH -u "$shortmode_path"`
14743      new_path="$input_path"
14744    fi
14745  fi
14746
14747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14748  if test "x$test_cygdrive_prefix" = x; then
14749    # As a simple fix, exclude /usr/bin since it's not a real path.
14750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14752      # a path prefixed by /cygdrive for fixpath to work.
14753      new_path="$CYGWIN_ROOT_PATH$input_path"
14754    fi
14755  fi
14756
14757
14758  if test "x$path" != "x$new_path"; then
14759    BOOT_JDK="$new_path"
14760    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14761$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14762  fi
14763
14764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14765
14766  path="$BOOT_JDK"
14767  has_colon=`$ECHO $path | $GREP ^.:`
14768  new_path="$path"
14769  if test "x$has_colon" = x; then
14770    # Not in mixed or Windows style, start by that.
14771    new_path=`cmd //c echo $path`
14772  fi
14773
14774
14775  input_path="$new_path"
14776  # Check if we need to convert this using DOS-style short mode. If the path
14777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14778  # take no chances and rewrite it.
14779  # Note: m4 eats our [], so we need to use [ and ] instead.
14780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14781  if test "x$has_forbidden_chars" != x; then
14782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14784  fi
14785
14786
14787  windows_path="$new_path"
14788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14789    unix_path=`$CYGPATH -u "$windows_path"`
14790    new_path="$unix_path"
14791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14793    new_path="$unix_path"
14794  fi
14795
14796  if test "x$path" != "x$new_path"; then
14797    BOOT_JDK="$new_path"
14798    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14799$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14800  fi
14801
14802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14804
14805  else
14806    # We're on a posix platform. Hooray! :)
14807    path="$BOOT_JDK"
14808
14809    if test ! -f "$path" && test ! -d "$path"; then
14810      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
14811$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
14812   { (exit 1); exit 1; }; }
14813    fi
14814
14815    has_space=`$ECHO "$path" | $GREP " "`
14816    if test "x$has_space" != x; then
14817      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14818$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14819      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
14820$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
14821   { (exit 1); exit 1; }; }
14822    fi
14823  fi
14824
14825              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
14826$as_echo_n "checking for Boot JDK... " >&6; }
14827              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
14828$as_echo "$BOOT_JDK" >&6; }
14829              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
14830$as_echo_n "checking Boot JDK version... " >&6; }
14831              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14832              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
14833$as_echo "$BOOT_JDK_VERSION" >&6; }
14834            fi # end check jdk version
14835          fi # end check rt.jar
14836        fi # end check javac
14837      fi # end check java
14838    fi # end check boot jdk found
14839  fi
14840
14841
14842# If we haven't found anything yet, we've truly lost. Give up.
14843if test "x$BOOT_JDK_FOUND" = xno; then
14844
14845    # Print a helpful message on how to acquire the necessary build dependency.
14846    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
14847    MISSING_DEPENDENCY=openjdk
14848    PKGHANDLER_COMMAND=
14849
14850    case $PKGHANDLER in
14851	apt-get)
14852                apt_help     $MISSING_DEPENDENCY ;;
14853    yum)
14854                yum_help     $MISSING_DEPENDENCY ;;
14855	port)
14856                port_help    $MISSING_DEPENDENCY ;;
14857	pkgutil)
14858                pkgutil_help $MISSING_DEPENDENCY ;;
14859	pkgadd)
14860                pkgadd_help  $MISSING_DEPENDENCY ;;
14861    * )
14862      break ;;
14863    esac
14864
14865    if test "x$PKGHANDLER_COMMAND" != x; then
14866        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
14867    fi
14868
14869  { $as_echo "$as_me:$LINENO: Could not find a valid Boot JDK. $HELP_MSG" >&5
14870$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
14871  { $as_echo "$as_me:$LINENO: This might be fixed by explicitely setting --with-boot-jdk" >&5
14872$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14873  { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
14874$as_echo "$as_me: error: Cannot continue" >&2;}
14875   { (exit 1); exit 1; }; }
14876fi
14877
14878# Setup proper paths for what we found
14879BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
14880if test ! -f "$BOOT_RTJAR"; then
14881    # On MacOSX it is called classes.jar
14882    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
14883    if test -f "$BOOT_RTJAR"; then
14884      # Remove the ..
14885      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
14886    fi
14887fi
14888BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
14889BOOT_JDK="$BOOT_JDK"
14890
14891
14892
14893
14894# Setup tools from the Boot JDK.
14895
14896  { $as_echo "$as_me:$LINENO: checking for java in Boot JDK" >&5
14897$as_echo_n "checking for java in Boot JDK... " >&6; }
14898  JAVA=$BOOT_JDK/bin/java
14899  if test ! -x $JAVA; then
14900      { $as_echo "$as_me:$LINENO: result: not found" >&5
14901$as_echo "not found" >&6; }
14902      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14903$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14904      { { $as_echo "$as_me:$LINENO: error: Could not find java in the Boot JDK" >&5
14905$as_echo "$as_me: error: Could not find java in the Boot JDK" >&2;}
14906   { (exit 1); exit 1; }; }
14907  fi
14908  { $as_echo "$as_me:$LINENO: result: ok" >&5
14909$as_echo "ok" >&6; }
14910
14911
14912  { $as_echo "$as_me:$LINENO: checking for javac in Boot JDK" >&5
14913$as_echo_n "checking for javac in Boot JDK... " >&6; }
14914  JAVAC=$BOOT_JDK/bin/javac
14915  if test ! -x $JAVAC; then
14916      { $as_echo "$as_me:$LINENO: result: not found" >&5
14917$as_echo "not found" >&6; }
14918      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14919$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14920      { { $as_echo "$as_me:$LINENO: error: Could not find javac in the Boot JDK" >&5
14921$as_echo "$as_me: error: Could not find javac in the Boot JDK" >&2;}
14922   { (exit 1); exit 1; }; }
14923  fi
14924  { $as_echo "$as_me:$LINENO: result: ok" >&5
14925$as_echo "ok" >&6; }
14926
14927
14928  { $as_echo "$as_me:$LINENO: checking for javah in Boot JDK" >&5
14929$as_echo_n "checking for javah in Boot JDK... " >&6; }
14930  JAVAH=$BOOT_JDK/bin/javah
14931  if test ! -x $JAVAH; then
14932      { $as_echo "$as_me:$LINENO: result: not found" >&5
14933$as_echo "not found" >&6; }
14934      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14935$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14936      { { $as_echo "$as_me:$LINENO: error: Could not find javah in the Boot JDK" >&5
14937$as_echo "$as_me: error: Could not find javah in the Boot JDK" >&2;}
14938   { (exit 1); exit 1; }; }
14939  fi
14940  { $as_echo "$as_me:$LINENO: result: ok" >&5
14941$as_echo "ok" >&6; }
14942
14943
14944  { $as_echo "$as_me:$LINENO: checking for javap in Boot JDK" >&5
14945$as_echo_n "checking for javap in Boot JDK... " >&6; }
14946  JAVAP=$BOOT_JDK/bin/javap
14947  if test ! -x $JAVAP; then
14948      { $as_echo "$as_me:$LINENO: result: not found" >&5
14949$as_echo "not found" >&6; }
14950      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14951$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14952      { { $as_echo "$as_me:$LINENO: error: Could not find javap in the Boot JDK" >&5
14953$as_echo "$as_me: error: Could not find javap in the Boot JDK" >&2;}
14954   { (exit 1); exit 1; }; }
14955  fi
14956  { $as_echo "$as_me:$LINENO: result: ok" >&5
14957$as_echo "ok" >&6; }
14958
14959
14960  { $as_echo "$as_me:$LINENO: checking for jar in Boot JDK" >&5
14961$as_echo_n "checking for jar in Boot JDK... " >&6; }
14962  JAR=$BOOT_JDK/bin/jar
14963  if test ! -x $JAR; then
14964      { $as_echo "$as_me:$LINENO: result: not found" >&5
14965$as_echo "not found" >&6; }
14966      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14967$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14968      { { $as_echo "$as_me:$LINENO: error: Could not find jar in the Boot JDK" >&5
14969$as_echo "$as_me: error: Could not find jar in the Boot JDK" >&2;}
14970   { (exit 1); exit 1; }; }
14971  fi
14972  { $as_echo "$as_me:$LINENO: result: ok" >&5
14973$as_echo "ok" >&6; }
14974
14975
14976  { $as_echo "$as_me:$LINENO: checking for rmic in Boot JDK" >&5
14977$as_echo_n "checking for rmic in Boot JDK... " >&6; }
14978  RMIC=$BOOT_JDK/bin/rmic
14979  if test ! -x $RMIC; then
14980      { $as_echo "$as_me:$LINENO: result: not found" >&5
14981$as_echo "not found" >&6; }
14982      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14983$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14984      { { $as_echo "$as_me:$LINENO: error: Could not find rmic in the Boot JDK" >&5
14985$as_echo "$as_me: error: Could not find rmic in the Boot JDK" >&2;}
14986   { (exit 1); exit 1; }; }
14987  fi
14988  { $as_echo "$as_me:$LINENO: result: ok" >&5
14989$as_echo "ok" >&6; }
14990
14991
14992  { $as_echo "$as_me:$LINENO: checking for native2ascii in Boot JDK" >&5
14993$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
14994  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
14995  if test ! -x $NATIVE2ASCII; then
14996      { $as_echo "$as_me:$LINENO: result: not found" >&5
14997$as_echo "not found" >&6; }
14998      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14999$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15000      { { $as_echo "$as_me:$LINENO: error: Could not find native2ascii in the Boot JDK" >&5
15001$as_echo "$as_me: error: Could not find native2ascii in the Boot JDK" >&2;}
15002   { (exit 1); exit 1; }; }
15003  fi
15004  { $as_echo "$as_me:$LINENO: result: ok" >&5
15005$as_echo "ok" >&6; }
15006
15007
15008# Finally, set some other options...
15009
15010# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15011BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15012
15013
15014
15015
15016##############################################################################
15017#
15018# Specify options for anything that is run with the Boot JDK.
15019#
15020
15021# Check whether --with-boot-jdk-jvmargs was given.
15022if test "${with_boot_jdk_jvmargs+set}" = set; then
15023  withval=$with_boot_jdk_jvmargs;
15024fi
15025
15026
15027if test "x$with_boot_jdk_jvmargs" = x; then
15028    # Not all JVM:s accept the same arguments on the command line.
15029    # OpenJDK specific increase in thread stack for JDK build,
15030    # well more specifically, when running javac.
15031    if test "x$BUILD_NUM_BITS" = x32; then
15032       STACK_SIZE=768
15033    else
15034       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15035       # since 64-bit pointers are pushed on the stach. Apparently, we need
15036       # to increase the stack space when javacing the JDK....
15037       STACK_SIZE=1536
15038    fi
15039
15040    # Minimum amount of heap memory.
15041
15042    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15043    # If so, then append -Xms64M to boot_jdk_jvmargs
15044    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15045    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15046    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15047        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15048    fi
15049
15050    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15051        # Why does macosx need more heap? Its the huge JDK batch.
15052
15053    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15054    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15055    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15056    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15057    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15058        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15059    fi
15060
15061    else
15062
15063    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15064    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15065    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15066    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15067    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15068        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15069    fi
15070
15071    fi
15072    # When is adding -client something that speeds up the JVM?
15073    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15074
15075    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15076    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15077    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15078    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15079    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15080        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15081    fi
15082
15083
15084    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15085    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15086    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15087    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15088    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15089        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15090    fi
15091
15092
15093    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15094    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15095    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15096    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15097    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15098        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15099    fi
15100
15101    # Disable special log output when a debug build is used as Boot JDK...
15102
15103    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15104    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15105    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15106    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15107    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15108        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15109    fi
15110
15111fi
15112
15113BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15114
15115
15116
15117###############################################################################
15118#
15119# Configure the sources to use. We can add or override individual directories.
15120#
15121###############################################################################
15122
15123
15124
15125# Where are the sources. Any of these can be overridden
15126# using --with-override-corba and the likes.
15127LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15128CORBA_TOPDIR="$SRC_ROOT/corba"
15129JAXP_TOPDIR="$SRC_ROOT/jaxp"
15130JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15131HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15132JDK_TOPDIR="$SRC_ROOT/jdk"
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142###############################################################################
15143#
15144# Pickup additional source for a component from outside of the source root
15145# or override source for a component.
15146#
15147
15148# Check whether --with-add-source-root was given.
15149if test "${with_add_source_root+set}" = set; then
15150  withval=$with_add_source_root;
15151fi
15152
15153
15154
15155# Check whether --with-override-source-root was given.
15156if test "${with_override_source_root+set}" = set; then
15157  withval=$with_override_source_root;
15158fi
15159
15160
15161
15162# Check whether --with-adds-and-overrides was given.
15163if test "${with_adds_and_overrides+set}" = set; then
15164  withval=$with_adds_and_overrides;
15165fi
15166
15167
15168if test "x$with_adds_and_overrides" != x; then
15169    with_add_source_root="$with_adds_and_overrides/adds"
15170    with_override_source_root="$with_adds_and_overrides/overrides"
15171fi
15172
15173if test "x$with_add_source_root" != x; then
15174    if ! test -d $with_add_source_root; then
15175       { { $as_echo "$as_me:$LINENO: error: Trying to use a non-existant add-source-root $with_add_source_root" >&5
15176$as_echo "$as_me: error: Trying to use a non-existant add-source-root $with_add_source_root" >&2;}
15177   { (exit 1); exit 1; }; }
15178    fi
15179    CURDIR="$PWD"
15180    cd "$with_add_source_root"
15181    ADD_SRC_ROOT="`pwd`"
15182    cd "$CURDIR"
15183    # Verify that the addon source root does not have any root makefiles.
15184    # If it does, then it is usually an error, prevent this.
15185    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15186       test -f $with_add_source_root/langtools/make/Makefile; then
15187        { { $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
15188$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;}
15189   { (exit 1); exit 1; }; }
15190    fi
15191    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15192       test -f $with_add_source_root/corba/make/Makefile; then
15193        { { $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
15194$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;}
15195   { (exit 1); exit 1; }; }
15196    fi
15197    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15198       test -f $with_add_source_root/jaxp/make/Makefile; then
15199        { { $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
15200$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;}
15201   { (exit 1); exit 1; }; }
15202    fi
15203    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15204       test -f $with_add_source_root/jaxws/make/Makefile; then
15205        { { $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
15206$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;}
15207   { (exit 1); exit 1; }; }
15208    fi
15209    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15210       test -f $with_add_source_root/hotspot/make/Makefile; then
15211        { { $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
15212$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;}
15213   { (exit 1); exit 1; }; }
15214    fi
15215    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15216       test -f $with_add_source_root/jdk/make/Makefile; then
15217        { { $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
15218$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;}
15219   { (exit 1); exit 1; }; }
15220    fi
15221fi
15222
15223
15224if test "x$with_override_source_root" != x; then
15225    if ! test -d $with_override_source_root; then
15226       { { $as_echo "$as_me:$LINENO: error: Trying to use a non-existant override-source-root $with_override_source_root" >&5
15227$as_echo "$as_me: error: Trying to use a non-existant override-source-root $with_override_source_root" >&2;}
15228   { (exit 1); exit 1; }; }
15229    fi
15230    CURDIR="$PWD"
15231    cd "$with_override_source_root"
15232    OVERRIDE_SRC_ROOT="`pwd`"
15233    cd "$CURDIR"
15234    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15235       test -f $with_override_source_root/langtools/make/Makefile; then
15236        { { $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
15237$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;}
15238   { (exit 1); exit 1; }; }
15239    fi
15240    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15241       test -f $with_override_source_root/corba/make/Makefile; then
15242        { { $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
15243$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;}
15244   { (exit 1); exit 1; }; }
15245    fi
15246    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15247       test -f $with_override_source_root/jaxp/make/Makefile; then
15248        { { $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
15249$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;}
15250   { (exit 1); exit 1; }; }
15251    fi
15252    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15253       test -f $with_override_source_root/jaxws/make/Makefile; then
15254        { { $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
15255$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;}
15256   { (exit 1); exit 1; }; }
15257    fi
15258    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15259       test -f $with_override_source_root/hotspot/make/Makefile; then
15260        { { $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
15261$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;}
15262   { (exit 1); exit 1; }; }
15263    fi
15264    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15265       test -f $with_override_source_root/jdk/make/Makefile; then
15266        { { $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
15267$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;}
15268   { (exit 1); exit 1; }; }
15269    fi
15270fi
15271
15272
15273###############################################################################
15274#
15275# Override a repo completely, this is used for example when you have 3 small
15276# development sandboxes of the langtools sources and want to avoid having 3 full
15277# OpenJDK sources checked out on disk.
15278#
15279# Assuming that the 3 langtools sandboxes are located here:
15280# /home/fredrik/sandbox1/langtools
15281# /home/fredrik/sandbox2/langtools
15282# /home/fredrik/sandbox3/langtools
15283#
15284# From the source root you create build subdirs manually:
15285#     mkdir -p build1 build2 build3
15286# in each build directory run:
15287#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15288#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15289#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15290#
15291
15292
15293# Check whether --with-override-langtools was given.
15294if test "${with_override_langtools+set}" = set; then
15295  withval=$with_override_langtools;
15296fi
15297
15298
15299
15300# Check whether --with-override-corba was given.
15301if test "${with_override_corba+set}" = set; then
15302  withval=$with_override_corba;
15303fi
15304
15305
15306
15307# Check whether --with-override-jaxp was given.
15308if test "${with_override_jaxp+set}" = set; then
15309  withval=$with_override_jaxp;
15310fi
15311
15312
15313
15314# Check whether --with-override-jaxws was given.
15315if test "${with_override_jaxws+set}" = set; then
15316  withval=$with_override_jaxws;
15317fi
15318
15319
15320
15321# Check whether --with-override-hotspot was given.
15322if test "${with_override_hotspot+set}" = set; then
15323  withval=$with_override_hotspot;
15324fi
15325
15326
15327
15328# Check whether --with-override-jdk was given.
15329if test "${with_override_jdk+set}" = set; then
15330  withval=$with_override_jdk;
15331fi
15332
15333
15334if test "x$with_override_langtools" != x; then
15335    CURDIR="$PWD"
15336    cd "$with_override_langtools"
15337    LANGTOOLS_TOPDIR="`pwd`"
15338    cd "$CURDIR"
15339    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15340        { { $as_echo "$as_me:$LINENO: error: You have to override langtools with a full langtools repo!" >&5
15341$as_echo "$as_me: error: You have to override langtools with a full langtools repo!" >&2;}
15342   { (exit 1); exit 1; }; }
15343    fi
15344    { $as_echo "$as_me:$LINENO: checking if langtools should be overridden" >&5
15345$as_echo_n "checking if langtools should be overridden... " >&6; }
15346    { $as_echo "$as_me:$LINENO: result: yes with $LANGTOOLS_TOPDIR" >&5
15347$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15348fi
15349if test "x$with_override_corba" != x; then
15350    CURDIR="$PWD"
15351    cd "$with_override_corba"
15352    CORBA_TOPDIR="`pwd`"
15353    cd "$CURDIR"
15354    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15355        { { $as_echo "$as_me:$LINENO: error: You have to override corba with a full corba repo!" >&5
15356$as_echo "$as_me: error: You have to override corba with a full corba repo!" >&2;}
15357   { (exit 1); exit 1; }; }
15358    fi
15359    { $as_echo "$as_me:$LINENO: checking if corba should be overridden" >&5
15360$as_echo_n "checking if corba should be overridden... " >&6; }
15361    { $as_echo "$as_me:$LINENO: result: yes with $CORBA_TOPDIR" >&5
15362$as_echo "yes with $CORBA_TOPDIR" >&6; }
15363fi
15364if test "x$with_override_jaxp" != x; then
15365    CURDIR="$PWD"
15366    cd "$with_override_jaxp"
15367    JAXP_TOPDIR="`pwd`"
15368    cd "$CURDIR"
15369    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15370        { { $as_echo "$as_me:$LINENO: error: You have to override jaxp with a full jaxp repo!" >&5
15371$as_echo "$as_me: error: You have to override jaxp with a full jaxp repo!" >&2;}
15372   { (exit 1); exit 1; }; }
15373    fi
15374    { $as_echo "$as_me:$LINENO: checking if jaxp should be overridden" >&5
15375$as_echo_n "checking if jaxp should be overridden... " >&6; }
15376    { $as_echo "$as_me:$LINENO: result: yes with $JAXP_TOPDIR" >&5
15377$as_echo "yes with $JAXP_TOPDIR" >&6; }
15378fi
15379if test "x$with_override_jaxws" != x; then
15380    CURDIR="$PWD"
15381    cd "$with_override_jaxws"
15382    JAXWS_TOPDIR="`pwd`"
15383    cd "$CURDIR"
15384    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15385        { { $as_echo "$as_me:$LINENO: error: You have to override jaxws with a full jaxws repo!" >&5
15386$as_echo "$as_me: error: You have to override jaxws with a full jaxws repo!" >&2;}
15387   { (exit 1); exit 1; }; }
15388    fi
15389    { $as_echo "$as_me:$LINENO: checking if jaxws should be overridden" >&5
15390$as_echo_n "checking if jaxws should be overridden... " >&6; }
15391    { $as_echo "$as_me:$LINENO: result: yes with $JAXWS_TOPDIR" >&5
15392$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15393fi
15394if test "x$with_override_hotspot" != x; then
15395    CURDIR="$PWD"
15396    cd "$with_override_hotspot"
15397    HOTSPOT_TOPDIR="`pwd`"
15398    cd "$CURDIR"
15399    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15400       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15401        { { $as_echo "$as_me:$LINENO: error: You have to override hotspot with a full hotspot repo!" >&5
15402$as_echo "$as_me: error: You have to override hotspot with a full hotspot repo!" >&2;}
15403   { (exit 1); exit 1; }; }
15404    fi
15405    { $as_echo "$as_me:$LINENO: checking if hotspot should be overridden" >&5
15406$as_echo_n "checking if hotspot should be overridden... " >&6; }
15407    { $as_echo "$as_me:$LINENO: result: yes with $HOTSPOT_TOPDIR" >&5
15408$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15409fi
15410if test "x$with_override_jdk" != x; then
15411    CURDIR="$PWD"
15412    cd "$with_override_jdk"
15413    JDK_TOPDIR="`pwd`"
15414    cd "$CURDIR"
15415    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15416        { { $as_echo "$as_me:$LINENO: error: You have to override JDK with a full JDK repo!" >&5
15417$as_echo "$as_me: error: You have to override JDK with a full JDK repo!" >&2;}
15418   { (exit 1); exit 1; }; }
15419    fi
15420    { $as_echo "$as_me:$LINENO: checking if JDK should be overridden" >&5
15421$as_echo_n "checking if JDK should be overridden... " >&6; }
15422    { $as_echo "$as_me:$LINENO: result: yes with $JDK_TOPDIR" >&5
15423$as_echo "yes with $JDK_TOPDIR" >&6; }
15424fi
15425
15426
15427
15428BUILD_OUTPUT="$OUTPUT_ROOT"
15429
15430
15431HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15432BUILD_HOTSPOT=true
15433
15434
15435
15436# Check whether --with-import-hotspot was given.
15437if test "${with_import_hotspot+set}" = set; then
15438  withval=$with_import_hotspot;
15439fi
15440
15441if test "x$with_import_hotspot" != x; then
15442    CURDIR="$PWD"
15443    cd "$with_import_hotspot"
15444    HOTSPOT_DIST="`pwd`"
15445    cd "$CURDIR"
15446    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15447        { { $as_echo "$as_me:$LINENO: error: You have to import hotspot from a full jdk image or hotspot build dist dir!" >&5
15448$as_echo "$as_me: error: You have to import hotspot from a full jdk image or hotspot build dist dir!" >&2;}
15449   { (exit 1); exit 1; }; }
15450    fi
15451    { $as_echo "$as_me:$LINENO: checking if hotspot should be imported" >&5
15452$as_echo_n "checking if hotspot should be imported... " >&6; }
15453    { $as_echo "$as_me:$LINENO: result: yes from $HOTSPOT_DIST" >&5
15454$as_echo "yes from $HOTSPOT_DIST" >&6; }
15455    BUILD_HOTSPOT=false
15456fi
15457
15458JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15459
15460
15461###############################################################################
15462#
15463# Setup the toolchain (compilers etc), i.e. the tools that need to be
15464# cross-compilation aware.
15465#
15466###############################################################################
15467
15468
15469###############################################################################
15470#
15471# Configure the development tool paths and potential sysroot.
15472#
15473ac_ext=cpp
15474ac_cpp='$CXXCPP $CPPFLAGS'
15475ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15476ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15477ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15478
15479
15480# The option used to specify the target .o,.a or .so file.
15481# When compiling, how to specify the to be created object file.
15482CC_OUT_OPTION='-o$(SPACE)'
15483# When linking, how to specify the to be created executable.
15484EXE_OUT_OPTION='-o$(SPACE)'
15485# When linking, how to specify the to be created dynamically linkable library.
15486LD_OUT_OPTION='-o$(SPACE)'
15487# When archiving, how to specify the to be create static archive for object files.
15488AR_OUT_OPTION='rcs$(SPACE)'
15489
15490
15491
15492
15493
15494# Locate the actual tools
15495
15496if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15497
15498  # Store path to cygwin link.exe to help excluding it when searching for
15499  # VS linker. This must be done before changing the PATH when looking for VS.
15500  # Extract the first word of "link", so it can be a program name with args.
15501set dummy link; ac_word=$2
15502{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15503$as_echo_n "checking for $ac_word... " >&6; }
15504if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then
15505  $as_echo_n "(cached) " >&6
15506else
15507  case $CYGWIN_LINK in
15508  [\\/]* | ?:[\\/]*)
15509  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15510  ;;
15511  *)
15512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15513for as_dir in $PATH
15514do
15515  IFS=$as_save_IFS
15516  test -z "$as_dir" && as_dir=.
15517  for ac_exec_ext in '' $ac_executable_extensions; do
15518  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15519    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15520    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15521    break 2
15522  fi
15523done
15524done
15525IFS=$as_save_IFS
15526
15527  ;;
15528esac
15529fi
15530CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15531if test -n "$CYGWIN_LINK"; then
15532  { $as_echo "$as_me:$LINENO: result: $CYGWIN_LINK" >&5
15533$as_echo "$CYGWIN_LINK" >&6; }
15534else
15535  { $as_echo "$as_me:$LINENO: result: no" >&5
15536$as_echo "no" >&6; }
15537fi
15538
15539
15540  if test "x$CYGWIN_LINK" != x; then
15541    { $as_echo "$as_me:$LINENO: checking if the first found link.exe is actually the Cygwin link tool" >&5
15542$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15543    "$CYGWIN_LINK" --version > /dev/null
15544    if test $? -eq 0 ; then
15545      { $as_echo "$as_me:$LINENO: result: yes" >&5
15546$as_echo "yes" >&6; }
15547    else
15548      { $as_echo "$as_me:$LINENO: result: no" >&5
15549$as_echo "no" >&6; }
15550      # This might be the VS linker. Don't exclude it later on.
15551      CYGWIN_LINK=""
15552    fi
15553  fi
15554
15555  # First-hand choice is to locate and run the vsvars bat file.
15556
15557  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15558    VCVARSFILE="vc/bin/vcvars32.bat"
15559  else
15560    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15561  fi
15562
15563  VS_ENV_CMD=""
15564  VS_ENV_ARGS=""
15565  if test "x$with_toolsdir" != x; then
15566
15567  if test "x$VS_ENV_CMD" = x; then
15568    VS100BASE="$with_toolsdir/../.."
15569    METHOD="--with-tools-dir"
15570
15571  windows_path="$VS100BASE"
15572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15573    unix_path=`$CYGPATH -u "$windows_path"`
15574    VS100BASE="$unix_path"
15575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15577    VS100BASE="$unix_path"
15578  fi
15579
15580    if test -d "$VS100BASE"; then
15581      if test -f "$VS100BASE/$VCVARSFILE"; then
15582        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15583$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15584        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15585      else
15586        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15587$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15588        { $as_echo "$as_me:$LINENO: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15589$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15590      fi
15591    fi
15592  fi
15593
15594  fi
15595
15596  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
15597    # Having specified an argument which is incorrect will produce an instant failure;
15598    # we should not go on looking
15599    { $as_echo "$as_me:$LINENO: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
15600$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
15601    { $as_echo "$as_me:$LINENO: Please point to the VC/bin directory within the Visual Studio installation" >&5
15602$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
15603    { { $as_echo "$as_me:$LINENO: error: Cannot locate a valid Visual Studio installation" >&5
15604$as_echo "$as_me: error: Cannot locate a valid Visual Studio installation" >&2;}
15605   { (exit 1); exit 1; }; }
15606  fi
15607
15608  if test "x$ProgramW6432" != x; then
15609
15610  if test "x$VS_ENV_CMD" = x; then
15611    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
15612    METHOD="well-known name"
15613
15614  windows_path="$WIN_SDK_BASE"
15615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15616    unix_path=`$CYGPATH -u "$windows_path"`
15617    WIN_SDK_BASE="$unix_path"
15618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15620    WIN_SDK_BASE="$unix_path"
15621  fi
15622
15623    if test -d "$WIN_SDK_BASE"; then
15624      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15625        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15626$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15627        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15628        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15629          VS_ENV_ARGS="/x86"
15630        else
15631          VS_ENV_ARGS="/x64"
15632        fi
15633      else
15634        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15635$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15636        { $as_echo "$as_me:$LINENO: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15637$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15638      fi
15639    fi
15640  fi
15641
15642  fi
15643  if test "x$PROGRAMW6432" != x; then
15644
15645  if test "x$VS_ENV_CMD" = x; then
15646    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
15647    METHOD="well-known name"
15648
15649  windows_path="$WIN_SDK_BASE"
15650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15651    unix_path=`$CYGPATH -u "$windows_path"`
15652    WIN_SDK_BASE="$unix_path"
15653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15655    WIN_SDK_BASE="$unix_path"
15656  fi
15657
15658    if test -d "$WIN_SDK_BASE"; then
15659      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15660        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15661$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15662        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15663        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15664          VS_ENV_ARGS="/x86"
15665        else
15666          VS_ENV_ARGS="/x64"
15667        fi
15668      else
15669        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15670$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15671        { $as_echo "$as_me:$LINENO: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15672$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15673      fi
15674    fi
15675  fi
15676
15677  fi
15678  if test "x$PROGRAMFILES" != x; then
15679
15680  if test "x$VS_ENV_CMD" = x; then
15681    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
15682    METHOD="well-known name"
15683
15684  windows_path="$WIN_SDK_BASE"
15685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15686    unix_path=`$CYGPATH -u "$windows_path"`
15687    WIN_SDK_BASE="$unix_path"
15688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15690    WIN_SDK_BASE="$unix_path"
15691  fi
15692
15693    if test -d "$WIN_SDK_BASE"; then
15694      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15695        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15696$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15697        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15698        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15699          VS_ENV_ARGS="/x86"
15700        else
15701          VS_ENV_ARGS="/x64"
15702        fi
15703      else
15704        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15705$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15706        { $as_echo "$as_me:$LINENO: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15707$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15708      fi
15709    fi
15710  fi
15711
15712  fi
15713
15714  if test "x$VS_ENV_CMD" = x; then
15715    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
15716    METHOD="well-known name"
15717
15718  windows_path="$WIN_SDK_BASE"
15719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15720    unix_path=`$CYGPATH -u "$windows_path"`
15721    WIN_SDK_BASE="$unix_path"
15722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15724    WIN_SDK_BASE="$unix_path"
15725  fi
15726
15727    if test -d "$WIN_SDK_BASE"; then
15728      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15729        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15730$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15731        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15732        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15733          VS_ENV_ARGS="/x86"
15734        else
15735          VS_ENV_ARGS="/x64"
15736        fi
15737      else
15738        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15739$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15740        { $as_echo "$as_me:$LINENO: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15741$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15742      fi
15743    fi
15744  fi
15745
15746
15747  if test "x$VS_ENV_CMD" = x; then
15748    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
15749    METHOD="well-known name"
15750
15751  windows_path="$WIN_SDK_BASE"
15752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15753    unix_path=`$CYGPATH -u "$windows_path"`
15754    WIN_SDK_BASE="$unix_path"
15755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15757    WIN_SDK_BASE="$unix_path"
15758  fi
15759
15760    if test -d "$WIN_SDK_BASE"; then
15761      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15762        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15763$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15764        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15765        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15766          VS_ENV_ARGS="/x86"
15767        else
15768          VS_ENV_ARGS="/x64"
15769        fi
15770      else
15771        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15772$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15773        { $as_echo "$as_me:$LINENO: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15774$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15775      fi
15776    fi
15777  fi
15778
15779
15780  if test "x$VS100COMNTOOLS" != x; then
15781
15782  if test "x$VS_ENV_CMD" = x; then
15783    VS100BASE="$VS100COMNTOOLS/../.."
15784    METHOD="VS100COMNTOOLS variable"
15785
15786  windows_path="$VS100BASE"
15787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15788    unix_path=`$CYGPATH -u "$windows_path"`
15789    VS100BASE="$unix_path"
15790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15792    VS100BASE="$unix_path"
15793  fi
15794
15795    if test -d "$VS100BASE"; then
15796      if test -f "$VS100BASE/$VCVARSFILE"; then
15797        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15798$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15799        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15800      else
15801        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15802$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15803        { $as_echo "$as_me:$LINENO: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15804$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15805      fi
15806    fi
15807  fi
15808
15809  fi
15810  if test "x$PROGRAMFILES" != x; then
15811
15812  if test "x$VS_ENV_CMD" = x; then
15813    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
15814    METHOD="well-known name"
15815
15816  windows_path="$VS100BASE"
15817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15818    unix_path=`$CYGPATH -u "$windows_path"`
15819    VS100BASE="$unix_path"
15820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15822    VS100BASE="$unix_path"
15823  fi
15824
15825    if test -d "$VS100BASE"; then
15826      if test -f "$VS100BASE/$VCVARSFILE"; then
15827        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15828$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15829        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15830      else
15831        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15832$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15833        { $as_echo "$as_me:$LINENO: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15834$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15835      fi
15836    fi
15837  fi
15838
15839  fi
15840
15841  if test "x$VS_ENV_CMD" = x; then
15842    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
15843    METHOD="well-known name"
15844
15845  windows_path="$VS100BASE"
15846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15847    unix_path=`$CYGPATH -u "$windows_path"`
15848    VS100BASE="$unix_path"
15849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15851    VS100BASE="$unix_path"
15852  fi
15853
15854    if test -d "$VS100BASE"; then
15855      if test -f "$VS100BASE/$VCVARSFILE"; then
15856        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15857$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15858        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15859      else
15860        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15861$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15862        { $as_echo "$as_me:$LINENO: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15863$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15864      fi
15865    fi
15866  fi
15867
15868
15869  if test "x$VS_ENV_CMD" = x; then
15870    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
15871    METHOD="well-known name"
15872
15873  windows_path="$VS100BASE"
15874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15875    unix_path=`$CYGPATH -u "$windows_path"`
15876    VS100BASE="$unix_path"
15877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15879    VS100BASE="$unix_path"
15880  fi
15881
15882    if test -d "$VS100BASE"; then
15883      if test -f "$VS100BASE/$VCVARSFILE"; then
15884        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15885$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15886        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15887      else
15888        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15889$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15890        { $as_echo "$as_me:$LINENO: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15891$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15892      fi
15893    fi
15894  fi
15895
15896
15897  if test "x$VS_ENV_CMD" != x; then
15898    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
15899
15900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15901
15902  # First separate the path from the arguments. This will split at the first
15903  # space.
15904  complete="$VS_ENV_CMD"
15905  path="${complete%% *}"
15906  tmp="$complete EOL"
15907  arguments="${tmp#* }"
15908
15909  # Input might be given as Windows format, start by converting to
15910  # unix format.
15911  new_path=`$CYGPATH -u "$path"`
15912
15913  # Now try to locate executable using which
15914  new_path=`$WHICH "$new_path" 2> /dev/null`
15915  # bat and cmd files are not always considered executable in cygwin causing which
15916  # to not find them
15917  if test "x$new_path" = x \
15918           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15919           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15920    new_path=`$CYGPATH -u "$path"`
15921  fi
15922  if test "x$new_path" = x; then
15923    # Oops. Which didn't find the executable.
15924    # The splitting of arguments from the executable at a space might have been incorrect,
15925    # since paths with space are more likely in Windows. Give it another try with the whole
15926    # argument.
15927    path="$complete"
15928    arguments="EOL"
15929    new_path=`$CYGPATH -u "$path"`
15930    new_path=`$WHICH "$new_path" 2> /dev/null`
15931    # bat and cmd files are not always considered executable in cygwin causing which
15932    # to not find them
15933    if test "x$new_path" = x \
15934             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15935             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15936      new_path=`$CYGPATH -u "$path"`
15937    fi
15938    if test "x$new_path" = x; then
15939      # It's still not found. Now this is an unrecoverable error.
15940      { $as_echo "$as_me:$LINENO: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
15941$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
15942      has_space=`$ECHO "$complete" | $GREP " "`
15943      if test "x$has_space" != x; then
15944        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15945$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15946      fi
15947      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of VS_ENV_CMD" >&5
15948$as_echo "$as_me: error: Cannot locate the the path of VS_ENV_CMD" >&2;}
15949   { (exit 1); exit 1; }; }
15950    fi
15951  fi
15952
15953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15956  # "foo.exe" is OK but "foo" is an error.
15957  #
15958  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15959  # It is also a way to make sure we got the proper file name for the real test later on.
15960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15961  if test "x$test_shortpath" = x; then
15962    # Short path failed, file does not exist as specified.
15963    # Try adding .exe or .cmd
15964    if test -f "${new_path}.exe"; then
15965       input_to_shortpath="${new_path}.exe"
15966    elif test -f "${new_path}.cmd"; then
15967       input_to_shortpath="${new_path}.cmd"
15968    else
15969      { $as_echo "$as_me:$LINENO: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
15970$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
15971      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15972$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15973      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of VS_ENV_CMD" >&5
15974$as_echo "$as_me: error: Cannot locate the the path of VS_ENV_CMD" >&2;}
15975   { (exit 1); exit 1; }; }
15976    fi
15977  else
15978    input_to_shortpath="$new_path"
15979  fi
15980
15981  # Call helper function which possibly converts this using DOS-style short mode.
15982  # If so, the updated path is stored in $new_path.
15983  new_path="$input_to_shortpath"
15984
15985  input_path="$input_to_shortpath"
15986  # Check if we need to convert this using DOS-style short mode. If the path
15987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15988  # take no chances and rewrite it.
15989  # Note: m4 eats our [], so we need to use [ and ] instead.
15990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15991  if test "x$has_forbidden_chars" != x; then
15992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15993    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15994    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15995    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15996      # Going to short mode and back again did indeed matter. Since short mode is
15997      # case insensitive, let's make it lowercase to improve readability.
15998      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15999      # Now convert it back to Unix-stile (cygpath)
16000      input_path=`$CYGPATH -u "$shortmode_path"`
16001      new_path="$input_path"
16002    fi
16003  fi
16004
16005  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16006  if test "x$test_cygdrive_prefix" = x; then
16007    # As a simple fix, exclude /usr/bin since it's not a real path.
16008    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16009      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16010      # a path prefixed by /cygdrive for fixpath to work.
16011      new_path="$CYGWIN_ROOT_PATH$input_path"
16012    fi
16013  fi
16014
16015  # remove trailing .exe if any
16016  new_path="${new_path/%.exe/}"
16017
16018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16019
16020  # First separate the path from the arguments. This will split at the first
16021  # space.
16022  complete="$VS_ENV_CMD"
16023  path="${complete%% *}"
16024  tmp="$complete EOL"
16025  arguments="${tmp#* }"
16026
16027  # Input might be given as Windows format, start by converting to
16028  # unix format.
16029  new_path="$path"
16030
16031  windows_path="$new_path"
16032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16033    unix_path=`$CYGPATH -u "$windows_path"`
16034    new_path="$unix_path"
16035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16037    new_path="$unix_path"
16038  fi
16039
16040
16041  # Now try to locate executable using which
16042  new_path=`$WHICH "$new_path" 2> /dev/null`
16043
16044  if test "x$new_path" = x; then
16045    # Oops. Which didn't find the executable.
16046    # The splitting of arguments from the executable at a space might have been incorrect,
16047    # since paths with space are more likely in Windows. Give it another try with the whole
16048    # argument.
16049    path="$complete"
16050    arguments="EOL"
16051    new_path="$path"
16052
16053  windows_path="$new_path"
16054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16055    unix_path=`$CYGPATH -u "$windows_path"`
16056    new_path="$unix_path"
16057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16059    new_path="$unix_path"
16060  fi
16061
16062
16063    new_path=`$WHICH "$new_path" 2> /dev/null`
16064
16065    if test "x$new_path" = x; then
16066      # It's still not found. Now this is an unrecoverable error.
16067      { $as_echo "$as_me:$LINENO: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16068$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16069      has_space=`$ECHO "$complete" | $GREP " "`
16070      if test "x$has_space" != x; then
16071        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16073      fi
16074      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of VS_ENV_CMD" >&5
16075$as_echo "$as_me: error: Cannot locate the the path of VS_ENV_CMD" >&2;}
16076   { (exit 1); exit 1; }; }
16077    fi
16078  fi
16079
16080  # Now new_path has a complete unix path to the binary
16081  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16082    # Keep paths in /bin as-is, but remove trailing .exe if any
16083    new_path="${new_path/%.exe/}"
16084    # Do not save /bin paths to all_fixpath_prefixes!
16085  else
16086    # Not in mixed or Windows style, start by that.
16087    new_path=`cmd //c echo $new_path`
16088
16089  input_path="$new_path"
16090  # Check if we need to convert this using DOS-style short mode. If the path
16091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16092  # take no chances and rewrite it.
16093  # Note: m4 eats our [], so we need to use [ and ] instead.
16094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16095  if test "x$has_forbidden_chars" != x; then
16096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16098  fi
16099
16100    # Output is in $new_path
16101
16102  windows_path="$new_path"
16103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16104    unix_path=`$CYGPATH -u "$windows_path"`
16105    new_path="$unix_path"
16106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16108    new_path="$unix_path"
16109  fi
16110
16111    # remove trailing .exe if any
16112    new_path="${new_path/%.exe/}"
16113
16114    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16115    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16116  fi
16117
16118  else
16119    # We're on a posix platform. Hooray! :)
16120    # First separate the path from the arguments. This will split at the first
16121    # space.
16122    complete="$VS_ENV_CMD"
16123    path="${complete%% *}"
16124    tmp="$complete EOL"
16125    arguments="${tmp#* }"
16126
16127    new_path=`$WHICH $path 2> /dev/null`
16128    if test "x$new_path" = x; then
16129      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16130      if test "x$is_absolute_path" != x; then
16131        { $as_echo "$as_me:$LINENO: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&5
16132$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&6;}
16133        new_path="$path"
16134      else
16135        { $as_echo "$as_me:$LINENO: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16136$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16137        has_space=`$ECHO "$complete" | $GREP " "`
16138        if test "x$has_space" != x; then
16139          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
16140$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16141        fi
16142        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of VS_ENV_CMD" >&5
16143$as_echo "$as_me: error: Cannot locate the the path of VS_ENV_CMD" >&2;}
16144   { (exit 1); exit 1; }; }
16145      fi
16146    fi
16147  fi
16148
16149  # Now join together the path and the arguments once again
16150  if test "x$arguments" != xEOL; then
16151      new_complete="$new_path ${arguments% *}"
16152  else
16153      new_complete="$new_path"
16154  fi
16155
16156  if test "x$complete" != "x$new_complete"; then
16157    VS_ENV_CMD="$new_complete"
16158    { $as_echo "$as_me:$LINENO: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16159$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16160  fi
16161
16162
16163    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16164    { $as_echo "$as_me:$LINENO: Trying to extract Visual Studio environment variables" >&5
16165$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16166    cd $OUTPUT_ROOT
16167    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16168    # to autoconf standards.
16169
16170    #----
16171
16172    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16173    # but calculate the difference in Cygwin environment before/after running it and then
16174    # apply the diff.
16175
16176    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16177      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16178      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16179      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16180    else
16181      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16182      _dosbash=`cmd //c echo \`which bash\``
16183    fi
16184
16185    # generate the set of exported vars before/after the vs10 setup
16186    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16187    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16188    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16189    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16190
16191    # Now execute the newly created bat file.
16192    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16193    cmd /c localdevenvtmp.bat | cat
16194
16195    # apply the diff (less some non-vs10 vars named by "!")
16196    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16197    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16198    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16199
16200    # cleanup
16201    $RM localdevenvtmp*
16202    #----
16203    cd $CURDIR
16204    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16205      { $as_echo "$as_me:$LINENO: result: no" >&5
16206$as_echo "no" >&6; }
16207      { $as_echo "$as_me:$LINENO: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16208$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16209      { $as_echo "$as_me:$LINENO: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16210$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16211      { $as_echo "$as_me:$LINENO: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16212$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16213      { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
16214$as_echo "$as_me: error: Cannot continue" >&2;}
16215   { (exit 1); exit 1; }; }
16216    fi
16217
16218    # Now set all paths and other env variables. This will allow the rest of
16219    # the configure script to find and run the compiler in the proper way.
16220    { $as_echo "$as_me:$LINENO: Setting extracted environment variables" >&5
16221$as_echo "$as_me: Setting extracted environment variables" >&6;}
16222    . $OUTPUT_ROOT/localdevenv.sh
16223  else
16224    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16225    { $as_echo "$as_me:$LINENO: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16226$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16227  fi
16228
16229  # At this point, we should have corrent variables in the environment, or we can't continue.
16230  { $as_echo "$as_me:$LINENO: checking for Visual Studio variables" >&5
16231$as_echo_n "checking for Visual Studio variables... " >&6; }
16232
16233  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16234    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16235      { $as_echo "$as_me:$LINENO: result: present but broken" >&5
16236$as_echo "present but broken" >&6; }
16237      { { $as_echo "$as_me:$LINENO: error: Your VC command prompt seems broken, INCLUDE and/or LIB is missing." >&5
16238$as_echo "$as_me: error: Your VC command prompt seems broken, INCLUDE and/or LIB is missing." >&2;}
16239   { (exit 1); exit 1; }; }
16240    else
16241      { $as_echo "$as_me:$LINENO: result: ok" >&5
16242$as_echo "ok" >&6; }
16243      VS_INCLUDE="$INCLUDE"
16244      VS_LIB="$LIB"
16245      VS_PATH="$PATH"
16246
16247
16248
16249    fi
16250  else
16251    { $as_echo "$as_me:$LINENO: result: not found" >&5
16252$as_echo "not found" >&6; }
16253
16254    if test "x$VS_ENV_CMD" = x; then
16255      { $as_echo "$as_me:$LINENO: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16256$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16257      { $as_echo "$as_me:$LINENO: nor is this script run from a Visual Studio command prompt." >&5
16258$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16259    else
16260      { $as_echo "$as_me:$LINENO: Running the extraction script failed." >&5
16261$as_echo "$as_me: Running the extraction script failed." >&6;}
16262    fi
16263    { $as_echo "$as_me:$LINENO: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16264$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16265    { $as_echo "$as_me:$LINENO: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16266$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16267    { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
16268$as_echo "$as_me: error: Cannot continue" >&2;}
16269   { (exit 1); exit 1; }; }
16270  fi
16271
16272  { $as_echo "$as_me:$LINENO: checking for msvcr100.dll" >&5
16273$as_echo_n "checking for msvcr100.dll... " >&6; }
16274
16275# Check whether --with-msvcr-dll was given.
16276if test "${with_msvcr_dll+set}" = set; then
16277  withval=$with_msvcr_dll;
16278fi
16279
16280  if test "x$with_msvcr_dll" != x; then
16281    MSVCR_DLL="$with_msvcr_dll"
16282  else
16283    if test "x$VCINSTALLDIR" != x; then
16284      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16285        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16286      else
16287        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16288        if test "x$MSVCR_DLL" = x; then
16289          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16290        fi
16291      fi
16292      if test "x$MSVCR_DLL" != x; then
16293        { $as_echo "$as_me:$LINENO: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16294$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16295      else
16296        { $as_echo "$as_me:$LINENO: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16297$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16298      fi
16299    fi
16300    if test "x$MSVCR_DLL" = x; then
16301      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16302        { $as_echo "$as_me:$LINENO: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16303$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16304        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16305      fi
16306    fi
16307  fi
16308  if test "x$MSVCR_DLL" = x; then
16309    { $as_echo "$as_me:$LINENO: result: no" >&5
16310$as_echo "no" >&6; }
16311    { { $as_echo "$as_me:$LINENO: error: Could not find msvcr100.dll !" >&5
16312$as_echo "$as_me: error: Could not find msvcr100.dll !" >&2;}
16313   { (exit 1); exit 1; }; }
16314  fi
16315  { $as_echo "$as_me:$LINENO: result: $MSVCR_DLL" >&5
16316$as_echo "$MSVCR_DLL" >&6; }
16317
16318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16319
16320  # Input might be given as Windows format, start by converting to
16321  # unix format.
16322  path="$MSVCR_DLL"
16323  new_path=`$CYGPATH -u "$path"`
16324
16325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16328  # "foo.exe" is OK but "foo" is an error.
16329  #
16330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16331  # It is also a way to make sure we got the proper file name for the real test later on.
16332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16333  if test "x$test_shortpath" = x; then
16334    { $as_echo "$as_me:$LINENO: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16335$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16336    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MSVCR_DLL" >&5
16337$as_echo "$as_me: error: Cannot locate the the path of MSVCR_DLL" >&2;}
16338   { (exit 1); exit 1; }; }
16339  fi
16340
16341  # Call helper function which possibly converts this using DOS-style short mode.
16342  # If so, the updated path is stored in $new_path.
16343
16344  input_path="$new_path"
16345  # Check if we need to convert this using DOS-style short mode. If the path
16346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16347  # take no chances and rewrite it.
16348  # Note: m4 eats our [], so we need to use [ and ] instead.
16349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16350  if test "x$has_forbidden_chars" != x; then
16351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16355      # Going to short mode and back again did indeed matter. Since short mode is
16356      # case insensitive, let's make it lowercase to improve readability.
16357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16358      # Now convert it back to Unix-stile (cygpath)
16359      input_path=`$CYGPATH -u "$shortmode_path"`
16360      new_path="$input_path"
16361    fi
16362  fi
16363
16364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16365  if test "x$test_cygdrive_prefix" = x; then
16366    # As a simple fix, exclude /usr/bin since it's not a real path.
16367    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16369      # a path prefixed by /cygdrive for fixpath to work.
16370      new_path="$CYGWIN_ROOT_PATH$input_path"
16371    fi
16372  fi
16373
16374
16375  if test "x$path" != "x$new_path"; then
16376    MSVCR_DLL="$new_path"
16377    { $as_echo "$as_me:$LINENO: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16378$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16379  fi
16380
16381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16382
16383  path="$MSVCR_DLL"
16384  has_colon=`$ECHO $path | $GREP ^.:`
16385  new_path="$path"
16386  if test "x$has_colon" = x; then
16387    # Not in mixed or Windows style, start by that.
16388    new_path=`cmd //c echo $path`
16389  fi
16390
16391
16392  input_path="$new_path"
16393  # Check if we need to convert this using DOS-style short mode. If the path
16394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16395  # take no chances and rewrite it.
16396  # Note: m4 eats our [], so we need to use [ and ] instead.
16397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16398  if test "x$has_forbidden_chars" != x; then
16399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16401  fi
16402
16403
16404  windows_path="$new_path"
16405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16406    unix_path=`$CYGPATH -u "$windows_path"`
16407    new_path="$unix_path"
16408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16410    new_path="$unix_path"
16411  fi
16412
16413  if test "x$path" != "x$new_path"; then
16414    MSVCR_DLL="$new_path"
16415    { $as_echo "$as_me:$LINENO: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16416$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16417  fi
16418
16419  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16420  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16421
16422  else
16423    # We're on a posix platform. Hooray! :)
16424    path="$MSVCR_DLL"
16425
16426    if test ! -f "$path" && test ! -d "$path"; then
16427      { { $as_echo "$as_me:$LINENO: error: The path of MSVCR_DLL, which resolves as \"$path\", is not found." >&5
16428$as_echo "$as_me: error: The path of MSVCR_DLL, which resolves as \"$path\", is not found." >&2;}
16429   { (exit 1); exit 1; }; }
16430    fi
16431
16432    has_space=`$ECHO "$path" | $GREP " "`
16433    if test "x$has_space" != x; then
16434      { $as_echo "$as_me:$LINENO: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16435$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16436      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
16437$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
16438   { (exit 1); exit 1; }; }
16439    fi
16440  fi
16441
16442
16443fi
16444
16445
16446
16447# If --build AND --host is set, then the configure script will find any
16448# cross compilation tools in the PATH. Cross compilation tools
16449# follows the cross compilation standard where they are prefixed with ${host}.
16450# For example the binary i686-sun-solaris2.10-gcc
16451# will cross compile for i686-sun-solaris2.10
16452# If neither of build and host is not set, then build=host and the
16453# default compiler found in the path will be used.
16454# Setting only --host, does not seem to be really supported.
16455# Please set both --build and --host if you want to cross compile.
16456
16457if test "x$COMPILE_TYPE" = "xcross"; then
16458    # Now we to find a C/C++ compiler that can build executables for the build
16459    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16460    # once. Also, we need to do this before adding a tools dir to the path,
16461    # otherwise we might pick up cross-compilers which don't use standard naming.
16462    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16463    # to wait until they are properly discovered.
16464    for ac_prog in cl cc gcc
16465do
16466  # Extract the first word of "$ac_prog", so it can be a program name with args.
16467set dummy $ac_prog; ac_word=$2
16468{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16469$as_echo_n "checking for $ac_word... " >&6; }
16470if test "${ac_cv_path_BUILD_CC+set}" = set; then
16471  $as_echo_n "(cached) " >&6
16472else
16473  case $BUILD_CC in
16474  [\\/]* | ?:[\\/]*)
16475  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16476  ;;
16477  *)
16478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16479for as_dir in $PATH
16480do
16481  IFS=$as_save_IFS
16482  test -z "$as_dir" && as_dir=.
16483  for ac_exec_ext in '' $ac_executable_extensions; do
16484  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16485    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16486    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16487    break 2
16488  fi
16489done
16490done
16491IFS=$as_save_IFS
16492
16493  ;;
16494esac
16495fi
16496BUILD_CC=$ac_cv_path_BUILD_CC
16497if test -n "$BUILD_CC"; then
16498  { $as_echo "$as_me:$LINENO: result: $BUILD_CC" >&5
16499$as_echo "$BUILD_CC" >&6; }
16500else
16501  { $as_echo "$as_me:$LINENO: result: no" >&5
16502$as_echo "no" >&6; }
16503fi
16504
16505
16506  test -n "$BUILD_CC" && break
16507done
16508
16509
16510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16511
16512  # First separate the path from the arguments. This will split at the first
16513  # space.
16514  complete="$BUILD_CC"
16515  path="${complete%% *}"
16516  tmp="$complete EOL"
16517  arguments="${tmp#* }"
16518
16519  # Input might be given as Windows format, start by converting to
16520  # unix format.
16521  new_path=`$CYGPATH -u "$path"`
16522
16523  # Now try to locate executable using which
16524  new_path=`$WHICH "$new_path" 2> /dev/null`
16525  # bat and cmd files are not always considered executable in cygwin causing which
16526  # to not find them
16527  if test "x$new_path" = x \
16528           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16529           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16530    new_path=`$CYGPATH -u "$path"`
16531  fi
16532  if test "x$new_path" = x; then
16533    # Oops. Which didn't find the executable.
16534    # The splitting of arguments from the executable at a space might have been incorrect,
16535    # since paths with space are more likely in Windows. Give it another try with the whole
16536    # argument.
16537    path="$complete"
16538    arguments="EOL"
16539    new_path=`$CYGPATH -u "$path"`
16540    new_path=`$WHICH "$new_path" 2> /dev/null`
16541    # bat and cmd files are not always considered executable in cygwin causing which
16542    # to not find them
16543    if test "x$new_path" = x \
16544             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16545             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16546      new_path=`$CYGPATH -u "$path"`
16547    fi
16548    if test "x$new_path" = x; then
16549      # It's still not found. Now this is an unrecoverable error.
16550      { $as_echo "$as_me:$LINENO: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16551$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16552      has_space=`$ECHO "$complete" | $GREP " "`
16553      if test "x$has_space" != x; then
16554        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16555$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16556      fi
16557      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CC" >&5
16558$as_echo "$as_me: error: Cannot locate the the path of BUILD_CC" >&2;}
16559   { (exit 1); exit 1; }; }
16560    fi
16561  fi
16562
16563  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16564  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16565  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16566  # "foo.exe" is OK but "foo" is an error.
16567  #
16568  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16569  # It is also a way to make sure we got the proper file name for the real test later on.
16570  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16571  if test "x$test_shortpath" = x; then
16572    # Short path failed, file does not exist as specified.
16573    # Try adding .exe or .cmd
16574    if test -f "${new_path}.exe"; then
16575       input_to_shortpath="${new_path}.exe"
16576    elif test -f "${new_path}.cmd"; then
16577       input_to_shortpath="${new_path}.cmd"
16578    else
16579      { $as_echo "$as_me:$LINENO: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
16580$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
16581      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16582$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16583      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CC" >&5
16584$as_echo "$as_me: error: Cannot locate the the path of BUILD_CC" >&2;}
16585   { (exit 1); exit 1; }; }
16586    fi
16587  else
16588    input_to_shortpath="$new_path"
16589  fi
16590
16591  # Call helper function which possibly converts this using DOS-style short mode.
16592  # If so, the updated path is stored in $new_path.
16593  new_path="$input_to_shortpath"
16594
16595  input_path="$input_to_shortpath"
16596  # Check if we need to convert this using DOS-style short mode. If the path
16597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16598  # take no chances and rewrite it.
16599  # Note: m4 eats our [], so we need to use [ and ] instead.
16600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16601  if test "x$has_forbidden_chars" != x; then
16602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16603    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16604    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16605    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16606      # Going to short mode and back again did indeed matter. Since short mode is
16607      # case insensitive, let's make it lowercase to improve readability.
16608      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16609      # Now convert it back to Unix-stile (cygpath)
16610      input_path=`$CYGPATH -u "$shortmode_path"`
16611      new_path="$input_path"
16612    fi
16613  fi
16614
16615  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16616  if test "x$test_cygdrive_prefix" = x; then
16617    # As a simple fix, exclude /usr/bin since it's not a real path.
16618    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16619      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16620      # a path prefixed by /cygdrive for fixpath to work.
16621      new_path="$CYGWIN_ROOT_PATH$input_path"
16622    fi
16623  fi
16624
16625  # remove trailing .exe if any
16626  new_path="${new_path/%.exe/}"
16627
16628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16629
16630  # First separate the path from the arguments. This will split at the first
16631  # space.
16632  complete="$BUILD_CC"
16633  path="${complete%% *}"
16634  tmp="$complete EOL"
16635  arguments="${tmp#* }"
16636
16637  # Input might be given as Windows format, start by converting to
16638  # unix format.
16639  new_path="$path"
16640
16641  windows_path="$new_path"
16642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16643    unix_path=`$CYGPATH -u "$windows_path"`
16644    new_path="$unix_path"
16645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16647    new_path="$unix_path"
16648  fi
16649
16650
16651  # Now try to locate executable using which
16652  new_path=`$WHICH "$new_path" 2> /dev/null`
16653
16654  if test "x$new_path" = x; then
16655    # Oops. Which didn't find the executable.
16656    # The splitting of arguments from the executable at a space might have been incorrect,
16657    # since paths with space are more likely in Windows. Give it another try with the whole
16658    # argument.
16659    path="$complete"
16660    arguments="EOL"
16661    new_path="$path"
16662
16663  windows_path="$new_path"
16664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16665    unix_path=`$CYGPATH -u "$windows_path"`
16666    new_path="$unix_path"
16667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16669    new_path="$unix_path"
16670  fi
16671
16672
16673    new_path=`$WHICH "$new_path" 2> /dev/null`
16674
16675    if test "x$new_path" = x; then
16676      # It's still not found. Now this is an unrecoverable error.
16677      { $as_echo "$as_me:$LINENO: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16678$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16679      has_space=`$ECHO "$complete" | $GREP " "`
16680      if test "x$has_space" != x; then
16681        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16682$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16683      fi
16684      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CC" >&5
16685$as_echo "$as_me: error: Cannot locate the the path of BUILD_CC" >&2;}
16686   { (exit 1); exit 1; }; }
16687    fi
16688  fi
16689
16690  # Now new_path has a complete unix path to the binary
16691  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16692    # Keep paths in /bin as-is, but remove trailing .exe if any
16693    new_path="${new_path/%.exe/}"
16694    # Do not save /bin paths to all_fixpath_prefixes!
16695  else
16696    # Not in mixed or Windows style, start by that.
16697    new_path=`cmd //c echo $new_path`
16698
16699  input_path="$new_path"
16700  # Check if we need to convert this using DOS-style short mode. If the path
16701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16702  # take no chances and rewrite it.
16703  # Note: m4 eats our [], so we need to use [ and ] instead.
16704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16705  if test "x$has_forbidden_chars" != x; then
16706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16708  fi
16709
16710    # Output is in $new_path
16711
16712  windows_path="$new_path"
16713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16714    unix_path=`$CYGPATH -u "$windows_path"`
16715    new_path="$unix_path"
16716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16718    new_path="$unix_path"
16719  fi
16720
16721    # remove trailing .exe if any
16722    new_path="${new_path/%.exe/}"
16723
16724    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16725    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16726  fi
16727
16728  else
16729    # We're on a posix platform. Hooray! :)
16730    # First separate the path from the arguments. This will split at the first
16731    # space.
16732    complete="$BUILD_CC"
16733    path="${complete%% *}"
16734    tmp="$complete EOL"
16735    arguments="${tmp#* }"
16736
16737    new_path=`$WHICH $path 2> /dev/null`
16738    if test "x$new_path" = x; then
16739      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16740      if test "x$is_absolute_path" != x; then
16741        { $as_echo "$as_me:$LINENO: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&5
16742$as_echo "$as_me: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&6;}
16743        new_path="$path"
16744      else
16745        { $as_echo "$as_me:$LINENO: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16746$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16747        has_space=`$ECHO "$complete" | $GREP " "`
16748        if test "x$has_space" != x; then
16749          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
16750$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16751        fi
16752        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CC" >&5
16753$as_echo "$as_me: error: Cannot locate the the path of BUILD_CC" >&2;}
16754   { (exit 1); exit 1; }; }
16755      fi
16756    fi
16757  fi
16758
16759  # Now join together the path and the arguments once again
16760  if test "x$arguments" != xEOL; then
16761      new_complete="$new_path ${arguments% *}"
16762  else
16763      new_complete="$new_path"
16764  fi
16765
16766  if test "x$complete" != "x$new_complete"; then
16767    BUILD_CC="$new_complete"
16768    { $as_echo "$as_me:$LINENO: Rewriting BUILD_CC to \"$new_complete\"" >&5
16769$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
16770  fi
16771
16772    for ac_prog in cl CC g++
16773do
16774  # Extract the first word of "$ac_prog", so it can be a program name with args.
16775set dummy $ac_prog; ac_word=$2
16776{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16777$as_echo_n "checking for $ac_word... " >&6; }
16778if test "${ac_cv_path_BUILD_CXX+set}" = set; then
16779  $as_echo_n "(cached) " >&6
16780else
16781  case $BUILD_CXX in
16782  [\\/]* | ?:[\\/]*)
16783  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
16784  ;;
16785  *)
16786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16787for as_dir in $PATH
16788do
16789  IFS=$as_save_IFS
16790  test -z "$as_dir" && as_dir=.
16791  for ac_exec_ext in '' $ac_executable_extensions; do
16792  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16793    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
16794    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16795    break 2
16796  fi
16797done
16798done
16799IFS=$as_save_IFS
16800
16801  ;;
16802esac
16803fi
16804BUILD_CXX=$ac_cv_path_BUILD_CXX
16805if test -n "$BUILD_CXX"; then
16806  { $as_echo "$as_me:$LINENO: result: $BUILD_CXX" >&5
16807$as_echo "$BUILD_CXX" >&6; }
16808else
16809  { $as_echo "$as_me:$LINENO: result: no" >&5
16810$as_echo "no" >&6; }
16811fi
16812
16813
16814  test -n "$BUILD_CXX" && break
16815done
16816
16817
16818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16819
16820  # First separate the path from the arguments. This will split at the first
16821  # space.
16822  complete="$BUILD_CXX"
16823  path="${complete%% *}"
16824  tmp="$complete EOL"
16825  arguments="${tmp#* }"
16826
16827  # Input might be given as Windows format, start by converting to
16828  # unix format.
16829  new_path=`$CYGPATH -u "$path"`
16830
16831  # Now try to locate executable using which
16832  new_path=`$WHICH "$new_path" 2> /dev/null`
16833  # bat and cmd files are not always considered executable in cygwin causing which
16834  # to not find them
16835  if test "x$new_path" = x \
16836           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16837           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16838    new_path=`$CYGPATH -u "$path"`
16839  fi
16840  if test "x$new_path" = x; then
16841    # Oops. Which didn't find the executable.
16842    # The splitting of arguments from the executable at a space might have been incorrect,
16843    # since paths with space are more likely in Windows. Give it another try with the whole
16844    # argument.
16845    path="$complete"
16846    arguments="EOL"
16847    new_path=`$CYGPATH -u "$path"`
16848    new_path=`$WHICH "$new_path" 2> /dev/null`
16849    # bat and cmd files are not always considered executable in cygwin causing which
16850    # to not find them
16851    if test "x$new_path" = x \
16852             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16853             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16854      new_path=`$CYGPATH -u "$path"`
16855    fi
16856    if test "x$new_path" = x; then
16857      # It's still not found. Now this is an unrecoverable error.
16858      { $as_echo "$as_me:$LINENO: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
16859$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
16860      has_space=`$ECHO "$complete" | $GREP " "`
16861      if test "x$has_space" != x; then
16862        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16863$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16864      fi
16865      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CXX" >&5
16866$as_echo "$as_me: error: Cannot locate the the path of BUILD_CXX" >&2;}
16867   { (exit 1); exit 1; }; }
16868    fi
16869  fi
16870
16871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16874  # "foo.exe" is OK but "foo" is an error.
16875  #
16876  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16877  # It is also a way to make sure we got the proper file name for the real test later on.
16878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16879  if test "x$test_shortpath" = x; then
16880    # Short path failed, file does not exist as specified.
16881    # Try adding .exe or .cmd
16882    if test -f "${new_path}.exe"; then
16883       input_to_shortpath="${new_path}.exe"
16884    elif test -f "${new_path}.cmd"; then
16885       input_to_shortpath="${new_path}.cmd"
16886    else
16887      { $as_echo "$as_me:$LINENO: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
16888$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
16889      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16890$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16891      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CXX" >&5
16892$as_echo "$as_me: error: Cannot locate the the path of BUILD_CXX" >&2;}
16893   { (exit 1); exit 1; }; }
16894    fi
16895  else
16896    input_to_shortpath="$new_path"
16897  fi
16898
16899  # Call helper function which possibly converts this using DOS-style short mode.
16900  # If so, the updated path is stored in $new_path.
16901  new_path="$input_to_shortpath"
16902
16903  input_path="$input_to_shortpath"
16904  # Check if we need to convert this using DOS-style short mode. If the path
16905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16906  # take no chances and rewrite it.
16907  # Note: m4 eats our [], so we need to use [ and ] instead.
16908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16909  if test "x$has_forbidden_chars" != x; then
16910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16914      # Going to short mode and back again did indeed matter. Since short mode is
16915      # case insensitive, let's make it lowercase to improve readability.
16916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16917      # Now convert it back to Unix-stile (cygpath)
16918      input_path=`$CYGPATH -u "$shortmode_path"`
16919      new_path="$input_path"
16920    fi
16921  fi
16922
16923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16924  if test "x$test_cygdrive_prefix" = x; then
16925    # As a simple fix, exclude /usr/bin since it's not a real path.
16926    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16928      # a path prefixed by /cygdrive for fixpath to work.
16929      new_path="$CYGWIN_ROOT_PATH$input_path"
16930    fi
16931  fi
16932
16933  # remove trailing .exe if any
16934  new_path="${new_path/%.exe/}"
16935
16936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16937
16938  # First separate the path from the arguments. This will split at the first
16939  # space.
16940  complete="$BUILD_CXX"
16941  path="${complete%% *}"
16942  tmp="$complete EOL"
16943  arguments="${tmp#* }"
16944
16945  # Input might be given as Windows format, start by converting to
16946  # unix format.
16947  new_path="$path"
16948
16949  windows_path="$new_path"
16950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16951    unix_path=`$CYGPATH -u "$windows_path"`
16952    new_path="$unix_path"
16953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16955    new_path="$unix_path"
16956  fi
16957
16958
16959  # Now try to locate executable using which
16960  new_path=`$WHICH "$new_path" 2> /dev/null`
16961
16962  if test "x$new_path" = x; then
16963    # Oops. Which didn't find the executable.
16964    # The splitting of arguments from the executable at a space might have been incorrect,
16965    # since paths with space are more likely in Windows. Give it another try with the whole
16966    # argument.
16967    path="$complete"
16968    arguments="EOL"
16969    new_path="$path"
16970
16971  windows_path="$new_path"
16972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16973    unix_path=`$CYGPATH -u "$windows_path"`
16974    new_path="$unix_path"
16975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16977    new_path="$unix_path"
16978  fi
16979
16980
16981    new_path=`$WHICH "$new_path" 2> /dev/null`
16982
16983    if test "x$new_path" = x; then
16984      # It's still not found. Now this is an unrecoverable error.
16985      { $as_echo "$as_me:$LINENO: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
16986$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
16987      has_space=`$ECHO "$complete" | $GREP " "`
16988      if test "x$has_space" != x; then
16989        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16991      fi
16992      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CXX" >&5
16993$as_echo "$as_me: error: Cannot locate the the path of BUILD_CXX" >&2;}
16994   { (exit 1); exit 1; }; }
16995    fi
16996  fi
16997
16998  # Now new_path has a complete unix path to the binary
16999  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17000    # Keep paths in /bin as-is, but remove trailing .exe if any
17001    new_path="${new_path/%.exe/}"
17002    # Do not save /bin paths to all_fixpath_prefixes!
17003  else
17004    # Not in mixed or Windows style, start by that.
17005    new_path=`cmd //c echo $new_path`
17006
17007  input_path="$new_path"
17008  # Check if we need to convert this using DOS-style short mode. If the path
17009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17010  # take no chances and rewrite it.
17011  # Note: m4 eats our [], so we need to use [ and ] instead.
17012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17013  if test "x$has_forbidden_chars" != x; then
17014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17015    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17016  fi
17017
17018    # Output is in $new_path
17019
17020  windows_path="$new_path"
17021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17022    unix_path=`$CYGPATH -u "$windows_path"`
17023    new_path="$unix_path"
17024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17026    new_path="$unix_path"
17027  fi
17028
17029    # remove trailing .exe if any
17030    new_path="${new_path/%.exe/}"
17031
17032    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17033    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17034  fi
17035
17036  else
17037    # We're on a posix platform. Hooray! :)
17038    # First separate the path from the arguments. This will split at the first
17039    # space.
17040    complete="$BUILD_CXX"
17041    path="${complete%% *}"
17042    tmp="$complete EOL"
17043    arguments="${tmp#* }"
17044
17045    new_path=`$WHICH $path 2> /dev/null`
17046    if test "x$new_path" = x; then
17047      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17048      if test "x$is_absolute_path" != x; then
17049        { $as_echo "$as_me:$LINENO: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&5
17050$as_echo "$as_me: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&6;}
17051        new_path="$path"
17052      else
17053        { $as_echo "$as_me:$LINENO: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17054$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17055        has_space=`$ECHO "$complete" | $GREP " "`
17056        if test "x$has_space" != x; then
17057          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
17058$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17059        fi
17060        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CXX" >&5
17061$as_echo "$as_me: error: Cannot locate the the path of BUILD_CXX" >&2;}
17062   { (exit 1); exit 1; }; }
17063      fi
17064    fi
17065  fi
17066
17067  # Now join together the path and the arguments once again
17068  if test "x$arguments" != xEOL; then
17069      new_complete="$new_path ${arguments% *}"
17070  else
17071      new_complete="$new_path"
17072  fi
17073
17074  if test "x$complete" != "x$new_complete"; then
17075    BUILD_CXX="$new_complete"
17076    { $as_echo "$as_me:$LINENO: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17077$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17078  fi
17079
17080    # Extract the first word of "ld", so it can be a program name with args.
17081set dummy ld; ac_word=$2
17082{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
17083$as_echo_n "checking for $ac_word... " >&6; }
17084if test "${ac_cv_path_BUILD_LD+set}" = set; then
17085  $as_echo_n "(cached) " >&6
17086else
17087  case $BUILD_LD in
17088  [\\/]* | ?:[\\/]*)
17089  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17090  ;;
17091  *)
17092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17093for as_dir in $PATH
17094do
17095  IFS=$as_save_IFS
17096  test -z "$as_dir" && as_dir=.
17097  for ac_exec_ext in '' $ac_executable_extensions; do
17098  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17099    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17100    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17101    break 2
17102  fi
17103done
17104done
17105IFS=$as_save_IFS
17106
17107  ;;
17108esac
17109fi
17110BUILD_LD=$ac_cv_path_BUILD_LD
17111if test -n "$BUILD_LD"; then
17112  { $as_echo "$as_me:$LINENO: result: $BUILD_LD" >&5
17113$as_echo "$BUILD_LD" >&6; }
17114else
17115  { $as_echo "$as_me:$LINENO: result: no" >&5
17116$as_echo "no" >&6; }
17117fi
17118
17119
17120
17121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17122
17123  # First separate the path from the arguments. This will split at the first
17124  # space.
17125  complete="$BUILD_LD"
17126  path="${complete%% *}"
17127  tmp="$complete EOL"
17128  arguments="${tmp#* }"
17129
17130  # Input might be given as Windows format, start by converting to
17131  # unix format.
17132  new_path=`$CYGPATH -u "$path"`
17133
17134  # Now try to locate executable using which
17135  new_path=`$WHICH "$new_path" 2> /dev/null`
17136  # bat and cmd files are not always considered executable in cygwin causing which
17137  # to not find them
17138  if test "x$new_path" = x \
17139           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17140           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17141    new_path=`$CYGPATH -u "$path"`
17142  fi
17143  if test "x$new_path" = x; then
17144    # Oops. Which didn't find the executable.
17145    # The splitting of arguments from the executable at a space might have been incorrect,
17146    # since paths with space are more likely in Windows. Give it another try with the whole
17147    # argument.
17148    path="$complete"
17149    arguments="EOL"
17150    new_path=`$CYGPATH -u "$path"`
17151    new_path=`$WHICH "$new_path" 2> /dev/null`
17152    # bat and cmd files are not always considered executable in cygwin causing which
17153    # to not find them
17154    if test "x$new_path" = x \
17155             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17156             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17157      new_path=`$CYGPATH -u "$path"`
17158    fi
17159    if test "x$new_path" = x; then
17160      # It's still not found. Now this is an unrecoverable error.
17161      { $as_echo "$as_me:$LINENO: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17162$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17163      has_space=`$ECHO "$complete" | $GREP " "`
17164      if test "x$has_space" != x; then
17165        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17166$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17167      fi
17168      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_LD" >&5
17169$as_echo "$as_me: error: Cannot locate the the path of BUILD_LD" >&2;}
17170   { (exit 1); exit 1; }; }
17171    fi
17172  fi
17173
17174  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17175  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17176  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17177  # "foo.exe" is OK but "foo" is an error.
17178  #
17179  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17180  # It is also a way to make sure we got the proper file name for the real test later on.
17181  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17182  if test "x$test_shortpath" = x; then
17183    # Short path failed, file does not exist as specified.
17184    # Try adding .exe or .cmd
17185    if test -f "${new_path}.exe"; then
17186       input_to_shortpath="${new_path}.exe"
17187    elif test -f "${new_path}.cmd"; then
17188       input_to_shortpath="${new_path}.cmd"
17189    else
17190      { $as_echo "$as_me:$LINENO: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17191$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17192      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17193$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17194      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_LD" >&5
17195$as_echo "$as_me: error: Cannot locate the the path of BUILD_LD" >&2;}
17196   { (exit 1); exit 1; }; }
17197    fi
17198  else
17199    input_to_shortpath="$new_path"
17200  fi
17201
17202  # Call helper function which possibly converts this using DOS-style short mode.
17203  # If so, the updated path is stored in $new_path.
17204  new_path="$input_to_shortpath"
17205
17206  input_path="$input_to_shortpath"
17207  # Check if we need to convert this using DOS-style short mode. If the path
17208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17209  # take no chances and rewrite it.
17210  # Note: m4 eats our [], so we need to use [ and ] instead.
17211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17212  if test "x$has_forbidden_chars" != x; then
17213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17217      # Going to short mode and back again did indeed matter. Since short mode is
17218      # case insensitive, let's make it lowercase to improve readability.
17219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17220      # Now convert it back to Unix-stile (cygpath)
17221      input_path=`$CYGPATH -u "$shortmode_path"`
17222      new_path="$input_path"
17223    fi
17224  fi
17225
17226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17227  if test "x$test_cygdrive_prefix" = x; then
17228    # As a simple fix, exclude /usr/bin since it's not a real path.
17229    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17231      # a path prefixed by /cygdrive for fixpath to work.
17232      new_path="$CYGWIN_ROOT_PATH$input_path"
17233    fi
17234  fi
17235
17236  # remove trailing .exe if any
17237  new_path="${new_path/%.exe/}"
17238
17239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17240
17241  # First separate the path from the arguments. This will split at the first
17242  # space.
17243  complete="$BUILD_LD"
17244  path="${complete%% *}"
17245  tmp="$complete EOL"
17246  arguments="${tmp#* }"
17247
17248  # Input might be given as Windows format, start by converting to
17249  # unix format.
17250  new_path="$path"
17251
17252  windows_path="$new_path"
17253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17254    unix_path=`$CYGPATH -u "$windows_path"`
17255    new_path="$unix_path"
17256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17258    new_path="$unix_path"
17259  fi
17260
17261
17262  # Now try to locate executable using which
17263  new_path=`$WHICH "$new_path" 2> /dev/null`
17264
17265  if test "x$new_path" = x; then
17266    # Oops. Which didn't find the executable.
17267    # The splitting of arguments from the executable at a space might have been incorrect,
17268    # since paths with space are more likely in Windows. Give it another try with the whole
17269    # argument.
17270    path="$complete"
17271    arguments="EOL"
17272    new_path="$path"
17273
17274  windows_path="$new_path"
17275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17276    unix_path=`$CYGPATH -u "$windows_path"`
17277    new_path="$unix_path"
17278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17280    new_path="$unix_path"
17281  fi
17282
17283
17284    new_path=`$WHICH "$new_path" 2> /dev/null`
17285
17286    if test "x$new_path" = x; then
17287      # It's still not found. Now this is an unrecoverable error.
17288      { $as_echo "$as_me:$LINENO: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17289$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17290      has_space=`$ECHO "$complete" | $GREP " "`
17291      if test "x$has_space" != x; then
17292        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17294      fi
17295      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_LD" >&5
17296$as_echo "$as_me: error: Cannot locate the the path of BUILD_LD" >&2;}
17297   { (exit 1); exit 1; }; }
17298    fi
17299  fi
17300
17301  # Now new_path has a complete unix path to the binary
17302  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17303    # Keep paths in /bin as-is, but remove trailing .exe if any
17304    new_path="${new_path/%.exe/}"
17305    # Do not save /bin paths to all_fixpath_prefixes!
17306  else
17307    # Not in mixed or Windows style, start by that.
17308    new_path=`cmd //c echo $new_path`
17309
17310  input_path="$new_path"
17311  # Check if we need to convert this using DOS-style short mode. If the path
17312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17313  # take no chances and rewrite it.
17314  # Note: m4 eats our [], so we need to use [ and ] instead.
17315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17316  if test "x$has_forbidden_chars" != x; then
17317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17318    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17319  fi
17320
17321    # Output is in $new_path
17322
17323  windows_path="$new_path"
17324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17325    unix_path=`$CYGPATH -u "$windows_path"`
17326    new_path="$unix_path"
17327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17329    new_path="$unix_path"
17330  fi
17331
17332    # remove trailing .exe if any
17333    new_path="${new_path/%.exe/}"
17334
17335    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17336    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17337  fi
17338
17339  else
17340    # We're on a posix platform. Hooray! :)
17341    # First separate the path from the arguments. This will split at the first
17342    # space.
17343    complete="$BUILD_LD"
17344    path="${complete%% *}"
17345    tmp="$complete EOL"
17346    arguments="${tmp#* }"
17347
17348    new_path=`$WHICH $path 2> /dev/null`
17349    if test "x$new_path" = x; then
17350      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17351      if test "x$is_absolute_path" != x; then
17352        { $as_echo "$as_me:$LINENO: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&5
17353$as_echo "$as_me: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&6;}
17354        new_path="$path"
17355      else
17356        { $as_echo "$as_me:$LINENO: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17357$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17358        has_space=`$ECHO "$complete" | $GREP " "`
17359        if test "x$has_space" != x; then
17360          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
17361$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17362        fi
17363        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_LD" >&5
17364$as_echo "$as_me: error: Cannot locate the the path of BUILD_LD" >&2;}
17365   { (exit 1); exit 1; }; }
17366      fi
17367    fi
17368  fi
17369
17370  # Now join together the path and the arguments once again
17371  if test "x$arguments" != xEOL; then
17372      new_complete="$new_path ${arguments% *}"
17373  else
17374      new_complete="$new_path"
17375  fi
17376
17377  if test "x$complete" != "x$new_complete"; then
17378    BUILD_LD="$new_complete"
17379    { $as_echo "$as_me:$LINENO: Rewriting BUILD_LD to \"$new_complete\"" >&5
17380$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17381  fi
17382
17383fi
17384
17385
17386
17387
17388# If a devkit is found on the builddeps server, then prepend its path to the
17389# PATH variable. If there are cross compilers available in the devkit, these
17390# will be found by AC_PROG_CC et al.
17391DEVKIT=
17392
17393
17394    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17395        # Source the builddeps file again, to make sure it uses the latest variables!
17396        . $builddepsfile
17397        # Look for a target and build machine specific resource!
17398        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17399        if test "x$resource" = x; then
17400            # Ok, lets instead look for a target specific resource
17401            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17402        fi
17403        if test "x$resource" = x; then
17404            # Ok, lets instead look for a build specific resource
17405            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17406        fi
17407        if test "x$resource" = x; then
17408            # Ok, lets instead look for a generic resource
17409            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17410            resource=${builddep_devkit}
17411        fi
17412        if test "x$resource" != x; then
17413            { $as_echo "$as_me:$LINENO: Using builddeps $resource for devkit" >&5
17414$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17415	    # If the resource in the builddeps.conf file is an existing directory,
17416	    # for example /java/linux/cups
17417	    if test -d ${resource}; then
17418	       depdir=${resource}
17419	    else
17420
17421# devkit is for example mymodule
17422# $resource is for example libs/general/libmymod_1_2_3.zip
17423# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17424# $with_builddeps_dir is for example /localhome/builddeps
17425# depdir is the name of the variable into which we store the depdir, eg MYMOD
17426# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17427# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17428    filename=`basename $resource`
17429    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17430    filebase=${filename%%.*}
17431    extension=${filename#*.}
17432    installdir=$with_builddeps_dir/$filebase
17433    if test ! -f $installdir/$filename.unpacked; then
17434        { $as_echo "$as_me:$LINENO: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17435$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17436        if test ! -d $installdir; then
17437            mkdir -p $installdir
17438        fi
17439        if test ! -d $installdir; then
17440            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
17441$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
17442   { (exit 1); exit 1; }; }
17443        fi
17444        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17445        touch $tmpfile
17446        if test ! -f $tmpfile; then
17447            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
17448$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
17449   { (exit 1); exit 1; }; }
17450        fi
17451
17452    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17453    # $tmpfile is the local file name for the downloaded file.
17454    VALID_TOOL=no
17455    if test "x$BDEPS_FTP" = xwget; then
17456       VALID_TOOL=yes
17457       wget -O $tmpfile $with_builddeps_server/$resource
17458    fi
17459    if test "x$BDEPS_FTP" = xlftp; then
17460       VALID_TOOL=yes
17461       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17462    fi
17463    if test "x$BDEPS_FTP" = xftp; then
17464        VALID_TOOL=yes
17465        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17466        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17467        FTPUSERPWD=${FTPSERVER%%@*}
17468        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17469            FTPUSER=${userpwd%%:*}
17470            FTPPWD=${userpwd#*@}
17471            FTPSERVER=${FTPSERVER#*@}
17472        else
17473            FTPUSER=ftp
17474            FTPPWD=ftp
17475        fi
17476        # the "pass" command does not work on some
17477        # ftp clients (read ftp.exe) but if it works,
17478        # passive mode is better!
17479        (\
17480            echo "user $FTPUSER $FTPPWD"        ;\
17481            echo "pass"                         ;\
17482            echo "bin"                          ;\
17483            echo "get $FTPPATH $tmpfile"              ;\
17484        ) | ftp -in $FTPSERVER
17485    fi
17486    if test "x$VALID_TOOL" != xyes; then
17487       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
17488$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
17489   { (exit 1); exit 1; }; }
17490    fi
17491
17492        mv $tmpfile $installdir/$filename
17493        if test ! -s $installdir/$filename; then
17494            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
17495$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
17496   { (exit 1); exit 1; }; }
17497        fi
17498        case "$extension" in
17499            zip)  echo "Unzipping $installdir/$filename..."
17500               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17501            ;;
17502            tar.gz) echo "Untaring $installdir/$filename..."
17503               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17504            ;;
17505            tgz) echo "Untaring $installdir/$filename..."
17506               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17507            ;;
17508            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
17509$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
17510   { (exit 1); exit 1; }; }
17511            ;;
17512        esac
17513    fi
17514    if test -f $installdir/$filename.unpacked; then
17515        depdir=$installdir
17516    fi
17517
17518	    fi
17519            # Source the builddeps file again, because in the previous command, the depdir
17520            # was updated to point at the current build dependency install directory.
17521            . $builddepsfile
17522            # Now extract variables from the builddeps.conf files.
17523            theroot=${builddep_devkit_ROOT}
17524            thecflags=${builddep_devkit_CFLAGS}
17525            thelibs=${builddep_devkit_LIBS}
17526            if test "x$depdir" = x; then
17527                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency devkit" >&5
17528$as_echo "$as_me: error: Could not download build dependency devkit" >&2;}
17529   { (exit 1); exit 1; }; }
17530            fi
17531            DEVKIT=$depdir
17532            if test "x$theroot" != x; then
17533               DEVKIT="$theroot"
17534            fi
17535            if test "x$thecflags" != x; then
17536               DEVKIT_CFLAGS="$thecflags"
17537            fi
17538            if test "x$thelibs" != x; then
17539               DEVKIT_LIBS="$thelibs"
17540            fi
17541            # Found devkit
17542                     PATH="$DEVKIT/bin:$PATH"
17543                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17544                     if test "x$x_includes" = "xNONE"; then
17545                         x_includes="$SYS_ROOT/usr/include/X11"
17546                     fi
17547                     if test "x$x_libraries" = "xNONE"; then
17548                         x_libraries="$SYS_ROOT/usr/lib"
17549                     fi
17550
17551
17552        fi
17553
17554    fi
17555
17556
17557if test "x$SYS_ROOT" != "x/" ; then
17558    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
17559    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
17560    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17561    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17562    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
17563    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
17564fi
17565
17566# Store the CFLAGS etal passed to the configure script.
17567ORG_CFLAGS="$CFLAGS"
17568ORG_CXXFLAGS="$CXXFLAGS"
17569ORG_OBJCFLAGS="$OBJCFLAGS"
17570
17571# autoconf magic only relies on PATH, so update it if tools dir is specified
17572OLD_PATH="$PATH"
17573if test "x$TOOLS_DIR" != x; then
17574  PATH=$TOOLS_DIR:$PATH
17575fi
17576
17577
17578### Locate C compiler (CC)
17579
17580# gcc is almost always present, but on Windows we
17581# prefer cl.exe and on Solaris we prefer CC.
17582# Thus test for them in this order.
17583if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17584  # Do not probe for cc on MacOSX.
17585  COMPILER_CHECK_LIST="cl gcc"
17586else
17587  COMPILER_CHECK_LIST="cl cc gcc"
17588fi
17589
17590
17591  COMPILER_NAME=C
17592
17593  # Do a first initial attempt at searching the list of compiler names.
17594  # AC_PATH_PROGS can't be run multiple times with the same variable,
17595  # so create a new name for this run.
17596  for ac_prog in $COMPILER_CHECK_LIST
17597do
17598  # Extract the first word of "$ac_prog", so it can be a program name with args.
17599set dummy $ac_prog; ac_word=$2
17600{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
17601$as_echo_n "checking for $ac_word... " >&6; }
17602if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then
17603  $as_echo_n "(cached) " >&6
17604else
17605  case $POTENTIAL_CC in
17606  [\\/]* | ?:[\\/]*)
17607  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
17608  ;;
17609  *)
17610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17611for as_dir in $PATH
17612do
17613  IFS=$as_save_IFS
17614  test -z "$as_dir" && as_dir=.
17615  for ac_exec_ext in '' $ac_executable_extensions; do
17616  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17617    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
17618    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17619    break 2
17620  fi
17621done
17622done
17623IFS=$as_save_IFS
17624
17625  ;;
17626esac
17627fi
17628POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
17629if test -n "$POTENTIAL_CC"; then
17630  { $as_echo "$as_me:$LINENO: result: $POTENTIAL_CC" >&5
17631$as_echo "$POTENTIAL_CC" >&6; }
17632else
17633  { $as_echo "$as_me:$LINENO: result: no" >&5
17634$as_echo "no" >&6; }
17635fi
17636
17637
17638  test -n "$POTENTIAL_CC" && break
17639done
17640
17641  CC=$POTENTIAL_CC
17642
17643  if test "x$$CC" = x; then
17644
17645    # Print a helpful message on how to acquire the necessary build dependency.
17646    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
17647    MISSING_DEPENDENCY=devkit
17648    PKGHANDLER_COMMAND=
17649
17650    case $PKGHANDLER in
17651	apt-get)
17652                apt_help     $MISSING_DEPENDENCY ;;
17653    yum)
17654                yum_help     $MISSING_DEPENDENCY ;;
17655	port)
17656                port_help    $MISSING_DEPENDENCY ;;
17657	pkgutil)
17658                pkgutil_help $MISSING_DEPENDENCY ;;
17659	pkgadd)
17660                pkgadd_help  $MISSING_DEPENDENCY ;;
17661    * )
17662      break ;;
17663    esac
17664
17665    if test "x$PKGHANDLER_COMMAND" != x; then
17666        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
17667    fi
17668
17669      { { $as_echo "$as_me:$LINENO: error: Could not find a $COMPILER_NAME compiler. $HELP_MSG" >&5
17670$as_echo "$as_me: error: Could not find a $COMPILER_NAME compiler. $HELP_MSG" >&2;}
17671   { (exit 1); exit 1; }; }
17672  fi
17673
17674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17675
17676  # First separate the path from the arguments. This will split at the first
17677  # space.
17678  complete="$CC"
17679  path="${complete%% *}"
17680  tmp="$complete EOL"
17681  arguments="${tmp#* }"
17682
17683  # Input might be given as Windows format, start by converting to
17684  # unix format.
17685  new_path=`$CYGPATH -u "$path"`
17686
17687  # Now try to locate executable using which
17688  new_path=`$WHICH "$new_path" 2> /dev/null`
17689  # bat and cmd files are not always considered executable in cygwin causing which
17690  # to not find them
17691  if test "x$new_path" = x \
17692           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17693           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17694    new_path=`$CYGPATH -u "$path"`
17695  fi
17696  if test "x$new_path" = x; then
17697    # Oops. Which didn't find the executable.
17698    # The splitting of arguments from the executable at a space might have been incorrect,
17699    # since paths with space are more likely in Windows. Give it another try with the whole
17700    # argument.
17701    path="$complete"
17702    arguments="EOL"
17703    new_path=`$CYGPATH -u "$path"`
17704    new_path=`$WHICH "$new_path" 2> /dev/null`
17705    # bat and cmd files are not always considered executable in cygwin causing which
17706    # to not find them
17707    if test "x$new_path" = x \
17708             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17709             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17710      new_path=`$CYGPATH -u "$path"`
17711    fi
17712    if test "x$new_path" = x; then
17713      # It's still not found. Now this is an unrecoverable error.
17714      { $as_echo "$as_me:$LINENO: The path of CC, which resolves as \"$complete\", is not found." >&5
17715$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17716      has_space=`$ECHO "$complete" | $GREP " "`
17717      if test "x$has_space" != x; then
17718        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17720      fi
17721      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CC" >&5
17722$as_echo "$as_me: error: Cannot locate the the path of CC" >&2;}
17723   { (exit 1); exit 1; }; }
17724    fi
17725  fi
17726
17727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17730  # "foo.exe" is OK but "foo" is an error.
17731  #
17732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17733  # It is also a way to make sure we got the proper file name for the real test later on.
17734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17735  if test "x$test_shortpath" = x; then
17736    # Short path failed, file does not exist as specified.
17737    # Try adding .exe or .cmd
17738    if test -f "${new_path}.exe"; then
17739       input_to_shortpath="${new_path}.exe"
17740    elif test -f "${new_path}.cmd"; then
17741       input_to_shortpath="${new_path}.cmd"
17742    else
17743      { $as_echo "$as_me:$LINENO: The path of CC, which resolves as \"$new_path\", is invalid." >&5
17744$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
17745      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17746$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17747      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CC" >&5
17748$as_echo "$as_me: error: Cannot locate the the path of CC" >&2;}
17749   { (exit 1); exit 1; }; }
17750    fi
17751  else
17752    input_to_shortpath="$new_path"
17753  fi
17754
17755  # Call helper function which possibly converts this using DOS-style short mode.
17756  # If so, the updated path is stored in $new_path.
17757  new_path="$input_to_shortpath"
17758
17759  input_path="$input_to_shortpath"
17760  # Check if we need to convert this using DOS-style short mode. If the path
17761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17762  # take no chances and rewrite it.
17763  # Note: m4 eats our [], so we need to use [ and ] instead.
17764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17765  if test "x$has_forbidden_chars" != x; then
17766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17770      # Going to short mode and back again did indeed matter. Since short mode is
17771      # case insensitive, let's make it lowercase to improve readability.
17772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17773      # Now convert it back to Unix-stile (cygpath)
17774      input_path=`$CYGPATH -u "$shortmode_path"`
17775      new_path="$input_path"
17776    fi
17777  fi
17778
17779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17780  if test "x$test_cygdrive_prefix" = x; then
17781    # As a simple fix, exclude /usr/bin since it's not a real path.
17782    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17784      # a path prefixed by /cygdrive for fixpath to work.
17785      new_path="$CYGWIN_ROOT_PATH$input_path"
17786    fi
17787  fi
17788
17789  # remove trailing .exe if any
17790  new_path="${new_path/%.exe/}"
17791
17792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17793
17794  # First separate the path from the arguments. This will split at the first
17795  # space.
17796  complete="$CC"
17797  path="${complete%% *}"
17798  tmp="$complete EOL"
17799  arguments="${tmp#* }"
17800
17801  # Input might be given as Windows format, start by converting to
17802  # unix format.
17803  new_path="$path"
17804
17805  windows_path="$new_path"
17806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17807    unix_path=`$CYGPATH -u "$windows_path"`
17808    new_path="$unix_path"
17809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17811    new_path="$unix_path"
17812  fi
17813
17814
17815  # Now try to locate executable using which
17816  new_path=`$WHICH "$new_path" 2> /dev/null`
17817
17818  if test "x$new_path" = x; then
17819    # Oops. Which didn't find the executable.
17820    # The splitting of arguments from the executable at a space might have been incorrect,
17821    # since paths with space are more likely in Windows. Give it another try with the whole
17822    # argument.
17823    path="$complete"
17824    arguments="EOL"
17825    new_path="$path"
17826
17827  windows_path="$new_path"
17828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17829    unix_path=`$CYGPATH -u "$windows_path"`
17830    new_path="$unix_path"
17831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17833    new_path="$unix_path"
17834  fi
17835
17836
17837    new_path=`$WHICH "$new_path" 2> /dev/null`
17838
17839    if test "x$new_path" = x; then
17840      # It's still not found. Now this is an unrecoverable error.
17841      { $as_echo "$as_me:$LINENO: The path of CC, which resolves as \"$complete\", is not found." >&5
17842$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17843      has_space=`$ECHO "$complete" | $GREP " "`
17844      if test "x$has_space" != x; then
17845        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17847      fi
17848      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CC" >&5
17849$as_echo "$as_me: error: Cannot locate the the path of CC" >&2;}
17850   { (exit 1); exit 1; }; }
17851    fi
17852  fi
17853
17854  # Now new_path has a complete unix path to the binary
17855  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17856    # Keep paths in /bin as-is, but remove trailing .exe if any
17857    new_path="${new_path/%.exe/}"
17858    # Do not save /bin paths to all_fixpath_prefixes!
17859  else
17860    # Not in mixed or Windows style, start by that.
17861    new_path=`cmd //c echo $new_path`
17862
17863  input_path="$new_path"
17864  # Check if we need to convert this using DOS-style short mode. If the path
17865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17866  # take no chances and rewrite it.
17867  # Note: m4 eats our [], so we need to use [ and ] instead.
17868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17869  if test "x$has_forbidden_chars" != x; then
17870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17872  fi
17873
17874    # Output is in $new_path
17875
17876  windows_path="$new_path"
17877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17878    unix_path=`$CYGPATH -u "$windows_path"`
17879    new_path="$unix_path"
17880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17882    new_path="$unix_path"
17883  fi
17884
17885    # remove trailing .exe if any
17886    new_path="${new_path/%.exe/}"
17887
17888    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17889    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17890  fi
17891
17892  else
17893    # We're on a posix platform. Hooray! :)
17894    # First separate the path from the arguments. This will split at the first
17895    # space.
17896    complete="$CC"
17897    path="${complete%% *}"
17898    tmp="$complete EOL"
17899    arguments="${tmp#* }"
17900
17901    new_path=`$WHICH $path 2> /dev/null`
17902    if test "x$new_path" = x; then
17903      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17904      if test "x$is_absolute_path" != x; then
17905        { $as_echo "$as_me:$LINENO: Resolving CC (as $path) with 'which' failed, using $path directly." >&5
17906$as_echo "$as_me: Resolving CC (as $path) with 'which' failed, using $path directly." >&6;}
17907        new_path="$path"
17908      else
17909        { $as_echo "$as_me:$LINENO: The path of CC, which resolves as \"$complete\", is not found." >&5
17910$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17911        has_space=`$ECHO "$complete" | $GREP " "`
17912        if test "x$has_space" != x; then
17913          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
17914$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17915        fi
17916        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CC" >&5
17917$as_echo "$as_me: error: Cannot locate the the path of CC" >&2;}
17918   { (exit 1); exit 1; }; }
17919      fi
17920    fi
17921  fi
17922
17923  # Now join together the path and the arguments once again
17924  if test "x$arguments" != xEOL; then
17925      new_complete="$new_path ${arguments% *}"
17926  else
17927      new_complete="$new_path"
17928  fi
17929
17930  if test "x$complete" != "x$new_complete"; then
17931    CC="$new_complete"
17932    { $as_echo "$as_me:$LINENO: Rewriting CC to \"$new_complete\"" >&5
17933$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
17934  fi
17935
17936  { $as_echo "$as_me:$LINENO: checking resolved symbolic links for CC" >&5
17937$as_echo_n "checking resolved symbolic links for CC... " >&6; }
17938  TEST_COMPILER="$CC"
17939
17940    if test "x$OPENJDK_BUILD_OS" != xwindows; then
17941        # Follow a chain of symbolic links. Use readlink
17942        # where it exists, else fall back to horribly
17943        # complicated shell code.
17944        if test "x$READLINK_TESTED" != yes; then
17945            # On MacOSX there is a readlink tool with a different
17946            # purpose than the GNU readlink tool. Check the found readlink.
17947            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
17948            if test "x$ISGNU" = x; then
17949                 # A readlink that we do not know how to use.
17950                 # Are there other non-GNU readlinks out there?
17951                 READLINK_TESTED=yes
17952                 READLINK=
17953            fi
17954        fi
17955
17956        if test "x$READLINK" != x; then
17957            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
17958        else
17959            STARTDIR=$PWD
17960            COUNTER=0
17961            sym_link_dir=`$DIRNAME $TEST_COMPILER`
17962            sym_link_file=`$BASENAME $TEST_COMPILER`
17963            while test $COUNTER -lt 20; do
17964                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
17965                if test "x$ISLINK" == x; then
17966                    # This is not a symbolic link! We are done!
17967                    break
17968                fi
17969                # The link might be relative! We have to use cd to travel safely.
17970                cd $sym_link_dir
17971                # ... and we must get the to the absolute path, not one using symbolic links.
17972                cd `pwd -P`
17973                cd `$DIRNAME $ISLINK`
17974                sym_link_dir=`$THEPWDCMD`
17975                sym_link_file=`$BASENAME $ISLINK`
17976                let COUNTER=COUNTER+1
17977            done
17978            cd $STARTDIR
17979            TEST_COMPILER=$sym_link_dir/$sym_link_file
17980        fi
17981    fi
17982
17983  { $as_echo "$as_me:$LINENO: result: $TEST_COMPILER" >&5
17984$as_echo "$TEST_COMPILER" >&6; }
17985  { $as_echo "$as_me:$LINENO: checking if CC is disguised ccache" >&5
17986$as_echo_n "checking if CC is disguised ccache... " >&6; }
17987
17988  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
17989  if test "x$COMPILER_BASENAME" = "xccache"; then
17990    { $as_echo "$as_me:$LINENO: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
17991$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
17992    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
17993    # We want to control ccache invocation ourselves, so ignore this cc and try
17994    # searching again.
17995
17996    # Remove the path to the fake ccache cc from the PATH
17997    RETRY_COMPILER_SAVED_PATH="$PATH"
17998    COMPILER_DIRNAME=`$DIRNAME $CC`
17999    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18000
18001    # Try again looking for our compiler
18002    if test -n "$ac_tool_prefix"; then
18003  for ac_prog in $COMPILER_CHECK_LIST
18004  do
18005    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18006set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18007{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
18008$as_echo_n "checking for $ac_word... " >&6; }
18009if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then
18010  $as_echo_n "(cached) " >&6
18011else
18012  if test -n "$PROPER_COMPILER_CC"; then
18013  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18014else
18015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18016for as_dir in $PATH
18017do
18018  IFS=$as_save_IFS
18019  test -z "$as_dir" && as_dir=.
18020  for ac_exec_ext in '' $ac_executable_extensions; do
18021  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18022    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18023    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18024    break 2
18025  fi
18026done
18027done
18028IFS=$as_save_IFS
18029
18030fi
18031fi
18032PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18033if test -n "$PROPER_COMPILER_CC"; then
18034  { $as_echo "$as_me:$LINENO: result: $PROPER_COMPILER_CC" >&5
18035$as_echo "$PROPER_COMPILER_CC" >&6; }
18036else
18037  { $as_echo "$as_me:$LINENO: result: no" >&5
18038$as_echo "no" >&6; }
18039fi
18040
18041
18042    test -n "$PROPER_COMPILER_CC" && break
18043  done
18044fi
18045if test -z "$PROPER_COMPILER_CC"; then
18046  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18047  for ac_prog in $COMPILER_CHECK_LIST
18048do
18049  # Extract the first word of "$ac_prog", so it can be a program name with args.
18050set dummy $ac_prog; ac_word=$2
18051{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
18052$as_echo_n "checking for $ac_word... " >&6; }
18053if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then
18054  $as_echo_n "(cached) " >&6
18055else
18056  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18057  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18058else
18059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18060for as_dir in $PATH
18061do
18062  IFS=$as_save_IFS
18063  test -z "$as_dir" && as_dir=.
18064  for ac_exec_ext in '' $ac_executable_extensions; do
18065  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18066    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18067    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18068    break 2
18069  fi
18070done
18071done
18072IFS=$as_save_IFS
18073
18074fi
18075fi
18076ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18077if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18078  { $as_echo "$as_me:$LINENO: result: $ac_ct_PROPER_COMPILER_CC" >&5
18079$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18080else
18081  { $as_echo "$as_me:$LINENO: result: no" >&5
18082$as_echo "no" >&6; }
18083fi
18084
18085
18086  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18087done
18088
18089  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18090    PROPER_COMPILER_CC=""
18091  else
18092    case $cross_compiling:$ac_tool_warned in
18093yes:)
18094{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
18095$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18096ac_tool_warned=yes ;;
18097esac
18098    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18099  fi
18100fi
18101
18102
18103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18104
18105  # First separate the path from the arguments. This will split at the first
18106  # space.
18107  complete="$PROPER_COMPILER_CC"
18108  path="${complete%% *}"
18109  tmp="$complete EOL"
18110  arguments="${tmp#* }"
18111
18112  # Input might be given as Windows format, start by converting to
18113  # unix format.
18114  new_path=`$CYGPATH -u "$path"`
18115
18116  # Now try to locate executable using which
18117  new_path=`$WHICH "$new_path" 2> /dev/null`
18118  # bat and cmd files are not always considered executable in cygwin causing which
18119  # to not find them
18120  if test "x$new_path" = x \
18121           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18122           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18123    new_path=`$CYGPATH -u "$path"`
18124  fi
18125  if test "x$new_path" = x; then
18126    # Oops. Which didn't find the executable.
18127    # The splitting of arguments from the executable at a space might have been incorrect,
18128    # since paths with space are more likely in Windows. Give it another try with the whole
18129    # argument.
18130    path="$complete"
18131    arguments="EOL"
18132    new_path=`$CYGPATH -u "$path"`
18133    new_path=`$WHICH "$new_path" 2> /dev/null`
18134    # bat and cmd files are not always considered executable in cygwin causing which
18135    # to not find them
18136    if test "x$new_path" = x \
18137             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18138             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18139      new_path=`$CYGPATH -u "$path"`
18140    fi
18141    if test "x$new_path" = x; then
18142      # It's still not found. Now this is an unrecoverable error.
18143      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18144$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18145      has_space=`$ECHO "$complete" | $GREP " "`
18146      if test "x$has_space" != x; then
18147        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18149      fi
18150      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CC" >&5
18151$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CC" >&2;}
18152   { (exit 1); exit 1; }; }
18153    fi
18154  fi
18155
18156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18159  # "foo.exe" is OK but "foo" is an error.
18160  #
18161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18162  # It is also a way to make sure we got the proper file name for the real test later on.
18163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18164  if test "x$test_shortpath" = x; then
18165    # Short path failed, file does not exist as specified.
18166    # Try adding .exe or .cmd
18167    if test -f "${new_path}.exe"; then
18168       input_to_shortpath="${new_path}.exe"
18169    elif test -f "${new_path}.cmd"; then
18170       input_to_shortpath="${new_path}.cmd"
18171    else
18172      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18173$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18174      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18175$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18176      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CC" >&5
18177$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CC" >&2;}
18178   { (exit 1); exit 1; }; }
18179    fi
18180  else
18181    input_to_shortpath="$new_path"
18182  fi
18183
18184  # Call helper function which possibly converts this using DOS-style short mode.
18185  # If so, the updated path is stored in $new_path.
18186  new_path="$input_to_shortpath"
18187
18188  input_path="$input_to_shortpath"
18189  # Check if we need to convert this using DOS-style short mode. If the path
18190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18191  # take no chances and rewrite it.
18192  # Note: m4 eats our [], so we need to use [ and ] instead.
18193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18194  if test "x$has_forbidden_chars" != x; then
18195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18199      # Going to short mode and back again did indeed matter. Since short mode is
18200      # case insensitive, let's make it lowercase to improve readability.
18201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18202      # Now convert it back to Unix-stile (cygpath)
18203      input_path=`$CYGPATH -u "$shortmode_path"`
18204      new_path="$input_path"
18205    fi
18206  fi
18207
18208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18209  if test "x$test_cygdrive_prefix" = x; then
18210    # As a simple fix, exclude /usr/bin since it's not a real path.
18211    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18213      # a path prefixed by /cygdrive for fixpath to work.
18214      new_path="$CYGWIN_ROOT_PATH$input_path"
18215    fi
18216  fi
18217
18218  # remove trailing .exe if any
18219  new_path="${new_path/%.exe/}"
18220
18221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18222
18223  # First separate the path from the arguments. This will split at the first
18224  # space.
18225  complete="$PROPER_COMPILER_CC"
18226  path="${complete%% *}"
18227  tmp="$complete EOL"
18228  arguments="${tmp#* }"
18229
18230  # Input might be given as Windows format, start by converting to
18231  # unix format.
18232  new_path="$path"
18233
18234  windows_path="$new_path"
18235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18236    unix_path=`$CYGPATH -u "$windows_path"`
18237    new_path="$unix_path"
18238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18240    new_path="$unix_path"
18241  fi
18242
18243
18244  # Now try to locate executable using which
18245  new_path=`$WHICH "$new_path" 2> /dev/null`
18246
18247  if test "x$new_path" = x; then
18248    # Oops. Which didn't find the executable.
18249    # The splitting of arguments from the executable at a space might have been incorrect,
18250    # since paths with space are more likely in Windows. Give it another try with the whole
18251    # argument.
18252    path="$complete"
18253    arguments="EOL"
18254    new_path="$path"
18255
18256  windows_path="$new_path"
18257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18258    unix_path=`$CYGPATH -u "$windows_path"`
18259    new_path="$unix_path"
18260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18262    new_path="$unix_path"
18263  fi
18264
18265
18266    new_path=`$WHICH "$new_path" 2> /dev/null`
18267
18268    if test "x$new_path" = x; then
18269      # It's still not found. Now this is an unrecoverable error.
18270      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18271$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18272      has_space=`$ECHO "$complete" | $GREP " "`
18273      if test "x$has_space" != x; then
18274        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18276      fi
18277      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CC" >&5
18278$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CC" >&2;}
18279   { (exit 1); exit 1; }; }
18280    fi
18281  fi
18282
18283  # Now new_path has a complete unix path to the binary
18284  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18285    # Keep paths in /bin as-is, but remove trailing .exe if any
18286    new_path="${new_path/%.exe/}"
18287    # Do not save /bin paths to all_fixpath_prefixes!
18288  else
18289    # Not in mixed or Windows style, start by that.
18290    new_path=`cmd //c echo $new_path`
18291
18292  input_path="$new_path"
18293  # Check if we need to convert this using DOS-style short mode. If the path
18294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18295  # take no chances and rewrite it.
18296  # Note: m4 eats our [], so we need to use [ and ] instead.
18297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18298  if test "x$has_forbidden_chars" != x; then
18299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18301  fi
18302
18303    # Output is in $new_path
18304
18305  windows_path="$new_path"
18306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18307    unix_path=`$CYGPATH -u "$windows_path"`
18308    new_path="$unix_path"
18309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18311    new_path="$unix_path"
18312  fi
18313
18314    # remove trailing .exe if any
18315    new_path="${new_path/%.exe/}"
18316
18317    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18318    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18319  fi
18320
18321  else
18322    # We're on a posix platform. Hooray! :)
18323    # First separate the path from the arguments. This will split at the first
18324    # space.
18325    complete="$PROPER_COMPILER_CC"
18326    path="${complete%% *}"
18327    tmp="$complete EOL"
18328    arguments="${tmp#* }"
18329
18330    new_path=`$WHICH $path 2> /dev/null`
18331    if test "x$new_path" = x; then
18332      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18333      if test "x$is_absolute_path" != x; then
18334        { $as_echo "$as_me:$LINENO: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&5
18335$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&6;}
18336        new_path="$path"
18337      else
18338        { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18339$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18340        has_space=`$ECHO "$complete" | $GREP " "`
18341        if test "x$has_space" != x; then
18342          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
18343$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18344        fi
18345        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CC" >&5
18346$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CC" >&2;}
18347   { (exit 1); exit 1; }; }
18348      fi
18349    fi
18350  fi
18351
18352  # Now join together the path and the arguments once again
18353  if test "x$arguments" != xEOL; then
18354      new_complete="$new_path ${arguments% *}"
18355  else
18356      new_complete="$new_path"
18357  fi
18358
18359  if test "x$complete" != "x$new_complete"; then
18360    PROPER_COMPILER_CC="$new_complete"
18361    { $as_echo "$as_me:$LINENO: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18362$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18363  fi
18364
18365    PATH="$RETRY_COMPILER_SAVED_PATH"
18366
18367    { $as_echo "$as_me:$LINENO: checking for resolved symbolic links for CC" >&5
18368$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18369
18370    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18371        # Follow a chain of symbolic links. Use readlink
18372        # where it exists, else fall back to horribly
18373        # complicated shell code.
18374        if test "x$READLINK_TESTED" != yes; then
18375            # On MacOSX there is a readlink tool with a different
18376            # purpose than the GNU readlink tool. Check the found readlink.
18377            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
18378            if test "x$ISGNU" = x; then
18379                 # A readlink that we do not know how to use.
18380                 # Are there other non-GNU readlinks out there?
18381                 READLINK_TESTED=yes
18382                 READLINK=
18383            fi
18384        fi
18385
18386        if test "x$READLINK" != x; then
18387            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18388        else
18389            STARTDIR=$PWD
18390            COUNTER=0
18391            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18392            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18393            while test $COUNTER -lt 20; do
18394                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18395                if test "x$ISLINK" == x; then
18396                    # This is not a symbolic link! We are done!
18397                    break
18398                fi
18399                # The link might be relative! We have to use cd to travel safely.
18400                cd $sym_link_dir
18401                # ... and we must get the to the absolute path, not one using symbolic links.
18402                cd `pwd -P`
18403                cd `$DIRNAME $ISLINK`
18404                sym_link_dir=`$THEPWDCMD`
18405                sym_link_file=`$BASENAME $ISLINK`
18406                let COUNTER=COUNTER+1
18407            done
18408            cd $STARTDIR
18409            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18410        fi
18411    fi
18412
18413    { $as_echo "$as_me:$LINENO: result: $PROPER_COMPILER_CC" >&5
18414$as_echo "$PROPER_COMPILER_CC" >&6; }
18415    CC="$PROPER_COMPILER_CC"
18416  else
18417    { $as_echo "$as_me:$LINENO: result: no, keeping CC" >&5
18418$as_echo "no, keeping CC" >&6; }
18419    CC="$TEST_COMPILER"
18420  fi
18421
18422  COMPILER=$CC
18423  COMPILER_NAME=$COMPILER_NAME
18424
18425  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18426    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18427    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18428    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18429    if test $? -ne 0; then
18430      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18431
18432      { $as_echo "$as_me:$LINENO: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
18433$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18434      { $as_echo "$as_me:$LINENO: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18435$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18436      { { $as_echo "$as_me:$LINENO: error: Sun Studio compiler is required. Try setting --with-tools-dir." >&5
18437$as_echo "$as_me: error: Sun Studio compiler is required. Try setting --with-tools-dir." >&2;}
18438   { (exit 1); exit 1; }; }
18439    else
18440      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18441      COMPILER_VENDOR="Sun Studio"
18442    fi
18443  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18444    # First line typically looks something like:
18445    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18446    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18447    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18448    COMPILER_VENDOR="Microsoft CL.EXE"
18449    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18450    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18451      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18452        { { $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
18453$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;}
18454   { (exit 1); exit 1; }; }
18455      fi
18456    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18457      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18458        { { $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
18459$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;}
18460   { (exit 1); exit 1; }; }
18461      fi
18462    fi
18463  else
18464    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18465    # Check that this is likely to be GCC.
18466    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18467    if test $? -ne 0; then
18468      { $as_echo "$as_me:$LINENO: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18469$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18470      { $as_echo "$as_me:$LINENO: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18471$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18472      { { $as_echo "$as_me:$LINENO: error: GCC compiler is required. Try setting --with-tools-dir." >&5
18473$as_echo "$as_me: error: GCC compiler is required. Try setting --with-tools-dir." >&2;}
18474   { (exit 1); exit 1; }; }
18475    fi
18476
18477    # First line typically looks something like:
18478    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18479    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18480    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18481  fi
18482  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18483  CC_VERSION="$COMPILER_VERSION"
18484  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18485  CC_VENDOR="$COMPILER_VENDOR"
18486
18487  { $as_echo "$as_me:$LINENO: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
18488$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
18489
18490
18491# Now that we have resolved CC ourself, let autoconf have it's go at it
18492ac_ext=c
18493ac_cpp='$CPP $CPPFLAGS'
18494ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18495ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18496ac_compiler_gnu=$ac_cv_c_compiler_gnu
18497if test -n "$ac_tool_prefix"; then
18498  for ac_prog in $CC
18499  do
18500    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18501set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18502{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
18503$as_echo_n "checking for $ac_word... " >&6; }
18504if test "${ac_cv_prog_CC+set}" = set; then
18505  $as_echo_n "(cached) " >&6
18506else
18507  if test -n "$CC"; then
18508  ac_cv_prog_CC="$CC" # Let the user override the test.
18509else
18510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18511for as_dir in $PATH
18512do
18513  IFS=$as_save_IFS
18514  test -z "$as_dir" && as_dir=.
18515  for ac_exec_ext in '' $ac_executable_extensions; do
18516  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18517    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
18518    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18519    break 2
18520  fi
18521done
18522done
18523IFS=$as_save_IFS
18524
18525fi
18526fi
18527CC=$ac_cv_prog_CC
18528if test -n "$CC"; then
18529  { $as_echo "$as_me:$LINENO: result: $CC" >&5
18530$as_echo "$CC" >&6; }
18531else
18532  { $as_echo "$as_me:$LINENO: result: no" >&5
18533$as_echo "no" >&6; }
18534fi
18535
18536
18537    test -n "$CC" && break
18538  done
18539fi
18540if test -z "$CC"; then
18541  ac_ct_CC=$CC
18542  for ac_prog in $CC
18543do
18544  # Extract the first word of "$ac_prog", so it can be a program name with args.
18545set dummy $ac_prog; ac_word=$2
18546{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
18547$as_echo_n "checking for $ac_word... " >&6; }
18548if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
18549  $as_echo_n "(cached) " >&6
18550else
18551  if test -n "$ac_ct_CC"; then
18552  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
18553else
18554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18555for as_dir in $PATH
18556do
18557  IFS=$as_save_IFS
18558  test -z "$as_dir" && as_dir=.
18559  for ac_exec_ext in '' $ac_executable_extensions; do
18560  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18561    ac_cv_prog_ac_ct_CC="$ac_prog"
18562    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18563    break 2
18564  fi
18565done
18566done
18567IFS=$as_save_IFS
18568
18569fi
18570fi
18571ac_ct_CC=$ac_cv_prog_ac_ct_CC
18572if test -n "$ac_ct_CC"; then
18573  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
18574$as_echo "$ac_ct_CC" >&6; }
18575else
18576  { $as_echo "$as_me:$LINENO: result: no" >&5
18577$as_echo "no" >&6; }
18578fi
18579
18580
18581  test -n "$ac_ct_CC" && break
18582done
18583
18584  if test "x$ac_ct_CC" = x; then
18585    CC=""
18586  else
18587    case $cross_compiling:$ac_tool_warned in
18588yes:)
18589{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
18590$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18591ac_tool_warned=yes ;;
18592esac
18593    CC=$ac_ct_CC
18594  fi
18595fi
18596
18597
18598test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18600{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
18601See \`config.log' for more details." >&5
18602$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
18603See \`config.log' for more details." >&2;}
18604   { (exit 1); exit 1; }; }; }
18605
18606# Provide some information about the compiler.
18607$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
18608set X $ac_compile
18609ac_compiler=$2
18610{ (ac_try="$ac_compiler --version >&5"
18611case "(($ac_try" in
18612  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18613  *) ac_try_echo=$ac_try;;
18614esac
18615eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18616$as_echo "$ac_try_echo") >&5
18617  (eval "$ac_compiler --version >&5") 2>&5
18618  ac_status=$?
18619  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18620  (exit $ac_status); }
18621{ (ac_try="$ac_compiler -v >&5"
18622case "(($ac_try" in
18623  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18624  *) ac_try_echo=$ac_try;;
18625esac
18626eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18627$as_echo "$ac_try_echo") >&5
18628  (eval "$ac_compiler -v >&5") 2>&5
18629  ac_status=$?
18630  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18631  (exit $ac_status); }
18632{ (ac_try="$ac_compiler -V >&5"
18633case "(($ac_try" in
18634  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18635  *) ac_try_echo=$ac_try;;
18636esac
18637eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18638$as_echo "$ac_try_echo") >&5
18639  (eval "$ac_compiler -V >&5") 2>&5
18640  ac_status=$?
18641  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18642  (exit $ac_status); }
18643
18644cat >conftest.$ac_ext <<_ACEOF
18645/* confdefs.h.  */
18646_ACEOF
18647cat confdefs.h >>conftest.$ac_ext
18648cat >>conftest.$ac_ext <<_ACEOF
18649/* end confdefs.h.  */
18650
18651int
18652main ()
18653{
18654
18655  ;
18656  return 0;
18657}
18658_ACEOF
18659ac_clean_files_save=$ac_clean_files
18660ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
18661# Try to create an executable without -o first, disregard a.out.
18662# It will help us diagnose broken compilers, and finding out an intuition
18663# of exeext.
18664{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
18665$as_echo_n "checking for C compiler default output file name... " >&6; }
18666ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
18667
18668# The possible output files:
18669ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
18670
18671ac_rmfiles=
18672for ac_file in $ac_files
18673do
18674  case $ac_file in
18675    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18676    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
18677  esac
18678done
18679rm -f $ac_rmfiles
18680
18681if { (ac_try="$ac_link_default"
18682case "(($ac_try" in
18683  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18684  *) ac_try_echo=$ac_try;;
18685esac
18686eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18687$as_echo "$ac_try_echo") >&5
18688  (eval "$ac_link_default") 2>&5
18689  ac_status=$?
18690  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18691  (exit $ac_status); }; then
18692  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
18693# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
18694# in a Makefile.  We should not override ac_cv_exeext if it was cached,
18695# so that the user can short-circuit this test for compilers unknown to
18696# Autoconf.
18697for ac_file in $ac_files ''
18698do
18699  test -f "$ac_file" || continue
18700  case $ac_file in
18701    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
18702	;;
18703    [ab].out )
18704	# We found the default executable, but exeext='' is most
18705	# certainly right.
18706	break;;
18707    *.* )
18708        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
18709	then :; else
18710	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18711	fi
18712	# We set ac_cv_exeext here because the later test for it is not
18713	# safe: cross compilers may not add the suffix if given an `-o'
18714	# argument, so we may need to know it at that point already.
18715	# Even if this section looks crufty: it has the advantage of
18716	# actually working.
18717	break;;
18718    * )
18719	break;;
18720  esac
18721done
18722test "$ac_cv_exeext" = no && ac_cv_exeext=
18723
18724else
18725  ac_file=''
18726fi
18727
18728{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
18729$as_echo "$ac_file" >&6; }
18730if test -z "$ac_file"; then
18731  $as_echo "$as_me: failed program was:" >&5
18732sed 's/^/| /' conftest.$ac_ext >&5
18733
18734{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18736{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
18737See \`config.log' for more details." >&5
18738$as_echo "$as_me: error: C compiler cannot create executables
18739See \`config.log' for more details." >&2;}
18740   { (exit 77); exit 77; }; }; }
18741fi
18742
18743ac_exeext=$ac_cv_exeext
18744
18745# Check that the compiler produces executables we can run.  If not, either
18746# the compiler is broken, or we cross compile.
18747{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
18748$as_echo_n "checking whether the C compiler works... " >&6; }
18749# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
18750# If not cross compiling, check that we can run a simple program.
18751if test "$cross_compiling" != yes; then
18752  if { ac_try='./$ac_file'
18753  { (case "(($ac_try" in
18754  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18755  *) ac_try_echo=$ac_try;;
18756esac
18757eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18758$as_echo "$ac_try_echo") >&5
18759  (eval "$ac_try") 2>&5
18760  ac_status=$?
18761  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18762  (exit $ac_status); }; }; then
18763    cross_compiling=no
18764  else
18765    if test "$cross_compiling" = maybe; then
18766	cross_compiling=yes
18767    else
18768	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18769$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18770{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
18771If you meant to cross compile, use \`--host'.
18772See \`config.log' for more details." >&5
18773$as_echo "$as_me: error: cannot run C compiled programs.
18774If you meant to cross compile, use \`--host'.
18775See \`config.log' for more details." >&2;}
18776   { (exit 1); exit 1; }; }; }
18777    fi
18778  fi
18779fi
18780{ $as_echo "$as_me:$LINENO: result: yes" >&5
18781$as_echo "yes" >&6; }
18782
18783rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
18784ac_clean_files=$ac_clean_files_save
18785# Check that the compiler produces executables we can run.  If not, either
18786# the compiler is broken, or we cross compile.
18787{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
18788$as_echo_n "checking whether we are cross compiling... " >&6; }
18789{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
18790$as_echo "$cross_compiling" >&6; }
18791
18792{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
18793$as_echo_n "checking for suffix of executables... " >&6; }
18794if { (ac_try="$ac_link"
18795case "(($ac_try" in
18796  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18797  *) ac_try_echo=$ac_try;;
18798esac
18799eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18800$as_echo "$ac_try_echo") >&5
18801  (eval "$ac_link") 2>&5
18802  ac_status=$?
18803  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18804  (exit $ac_status); }; then
18805  # If both `conftest.exe' and `conftest' are `present' (well, observable)
18806# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
18807# work properly (i.e., refer to `conftest.exe'), while it won't with
18808# `rm'.
18809for ac_file in conftest.exe conftest conftest.*; do
18810  test -f "$ac_file" || continue
18811  case $ac_file in
18812    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18813    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18814	  break;;
18815    * ) break;;
18816  esac
18817done
18818else
18819  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18820$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18821{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
18822See \`config.log' for more details." >&5
18823$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
18824See \`config.log' for more details." >&2;}
18825   { (exit 1); exit 1; }; }; }
18826fi
18827
18828rm -f conftest$ac_cv_exeext
18829{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
18830$as_echo "$ac_cv_exeext" >&6; }
18831
18832rm -f conftest.$ac_ext
18833EXEEXT=$ac_cv_exeext
18834ac_exeext=$EXEEXT
18835{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
18836$as_echo_n "checking for suffix of object files... " >&6; }
18837if test "${ac_cv_objext+set}" = set; then
18838  $as_echo_n "(cached) " >&6
18839else
18840  cat >conftest.$ac_ext <<_ACEOF
18841/* confdefs.h.  */
18842_ACEOF
18843cat confdefs.h >>conftest.$ac_ext
18844cat >>conftest.$ac_ext <<_ACEOF
18845/* end confdefs.h.  */
18846
18847int
18848main ()
18849{
18850
18851  ;
18852  return 0;
18853}
18854_ACEOF
18855rm -f conftest.o conftest.obj
18856if { (ac_try="$ac_compile"
18857case "(($ac_try" in
18858  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18859  *) ac_try_echo=$ac_try;;
18860esac
18861eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18862$as_echo "$ac_try_echo") >&5
18863  (eval "$ac_compile") 2>&5
18864  ac_status=$?
18865  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18866  (exit $ac_status); }; then
18867  for ac_file in conftest.o conftest.obj conftest.*; do
18868  test -f "$ac_file" || continue;
18869  case $ac_file in
18870    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
18871    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
18872       break;;
18873  esac
18874done
18875else
18876  $as_echo "$as_me: failed program was:" >&5
18877sed 's/^/| /' conftest.$ac_ext >&5
18878
18879{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18880$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18881{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
18882See \`config.log' for more details." >&5
18883$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
18884See \`config.log' for more details." >&2;}
18885   { (exit 1); exit 1; }; }; }
18886fi
18887
18888rm -f conftest.$ac_cv_objext conftest.$ac_ext
18889fi
18890{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
18891$as_echo "$ac_cv_objext" >&6; }
18892OBJEXT=$ac_cv_objext
18893ac_objext=$OBJEXT
18894{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
18895$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
18896if test "${ac_cv_c_compiler_gnu+set}" = set; then
18897  $as_echo_n "(cached) " >&6
18898else
18899  cat >conftest.$ac_ext <<_ACEOF
18900/* confdefs.h.  */
18901_ACEOF
18902cat confdefs.h >>conftest.$ac_ext
18903cat >>conftest.$ac_ext <<_ACEOF
18904/* end confdefs.h.  */
18905
18906int
18907main ()
18908{
18909#ifndef __GNUC__
18910       choke me
18911#endif
18912
18913  ;
18914  return 0;
18915}
18916_ACEOF
18917rm -f conftest.$ac_objext
18918if { (ac_try="$ac_compile"
18919case "(($ac_try" in
18920  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18921  *) ac_try_echo=$ac_try;;
18922esac
18923eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18924$as_echo "$ac_try_echo") >&5
18925  (eval "$ac_compile") 2>conftest.er1
18926  ac_status=$?
18927  grep -v '^ *+' conftest.er1 >conftest.err
18928  rm -f conftest.er1
18929  cat conftest.err >&5
18930  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18931  (exit $ac_status); } && {
18932	 test -z "$ac_c_werror_flag" ||
18933	 test ! -s conftest.err
18934       } && test -s conftest.$ac_objext; then
18935  ac_compiler_gnu=yes
18936else
18937  $as_echo "$as_me: failed program was:" >&5
18938sed 's/^/| /' conftest.$ac_ext >&5
18939
18940	ac_compiler_gnu=no
18941fi
18942
18943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18944ac_cv_c_compiler_gnu=$ac_compiler_gnu
18945
18946fi
18947{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
18948$as_echo "$ac_cv_c_compiler_gnu" >&6; }
18949if test $ac_compiler_gnu = yes; then
18950  GCC=yes
18951else
18952  GCC=
18953fi
18954ac_test_CFLAGS=${CFLAGS+set}
18955ac_save_CFLAGS=$CFLAGS
18956{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
18957$as_echo_n "checking whether $CC accepts -g... " >&6; }
18958if test "${ac_cv_prog_cc_g+set}" = set; then
18959  $as_echo_n "(cached) " >&6
18960else
18961  ac_save_c_werror_flag=$ac_c_werror_flag
18962   ac_c_werror_flag=yes
18963   ac_cv_prog_cc_g=no
18964   CFLAGS="-g"
18965   cat >conftest.$ac_ext <<_ACEOF
18966/* confdefs.h.  */
18967_ACEOF
18968cat confdefs.h >>conftest.$ac_ext
18969cat >>conftest.$ac_ext <<_ACEOF
18970/* end confdefs.h.  */
18971
18972int
18973main ()
18974{
18975
18976  ;
18977  return 0;
18978}
18979_ACEOF
18980rm -f conftest.$ac_objext
18981if { (ac_try="$ac_compile"
18982case "(($ac_try" in
18983  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18984  *) ac_try_echo=$ac_try;;
18985esac
18986eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18987$as_echo "$ac_try_echo") >&5
18988  (eval "$ac_compile") 2>conftest.er1
18989  ac_status=$?
18990  grep -v '^ *+' conftest.er1 >conftest.err
18991  rm -f conftest.er1
18992  cat conftest.err >&5
18993  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18994  (exit $ac_status); } && {
18995	 test -z "$ac_c_werror_flag" ||
18996	 test ! -s conftest.err
18997       } && test -s conftest.$ac_objext; then
18998  ac_cv_prog_cc_g=yes
18999else
19000  $as_echo "$as_me: failed program was:" >&5
19001sed 's/^/| /' conftest.$ac_ext >&5
19002
19003	CFLAGS=""
19004      cat >conftest.$ac_ext <<_ACEOF
19005/* confdefs.h.  */
19006_ACEOF
19007cat confdefs.h >>conftest.$ac_ext
19008cat >>conftest.$ac_ext <<_ACEOF
19009/* end confdefs.h.  */
19010
19011int
19012main ()
19013{
19014
19015  ;
19016  return 0;
19017}
19018_ACEOF
19019rm -f conftest.$ac_objext
19020if { (ac_try="$ac_compile"
19021case "(($ac_try" in
19022  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19023  *) ac_try_echo=$ac_try;;
19024esac
19025eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19026$as_echo "$ac_try_echo") >&5
19027  (eval "$ac_compile") 2>conftest.er1
19028  ac_status=$?
19029  grep -v '^ *+' conftest.er1 >conftest.err
19030  rm -f conftest.er1
19031  cat conftest.err >&5
19032  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19033  (exit $ac_status); } && {
19034	 test -z "$ac_c_werror_flag" ||
19035	 test ! -s conftest.err
19036       } && test -s conftest.$ac_objext; then
19037  :
19038else
19039  $as_echo "$as_me: failed program was:" >&5
19040sed 's/^/| /' conftest.$ac_ext >&5
19041
19042	ac_c_werror_flag=$ac_save_c_werror_flag
19043	 CFLAGS="-g"
19044	 cat >conftest.$ac_ext <<_ACEOF
19045/* confdefs.h.  */
19046_ACEOF
19047cat confdefs.h >>conftest.$ac_ext
19048cat >>conftest.$ac_ext <<_ACEOF
19049/* end confdefs.h.  */
19050
19051int
19052main ()
19053{
19054
19055  ;
19056  return 0;
19057}
19058_ACEOF
19059rm -f conftest.$ac_objext
19060if { (ac_try="$ac_compile"
19061case "(($ac_try" in
19062  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19063  *) ac_try_echo=$ac_try;;
19064esac
19065eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19066$as_echo "$ac_try_echo") >&5
19067  (eval "$ac_compile") 2>conftest.er1
19068  ac_status=$?
19069  grep -v '^ *+' conftest.er1 >conftest.err
19070  rm -f conftest.er1
19071  cat conftest.err >&5
19072  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19073  (exit $ac_status); } && {
19074	 test -z "$ac_c_werror_flag" ||
19075	 test ! -s conftest.err
19076       } && test -s conftest.$ac_objext; then
19077  ac_cv_prog_cc_g=yes
19078else
19079  $as_echo "$as_me: failed program was:" >&5
19080sed 's/^/| /' conftest.$ac_ext >&5
19081
19082
19083fi
19084
19085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19086fi
19087
19088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19089fi
19090
19091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19092   ac_c_werror_flag=$ac_save_c_werror_flag
19093fi
19094{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
19095$as_echo "$ac_cv_prog_cc_g" >&6; }
19096if test "$ac_test_CFLAGS" = set; then
19097  CFLAGS=$ac_save_CFLAGS
19098elif test $ac_cv_prog_cc_g = yes; then
19099  if test "$GCC" = yes; then
19100    CFLAGS="-g -O2"
19101  else
19102    CFLAGS="-g"
19103  fi
19104else
19105  if test "$GCC" = yes; then
19106    CFLAGS="-O2"
19107  else
19108    CFLAGS=
19109  fi
19110fi
19111{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
19112$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19113if test "${ac_cv_prog_cc_c89+set}" = set; then
19114  $as_echo_n "(cached) " >&6
19115else
19116  ac_cv_prog_cc_c89=no
19117ac_save_CC=$CC
19118cat >conftest.$ac_ext <<_ACEOF
19119/* confdefs.h.  */
19120_ACEOF
19121cat confdefs.h >>conftest.$ac_ext
19122cat >>conftest.$ac_ext <<_ACEOF
19123/* end confdefs.h.  */
19124#include <stdarg.h>
19125#include <stdio.h>
19126#include <sys/types.h>
19127#include <sys/stat.h>
19128/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19129struct buf { int x; };
19130FILE * (*rcsopen) (struct buf *, struct stat *, int);
19131static char *e (p, i)
19132     char **p;
19133     int i;
19134{
19135  return p[i];
19136}
19137static char *f (char * (*g) (char **, int), char **p, ...)
19138{
19139  char *s;
19140  va_list v;
19141  va_start (v,p);
19142  s = g (p, va_arg (v,int));
19143  va_end (v);
19144  return s;
19145}
19146
19147/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19148   function prototypes and stuff, but not '\xHH' hex character constants.
19149   These don't provoke an error unfortunately, instead are silently treated
19150   as 'x'.  The following induces an error, until -std is added to get
19151   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19152   array size at least.  It's necessary to write '\x00'==0 to get something
19153   that's true only with -std.  */
19154int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19155
19156/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19157   inside strings and character constants.  */
19158#define FOO(x) 'x'
19159int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19160
19161int test (int i, double x);
19162struct s1 {int (*f) (int a);};
19163struct s2 {int (*f) (double a);};
19164int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19165int argc;
19166char **argv;
19167int
19168main ()
19169{
19170return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19171  ;
19172  return 0;
19173}
19174_ACEOF
19175for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19176	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19177do
19178  CC="$ac_save_CC $ac_arg"
19179  rm -f conftest.$ac_objext
19180if { (ac_try="$ac_compile"
19181case "(($ac_try" in
19182  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19183  *) ac_try_echo=$ac_try;;
19184esac
19185eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19186$as_echo "$ac_try_echo") >&5
19187  (eval "$ac_compile") 2>conftest.er1
19188  ac_status=$?
19189  grep -v '^ *+' conftest.er1 >conftest.err
19190  rm -f conftest.er1
19191  cat conftest.err >&5
19192  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19193  (exit $ac_status); } && {
19194	 test -z "$ac_c_werror_flag" ||
19195	 test ! -s conftest.err
19196       } && test -s conftest.$ac_objext; then
19197  ac_cv_prog_cc_c89=$ac_arg
19198else
19199  $as_echo "$as_me: failed program was:" >&5
19200sed 's/^/| /' conftest.$ac_ext >&5
19201
19202
19203fi
19204
19205rm -f core conftest.err conftest.$ac_objext
19206  test "x$ac_cv_prog_cc_c89" != "xno" && break
19207done
19208rm -f conftest.$ac_ext
19209CC=$ac_save_CC
19210
19211fi
19212# AC_CACHE_VAL
19213case "x$ac_cv_prog_cc_c89" in
19214  x)
19215    { $as_echo "$as_me:$LINENO: result: none needed" >&5
19216$as_echo "none needed" >&6; } ;;
19217  xno)
19218    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
19219$as_echo "unsupported" >&6; } ;;
19220  *)
19221    CC="$CC $ac_cv_prog_cc_c89"
19222    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
19223$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19224esac
19225
19226
19227ac_ext=cpp
19228ac_cpp='$CXXCPP $CPPFLAGS'
19229ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19230ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19231ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19232
19233
19234### Locate C++ compiler (CXX)
19235
19236if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19237  # Do not probe for CC on MacOSX.
19238  COMPILER_CHECK_LIST="cl g++"
19239else
19240  COMPILER_CHECK_LIST="cl CC g++"
19241fi
19242
19243  COMPILER_NAME=C++
19244
19245  # Do a first initial attempt at searching the list of compiler names.
19246  # AC_PATH_PROGS can't be run multiple times with the same variable,
19247  # so create a new name for this run.
19248  for ac_prog in $COMPILER_CHECK_LIST
19249do
19250  # Extract the first word of "$ac_prog", so it can be a program name with args.
19251set dummy $ac_prog; ac_word=$2
19252{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
19253$as_echo_n "checking for $ac_word... " >&6; }
19254if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then
19255  $as_echo_n "(cached) " >&6
19256else
19257  case $POTENTIAL_CXX in
19258  [\\/]* | ?:[\\/]*)
19259  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19260  ;;
19261  *)
19262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19263for as_dir in $PATH
19264do
19265  IFS=$as_save_IFS
19266  test -z "$as_dir" && as_dir=.
19267  for ac_exec_ext in '' $ac_executable_extensions; do
19268  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19269    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19270    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19271    break 2
19272  fi
19273done
19274done
19275IFS=$as_save_IFS
19276
19277  ;;
19278esac
19279fi
19280POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19281if test -n "$POTENTIAL_CXX"; then
19282  { $as_echo "$as_me:$LINENO: result: $POTENTIAL_CXX" >&5
19283$as_echo "$POTENTIAL_CXX" >&6; }
19284else
19285  { $as_echo "$as_me:$LINENO: result: no" >&5
19286$as_echo "no" >&6; }
19287fi
19288
19289
19290  test -n "$POTENTIAL_CXX" && break
19291done
19292
19293  CXX=$POTENTIAL_CXX
19294
19295  if test "x$$CXX" = x; then
19296
19297    # Print a helpful message on how to acquire the necessary build dependency.
19298    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19299    MISSING_DEPENDENCY=devkit
19300    PKGHANDLER_COMMAND=
19301
19302    case $PKGHANDLER in
19303	apt-get)
19304                apt_help     $MISSING_DEPENDENCY ;;
19305    yum)
19306                yum_help     $MISSING_DEPENDENCY ;;
19307	port)
19308                port_help    $MISSING_DEPENDENCY ;;
19309	pkgutil)
19310                pkgutil_help $MISSING_DEPENDENCY ;;
19311	pkgadd)
19312                pkgadd_help  $MISSING_DEPENDENCY ;;
19313    * )
19314      break ;;
19315    esac
19316
19317    if test "x$PKGHANDLER_COMMAND" != x; then
19318        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19319    fi
19320
19321      { { $as_echo "$as_me:$LINENO: error: Could not find a $COMPILER_NAME compiler. $HELP_MSG" >&5
19322$as_echo "$as_me: error: Could not find a $COMPILER_NAME compiler. $HELP_MSG" >&2;}
19323   { (exit 1); exit 1; }; }
19324  fi
19325
19326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19327
19328  # First separate the path from the arguments. This will split at the first
19329  # space.
19330  complete="$CXX"
19331  path="${complete%% *}"
19332  tmp="$complete EOL"
19333  arguments="${tmp#* }"
19334
19335  # Input might be given as Windows format, start by converting to
19336  # unix format.
19337  new_path=`$CYGPATH -u "$path"`
19338
19339  # Now try to locate executable using which
19340  new_path=`$WHICH "$new_path" 2> /dev/null`
19341  # bat and cmd files are not always considered executable in cygwin causing which
19342  # to not find them
19343  if test "x$new_path" = x \
19344           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19345           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19346    new_path=`$CYGPATH -u "$path"`
19347  fi
19348  if test "x$new_path" = x; then
19349    # Oops. Which didn't find the executable.
19350    # The splitting of arguments from the executable at a space might have been incorrect,
19351    # since paths with space are more likely in Windows. Give it another try with the whole
19352    # argument.
19353    path="$complete"
19354    arguments="EOL"
19355    new_path=`$CYGPATH -u "$path"`
19356    new_path=`$WHICH "$new_path" 2> /dev/null`
19357    # bat and cmd files are not always considered executable in cygwin causing which
19358    # to not find them
19359    if test "x$new_path" = x \
19360             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19361             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19362      new_path=`$CYGPATH -u "$path"`
19363    fi
19364    if test "x$new_path" = x; then
19365      # It's still not found. Now this is an unrecoverable error.
19366      { $as_echo "$as_me:$LINENO: The path of CXX, which resolves as \"$complete\", is not found." >&5
19367$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19368      has_space=`$ECHO "$complete" | $GREP " "`
19369      if test "x$has_space" != x; then
19370        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19372      fi
19373      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXX" >&5
19374$as_echo "$as_me: error: Cannot locate the the path of CXX" >&2;}
19375   { (exit 1); exit 1; }; }
19376    fi
19377  fi
19378
19379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19382  # "foo.exe" is OK but "foo" is an error.
19383  #
19384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19385  # It is also a way to make sure we got the proper file name for the real test later on.
19386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19387  if test "x$test_shortpath" = x; then
19388    # Short path failed, file does not exist as specified.
19389    # Try adding .exe or .cmd
19390    if test -f "${new_path}.exe"; then
19391       input_to_shortpath="${new_path}.exe"
19392    elif test -f "${new_path}.cmd"; then
19393       input_to_shortpath="${new_path}.cmd"
19394    else
19395      { $as_echo "$as_me:$LINENO: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19396$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19397      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19398$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19399      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXX" >&5
19400$as_echo "$as_me: error: Cannot locate the the path of CXX" >&2;}
19401   { (exit 1); exit 1; }; }
19402    fi
19403  else
19404    input_to_shortpath="$new_path"
19405  fi
19406
19407  # Call helper function which possibly converts this using DOS-style short mode.
19408  # If so, the updated path is stored in $new_path.
19409  new_path="$input_to_shortpath"
19410
19411  input_path="$input_to_shortpath"
19412  # Check if we need to convert this using DOS-style short mode. If the path
19413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19414  # take no chances and rewrite it.
19415  # Note: m4 eats our [], so we need to use [ and ] instead.
19416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19417  if test "x$has_forbidden_chars" != x; then
19418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19422      # Going to short mode and back again did indeed matter. Since short mode is
19423      # case insensitive, let's make it lowercase to improve readability.
19424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19425      # Now convert it back to Unix-stile (cygpath)
19426      input_path=`$CYGPATH -u "$shortmode_path"`
19427      new_path="$input_path"
19428    fi
19429  fi
19430
19431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19432  if test "x$test_cygdrive_prefix" = x; then
19433    # As a simple fix, exclude /usr/bin since it's not a real path.
19434    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19436      # a path prefixed by /cygdrive for fixpath to work.
19437      new_path="$CYGWIN_ROOT_PATH$input_path"
19438    fi
19439  fi
19440
19441  # remove trailing .exe if any
19442  new_path="${new_path/%.exe/}"
19443
19444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19445
19446  # First separate the path from the arguments. This will split at the first
19447  # space.
19448  complete="$CXX"
19449  path="${complete%% *}"
19450  tmp="$complete EOL"
19451  arguments="${tmp#* }"
19452
19453  # Input might be given as Windows format, start by converting to
19454  # unix format.
19455  new_path="$path"
19456
19457  windows_path="$new_path"
19458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19459    unix_path=`$CYGPATH -u "$windows_path"`
19460    new_path="$unix_path"
19461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19463    new_path="$unix_path"
19464  fi
19465
19466
19467  # Now try to locate executable using which
19468  new_path=`$WHICH "$new_path" 2> /dev/null`
19469
19470  if test "x$new_path" = x; then
19471    # Oops. Which didn't find the executable.
19472    # The splitting of arguments from the executable at a space might have been incorrect,
19473    # since paths with space are more likely in Windows. Give it another try with the whole
19474    # argument.
19475    path="$complete"
19476    arguments="EOL"
19477    new_path="$path"
19478
19479  windows_path="$new_path"
19480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19481    unix_path=`$CYGPATH -u "$windows_path"`
19482    new_path="$unix_path"
19483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19485    new_path="$unix_path"
19486  fi
19487
19488
19489    new_path=`$WHICH "$new_path" 2> /dev/null`
19490
19491    if test "x$new_path" = x; then
19492      # It's still not found. Now this is an unrecoverable error.
19493      { $as_echo "$as_me:$LINENO: The path of CXX, which resolves as \"$complete\", is not found." >&5
19494$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19495      has_space=`$ECHO "$complete" | $GREP " "`
19496      if test "x$has_space" != x; then
19497        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19498$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19499      fi
19500      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXX" >&5
19501$as_echo "$as_me: error: Cannot locate the the path of CXX" >&2;}
19502   { (exit 1); exit 1; }; }
19503    fi
19504  fi
19505
19506  # Now new_path has a complete unix path to the binary
19507  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19508    # Keep paths in /bin as-is, but remove trailing .exe if any
19509    new_path="${new_path/%.exe/}"
19510    # Do not save /bin paths to all_fixpath_prefixes!
19511  else
19512    # Not in mixed or Windows style, start by that.
19513    new_path=`cmd //c echo $new_path`
19514
19515  input_path="$new_path"
19516  # Check if we need to convert this using DOS-style short mode. If the path
19517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19518  # take no chances and rewrite it.
19519  # Note: m4 eats our [], so we need to use [ and ] instead.
19520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19521  if test "x$has_forbidden_chars" != x; then
19522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19524  fi
19525
19526    # Output is in $new_path
19527
19528  windows_path="$new_path"
19529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19530    unix_path=`$CYGPATH -u "$windows_path"`
19531    new_path="$unix_path"
19532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19534    new_path="$unix_path"
19535  fi
19536
19537    # remove trailing .exe if any
19538    new_path="${new_path/%.exe/}"
19539
19540    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19541    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19542  fi
19543
19544  else
19545    # We're on a posix platform. Hooray! :)
19546    # First separate the path from the arguments. This will split at the first
19547    # space.
19548    complete="$CXX"
19549    path="${complete%% *}"
19550    tmp="$complete EOL"
19551    arguments="${tmp#* }"
19552
19553    new_path=`$WHICH $path 2> /dev/null`
19554    if test "x$new_path" = x; then
19555      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19556      if test "x$is_absolute_path" != x; then
19557        { $as_echo "$as_me:$LINENO: Resolving CXX (as $path) with 'which' failed, using $path directly." >&5
19558$as_echo "$as_me: Resolving CXX (as $path) with 'which' failed, using $path directly." >&6;}
19559        new_path="$path"
19560      else
19561        { $as_echo "$as_me:$LINENO: The path of CXX, which resolves as \"$complete\", is not found." >&5
19562$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19563        has_space=`$ECHO "$complete" | $GREP " "`
19564        if test "x$has_space" != x; then
19565          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
19566$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19567        fi
19568        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXX" >&5
19569$as_echo "$as_me: error: Cannot locate the the path of CXX" >&2;}
19570   { (exit 1); exit 1; }; }
19571      fi
19572    fi
19573  fi
19574
19575  # Now join together the path and the arguments once again
19576  if test "x$arguments" != xEOL; then
19577      new_complete="$new_path ${arguments% *}"
19578  else
19579      new_complete="$new_path"
19580  fi
19581
19582  if test "x$complete" != "x$new_complete"; then
19583    CXX="$new_complete"
19584    { $as_echo "$as_me:$LINENO: Rewriting CXX to \"$new_complete\"" >&5
19585$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
19586  fi
19587
19588  { $as_echo "$as_me:$LINENO: checking resolved symbolic links for CXX" >&5
19589$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
19590  TEST_COMPILER="$CXX"
19591
19592    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19593        # Follow a chain of symbolic links. Use readlink
19594        # where it exists, else fall back to horribly
19595        # complicated shell code.
19596        if test "x$READLINK_TESTED" != yes; then
19597            # On MacOSX there is a readlink tool with a different
19598            # purpose than the GNU readlink tool. Check the found readlink.
19599            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
19600            if test "x$ISGNU" = x; then
19601                 # A readlink that we do not know how to use.
19602                 # Are there other non-GNU readlinks out there?
19603                 READLINK_TESTED=yes
19604                 READLINK=
19605            fi
19606        fi
19607
19608        if test "x$READLINK" != x; then
19609            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19610        else
19611            STARTDIR=$PWD
19612            COUNTER=0
19613            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19614            sym_link_file=`$BASENAME $TEST_COMPILER`
19615            while test $COUNTER -lt 20; do
19616                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19617                if test "x$ISLINK" == x; then
19618                    # This is not a symbolic link! We are done!
19619                    break
19620                fi
19621                # The link might be relative! We have to use cd to travel safely.
19622                cd $sym_link_dir
19623                # ... and we must get the to the absolute path, not one using symbolic links.
19624                cd `pwd -P`
19625                cd `$DIRNAME $ISLINK`
19626                sym_link_dir=`$THEPWDCMD`
19627                sym_link_file=`$BASENAME $ISLINK`
19628                let COUNTER=COUNTER+1
19629            done
19630            cd $STARTDIR
19631            TEST_COMPILER=$sym_link_dir/$sym_link_file
19632        fi
19633    fi
19634
19635  { $as_echo "$as_me:$LINENO: result: $TEST_COMPILER" >&5
19636$as_echo "$TEST_COMPILER" >&6; }
19637  { $as_echo "$as_me:$LINENO: checking if CXX is disguised ccache" >&5
19638$as_echo_n "checking if CXX is disguised ccache... " >&6; }
19639
19640  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19641  if test "x$COMPILER_BASENAME" = "xccache"; then
19642    { $as_echo "$as_me:$LINENO: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19643$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19644    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19645    # We want to control ccache invocation ourselves, so ignore this cc and try
19646    # searching again.
19647
19648    # Remove the path to the fake ccache cc from the PATH
19649    RETRY_COMPILER_SAVED_PATH="$PATH"
19650    COMPILER_DIRNAME=`$DIRNAME $CXX`
19651    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19652
19653    # Try again looking for our compiler
19654    if test -n "$ac_tool_prefix"; then
19655  for ac_prog in $COMPILER_CHECK_LIST
19656  do
19657    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19658set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19659{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
19660$as_echo_n "checking for $ac_word... " >&6; }
19661if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then
19662  $as_echo_n "(cached) " >&6
19663else
19664  if test -n "$PROPER_COMPILER_CXX"; then
19665  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
19666else
19667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19668for as_dir in $PATH
19669do
19670  IFS=$as_save_IFS
19671  test -z "$as_dir" && as_dir=.
19672  for ac_exec_ext in '' $ac_executable_extensions; do
19673  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19674    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
19675    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19676    break 2
19677  fi
19678done
19679done
19680IFS=$as_save_IFS
19681
19682fi
19683fi
19684PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
19685if test -n "$PROPER_COMPILER_CXX"; then
19686  { $as_echo "$as_me:$LINENO: result: $PROPER_COMPILER_CXX" >&5
19687$as_echo "$PROPER_COMPILER_CXX" >&6; }
19688else
19689  { $as_echo "$as_me:$LINENO: result: no" >&5
19690$as_echo "no" >&6; }
19691fi
19692
19693
19694    test -n "$PROPER_COMPILER_CXX" && break
19695  done
19696fi
19697if test -z "$PROPER_COMPILER_CXX"; then
19698  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
19699  for ac_prog in $COMPILER_CHECK_LIST
19700do
19701  # Extract the first word of "$ac_prog", so it can be a program name with args.
19702set dummy $ac_prog; ac_word=$2
19703{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
19704$as_echo_n "checking for $ac_word... " >&6; }
19705if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then
19706  $as_echo_n "(cached) " >&6
19707else
19708  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19709  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
19710else
19711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19712for as_dir in $PATH
19713do
19714  IFS=$as_save_IFS
19715  test -z "$as_dir" && as_dir=.
19716  for ac_exec_ext in '' $ac_executable_extensions; do
19717  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19718    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
19719    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19720    break 2
19721  fi
19722done
19723done
19724IFS=$as_save_IFS
19725
19726fi
19727fi
19728ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
19729if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19730  { $as_echo "$as_me:$LINENO: result: $ac_ct_PROPER_COMPILER_CXX" >&5
19731$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
19732else
19733  { $as_echo "$as_me:$LINENO: result: no" >&5
19734$as_echo "no" >&6; }
19735fi
19736
19737
19738  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
19739done
19740
19741  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
19742    PROPER_COMPILER_CXX=""
19743  else
19744    case $cross_compiling:$ac_tool_warned in
19745yes:)
19746{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
19747$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19748ac_tool_warned=yes ;;
19749esac
19750    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
19751  fi
19752fi
19753
19754
19755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19756
19757  # First separate the path from the arguments. This will split at the first
19758  # space.
19759  complete="$PROPER_COMPILER_CXX"
19760  path="${complete%% *}"
19761  tmp="$complete EOL"
19762  arguments="${tmp#* }"
19763
19764  # Input might be given as Windows format, start by converting to
19765  # unix format.
19766  new_path=`$CYGPATH -u "$path"`
19767
19768  # Now try to locate executable using which
19769  new_path=`$WHICH "$new_path" 2> /dev/null`
19770  # bat and cmd files are not always considered executable in cygwin causing which
19771  # to not find them
19772  if test "x$new_path" = x \
19773           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19774           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19775    new_path=`$CYGPATH -u "$path"`
19776  fi
19777  if test "x$new_path" = x; then
19778    # Oops. Which didn't find the executable.
19779    # The splitting of arguments from the executable at a space might have been incorrect,
19780    # since paths with space are more likely in Windows. Give it another try with the whole
19781    # argument.
19782    path="$complete"
19783    arguments="EOL"
19784    new_path=`$CYGPATH -u "$path"`
19785    new_path=`$WHICH "$new_path" 2> /dev/null`
19786    # bat and cmd files are not always considered executable in cygwin causing which
19787    # to not find them
19788    if test "x$new_path" = x \
19789             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19790             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19791      new_path=`$CYGPATH -u "$path"`
19792    fi
19793    if test "x$new_path" = x; then
19794      # It's still not found. Now this is an unrecoverable error.
19795      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19796$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19797      has_space=`$ECHO "$complete" | $GREP " "`
19798      if test "x$has_space" != x; then
19799        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19801      fi
19802      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&5
19803$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&2;}
19804   { (exit 1); exit 1; }; }
19805    fi
19806  fi
19807
19808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19811  # "foo.exe" is OK but "foo" is an error.
19812  #
19813  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19814  # It is also a way to make sure we got the proper file name for the real test later on.
19815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19816  if test "x$test_shortpath" = x; then
19817    # Short path failed, file does not exist as specified.
19818    # Try adding .exe or .cmd
19819    if test -f "${new_path}.exe"; then
19820       input_to_shortpath="${new_path}.exe"
19821    elif test -f "${new_path}.cmd"; then
19822       input_to_shortpath="${new_path}.cmd"
19823    else
19824      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
19825$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
19826      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19827$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19828      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&5
19829$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&2;}
19830   { (exit 1); exit 1; }; }
19831    fi
19832  else
19833    input_to_shortpath="$new_path"
19834  fi
19835
19836  # Call helper function which possibly converts this using DOS-style short mode.
19837  # If so, the updated path is stored in $new_path.
19838  new_path="$input_to_shortpath"
19839
19840  input_path="$input_to_shortpath"
19841  # Check if we need to convert this using DOS-style short mode. If the path
19842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19843  # take no chances and rewrite it.
19844  # Note: m4 eats our [], so we need to use [ and ] instead.
19845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19846  if test "x$has_forbidden_chars" != x; then
19847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19851      # Going to short mode and back again did indeed matter. Since short mode is
19852      # case insensitive, let's make it lowercase to improve readability.
19853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19854      # Now convert it back to Unix-stile (cygpath)
19855      input_path=`$CYGPATH -u "$shortmode_path"`
19856      new_path="$input_path"
19857    fi
19858  fi
19859
19860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19861  if test "x$test_cygdrive_prefix" = x; then
19862    # As a simple fix, exclude /usr/bin since it's not a real path.
19863    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19865      # a path prefixed by /cygdrive for fixpath to work.
19866      new_path="$CYGWIN_ROOT_PATH$input_path"
19867    fi
19868  fi
19869
19870  # remove trailing .exe if any
19871  new_path="${new_path/%.exe/}"
19872
19873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19874
19875  # First separate the path from the arguments. This will split at the first
19876  # space.
19877  complete="$PROPER_COMPILER_CXX"
19878  path="${complete%% *}"
19879  tmp="$complete EOL"
19880  arguments="${tmp#* }"
19881
19882  # Input might be given as Windows format, start by converting to
19883  # unix format.
19884  new_path="$path"
19885
19886  windows_path="$new_path"
19887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19888    unix_path=`$CYGPATH -u "$windows_path"`
19889    new_path="$unix_path"
19890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19892    new_path="$unix_path"
19893  fi
19894
19895
19896  # Now try to locate executable using which
19897  new_path=`$WHICH "$new_path" 2> /dev/null`
19898
19899  if test "x$new_path" = x; then
19900    # Oops. Which didn't find the executable.
19901    # The splitting of arguments from the executable at a space might have been incorrect,
19902    # since paths with space are more likely in Windows. Give it another try with the whole
19903    # argument.
19904    path="$complete"
19905    arguments="EOL"
19906    new_path="$path"
19907
19908  windows_path="$new_path"
19909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19910    unix_path=`$CYGPATH -u "$windows_path"`
19911    new_path="$unix_path"
19912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19914    new_path="$unix_path"
19915  fi
19916
19917
19918    new_path=`$WHICH "$new_path" 2> /dev/null`
19919
19920    if test "x$new_path" = x; then
19921      # It's still not found. Now this is an unrecoverable error.
19922      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19923$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19924      has_space=`$ECHO "$complete" | $GREP " "`
19925      if test "x$has_space" != x; then
19926        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19927$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19928      fi
19929      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&5
19930$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&2;}
19931   { (exit 1); exit 1; }; }
19932    fi
19933  fi
19934
19935  # Now new_path has a complete unix path to the binary
19936  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19937    # Keep paths in /bin as-is, but remove trailing .exe if any
19938    new_path="${new_path/%.exe/}"
19939    # Do not save /bin paths to all_fixpath_prefixes!
19940  else
19941    # Not in mixed or Windows style, start by that.
19942    new_path=`cmd //c echo $new_path`
19943
19944  input_path="$new_path"
19945  # Check if we need to convert this using DOS-style short mode. If the path
19946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19947  # take no chances and rewrite it.
19948  # Note: m4 eats our [], so we need to use [ and ] instead.
19949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19950  if test "x$has_forbidden_chars" != x; then
19951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19953  fi
19954
19955    # Output is in $new_path
19956
19957  windows_path="$new_path"
19958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19959    unix_path=`$CYGPATH -u "$windows_path"`
19960    new_path="$unix_path"
19961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19963    new_path="$unix_path"
19964  fi
19965
19966    # remove trailing .exe if any
19967    new_path="${new_path/%.exe/}"
19968
19969    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19970    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19971  fi
19972
19973  else
19974    # We're on a posix platform. Hooray! :)
19975    # First separate the path from the arguments. This will split at the first
19976    # space.
19977    complete="$PROPER_COMPILER_CXX"
19978    path="${complete%% *}"
19979    tmp="$complete EOL"
19980    arguments="${tmp#* }"
19981
19982    new_path=`$WHICH $path 2> /dev/null`
19983    if test "x$new_path" = x; then
19984      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19985      if test "x$is_absolute_path" != x; then
19986        { $as_echo "$as_me:$LINENO: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&5
19987$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&6;}
19988        new_path="$path"
19989      else
19990        { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19991$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19992        has_space=`$ECHO "$complete" | $GREP " "`
19993        if test "x$has_space" != x; then
19994          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
19995$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19996        fi
19997        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&5
19998$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&2;}
19999   { (exit 1); exit 1; }; }
20000      fi
20001    fi
20002  fi
20003
20004  # Now join together the path and the arguments once again
20005  if test "x$arguments" != xEOL; then
20006      new_complete="$new_path ${arguments% *}"
20007  else
20008      new_complete="$new_path"
20009  fi
20010
20011  if test "x$complete" != "x$new_complete"; then
20012    PROPER_COMPILER_CXX="$new_complete"
20013    { $as_echo "$as_me:$LINENO: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20014$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20015  fi
20016
20017    PATH="$RETRY_COMPILER_SAVED_PATH"
20018
20019    { $as_echo "$as_me:$LINENO: checking for resolved symbolic links for CXX" >&5
20020$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20021
20022    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20023        # Follow a chain of symbolic links. Use readlink
20024        # where it exists, else fall back to horribly
20025        # complicated shell code.
20026        if test "x$READLINK_TESTED" != yes; then
20027            # On MacOSX there is a readlink tool with a different
20028            # purpose than the GNU readlink tool. Check the found readlink.
20029            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
20030            if test "x$ISGNU" = x; then
20031                 # A readlink that we do not know how to use.
20032                 # Are there other non-GNU readlinks out there?
20033                 READLINK_TESTED=yes
20034                 READLINK=
20035            fi
20036        fi
20037
20038        if test "x$READLINK" != x; then
20039            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20040        else
20041            STARTDIR=$PWD
20042            COUNTER=0
20043            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20044            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20045            while test $COUNTER -lt 20; do
20046                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20047                if test "x$ISLINK" == x; then
20048                    # This is not a symbolic link! We are done!
20049                    break
20050                fi
20051                # The link might be relative! We have to use cd to travel safely.
20052                cd $sym_link_dir
20053                # ... and we must get the to the absolute path, not one using symbolic links.
20054                cd `pwd -P`
20055                cd `$DIRNAME $ISLINK`
20056                sym_link_dir=`$THEPWDCMD`
20057                sym_link_file=`$BASENAME $ISLINK`
20058                let COUNTER=COUNTER+1
20059            done
20060            cd $STARTDIR
20061            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20062        fi
20063    fi
20064
20065    { $as_echo "$as_me:$LINENO: result: $PROPER_COMPILER_CXX" >&5
20066$as_echo "$PROPER_COMPILER_CXX" >&6; }
20067    CXX="$PROPER_COMPILER_CXX"
20068  else
20069    { $as_echo "$as_me:$LINENO: result: no, keeping CXX" >&5
20070$as_echo "no, keeping CXX" >&6; }
20071    CXX="$TEST_COMPILER"
20072  fi
20073
20074  COMPILER=$CXX
20075  COMPILER_NAME=$COMPILER_NAME
20076
20077  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20078    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20079    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20080    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20081    if test $? -ne 0; then
20082      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20083
20084      { $as_echo "$as_me:$LINENO: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
20085$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20086      { $as_echo "$as_me:$LINENO: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20087$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20088      { { $as_echo "$as_me:$LINENO: error: Sun Studio compiler is required. Try setting --with-tools-dir." >&5
20089$as_echo "$as_me: error: Sun Studio compiler is required. Try setting --with-tools-dir." >&2;}
20090   { (exit 1); exit 1; }; }
20091    else
20092      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20093      COMPILER_VENDOR="Sun Studio"
20094    fi
20095  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20096    # First line typically looks something like:
20097    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20098    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20099    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20100    COMPILER_VENDOR="Microsoft CL.EXE"
20101    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20102    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20103      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20104        { { $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
20105$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;}
20106   { (exit 1); exit 1; }; }
20107      fi
20108    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20109      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20110        { { $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
20111$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;}
20112   { (exit 1); exit 1; }; }
20113      fi
20114    fi
20115  else
20116    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20117    # Check that this is likely to be GCC.
20118    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20119    if test $? -ne 0; then
20120      { $as_echo "$as_me:$LINENO: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20121$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20122      { $as_echo "$as_me:$LINENO: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20123$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20124      { { $as_echo "$as_me:$LINENO: error: GCC compiler is required. Try setting --with-tools-dir." >&5
20125$as_echo "$as_me: error: GCC compiler is required. Try setting --with-tools-dir." >&2;}
20126   { (exit 1); exit 1; }; }
20127    fi
20128
20129    # First line typically looks something like:
20130    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20131    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20132    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20133  fi
20134  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20135  CXX_VERSION="$COMPILER_VERSION"
20136  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20137  CXX_VENDOR="$COMPILER_VENDOR"
20138
20139  { $as_echo "$as_me:$LINENO: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20140$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20141
20142
20143# Now that we have resolved CXX ourself, let autoconf have it's go at it
20144ac_ext=cpp
20145ac_cpp='$CXXCPP $CPPFLAGS'
20146ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20147ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20148ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20149if test -z "$CXX"; then
20150  if test -n "$CCC"; then
20151    CXX=$CCC
20152  else
20153    if test -n "$ac_tool_prefix"; then
20154  for ac_prog in $CXX
20155  do
20156    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20157set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20158{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
20159$as_echo_n "checking for $ac_word... " >&6; }
20160if test "${ac_cv_prog_CXX+set}" = set; then
20161  $as_echo_n "(cached) " >&6
20162else
20163  if test -n "$CXX"; then
20164  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20165else
20166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20167for as_dir in $PATH
20168do
20169  IFS=$as_save_IFS
20170  test -z "$as_dir" && as_dir=.
20171  for ac_exec_ext in '' $ac_executable_extensions; do
20172  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20173    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20174    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20175    break 2
20176  fi
20177done
20178done
20179IFS=$as_save_IFS
20180
20181fi
20182fi
20183CXX=$ac_cv_prog_CXX
20184if test -n "$CXX"; then
20185  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
20186$as_echo "$CXX" >&6; }
20187else
20188  { $as_echo "$as_me:$LINENO: result: no" >&5
20189$as_echo "no" >&6; }
20190fi
20191
20192
20193    test -n "$CXX" && break
20194  done
20195fi
20196if test -z "$CXX"; then
20197  ac_ct_CXX=$CXX
20198  for ac_prog in $CXX
20199do
20200  # Extract the first word of "$ac_prog", so it can be a program name with args.
20201set dummy $ac_prog; ac_word=$2
20202{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
20203$as_echo_n "checking for $ac_word... " >&6; }
20204if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
20205  $as_echo_n "(cached) " >&6
20206else
20207  if test -n "$ac_ct_CXX"; then
20208  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20209else
20210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20211for as_dir in $PATH
20212do
20213  IFS=$as_save_IFS
20214  test -z "$as_dir" && as_dir=.
20215  for ac_exec_ext in '' $ac_executable_extensions; do
20216  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20217    ac_cv_prog_ac_ct_CXX="$ac_prog"
20218    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20219    break 2
20220  fi
20221done
20222done
20223IFS=$as_save_IFS
20224
20225fi
20226fi
20227ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20228if test -n "$ac_ct_CXX"; then
20229  { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
20230$as_echo "$ac_ct_CXX" >&6; }
20231else
20232  { $as_echo "$as_me:$LINENO: result: no" >&5
20233$as_echo "no" >&6; }
20234fi
20235
20236
20237  test -n "$ac_ct_CXX" && break
20238done
20239
20240  if test "x$ac_ct_CXX" = x; then
20241    CXX="g++"
20242  else
20243    case $cross_compiling:$ac_tool_warned in
20244yes:)
20245{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
20246$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20247ac_tool_warned=yes ;;
20248esac
20249    CXX=$ac_ct_CXX
20250  fi
20251fi
20252
20253  fi
20254fi
20255# Provide some information about the compiler.
20256$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
20257set X $ac_compile
20258ac_compiler=$2
20259{ (ac_try="$ac_compiler --version >&5"
20260case "(($ac_try" in
20261  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20262  *) ac_try_echo=$ac_try;;
20263esac
20264eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20265$as_echo "$ac_try_echo") >&5
20266  (eval "$ac_compiler --version >&5") 2>&5
20267  ac_status=$?
20268  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20269  (exit $ac_status); }
20270{ (ac_try="$ac_compiler -v >&5"
20271case "(($ac_try" in
20272  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20273  *) ac_try_echo=$ac_try;;
20274esac
20275eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20276$as_echo "$ac_try_echo") >&5
20277  (eval "$ac_compiler -v >&5") 2>&5
20278  ac_status=$?
20279  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20280  (exit $ac_status); }
20281{ (ac_try="$ac_compiler -V >&5"
20282case "(($ac_try" in
20283  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20284  *) ac_try_echo=$ac_try;;
20285esac
20286eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20287$as_echo "$ac_try_echo") >&5
20288  (eval "$ac_compiler -V >&5") 2>&5
20289  ac_status=$?
20290  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20291  (exit $ac_status); }
20292
20293{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
20294$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20295if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
20296  $as_echo_n "(cached) " >&6
20297else
20298  cat >conftest.$ac_ext <<_ACEOF
20299/* confdefs.h.  */
20300_ACEOF
20301cat confdefs.h >>conftest.$ac_ext
20302cat >>conftest.$ac_ext <<_ACEOF
20303/* end confdefs.h.  */
20304
20305int
20306main ()
20307{
20308#ifndef __GNUC__
20309       choke me
20310#endif
20311
20312  ;
20313  return 0;
20314}
20315_ACEOF
20316rm -f conftest.$ac_objext
20317if { (ac_try="$ac_compile"
20318case "(($ac_try" in
20319  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20320  *) ac_try_echo=$ac_try;;
20321esac
20322eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20323$as_echo "$ac_try_echo") >&5
20324  (eval "$ac_compile") 2>conftest.er1
20325  ac_status=$?
20326  grep -v '^ *+' conftest.er1 >conftest.err
20327  rm -f conftest.er1
20328  cat conftest.err >&5
20329  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20330  (exit $ac_status); } && {
20331	 test -z "$ac_cxx_werror_flag" ||
20332	 test ! -s conftest.err
20333       } && test -s conftest.$ac_objext; then
20334  ac_compiler_gnu=yes
20335else
20336  $as_echo "$as_me: failed program was:" >&5
20337sed 's/^/| /' conftest.$ac_ext >&5
20338
20339	ac_compiler_gnu=no
20340fi
20341
20342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20343ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20344
20345fi
20346{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
20347$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20348if test $ac_compiler_gnu = yes; then
20349  GXX=yes
20350else
20351  GXX=
20352fi
20353ac_test_CXXFLAGS=${CXXFLAGS+set}
20354ac_save_CXXFLAGS=$CXXFLAGS
20355{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
20356$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20357if test "${ac_cv_prog_cxx_g+set}" = set; then
20358  $as_echo_n "(cached) " >&6
20359else
20360  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20361   ac_cxx_werror_flag=yes
20362   ac_cv_prog_cxx_g=no
20363   CXXFLAGS="-g"
20364   cat >conftest.$ac_ext <<_ACEOF
20365/* confdefs.h.  */
20366_ACEOF
20367cat confdefs.h >>conftest.$ac_ext
20368cat >>conftest.$ac_ext <<_ACEOF
20369/* end confdefs.h.  */
20370
20371int
20372main ()
20373{
20374
20375  ;
20376  return 0;
20377}
20378_ACEOF
20379rm -f conftest.$ac_objext
20380if { (ac_try="$ac_compile"
20381case "(($ac_try" in
20382  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20383  *) ac_try_echo=$ac_try;;
20384esac
20385eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20386$as_echo "$ac_try_echo") >&5
20387  (eval "$ac_compile") 2>conftest.er1
20388  ac_status=$?
20389  grep -v '^ *+' conftest.er1 >conftest.err
20390  rm -f conftest.er1
20391  cat conftest.err >&5
20392  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20393  (exit $ac_status); } && {
20394	 test -z "$ac_cxx_werror_flag" ||
20395	 test ! -s conftest.err
20396       } && test -s conftest.$ac_objext; then
20397  ac_cv_prog_cxx_g=yes
20398else
20399  $as_echo "$as_me: failed program was:" >&5
20400sed 's/^/| /' conftest.$ac_ext >&5
20401
20402	CXXFLAGS=""
20403      cat >conftest.$ac_ext <<_ACEOF
20404/* confdefs.h.  */
20405_ACEOF
20406cat confdefs.h >>conftest.$ac_ext
20407cat >>conftest.$ac_ext <<_ACEOF
20408/* end confdefs.h.  */
20409
20410int
20411main ()
20412{
20413
20414  ;
20415  return 0;
20416}
20417_ACEOF
20418rm -f conftest.$ac_objext
20419if { (ac_try="$ac_compile"
20420case "(($ac_try" in
20421  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20422  *) ac_try_echo=$ac_try;;
20423esac
20424eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20425$as_echo "$ac_try_echo") >&5
20426  (eval "$ac_compile") 2>conftest.er1
20427  ac_status=$?
20428  grep -v '^ *+' conftest.er1 >conftest.err
20429  rm -f conftest.er1
20430  cat conftest.err >&5
20431  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20432  (exit $ac_status); } && {
20433	 test -z "$ac_cxx_werror_flag" ||
20434	 test ! -s conftest.err
20435       } && test -s conftest.$ac_objext; then
20436  :
20437else
20438  $as_echo "$as_me: failed program was:" >&5
20439sed 's/^/| /' conftest.$ac_ext >&5
20440
20441	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20442	 CXXFLAGS="-g"
20443	 cat >conftest.$ac_ext <<_ACEOF
20444/* confdefs.h.  */
20445_ACEOF
20446cat confdefs.h >>conftest.$ac_ext
20447cat >>conftest.$ac_ext <<_ACEOF
20448/* end confdefs.h.  */
20449
20450int
20451main ()
20452{
20453
20454  ;
20455  return 0;
20456}
20457_ACEOF
20458rm -f conftest.$ac_objext
20459if { (ac_try="$ac_compile"
20460case "(($ac_try" in
20461  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20462  *) ac_try_echo=$ac_try;;
20463esac
20464eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20465$as_echo "$ac_try_echo") >&5
20466  (eval "$ac_compile") 2>conftest.er1
20467  ac_status=$?
20468  grep -v '^ *+' conftest.er1 >conftest.err
20469  rm -f conftest.er1
20470  cat conftest.err >&5
20471  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20472  (exit $ac_status); } && {
20473	 test -z "$ac_cxx_werror_flag" ||
20474	 test ! -s conftest.err
20475       } && test -s conftest.$ac_objext; then
20476  ac_cv_prog_cxx_g=yes
20477else
20478  $as_echo "$as_me: failed program was:" >&5
20479sed 's/^/| /' conftest.$ac_ext >&5
20480
20481
20482fi
20483
20484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20485fi
20486
20487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20488fi
20489
20490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20491   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20492fi
20493{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
20494$as_echo "$ac_cv_prog_cxx_g" >&6; }
20495if test "$ac_test_CXXFLAGS" = set; then
20496  CXXFLAGS=$ac_save_CXXFLAGS
20497elif test $ac_cv_prog_cxx_g = yes; then
20498  if test "$GXX" = yes; then
20499    CXXFLAGS="-g -O2"
20500  else
20501    CXXFLAGS="-g"
20502  fi
20503else
20504  if test "$GXX" = yes; then
20505    CXXFLAGS="-O2"
20506  else
20507    CXXFLAGS=
20508  fi
20509fi
20510ac_ext=cpp
20511ac_cpp='$CXXCPP $CPPFLAGS'
20512ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20513ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20514ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20515
20516
20517### Locate other tools
20518
20519if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20520    ac_ext=m
20521ac_cpp='$OBJCPP $CPPFLAGS'
20522ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20523ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20524ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20525if test -n "$ac_tool_prefix"; then
20526  for ac_prog in gcc objcc objc cc CC
20527  do
20528    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20529set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20530{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
20531$as_echo_n "checking for $ac_word... " >&6; }
20532if test "${ac_cv_prog_OBJC+set}" = set; then
20533  $as_echo_n "(cached) " >&6
20534else
20535  if test -n "$OBJC"; then
20536  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20537else
20538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20539for as_dir in $PATH
20540do
20541  IFS=$as_save_IFS
20542  test -z "$as_dir" && as_dir=.
20543  for ac_exec_ext in '' $ac_executable_extensions; do
20544  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20545    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20546    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20547    break 2
20548  fi
20549done
20550done
20551IFS=$as_save_IFS
20552
20553fi
20554fi
20555OBJC=$ac_cv_prog_OBJC
20556if test -n "$OBJC"; then
20557  { $as_echo "$as_me:$LINENO: result: $OBJC" >&5
20558$as_echo "$OBJC" >&6; }
20559else
20560  { $as_echo "$as_me:$LINENO: result: no" >&5
20561$as_echo "no" >&6; }
20562fi
20563
20564
20565    test -n "$OBJC" && break
20566  done
20567fi
20568if test -z "$OBJC"; then
20569  ac_ct_OBJC=$OBJC
20570  for ac_prog in gcc objcc objc cc CC
20571do
20572  # Extract the first word of "$ac_prog", so it can be a program name with args.
20573set dummy $ac_prog; ac_word=$2
20574{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
20575$as_echo_n "checking for $ac_word... " >&6; }
20576if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then
20577  $as_echo_n "(cached) " >&6
20578else
20579  if test -n "$ac_ct_OBJC"; then
20580  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20581else
20582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20583for as_dir in $PATH
20584do
20585  IFS=$as_save_IFS
20586  test -z "$as_dir" && as_dir=.
20587  for ac_exec_ext in '' $ac_executable_extensions; do
20588  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20589    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20590    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20591    break 2
20592  fi
20593done
20594done
20595IFS=$as_save_IFS
20596
20597fi
20598fi
20599ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20600if test -n "$ac_ct_OBJC"; then
20601  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJC" >&5
20602$as_echo "$ac_ct_OBJC" >&6; }
20603else
20604  { $as_echo "$as_me:$LINENO: result: no" >&5
20605$as_echo "no" >&6; }
20606fi
20607
20608
20609  test -n "$ac_ct_OBJC" && break
20610done
20611
20612  if test "x$ac_ct_OBJC" = x; then
20613    OBJC="gcc"
20614  else
20615    case $cross_compiling:$ac_tool_warned in
20616yes:)
20617{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
20618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20619ac_tool_warned=yes ;;
20620esac
20621    OBJC=$ac_ct_OBJC
20622  fi
20623fi
20624
20625# Provide some information about the compiler.
20626$as_echo "$as_me:$LINENO: checking for Objective C compiler version" >&5
20627set X $ac_compile
20628ac_compiler=$2
20629{ (ac_try="$ac_compiler --version >&5"
20630case "(($ac_try" in
20631  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20632  *) ac_try_echo=$ac_try;;
20633esac
20634eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20635$as_echo "$ac_try_echo") >&5
20636  (eval "$ac_compiler --version >&5") 2>&5
20637  ac_status=$?
20638  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20639  (exit $ac_status); }
20640{ (ac_try="$ac_compiler -v >&5"
20641case "(($ac_try" in
20642  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20643  *) ac_try_echo=$ac_try;;
20644esac
20645eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20646$as_echo "$ac_try_echo") >&5
20647  (eval "$ac_compiler -v >&5") 2>&5
20648  ac_status=$?
20649  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20650  (exit $ac_status); }
20651{ (ac_try="$ac_compiler -V >&5"
20652case "(($ac_try" in
20653  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20654  *) ac_try_echo=$ac_try;;
20655esac
20656eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20657$as_echo "$ac_try_echo") >&5
20658  (eval "$ac_compiler -V >&5") 2>&5
20659  ac_status=$?
20660  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20661  (exit $ac_status); }
20662
20663{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Objective C compiler" >&5
20664$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20665if test "${ac_cv_objc_compiler_gnu+set}" = set; then
20666  $as_echo_n "(cached) " >&6
20667else
20668  cat >conftest.$ac_ext <<_ACEOF
20669/* confdefs.h.  */
20670_ACEOF
20671cat confdefs.h >>conftest.$ac_ext
20672cat >>conftest.$ac_ext <<_ACEOF
20673/* end confdefs.h.  */
20674
20675int
20676main ()
20677{
20678#ifndef __GNUC__
20679       choke me
20680#endif
20681
20682  ;
20683  return 0;
20684}
20685_ACEOF
20686rm -f conftest.$ac_objext
20687if { (ac_try="$ac_compile"
20688case "(($ac_try" in
20689  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20690  *) ac_try_echo=$ac_try;;
20691esac
20692eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20693$as_echo "$ac_try_echo") >&5
20694  (eval "$ac_compile") 2>conftest.er1
20695  ac_status=$?
20696  grep -v '^ *+' conftest.er1 >conftest.err
20697  rm -f conftest.er1
20698  cat conftest.err >&5
20699  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20700  (exit $ac_status); } && {
20701	 test -z "$ac_objc_werror_flag" ||
20702	 test ! -s conftest.err
20703       } && test -s conftest.$ac_objext; then
20704  ac_compiler_gnu=yes
20705else
20706  $as_echo "$as_me: failed program was:" >&5
20707sed 's/^/| /' conftest.$ac_ext >&5
20708
20709	ac_compiler_gnu=no
20710fi
20711
20712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20713ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20714
20715fi
20716{ $as_echo "$as_me:$LINENO: result: $ac_cv_objc_compiler_gnu" >&5
20717$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20718if test $ac_compiler_gnu = yes; then
20719  GOBJC=yes
20720else
20721  GOBJC=
20722fi
20723ac_test_OBJCFLAGS=${OBJCFLAGS+set}
20724ac_save_OBJCFLAGS=$OBJCFLAGS
20725{ $as_echo "$as_me:$LINENO: checking whether $OBJC accepts -g" >&5
20726$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
20727if test "${ac_cv_prog_objc_g+set}" = set; then
20728  $as_echo_n "(cached) " >&6
20729else
20730  ac_save_objc_werror_flag=$ac_objc_werror_flag
20731   ac_objc_werror_flag=yes
20732   ac_cv_prog_objc_g=no
20733   OBJCFLAGS="-g"
20734   cat >conftest.$ac_ext <<_ACEOF
20735/* confdefs.h.  */
20736_ACEOF
20737cat confdefs.h >>conftest.$ac_ext
20738cat >>conftest.$ac_ext <<_ACEOF
20739/* end confdefs.h.  */
20740
20741int
20742main ()
20743{
20744
20745  ;
20746  return 0;
20747}
20748_ACEOF
20749rm -f conftest.$ac_objext
20750if { (ac_try="$ac_compile"
20751case "(($ac_try" in
20752  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20753  *) ac_try_echo=$ac_try;;
20754esac
20755eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20756$as_echo "$ac_try_echo") >&5
20757  (eval "$ac_compile") 2>conftest.er1
20758  ac_status=$?
20759  grep -v '^ *+' conftest.er1 >conftest.err
20760  rm -f conftest.er1
20761  cat conftest.err >&5
20762  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20763  (exit $ac_status); } && {
20764	 test -z "$ac_objc_werror_flag" ||
20765	 test ! -s conftest.err
20766       } && test -s conftest.$ac_objext; then
20767  ac_cv_prog_objc_g=yes
20768else
20769  $as_echo "$as_me: failed program was:" >&5
20770sed 's/^/| /' conftest.$ac_ext >&5
20771
20772	OBJCFLAGS=""
20773      cat >conftest.$ac_ext <<_ACEOF
20774/* confdefs.h.  */
20775_ACEOF
20776cat confdefs.h >>conftest.$ac_ext
20777cat >>conftest.$ac_ext <<_ACEOF
20778/* end confdefs.h.  */
20779
20780int
20781main ()
20782{
20783
20784  ;
20785  return 0;
20786}
20787_ACEOF
20788rm -f conftest.$ac_objext
20789if { (ac_try="$ac_compile"
20790case "(($ac_try" in
20791  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20792  *) ac_try_echo=$ac_try;;
20793esac
20794eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20795$as_echo "$ac_try_echo") >&5
20796  (eval "$ac_compile") 2>conftest.er1
20797  ac_status=$?
20798  grep -v '^ *+' conftest.er1 >conftest.err
20799  rm -f conftest.er1
20800  cat conftest.err >&5
20801  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20802  (exit $ac_status); } && {
20803	 test -z "$ac_objc_werror_flag" ||
20804	 test ! -s conftest.err
20805       } && test -s conftest.$ac_objext; then
20806  :
20807else
20808  $as_echo "$as_me: failed program was:" >&5
20809sed 's/^/| /' conftest.$ac_ext >&5
20810
20811	ac_objc_werror_flag=$ac_save_objc_werror_flag
20812	 OBJCFLAGS="-g"
20813	 cat >conftest.$ac_ext <<_ACEOF
20814/* confdefs.h.  */
20815_ACEOF
20816cat confdefs.h >>conftest.$ac_ext
20817cat >>conftest.$ac_ext <<_ACEOF
20818/* end confdefs.h.  */
20819
20820int
20821main ()
20822{
20823
20824  ;
20825  return 0;
20826}
20827_ACEOF
20828rm -f conftest.$ac_objext
20829if { (ac_try="$ac_compile"
20830case "(($ac_try" in
20831  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20832  *) ac_try_echo=$ac_try;;
20833esac
20834eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20835$as_echo "$ac_try_echo") >&5
20836  (eval "$ac_compile") 2>conftest.er1
20837  ac_status=$?
20838  grep -v '^ *+' conftest.er1 >conftest.err
20839  rm -f conftest.er1
20840  cat conftest.err >&5
20841  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20842  (exit $ac_status); } && {
20843	 test -z "$ac_objc_werror_flag" ||
20844	 test ! -s conftest.err
20845       } && test -s conftest.$ac_objext; then
20846  ac_cv_prog_objc_g=yes
20847else
20848  $as_echo "$as_me: failed program was:" >&5
20849sed 's/^/| /' conftest.$ac_ext >&5
20850
20851
20852fi
20853
20854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20855fi
20856
20857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20858fi
20859
20860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20861   ac_objc_werror_flag=$ac_save_objc_werror_flag
20862fi
20863{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_objc_g" >&5
20864$as_echo "$ac_cv_prog_objc_g" >&6; }
20865if test "$ac_test_OBJCFLAGS" = set; then
20866  OBJCFLAGS=$ac_save_OBJCFLAGS
20867elif test $ac_cv_prog_objc_g = yes; then
20868  if test "$GOBJC" = yes; then
20869    OBJCFLAGS="-g -O2"
20870  else
20871    OBJCFLAGS="-g"
20872  fi
20873else
20874  if test "$GOBJC" = yes; then
20875    OBJCFLAGS="-O2"
20876  else
20877    OBJCFLAGS=
20878  fi
20879fi
20880ac_ext=cpp
20881ac_cpp='$CXXCPP $CPPFLAGS'
20882ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20883ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20884ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20885
20886
20887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20888
20889  # First separate the path from the arguments. This will split at the first
20890  # space.
20891  complete="$OBJC"
20892  path="${complete%% *}"
20893  tmp="$complete EOL"
20894  arguments="${tmp#* }"
20895
20896  # Input might be given as Windows format, start by converting to
20897  # unix format.
20898  new_path=`$CYGPATH -u "$path"`
20899
20900  # Now try to locate executable using which
20901  new_path=`$WHICH "$new_path" 2> /dev/null`
20902  # bat and cmd files are not always considered executable in cygwin causing which
20903  # to not find them
20904  if test "x$new_path" = x \
20905           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20906           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20907    new_path=`$CYGPATH -u "$path"`
20908  fi
20909  if test "x$new_path" = x; then
20910    # Oops. Which didn't find the executable.
20911    # The splitting of arguments from the executable at a space might have been incorrect,
20912    # since paths with space are more likely in Windows. Give it another try with the whole
20913    # argument.
20914    path="$complete"
20915    arguments="EOL"
20916    new_path=`$CYGPATH -u "$path"`
20917    new_path=`$WHICH "$new_path" 2> /dev/null`
20918    # bat and cmd files are not always considered executable in cygwin causing which
20919    # to not find them
20920    if test "x$new_path" = x \
20921             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20922             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20923      new_path=`$CYGPATH -u "$path"`
20924    fi
20925    if test "x$new_path" = x; then
20926      # It's still not found. Now this is an unrecoverable error.
20927      { $as_echo "$as_me:$LINENO: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20928$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20929      has_space=`$ECHO "$complete" | $GREP " "`
20930      if test "x$has_space" != x; then
20931        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20932$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20933      fi
20934      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJC" >&5
20935$as_echo "$as_me: error: Cannot locate the the path of OBJC" >&2;}
20936   { (exit 1); exit 1; }; }
20937    fi
20938  fi
20939
20940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20943  # "foo.exe" is OK but "foo" is an error.
20944  #
20945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20946  # It is also a way to make sure we got the proper file name for the real test later on.
20947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20948  if test "x$test_shortpath" = x; then
20949    # Short path failed, file does not exist as specified.
20950    # Try adding .exe or .cmd
20951    if test -f "${new_path}.exe"; then
20952       input_to_shortpath="${new_path}.exe"
20953    elif test -f "${new_path}.cmd"; then
20954       input_to_shortpath="${new_path}.cmd"
20955    else
20956      { $as_echo "$as_me:$LINENO: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
20957$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
20958      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20959$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20960      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJC" >&5
20961$as_echo "$as_me: error: Cannot locate the the path of OBJC" >&2;}
20962   { (exit 1); exit 1; }; }
20963    fi
20964  else
20965    input_to_shortpath="$new_path"
20966  fi
20967
20968  # Call helper function which possibly converts this using DOS-style short mode.
20969  # If so, the updated path is stored in $new_path.
20970  new_path="$input_to_shortpath"
20971
20972  input_path="$input_to_shortpath"
20973  # Check if we need to convert this using DOS-style short mode. If the path
20974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20975  # take no chances and rewrite it.
20976  # Note: m4 eats our [], so we need to use [ and ] instead.
20977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20978  if test "x$has_forbidden_chars" != x; then
20979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20980    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20981    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20982    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20983      # Going to short mode and back again did indeed matter. Since short mode is
20984      # case insensitive, let's make it lowercase to improve readability.
20985      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20986      # Now convert it back to Unix-stile (cygpath)
20987      input_path=`$CYGPATH -u "$shortmode_path"`
20988      new_path="$input_path"
20989    fi
20990  fi
20991
20992  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20993  if test "x$test_cygdrive_prefix" = x; then
20994    # As a simple fix, exclude /usr/bin since it's not a real path.
20995    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20996      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20997      # a path prefixed by /cygdrive for fixpath to work.
20998      new_path="$CYGWIN_ROOT_PATH$input_path"
20999    fi
21000  fi
21001
21002  # remove trailing .exe if any
21003  new_path="${new_path/%.exe/}"
21004
21005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21006
21007  # First separate the path from the arguments. This will split at the first
21008  # space.
21009  complete="$OBJC"
21010  path="${complete%% *}"
21011  tmp="$complete EOL"
21012  arguments="${tmp#* }"
21013
21014  # Input might be given as Windows format, start by converting to
21015  # unix format.
21016  new_path="$path"
21017
21018  windows_path="$new_path"
21019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21020    unix_path=`$CYGPATH -u "$windows_path"`
21021    new_path="$unix_path"
21022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21024    new_path="$unix_path"
21025  fi
21026
21027
21028  # Now try to locate executable using which
21029  new_path=`$WHICH "$new_path" 2> /dev/null`
21030
21031  if test "x$new_path" = x; then
21032    # Oops. Which didn't find the executable.
21033    # The splitting of arguments from the executable at a space might have been incorrect,
21034    # since paths with space are more likely in Windows. Give it another try with the whole
21035    # argument.
21036    path="$complete"
21037    arguments="EOL"
21038    new_path="$path"
21039
21040  windows_path="$new_path"
21041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21042    unix_path=`$CYGPATH -u "$windows_path"`
21043    new_path="$unix_path"
21044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21046    new_path="$unix_path"
21047  fi
21048
21049
21050    new_path=`$WHICH "$new_path" 2> /dev/null`
21051
21052    if test "x$new_path" = x; then
21053      # It's still not found. Now this is an unrecoverable error.
21054      { $as_echo "$as_me:$LINENO: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21055$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21056      has_space=`$ECHO "$complete" | $GREP " "`
21057      if test "x$has_space" != x; then
21058        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21059$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21060      fi
21061      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJC" >&5
21062$as_echo "$as_me: error: Cannot locate the the path of OBJC" >&2;}
21063   { (exit 1); exit 1; }; }
21064    fi
21065  fi
21066
21067  # Now new_path has a complete unix path to the binary
21068  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21069    # Keep paths in /bin as-is, but remove trailing .exe if any
21070    new_path="${new_path/%.exe/}"
21071    # Do not save /bin paths to all_fixpath_prefixes!
21072  else
21073    # Not in mixed or Windows style, start by that.
21074    new_path=`cmd //c echo $new_path`
21075
21076  input_path="$new_path"
21077  # Check if we need to convert this using DOS-style short mode. If the path
21078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21079  # take no chances and rewrite it.
21080  # Note: m4 eats our [], so we need to use [ and ] instead.
21081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21082  if test "x$has_forbidden_chars" != x; then
21083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21085  fi
21086
21087    # Output is in $new_path
21088
21089  windows_path="$new_path"
21090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21091    unix_path=`$CYGPATH -u "$windows_path"`
21092    new_path="$unix_path"
21093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21095    new_path="$unix_path"
21096  fi
21097
21098    # remove trailing .exe if any
21099    new_path="${new_path/%.exe/}"
21100
21101    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21102    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21103  fi
21104
21105  else
21106    # We're on a posix platform. Hooray! :)
21107    # First separate the path from the arguments. This will split at the first
21108    # space.
21109    complete="$OBJC"
21110    path="${complete%% *}"
21111    tmp="$complete EOL"
21112    arguments="${tmp#* }"
21113
21114    new_path=`$WHICH $path 2> /dev/null`
21115    if test "x$new_path" = x; then
21116      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21117      if test "x$is_absolute_path" != x; then
21118        { $as_echo "$as_me:$LINENO: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&5
21119$as_echo "$as_me: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&6;}
21120        new_path="$path"
21121      else
21122        { $as_echo "$as_me:$LINENO: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21123$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21124        has_space=`$ECHO "$complete" | $GREP " "`
21125        if test "x$has_space" != x; then
21126          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
21127$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21128        fi
21129        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJC" >&5
21130$as_echo "$as_me: error: Cannot locate the the path of OBJC" >&2;}
21131   { (exit 1); exit 1; }; }
21132      fi
21133    fi
21134  fi
21135
21136  # Now join together the path and the arguments once again
21137  if test "x$arguments" != xEOL; then
21138      new_complete="$new_path ${arguments% *}"
21139  else
21140      new_complete="$new_path"
21141  fi
21142
21143  if test "x$complete" != "x$new_complete"; then
21144    OBJC="$new_complete"
21145    { $as_echo "$as_me:$LINENO: Rewriting OBJC to \"$new_complete\"" >&5
21146$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21147  fi
21148
21149else
21150    OBJC=
21151fi
21152
21153# Restore the flags to the user specified values.
21154# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21155CFLAGS="$ORG_CFLAGS"
21156CXXFLAGS="$ORG_CXXFLAGS"
21157OBJCFLAGS="$ORG_OBJCFLAGS"
21158
21159LD="$CC"
21160LDEXE="$CC"
21161LDCXX="$CXX"
21162LDEXECXX="$CXX"
21163
21164# LDEXE is the linker to use, when creating executables.
21165
21166# Linking C++ libraries.
21167
21168# Linking C++ executables.
21169
21170
21171if test "x$OPENJDK_TARGET_OS" != xwindows; then
21172    if test -n "$ac_tool_prefix"; then
21173  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21174set dummy ${ac_tool_prefix}ar; ac_word=$2
21175{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
21176$as_echo_n "checking for $ac_word... " >&6; }
21177if test "${ac_cv_prog_AR+set}" = set; then
21178  $as_echo_n "(cached) " >&6
21179else
21180  if test -n "$AR"; then
21181  ac_cv_prog_AR="$AR" # Let the user override the test.
21182else
21183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21184for as_dir in $PATH
21185do
21186  IFS=$as_save_IFS
21187  test -z "$as_dir" && as_dir=.
21188  for ac_exec_ext in '' $ac_executable_extensions; do
21189  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21190    ac_cv_prog_AR="${ac_tool_prefix}ar"
21191    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21192    break 2
21193  fi
21194done
21195done
21196IFS=$as_save_IFS
21197
21198fi
21199fi
21200AR=$ac_cv_prog_AR
21201if test -n "$AR"; then
21202  { $as_echo "$as_me:$LINENO: result: $AR" >&5
21203$as_echo "$AR" >&6; }
21204else
21205  { $as_echo "$as_me:$LINENO: result: no" >&5
21206$as_echo "no" >&6; }
21207fi
21208
21209
21210fi
21211if test -z "$ac_cv_prog_AR"; then
21212  ac_ct_AR=$AR
21213  # Extract the first word of "ar", so it can be a program name with args.
21214set dummy ar; ac_word=$2
21215{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
21216$as_echo_n "checking for $ac_word... " >&6; }
21217if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
21218  $as_echo_n "(cached) " >&6
21219else
21220  if test -n "$ac_ct_AR"; then
21221  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21222else
21223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21224for as_dir in $PATH
21225do
21226  IFS=$as_save_IFS
21227  test -z "$as_dir" && as_dir=.
21228  for ac_exec_ext in '' $ac_executable_extensions; do
21229  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21230    ac_cv_prog_ac_ct_AR="ar"
21231    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21232    break 2
21233  fi
21234done
21235done
21236IFS=$as_save_IFS
21237
21238fi
21239fi
21240ac_ct_AR=$ac_cv_prog_ac_ct_AR
21241if test -n "$ac_ct_AR"; then
21242  { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
21243$as_echo "$ac_ct_AR" >&6; }
21244else
21245  { $as_echo "$as_me:$LINENO: result: no" >&5
21246$as_echo "no" >&6; }
21247fi
21248
21249  if test "x$ac_ct_AR" = x; then
21250    AR=""
21251  else
21252    case $cross_compiling:$ac_tool_warned in
21253yes:)
21254{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
21255$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21256ac_tool_warned=yes ;;
21257esac
21258    AR=$ac_ct_AR
21259  fi
21260else
21261  AR="$ac_cv_prog_AR"
21262fi
21263
21264
21265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21266
21267  # First separate the path from the arguments. This will split at the first
21268  # space.
21269  complete="$AR"
21270  path="${complete%% *}"
21271  tmp="$complete EOL"
21272  arguments="${tmp#* }"
21273
21274  # Input might be given as Windows format, start by converting to
21275  # unix format.
21276  new_path=`$CYGPATH -u "$path"`
21277
21278  # Now try to locate executable using which
21279  new_path=`$WHICH "$new_path" 2> /dev/null`
21280  # bat and cmd files are not always considered executable in cygwin causing which
21281  # to not find them
21282  if test "x$new_path" = x \
21283           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21284           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21285    new_path=`$CYGPATH -u "$path"`
21286  fi
21287  if test "x$new_path" = x; then
21288    # Oops. Which didn't find the executable.
21289    # The splitting of arguments from the executable at a space might have been incorrect,
21290    # since paths with space are more likely in Windows. Give it another try with the whole
21291    # argument.
21292    path="$complete"
21293    arguments="EOL"
21294    new_path=`$CYGPATH -u "$path"`
21295    new_path=`$WHICH "$new_path" 2> /dev/null`
21296    # bat and cmd files are not always considered executable in cygwin causing which
21297    # to not find them
21298    if test "x$new_path" = x \
21299             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21300             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21301      new_path=`$CYGPATH -u "$path"`
21302    fi
21303    if test "x$new_path" = x; then
21304      # It's still not found. Now this is an unrecoverable error.
21305      { $as_echo "$as_me:$LINENO: The path of AR, which resolves as \"$complete\", is not found." >&5
21306$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21307      has_space=`$ECHO "$complete" | $GREP " "`
21308      if test "x$has_space" != x; then
21309        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21311      fi
21312      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AR" >&5
21313$as_echo "$as_me: error: Cannot locate the the path of AR" >&2;}
21314   { (exit 1); exit 1; }; }
21315    fi
21316  fi
21317
21318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21321  # "foo.exe" is OK but "foo" is an error.
21322  #
21323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21324  # It is also a way to make sure we got the proper file name for the real test later on.
21325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21326  if test "x$test_shortpath" = x; then
21327    # Short path failed, file does not exist as specified.
21328    # Try adding .exe or .cmd
21329    if test -f "${new_path}.exe"; then
21330       input_to_shortpath="${new_path}.exe"
21331    elif test -f "${new_path}.cmd"; then
21332       input_to_shortpath="${new_path}.cmd"
21333    else
21334      { $as_echo "$as_me:$LINENO: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21335$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21336      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21337$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21338      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AR" >&5
21339$as_echo "$as_me: error: Cannot locate the the path of AR" >&2;}
21340   { (exit 1); exit 1; }; }
21341    fi
21342  else
21343    input_to_shortpath="$new_path"
21344  fi
21345
21346  # Call helper function which possibly converts this using DOS-style short mode.
21347  # If so, the updated path is stored in $new_path.
21348  new_path="$input_to_shortpath"
21349
21350  input_path="$input_to_shortpath"
21351  # Check if we need to convert this using DOS-style short mode. If the path
21352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21353  # take no chances and rewrite it.
21354  # Note: m4 eats our [], so we need to use [ and ] instead.
21355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21356  if test "x$has_forbidden_chars" != x; then
21357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21361      # Going to short mode and back again did indeed matter. Since short mode is
21362      # case insensitive, let's make it lowercase to improve readability.
21363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21364      # Now convert it back to Unix-stile (cygpath)
21365      input_path=`$CYGPATH -u "$shortmode_path"`
21366      new_path="$input_path"
21367    fi
21368  fi
21369
21370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21371  if test "x$test_cygdrive_prefix" = x; then
21372    # As a simple fix, exclude /usr/bin since it's not a real path.
21373    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21375      # a path prefixed by /cygdrive for fixpath to work.
21376      new_path="$CYGWIN_ROOT_PATH$input_path"
21377    fi
21378  fi
21379
21380  # remove trailing .exe if any
21381  new_path="${new_path/%.exe/}"
21382
21383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21384
21385  # First separate the path from the arguments. This will split at the first
21386  # space.
21387  complete="$AR"
21388  path="${complete%% *}"
21389  tmp="$complete EOL"
21390  arguments="${tmp#* }"
21391
21392  # Input might be given as Windows format, start by converting to
21393  # unix format.
21394  new_path="$path"
21395
21396  windows_path="$new_path"
21397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21398    unix_path=`$CYGPATH -u "$windows_path"`
21399    new_path="$unix_path"
21400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21402    new_path="$unix_path"
21403  fi
21404
21405
21406  # Now try to locate executable using which
21407  new_path=`$WHICH "$new_path" 2> /dev/null`
21408
21409  if test "x$new_path" = x; then
21410    # Oops. Which didn't find the executable.
21411    # The splitting of arguments from the executable at a space might have been incorrect,
21412    # since paths with space are more likely in Windows. Give it another try with the whole
21413    # argument.
21414    path="$complete"
21415    arguments="EOL"
21416    new_path="$path"
21417
21418  windows_path="$new_path"
21419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21420    unix_path=`$CYGPATH -u "$windows_path"`
21421    new_path="$unix_path"
21422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21424    new_path="$unix_path"
21425  fi
21426
21427
21428    new_path=`$WHICH "$new_path" 2> /dev/null`
21429
21430    if test "x$new_path" = x; then
21431      # It's still not found. Now this is an unrecoverable error.
21432      { $as_echo "$as_me:$LINENO: The path of AR, which resolves as \"$complete\", is not found." >&5
21433$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21434      has_space=`$ECHO "$complete" | $GREP " "`
21435      if test "x$has_space" != x; then
21436        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21437$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21438      fi
21439      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AR" >&5
21440$as_echo "$as_me: error: Cannot locate the the path of AR" >&2;}
21441   { (exit 1); exit 1; }; }
21442    fi
21443  fi
21444
21445  # Now new_path has a complete unix path to the binary
21446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21447    # Keep paths in /bin as-is, but remove trailing .exe if any
21448    new_path="${new_path/%.exe/}"
21449    # Do not save /bin paths to all_fixpath_prefixes!
21450  else
21451    # Not in mixed or Windows style, start by that.
21452    new_path=`cmd //c echo $new_path`
21453
21454  input_path="$new_path"
21455  # Check if we need to convert this using DOS-style short mode. If the path
21456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21457  # take no chances and rewrite it.
21458  # Note: m4 eats our [], so we need to use [ and ] instead.
21459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21460  if test "x$has_forbidden_chars" != x; then
21461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21463  fi
21464
21465    # Output is in $new_path
21466
21467  windows_path="$new_path"
21468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21469    unix_path=`$CYGPATH -u "$windows_path"`
21470    new_path="$unix_path"
21471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21473    new_path="$unix_path"
21474  fi
21475
21476    # remove trailing .exe if any
21477    new_path="${new_path/%.exe/}"
21478
21479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21481  fi
21482
21483  else
21484    # We're on a posix platform. Hooray! :)
21485    # First separate the path from the arguments. This will split at the first
21486    # space.
21487    complete="$AR"
21488    path="${complete%% *}"
21489    tmp="$complete EOL"
21490    arguments="${tmp#* }"
21491
21492    new_path=`$WHICH $path 2> /dev/null`
21493    if test "x$new_path" = x; then
21494      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21495      if test "x$is_absolute_path" != x; then
21496        { $as_echo "$as_me:$LINENO: Resolving AR (as $path) with 'which' failed, using $path directly." >&5
21497$as_echo "$as_me: Resolving AR (as $path) with 'which' failed, using $path directly." >&6;}
21498        new_path="$path"
21499      else
21500        { $as_echo "$as_me:$LINENO: The path of AR, which resolves as \"$complete\", is not found." >&5
21501$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21502        has_space=`$ECHO "$complete" | $GREP " "`
21503        if test "x$has_space" != x; then
21504          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
21505$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21506        fi
21507        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AR" >&5
21508$as_echo "$as_me: error: Cannot locate the the path of AR" >&2;}
21509   { (exit 1); exit 1; }; }
21510      fi
21511    fi
21512  fi
21513
21514  # Now join together the path and the arguments once again
21515  if test "x$arguments" != xEOL; then
21516      new_complete="$new_path ${arguments% *}"
21517  else
21518      new_complete="$new_path"
21519  fi
21520
21521  if test "x$complete" != "x$new_complete"; then
21522    AR="$new_complete"
21523    { $as_echo "$as_me:$LINENO: Rewriting AR to \"$new_complete\"" >&5
21524$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21525  fi
21526
21527fi
21528if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21529    ARFLAGS="-r"
21530else
21531    ARFLAGS=""
21532fi
21533
21534
21535# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21536HOTSPOT_CXX="$CXX"
21537HOTSPOT_LD="$LD"
21538
21539
21540
21541COMPILER_NAME=gcc
21542COMPILER_TYPE=CC
21543if test "x$OPENJDK_TARGET_OS" = xwindows; then
21544
21545    # For now, assume that we are always compiling using cl.exe.
21546    CC_OUT_OPTION=-Fo
21547    EXE_OUT_OPTION=-out:
21548    LD_OUT_OPTION=-out:
21549    AR_OUT_OPTION=-out:
21550    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21551    # program for something completely different.
21552    # Extract the first word of "link", so it can be a program name with args.
21553set dummy link; ac_word=$2
21554{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
21555$as_echo_n "checking for $ac_word... " >&6; }
21556if test "${ac_cv_prog_WINLD+set}" = set; then
21557  $as_echo_n "(cached) " >&6
21558else
21559  if test -n "$WINLD"; then
21560  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21561else
21562  ac_prog_rejected=no
21563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21564for as_dir in $PATH
21565do
21566  IFS=$as_save_IFS
21567  test -z "$as_dir" && as_dir=.
21568  for ac_exec_ext in '' $ac_executable_extensions; do
21569  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21570    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21571       ac_prog_rejected=yes
21572       continue
21573     fi
21574    ac_cv_prog_WINLD="link"
21575    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21576    break 2
21577  fi
21578done
21579done
21580IFS=$as_save_IFS
21581
21582if test $ac_prog_rejected = yes; then
21583  # We found a bogon in the path, so make sure we never use it.
21584  set dummy $ac_cv_prog_WINLD
21585  shift
21586  if test $# != 0; then
21587    # We chose a different compiler from the bogus one.
21588    # However, it has the same basename, so the bogon will be chosen
21589    # first if we set WINLD to just the basename; use the full file name.
21590    shift
21591    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21592  fi
21593fi
21594fi
21595fi
21596WINLD=$ac_cv_prog_WINLD
21597if test -n "$WINLD"; then
21598  { $as_echo "$as_me:$LINENO: result: $WINLD" >&5
21599$as_echo "$WINLD" >&6; }
21600else
21601  { $as_echo "$as_me:$LINENO: result: no" >&5
21602$as_echo "no" >&6; }
21603fi
21604
21605
21606    # Since we must ignore the first found link, WINLD will contain
21607    # the full path to the link.exe program.
21608
21609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21610
21611  # First separate the path from the arguments. This will split at the first
21612  # space.
21613  complete="$WINLD"
21614  path="${complete%% *}"
21615  tmp="$complete EOL"
21616  arguments="${tmp#* }"
21617
21618  # Input might be given as Windows format, start by converting to
21619  # unix format.
21620  new_path=`$CYGPATH -u "$path"`
21621
21622  # Now try to locate executable using which
21623  new_path=`$WHICH "$new_path" 2> /dev/null`
21624  # bat and cmd files are not always considered executable in cygwin causing which
21625  # to not find them
21626  if test "x$new_path" = x \
21627           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21628           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21629    new_path=`$CYGPATH -u "$path"`
21630  fi
21631  if test "x$new_path" = x; then
21632    # Oops. Which didn't find the executable.
21633    # The splitting of arguments from the executable at a space might have been incorrect,
21634    # since paths with space are more likely in Windows. Give it another try with the whole
21635    # argument.
21636    path="$complete"
21637    arguments="EOL"
21638    new_path=`$CYGPATH -u "$path"`
21639    new_path=`$WHICH "$new_path" 2> /dev/null`
21640    # bat and cmd files are not always considered executable in cygwin causing which
21641    # to not find them
21642    if test "x$new_path" = x \
21643             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21644             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21645      new_path=`$CYGPATH -u "$path"`
21646    fi
21647    if test "x$new_path" = x; then
21648      # It's still not found. Now this is an unrecoverable error.
21649      { $as_echo "$as_me:$LINENO: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21650$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21651      has_space=`$ECHO "$complete" | $GREP " "`
21652      if test "x$has_space" != x; then
21653        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21654$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21655      fi
21656      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINLD" >&5
21657$as_echo "$as_me: error: Cannot locate the the path of WINLD" >&2;}
21658   { (exit 1); exit 1; }; }
21659    fi
21660  fi
21661
21662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21665  # "foo.exe" is OK but "foo" is an error.
21666  #
21667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21668  # It is also a way to make sure we got the proper file name for the real test later on.
21669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21670  if test "x$test_shortpath" = x; then
21671    # Short path failed, file does not exist as specified.
21672    # Try adding .exe or .cmd
21673    if test -f "${new_path}.exe"; then
21674       input_to_shortpath="${new_path}.exe"
21675    elif test -f "${new_path}.cmd"; then
21676       input_to_shortpath="${new_path}.cmd"
21677    else
21678      { $as_echo "$as_me:$LINENO: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21679$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21680      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21681$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21682      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINLD" >&5
21683$as_echo "$as_me: error: Cannot locate the the path of WINLD" >&2;}
21684   { (exit 1); exit 1; }; }
21685    fi
21686  else
21687    input_to_shortpath="$new_path"
21688  fi
21689
21690  # Call helper function which possibly converts this using DOS-style short mode.
21691  # If so, the updated path is stored in $new_path.
21692  new_path="$input_to_shortpath"
21693
21694  input_path="$input_to_shortpath"
21695  # Check if we need to convert this using DOS-style short mode. If the path
21696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21697  # take no chances and rewrite it.
21698  # Note: m4 eats our [], so we need to use [ and ] instead.
21699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21700  if test "x$has_forbidden_chars" != x; then
21701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21705      # Going to short mode and back again did indeed matter. Since short mode is
21706      # case insensitive, let's make it lowercase to improve readability.
21707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21708      # Now convert it back to Unix-stile (cygpath)
21709      input_path=`$CYGPATH -u "$shortmode_path"`
21710      new_path="$input_path"
21711    fi
21712  fi
21713
21714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21715  if test "x$test_cygdrive_prefix" = x; then
21716    # As a simple fix, exclude /usr/bin since it's not a real path.
21717    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21719      # a path prefixed by /cygdrive for fixpath to work.
21720      new_path="$CYGWIN_ROOT_PATH$input_path"
21721    fi
21722  fi
21723
21724  # remove trailing .exe if any
21725  new_path="${new_path/%.exe/}"
21726
21727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21728
21729  # First separate the path from the arguments. This will split at the first
21730  # space.
21731  complete="$WINLD"
21732  path="${complete%% *}"
21733  tmp="$complete EOL"
21734  arguments="${tmp#* }"
21735
21736  # Input might be given as Windows format, start by converting to
21737  # unix format.
21738  new_path="$path"
21739
21740  windows_path="$new_path"
21741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21742    unix_path=`$CYGPATH -u "$windows_path"`
21743    new_path="$unix_path"
21744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21746    new_path="$unix_path"
21747  fi
21748
21749
21750  # Now try to locate executable using which
21751  new_path=`$WHICH "$new_path" 2> /dev/null`
21752
21753  if test "x$new_path" = x; then
21754    # Oops. Which didn't find the executable.
21755    # The splitting of arguments from the executable at a space might have been incorrect,
21756    # since paths with space are more likely in Windows. Give it another try with the whole
21757    # argument.
21758    path="$complete"
21759    arguments="EOL"
21760    new_path="$path"
21761
21762  windows_path="$new_path"
21763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21764    unix_path=`$CYGPATH -u "$windows_path"`
21765    new_path="$unix_path"
21766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21768    new_path="$unix_path"
21769  fi
21770
21771
21772    new_path=`$WHICH "$new_path" 2> /dev/null`
21773
21774    if test "x$new_path" = x; then
21775      # It's still not found. Now this is an unrecoverable error.
21776      { $as_echo "$as_me:$LINENO: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21777$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21778      has_space=`$ECHO "$complete" | $GREP " "`
21779      if test "x$has_space" != x; then
21780        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21782      fi
21783      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINLD" >&5
21784$as_echo "$as_me: error: Cannot locate the the path of WINLD" >&2;}
21785   { (exit 1); exit 1; }; }
21786    fi
21787  fi
21788
21789  # Now new_path has a complete unix path to the binary
21790  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21791    # Keep paths in /bin as-is, but remove trailing .exe if any
21792    new_path="${new_path/%.exe/}"
21793    # Do not save /bin paths to all_fixpath_prefixes!
21794  else
21795    # Not in mixed or Windows style, start by that.
21796    new_path=`cmd //c echo $new_path`
21797
21798  input_path="$new_path"
21799  # Check if we need to convert this using DOS-style short mode. If the path
21800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21801  # take no chances and rewrite it.
21802  # Note: m4 eats our [], so we need to use [ and ] instead.
21803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21804  if test "x$has_forbidden_chars" != x; then
21805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21807  fi
21808
21809    # Output is in $new_path
21810
21811  windows_path="$new_path"
21812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21813    unix_path=`$CYGPATH -u "$windows_path"`
21814    new_path="$unix_path"
21815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21817    new_path="$unix_path"
21818  fi
21819
21820    # remove trailing .exe if any
21821    new_path="${new_path/%.exe/}"
21822
21823    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21824    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21825  fi
21826
21827  else
21828    # We're on a posix platform. Hooray! :)
21829    # First separate the path from the arguments. This will split at the first
21830    # space.
21831    complete="$WINLD"
21832    path="${complete%% *}"
21833    tmp="$complete EOL"
21834    arguments="${tmp#* }"
21835
21836    new_path=`$WHICH $path 2> /dev/null`
21837    if test "x$new_path" = x; then
21838      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21839      if test "x$is_absolute_path" != x; then
21840        { $as_echo "$as_me:$LINENO: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&5
21841$as_echo "$as_me: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&6;}
21842        new_path="$path"
21843      else
21844        { $as_echo "$as_me:$LINENO: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21845$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21846        has_space=`$ECHO "$complete" | $GREP " "`
21847        if test "x$has_space" != x; then
21848          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
21849$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21850        fi
21851        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINLD" >&5
21852$as_echo "$as_me: error: Cannot locate the the path of WINLD" >&2;}
21853   { (exit 1); exit 1; }; }
21854      fi
21855    fi
21856  fi
21857
21858  # Now join together the path and the arguments once again
21859  if test "x$arguments" != xEOL; then
21860      new_complete="$new_path ${arguments% *}"
21861  else
21862      new_complete="$new_path"
21863  fi
21864
21865  if test "x$complete" != "x$new_complete"; then
21866    WINLD="$new_complete"
21867    { $as_echo "$as_me:$LINENO: Rewriting WINLD to \"$new_complete\"" >&5
21868$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
21869  fi
21870
21871    printf "Windows linker was found at $WINLD\n"
21872    { $as_echo "$as_me:$LINENO: checking if the found link.exe is actually the Visual Studio linker" >&5
21873$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
21874    "$WINLD" --version > /dev/null
21875    if test $? -eq 0 ; then
21876      { $as_echo "$as_me:$LINENO: result: no" >&5
21877$as_echo "no" >&6; }
21878      { { $as_echo "$as_me:$LINENO: error: This is the Cygwin link tool. Please check your PATH and rerun configure." >&5
21879$as_echo "$as_me: error: This is the Cygwin link tool. Please check your PATH and rerun configure." >&2;}
21880   { (exit 1); exit 1; }; }
21881    else
21882      { $as_echo "$as_me:$LINENO: result: yes" >&5
21883$as_echo "yes" >&6; }
21884    fi
21885    LD="$WINLD"
21886    LDEXE="$WINLD"
21887    LDCXX="$WINLD"
21888    LDEXECXX="$WINLD"
21889
21890    # Extract the first word of "mt", so it can be a program name with args.
21891set dummy mt; ac_word=$2
21892{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
21893$as_echo_n "checking for $ac_word... " >&6; }
21894if test "${ac_cv_prog_MT+set}" = set; then
21895  $as_echo_n "(cached) " >&6
21896else
21897  if test -n "$MT"; then
21898  ac_cv_prog_MT="$MT" # Let the user override the test.
21899else
21900  ac_prog_rejected=no
21901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21902for as_dir in $PATH
21903do
21904  IFS=$as_save_IFS
21905  test -z "$as_dir" && as_dir=.
21906  for ac_exec_ext in '' $ac_executable_extensions; do
21907  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21908    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
21909       ac_prog_rejected=yes
21910       continue
21911     fi
21912    ac_cv_prog_MT="mt"
21913    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21914    break 2
21915  fi
21916done
21917done
21918IFS=$as_save_IFS
21919
21920if test $ac_prog_rejected = yes; then
21921  # We found a bogon in the path, so make sure we never use it.
21922  set dummy $ac_cv_prog_MT
21923  shift
21924  if test $# != 0; then
21925    # We chose a different compiler from the bogus one.
21926    # However, it has the same basename, so the bogon will be chosen
21927    # first if we set MT to just the basename; use the full file name.
21928    shift
21929    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
21930  fi
21931fi
21932fi
21933fi
21934MT=$ac_cv_prog_MT
21935if test -n "$MT"; then
21936  { $as_echo "$as_me:$LINENO: result: $MT" >&5
21937$as_echo "$MT" >&6; }
21938else
21939  { $as_echo "$as_me:$LINENO: result: no" >&5
21940$as_echo "no" >&6; }
21941fi
21942
21943
21944
21945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21946
21947  # First separate the path from the arguments. This will split at the first
21948  # space.
21949  complete="$MT"
21950  path="${complete%% *}"
21951  tmp="$complete EOL"
21952  arguments="${tmp#* }"
21953
21954  # Input might be given as Windows format, start by converting to
21955  # unix format.
21956  new_path=`$CYGPATH -u "$path"`
21957
21958  # Now try to locate executable using which
21959  new_path=`$WHICH "$new_path" 2> /dev/null`
21960  # bat and cmd files are not always considered executable in cygwin causing which
21961  # to not find them
21962  if test "x$new_path" = x \
21963           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21964           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21965    new_path=`$CYGPATH -u "$path"`
21966  fi
21967  if test "x$new_path" = x; then
21968    # Oops. Which didn't find the executable.
21969    # The splitting of arguments from the executable at a space might have been incorrect,
21970    # since paths with space are more likely in Windows. Give it another try with the whole
21971    # argument.
21972    path="$complete"
21973    arguments="EOL"
21974    new_path=`$CYGPATH -u "$path"`
21975    new_path=`$WHICH "$new_path" 2> /dev/null`
21976    # bat and cmd files are not always considered executable in cygwin causing which
21977    # to not find them
21978    if test "x$new_path" = x \
21979             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21980             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21981      new_path=`$CYGPATH -u "$path"`
21982    fi
21983    if test "x$new_path" = x; then
21984      # It's still not found. Now this is an unrecoverable error.
21985      { $as_echo "$as_me:$LINENO: The path of MT, which resolves as \"$complete\", is not found." >&5
21986$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21987      has_space=`$ECHO "$complete" | $GREP " "`
21988      if test "x$has_space" != x; then
21989        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21991      fi
21992      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MT" >&5
21993$as_echo "$as_me: error: Cannot locate the the path of MT" >&2;}
21994   { (exit 1); exit 1; }; }
21995    fi
21996  fi
21997
21998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22001  # "foo.exe" is OK but "foo" is an error.
22002  #
22003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22004  # It is also a way to make sure we got the proper file name for the real test later on.
22005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22006  if test "x$test_shortpath" = x; then
22007    # Short path failed, file does not exist as specified.
22008    # Try adding .exe or .cmd
22009    if test -f "${new_path}.exe"; then
22010       input_to_shortpath="${new_path}.exe"
22011    elif test -f "${new_path}.cmd"; then
22012       input_to_shortpath="${new_path}.cmd"
22013    else
22014      { $as_echo "$as_me:$LINENO: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22015$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22016      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22017$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22018      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MT" >&5
22019$as_echo "$as_me: error: Cannot locate the the path of MT" >&2;}
22020   { (exit 1); exit 1; }; }
22021    fi
22022  else
22023    input_to_shortpath="$new_path"
22024  fi
22025
22026  # Call helper function which possibly converts this using DOS-style short mode.
22027  # If so, the updated path is stored in $new_path.
22028  new_path="$input_to_shortpath"
22029
22030  input_path="$input_to_shortpath"
22031  # Check if we need to convert this using DOS-style short mode. If the path
22032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22033  # take no chances and rewrite it.
22034  # Note: m4 eats our [], so we need to use [ and ] instead.
22035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22036  if test "x$has_forbidden_chars" != x; then
22037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22041      # Going to short mode and back again did indeed matter. Since short mode is
22042      # case insensitive, let's make it lowercase to improve readability.
22043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22044      # Now convert it back to Unix-stile (cygpath)
22045      input_path=`$CYGPATH -u "$shortmode_path"`
22046      new_path="$input_path"
22047    fi
22048  fi
22049
22050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22051  if test "x$test_cygdrive_prefix" = x; then
22052    # As a simple fix, exclude /usr/bin since it's not a real path.
22053    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22055      # a path prefixed by /cygdrive for fixpath to work.
22056      new_path="$CYGWIN_ROOT_PATH$input_path"
22057    fi
22058  fi
22059
22060  # remove trailing .exe if any
22061  new_path="${new_path/%.exe/}"
22062
22063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22064
22065  # First separate the path from the arguments. This will split at the first
22066  # space.
22067  complete="$MT"
22068  path="${complete%% *}"
22069  tmp="$complete EOL"
22070  arguments="${tmp#* }"
22071
22072  # Input might be given as Windows format, start by converting to
22073  # unix format.
22074  new_path="$path"
22075
22076  windows_path="$new_path"
22077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22078    unix_path=`$CYGPATH -u "$windows_path"`
22079    new_path="$unix_path"
22080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22082    new_path="$unix_path"
22083  fi
22084
22085
22086  # Now try to locate executable using which
22087  new_path=`$WHICH "$new_path" 2> /dev/null`
22088
22089  if test "x$new_path" = x; then
22090    # Oops. Which didn't find the executable.
22091    # The splitting of arguments from the executable at a space might have been incorrect,
22092    # since paths with space are more likely in Windows. Give it another try with the whole
22093    # argument.
22094    path="$complete"
22095    arguments="EOL"
22096    new_path="$path"
22097
22098  windows_path="$new_path"
22099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22100    unix_path=`$CYGPATH -u "$windows_path"`
22101    new_path="$unix_path"
22102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22104    new_path="$unix_path"
22105  fi
22106
22107
22108    new_path=`$WHICH "$new_path" 2> /dev/null`
22109
22110    if test "x$new_path" = x; then
22111      # It's still not found. Now this is an unrecoverable error.
22112      { $as_echo "$as_me:$LINENO: The path of MT, which resolves as \"$complete\", is not found." >&5
22113$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22114      has_space=`$ECHO "$complete" | $GREP " "`
22115      if test "x$has_space" != x; then
22116        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22117$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22118      fi
22119      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MT" >&5
22120$as_echo "$as_me: error: Cannot locate the the path of MT" >&2;}
22121   { (exit 1); exit 1; }; }
22122    fi
22123  fi
22124
22125  # Now new_path has a complete unix path to the binary
22126  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22127    # Keep paths in /bin as-is, but remove trailing .exe if any
22128    new_path="${new_path/%.exe/}"
22129    # Do not save /bin paths to all_fixpath_prefixes!
22130  else
22131    # Not in mixed or Windows style, start by that.
22132    new_path=`cmd //c echo $new_path`
22133
22134  input_path="$new_path"
22135  # Check if we need to convert this using DOS-style short mode. If the path
22136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22137  # take no chances and rewrite it.
22138  # Note: m4 eats our [], so we need to use [ and ] instead.
22139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22140  if test "x$has_forbidden_chars" != x; then
22141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22143  fi
22144
22145    # Output is in $new_path
22146
22147  windows_path="$new_path"
22148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22149    unix_path=`$CYGPATH -u "$windows_path"`
22150    new_path="$unix_path"
22151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22153    new_path="$unix_path"
22154  fi
22155
22156    # remove trailing .exe if any
22157    new_path="${new_path/%.exe/}"
22158
22159    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22160    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22161  fi
22162
22163  else
22164    # We're on a posix platform. Hooray! :)
22165    # First separate the path from the arguments. This will split at the first
22166    # space.
22167    complete="$MT"
22168    path="${complete%% *}"
22169    tmp="$complete EOL"
22170    arguments="${tmp#* }"
22171
22172    new_path=`$WHICH $path 2> /dev/null`
22173    if test "x$new_path" = x; then
22174      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22175      if test "x$is_absolute_path" != x; then
22176        { $as_echo "$as_me:$LINENO: Resolving MT (as $path) with 'which' failed, using $path directly." >&5
22177$as_echo "$as_me: Resolving MT (as $path) with 'which' failed, using $path directly." >&6;}
22178        new_path="$path"
22179      else
22180        { $as_echo "$as_me:$LINENO: The path of MT, which resolves as \"$complete\", is not found." >&5
22181$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22182        has_space=`$ECHO "$complete" | $GREP " "`
22183        if test "x$has_space" != x; then
22184          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
22185$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22186        fi
22187        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MT" >&5
22188$as_echo "$as_me: error: Cannot locate the the path of MT" >&2;}
22189   { (exit 1); exit 1; }; }
22190      fi
22191    fi
22192  fi
22193
22194  # Now join together the path and the arguments once again
22195  if test "x$arguments" != xEOL; then
22196      new_complete="$new_path ${arguments% *}"
22197  else
22198      new_complete="$new_path"
22199  fi
22200
22201  if test "x$complete" != "x$new_complete"; then
22202    MT="$new_complete"
22203    { $as_echo "$as_me:$LINENO: Rewriting MT to \"$new_complete\"" >&5
22204$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22205  fi
22206
22207    # The resource compiler
22208    # Extract the first word of "rc", so it can be a program name with args.
22209set dummy rc; ac_word=$2
22210{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
22211$as_echo_n "checking for $ac_word... " >&6; }
22212if test "${ac_cv_prog_RC+set}" = set; then
22213  $as_echo_n "(cached) " >&6
22214else
22215  if test -n "$RC"; then
22216  ac_cv_prog_RC="$RC" # Let the user override the test.
22217else
22218  ac_prog_rejected=no
22219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22220for as_dir in $PATH
22221do
22222  IFS=$as_save_IFS
22223  test -z "$as_dir" && as_dir=.
22224  for ac_exec_ext in '' $ac_executable_extensions; do
22225  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22226    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22227       ac_prog_rejected=yes
22228       continue
22229     fi
22230    ac_cv_prog_RC="rc"
22231    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22232    break 2
22233  fi
22234done
22235done
22236IFS=$as_save_IFS
22237
22238if test $ac_prog_rejected = yes; then
22239  # We found a bogon in the path, so make sure we never use it.
22240  set dummy $ac_cv_prog_RC
22241  shift
22242  if test $# != 0; then
22243    # We chose a different compiler from the bogus one.
22244    # However, it has the same basename, so the bogon will be chosen
22245    # first if we set RC to just the basename; use the full file name.
22246    shift
22247    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22248  fi
22249fi
22250fi
22251fi
22252RC=$ac_cv_prog_RC
22253if test -n "$RC"; then
22254  { $as_echo "$as_me:$LINENO: result: $RC" >&5
22255$as_echo "$RC" >&6; }
22256else
22257  { $as_echo "$as_me:$LINENO: result: no" >&5
22258$as_echo "no" >&6; }
22259fi
22260
22261
22262
22263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22264
22265  # First separate the path from the arguments. This will split at the first
22266  # space.
22267  complete="$RC"
22268  path="${complete%% *}"
22269  tmp="$complete EOL"
22270  arguments="${tmp#* }"
22271
22272  # Input might be given as Windows format, start by converting to
22273  # unix format.
22274  new_path=`$CYGPATH -u "$path"`
22275
22276  # Now try to locate executable using which
22277  new_path=`$WHICH "$new_path" 2> /dev/null`
22278  # bat and cmd files are not always considered executable in cygwin causing which
22279  # to not find them
22280  if test "x$new_path" = x \
22281           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22282           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22283    new_path=`$CYGPATH -u "$path"`
22284  fi
22285  if test "x$new_path" = x; then
22286    # Oops. Which didn't find the executable.
22287    # The splitting of arguments from the executable at a space might have been incorrect,
22288    # since paths with space are more likely in Windows. Give it another try with the whole
22289    # argument.
22290    path="$complete"
22291    arguments="EOL"
22292    new_path=`$CYGPATH -u "$path"`
22293    new_path=`$WHICH "$new_path" 2> /dev/null`
22294    # bat and cmd files are not always considered executable in cygwin causing which
22295    # to not find them
22296    if test "x$new_path" = x \
22297             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22298             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22299      new_path=`$CYGPATH -u "$path"`
22300    fi
22301    if test "x$new_path" = x; then
22302      # It's still not found. Now this is an unrecoverable error.
22303      { $as_echo "$as_me:$LINENO: The path of RC, which resolves as \"$complete\", is not found." >&5
22304$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22305      has_space=`$ECHO "$complete" | $GREP " "`
22306      if test "x$has_space" != x; then
22307        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22309      fi
22310      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of RC" >&5
22311$as_echo "$as_me: error: Cannot locate the the path of RC" >&2;}
22312   { (exit 1); exit 1; }; }
22313    fi
22314  fi
22315
22316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22319  # "foo.exe" is OK but "foo" is an error.
22320  #
22321  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22322  # It is also a way to make sure we got the proper file name for the real test later on.
22323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22324  if test "x$test_shortpath" = x; then
22325    # Short path failed, file does not exist as specified.
22326    # Try adding .exe or .cmd
22327    if test -f "${new_path}.exe"; then
22328       input_to_shortpath="${new_path}.exe"
22329    elif test -f "${new_path}.cmd"; then
22330       input_to_shortpath="${new_path}.cmd"
22331    else
22332      { $as_echo "$as_me:$LINENO: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22333$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22334      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22335$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22336      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of RC" >&5
22337$as_echo "$as_me: error: Cannot locate the the path of RC" >&2;}
22338   { (exit 1); exit 1; }; }
22339    fi
22340  else
22341    input_to_shortpath="$new_path"
22342  fi
22343
22344  # Call helper function which possibly converts this using DOS-style short mode.
22345  # If so, the updated path is stored in $new_path.
22346  new_path="$input_to_shortpath"
22347
22348  input_path="$input_to_shortpath"
22349  # Check if we need to convert this using DOS-style short mode. If the path
22350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22351  # take no chances and rewrite it.
22352  # Note: m4 eats our [], so we need to use [ and ] instead.
22353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22354  if test "x$has_forbidden_chars" != x; then
22355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22356    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22357    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22358    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22359      # Going to short mode and back again did indeed matter. Since short mode is
22360      # case insensitive, let's make it lowercase to improve readability.
22361      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22362      # Now convert it back to Unix-stile (cygpath)
22363      input_path=`$CYGPATH -u "$shortmode_path"`
22364      new_path="$input_path"
22365    fi
22366  fi
22367
22368  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22369  if test "x$test_cygdrive_prefix" = x; then
22370    # As a simple fix, exclude /usr/bin since it's not a real path.
22371    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22372      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22373      # a path prefixed by /cygdrive for fixpath to work.
22374      new_path="$CYGWIN_ROOT_PATH$input_path"
22375    fi
22376  fi
22377
22378  # remove trailing .exe if any
22379  new_path="${new_path/%.exe/}"
22380
22381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22382
22383  # First separate the path from the arguments. This will split at the first
22384  # space.
22385  complete="$RC"
22386  path="${complete%% *}"
22387  tmp="$complete EOL"
22388  arguments="${tmp#* }"
22389
22390  # Input might be given as Windows format, start by converting to
22391  # unix format.
22392  new_path="$path"
22393
22394  windows_path="$new_path"
22395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22396    unix_path=`$CYGPATH -u "$windows_path"`
22397    new_path="$unix_path"
22398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22400    new_path="$unix_path"
22401  fi
22402
22403
22404  # Now try to locate executable using which
22405  new_path=`$WHICH "$new_path" 2> /dev/null`
22406
22407  if test "x$new_path" = x; then
22408    # Oops. Which didn't find the executable.
22409    # The splitting of arguments from the executable at a space might have been incorrect,
22410    # since paths with space are more likely in Windows. Give it another try with the whole
22411    # argument.
22412    path="$complete"
22413    arguments="EOL"
22414    new_path="$path"
22415
22416  windows_path="$new_path"
22417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22418    unix_path=`$CYGPATH -u "$windows_path"`
22419    new_path="$unix_path"
22420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22422    new_path="$unix_path"
22423  fi
22424
22425
22426    new_path=`$WHICH "$new_path" 2> /dev/null`
22427
22428    if test "x$new_path" = x; then
22429      # It's still not found. Now this is an unrecoverable error.
22430      { $as_echo "$as_me:$LINENO: The path of RC, which resolves as \"$complete\", is not found." >&5
22431$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22432      has_space=`$ECHO "$complete" | $GREP " "`
22433      if test "x$has_space" != x; then
22434        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22435$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22436      fi
22437      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of RC" >&5
22438$as_echo "$as_me: error: Cannot locate the the path of RC" >&2;}
22439   { (exit 1); exit 1; }; }
22440    fi
22441  fi
22442
22443  # Now new_path has a complete unix path to the binary
22444  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22445    # Keep paths in /bin as-is, but remove trailing .exe if any
22446    new_path="${new_path/%.exe/}"
22447    # Do not save /bin paths to all_fixpath_prefixes!
22448  else
22449    # Not in mixed or Windows style, start by that.
22450    new_path=`cmd //c echo $new_path`
22451
22452  input_path="$new_path"
22453  # Check if we need to convert this using DOS-style short mode. If the path
22454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22455  # take no chances and rewrite it.
22456  # Note: m4 eats our [], so we need to use [ and ] instead.
22457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22458  if test "x$has_forbidden_chars" != x; then
22459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22461  fi
22462
22463    # Output is in $new_path
22464
22465  windows_path="$new_path"
22466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22467    unix_path=`$CYGPATH -u "$windows_path"`
22468    new_path="$unix_path"
22469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22471    new_path="$unix_path"
22472  fi
22473
22474    # remove trailing .exe if any
22475    new_path="${new_path/%.exe/}"
22476
22477    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22478    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22479  fi
22480
22481  else
22482    # We're on a posix platform. Hooray! :)
22483    # First separate the path from the arguments. This will split at the first
22484    # space.
22485    complete="$RC"
22486    path="${complete%% *}"
22487    tmp="$complete EOL"
22488    arguments="${tmp#* }"
22489
22490    new_path=`$WHICH $path 2> /dev/null`
22491    if test "x$new_path" = x; then
22492      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22493      if test "x$is_absolute_path" != x; then
22494        { $as_echo "$as_me:$LINENO: Resolving RC (as $path) with 'which' failed, using $path directly." >&5
22495$as_echo "$as_me: Resolving RC (as $path) with 'which' failed, using $path directly." >&6;}
22496        new_path="$path"
22497      else
22498        { $as_echo "$as_me:$LINENO: The path of RC, which resolves as \"$complete\", is not found." >&5
22499$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22500        has_space=`$ECHO "$complete" | $GREP " "`
22501        if test "x$has_space" != x; then
22502          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
22503$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22504        fi
22505        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of RC" >&5
22506$as_echo "$as_me: error: Cannot locate the the path of RC" >&2;}
22507   { (exit 1); exit 1; }; }
22508      fi
22509    fi
22510  fi
22511
22512  # Now join together the path and the arguments once again
22513  if test "x$arguments" != xEOL; then
22514      new_complete="$new_path ${arguments% *}"
22515  else
22516      new_complete="$new_path"
22517  fi
22518
22519  if test "x$complete" != "x$new_complete"; then
22520    RC="$new_complete"
22521    { $as_echo "$as_me:$LINENO: Rewriting RC to \"$new_complete\"" >&5
22522$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22523  fi
22524
22525
22526    # For hotspot, we need these in Windows mixed path,
22527    # so rewrite them all. Need added .exe suffix.
22528    HOTSPOT_CXX="$CXX.exe"
22529    HOTSPOT_LD="$LD.exe"
22530    HOTSPOT_MT="$MT.exe"
22531    HOTSPOT_RC="$RC.exe"
22532
22533  unix_path="$HOTSPOT_CXX"
22534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22535    windows_path=`$CYGPATH -m "$unix_path"`
22536    HOTSPOT_CXX="$windows_path"
22537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22538    windows_path=`cmd //c echo $unix_path`
22539    HOTSPOT_CXX="$windows_path"
22540  fi
22541
22542
22543  unix_path="$HOTSPOT_LD"
22544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22545    windows_path=`$CYGPATH -m "$unix_path"`
22546    HOTSPOT_LD="$windows_path"
22547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22548    windows_path=`cmd //c echo $unix_path`
22549    HOTSPOT_LD="$windows_path"
22550  fi
22551
22552
22553  unix_path="$HOTSPOT_MT"
22554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22555    windows_path=`$CYGPATH -m "$unix_path"`
22556    HOTSPOT_MT="$windows_path"
22557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22558    windows_path=`cmd //c echo $unix_path`
22559    HOTSPOT_MT="$windows_path"
22560  fi
22561
22562
22563  unix_path="$HOTSPOT_RC"
22564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22565    windows_path=`$CYGPATH -m "$unix_path"`
22566    HOTSPOT_RC="$windows_path"
22567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22568    windows_path=`cmd //c echo $unix_path`
22569    HOTSPOT_RC="$windows_path"
22570  fi
22571
22572
22573
22574
22575    RC_FLAGS="-nologo -l 0x409 -r"
22576    if test "x$VARIANT" = xOPT; then
22577
22578        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22579
22580fi
22581
22582    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22583    if test "x$JDK_UPDATE_VERSION" = x; then
22584
22585        JDK_UPDATE_VERSION_NOTNULL=0
22586
22587fi
22588
22589    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22590    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22591    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22592    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22593    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22594    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22595    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22596
22597    # lib.exe is used to create static libraries.
22598    # Extract the first word of "lib", so it can be a program name with args.
22599set dummy lib; ac_word=$2
22600{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
22601$as_echo_n "checking for $ac_word... " >&6; }
22602if test "${ac_cv_prog_WINAR+set}" = set; then
22603  $as_echo_n "(cached) " >&6
22604else
22605  if test -n "$WINAR"; then
22606  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22607else
22608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22609for as_dir in $PATH
22610do
22611  IFS=$as_save_IFS
22612  test -z "$as_dir" && as_dir=.
22613  for ac_exec_ext in '' $ac_executable_extensions; do
22614  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22615    ac_cv_prog_WINAR="lib"
22616    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22617    break 2
22618  fi
22619done
22620done
22621IFS=$as_save_IFS
22622
22623fi
22624fi
22625WINAR=$ac_cv_prog_WINAR
22626if test -n "$WINAR"; then
22627  { $as_echo "$as_me:$LINENO: result: $WINAR" >&5
22628$as_echo "$WINAR" >&6; }
22629else
22630  { $as_echo "$as_me:$LINENO: result: no" >&5
22631$as_echo "no" >&6; }
22632fi
22633
22634
22635
22636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22637
22638  # First separate the path from the arguments. This will split at the first
22639  # space.
22640  complete="$WINAR"
22641  path="${complete%% *}"
22642  tmp="$complete EOL"
22643  arguments="${tmp#* }"
22644
22645  # Input might be given as Windows format, start by converting to
22646  # unix format.
22647  new_path=`$CYGPATH -u "$path"`
22648
22649  # Now try to locate executable using which
22650  new_path=`$WHICH "$new_path" 2> /dev/null`
22651  # bat and cmd files are not always considered executable in cygwin causing which
22652  # to not find them
22653  if test "x$new_path" = x \
22654           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22655           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22656    new_path=`$CYGPATH -u "$path"`
22657  fi
22658  if test "x$new_path" = x; then
22659    # Oops. Which didn't find the executable.
22660    # The splitting of arguments from the executable at a space might have been incorrect,
22661    # since paths with space are more likely in Windows. Give it another try with the whole
22662    # argument.
22663    path="$complete"
22664    arguments="EOL"
22665    new_path=`$CYGPATH -u "$path"`
22666    new_path=`$WHICH "$new_path" 2> /dev/null`
22667    # bat and cmd files are not always considered executable in cygwin causing which
22668    # to not find them
22669    if test "x$new_path" = x \
22670             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22671             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22672      new_path=`$CYGPATH -u "$path"`
22673    fi
22674    if test "x$new_path" = x; then
22675      # It's still not found. Now this is an unrecoverable error.
22676      { $as_echo "$as_me:$LINENO: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22677$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22678      has_space=`$ECHO "$complete" | $GREP " "`
22679      if test "x$has_space" != x; then
22680        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22681$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22682      fi
22683      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINAR" >&5
22684$as_echo "$as_me: error: Cannot locate the the path of WINAR" >&2;}
22685   { (exit 1); exit 1; }; }
22686    fi
22687  fi
22688
22689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22692  # "foo.exe" is OK but "foo" is an error.
22693  #
22694  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22695  # It is also a way to make sure we got the proper file name for the real test later on.
22696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22697  if test "x$test_shortpath" = x; then
22698    # Short path failed, file does not exist as specified.
22699    # Try adding .exe or .cmd
22700    if test -f "${new_path}.exe"; then
22701       input_to_shortpath="${new_path}.exe"
22702    elif test -f "${new_path}.cmd"; then
22703       input_to_shortpath="${new_path}.cmd"
22704    else
22705      { $as_echo "$as_me:$LINENO: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22706$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22707      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22708$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22709      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINAR" >&5
22710$as_echo "$as_me: error: Cannot locate the the path of WINAR" >&2;}
22711   { (exit 1); exit 1; }; }
22712    fi
22713  else
22714    input_to_shortpath="$new_path"
22715  fi
22716
22717  # Call helper function which possibly converts this using DOS-style short mode.
22718  # If so, the updated path is stored in $new_path.
22719  new_path="$input_to_shortpath"
22720
22721  input_path="$input_to_shortpath"
22722  # Check if we need to convert this using DOS-style short mode. If the path
22723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22724  # take no chances and rewrite it.
22725  # Note: m4 eats our [], so we need to use [ and ] instead.
22726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22727  if test "x$has_forbidden_chars" != x; then
22728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22732      # Going to short mode and back again did indeed matter. Since short mode is
22733      # case insensitive, let's make it lowercase to improve readability.
22734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22735      # Now convert it back to Unix-stile (cygpath)
22736      input_path=`$CYGPATH -u "$shortmode_path"`
22737      new_path="$input_path"
22738    fi
22739  fi
22740
22741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22742  if test "x$test_cygdrive_prefix" = x; then
22743    # As a simple fix, exclude /usr/bin since it's not a real path.
22744    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22746      # a path prefixed by /cygdrive for fixpath to work.
22747      new_path="$CYGWIN_ROOT_PATH$input_path"
22748    fi
22749  fi
22750
22751  # remove trailing .exe if any
22752  new_path="${new_path/%.exe/}"
22753
22754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22755
22756  # First separate the path from the arguments. This will split at the first
22757  # space.
22758  complete="$WINAR"
22759  path="${complete%% *}"
22760  tmp="$complete EOL"
22761  arguments="${tmp#* }"
22762
22763  # Input might be given as Windows format, start by converting to
22764  # unix format.
22765  new_path="$path"
22766
22767  windows_path="$new_path"
22768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22769    unix_path=`$CYGPATH -u "$windows_path"`
22770    new_path="$unix_path"
22771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22773    new_path="$unix_path"
22774  fi
22775
22776
22777  # Now try to locate executable using which
22778  new_path=`$WHICH "$new_path" 2> /dev/null`
22779
22780  if test "x$new_path" = x; then
22781    # Oops. Which didn't find the executable.
22782    # The splitting of arguments from the executable at a space might have been incorrect,
22783    # since paths with space are more likely in Windows. Give it another try with the whole
22784    # argument.
22785    path="$complete"
22786    arguments="EOL"
22787    new_path="$path"
22788
22789  windows_path="$new_path"
22790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22791    unix_path=`$CYGPATH -u "$windows_path"`
22792    new_path="$unix_path"
22793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22795    new_path="$unix_path"
22796  fi
22797
22798
22799    new_path=`$WHICH "$new_path" 2> /dev/null`
22800
22801    if test "x$new_path" = x; then
22802      # It's still not found. Now this is an unrecoverable error.
22803      { $as_echo "$as_me:$LINENO: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22804$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22805      has_space=`$ECHO "$complete" | $GREP " "`
22806      if test "x$has_space" != x; then
22807        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22809      fi
22810      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINAR" >&5
22811$as_echo "$as_me: error: Cannot locate the the path of WINAR" >&2;}
22812   { (exit 1); exit 1; }; }
22813    fi
22814  fi
22815
22816  # Now new_path has a complete unix path to the binary
22817  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22818    # Keep paths in /bin as-is, but remove trailing .exe if any
22819    new_path="${new_path/%.exe/}"
22820    # Do not save /bin paths to all_fixpath_prefixes!
22821  else
22822    # Not in mixed or Windows style, start by that.
22823    new_path=`cmd //c echo $new_path`
22824
22825  input_path="$new_path"
22826  # Check if we need to convert this using DOS-style short mode. If the path
22827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22828  # take no chances and rewrite it.
22829  # Note: m4 eats our [], so we need to use [ and ] instead.
22830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22831  if test "x$has_forbidden_chars" != x; then
22832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22834  fi
22835
22836    # Output is in $new_path
22837
22838  windows_path="$new_path"
22839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22840    unix_path=`$CYGPATH -u "$windows_path"`
22841    new_path="$unix_path"
22842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22844    new_path="$unix_path"
22845  fi
22846
22847    # remove trailing .exe if any
22848    new_path="${new_path/%.exe/}"
22849
22850    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22851    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22852  fi
22853
22854  else
22855    # We're on a posix platform. Hooray! :)
22856    # First separate the path from the arguments. This will split at the first
22857    # space.
22858    complete="$WINAR"
22859    path="${complete%% *}"
22860    tmp="$complete EOL"
22861    arguments="${tmp#* }"
22862
22863    new_path=`$WHICH $path 2> /dev/null`
22864    if test "x$new_path" = x; then
22865      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22866      if test "x$is_absolute_path" != x; then
22867        { $as_echo "$as_me:$LINENO: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&5
22868$as_echo "$as_me: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&6;}
22869        new_path="$path"
22870      else
22871        { $as_echo "$as_me:$LINENO: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22872$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22873        has_space=`$ECHO "$complete" | $GREP " "`
22874        if test "x$has_space" != x; then
22875          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
22876$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22877        fi
22878        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINAR" >&5
22879$as_echo "$as_me: error: Cannot locate the the path of WINAR" >&2;}
22880   { (exit 1); exit 1; }; }
22881      fi
22882    fi
22883  fi
22884
22885  # Now join together the path and the arguments once again
22886  if test "x$arguments" != xEOL; then
22887      new_complete="$new_path ${arguments% *}"
22888  else
22889      new_complete="$new_path"
22890  fi
22891
22892  if test "x$complete" != "x$new_complete"; then
22893    WINAR="$new_complete"
22894    { $as_echo "$as_me:$LINENO: Rewriting WINAR to \"$new_complete\"" >&5
22895$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
22896  fi
22897
22898    AR="$WINAR"
22899    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
22900
22901    # Extract the first word of "dumpbin", so it can be a program name with args.
22902set dummy dumpbin; ac_word=$2
22903{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
22904$as_echo_n "checking for $ac_word... " >&6; }
22905if test "${ac_cv_prog_DUMPBIN+set}" = set; then
22906  $as_echo_n "(cached) " >&6
22907else
22908  if test -n "$DUMPBIN"; then
22909  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
22910else
22911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22912for as_dir in $PATH
22913do
22914  IFS=$as_save_IFS
22915  test -z "$as_dir" && as_dir=.
22916  for ac_exec_ext in '' $ac_executable_extensions; do
22917  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22918    ac_cv_prog_DUMPBIN="dumpbin"
22919    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22920    break 2
22921  fi
22922done
22923done
22924IFS=$as_save_IFS
22925
22926fi
22927fi
22928DUMPBIN=$ac_cv_prog_DUMPBIN
22929if test -n "$DUMPBIN"; then
22930  { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5
22931$as_echo "$DUMPBIN" >&6; }
22932else
22933  { $as_echo "$as_me:$LINENO: result: no" >&5
22934$as_echo "no" >&6; }
22935fi
22936
22937
22938
22939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22940
22941  # First separate the path from the arguments. This will split at the first
22942  # space.
22943  complete="$DUMPBIN"
22944  path="${complete%% *}"
22945  tmp="$complete EOL"
22946  arguments="${tmp#* }"
22947
22948  # Input might be given as Windows format, start by converting to
22949  # unix format.
22950  new_path=`$CYGPATH -u "$path"`
22951
22952  # Now try to locate executable using which
22953  new_path=`$WHICH "$new_path" 2> /dev/null`
22954  # bat and cmd files are not always considered executable in cygwin causing which
22955  # to not find them
22956  if test "x$new_path" = x \
22957           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22958           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22959    new_path=`$CYGPATH -u "$path"`
22960  fi
22961  if test "x$new_path" = x; then
22962    # Oops. Which didn't find the executable.
22963    # The splitting of arguments from the executable at a space might have been incorrect,
22964    # since paths with space are more likely in Windows. Give it another try with the whole
22965    # argument.
22966    path="$complete"
22967    arguments="EOL"
22968    new_path=`$CYGPATH -u "$path"`
22969    new_path=`$WHICH "$new_path" 2> /dev/null`
22970    # bat and cmd files are not always considered executable in cygwin causing which
22971    # to not find them
22972    if test "x$new_path" = x \
22973             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22974             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22975      new_path=`$CYGPATH -u "$path"`
22976    fi
22977    if test "x$new_path" = x; then
22978      # It's still not found. Now this is an unrecoverable error.
22979      { $as_echo "$as_me:$LINENO: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22980$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22981      has_space=`$ECHO "$complete" | $GREP " "`
22982      if test "x$has_space" != x; then
22983        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22985      fi
22986      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of DUMPBIN" >&5
22987$as_echo "$as_me: error: Cannot locate the the path of DUMPBIN" >&2;}
22988   { (exit 1); exit 1; }; }
22989    fi
22990  fi
22991
22992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22995  # "foo.exe" is OK but "foo" is an error.
22996  #
22997  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22998  # It is also a way to make sure we got the proper file name for the real test later on.
22999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23000  if test "x$test_shortpath" = x; then
23001    # Short path failed, file does not exist as specified.
23002    # Try adding .exe or .cmd
23003    if test -f "${new_path}.exe"; then
23004       input_to_shortpath="${new_path}.exe"
23005    elif test -f "${new_path}.cmd"; then
23006       input_to_shortpath="${new_path}.cmd"
23007    else
23008      { $as_echo "$as_me:$LINENO: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23009$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23010      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23011$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23012      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of DUMPBIN" >&5
23013$as_echo "$as_me: error: Cannot locate the the path of DUMPBIN" >&2;}
23014   { (exit 1); exit 1; }; }
23015    fi
23016  else
23017    input_to_shortpath="$new_path"
23018  fi
23019
23020  # Call helper function which possibly converts this using DOS-style short mode.
23021  # If so, the updated path is stored in $new_path.
23022  new_path="$input_to_shortpath"
23023
23024  input_path="$input_to_shortpath"
23025  # Check if we need to convert this using DOS-style short mode. If the path
23026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23027  # take no chances and rewrite it.
23028  # Note: m4 eats our [], so we need to use [ and ] instead.
23029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23030  if test "x$has_forbidden_chars" != x; then
23031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23035      # Going to short mode and back again did indeed matter. Since short mode is
23036      # case insensitive, let's make it lowercase to improve readability.
23037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23038      # Now convert it back to Unix-stile (cygpath)
23039      input_path=`$CYGPATH -u "$shortmode_path"`
23040      new_path="$input_path"
23041    fi
23042  fi
23043
23044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23045  if test "x$test_cygdrive_prefix" = x; then
23046    # As a simple fix, exclude /usr/bin since it's not a real path.
23047    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23049      # a path prefixed by /cygdrive for fixpath to work.
23050      new_path="$CYGWIN_ROOT_PATH$input_path"
23051    fi
23052  fi
23053
23054  # remove trailing .exe if any
23055  new_path="${new_path/%.exe/}"
23056
23057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23058
23059  # First separate the path from the arguments. This will split at the first
23060  # space.
23061  complete="$DUMPBIN"
23062  path="${complete%% *}"
23063  tmp="$complete EOL"
23064  arguments="${tmp#* }"
23065
23066  # Input might be given as Windows format, start by converting to
23067  # unix format.
23068  new_path="$path"
23069
23070  windows_path="$new_path"
23071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23072    unix_path=`$CYGPATH -u "$windows_path"`
23073    new_path="$unix_path"
23074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23076    new_path="$unix_path"
23077  fi
23078
23079
23080  # Now try to locate executable using which
23081  new_path=`$WHICH "$new_path" 2> /dev/null`
23082
23083  if test "x$new_path" = x; then
23084    # Oops. Which didn't find the executable.
23085    # The splitting of arguments from the executable at a space might have been incorrect,
23086    # since paths with space are more likely in Windows. Give it another try with the whole
23087    # argument.
23088    path="$complete"
23089    arguments="EOL"
23090    new_path="$path"
23091
23092  windows_path="$new_path"
23093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23094    unix_path=`$CYGPATH -u "$windows_path"`
23095    new_path="$unix_path"
23096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23098    new_path="$unix_path"
23099  fi
23100
23101
23102    new_path=`$WHICH "$new_path" 2> /dev/null`
23103
23104    if test "x$new_path" = x; then
23105      # It's still not found. Now this is an unrecoverable error.
23106      { $as_echo "$as_me:$LINENO: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23107$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23108      has_space=`$ECHO "$complete" | $GREP " "`
23109      if test "x$has_space" != x; then
23110        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23111$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23112      fi
23113      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of DUMPBIN" >&5
23114$as_echo "$as_me: error: Cannot locate the the path of DUMPBIN" >&2;}
23115   { (exit 1); exit 1; }; }
23116    fi
23117  fi
23118
23119  # Now new_path has a complete unix path to the binary
23120  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23121    # Keep paths in /bin as-is, but remove trailing .exe if any
23122    new_path="${new_path/%.exe/}"
23123    # Do not save /bin paths to all_fixpath_prefixes!
23124  else
23125    # Not in mixed or Windows style, start by that.
23126    new_path=`cmd //c echo $new_path`
23127
23128  input_path="$new_path"
23129  # Check if we need to convert this using DOS-style short mode. If the path
23130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23131  # take no chances and rewrite it.
23132  # Note: m4 eats our [], so we need to use [ and ] instead.
23133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23134  if test "x$has_forbidden_chars" != x; then
23135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23136    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23137  fi
23138
23139    # Output is in $new_path
23140
23141  windows_path="$new_path"
23142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23143    unix_path=`$CYGPATH -u "$windows_path"`
23144    new_path="$unix_path"
23145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23147    new_path="$unix_path"
23148  fi
23149
23150    # remove trailing .exe if any
23151    new_path="${new_path/%.exe/}"
23152
23153    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23154    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23155  fi
23156
23157  else
23158    # We're on a posix platform. Hooray! :)
23159    # First separate the path from the arguments. This will split at the first
23160    # space.
23161    complete="$DUMPBIN"
23162    path="${complete%% *}"
23163    tmp="$complete EOL"
23164    arguments="${tmp#* }"
23165
23166    new_path=`$WHICH $path 2> /dev/null`
23167    if test "x$new_path" = x; then
23168      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23169      if test "x$is_absolute_path" != x; then
23170        { $as_echo "$as_me:$LINENO: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&5
23171$as_echo "$as_me: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&6;}
23172        new_path="$path"
23173      else
23174        { $as_echo "$as_me:$LINENO: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23175$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23176        has_space=`$ECHO "$complete" | $GREP " "`
23177        if test "x$has_space" != x; then
23178          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
23179$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23180        fi
23181        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of DUMPBIN" >&5
23182$as_echo "$as_me: error: Cannot locate the the path of DUMPBIN" >&2;}
23183   { (exit 1); exit 1; }; }
23184      fi
23185    fi
23186  fi
23187
23188  # Now join together the path and the arguments once again
23189  if test "x$arguments" != xEOL; then
23190      new_complete="$new_path ${arguments% *}"
23191  else
23192      new_complete="$new_path"
23193  fi
23194
23195  if test "x$complete" != "x$new_complete"; then
23196    DUMPBIN="$new_complete"
23197    { $as_echo "$as_me:$LINENO: Rewriting DUMPBIN to \"$new_complete\"" >&5
23198$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23199  fi
23200
23201
23202    COMPILER_TYPE=CL
23203    CCXXFLAGS="$CCXXFLAGS -nologo"
23204
23205fi
23206
23207
23208
23209
23210ac_ext=c
23211ac_cpp='$CPP $CPPFLAGS'
23212ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23213ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23214ac_compiler_gnu=$ac_cv_c_compiler_gnu
23215{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
23216$as_echo_n "checking how to run the C preprocessor... " >&6; }
23217# On Suns, sometimes $CPP names a directory.
23218if test -n "$CPP" && test -d "$CPP"; then
23219  CPP=
23220fi
23221if test -z "$CPP"; then
23222  if test "${ac_cv_prog_CPP+set}" = set; then
23223  $as_echo_n "(cached) " >&6
23224else
23225      # Double quotes because CPP needs to be expanded
23226    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23227    do
23228      ac_preproc_ok=false
23229for ac_c_preproc_warn_flag in '' yes
23230do
23231  # Use a header file that comes with gcc, so configuring glibc
23232  # with a fresh cross-compiler works.
23233  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23234  # <limits.h> exists even on freestanding compilers.
23235  # On the NeXT, cc -E runs the code through the compiler's parser,
23236  # not just through cpp. "Syntax error" is here to catch this case.
23237  cat >conftest.$ac_ext <<_ACEOF
23238/* confdefs.h.  */
23239_ACEOF
23240cat confdefs.h >>conftest.$ac_ext
23241cat >>conftest.$ac_ext <<_ACEOF
23242/* end confdefs.h.  */
23243#ifdef __STDC__
23244# include <limits.h>
23245#else
23246# include <assert.h>
23247#endif
23248		     Syntax error
23249_ACEOF
23250if { (ac_try="$ac_cpp conftest.$ac_ext"
23251case "(($ac_try" in
23252  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23253  *) ac_try_echo=$ac_try;;
23254esac
23255eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23256$as_echo "$ac_try_echo") >&5
23257  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23258  ac_status=$?
23259  grep -v '^ *+' conftest.er1 >conftest.err
23260  rm -f conftest.er1
23261  cat conftest.err >&5
23262  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23263  (exit $ac_status); } >/dev/null && {
23264	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23265	 test ! -s conftest.err
23266       }; then
23267  :
23268else
23269  $as_echo "$as_me: failed program was:" >&5
23270sed 's/^/| /' conftest.$ac_ext >&5
23271
23272  # Broken: fails on valid input.
23273continue
23274fi
23275
23276rm -f conftest.err conftest.$ac_ext
23277
23278  # OK, works on sane cases.  Now check whether nonexistent headers
23279  # can be detected and how.
23280  cat >conftest.$ac_ext <<_ACEOF
23281/* confdefs.h.  */
23282_ACEOF
23283cat confdefs.h >>conftest.$ac_ext
23284cat >>conftest.$ac_ext <<_ACEOF
23285/* end confdefs.h.  */
23286#include <ac_nonexistent.h>
23287_ACEOF
23288if { (ac_try="$ac_cpp conftest.$ac_ext"
23289case "(($ac_try" in
23290  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23291  *) ac_try_echo=$ac_try;;
23292esac
23293eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23294$as_echo "$ac_try_echo") >&5
23295  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23296  ac_status=$?
23297  grep -v '^ *+' conftest.er1 >conftest.err
23298  rm -f conftest.er1
23299  cat conftest.err >&5
23300  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23301  (exit $ac_status); } >/dev/null && {
23302	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23303	 test ! -s conftest.err
23304       }; then
23305  # Broken: success on invalid input.
23306continue
23307else
23308  $as_echo "$as_me: failed program was:" >&5
23309sed 's/^/| /' conftest.$ac_ext >&5
23310
23311  # Passes both tests.
23312ac_preproc_ok=:
23313break
23314fi
23315
23316rm -f conftest.err conftest.$ac_ext
23317
23318done
23319# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23320rm -f conftest.err conftest.$ac_ext
23321if $ac_preproc_ok; then
23322  break
23323fi
23324
23325    done
23326    ac_cv_prog_CPP=$CPP
23327
23328fi
23329  CPP=$ac_cv_prog_CPP
23330else
23331  ac_cv_prog_CPP=$CPP
23332fi
23333{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
23334$as_echo "$CPP" >&6; }
23335ac_preproc_ok=false
23336for ac_c_preproc_warn_flag in '' yes
23337do
23338  # Use a header file that comes with gcc, so configuring glibc
23339  # with a fresh cross-compiler works.
23340  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23341  # <limits.h> exists even on freestanding compilers.
23342  # On the NeXT, cc -E runs the code through the compiler's parser,
23343  # not just through cpp. "Syntax error" is here to catch this case.
23344  cat >conftest.$ac_ext <<_ACEOF
23345/* confdefs.h.  */
23346_ACEOF
23347cat confdefs.h >>conftest.$ac_ext
23348cat >>conftest.$ac_ext <<_ACEOF
23349/* end confdefs.h.  */
23350#ifdef __STDC__
23351# include <limits.h>
23352#else
23353# include <assert.h>
23354#endif
23355		     Syntax error
23356_ACEOF
23357if { (ac_try="$ac_cpp conftest.$ac_ext"
23358case "(($ac_try" in
23359  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23360  *) ac_try_echo=$ac_try;;
23361esac
23362eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23363$as_echo "$ac_try_echo") >&5
23364  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23365  ac_status=$?
23366  grep -v '^ *+' conftest.er1 >conftest.err
23367  rm -f conftest.er1
23368  cat conftest.err >&5
23369  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23370  (exit $ac_status); } >/dev/null && {
23371	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23372	 test ! -s conftest.err
23373       }; then
23374  :
23375else
23376  $as_echo "$as_me: failed program was:" >&5
23377sed 's/^/| /' conftest.$ac_ext >&5
23378
23379  # Broken: fails on valid input.
23380continue
23381fi
23382
23383rm -f conftest.err conftest.$ac_ext
23384
23385  # OK, works on sane cases.  Now check whether nonexistent headers
23386  # can be detected and how.
23387  cat >conftest.$ac_ext <<_ACEOF
23388/* confdefs.h.  */
23389_ACEOF
23390cat confdefs.h >>conftest.$ac_ext
23391cat >>conftest.$ac_ext <<_ACEOF
23392/* end confdefs.h.  */
23393#include <ac_nonexistent.h>
23394_ACEOF
23395if { (ac_try="$ac_cpp conftest.$ac_ext"
23396case "(($ac_try" in
23397  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23398  *) ac_try_echo=$ac_try;;
23399esac
23400eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23401$as_echo "$ac_try_echo") >&5
23402  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23403  ac_status=$?
23404  grep -v '^ *+' conftest.er1 >conftest.err
23405  rm -f conftest.er1
23406  cat conftest.err >&5
23407  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23408  (exit $ac_status); } >/dev/null && {
23409	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23410	 test ! -s conftest.err
23411       }; then
23412  # Broken: success on invalid input.
23413continue
23414else
23415  $as_echo "$as_me: failed program was:" >&5
23416sed 's/^/| /' conftest.$ac_ext >&5
23417
23418  # Passes both tests.
23419ac_preproc_ok=:
23420break
23421fi
23422
23423rm -f conftest.err conftest.$ac_ext
23424
23425done
23426# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23427rm -f conftest.err conftest.$ac_ext
23428if $ac_preproc_ok; then
23429  :
23430else
23431  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23432$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23433{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
23434See \`config.log' for more details." >&5
23435$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
23436See \`config.log' for more details." >&2;}
23437   { (exit 1); exit 1; }; }; }
23438fi
23439
23440ac_ext=cpp
23441ac_cpp='$CXXCPP $CPPFLAGS'
23442ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23443ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23444ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23445
23446
23447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23448
23449  # First separate the path from the arguments. This will split at the first
23450  # space.
23451  complete="$CPP"
23452  path="${complete%% *}"
23453  tmp="$complete EOL"
23454  arguments="${tmp#* }"
23455
23456  # Input might be given as Windows format, start by converting to
23457  # unix format.
23458  new_path=`$CYGPATH -u "$path"`
23459
23460  # Now try to locate executable using which
23461  new_path=`$WHICH "$new_path" 2> /dev/null`
23462  # bat and cmd files are not always considered executable in cygwin causing which
23463  # to not find them
23464  if test "x$new_path" = x \
23465           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23466           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23467    new_path=`$CYGPATH -u "$path"`
23468  fi
23469  if test "x$new_path" = x; then
23470    # Oops. Which didn't find the executable.
23471    # The splitting of arguments from the executable at a space might have been incorrect,
23472    # since paths with space are more likely in Windows. Give it another try with the whole
23473    # argument.
23474    path="$complete"
23475    arguments="EOL"
23476    new_path=`$CYGPATH -u "$path"`
23477    new_path=`$WHICH "$new_path" 2> /dev/null`
23478    # bat and cmd files are not always considered executable in cygwin causing which
23479    # to not find them
23480    if test "x$new_path" = x \
23481             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23482             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23483      new_path=`$CYGPATH -u "$path"`
23484    fi
23485    if test "x$new_path" = x; then
23486      # It's still not found. Now this is an unrecoverable error.
23487      { $as_echo "$as_me:$LINENO: The path of CPP, which resolves as \"$complete\", is not found." >&5
23488$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23489      has_space=`$ECHO "$complete" | $GREP " "`
23490      if test "x$has_space" != x; then
23491        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23492$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23493      fi
23494      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CPP" >&5
23495$as_echo "$as_me: error: Cannot locate the the path of CPP" >&2;}
23496   { (exit 1); exit 1; }; }
23497    fi
23498  fi
23499
23500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23503  # "foo.exe" is OK but "foo" is an error.
23504  #
23505  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23506  # It is also a way to make sure we got the proper file name for the real test later on.
23507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23508  if test "x$test_shortpath" = x; then
23509    # Short path failed, file does not exist as specified.
23510    # Try adding .exe or .cmd
23511    if test -f "${new_path}.exe"; then
23512       input_to_shortpath="${new_path}.exe"
23513    elif test -f "${new_path}.cmd"; then
23514       input_to_shortpath="${new_path}.cmd"
23515    else
23516      { $as_echo "$as_me:$LINENO: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23517$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23518      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23519$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23520      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CPP" >&5
23521$as_echo "$as_me: error: Cannot locate the the path of CPP" >&2;}
23522   { (exit 1); exit 1; }; }
23523    fi
23524  else
23525    input_to_shortpath="$new_path"
23526  fi
23527
23528  # Call helper function which possibly converts this using DOS-style short mode.
23529  # If so, the updated path is stored in $new_path.
23530  new_path="$input_to_shortpath"
23531
23532  input_path="$input_to_shortpath"
23533  # Check if we need to convert this using DOS-style short mode. If the path
23534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23535  # take no chances and rewrite it.
23536  # Note: m4 eats our [], so we need to use [ and ] instead.
23537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23538  if test "x$has_forbidden_chars" != x; then
23539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23543      # Going to short mode and back again did indeed matter. Since short mode is
23544      # case insensitive, let's make it lowercase to improve readability.
23545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23546      # Now convert it back to Unix-stile (cygpath)
23547      input_path=`$CYGPATH -u "$shortmode_path"`
23548      new_path="$input_path"
23549    fi
23550  fi
23551
23552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23553  if test "x$test_cygdrive_prefix" = x; then
23554    # As a simple fix, exclude /usr/bin since it's not a real path.
23555    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23557      # a path prefixed by /cygdrive for fixpath to work.
23558      new_path="$CYGWIN_ROOT_PATH$input_path"
23559    fi
23560  fi
23561
23562  # remove trailing .exe if any
23563  new_path="${new_path/%.exe/}"
23564
23565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23566
23567  # First separate the path from the arguments. This will split at the first
23568  # space.
23569  complete="$CPP"
23570  path="${complete%% *}"
23571  tmp="$complete EOL"
23572  arguments="${tmp#* }"
23573
23574  # Input might be given as Windows format, start by converting to
23575  # unix format.
23576  new_path="$path"
23577
23578  windows_path="$new_path"
23579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23580    unix_path=`$CYGPATH -u "$windows_path"`
23581    new_path="$unix_path"
23582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23584    new_path="$unix_path"
23585  fi
23586
23587
23588  # Now try to locate executable using which
23589  new_path=`$WHICH "$new_path" 2> /dev/null`
23590
23591  if test "x$new_path" = x; then
23592    # Oops. Which didn't find the executable.
23593    # The splitting of arguments from the executable at a space might have been incorrect,
23594    # since paths with space are more likely in Windows. Give it another try with the whole
23595    # argument.
23596    path="$complete"
23597    arguments="EOL"
23598    new_path="$path"
23599
23600  windows_path="$new_path"
23601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23602    unix_path=`$CYGPATH -u "$windows_path"`
23603    new_path="$unix_path"
23604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23606    new_path="$unix_path"
23607  fi
23608
23609
23610    new_path=`$WHICH "$new_path" 2> /dev/null`
23611
23612    if test "x$new_path" = x; then
23613      # It's still not found. Now this is an unrecoverable error.
23614      { $as_echo "$as_me:$LINENO: The path of CPP, which resolves as \"$complete\", is not found." >&5
23615$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23616      has_space=`$ECHO "$complete" | $GREP " "`
23617      if test "x$has_space" != x; then
23618        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23620      fi
23621      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CPP" >&5
23622$as_echo "$as_me: error: Cannot locate the the path of CPP" >&2;}
23623   { (exit 1); exit 1; }; }
23624    fi
23625  fi
23626
23627  # Now new_path has a complete unix path to the binary
23628  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23629    # Keep paths in /bin as-is, but remove trailing .exe if any
23630    new_path="${new_path/%.exe/}"
23631    # Do not save /bin paths to all_fixpath_prefixes!
23632  else
23633    # Not in mixed or Windows style, start by that.
23634    new_path=`cmd //c echo $new_path`
23635
23636  input_path="$new_path"
23637  # Check if we need to convert this using DOS-style short mode. If the path
23638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23639  # take no chances and rewrite it.
23640  # Note: m4 eats our [], so we need to use [ and ] instead.
23641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23642  if test "x$has_forbidden_chars" != x; then
23643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23644    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23645  fi
23646
23647    # Output is in $new_path
23648
23649  windows_path="$new_path"
23650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23651    unix_path=`$CYGPATH -u "$windows_path"`
23652    new_path="$unix_path"
23653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23655    new_path="$unix_path"
23656  fi
23657
23658    # remove trailing .exe if any
23659    new_path="${new_path/%.exe/}"
23660
23661    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23662    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23663  fi
23664
23665  else
23666    # We're on a posix platform. Hooray! :)
23667    # First separate the path from the arguments. This will split at the first
23668    # space.
23669    complete="$CPP"
23670    path="${complete%% *}"
23671    tmp="$complete EOL"
23672    arguments="${tmp#* }"
23673
23674    new_path=`$WHICH $path 2> /dev/null`
23675    if test "x$new_path" = x; then
23676      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23677      if test "x$is_absolute_path" != x; then
23678        { $as_echo "$as_me:$LINENO: Resolving CPP (as $path) with 'which' failed, using $path directly." >&5
23679$as_echo "$as_me: Resolving CPP (as $path) with 'which' failed, using $path directly." >&6;}
23680        new_path="$path"
23681      else
23682        { $as_echo "$as_me:$LINENO: The path of CPP, which resolves as \"$complete\", is not found." >&5
23683$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23684        has_space=`$ECHO "$complete" | $GREP " "`
23685        if test "x$has_space" != x; then
23686          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
23687$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23688        fi
23689        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CPP" >&5
23690$as_echo "$as_me: error: Cannot locate the the path of CPP" >&2;}
23691   { (exit 1); exit 1; }; }
23692      fi
23693    fi
23694  fi
23695
23696  # Now join together the path and the arguments once again
23697  if test "x$arguments" != xEOL; then
23698      new_complete="$new_path ${arguments% *}"
23699  else
23700      new_complete="$new_path"
23701  fi
23702
23703  if test "x$complete" != "x$new_complete"; then
23704    CPP="$new_complete"
23705    { $as_echo "$as_me:$LINENO: Rewriting CPP to \"$new_complete\"" >&5
23706$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23707  fi
23708
23709
23710ac_ext=cpp
23711ac_cpp='$CXXCPP $CPPFLAGS'
23712ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23713ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23714ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23715{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
23716$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23717if test -z "$CXXCPP"; then
23718  if test "${ac_cv_prog_CXXCPP+set}" = set; then
23719  $as_echo_n "(cached) " >&6
23720else
23721      # Double quotes because CXXCPP needs to be expanded
23722    for CXXCPP in "$CXX -E" "/lib/cpp"
23723    do
23724      ac_preproc_ok=false
23725for ac_cxx_preproc_warn_flag in '' yes
23726do
23727  # Use a header file that comes with gcc, so configuring glibc
23728  # with a fresh cross-compiler works.
23729  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23730  # <limits.h> exists even on freestanding compilers.
23731  # On the NeXT, cc -E runs the code through the compiler's parser,
23732  # not just through cpp. "Syntax error" is here to catch this case.
23733  cat >conftest.$ac_ext <<_ACEOF
23734/* confdefs.h.  */
23735_ACEOF
23736cat confdefs.h >>conftest.$ac_ext
23737cat >>conftest.$ac_ext <<_ACEOF
23738/* end confdefs.h.  */
23739#ifdef __STDC__
23740# include <limits.h>
23741#else
23742# include <assert.h>
23743#endif
23744		     Syntax error
23745_ACEOF
23746if { (ac_try="$ac_cpp conftest.$ac_ext"
23747case "(($ac_try" in
23748  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23749  *) ac_try_echo=$ac_try;;
23750esac
23751eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23752$as_echo "$ac_try_echo") >&5
23753  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23754  ac_status=$?
23755  grep -v '^ *+' conftest.er1 >conftest.err
23756  rm -f conftest.er1
23757  cat conftest.err >&5
23758  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23759  (exit $ac_status); } >/dev/null && {
23760	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
23761	 test ! -s conftest.err
23762       }; then
23763  :
23764else
23765  $as_echo "$as_me: failed program was:" >&5
23766sed 's/^/| /' conftest.$ac_ext >&5
23767
23768  # Broken: fails on valid input.
23769continue
23770fi
23771
23772rm -f conftest.err conftest.$ac_ext
23773
23774  # OK, works on sane cases.  Now check whether nonexistent headers
23775  # can be detected and how.
23776  cat >conftest.$ac_ext <<_ACEOF
23777/* confdefs.h.  */
23778_ACEOF
23779cat confdefs.h >>conftest.$ac_ext
23780cat >>conftest.$ac_ext <<_ACEOF
23781/* end confdefs.h.  */
23782#include <ac_nonexistent.h>
23783_ACEOF
23784if { (ac_try="$ac_cpp conftest.$ac_ext"
23785case "(($ac_try" in
23786  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23787  *) ac_try_echo=$ac_try;;
23788esac
23789eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23790$as_echo "$ac_try_echo") >&5
23791  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23792  ac_status=$?
23793  grep -v '^ *+' conftest.er1 >conftest.err
23794  rm -f conftest.er1
23795  cat conftest.err >&5
23796  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23797  (exit $ac_status); } >/dev/null && {
23798	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
23799	 test ! -s conftest.err
23800       }; then
23801  # Broken: success on invalid input.
23802continue
23803else
23804  $as_echo "$as_me: failed program was:" >&5
23805sed 's/^/| /' conftest.$ac_ext >&5
23806
23807  # Passes both tests.
23808ac_preproc_ok=:
23809break
23810fi
23811
23812rm -f conftest.err conftest.$ac_ext
23813
23814done
23815# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23816rm -f conftest.err conftest.$ac_ext
23817if $ac_preproc_ok; then
23818  break
23819fi
23820
23821    done
23822    ac_cv_prog_CXXCPP=$CXXCPP
23823
23824fi
23825  CXXCPP=$ac_cv_prog_CXXCPP
23826else
23827  ac_cv_prog_CXXCPP=$CXXCPP
23828fi
23829{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5
23830$as_echo "$CXXCPP" >&6; }
23831ac_preproc_ok=false
23832for ac_cxx_preproc_warn_flag in '' yes
23833do
23834  # Use a header file that comes with gcc, so configuring glibc
23835  # with a fresh cross-compiler works.
23836  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23837  # <limits.h> exists even on freestanding compilers.
23838  # On the NeXT, cc -E runs the code through the compiler's parser,
23839  # not just through cpp. "Syntax error" is here to catch this case.
23840  cat >conftest.$ac_ext <<_ACEOF
23841/* confdefs.h.  */
23842_ACEOF
23843cat confdefs.h >>conftest.$ac_ext
23844cat >>conftest.$ac_ext <<_ACEOF
23845/* end confdefs.h.  */
23846#ifdef __STDC__
23847# include <limits.h>
23848#else
23849# include <assert.h>
23850#endif
23851		     Syntax error
23852_ACEOF
23853if { (ac_try="$ac_cpp conftest.$ac_ext"
23854case "(($ac_try" in
23855  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23856  *) ac_try_echo=$ac_try;;
23857esac
23858eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23859$as_echo "$ac_try_echo") >&5
23860  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23861  ac_status=$?
23862  grep -v '^ *+' conftest.er1 >conftest.err
23863  rm -f conftest.er1
23864  cat conftest.err >&5
23865  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23866  (exit $ac_status); } >/dev/null && {
23867	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
23868	 test ! -s conftest.err
23869       }; then
23870  :
23871else
23872  $as_echo "$as_me: failed program was:" >&5
23873sed 's/^/| /' conftest.$ac_ext >&5
23874
23875  # Broken: fails on valid input.
23876continue
23877fi
23878
23879rm -f conftest.err conftest.$ac_ext
23880
23881  # OK, works on sane cases.  Now check whether nonexistent headers
23882  # can be detected and how.
23883  cat >conftest.$ac_ext <<_ACEOF
23884/* confdefs.h.  */
23885_ACEOF
23886cat confdefs.h >>conftest.$ac_ext
23887cat >>conftest.$ac_ext <<_ACEOF
23888/* end confdefs.h.  */
23889#include <ac_nonexistent.h>
23890_ACEOF
23891if { (ac_try="$ac_cpp conftest.$ac_ext"
23892case "(($ac_try" in
23893  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23894  *) ac_try_echo=$ac_try;;
23895esac
23896eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23897$as_echo "$ac_try_echo") >&5
23898  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23899  ac_status=$?
23900  grep -v '^ *+' conftest.er1 >conftest.err
23901  rm -f conftest.er1
23902  cat conftest.err >&5
23903  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23904  (exit $ac_status); } >/dev/null && {
23905	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
23906	 test ! -s conftest.err
23907       }; then
23908  # Broken: success on invalid input.
23909continue
23910else
23911  $as_echo "$as_me: failed program was:" >&5
23912sed 's/^/| /' conftest.$ac_ext >&5
23913
23914  # Passes both tests.
23915ac_preproc_ok=:
23916break
23917fi
23918
23919rm -f conftest.err conftest.$ac_ext
23920
23921done
23922# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23923rm -f conftest.err conftest.$ac_ext
23924if $ac_preproc_ok; then
23925  :
23926else
23927  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23928$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23929{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
23930See \`config.log' for more details." >&5
23931$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
23932See \`config.log' for more details." >&2;}
23933   { (exit 1); exit 1; }; }; }
23934fi
23935
23936ac_ext=cpp
23937ac_cpp='$CXXCPP $CPPFLAGS'
23938ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23939ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23940ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23941
23942
23943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23944
23945  # First separate the path from the arguments. This will split at the first
23946  # space.
23947  complete="$CXXCPP"
23948  path="${complete%% *}"
23949  tmp="$complete EOL"
23950  arguments="${tmp#* }"
23951
23952  # Input might be given as Windows format, start by converting to
23953  # unix format.
23954  new_path=`$CYGPATH -u "$path"`
23955
23956  # Now try to locate executable using which
23957  new_path=`$WHICH "$new_path" 2> /dev/null`
23958  # bat and cmd files are not always considered executable in cygwin causing which
23959  # to not find them
23960  if test "x$new_path" = x \
23961           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23962           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23963    new_path=`$CYGPATH -u "$path"`
23964  fi
23965  if test "x$new_path" = x; then
23966    # Oops. Which didn't find the executable.
23967    # The splitting of arguments from the executable at a space might have been incorrect,
23968    # since paths with space are more likely in Windows. Give it another try with the whole
23969    # argument.
23970    path="$complete"
23971    arguments="EOL"
23972    new_path=`$CYGPATH -u "$path"`
23973    new_path=`$WHICH "$new_path" 2> /dev/null`
23974    # bat and cmd files are not always considered executable in cygwin causing which
23975    # to not find them
23976    if test "x$new_path" = x \
23977             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23978             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23979      new_path=`$CYGPATH -u "$path"`
23980    fi
23981    if test "x$new_path" = x; then
23982      # It's still not found. Now this is an unrecoverable error.
23983      { $as_echo "$as_me:$LINENO: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23984$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23985      has_space=`$ECHO "$complete" | $GREP " "`
23986      if test "x$has_space" != x; then
23987        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23989      fi
23990      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXXCPP" >&5
23991$as_echo "$as_me: error: Cannot locate the the path of CXXCPP" >&2;}
23992   { (exit 1); exit 1; }; }
23993    fi
23994  fi
23995
23996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23999  # "foo.exe" is OK but "foo" is an error.
24000  #
24001  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24002  # It is also a way to make sure we got the proper file name for the real test later on.
24003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24004  if test "x$test_shortpath" = x; then
24005    # Short path failed, file does not exist as specified.
24006    # Try adding .exe or .cmd
24007    if test -f "${new_path}.exe"; then
24008       input_to_shortpath="${new_path}.exe"
24009    elif test -f "${new_path}.cmd"; then
24010       input_to_shortpath="${new_path}.cmd"
24011    else
24012      { $as_echo "$as_me:$LINENO: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24013$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24014      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24015$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24016      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXXCPP" >&5
24017$as_echo "$as_me: error: Cannot locate the the path of CXXCPP" >&2;}
24018   { (exit 1); exit 1; }; }
24019    fi
24020  else
24021    input_to_shortpath="$new_path"
24022  fi
24023
24024  # Call helper function which possibly converts this using DOS-style short mode.
24025  # If so, the updated path is stored in $new_path.
24026  new_path="$input_to_shortpath"
24027
24028  input_path="$input_to_shortpath"
24029  # Check if we need to convert this using DOS-style short mode. If the path
24030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24031  # take no chances and rewrite it.
24032  # Note: m4 eats our [], so we need to use [ and ] instead.
24033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24034  if test "x$has_forbidden_chars" != x; then
24035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24039      # Going to short mode and back again did indeed matter. Since short mode is
24040      # case insensitive, let's make it lowercase to improve readability.
24041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24042      # Now convert it back to Unix-stile (cygpath)
24043      input_path=`$CYGPATH -u "$shortmode_path"`
24044      new_path="$input_path"
24045    fi
24046  fi
24047
24048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24049  if test "x$test_cygdrive_prefix" = x; then
24050    # As a simple fix, exclude /usr/bin since it's not a real path.
24051    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24053      # a path prefixed by /cygdrive for fixpath to work.
24054      new_path="$CYGWIN_ROOT_PATH$input_path"
24055    fi
24056  fi
24057
24058  # remove trailing .exe if any
24059  new_path="${new_path/%.exe/}"
24060
24061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24062
24063  # First separate the path from the arguments. This will split at the first
24064  # space.
24065  complete="$CXXCPP"
24066  path="${complete%% *}"
24067  tmp="$complete EOL"
24068  arguments="${tmp#* }"
24069
24070  # Input might be given as Windows format, start by converting to
24071  # unix format.
24072  new_path="$path"
24073
24074  windows_path="$new_path"
24075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24076    unix_path=`$CYGPATH -u "$windows_path"`
24077    new_path="$unix_path"
24078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24080    new_path="$unix_path"
24081  fi
24082
24083
24084  # Now try to locate executable using which
24085  new_path=`$WHICH "$new_path" 2> /dev/null`
24086
24087  if test "x$new_path" = x; then
24088    # Oops. Which didn't find the executable.
24089    # The splitting of arguments from the executable at a space might have been incorrect,
24090    # since paths with space are more likely in Windows. Give it another try with the whole
24091    # argument.
24092    path="$complete"
24093    arguments="EOL"
24094    new_path="$path"
24095
24096  windows_path="$new_path"
24097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24098    unix_path=`$CYGPATH -u "$windows_path"`
24099    new_path="$unix_path"
24100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24102    new_path="$unix_path"
24103  fi
24104
24105
24106    new_path=`$WHICH "$new_path" 2> /dev/null`
24107
24108    if test "x$new_path" = x; then
24109      # It's still not found. Now this is an unrecoverable error.
24110      { $as_echo "$as_me:$LINENO: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24111$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24112      has_space=`$ECHO "$complete" | $GREP " "`
24113      if test "x$has_space" != x; then
24114        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24115$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24116      fi
24117      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXXCPP" >&5
24118$as_echo "$as_me: error: Cannot locate the the path of CXXCPP" >&2;}
24119   { (exit 1); exit 1; }; }
24120    fi
24121  fi
24122
24123  # Now new_path has a complete unix path to the binary
24124  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24125    # Keep paths in /bin as-is, but remove trailing .exe if any
24126    new_path="${new_path/%.exe/}"
24127    # Do not save /bin paths to all_fixpath_prefixes!
24128  else
24129    # Not in mixed or Windows style, start by that.
24130    new_path=`cmd //c echo $new_path`
24131
24132  input_path="$new_path"
24133  # Check if we need to convert this using DOS-style short mode. If the path
24134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24135  # take no chances and rewrite it.
24136  # Note: m4 eats our [], so we need to use [ and ] instead.
24137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24138  if test "x$has_forbidden_chars" != x; then
24139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24141  fi
24142
24143    # Output is in $new_path
24144
24145  windows_path="$new_path"
24146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24147    unix_path=`$CYGPATH -u "$windows_path"`
24148    new_path="$unix_path"
24149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24151    new_path="$unix_path"
24152  fi
24153
24154    # remove trailing .exe if any
24155    new_path="${new_path/%.exe/}"
24156
24157    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24158    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24159  fi
24160
24161  else
24162    # We're on a posix platform. Hooray! :)
24163    # First separate the path from the arguments. This will split at the first
24164    # space.
24165    complete="$CXXCPP"
24166    path="${complete%% *}"
24167    tmp="$complete EOL"
24168    arguments="${tmp#* }"
24169
24170    new_path=`$WHICH $path 2> /dev/null`
24171    if test "x$new_path" = x; then
24172      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24173      if test "x$is_absolute_path" != x; then
24174        { $as_echo "$as_me:$LINENO: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&5
24175$as_echo "$as_me: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&6;}
24176        new_path="$path"
24177      else
24178        { $as_echo "$as_me:$LINENO: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24179$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24180        has_space=`$ECHO "$complete" | $GREP " "`
24181        if test "x$has_space" != x; then
24182          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
24183$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24184        fi
24185        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXXCPP" >&5
24186$as_echo "$as_me: error: Cannot locate the the path of CXXCPP" >&2;}
24187   { (exit 1); exit 1; }; }
24188      fi
24189    fi
24190  fi
24191
24192  # Now join together the path and the arguments once again
24193  if test "x$arguments" != xEOL; then
24194      new_complete="$new_path ${arguments% *}"
24195  else
24196      new_complete="$new_path"
24197  fi
24198
24199  if test "x$complete" != "x$new_complete"; then
24200    CXXCPP="$new_complete"
24201    { $as_echo "$as_me:$LINENO: Rewriting CXXCPP to \"$new_complete\"" >&5
24202$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24203  fi
24204
24205
24206if test "x$COMPILE_TYPE" != "xcross"; then
24207    # If we are not cross compiling, use the same compilers for
24208    # building the build platform executables. The cross-compilation
24209    # case needed to be done earlier, but this can only be done after
24210    # the native tools have been localized.
24211    BUILD_CC="$CC"
24212    BUILD_CXX="$CXX"
24213    BUILD_LD="$LD"
24214fi
24215
24216# for solaris we really need solaris tools, and not gnu equivalent
24217#   these seems to normally reside in /usr/ccs/bin so add that to path before
24218#   starting to probe
24219#
24220#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24221#         so that it can be overriden --with-tools-dir
24222if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24223    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24224fi
24225
24226# Find the right assembler.
24227if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24228    # Extract the first word of "as", so it can be a program name with args.
24229set dummy as; ac_word=$2
24230{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
24231$as_echo_n "checking for $ac_word... " >&6; }
24232if test "${ac_cv_path_AS+set}" = set; then
24233  $as_echo_n "(cached) " >&6
24234else
24235  case $AS in
24236  [\\/]* | ?:[\\/]*)
24237  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24238  ;;
24239  *)
24240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24241for as_dir in $PATH
24242do
24243  IFS=$as_save_IFS
24244  test -z "$as_dir" && as_dir=.
24245  for ac_exec_ext in '' $ac_executable_extensions; do
24246  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24247    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24248    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24249    break 2
24250  fi
24251done
24252done
24253IFS=$as_save_IFS
24254
24255  ;;
24256esac
24257fi
24258AS=$ac_cv_path_AS
24259if test -n "$AS"; then
24260  { $as_echo "$as_me:$LINENO: result: $AS" >&5
24261$as_echo "$AS" >&6; }
24262else
24263  { $as_echo "$as_me:$LINENO: result: no" >&5
24264$as_echo "no" >&6; }
24265fi
24266
24267
24268
24269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24270
24271  # First separate the path from the arguments. This will split at the first
24272  # space.
24273  complete="$AS"
24274  path="${complete%% *}"
24275  tmp="$complete EOL"
24276  arguments="${tmp#* }"
24277
24278  # Input might be given as Windows format, start by converting to
24279  # unix format.
24280  new_path=`$CYGPATH -u "$path"`
24281
24282  # Now try to locate executable using which
24283  new_path=`$WHICH "$new_path" 2> /dev/null`
24284  # bat and cmd files are not always considered executable in cygwin causing which
24285  # to not find them
24286  if test "x$new_path" = x \
24287           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24288           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24289    new_path=`$CYGPATH -u "$path"`
24290  fi
24291  if test "x$new_path" = x; then
24292    # Oops. Which didn't find the executable.
24293    # The splitting of arguments from the executable at a space might have been incorrect,
24294    # since paths with space are more likely in Windows. Give it another try with the whole
24295    # argument.
24296    path="$complete"
24297    arguments="EOL"
24298    new_path=`$CYGPATH -u "$path"`
24299    new_path=`$WHICH "$new_path" 2> /dev/null`
24300    # bat and cmd files are not always considered executable in cygwin causing which
24301    # to not find them
24302    if test "x$new_path" = x \
24303             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24304             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24305      new_path=`$CYGPATH -u "$path"`
24306    fi
24307    if test "x$new_path" = x; then
24308      # It's still not found. Now this is an unrecoverable error.
24309      { $as_echo "$as_me:$LINENO: The path of AS, which resolves as \"$complete\", is not found." >&5
24310$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24311      has_space=`$ECHO "$complete" | $GREP " "`
24312      if test "x$has_space" != x; then
24313        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24315      fi
24316      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AS" >&5
24317$as_echo "$as_me: error: Cannot locate the the path of AS" >&2;}
24318   { (exit 1); exit 1; }; }
24319    fi
24320  fi
24321
24322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24325  # "foo.exe" is OK but "foo" is an error.
24326  #
24327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24328  # It is also a way to make sure we got the proper file name for the real test later on.
24329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24330  if test "x$test_shortpath" = x; then
24331    # Short path failed, file does not exist as specified.
24332    # Try adding .exe or .cmd
24333    if test -f "${new_path}.exe"; then
24334       input_to_shortpath="${new_path}.exe"
24335    elif test -f "${new_path}.cmd"; then
24336       input_to_shortpath="${new_path}.cmd"
24337    else
24338      { $as_echo "$as_me:$LINENO: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24339$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24340      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24341$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24342      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AS" >&5
24343$as_echo "$as_me: error: Cannot locate the the path of AS" >&2;}
24344   { (exit 1); exit 1; }; }
24345    fi
24346  else
24347    input_to_shortpath="$new_path"
24348  fi
24349
24350  # Call helper function which possibly converts this using DOS-style short mode.
24351  # If so, the updated path is stored in $new_path.
24352  new_path="$input_to_shortpath"
24353
24354  input_path="$input_to_shortpath"
24355  # Check if we need to convert this using DOS-style short mode. If the path
24356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24357  # take no chances and rewrite it.
24358  # Note: m4 eats our [], so we need to use [ and ] instead.
24359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24360  if test "x$has_forbidden_chars" != x; then
24361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24365      # Going to short mode and back again did indeed matter. Since short mode is
24366      # case insensitive, let's make it lowercase to improve readability.
24367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24368      # Now convert it back to Unix-stile (cygpath)
24369      input_path=`$CYGPATH -u "$shortmode_path"`
24370      new_path="$input_path"
24371    fi
24372  fi
24373
24374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24375  if test "x$test_cygdrive_prefix" = x; then
24376    # As a simple fix, exclude /usr/bin since it's not a real path.
24377    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24379      # a path prefixed by /cygdrive for fixpath to work.
24380      new_path="$CYGWIN_ROOT_PATH$input_path"
24381    fi
24382  fi
24383
24384  # remove trailing .exe if any
24385  new_path="${new_path/%.exe/}"
24386
24387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24388
24389  # First separate the path from the arguments. This will split at the first
24390  # space.
24391  complete="$AS"
24392  path="${complete%% *}"
24393  tmp="$complete EOL"
24394  arguments="${tmp#* }"
24395
24396  # Input might be given as Windows format, start by converting to
24397  # unix format.
24398  new_path="$path"
24399
24400  windows_path="$new_path"
24401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24402    unix_path=`$CYGPATH -u "$windows_path"`
24403    new_path="$unix_path"
24404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24406    new_path="$unix_path"
24407  fi
24408
24409
24410  # Now try to locate executable using which
24411  new_path=`$WHICH "$new_path" 2> /dev/null`
24412
24413  if test "x$new_path" = x; then
24414    # Oops. Which didn't find the executable.
24415    # The splitting of arguments from the executable at a space might have been incorrect,
24416    # since paths with space are more likely in Windows. Give it another try with the whole
24417    # argument.
24418    path="$complete"
24419    arguments="EOL"
24420    new_path="$path"
24421
24422  windows_path="$new_path"
24423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24424    unix_path=`$CYGPATH -u "$windows_path"`
24425    new_path="$unix_path"
24426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24428    new_path="$unix_path"
24429  fi
24430
24431
24432    new_path=`$WHICH "$new_path" 2> /dev/null`
24433
24434    if test "x$new_path" = x; then
24435      # It's still not found. Now this is an unrecoverable error.
24436      { $as_echo "$as_me:$LINENO: The path of AS, which resolves as \"$complete\", is not found." >&5
24437$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24438      has_space=`$ECHO "$complete" | $GREP " "`
24439      if test "x$has_space" != x; then
24440        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24441$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24442      fi
24443      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AS" >&5
24444$as_echo "$as_me: error: Cannot locate the the path of AS" >&2;}
24445   { (exit 1); exit 1; }; }
24446    fi
24447  fi
24448
24449  # Now new_path has a complete unix path to the binary
24450  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24451    # Keep paths in /bin as-is, but remove trailing .exe if any
24452    new_path="${new_path/%.exe/}"
24453    # Do not save /bin paths to all_fixpath_prefixes!
24454  else
24455    # Not in mixed or Windows style, start by that.
24456    new_path=`cmd //c echo $new_path`
24457
24458  input_path="$new_path"
24459  # Check if we need to convert this using DOS-style short mode. If the path
24460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24461  # take no chances and rewrite it.
24462  # Note: m4 eats our [], so we need to use [ and ] instead.
24463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24464  if test "x$has_forbidden_chars" != x; then
24465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24467  fi
24468
24469    # Output is in $new_path
24470
24471  windows_path="$new_path"
24472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24473    unix_path=`$CYGPATH -u "$windows_path"`
24474    new_path="$unix_path"
24475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24477    new_path="$unix_path"
24478  fi
24479
24480    # remove trailing .exe if any
24481    new_path="${new_path/%.exe/}"
24482
24483    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24484    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24485  fi
24486
24487  else
24488    # We're on a posix platform. Hooray! :)
24489    # First separate the path from the arguments. This will split at the first
24490    # space.
24491    complete="$AS"
24492    path="${complete%% *}"
24493    tmp="$complete EOL"
24494    arguments="${tmp#* }"
24495
24496    new_path=`$WHICH $path 2> /dev/null`
24497    if test "x$new_path" = x; then
24498      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24499      if test "x$is_absolute_path" != x; then
24500        { $as_echo "$as_me:$LINENO: Resolving AS (as $path) with 'which' failed, using $path directly." >&5
24501$as_echo "$as_me: Resolving AS (as $path) with 'which' failed, using $path directly." >&6;}
24502        new_path="$path"
24503      else
24504        { $as_echo "$as_me:$LINENO: The path of AS, which resolves as \"$complete\", is not found." >&5
24505$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24506        has_space=`$ECHO "$complete" | $GREP " "`
24507        if test "x$has_space" != x; then
24508          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
24509$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24510        fi
24511        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AS" >&5
24512$as_echo "$as_me: error: Cannot locate the the path of AS" >&2;}
24513   { (exit 1); exit 1; }; }
24514      fi
24515    fi
24516  fi
24517
24518  # Now join together the path and the arguments once again
24519  if test "x$arguments" != xEOL; then
24520      new_complete="$new_path ${arguments% *}"
24521  else
24522      new_complete="$new_path"
24523  fi
24524
24525  if test "x$complete" != "x$new_complete"; then
24526    AS="$new_complete"
24527    { $as_echo "$as_me:$LINENO: Rewriting AS to \"$new_complete\"" >&5
24528$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24529  fi
24530
24531else
24532    AS="$CC -c"
24533fi
24534
24535
24536if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24537    for ac_prog in gnm nm
24538do
24539  # Extract the first word of "$ac_prog", so it can be a program name with args.
24540set dummy $ac_prog; ac_word=$2
24541{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
24542$as_echo_n "checking for $ac_word... " >&6; }
24543if test "${ac_cv_path_NM+set}" = set; then
24544  $as_echo_n "(cached) " >&6
24545else
24546  case $NM in
24547  [\\/]* | ?:[\\/]*)
24548  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24549  ;;
24550  *)
24551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24552for as_dir in $PATH
24553do
24554  IFS=$as_save_IFS
24555  test -z "$as_dir" && as_dir=.
24556  for ac_exec_ext in '' $ac_executable_extensions; do
24557  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24558    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24559    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24560    break 2
24561  fi
24562done
24563done
24564IFS=$as_save_IFS
24565
24566  ;;
24567esac
24568fi
24569NM=$ac_cv_path_NM
24570if test -n "$NM"; then
24571  { $as_echo "$as_me:$LINENO: result: $NM" >&5
24572$as_echo "$NM" >&6; }
24573else
24574  { $as_echo "$as_me:$LINENO: result: no" >&5
24575$as_echo "no" >&6; }
24576fi
24577
24578
24579  test -n "$NM" && break
24580done
24581
24582
24583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24584
24585  # First separate the path from the arguments. This will split at the first
24586  # space.
24587  complete="$NM"
24588  path="${complete%% *}"
24589  tmp="$complete EOL"
24590  arguments="${tmp#* }"
24591
24592  # Input might be given as Windows format, start by converting to
24593  # unix format.
24594  new_path=`$CYGPATH -u "$path"`
24595
24596  # Now try to locate executable using which
24597  new_path=`$WHICH "$new_path" 2> /dev/null`
24598  # bat and cmd files are not always considered executable in cygwin causing which
24599  # to not find them
24600  if test "x$new_path" = x \
24601           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24602           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24603    new_path=`$CYGPATH -u "$path"`
24604  fi
24605  if test "x$new_path" = x; then
24606    # Oops. Which didn't find the executable.
24607    # The splitting of arguments from the executable at a space might have been incorrect,
24608    # since paths with space are more likely in Windows. Give it another try with the whole
24609    # argument.
24610    path="$complete"
24611    arguments="EOL"
24612    new_path=`$CYGPATH -u "$path"`
24613    new_path=`$WHICH "$new_path" 2> /dev/null`
24614    # bat and cmd files are not always considered executable in cygwin causing which
24615    # to not find them
24616    if test "x$new_path" = x \
24617             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24618             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24619      new_path=`$CYGPATH -u "$path"`
24620    fi
24621    if test "x$new_path" = x; then
24622      # It's still not found. Now this is an unrecoverable error.
24623      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
24624$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24625      has_space=`$ECHO "$complete" | $GREP " "`
24626      if test "x$has_space" != x; then
24627        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24628$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24629      fi
24630      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
24631$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
24632   { (exit 1); exit 1; }; }
24633    fi
24634  fi
24635
24636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24639  # "foo.exe" is OK but "foo" is an error.
24640  #
24641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24642  # It is also a way to make sure we got the proper file name for the real test later on.
24643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24644  if test "x$test_shortpath" = x; then
24645    # Short path failed, file does not exist as specified.
24646    # Try adding .exe or .cmd
24647    if test -f "${new_path}.exe"; then
24648       input_to_shortpath="${new_path}.exe"
24649    elif test -f "${new_path}.cmd"; then
24650       input_to_shortpath="${new_path}.cmd"
24651    else
24652      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24653$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24654      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24655$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24656      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
24657$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
24658   { (exit 1); exit 1; }; }
24659    fi
24660  else
24661    input_to_shortpath="$new_path"
24662  fi
24663
24664  # Call helper function which possibly converts this using DOS-style short mode.
24665  # If so, the updated path is stored in $new_path.
24666  new_path="$input_to_shortpath"
24667
24668  input_path="$input_to_shortpath"
24669  # Check if we need to convert this using DOS-style short mode. If the path
24670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24671  # take no chances and rewrite it.
24672  # Note: m4 eats our [], so we need to use [ and ] instead.
24673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24674  if test "x$has_forbidden_chars" != x; then
24675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24679      # Going to short mode and back again did indeed matter. Since short mode is
24680      # case insensitive, let's make it lowercase to improve readability.
24681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24682      # Now convert it back to Unix-stile (cygpath)
24683      input_path=`$CYGPATH -u "$shortmode_path"`
24684      new_path="$input_path"
24685    fi
24686  fi
24687
24688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24689  if test "x$test_cygdrive_prefix" = x; then
24690    # As a simple fix, exclude /usr/bin since it's not a real path.
24691    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24693      # a path prefixed by /cygdrive for fixpath to work.
24694      new_path="$CYGWIN_ROOT_PATH$input_path"
24695    fi
24696  fi
24697
24698  # remove trailing .exe if any
24699  new_path="${new_path/%.exe/}"
24700
24701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24702
24703  # First separate the path from the arguments. This will split at the first
24704  # space.
24705  complete="$NM"
24706  path="${complete%% *}"
24707  tmp="$complete EOL"
24708  arguments="${tmp#* }"
24709
24710  # Input might be given as Windows format, start by converting to
24711  # unix format.
24712  new_path="$path"
24713
24714  windows_path="$new_path"
24715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24716    unix_path=`$CYGPATH -u "$windows_path"`
24717    new_path="$unix_path"
24718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24720    new_path="$unix_path"
24721  fi
24722
24723
24724  # Now try to locate executable using which
24725  new_path=`$WHICH "$new_path" 2> /dev/null`
24726
24727  if test "x$new_path" = x; then
24728    # Oops. Which didn't find the executable.
24729    # The splitting of arguments from the executable at a space might have been incorrect,
24730    # since paths with space are more likely in Windows. Give it another try with the whole
24731    # argument.
24732    path="$complete"
24733    arguments="EOL"
24734    new_path="$path"
24735
24736  windows_path="$new_path"
24737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24738    unix_path=`$CYGPATH -u "$windows_path"`
24739    new_path="$unix_path"
24740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24742    new_path="$unix_path"
24743  fi
24744
24745
24746    new_path=`$WHICH "$new_path" 2> /dev/null`
24747
24748    if test "x$new_path" = x; then
24749      # It's still not found. Now this is an unrecoverable error.
24750      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
24751$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24752      has_space=`$ECHO "$complete" | $GREP " "`
24753      if test "x$has_space" != x; then
24754        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24756      fi
24757      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
24758$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
24759   { (exit 1); exit 1; }; }
24760    fi
24761  fi
24762
24763  # Now new_path has a complete unix path to the binary
24764  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24765    # Keep paths in /bin as-is, but remove trailing .exe if any
24766    new_path="${new_path/%.exe/}"
24767    # Do not save /bin paths to all_fixpath_prefixes!
24768  else
24769    # Not in mixed or Windows style, start by that.
24770    new_path=`cmd //c echo $new_path`
24771
24772  input_path="$new_path"
24773  # Check if we need to convert this using DOS-style short mode. If the path
24774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24775  # take no chances and rewrite it.
24776  # Note: m4 eats our [], so we need to use [ and ] instead.
24777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24778  if test "x$has_forbidden_chars" != x; then
24779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24781  fi
24782
24783    # Output is in $new_path
24784
24785  windows_path="$new_path"
24786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24787    unix_path=`$CYGPATH -u "$windows_path"`
24788    new_path="$unix_path"
24789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24791    new_path="$unix_path"
24792  fi
24793
24794    # remove trailing .exe if any
24795    new_path="${new_path/%.exe/}"
24796
24797    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24798    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24799  fi
24800
24801  else
24802    # We're on a posix platform. Hooray! :)
24803    # First separate the path from the arguments. This will split at the first
24804    # space.
24805    complete="$NM"
24806    path="${complete%% *}"
24807    tmp="$complete EOL"
24808    arguments="${tmp#* }"
24809
24810    new_path=`$WHICH $path 2> /dev/null`
24811    if test "x$new_path" = x; then
24812      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24813      if test "x$is_absolute_path" != x; then
24814        { $as_echo "$as_me:$LINENO: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
24815$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
24816        new_path="$path"
24817      else
24818        { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
24819$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24820        has_space=`$ECHO "$complete" | $GREP " "`
24821        if test "x$has_space" != x; then
24822          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
24823$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24824        fi
24825        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
24826$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
24827   { (exit 1); exit 1; }; }
24828      fi
24829    fi
24830  fi
24831
24832  # Now join together the path and the arguments once again
24833  if test "x$arguments" != xEOL; then
24834      new_complete="$new_path ${arguments% *}"
24835  else
24836      new_complete="$new_path"
24837  fi
24838
24839  if test "x$complete" != "x$new_complete"; then
24840    NM="$new_complete"
24841    { $as_echo "$as_me:$LINENO: Rewriting NM to \"$new_complete\"" >&5
24842$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24843  fi
24844
24845    # Extract the first word of "strip", so it can be a program name with args.
24846set dummy strip; ac_word=$2
24847{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
24848$as_echo_n "checking for $ac_word... " >&6; }
24849if test "${ac_cv_path_STRIP+set}" = set; then
24850  $as_echo_n "(cached) " >&6
24851else
24852  case $STRIP in
24853  [\\/]* | ?:[\\/]*)
24854  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24855  ;;
24856  *)
24857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24858for as_dir in $PATH
24859do
24860  IFS=$as_save_IFS
24861  test -z "$as_dir" && as_dir=.
24862  for ac_exec_ext in '' $ac_executable_extensions; do
24863  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24864    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24865    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24866    break 2
24867  fi
24868done
24869done
24870IFS=$as_save_IFS
24871
24872  ;;
24873esac
24874fi
24875STRIP=$ac_cv_path_STRIP
24876if test -n "$STRIP"; then
24877  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
24878$as_echo "$STRIP" >&6; }
24879else
24880  { $as_echo "$as_me:$LINENO: result: no" >&5
24881$as_echo "no" >&6; }
24882fi
24883
24884
24885
24886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24887
24888  # First separate the path from the arguments. This will split at the first
24889  # space.
24890  complete="$STRIP"
24891  path="${complete%% *}"
24892  tmp="$complete EOL"
24893  arguments="${tmp#* }"
24894
24895  # Input might be given as Windows format, start by converting to
24896  # unix format.
24897  new_path=`$CYGPATH -u "$path"`
24898
24899  # Now try to locate executable using which
24900  new_path=`$WHICH "$new_path" 2> /dev/null`
24901  # bat and cmd files are not always considered executable in cygwin causing which
24902  # to not find them
24903  if test "x$new_path" = x \
24904           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24905           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24906    new_path=`$CYGPATH -u "$path"`
24907  fi
24908  if test "x$new_path" = x; then
24909    # Oops. Which didn't find the executable.
24910    # The splitting of arguments from the executable at a space might have been incorrect,
24911    # since paths with space are more likely in Windows. Give it another try with the whole
24912    # argument.
24913    path="$complete"
24914    arguments="EOL"
24915    new_path=`$CYGPATH -u "$path"`
24916    new_path=`$WHICH "$new_path" 2> /dev/null`
24917    # bat and cmd files are not always considered executable in cygwin causing which
24918    # to not find them
24919    if test "x$new_path" = x \
24920             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24921             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24922      new_path=`$CYGPATH -u "$path"`
24923    fi
24924    if test "x$new_path" = x; then
24925      # It's still not found. Now this is an unrecoverable error.
24926      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24927$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24928      has_space=`$ECHO "$complete" | $GREP " "`
24929      if test "x$has_space" != x; then
24930        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24932      fi
24933      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
24934$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
24935   { (exit 1); exit 1; }; }
24936    fi
24937  fi
24938
24939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24942  # "foo.exe" is OK but "foo" is an error.
24943  #
24944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24945  # It is also a way to make sure we got the proper file name for the real test later on.
24946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24947  if test "x$test_shortpath" = x; then
24948    # Short path failed, file does not exist as specified.
24949    # Try adding .exe or .cmd
24950    if test -f "${new_path}.exe"; then
24951       input_to_shortpath="${new_path}.exe"
24952    elif test -f "${new_path}.cmd"; then
24953       input_to_shortpath="${new_path}.cmd"
24954    else
24955      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
24956$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
24957      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24958$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24959      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
24960$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
24961   { (exit 1); exit 1; }; }
24962    fi
24963  else
24964    input_to_shortpath="$new_path"
24965  fi
24966
24967  # Call helper function which possibly converts this using DOS-style short mode.
24968  # If so, the updated path is stored in $new_path.
24969  new_path="$input_to_shortpath"
24970
24971  input_path="$input_to_shortpath"
24972  # Check if we need to convert this using DOS-style short mode. If the path
24973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24974  # take no chances and rewrite it.
24975  # Note: m4 eats our [], so we need to use [ and ] instead.
24976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24977  if test "x$has_forbidden_chars" != x; then
24978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24982      # Going to short mode and back again did indeed matter. Since short mode is
24983      # case insensitive, let's make it lowercase to improve readability.
24984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24985      # Now convert it back to Unix-stile (cygpath)
24986      input_path=`$CYGPATH -u "$shortmode_path"`
24987      new_path="$input_path"
24988    fi
24989  fi
24990
24991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24992  if test "x$test_cygdrive_prefix" = x; then
24993    # As a simple fix, exclude /usr/bin since it's not a real path.
24994    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24996      # a path prefixed by /cygdrive for fixpath to work.
24997      new_path="$CYGWIN_ROOT_PATH$input_path"
24998    fi
24999  fi
25000
25001  # remove trailing .exe if any
25002  new_path="${new_path/%.exe/}"
25003
25004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25005
25006  # First separate the path from the arguments. This will split at the first
25007  # space.
25008  complete="$STRIP"
25009  path="${complete%% *}"
25010  tmp="$complete EOL"
25011  arguments="${tmp#* }"
25012
25013  # Input might be given as Windows format, start by converting to
25014  # unix format.
25015  new_path="$path"
25016
25017  windows_path="$new_path"
25018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25019    unix_path=`$CYGPATH -u "$windows_path"`
25020    new_path="$unix_path"
25021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25023    new_path="$unix_path"
25024  fi
25025
25026
25027  # Now try to locate executable using which
25028  new_path=`$WHICH "$new_path" 2> /dev/null`
25029
25030  if test "x$new_path" = x; then
25031    # Oops. Which didn't find the executable.
25032    # The splitting of arguments from the executable at a space might have been incorrect,
25033    # since paths with space are more likely in Windows. Give it another try with the whole
25034    # argument.
25035    path="$complete"
25036    arguments="EOL"
25037    new_path="$path"
25038
25039  windows_path="$new_path"
25040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25041    unix_path=`$CYGPATH -u "$windows_path"`
25042    new_path="$unix_path"
25043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25045    new_path="$unix_path"
25046  fi
25047
25048
25049    new_path=`$WHICH "$new_path" 2> /dev/null`
25050
25051    if test "x$new_path" = x; then
25052      # It's still not found. Now this is an unrecoverable error.
25053      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25054$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25055      has_space=`$ECHO "$complete" | $GREP " "`
25056      if test "x$has_space" != x; then
25057        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25058$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25059      fi
25060      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
25061$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
25062   { (exit 1); exit 1; }; }
25063    fi
25064  fi
25065
25066  # Now new_path has a complete unix path to the binary
25067  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25068    # Keep paths in /bin as-is, but remove trailing .exe if any
25069    new_path="${new_path/%.exe/}"
25070    # Do not save /bin paths to all_fixpath_prefixes!
25071  else
25072    # Not in mixed or Windows style, start by that.
25073    new_path=`cmd //c echo $new_path`
25074
25075  input_path="$new_path"
25076  # Check if we need to convert this using DOS-style short mode. If the path
25077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25078  # take no chances and rewrite it.
25079  # Note: m4 eats our [], so we need to use [ and ] instead.
25080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25081  if test "x$has_forbidden_chars" != x; then
25082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25084  fi
25085
25086    # Output is in $new_path
25087
25088  windows_path="$new_path"
25089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25090    unix_path=`$CYGPATH -u "$windows_path"`
25091    new_path="$unix_path"
25092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25094    new_path="$unix_path"
25095  fi
25096
25097    # remove trailing .exe if any
25098    new_path="${new_path/%.exe/}"
25099
25100    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25101    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25102  fi
25103
25104  else
25105    # We're on a posix platform. Hooray! :)
25106    # First separate the path from the arguments. This will split at the first
25107    # space.
25108    complete="$STRIP"
25109    path="${complete%% *}"
25110    tmp="$complete EOL"
25111    arguments="${tmp#* }"
25112
25113    new_path=`$WHICH $path 2> /dev/null`
25114    if test "x$new_path" = x; then
25115      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25116      if test "x$is_absolute_path" != x; then
25117        { $as_echo "$as_me:$LINENO: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
25118$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
25119        new_path="$path"
25120      else
25121        { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25122$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25123        has_space=`$ECHO "$complete" | $GREP " "`
25124        if test "x$has_space" != x; then
25125          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
25126$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25127        fi
25128        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
25129$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
25130   { (exit 1); exit 1; }; }
25131      fi
25132    fi
25133  fi
25134
25135  # Now join together the path and the arguments once again
25136  if test "x$arguments" != xEOL; then
25137      new_complete="$new_path ${arguments% *}"
25138  else
25139      new_complete="$new_path"
25140  fi
25141
25142  if test "x$complete" != "x$new_complete"; then
25143    STRIP="$new_complete"
25144    { $as_echo "$as_me:$LINENO: Rewriting STRIP to \"$new_complete\"" >&5
25145$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25146  fi
25147
25148    # Extract the first word of "mcs", so it can be a program name with args.
25149set dummy mcs; ac_word=$2
25150{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
25151$as_echo_n "checking for $ac_word... " >&6; }
25152if test "${ac_cv_path_MCS+set}" = set; then
25153  $as_echo_n "(cached) " >&6
25154else
25155  case $MCS in
25156  [\\/]* | ?:[\\/]*)
25157  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25158  ;;
25159  *)
25160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25161for as_dir in $PATH
25162do
25163  IFS=$as_save_IFS
25164  test -z "$as_dir" && as_dir=.
25165  for ac_exec_ext in '' $ac_executable_extensions; do
25166  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25167    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25168    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25169    break 2
25170  fi
25171done
25172done
25173IFS=$as_save_IFS
25174
25175  ;;
25176esac
25177fi
25178MCS=$ac_cv_path_MCS
25179if test -n "$MCS"; then
25180  { $as_echo "$as_me:$LINENO: result: $MCS" >&5
25181$as_echo "$MCS" >&6; }
25182else
25183  { $as_echo "$as_me:$LINENO: result: no" >&5
25184$as_echo "no" >&6; }
25185fi
25186
25187
25188
25189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25190
25191  # First separate the path from the arguments. This will split at the first
25192  # space.
25193  complete="$MCS"
25194  path="${complete%% *}"
25195  tmp="$complete EOL"
25196  arguments="${tmp#* }"
25197
25198  # Input might be given as Windows format, start by converting to
25199  # unix format.
25200  new_path=`$CYGPATH -u "$path"`
25201
25202  # Now try to locate executable using which
25203  new_path=`$WHICH "$new_path" 2> /dev/null`
25204  # bat and cmd files are not always considered executable in cygwin causing which
25205  # to not find them
25206  if test "x$new_path" = x \
25207           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25208           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25209    new_path=`$CYGPATH -u "$path"`
25210  fi
25211  if test "x$new_path" = x; then
25212    # Oops. Which didn't find the executable.
25213    # The splitting of arguments from the executable at a space might have been incorrect,
25214    # since paths with space are more likely in Windows. Give it another try with the whole
25215    # argument.
25216    path="$complete"
25217    arguments="EOL"
25218    new_path=`$CYGPATH -u "$path"`
25219    new_path=`$WHICH "$new_path" 2> /dev/null`
25220    # bat and cmd files are not always considered executable in cygwin causing which
25221    # to not find them
25222    if test "x$new_path" = x \
25223             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25224             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25225      new_path=`$CYGPATH -u "$path"`
25226    fi
25227    if test "x$new_path" = x; then
25228      # It's still not found. Now this is an unrecoverable error.
25229      { $as_echo "$as_me:$LINENO: The path of MCS, which resolves as \"$complete\", is not found." >&5
25230$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25231      has_space=`$ECHO "$complete" | $GREP " "`
25232      if test "x$has_space" != x; then
25233        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25235      fi
25236      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MCS" >&5
25237$as_echo "$as_me: error: Cannot locate the the path of MCS" >&2;}
25238   { (exit 1); exit 1; }; }
25239    fi
25240  fi
25241
25242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25245  # "foo.exe" is OK but "foo" is an error.
25246  #
25247  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25248  # It is also a way to make sure we got the proper file name for the real test later on.
25249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25250  if test "x$test_shortpath" = x; then
25251    # Short path failed, file does not exist as specified.
25252    # Try adding .exe or .cmd
25253    if test -f "${new_path}.exe"; then
25254       input_to_shortpath="${new_path}.exe"
25255    elif test -f "${new_path}.cmd"; then
25256       input_to_shortpath="${new_path}.cmd"
25257    else
25258      { $as_echo "$as_me:$LINENO: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25259$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25260      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25261$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25262      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MCS" >&5
25263$as_echo "$as_me: error: Cannot locate the the path of MCS" >&2;}
25264   { (exit 1); exit 1; }; }
25265    fi
25266  else
25267    input_to_shortpath="$new_path"
25268  fi
25269
25270  # Call helper function which possibly converts this using DOS-style short mode.
25271  # If so, the updated path is stored in $new_path.
25272  new_path="$input_to_shortpath"
25273
25274  input_path="$input_to_shortpath"
25275  # Check if we need to convert this using DOS-style short mode. If the path
25276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25277  # take no chances and rewrite it.
25278  # Note: m4 eats our [], so we need to use [ and ] instead.
25279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25280  if test "x$has_forbidden_chars" != x; then
25281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25285      # Going to short mode and back again did indeed matter. Since short mode is
25286      # case insensitive, let's make it lowercase to improve readability.
25287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25288      # Now convert it back to Unix-stile (cygpath)
25289      input_path=`$CYGPATH -u "$shortmode_path"`
25290      new_path="$input_path"
25291    fi
25292  fi
25293
25294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25295  if test "x$test_cygdrive_prefix" = x; then
25296    # As a simple fix, exclude /usr/bin since it's not a real path.
25297    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25299      # a path prefixed by /cygdrive for fixpath to work.
25300      new_path="$CYGWIN_ROOT_PATH$input_path"
25301    fi
25302  fi
25303
25304  # remove trailing .exe if any
25305  new_path="${new_path/%.exe/}"
25306
25307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25308
25309  # First separate the path from the arguments. This will split at the first
25310  # space.
25311  complete="$MCS"
25312  path="${complete%% *}"
25313  tmp="$complete EOL"
25314  arguments="${tmp#* }"
25315
25316  # Input might be given as Windows format, start by converting to
25317  # unix format.
25318  new_path="$path"
25319
25320  windows_path="$new_path"
25321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25322    unix_path=`$CYGPATH -u "$windows_path"`
25323    new_path="$unix_path"
25324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25326    new_path="$unix_path"
25327  fi
25328
25329
25330  # Now try to locate executable using which
25331  new_path=`$WHICH "$new_path" 2> /dev/null`
25332
25333  if test "x$new_path" = x; then
25334    # Oops. Which didn't find the executable.
25335    # The splitting of arguments from the executable at a space might have been incorrect,
25336    # since paths with space are more likely in Windows. Give it another try with the whole
25337    # argument.
25338    path="$complete"
25339    arguments="EOL"
25340    new_path="$path"
25341
25342  windows_path="$new_path"
25343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25344    unix_path=`$CYGPATH -u "$windows_path"`
25345    new_path="$unix_path"
25346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25348    new_path="$unix_path"
25349  fi
25350
25351
25352    new_path=`$WHICH "$new_path" 2> /dev/null`
25353
25354    if test "x$new_path" = x; then
25355      # It's still not found. Now this is an unrecoverable error.
25356      { $as_echo "$as_me:$LINENO: The path of MCS, which resolves as \"$complete\", is not found." >&5
25357$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25358      has_space=`$ECHO "$complete" | $GREP " "`
25359      if test "x$has_space" != x; then
25360        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25362      fi
25363      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MCS" >&5
25364$as_echo "$as_me: error: Cannot locate the the path of MCS" >&2;}
25365   { (exit 1); exit 1; }; }
25366    fi
25367  fi
25368
25369  # Now new_path has a complete unix path to the binary
25370  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25371    # Keep paths in /bin as-is, but remove trailing .exe if any
25372    new_path="${new_path/%.exe/}"
25373    # Do not save /bin paths to all_fixpath_prefixes!
25374  else
25375    # Not in mixed or Windows style, start by that.
25376    new_path=`cmd //c echo $new_path`
25377
25378  input_path="$new_path"
25379  # Check if we need to convert this using DOS-style short mode. If the path
25380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25381  # take no chances and rewrite it.
25382  # Note: m4 eats our [], so we need to use [ and ] instead.
25383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25384  if test "x$has_forbidden_chars" != x; then
25385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25387  fi
25388
25389    # Output is in $new_path
25390
25391  windows_path="$new_path"
25392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25393    unix_path=`$CYGPATH -u "$windows_path"`
25394    new_path="$unix_path"
25395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25397    new_path="$unix_path"
25398  fi
25399
25400    # remove trailing .exe if any
25401    new_path="${new_path/%.exe/}"
25402
25403    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25404    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25405  fi
25406
25407  else
25408    # We're on a posix platform. Hooray! :)
25409    # First separate the path from the arguments. This will split at the first
25410    # space.
25411    complete="$MCS"
25412    path="${complete%% *}"
25413    tmp="$complete EOL"
25414    arguments="${tmp#* }"
25415
25416    new_path=`$WHICH $path 2> /dev/null`
25417    if test "x$new_path" = x; then
25418      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25419      if test "x$is_absolute_path" != x; then
25420        { $as_echo "$as_me:$LINENO: Resolving MCS (as $path) with 'which' failed, using $path directly." >&5
25421$as_echo "$as_me: Resolving MCS (as $path) with 'which' failed, using $path directly." >&6;}
25422        new_path="$path"
25423      else
25424        { $as_echo "$as_me:$LINENO: The path of MCS, which resolves as \"$complete\", is not found." >&5
25425$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25426        has_space=`$ECHO "$complete" | $GREP " "`
25427        if test "x$has_space" != x; then
25428          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
25429$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25430        fi
25431        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MCS" >&5
25432$as_echo "$as_me: error: Cannot locate the the path of MCS" >&2;}
25433   { (exit 1); exit 1; }; }
25434      fi
25435    fi
25436  fi
25437
25438  # Now join together the path and the arguments once again
25439  if test "x$arguments" != xEOL; then
25440      new_complete="$new_path ${arguments% *}"
25441  else
25442      new_complete="$new_path"
25443  fi
25444
25445  if test "x$complete" != "x$new_complete"; then
25446    MCS="$new_complete"
25447    { $as_echo "$as_me:$LINENO: Rewriting MCS to \"$new_complete\"" >&5
25448$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25449  fi
25450
25451elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25452    if test -n "$ac_tool_prefix"; then
25453  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25454set dummy ${ac_tool_prefix}nm; ac_word=$2
25455{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
25456$as_echo_n "checking for $ac_word... " >&6; }
25457if test "${ac_cv_prog_NM+set}" = set; then
25458  $as_echo_n "(cached) " >&6
25459else
25460  if test -n "$NM"; then
25461  ac_cv_prog_NM="$NM" # Let the user override the test.
25462else
25463as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25464for as_dir in $PATH
25465do
25466  IFS=$as_save_IFS
25467  test -z "$as_dir" && as_dir=.
25468  for ac_exec_ext in '' $ac_executable_extensions; do
25469  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25470    ac_cv_prog_NM="${ac_tool_prefix}nm"
25471    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25472    break 2
25473  fi
25474done
25475done
25476IFS=$as_save_IFS
25477
25478fi
25479fi
25480NM=$ac_cv_prog_NM
25481if test -n "$NM"; then
25482  { $as_echo "$as_me:$LINENO: result: $NM" >&5
25483$as_echo "$NM" >&6; }
25484else
25485  { $as_echo "$as_me:$LINENO: result: no" >&5
25486$as_echo "no" >&6; }
25487fi
25488
25489
25490fi
25491if test -z "$ac_cv_prog_NM"; then
25492  ac_ct_NM=$NM
25493  # Extract the first word of "nm", so it can be a program name with args.
25494set dummy nm; ac_word=$2
25495{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
25496$as_echo_n "checking for $ac_word... " >&6; }
25497if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
25498  $as_echo_n "(cached) " >&6
25499else
25500  if test -n "$ac_ct_NM"; then
25501  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25502else
25503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25504for as_dir in $PATH
25505do
25506  IFS=$as_save_IFS
25507  test -z "$as_dir" && as_dir=.
25508  for ac_exec_ext in '' $ac_executable_extensions; do
25509  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25510    ac_cv_prog_ac_ct_NM="nm"
25511    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25512    break 2
25513  fi
25514done
25515done
25516IFS=$as_save_IFS
25517
25518fi
25519fi
25520ac_ct_NM=$ac_cv_prog_ac_ct_NM
25521if test -n "$ac_ct_NM"; then
25522  { $as_echo "$as_me:$LINENO: result: $ac_ct_NM" >&5
25523$as_echo "$ac_ct_NM" >&6; }
25524else
25525  { $as_echo "$as_me:$LINENO: result: no" >&5
25526$as_echo "no" >&6; }
25527fi
25528
25529  if test "x$ac_ct_NM" = x; then
25530    NM=""
25531  else
25532    case $cross_compiling:$ac_tool_warned in
25533yes:)
25534{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
25535$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25536ac_tool_warned=yes ;;
25537esac
25538    NM=$ac_ct_NM
25539  fi
25540else
25541  NM="$ac_cv_prog_NM"
25542fi
25543
25544
25545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25546
25547  # First separate the path from the arguments. This will split at the first
25548  # space.
25549  complete="$NM"
25550  path="${complete%% *}"
25551  tmp="$complete EOL"
25552  arguments="${tmp#* }"
25553
25554  # Input might be given as Windows format, start by converting to
25555  # unix format.
25556  new_path=`$CYGPATH -u "$path"`
25557
25558  # Now try to locate executable using which
25559  new_path=`$WHICH "$new_path" 2> /dev/null`
25560  # bat and cmd files are not always considered executable in cygwin causing which
25561  # to not find them
25562  if test "x$new_path" = x \
25563           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25564           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25565    new_path=`$CYGPATH -u "$path"`
25566  fi
25567  if test "x$new_path" = x; then
25568    # Oops. Which didn't find the executable.
25569    # The splitting of arguments from the executable at a space might have been incorrect,
25570    # since paths with space are more likely in Windows. Give it another try with the whole
25571    # argument.
25572    path="$complete"
25573    arguments="EOL"
25574    new_path=`$CYGPATH -u "$path"`
25575    new_path=`$WHICH "$new_path" 2> /dev/null`
25576    # bat and cmd files are not always considered executable in cygwin causing which
25577    # to not find them
25578    if test "x$new_path" = x \
25579             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25580             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25581      new_path=`$CYGPATH -u "$path"`
25582    fi
25583    if test "x$new_path" = x; then
25584      # It's still not found. Now this is an unrecoverable error.
25585      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
25586$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25587      has_space=`$ECHO "$complete" | $GREP " "`
25588      if test "x$has_space" != x; then
25589        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25591      fi
25592      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
25593$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
25594   { (exit 1); exit 1; }; }
25595    fi
25596  fi
25597
25598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25601  # "foo.exe" is OK but "foo" is an error.
25602  #
25603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25604  # It is also a way to make sure we got the proper file name for the real test later on.
25605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25606  if test "x$test_shortpath" = x; then
25607    # Short path failed, file does not exist as specified.
25608    # Try adding .exe or .cmd
25609    if test -f "${new_path}.exe"; then
25610       input_to_shortpath="${new_path}.exe"
25611    elif test -f "${new_path}.cmd"; then
25612       input_to_shortpath="${new_path}.cmd"
25613    else
25614      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25615$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25616      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25617$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25618      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
25619$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
25620   { (exit 1); exit 1; }; }
25621    fi
25622  else
25623    input_to_shortpath="$new_path"
25624  fi
25625
25626  # Call helper function which possibly converts this using DOS-style short mode.
25627  # If so, the updated path is stored in $new_path.
25628  new_path="$input_to_shortpath"
25629
25630  input_path="$input_to_shortpath"
25631  # Check if we need to convert this using DOS-style short mode. If the path
25632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25633  # take no chances and rewrite it.
25634  # Note: m4 eats our [], so we need to use [ and ] instead.
25635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25636  if test "x$has_forbidden_chars" != x; then
25637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25641      # Going to short mode and back again did indeed matter. Since short mode is
25642      # case insensitive, let's make it lowercase to improve readability.
25643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25644      # Now convert it back to Unix-stile (cygpath)
25645      input_path=`$CYGPATH -u "$shortmode_path"`
25646      new_path="$input_path"
25647    fi
25648  fi
25649
25650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25651  if test "x$test_cygdrive_prefix" = x; then
25652    # As a simple fix, exclude /usr/bin since it's not a real path.
25653    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25655      # a path prefixed by /cygdrive for fixpath to work.
25656      new_path="$CYGWIN_ROOT_PATH$input_path"
25657    fi
25658  fi
25659
25660  # remove trailing .exe if any
25661  new_path="${new_path/%.exe/}"
25662
25663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25664
25665  # First separate the path from the arguments. This will split at the first
25666  # space.
25667  complete="$NM"
25668  path="${complete%% *}"
25669  tmp="$complete EOL"
25670  arguments="${tmp#* }"
25671
25672  # Input might be given as Windows format, start by converting to
25673  # unix format.
25674  new_path="$path"
25675
25676  windows_path="$new_path"
25677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25678    unix_path=`$CYGPATH -u "$windows_path"`
25679    new_path="$unix_path"
25680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25682    new_path="$unix_path"
25683  fi
25684
25685
25686  # Now try to locate executable using which
25687  new_path=`$WHICH "$new_path" 2> /dev/null`
25688
25689  if test "x$new_path" = x; then
25690    # Oops. Which didn't find the executable.
25691    # The splitting of arguments from the executable at a space might have been incorrect,
25692    # since paths with space are more likely in Windows. Give it another try with the whole
25693    # argument.
25694    path="$complete"
25695    arguments="EOL"
25696    new_path="$path"
25697
25698  windows_path="$new_path"
25699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25700    unix_path=`$CYGPATH -u "$windows_path"`
25701    new_path="$unix_path"
25702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25704    new_path="$unix_path"
25705  fi
25706
25707
25708    new_path=`$WHICH "$new_path" 2> /dev/null`
25709
25710    if test "x$new_path" = x; then
25711      # It's still not found. Now this is an unrecoverable error.
25712      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
25713$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25714      has_space=`$ECHO "$complete" | $GREP " "`
25715      if test "x$has_space" != x; then
25716        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25717$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25718      fi
25719      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
25720$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
25721   { (exit 1); exit 1; }; }
25722    fi
25723  fi
25724
25725  # Now new_path has a complete unix path to the binary
25726  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25727    # Keep paths in /bin as-is, but remove trailing .exe if any
25728    new_path="${new_path/%.exe/}"
25729    # Do not save /bin paths to all_fixpath_prefixes!
25730  else
25731    # Not in mixed or Windows style, start by that.
25732    new_path=`cmd //c echo $new_path`
25733
25734  input_path="$new_path"
25735  # Check if we need to convert this using DOS-style short mode. If the path
25736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25737  # take no chances and rewrite it.
25738  # Note: m4 eats our [], so we need to use [ and ] instead.
25739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25740  if test "x$has_forbidden_chars" != x; then
25741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25743  fi
25744
25745    # Output is in $new_path
25746
25747  windows_path="$new_path"
25748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25749    unix_path=`$CYGPATH -u "$windows_path"`
25750    new_path="$unix_path"
25751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25753    new_path="$unix_path"
25754  fi
25755
25756    # remove trailing .exe if any
25757    new_path="${new_path/%.exe/}"
25758
25759    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25760    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25761  fi
25762
25763  else
25764    # We're on a posix platform. Hooray! :)
25765    # First separate the path from the arguments. This will split at the first
25766    # space.
25767    complete="$NM"
25768    path="${complete%% *}"
25769    tmp="$complete EOL"
25770    arguments="${tmp#* }"
25771
25772    new_path=`$WHICH $path 2> /dev/null`
25773    if test "x$new_path" = x; then
25774      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25775      if test "x$is_absolute_path" != x; then
25776        { $as_echo "$as_me:$LINENO: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
25777$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
25778        new_path="$path"
25779      else
25780        { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
25781$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25782        has_space=`$ECHO "$complete" | $GREP " "`
25783        if test "x$has_space" != x; then
25784          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
25785$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25786        fi
25787        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
25788$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
25789   { (exit 1); exit 1; }; }
25790      fi
25791    fi
25792  fi
25793
25794  # Now join together the path and the arguments once again
25795  if test "x$arguments" != xEOL; then
25796      new_complete="$new_path ${arguments% *}"
25797  else
25798      new_complete="$new_path"
25799  fi
25800
25801  if test "x$complete" != "x$new_complete"; then
25802    NM="$new_complete"
25803    { $as_echo "$as_me:$LINENO: Rewriting NM to \"$new_complete\"" >&5
25804$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25805  fi
25806
25807    if test -n "$ac_tool_prefix"; then
25808  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25809set dummy ${ac_tool_prefix}strip; ac_word=$2
25810{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
25811$as_echo_n "checking for $ac_word... " >&6; }
25812if test "${ac_cv_prog_STRIP+set}" = set; then
25813  $as_echo_n "(cached) " >&6
25814else
25815  if test -n "$STRIP"; then
25816  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25817else
25818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25819for as_dir in $PATH
25820do
25821  IFS=$as_save_IFS
25822  test -z "$as_dir" && as_dir=.
25823  for ac_exec_ext in '' $ac_executable_extensions; do
25824  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25825    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25826    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25827    break 2
25828  fi
25829done
25830done
25831IFS=$as_save_IFS
25832
25833fi
25834fi
25835STRIP=$ac_cv_prog_STRIP
25836if test -n "$STRIP"; then
25837  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
25838$as_echo "$STRIP" >&6; }
25839else
25840  { $as_echo "$as_me:$LINENO: result: no" >&5
25841$as_echo "no" >&6; }
25842fi
25843
25844
25845fi
25846if test -z "$ac_cv_prog_STRIP"; then
25847  ac_ct_STRIP=$STRIP
25848  # Extract the first word of "strip", so it can be a program name with args.
25849set dummy strip; ac_word=$2
25850{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
25851$as_echo_n "checking for $ac_word... " >&6; }
25852if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
25853  $as_echo_n "(cached) " >&6
25854else
25855  if test -n "$ac_ct_STRIP"; then
25856  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25857else
25858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25859for as_dir in $PATH
25860do
25861  IFS=$as_save_IFS
25862  test -z "$as_dir" && as_dir=.
25863  for ac_exec_ext in '' $ac_executable_extensions; do
25864  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25865    ac_cv_prog_ac_ct_STRIP="strip"
25866    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25867    break 2
25868  fi
25869done
25870done
25871IFS=$as_save_IFS
25872
25873fi
25874fi
25875ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25876if test -n "$ac_ct_STRIP"; then
25877  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
25878$as_echo "$ac_ct_STRIP" >&6; }
25879else
25880  { $as_echo "$as_me:$LINENO: result: no" >&5
25881$as_echo "no" >&6; }
25882fi
25883
25884  if test "x$ac_ct_STRIP" = x; then
25885    STRIP=""
25886  else
25887    case $cross_compiling:$ac_tool_warned in
25888yes:)
25889{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
25890$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25891ac_tool_warned=yes ;;
25892esac
25893    STRIP=$ac_ct_STRIP
25894  fi
25895else
25896  STRIP="$ac_cv_prog_STRIP"
25897fi
25898
25899
25900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25901
25902  # First separate the path from the arguments. This will split at the first
25903  # space.
25904  complete="$STRIP"
25905  path="${complete%% *}"
25906  tmp="$complete EOL"
25907  arguments="${tmp#* }"
25908
25909  # Input might be given as Windows format, start by converting to
25910  # unix format.
25911  new_path=`$CYGPATH -u "$path"`
25912
25913  # Now try to locate executable using which
25914  new_path=`$WHICH "$new_path" 2> /dev/null`
25915  # bat and cmd files are not always considered executable in cygwin causing which
25916  # to not find them
25917  if test "x$new_path" = x \
25918           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25919           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25920    new_path=`$CYGPATH -u "$path"`
25921  fi
25922  if test "x$new_path" = x; then
25923    # Oops. Which didn't find the executable.
25924    # The splitting of arguments from the executable at a space might have been incorrect,
25925    # since paths with space are more likely in Windows. Give it another try with the whole
25926    # argument.
25927    path="$complete"
25928    arguments="EOL"
25929    new_path=`$CYGPATH -u "$path"`
25930    new_path=`$WHICH "$new_path" 2> /dev/null`
25931    # bat and cmd files are not always considered executable in cygwin causing which
25932    # to not find them
25933    if test "x$new_path" = x \
25934             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25935             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25936      new_path=`$CYGPATH -u "$path"`
25937    fi
25938    if test "x$new_path" = x; then
25939      # It's still not found. Now this is an unrecoverable error.
25940      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25941$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25942      has_space=`$ECHO "$complete" | $GREP " "`
25943      if test "x$has_space" != x; then
25944        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25945$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25946      fi
25947      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
25948$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
25949   { (exit 1); exit 1; }; }
25950    fi
25951  fi
25952
25953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25956  # "foo.exe" is OK but "foo" is an error.
25957  #
25958  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25959  # It is also a way to make sure we got the proper file name for the real test later on.
25960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25961  if test "x$test_shortpath" = x; then
25962    # Short path failed, file does not exist as specified.
25963    # Try adding .exe or .cmd
25964    if test -f "${new_path}.exe"; then
25965       input_to_shortpath="${new_path}.exe"
25966    elif test -f "${new_path}.cmd"; then
25967       input_to_shortpath="${new_path}.cmd"
25968    else
25969      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25970$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25971      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25972$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25973      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
25974$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
25975   { (exit 1); exit 1; }; }
25976    fi
25977  else
25978    input_to_shortpath="$new_path"
25979  fi
25980
25981  # Call helper function which possibly converts this using DOS-style short mode.
25982  # If so, the updated path is stored in $new_path.
25983  new_path="$input_to_shortpath"
25984
25985  input_path="$input_to_shortpath"
25986  # Check if we need to convert this using DOS-style short mode. If the path
25987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25988  # take no chances and rewrite it.
25989  # Note: m4 eats our [], so we need to use [ and ] instead.
25990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25991  if test "x$has_forbidden_chars" != x; then
25992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25993    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25994    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25995    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25996      # Going to short mode and back again did indeed matter. Since short mode is
25997      # case insensitive, let's make it lowercase to improve readability.
25998      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25999      # Now convert it back to Unix-stile (cygpath)
26000      input_path=`$CYGPATH -u "$shortmode_path"`
26001      new_path="$input_path"
26002    fi
26003  fi
26004
26005  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26006  if test "x$test_cygdrive_prefix" = x; then
26007    # As a simple fix, exclude /usr/bin since it's not a real path.
26008    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26009      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26010      # a path prefixed by /cygdrive for fixpath to work.
26011      new_path="$CYGWIN_ROOT_PATH$input_path"
26012    fi
26013  fi
26014
26015  # remove trailing .exe if any
26016  new_path="${new_path/%.exe/}"
26017
26018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26019
26020  # First separate the path from the arguments. This will split at the first
26021  # space.
26022  complete="$STRIP"
26023  path="${complete%% *}"
26024  tmp="$complete EOL"
26025  arguments="${tmp#* }"
26026
26027  # Input might be given as Windows format, start by converting to
26028  # unix format.
26029  new_path="$path"
26030
26031  windows_path="$new_path"
26032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26033    unix_path=`$CYGPATH -u "$windows_path"`
26034    new_path="$unix_path"
26035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26037    new_path="$unix_path"
26038  fi
26039
26040
26041  # Now try to locate executable using which
26042  new_path=`$WHICH "$new_path" 2> /dev/null`
26043
26044  if test "x$new_path" = x; then
26045    # Oops. Which didn't find the executable.
26046    # The splitting of arguments from the executable at a space might have been incorrect,
26047    # since paths with space are more likely in Windows. Give it another try with the whole
26048    # argument.
26049    path="$complete"
26050    arguments="EOL"
26051    new_path="$path"
26052
26053  windows_path="$new_path"
26054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26055    unix_path=`$CYGPATH -u "$windows_path"`
26056    new_path="$unix_path"
26057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26059    new_path="$unix_path"
26060  fi
26061
26062
26063    new_path=`$WHICH "$new_path" 2> /dev/null`
26064
26065    if test "x$new_path" = x; then
26066      # It's still not found. Now this is an unrecoverable error.
26067      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26068$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26069      has_space=`$ECHO "$complete" | $GREP " "`
26070      if test "x$has_space" != x; then
26071        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26073      fi
26074      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
26075$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
26076   { (exit 1); exit 1; }; }
26077    fi
26078  fi
26079
26080  # Now new_path has a complete unix path to the binary
26081  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26082    # Keep paths in /bin as-is, but remove trailing .exe if any
26083    new_path="${new_path/%.exe/}"
26084    # Do not save /bin paths to all_fixpath_prefixes!
26085  else
26086    # Not in mixed or Windows style, start by that.
26087    new_path=`cmd //c echo $new_path`
26088
26089  input_path="$new_path"
26090  # Check if we need to convert this using DOS-style short mode. If the path
26091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26092  # take no chances and rewrite it.
26093  # Note: m4 eats our [], so we need to use [ and ] instead.
26094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26095  if test "x$has_forbidden_chars" != x; then
26096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26098  fi
26099
26100    # Output is in $new_path
26101
26102  windows_path="$new_path"
26103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26104    unix_path=`$CYGPATH -u "$windows_path"`
26105    new_path="$unix_path"
26106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26108    new_path="$unix_path"
26109  fi
26110
26111    # remove trailing .exe if any
26112    new_path="${new_path/%.exe/}"
26113
26114    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26115    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26116  fi
26117
26118  else
26119    # We're on a posix platform. Hooray! :)
26120    # First separate the path from the arguments. This will split at the first
26121    # space.
26122    complete="$STRIP"
26123    path="${complete%% *}"
26124    tmp="$complete EOL"
26125    arguments="${tmp#* }"
26126
26127    new_path=`$WHICH $path 2> /dev/null`
26128    if test "x$new_path" = x; then
26129      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26130      if test "x$is_absolute_path" != x; then
26131        { $as_echo "$as_me:$LINENO: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
26132$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
26133        new_path="$path"
26134      else
26135        { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26136$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26137        has_space=`$ECHO "$complete" | $GREP " "`
26138        if test "x$has_space" != x; then
26139          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
26140$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26141        fi
26142        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
26143$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
26144   { (exit 1); exit 1; }; }
26145      fi
26146    fi
26147  fi
26148
26149  # Now join together the path and the arguments once again
26150  if test "x$arguments" != xEOL; then
26151      new_complete="$new_path ${arguments% *}"
26152  else
26153      new_complete="$new_path"
26154  fi
26155
26156  if test "x$complete" != "x$new_complete"; then
26157    STRIP="$new_complete"
26158    { $as_echo "$as_me:$LINENO: Rewriting STRIP to \"$new_complete\"" >&5
26159$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26160  fi
26161
26162fi
26163
26164# objcopy is used for moving debug symbols to separate files when
26165# full debug symbols are enabled.
26166if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26167    if test -n "$ac_tool_prefix"; then
26168  for ac_prog in gobjcopy objcopy
26169  do
26170    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26171set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26172{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26173$as_echo_n "checking for $ac_word... " >&6; }
26174if test "${ac_cv_prog_OBJCOPY+set}" = set; then
26175  $as_echo_n "(cached) " >&6
26176else
26177  if test -n "$OBJCOPY"; then
26178  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26179else
26180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26181for as_dir in $PATH
26182do
26183  IFS=$as_save_IFS
26184  test -z "$as_dir" && as_dir=.
26185  for ac_exec_ext in '' $ac_executable_extensions; do
26186  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26187    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26188    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26189    break 2
26190  fi
26191done
26192done
26193IFS=$as_save_IFS
26194
26195fi
26196fi
26197OBJCOPY=$ac_cv_prog_OBJCOPY
26198if test -n "$OBJCOPY"; then
26199  { $as_echo "$as_me:$LINENO: result: $OBJCOPY" >&5
26200$as_echo "$OBJCOPY" >&6; }
26201else
26202  { $as_echo "$as_me:$LINENO: result: no" >&5
26203$as_echo "no" >&6; }
26204fi
26205
26206
26207    test -n "$OBJCOPY" && break
26208  done
26209fi
26210if test -z "$OBJCOPY"; then
26211  ac_ct_OBJCOPY=$OBJCOPY
26212  for ac_prog in gobjcopy objcopy
26213do
26214  # Extract the first word of "$ac_prog", so it can be a program name with args.
26215set dummy $ac_prog; ac_word=$2
26216{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26217$as_echo_n "checking for $ac_word... " >&6; }
26218if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then
26219  $as_echo_n "(cached) " >&6
26220else
26221  if test -n "$ac_ct_OBJCOPY"; then
26222  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26223else
26224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26225for as_dir in $PATH
26226do
26227  IFS=$as_save_IFS
26228  test -z "$as_dir" && as_dir=.
26229  for ac_exec_ext in '' $ac_executable_extensions; do
26230  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26231    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26232    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26233    break 2
26234  fi
26235done
26236done
26237IFS=$as_save_IFS
26238
26239fi
26240fi
26241ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26242if test -n "$ac_ct_OBJCOPY"; then
26243  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJCOPY" >&5
26244$as_echo "$ac_ct_OBJCOPY" >&6; }
26245else
26246  { $as_echo "$as_me:$LINENO: result: no" >&5
26247$as_echo "no" >&6; }
26248fi
26249
26250
26251  test -n "$ac_ct_OBJCOPY" && break
26252done
26253
26254  if test "x$ac_ct_OBJCOPY" = x; then
26255    OBJCOPY=""
26256  else
26257    case $cross_compiling:$ac_tool_warned in
26258yes:)
26259{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
26260$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26261ac_tool_warned=yes ;;
26262esac
26263    OBJCOPY=$ac_ct_OBJCOPY
26264  fi
26265fi
26266
26267
26268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26269
26270  # First separate the path from the arguments. This will split at the first
26271  # space.
26272  complete="$OBJCOPY"
26273  path="${complete%% *}"
26274  tmp="$complete EOL"
26275  arguments="${tmp#* }"
26276
26277  # Input might be given as Windows format, start by converting to
26278  # unix format.
26279  new_path=`$CYGPATH -u "$path"`
26280
26281  # Now try to locate executable using which
26282  new_path=`$WHICH "$new_path" 2> /dev/null`
26283  # bat and cmd files are not always considered executable in cygwin causing which
26284  # to not find them
26285  if test "x$new_path" = x \
26286           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26287           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26288    new_path=`$CYGPATH -u "$path"`
26289  fi
26290  if test "x$new_path" = x; then
26291    # Oops. Which didn't find the executable.
26292    # The splitting of arguments from the executable at a space might have been incorrect,
26293    # since paths with space are more likely in Windows. Give it another try with the whole
26294    # argument.
26295    path="$complete"
26296    arguments="EOL"
26297    new_path=`$CYGPATH -u "$path"`
26298    new_path=`$WHICH "$new_path" 2> /dev/null`
26299    # bat and cmd files are not always considered executable in cygwin causing which
26300    # to not find them
26301    if test "x$new_path" = x \
26302             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26303             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26304      new_path=`$CYGPATH -u "$path"`
26305    fi
26306    if test "x$new_path" = x; then
26307      # It's still not found. Now this is an unrecoverable error.
26308      { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26309$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26310      has_space=`$ECHO "$complete" | $GREP " "`
26311      if test "x$has_space" != x; then
26312        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26313$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26314      fi
26315      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26316$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26317   { (exit 1); exit 1; }; }
26318    fi
26319  fi
26320
26321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26324  # "foo.exe" is OK but "foo" is an error.
26325  #
26326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26327  # It is also a way to make sure we got the proper file name for the real test later on.
26328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26329  if test "x$test_shortpath" = x; then
26330    # Short path failed, file does not exist as specified.
26331    # Try adding .exe or .cmd
26332    if test -f "${new_path}.exe"; then
26333       input_to_shortpath="${new_path}.exe"
26334    elif test -f "${new_path}.cmd"; then
26335       input_to_shortpath="${new_path}.cmd"
26336    else
26337      { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26338$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26339      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26340$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26341      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26342$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26343   { (exit 1); exit 1; }; }
26344    fi
26345  else
26346    input_to_shortpath="$new_path"
26347  fi
26348
26349  # Call helper function which possibly converts this using DOS-style short mode.
26350  # If so, the updated path is stored in $new_path.
26351  new_path="$input_to_shortpath"
26352
26353  input_path="$input_to_shortpath"
26354  # Check if we need to convert this using DOS-style short mode. If the path
26355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26356  # take no chances and rewrite it.
26357  # Note: m4 eats our [], so we need to use [ and ] instead.
26358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26359  if test "x$has_forbidden_chars" != x; then
26360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26364      # Going to short mode and back again did indeed matter. Since short mode is
26365      # case insensitive, let's make it lowercase to improve readability.
26366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26367      # Now convert it back to Unix-stile (cygpath)
26368      input_path=`$CYGPATH -u "$shortmode_path"`
26369      new_path="$input_path"
26370    fi
26371  fi
26372
26373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26374  if test "x$test_cygdrive_prefix" = x; then
26375    # As a simple fix, exclude /usr/bin since it's not a real path.
26376    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26378      # a path prefixed by /cygdrive for fixpath to work.
26379      new_path="$CYGWIN_ROOT_PATH$input_path"
26380    fi
26381  fi
26382
26383  # remove trailing .exe if any
26384  new_path="${new_path/%.exe/}"
26385
26386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26387
26388  # First separate the path from the arguments. This will split at the first
26389  # space.
26390  complete="$OBJCOPY"
26391  path="${complete%% *}"
26392  tmp="$complete EOL"
26393  arguments="${tmp#* }"
26394
26395  # Input might be given as Windows format, start by converting to
26396  # unix format.
26397  new_path="$path"
26398
26399  windows_path="$new_path"
26400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26401    unix_path=`$CYGPATH -u "$windows_path"`
26402    new_path="$unix_path"
26403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26405    new_path="$unix_path"
26406  fi
26407
26408
26409  # Now try to locate executable using which
26410  new_path=`$WHICH "$new_path" 2> /dev/null`
26411
26412  if test "x$new_path" = x; then
26413    # Oops. Which didn't find the executable.
26414    # The splitting of arguments from the executable at a space might have been incorrect,
26415    # since paths with space are more likely in Windows. Give it another try with the whole
26416    # argument.
26417    path="$complete"
26418    arguments="EOL"
26419    new_path="$path"
26420
26421  windows_path="$new_path"
26422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26423    unix_path=`$CYGPATH -u "$windows_path"`
26424    new_path="$unix_path"
26425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26427    new_path="$unix_path"
26428  fi
26429
26430
26431    new_path=`$WHICH "$new_path" 2> /dev/null`
26432
26433    if test "x$new_path" = x; then
26434      # It's still not found. Now this is an unrecoverable error.
26435      { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26436$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26437      has_space=`$ECHO "$complete" | $GREP " "`
26438      if test "x$has_space" != x; then
26439        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26441      fi
26442      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26443$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26444   { (exit 1); exit 1; }; }
26445    fi
26446  fi
26447
26448  # Now new_path has a complete unix path to the binary
26449  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26450    # Keep paths in /bin as-is, but remove trailing .exe if any
26451    new_path="${new_path/%.exe/}"
26452    # Do not save /bin paths to all_fixpath_prefixes!
26453  else
26454    # Not in mixed or Windows style, start by that.
26455    new_path=`cmd //c echo $new_path`
26456
26457  input_path="$new_path"
26458  # Check if we need to convert this using DOS-style short mode. If the path
26459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26460  # take no chances and rewrite it.
26461  # Note: m4 eats our [], so we need to use [ and ] instead.
26462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26463  if test "x$has_forbidden_chars" != x; then
26464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26466  fi
26467
26468    # Output is in $new_path
26469
26470  windows_path="$new_path"
26471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26472    unix_path=`$CYGPATH -u "$windows_path"`
26473    new_path="$unix_path"
26474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26476    new_path="$unix_path"
26477  fi
26478
26479    # remove trailing .exe if any
26480    new_path="${new_path/%.exe/}"
26481
26482    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26483    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26484  fi
26485
26486  else
26487    # We're on a posix platform. Hooray! :)
26488    # First separate the path from the arguments. This will split at the first
26489    # space.
26490    complete="$OBJCOPY"
26491    path="${complete%% *}"
26492    tmp="$complete EOL"
26493    arguments="${tmp#* }"
26494
26495    new_path=`$WHICH $path 2> /dev/null`
26496    if test "x$new_path" = x; then
26497      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26498      if test "x$is_absolute_path" != x; then
26499        { $as_echo "$as_me:$LINENO: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5
26500$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;}
26501        new_path="$path"
26502      else
26503        { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26504$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26505        has_space=`$ECHO "$complete" | $GREP " "`
26506        if test "x$has_space" != x; then
26507          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
26508$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26509        fi
26510        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26511$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26512   { (exit 1); exit 1; }; }
26513      fi
26514    fi
26515  fi
26516
26517  # Now join together the path and the arguments once again
26518  if test "x$arguments" != xEOL; then
26519      new_complete="$new_path ${arguments% *}"
26520  else
26521      new_complete="$new_path"
26522  fi
26523
26524  if test "x$complete" != "x$new_complete"; then
26525    OBJCOPY="$new_complete"
26526    { $as_echo "$as_me:$LINENO: Rewriting OBJCOPY to \"$new_complete\"" >&5
26527$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26528  fi
26529
26530fi
26531
26532if test -n "$ac_tool_prefix"; then
26533  for ac_prog in gobjdump objdump
26534  do
26535    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26536set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26537{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26538$as_echo_n "checking for $ac_word... " >&6; }
26539if test "${ac_cv_prog_OBJDUMP+set}" = set; then
26540  $as_echo_n "(cached) " >&6
26541else
26542  if test -n "$OBJDUMP"; then
26543  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26544else
26545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26546for as_dir in $PATH
26547do
26548  IFS=$as_save_IFS
26549  test -z "$as_dir" && as_dir=.
26550  for ac_exec_ext in '' $ac_executable_extensions; do
26551  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26552    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26553    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26554    break 2
26555  fi
26556done
26557done
26558IFS=$as_save_IFS
26559
26560fi
26561fi
26562OBJDUMP=$ac_cv_prog_OBJDUMP
26563if test -n "$OBJDUMP"; then
26564  { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5
26565$as_echo "$OBJDUMP" >&6; }
26566else
26567  { $as_echo "$as_me:$LINENO: result: no" >&5
26568$as_echo "no" >&6; }
26569fi
26570
26571
26572    test -n "$OBJDUMP" && break
26573  done
26574fi
26575if test -z "$OBJDUMP"; then
26576  ac_ct_OBJDUMP=$OBJDUMP
26577  for ac_prog in gobjdump objdump
26578do
26579  # Extract the first word of "$ac_prog", so it can be a program name with args.
26580set dummy $ac_prog; ac_word=$2
26581{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26582$as_echo_n "checking for $ac_word... " >&6; }
26583if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
26584  $as_echo_n "(cached) " >&6
26585else
26586  if test -n "$ac_ct_OBJDUMP"; then
26587  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26588else
26589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26590for as_dir in $PATH
26591do
26592  IFS=$as_save_IFS
26593  test -z "$as_dir" && as_dir=.
26594  for ac_exec_ext in '' $ac_executable_extensions; do
26595  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26596    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26597    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26598    break 2
26599  fi
26600done
26601done
26602IFS=$as_save_IFS
26603
26604fi
26605fi
26606ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26607if test -n "$ac_ct_OBJDUMP"; then
26608  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
26609$as_echo "$ac_ct_OBJDUMP" >&6; }
26610else
26611  { $as_echo "$as_me:$LINENO: result: no" >&5
26612$as_echo "no" >&6; }
26613fi
26614
26615
26616  test -n "$ac_ct_OBJDUMP" && break
26617done
26618
26619  if test "x$ac_ct_OBJDUMP" = x; then
26620    OBJDUMP=""
26621  else
26622    case $cross_compiling:$ac_tool_warned in
26623yes:)
26624{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
26625$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26626ac_tool_warned=yes ;;
26627esac
26628    OBJDUMP=$ac_ct_OBJDUMP
26629  fi
26630fi
26631
26632if test "x$OBJDUMP" != x; then
26633  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26634
26635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26636
26637  # First separate the path from the arguments. This will split at the first
26638  # space.
26639  complete="$OBJDUMP"
26640  path="${complete%% *}"
26641  tmp="$complete EOL"
26642  arguments="${tmp#* }"
26643
26644  # Input might be given as Windows format, start by converting to
26645  # unix format.
26646  new_path=`$CYGPATH -u "$path"`
26647
26648  # Now try to locate executable using which
26649  new_path=`$WHICH "$new_path" 2> /dev/null`
26650  # bat and cmd files are not always considered executable in cygwin causing which
26651  # to not find them
26652  if test "x$new_path" = x \
26653           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26654           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26655    new_path=`$CYGPATH -u "$path"`
26656  fi
26657  if test "x$new_path" = x; then
26658    # Oops. Which didn't find the executable.
26659    # The splitting of arguments from the executable at a space might have been incorrect,
26660    # since paths with space are more likely in Windows. Give it another try with the whole
26661    # argument.
26662    path="$complete"
26663    arguments="EOL"
26664    new_path=`$CYGPATH -u "$path"`
26665    new_path=`$WHICH "$new_path" 2> /dev/null`
26666    # bat and cmd files are not always considered executable in cygwin causing which
26667    # to not find them
26668    if test "x$new_path" = x \
26669             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26670             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26671      new_path=`$CYGPATH -u "$path"`
26672    fi
26673    if test "x$new_path" = x; then
26674      # It's still not found. Now this is an unrecoverable error.
26675      { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26676$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26677      has_space=`$ECHO "$complete" | $GREP " "`
26678      if test "x$has_space" != x; then
26679        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26680$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26681      fi
26682      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26683$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26684   { (exit 1); exit 1; }; }
26685    fi
26686  fi
26687
26688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26691  # "foo.exe" is OK but "foo" is an error.
26692  #
26693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26694  # It is also a way to make sure we got the proper file name for the real test later on.
26695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26696  if test "x$test_shortpath" = x; then
26697    # Short path failed, file does not exist as specified.
26698    # Try adding .exe or .cmd
26699    if test -f "${new_path}.exe"; then
26700       input_to_shortpath="${new_path}.exe"
26701    elif test -f "${new_path}.cmd"; then
26702       input_to_shortpath="${new_path}.cmd"
26703    else
26704      { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26705$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26706      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26707$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26708      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26709$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26710   { (exit 1); exit 1; }; }
26711    fi
26712  else
26713    input_to_shortpath="$new_path"
26714  fi
26715
26716  # Call helper function which possibly converts this using DOS-style short mode.
26717  # If so, the updated path is stored in $new_path.
26718  new_path="$input_to_shortpath"
26719
26720  input_path="$input_to_shortpath"
26721  # Check if we need to convert this using DOS-style short mode. If the path
26722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26723  # take no chances and rewrite it.
26724  # Note: m4 eats our [], so we need to use [ and ] instead.
26725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26726  if test "x$has_forbidden_chars" != x; then
26727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26731      # Going to short mode and back again did indeed matter. Since short mode is
26732      # case insensitive, let's make it lowercase to improve readability.
26733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26734      # Now convert it back to Unix-stile (cygpath)
26735      input_path=`$CYGPATH -u "$shortmode_path"`
26736      new_path="$input_path"
26737    fi
26738  fi
26739
26740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26741  if test "x$test_cygdrive_prefix" = x; then
26742    # As a simple fix, exclude /usr/bin since it's not a real path.
26743    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26745      # a path prefixed by /cygdrive for fixpath to work.
26746      new_path="$CYGWIN_ROOT_PATH$input_path"
26747    fi
26748  fi
26749
26750  # remove trailing .exe if any
26751  new_path="${new_path/%.exe/}"
26752
26753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26754
26755  # First separate the path from the arguments. This will split at the first
26756  # space.
26757  complete="$OBJDUMP"
26758  path="${complete%% *}"
26759  tmp="$complete EOL"
26760  arguments="${tmp#* }"
26761
26762  # Input might be given as Windows format, start by converting to
26763  # unix format.
26764  new_path="$path"
26765
26766  windows_path="$new_path"
26767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26768    unix_path=`$CYGPATH -u "$windows_path"`
26769    new_path="$unix_path"
26770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26772    new_path="$unix_path"
26773  fi
26774
26775
26776  # Now try to locate executable using which
26777  new_path=`$WHICH "$new_path" 2> /dev/null`
26778
26779  if test "x$new_path" = x; then
26780    # Oops. Which didn't find the executable.
26781    # The splitting of arguments from the executable at a space might have been incorrect,
26782    # since paths with space are more likely in Windows. Give it another try with the whole
26783    # argument.
26784    path="$complete"
26785    arguments="EOL"
26786    new_path="$path"
26787
26788  windows_path="$new_path"
26789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26790    unix_path=`$CYGPATH -u "$windows_path"`
26791    new_path="$unix_path"
26792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26794    new_path="$unix_path"
26795  fi
26796
26797
26798    new_path=`$WHICH "$new_path" 2> /dev/null`
26799
26800    if test "x$new_path" = x; then
26801      # It's still not found. Now this is an unrecoverable error.
26802      { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26803$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26804      has_space=`$ECHO "$complete" | $GREP " "`
26805      if test "x$has_space" != x; then
26806        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26808      fi
26809      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26810$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26811   { (exit 1); exit 1; }; }
26812    fi
26813  fi
26814
26815  # Now new_path has a complete unix path to the binary
26816  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26817    # Keep paths in /bin as-is, but remove trailing .exe if any
26818    new_path="${new_path/%.exe/}"
26819    # Do not save /bin paths to all_fixpath_prefixes!
26820  else
26821    # Not in mixed or Windows style, start by that.
26822    new_path=`cmd //c echo $new_path`
26823
26824  input_path="$new_path"
26825  # Check if we need to convert this using DOS-style short mode. If the path
26826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26827  # take no chances and rewrite it.
26828  # Note: m4 eats our [], so we need to use [ and ] instead.
26829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26830  if test "x$has_forbidden_chars" != x; then
26831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26833  fi
26834
26835    # Output is in $new_path
26836
26837  windows_path="$new_path"
26838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26839    unix_path=`$CYGPATH -u "$windows_path"`
26840    new_path="$unix_path"
26841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26843    new_path="$unix_path"
26844  fi
26845
26846    # remove trailing .exe if any
26847    new_path="${new_path/%.exe/}"
26848
26849    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26850    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26851  fi
26852
26853  else
26854    # We're on a posix platform. Hooray! :)
26855    # First separate the path from the arguments. This will split at the first
26856    # space.
26857    complete="$OBJDUMP"
26858    path="${complete%% *}"
26859    tmp="$complete EOL"
26860    arguments="${tmp#* }"
26861
26862    new_path=`$WHICH $path 2> /dev/null`
26863    if test "x$new_path" = x; then
26864      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26865      if test "x$is_absolute_path" != x; then
26866        { $as_echo "$as_me:$LINENO: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5
26867$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;}
26868        new_path="$path"
26869      else
26870        { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26871$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26872        has_space=`$ECHO "$complete" | $GREP " "`
26873        if test "x$has_space" != x; then
26874          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
26875$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26876        fi
26877        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26878$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26879   { (exit 1); exit 1; }; }
26880      fi
26881    fi
26882  fi
26883
26884  # Now join together the path and the arguments once again
26885  if test "x$arguments" != xEOL; then
26886      new_complete="$new_path ${arguments% *}"
26887  else
26888      new_complete="$new_path"
26889  fi
26890
26891  if test "x$complete" != "x$new_complete"; then
26892    OBJDUMP="$new_complete"
26893    { $as_echo "$as_me:$LINENO: Rewriting OBJDUMP to \"$new_complete\"" >&5
26894$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26895  fi
26896
26897fi
26898
26899if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26900   # Extract the first word of "lipo", so it can be a program name with args.
26901set dummy lipo; ac_word=$2
26902{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26903$as_echo_n "checking for $ac_word... " >&6; }
26904if test "${ac_cv_path_LIPO+set}" = set; then
26905  $as_echo_n "(cached) " >&6
26906else
26907  case $LIPO in
26908  [\\/]* | ?:[\\/]*)
26909  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26910  ;;
26911  *)
26912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26913for as_dir in $PATH
26914do
26915  IFS=$as_save_IFS
26916  test -z "$as_dir" && as_dir=.
26917  for ac_exec_ext in '' $ac_executable_extensions; do
26918  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26919    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26920    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26921    break 2
26922  fi
26923done
26924done
26925IFS=$as_save_IFS
26926
26927  ;;
26928esac
26929fi
26930LIPO=$ac_cv_path_LIPO
26931if test -n "$LIPO"; then
26932  { $as_echo "$as_me:$LINENO: result: $LIPO" >&5
26933$as_echo "$LIPO" >&6; }
26934else
26935  { $as_echo "$as_me:$LINENO: result: no" >&5
26936$as_echo "no" >&6; }
26937fi
26938
26939
26940
26941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26942
26943  # First separate the path from the arguments. This will split at the first
26944  # space.
26945  complete="$LIPO"
26946  path="${complete%% *}"
26947  tmp="$complete EOL"
26948  arguments="${tmp#* }"
26949
26950  # Input might be given as Windows format, start by converting to
26951  # unix format.
26952  new_path=`$CYGPATH -u "$path"`
26953
26954  # Now try to locate executable using which
26955  new_path=`$WHICH "$new_path" 2> /dev/null`
26956  # bat and cmd files are not always considered executable in cygwin causing which
26957  # to not find them
26958  if test "x$new_path" = x \
26959           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26960           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26961    new_path=`$CYGPATH -u "$path"`
26962  fi
26963  if test "x$new_path" = x; then
26964    # Oops. Which didn't find the executable.
26965    # The splitting of arguments from the executable at a space might have been incorrect,
26966    # since paths with space are more likely in Windows. Give it another try with the whole
26967    # argument.
26968    path="$complete"
26969    arguments="EOL"
26970    new_path=`$CYGPATH -u "$path"`
26971    new_path=`$WHICH "$new_path" 2> /dev/null`
26972    # bat and cmd files are not always considered executable in cygwin causing which
26973    # to not find them
26974    if test "x$new_path" = x \
26975             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26976             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26977      new_path=`$CYGPATH -u "$path"`
26978    fi
26979    if test "x$new_path" = x; then
26980      # It's still not found. Now this is an unrecoverable error.
26981      { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26982$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26983      has_space=`$ECHO "$complete" | $GREP " "`
26984      if test "x$has_space" != x; then
26985        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26987      fi
26988      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
26989$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
26990   { (exit 1); exit 1; }; }
26991    fi
26992  fi
26993
26994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26997  # "foo.exe" is OK but "foo" is an error.
26998  #
26999  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27000  # It is also a way to make sure we got the proper file name for the real test later on.
27001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27002  if test "x$test_shortpath" = x; then
27003    # Short path failed, file does not exist as specified.
27004    # Try adding .exe or .cmd
27005    if test -f "${new_path}.exe"; then
27006       input_to_shortpath="${new_path}.exe"
27007    elif test -f "${new_path}.cmd"; then
27008       input_to_shortpath="${new_path}.cmd"
27009    else
27010      { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27011$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27012      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27013$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27014      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
27015$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
27016   { (exit 1); exit 1; }; }
27017    fi
27018  else
27019    input_to_shortpath="$new_path"
27020  fi
27021
27022  # Call helper function which possibly converts this using DOS-style short mode.
27023  # If so, the updated path is stored in $new_path.
27024  new_path="$input_to_shortpath"
27025
27026  input_path="$input_to_shortpath"
27027  # Check if we need to convert this using DOS-style short mode. If the path
27028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27029  # take no chances and rewrite it.
27030  # Note: m4 eats our [], so we need to use [ and ] instead.
27031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27032  if test "x$has_forbidden_chars" != x; then
27033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27037      # Going to short mode and back again did indeed matter. Since short mode is
27038      # case insensitive, let's make it lowercase to improve readability.
27039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27040      # Now convert it back to Unix-stile (cygpath)
27041      input_path=`$CYGPATH -u "$shortmode_path"`
27042      new_path="$input_path"
27043    fi
27044  fi
27045
27046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27047  if test "x$test_cygdrive_prefix" = x; then
27048    # As a simple fix, exclude /usr/bin since it's not a real path.
27049    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27051      # a path prefixed by /cygdrive for fixpath to work.
27052      new_path="$CYGWIN_ROOT_PATH$input_path"
27053    fi
27054  fi
27055
27056  # remove trailing .exe if any
27057  new_path="${new_path/%.exe/}"
27058
27059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27060
27061  # First separate the path from the arguments. This will split at the first
27062  # space.
27063  complete="$LIPO"
27064  path="${complete%% *}"
27065  tmp="$complete EOL"
27066  arguments="${tmp#* }"
27067
27068  # Input might be given as Windows format, start by converting to
27069  # unix format.
27070  new_path="$path"
27071
27072  windows_path="$new_path"
27073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27074    unix_path=`$CYGPATH -u "$windows_path"`
27075    new_path="$unix_path"
27076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27078    new_path="$unix_path"
27079  fi
27080
27081
27082  # Now try to locate executable using which
27083  new_path=`$WHICH "$new_path" 2> /dev/null`
27084
27085  if test "x$new_path" = x; then
27086    # Oops. Which didn't find the executable.
27087    # The splitting of arguments from the executable at a space might have been incorrect,
27088    # since paths with space are more likely in Windows. Give it another try with the whole
27089    # argument.
27090    path="$complete"
27091    arguments="EOL"
27092    new_path="$path"
27093
27094  windows_path="$new_path"
27095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27096    unix_path=`$CYGPATH -u "$windows_path"`
27097    new_path="$unix_path"
27098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27100    new_path="$unix_path"
27101  fi
27102
27103
27104    new_path=`$WHICH "$new_path" 2> /dev/null`
27105
27106    if test "x$new_path" = x; then
27107      # It's still not found. Now this is an unrecoverable error.
27108      { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27109$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27110      has_space=`$ECHO "$complete" | $GREP " "`
27111      if test "x$has_space" != x; then
27112        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27113$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27114      fi
27115      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
27116$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
27117   { (exit 1); exit 1; }; }
27118    fi
27119  fi
27120
27121  # Now new_path has a complete unix path to the binary
27122  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27123    # Keep paths in /bin as-is, but remove trailing .exe if any
27124    new_path="${new_path/%.exe/}"
27125    # Do not save /bin paths to all_fixpath_prefixes!
27126  else
27127    # Not in mixed or Windows style, start by that.
27128    new_path=`cmd //c echo $new_path`
27129
27130  input_path="$new_path"
27131  # Check if we need to convert this using DOS-style short mode. If the path
27132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27133  # take no chances and rewrite it.
27134  # Note: m4 eats our [], so we need to use [ and ] instead.
27135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27136  if test "x$has_forbidden_chars" != x; then
27137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27139  fi
27140
27141    # Output is in $new_path
27142
27143  windows_path="$new_path"
27144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27145    unix_path=`$CYGPATH -u "$windows_path"`
27146    new_path="$unix_path"
27147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27149    new_path="$unix_path"
27150  fi
27151
27152    # remove trailing .exe if any
27153    new_path="${new_path/%.exe/}"
27154
27155    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27156    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27157  fi
27158
27159  else
27160    # We're on a posix platform. Hooray! :)
27161    # First separate the path from the arguments. This will split at the first
27162    # space.
27163    complete="$LIPO"
27164    path="${complete%% *}"
27165    tmp="$complete EOL"
27166    arguments="${tmp#* }"
27167
27168    new_path=`$WHICH $path 2> /dev/null`
27169    if test "x$new_path" = x; then
27170      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27171      if test "x$is_absolute_path" != x; then
27172        { $as_echo "$as_me:$LINENO: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5
27173$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;}
27174        new_path="$path"
27175      else
27176        { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27177$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27178        has_space=`$ECHO "$complete" | $GREP " "`
27179        if test "x$has_space" != x; then
27180          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
27181$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27182        fi
27183        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
27184$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
27185   { (exit 1); exit 1; }; }
27186      fi
27187    fi
27188  fi
27189
27190  # Now join together the path and the arguments once again
27191  if test "x$arguments" != xEOL; then
27192      new_complete="$new_path ${arguments% *}"
27193  else
27194      new_complete="$new_path"
27195  fi
27196
27197  if test "x$complete" != "x$new_complete"; then
27198    LIPO="$new_complete"
27199    { $as_echo "$as_me:$LINENO: Rewriting LIPO to \"$new_complete\"" >&5
27200$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27201  fi
27202
27203fi
27204
27205# Restore old path without tools dir
27206PATH="$OLD_PATH"
27207
27208
27209# FIXME: Currently we must test this after paths but before flags. Fix!
27210
27211# And we can test some aspects on the target using configure macros.
27212
27213
27214{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
27215$as_echo_n "checking for ANSI C header files... " >&6; }
27216if test "${ac_cv_header_stdc+set}" = set; then
27217  $as_echo_n "(cached) " >&6
27218else
27219  cat >conftest.$ac_ext <<_ACEOF
27220/* confdefs.h.  */
27221_ACEOF
27222cat confdefs.h >>conftest.$ac_ext
27223cat >>conftest.$ac_ext <<_ACEOF
27224/* end confdefs.h.  */
27225#include <stdlib.h>
27226#include <stdarg.h>
27227#include <string.h>
27228#include <float.h>
27229
27230int
27231main ()
27232{
27233
27234  ;
27235  return 0;
27236}
27237_ACEOF
27238rm -f conftest.$ac_objext
27239if { (ac_try="$ac_compile"
27240case "(($ac_try" in
27241  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27242  *) ac_try_echo=$ac_try;;
27243esac
27244eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27245$as_echo "$ac_try_echo") >&5
27246  (eval "$ac_compile") 2>conftest.er1
27247  ac_status=$?
27248  grep -v '^ *+' conftest.er1 >conftest.err
27249  rm -f conftest.er1
27250  cat conftest.err >&5
27251  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27252  (exit $ac_status); } && {
27253	 test -z "$ac_cxx_werror_flag" ||
27254	 test ! -s conftest.err
27255       } && test -s conftest.$ac_objext; then
27256  ac_cv_header_stdc=yes
27257else
27258  $as_echo "$as_me: failed program was:" >&5
27259sed 's/^/| /' conftest.$ac_ext >&5
27260
27261	ac_cv_header_stdc=no
27262fi
27263
27264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27265
27266if test $ac_cv_header_stdc = yes; then
27267  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27268  cat >conftest.$ac_ext <<_ACEOF
27269/* confdefs.h.  */
27270_ACEOF
27271cat confdefs.h >>conftest.$ac_ext
27272cat >>conftest.$ac_ext <<_ACEOF
27273/* end confdefs.h.  */
27274#include <string.h>
27275
27276_ACEOF
27277if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27278  $EGREP "memchr" >/dev/null 2>&1; then
27279  :
27280else
27281  ac_cv_header_stdc=no
27282fi
27283rm -f conftest*
27284
27285fi
27286
27287if test $ac_cv_header_stdc = yes; then
27288  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27289  cat >conftest.$ac_ext <<_ACEOF
27290/* confdefs.h.  */
27291_ACEOF
27292cat confdefs.h >>conftest.$ac_ext
27293cat >>conftest.$ac_ext <<_ACEOF
27294/* end confdefs.h.  */
27295#include <stdlib.h>
27296
27297_ACEOF
27298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27299  $EGREP "free" >/dev/null 2>&1; then
27300  :
27301else
27302  ac_cv_header_stdc=no
27303fi
27304rm -f conftest*
27305
27306fi
27307
27308if test $ac_cv_header_stdc = yes; then
27309  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27310  if test "$cross_compiling" = yes; then
27311  :
27312else
27313  cat >conftest.$ac_ext <<_ACEOF
27314/* confdefs.h.  */
27315_ACEOF
27316cat confdefs.h >>conftest.$ac_ext
27317cat >>conftest.$ac_ext <<_ACEOF
27318/* end confdefs.h.  */
27319#include <ctype.h>
27320#include <stdlib.h>
27321#if ((' ' & 0x0FF) == 0x020)
27322# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27323# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27324#else
27325# define ISLOWER(c) \
27326		   (('a' <= (c) && (c) <= 'i') \
27327		     || ('j' <= (c) && (c) <= 'r') \
27328		     || ('s' <= (c) && (c) <= 'z'))
27329# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27330#endif
27331
27332#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27333int
27334main ()
27335{
27336  int i;
27337  for (i = 0; i < 256; i++)
27338    if (XOR (islower (i), ISLOWER (i))
27339	|| toupper (i) != TOUPPER (i))
27340      return 2;
27341  return 0;
27342}
27343_ACEOF
27344rm -f conftest$ac_exeext
27345if { (ac_try="$ac_link"
27346case "(($ac_try" in
27347  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27348  *) ac_try_echo=$ac_try;;
27349esac
27350eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27351$as_echo "$ac_try_echo") >&5
27352  (eval "$ac_link") 2>&5
27353  ac_status=$?
27354  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27355  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27356  { (case "(($ac_try" in
27357  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27358  *) ac_try_echo=$ac_try;;
27359esac
27360eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27361$as_echo "$ac_try_echo") >&5
27362  (eval "$ac_try") 2>&5
27363  ac_status=$?
27364  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27365  (exit $ac_status); }; }; then
27366  :
27367else
27368  $as_echo "$as_me: program exited with status $ac_status" >&5
27369$as_echo "$as_me: failed program was:" >&5
27370sed 's/^/| /' conftest.$ac_ext >&5
27371
27372( exit $ac_status )
27373ac_cv_header_stdc=no
27374fi
27375rm -rf conftest.dSYM
27376rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27377fi
27378
27379
27380fi
27381fi
27382{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
27383$as_echo "$ac_cv_header_stdc" >&6; }
27384if test $ac_cv_header_stdc = yes; then
27385
27386cat >>confdefs.h <<\_ACEOF
27387#define STDC_HEADERS 1
27388_ACEOF
27389
27390fi
27391
27392# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27393
27394
27395
27396
27397
27398
27399
27400
27401
27402for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27403		  inttypes.h stdint.h unistd.h
27404do
27405as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27406{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
27407$as_echo_n "checking for $ac_header... " >&6; }
27408if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27409  $as_echo_n "(cached) " >&6
27410else
27411  cat >conftest.$ac_ext <<_ACEOF
27412/* confdefs.h.  */
27413_ACEOF
27414cat confdefs.h >>conftest.$ac_ext
27415cat >>conftest.$ac_ext <<_ACEOF
27416/* end confdefs.h.  */
27417$ac_includes_default
27418
27419#include <$ac_header>
27420_ACEOF
27421rm -f conftest.$ac_objext
27422if { (ac_try="$ac_compile"
27423case "(($ac_try" in
27424  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27425  *) ac_try_echo=$ac_try;;
27426esac
27427eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27428$as_echo "$ac_try_echo") >&5
27429  (eval "$ac_compile") 2>conftest.er1
27430  ac_status=$?
27431  grep -v '^ *+' conftest.er1 >conftest.err
27432  rm -f conftest.er1
27433  cat conftest.err >&5
27434  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27435  (exit $ac_status); } && {
27436	 test -z "$ac_cxx_werror_flag" ||
27437	 test ! -s conftest.err
27438       } && test -s conftest.$ac_objext; then
27439  eval "$as_ac_Header=yes"
27440else
27441  $as_echo "$as_me: failed program was:" >&5
27442sed 's/^/| /' conftest.$ac_ext >&5
27443
27444	eval "$as_ac_Header=no"
27445fi
27446
27447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27448fi
27449ac_res=`eval 'as_val=${'$as_ac_Header'}
27450		 $as_echo "$as_val"'`
27451	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
27452$as_echo "$ac_res" >&6; }
27453as_val=`eval 'as_val=${'$as_ac_Header'}
27454		 $as_echo "$as_val"'`
27455   if test "x$as_val" = x""yes; then
27456  cat >>confdefs.h <<_ACEOF
27457#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27458_ACEOF
27459
27460fi
27461
27462done
27463
27464
27465
27466###############################################################################
27467#
27468# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27469# (The JVM can use 32 or 64 bit Java pointers but that decision
27470# is made at runtime.)
27471#
27472if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27473  # Always specify -m flags on Solaris
27474
27475  # keep track of c/cxx flags that we added outselves...
27476  #   to prevent emitting warning...
27477  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27478  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27479  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27480
27481  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27482  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27483  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27484
27485  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27486  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27487  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27488
27489elif test "x$COMPILE_TYPE" = xreduced; then
27490  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27491    # Specify -m if running reduced on other Posix platforms
27492
27493  # keep track of c/cxx flags that we added outselves...
27494  #   to prevent emitting warning...
27495  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27496  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27497  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27498
27499  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27500  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27501  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27502
27503  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27504  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27505  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27506
27507  fi
27508fi
27509
27510# Make compilation sanity check
27511
27512for ac_header in stdio.h
27513do
27514as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27515if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27516  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
27517$as_echo_n "checking for $ac_header... " >&6; }
27518if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27519  $as_echo_n "(cached) " >&6
27520fi
27521ac_res=`eval 'as_val=${'$as_ac_Header'}
27522		 $as_echo "$as_val"'`
27523	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
27524$as_echo "$ac_res" >&6; }
27525else
27526  # Is the header compilable?
27527{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
27528$as_echo_n "checking $ac_header usability... " >&6; }
27529cat >conftest.$ac_ext <<_ACEOF
27530/* confdefs.h.  */
27531_ACEOF
27532cat confdefs.h >>conftest.$ac_ext
27533cat >>conftest.$ac_ext <<_ACEOF
27534/* end confdefs.h.  */
27535$ac_includes_default
27536#include <$ac_header>
27537_ACEOF
27538rm -f conftest.$ac_objext
27539if { (ac_try="$ac_compile"
27540case "(($ac_try" in
27541  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27542  *) ac_try_echo=$ac_try;;
27543esac
27544eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27545$as_echo "$ac_try_echo") >&5
27546  (eval "$ac_compile") 2>conftest.er1
27547  ac_status=$?
27548  grep -v '^ *+' conftest.er1 >conftest.err
27549  rm -f conftest.er1
27550  cat conftest.err >&5
27551  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27552  (exit $ac_status); } && {
27553	 test -z "$ac_cxx_werror_flag" ||
27554	 test ! -s conftest.err
27555       } && test -s conftest.$ac_objext; then
27556  ac_header_compiler=yes
27557else
27558  $as_echo "$as_me: failed program was:" >&5
27559sed 's/^/| /' conftest.$ac_ext >&5
27560
27561	ac_header_compiler=no
27562fi
27563
27564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27565{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27566$as_echo "$ac_header_compiler" >&6; }
27567
27568# Is the header present?
27569{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
27570$as_echo_n "checking $ac_header presence... " >&6; }
27571cat >conftest.$ac_ext <<_ACEOF
27572/* confdefs.h.  */
27573_ACEOF
27574cat confdefs.h >>conftest.$ac_ext
27575cat >>conftest.$ac_ext <<_ACEOF
27576/* end confdefs.h.  */
27577#include <$ac_header>
27578_ACEOF
27579if { (ac_try="$ac_cpp conftest.$ac_ext"
27580case "(($ac_try" in
27581  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27582  *) ac_try_echo=$ac_try;;
27583esac
27584eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27585$as_echo "$ac_try_echo") >&5
27586  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
27587  ac_status=$?
27588  grep -v '^ *+' conftest.er1 >conftest.err
27589  rm -f conftest.er1
27590  cat conftest.err >&5
27591  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27592  (exit $ac_status); } >/dev/null && {
27593	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
27594	 test ! -s conftest.err
27595       }; then
27596  ac_header_preproc=yes
27597else
27598  $as_echo "$as_me: failed program was:" >&5
27599sed 's/^/| /' conftest.$ac_ext >&5
27600
27601  ac_header_preproc=no
27602fi
27603
27604rm -f conftest.err conftest.$ac_ext
27605{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27606$as_echo "$ac_header_preproc" >&6; }
27607
27608# So?  What about this header?
27609case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
27610  yes:no: )
27611    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27612$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27613    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27614$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27615    ac_header_preproc=yes
27616    ;;
27617  no:yes:* )
27618    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27619$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27620    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27621$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27622    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27623$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27624    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27625$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27626    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27627$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27628    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27629$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27630    ( cat <<\_ASBOX
27631## ----------------------------------------- ##
27632## Report this to build-dev@openjdk.java.net ##
27633## ----------------------------------------- ##
27634_ASBOX
27635     ) | sed "s/^/$as_me: WARNING:     /" >&2
27636    ;;
27637esac
27638{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
27639$as_echo_n "checking for $ac_header... " >&6; }
27640if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27641  $as_echo_n "(cached) " >&6
27642else
27643  eval "$as_ac_Header=\$ac_header_preproc"
27644fi
27645ac_res=`eval 'as_val=${'$as_ac_Header'}
27646		 $as_echo "$as_val"'`
27647	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
27648$as_echo "$ac_res" >&6; }
27649
27650fi
27651as_val=`eval 'as_val=${'$as_ac_Header'}
27652		 $as_echo "$as_val"'`
27653   if test "x$as_val" = x""yes; then
27654  cat >>confdefs.h <<_ACEOF
27655#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27656_ACEOF
27657
27658else
27659
27660  { $as_echo "$as_me:$LINENO: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27661$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27662  if test "x$COMPILE_TYPE" = xreduced; then
27663    { $as_echo "$as_me:$LINENO: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27664$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27665  elif test "x$COMPILE_TYPE" = xcross; then
27666    { $as_echo "$as_me:$LINENO: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27667$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27668  fi
27669  { { $as_echo "$as_me:$LINENO: error: Cannot continue." >&5
27670$as_echo "$as_me: error: Cannot continue." >&2;}
27671   { (exit 1); exit 1; }; }
27672
27673fi
27674
27675done
27676
27677
27678# The cast to long int works around a bug in the HP C Compiler
27679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27681# This bug is HP SR number 8606223364.
27682{ $as_echo "$as_me:$LINENO: checking size of int *" >&5
27683$as_echo_n "checking size of int *... " >&6; }
27684if test "${ac_cv_sizeof_int_p+set}" = set; then
27685  $as_echo_n "(cached) " >&6
27686else
27687  if test "$cross_compiling" = yes; then
27688  # Depending upon the size, compute the lo and hi bounds.
27689cat >conftest.$ac_ext <<_ACEOF
27690/* confdefs.h.  */
27691_ACEOF
27692cat confdefs.h >>conftest.$ac_ext
27693cat >>conftest.$ac_ext <<_ACEOF
27694/* end confdefs.h.  */
27695$ac_includes_default
27696int
27697main ()
27698{
27699static int test_array [1 - 2 * !(((long int) (sizeof (int *))) >= 0)];
27700test_array [0] = 0
27701
27702  ;
27703  return 0;
27704}
27705_ACEOF
27706rm -f conftest.$ac_objext
27707if { (ac_try="$ac_compile"
27708case "(($ac_try" in
27709  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27710  *) ac_try_echo=$ac_try;;
27711esac
27712eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27713$as_echo "$ac_try_echo") >&5
27714  (eval "$ac_compile") 2>conftest.er1
27715  ac_status=$?
27716  grep -v '^ *+' conftest.er1 >conftest.err
27717  rm -f conftest.er1
27718  cat conftest.err >&5
27719  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27720  (exit $ac_status); } && {
27721	 test -z "$ac_cxx_werror_flag" ||
27722	 test ! -s conftest.err
27723       } && test -s conftest.$ac_objext; then
27724  ac_lo=0 ac_mid=0
27725  while :; do
27726    cat >conftest.$ac_ext <<_ACEOF
27727/* confdefs.h.  */
27728_ACEOF
27729cat confdefs.h >>conftest.$ac_ext
27730cat >>conftest.$ac_ext <<_ACEOF
27731/* end confdefs.h.  */
27732$ac_includes_default
27733int
27734main ()
27735{
27736static int test_array [1 - 2 * !(((long int) (sizeof (int *))) <= $ac_mid)];
27737test_array [0] = 0
27738
27739  ;
27740  return 0;
27741}
27742_ACEOF
27743rm -f conftest.$ac_objext
27744if { (ac_try="$ac_compile"
27745case "(($ac_try" in
27746  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27747  *) ac_try_echo=$ac_try;;
27748esac
27749eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27750$as_echo "$ac_try_echo") >&5
27751  (eval "$ac_compile") 2>conftest.er1
27752  ac_status=$?
27753  grep -v '^ *+' conftest.er1 >conftest.err
27754  rm -f conftest.er1
27755  cat conftest.err >&5
27756  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27757  (exit $ac_status); } && {
27758	 test -z "$ac_cxx_werror_flag" ||
27759	 test ! -s conftest.err
27760       } && test -s conftest.$ac_objext; then
27761  ac_hi=$ac_mid; break
27762else
27763  $as_echo "$as_me: failed program was:" >&5
27764sed 's/^/| /' conftest.$ac_ext >&5
27765
27766	ac_lo=`expr $ac_mid + 1`
27767			if test $ac_lo -le $ac_mid; then
27768			  ac_lo= ac_hi=
27769			  break
27770			fi
27771			ac_mid=`expr 2 '*' $ac_mid + 1`
27772fi
27773
27774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27775  done
27776else
27777  $as_echo "$as_me: failed program was:" >&5
27778sed 's/^/| /' conftest.$ac_ext >&5
27779
27780	cat >conftest.$ac_ext <<_ACEOF
27781/* confdefs.h.  */
27782_ACEOF
27783cat confdefs.h >>conftest.$ac_ext
27784cat >>conftest.$ac_ext <<_ACEOF
27785/* end confdefs.h.  */
27786$ac_includes_default
27787int
27788main ()
27789{
27790static int test_array [1 - 2 * !(((long int) (sizeof (int *))) < 0)];
27791test_array [0] = 0
27792
27793  ;
27794  return 0;
27795}
27796_ACEOF
27797rm -f conftest.$ac_objext
27798if { (ac_try="$ac_compile"
27799case "(($ac_try" in
27800  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27801  *) ac_try_echo=$ac_try;;
27802esac
27803eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27804$as_echo "$ac_try_echo") >&5
27805  (eval "$ac_compile") 2>conftest.er1
27806  ac_status=$?
27807  grep -v '^ *+' conftest.er1 >conftest.err
27808  rm -f conftest.er1
27809  cat conftest.err >&5
27810  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27811  (exit $ac_status); } && {
27812	 test -z "$ac_cxx_werror_flag" ||
27813	 test ! -s conftest.err
27814       } && test -s conftest.$ac_objext; then
27815  ac_hi=-1 ac_mid=-1
27816  while :; do
27817    cat >conftest.$ac_ext <<_ACEOF
27818/* confdefs.h.  */
27819_ACEOF
27820cat confdefs.h >>conftest.$ac_ext
27821cat >>conftest.$ac_ext <<_ACEOF
27822/* end confdefs.h.  */
27823$ac_includes_default
27824int
27825main ()
27826{
27827static int test_array [1 - 2 * !(((long int) (sizeof (int *))) >= $ac_mid)];
27828test_array [0] = 0
27829
27830  ;
27831  return 0;
27832}
27833_ACEOF
27834rm -f conftest.$ac_objext
27835if { (ac_try="$ac_compile"
27836case "(($ac_try" in
27837  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27838  *) ac_try_echo=$ac_try;;
27839esac
27840eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27841$as_echo "$ac_try_echo") >&5
27842  (eval "$ac_compile") 2>conftest.er1
27843  ac_status=$?
27844  grep -v '^ *+' conftest.er1 >conftest.err
27845  rm -f conftest.er1
27846  cat conftest.err >&5
27847  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27848  (exit $ac_status); } && {
27849	 test -z "$ac_cxx_werror_flag" ||
27850	 test ! -s conftest.err
27851       } && test -s conftest.$ac_objext; then
27852  ac_lo=$ac_mid; break
27853else
27854  $as_echo "$as_me: failed program was:" >&5
27855sed 's/^/| /' conftest.$ac_ext >&5
27856
27857	ac_hi=`expr '(' $ac_mid ')' - 1`
27858			if test $ac_mid -le $ac_hi; then
27859			  ac_lo= ac_hi=
27860			  break
27861			fi
27862			ac_mid=`expr 2 '*' $ac_mid`
27863fi
27864
27865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27866  done
27867else
27868  $as_echo "$as_me: failed program was:" >&5
27869sed 's/^/| /' conftest.$ac_ext >&5
27870
27871	ac_lo= ac_hi=
27872fi
27873
27874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27875fi
27876
27877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27878# Binary search between lo and hi bounds.
27879while test "x$ac_lo" != "x$ac_hi"; do
27880  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
27881  cat >conftest.$ac_ext <<_ACEOF
27882/* confdefs.h.  */
27883_ACEOF
27884cat confdefs.h >>conftest.$ac_ext
27885cat >>conftest.$ac_ext <<_ACEOF
27886/* end confdefs.h.  */
27887$ac_includes_default
27888int
27889main ()
27890{
27891static int test_array [1 - 2 * !(((long int) (sizeof (int *))) <= $ac_mid)];
27892test_array [0] = 0
27893
27894  ;
27895  return 0;
27896}
27897_ACEOF
27898rm -f conftest.$ac_objext
27899if { (ac_try="$ac_compile"
27900case "(($ac_try" in
27901  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27902  *) ac_try_echo=$ac_try;;
27903esac
27904eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27905$as_echo "$ac_try_echo") >&5
27906  (eval "$ac_compile") 2>conftest.er1
27907  ac_status=$?
27908  grep -v '^ *+' conftest.er1 >conftest.err
27909  rm -f conftest.er1
27910  cat conftest.err >&5
27911  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27912  (exit $ac_status); } && {
27913	 test -z "$ac_cxx_werror_flag" ||
27914	 test ! -s conftest.err
27915       } && test -s conftest.$ac_objext; then
27916  ac_hi=$ac_mid
27917else
27918  $as_echo "$as_me: failed program was:" >&5
27919sed 's/^/| /' conftest.$ac_ext >&5
27920
27921	ac_lo=`expr '(' $ac_mid ')' + 1`
27922fi
27923
27924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27925done
27926case $ac_lo in
27927?*) ac_cv_sizeof_int_p=$ac_lo;;
27928'') if test "$ac_cv_type_int_p" = yes; then
27929     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27930$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27931{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int *)
27932See \`config.log' for more details." >&5
27933$as_echo "$as_me: error: cannot compute sizeof (int *)
27934See \`config.log' for more details." >&2;}
27935   { (exit 77); exit 77; }; }; }
27936   else
27937     ac_cv_sizeof_int_p=0
27938   fi ;;
27939esac
27940else
27941  cat >conftest.$ac_ext <<_ACEOF
27942/* confdefs.h.  */
27943_ACEOF
27944cat confdefs.h >>conftest.$ac_ext
27945cat >>conftest.$ac_ext <<_ACEOF
27946/* end confdefs.h.  */
27947$ac_includes_default
27948static long int longval () { return (long int) (sizeof (int *)); }
27949static unsigned long int ulongval () { return (long int) (sizeof (int *)); }
27950#include <stdio.h>
27951#include <stdlib.h>
27952int
27953main ()
27954{
27955
27956  FILE *f = fopen ("conftest.val", "w");
27957  if (! f)
27958    return 1;
27959  if (((long int) (sizeof (int *))) < 0)
27960    {
27961      long int i = longval ();
27962      if (i != ((long int) (sizeof (int *))))
27963	return 1;
27964      fprintf (f, "%ld", i);
27965    }
27966  else
27967    {
27968      unsigned long int i = ulongval ();
27969      if (i != ((long int) (sizeof (int *))))
27970	return 1;
27971      fprintf (f, "%lu", i);
27972    }
27973  /* Do not output a trailing newline, as this causes \r\n confusion
27974     on some platforms.  */
27975  return ferror (f) || fclose (f) != 0;
27976
27977  ;
27978  return 0;
27979}
27980_ACEOF
27981rm -f conftest$ac_exeext
27982if { (ac_try="$ac_link"
27983case "(($ac_try" in
27984  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27985  *) ac_try_echo=$ac_try;;
27986esac
27987eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27988$as_echo "$ac_try_echo") >&5
27989  (eval "$ac_link") 2>&5
27990  ac_status=$?
27991  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27992  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27993  { (case "(($ac_try" in
27994  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27995  *) ac_try_echo=$ac_try;;
27996esac
27997eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27998$as_echo "$ac_try_echo") >&5
27999  (eval "$ac_try") 2>&5
28000  ac_status=$?
28001  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28002  (exit $ac_status); }; }; then
28003  ac_cv_sizeof_int_p=`cat conftest.val`
28004else
28005  $as_echo "$as_me: program exited with status $ac_status" >&5
28006$as_echo "$as_me: failed program was:" >&5
28007sed 's/^/| /' conftest.$ac_ext >&5
28008
28009( exit $ac_status )
28010if test "$ac_cv_type_int_p" = yes; then
28011     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
28012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28013{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int *)
28014See \`config.log' for more details." >&5
28015$as_echo "$as_me: error: cannot compute sizeof (int *)
28016See \`config.log' for more details." >&2;}
28017   { (exit 77); exit 77; }; }; }
28018   else
28019     ac_cv_sizeof_int_p=0
28020   fi
28021fi
28022rm -rf conftest.dSYM
28023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28024fi
28025rm -f conftest.val
28026fi
28027{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int_p" >&5
28028$as_echo "$ac_cv_sizeof_int_p" >&6; }
28029
28030
28031
28032cat >>confdefs.h <<_ACEOF
28033#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28034_ACEOF
28035
28036
28037
28038if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28039  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28040  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28041fi
28042
28043if test "x$SIZEOF_INT_P" = x; then
28044    # The test failed, lets stick to the assumed value.
28045    { $as_echo "$as_me:$LINENO: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&5
28046$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28047else
28048    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28049
28050    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28051        { { $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
28052$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;}
28053   { (exit 1); exit 1; }; }
28054    fi
28055fi
28056
28057{ $as_echo "$as_me:$LINENO: checking for target address size" >&5
28058$as_echo_n "checking for target address size... " >&6; }
28059{ $as_echo "$as_me:$LINENO: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28060$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28061
28062
28063###############################################################################
28064#
28065# Is the target little of big endian?
28066#
28067
28068 { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
28069$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28070if test "${ac_cv_c_bigendian+set}" = set; then
28071  $as_echo_n "(cached) " >&6
28072else
28073  ac_cv_c_bigendian=unknown
28074    # See if we're dealing with a universal compiler.
28075    cat >conftest.$ac_ext <<_ACEOF
28076/* confdefs.h.  */
28077_ACEOF
28078cat confdefs.h >>conftest.$ac_ext
28079cat >>conftest.$ac_ext <<_ACEOF
28080/* end confdefs.h.  */
28081#ifndef __APPLE_CC__
28082	       not a universal capable compiler
28083	     #endif
28084	     typedef int dummy;
28085
28086_ACEOF
28087rm -f conftest.$ac_objext
28088if { (ac_try="$ac_compile"
28089case "(($ac_try" in
28090  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28091  *) ac_try_echo=$ac_try;;
28092esac
28093eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28094$as_echo "$ac_try_echo") >&5
28095  (eval "$ac_compile") 2>conftest.er1
28096  ac_status=$?
28097  grep -v '^ *+' conftest.er1 >conftest.err
28098  rm -f conftest.er1
28099  cat conftest.err >&5
28100  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28101  (exit $ac_status); } && {
28102	 test -z "$ac_cxx_werror_flag" ||
28103	 test ! -s conftest.err
28104       } && test -s conftest.$ac_objext; then
28105
28106	# Check for potential -arch flags.  It is not universal unless
28107	# there are some -arch flags.  Note that *ppc* also matches
28108	# ppc64.  This check is also rather less than ideal.
28109	case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
28110	  *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
28111	esac
28112else
28113  $as_echo "$as_me: failed program was:" >&5
28114sed 's/^/| /' conftest.$ac_ext >&5
28115
28116
28117fi
28118
28119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28120    if test $ac_cv_c_bigendian = unknown; then
28121      # See if sys/param.h defines the BYTE_ORDER macro.
28122      cat >conftest.$ac_ext <<_ACEOF
28123/* confdefs.h.  */
28124_ACEOF
28125cat confdefs.h >>conftest.$ac_ext
28126cat >>conftest.$ac_ext <<_ACEOF
28127/* end confdefs.h.  */
28128#include <sys/types.h>
28129	     #include <sys/param.h>
28130
28131int
28132main ()
28133{
28134#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28135		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28136		     && LITTLE_ENDIAN)
28137	      bogus endian macros
28138	     #endif
28139
28140  ;
28141  return 0;
28142}
28143_ACEOF
28144rm -f conftest.$ac_objext
28145if { (ac_try="$ac_compile"
28146case "(($ac_try" in
28147  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28148  *) ac_try_echo=$ac_try;;
28149esac
28150eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28151$as_echo "$ac_try_echo") >&5
28152  (eval "$ac_compile") 2>conftest.er1
28153  ac_status=$?
28154  grep -v '^ *+' conftest.er1 >conftest.err
28155  rm -f conftest.er1
28156  cat conftest.err >&5
28157  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28158  (exit $ac_status); } && {
28159	 test -z "$ac_cxx_werror_flag" ||
28160	 test ! -s conftest.err
28161       } && test -s conftest.$ac_objext; then
28162  # It does; now see whether it defined to BIG_ENDIAN or not.
28163	 cat >conftest.$ac_ext <<_ACEOF
28164/* confdefs.h.  */
28165_ACEOF
28166cat confdefs.h >>conftest.$ac_ext
28167cat >>conftest.$ac_ext <<_ACEOF
28168/* end confdefs.h.  */
28169#include <sys/types.h>
28170		#include <sys/param.h>
28171
28172int
28173main ()
28174{
28175#if BYTE_ORDER != BIG_ENDIAN
28176		 not big endian
28177		#endif
28178
28179  ;
28180  return 0;
28181}
28182_ACEOF
28183rm -f conftest.$ac_objext
28184if { (ac_try="$ac_compile"
28185case "(($ac_try" in
28186  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28187  *) ac_try_echo=$ac_try;;
28188esac
28189eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28190$as_echo "$ac_try_echo") >&5
28191  (eval "$ac_compile") 2>conftest.er1
28192  ac_status=$?
28193  grep -v '^ *+' conftest.er1 >conftest.err
28194  rm -f conftest.er1
28195  cat conftest.err >&5
28196  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28197  (exit $ac_status); } && {
28198	 test -z "$ac_cxx_werror_flag" ||
28199	 test ! -s conftest.err
28200       } && test -s conftest.$ac_objext; then
28201  ac_cv_c_bigendian=yes
28202else
28203  $as_echo "$as_me: failed program was:" >&5
28204sed 's/^/| /' conftest.$ac_ext >&5
28205
28206	ac_cv_c_bigendian=no
28207fi
28208
28209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28210else
28211  $as_echo "$as_me: failed program was:" >&5
28212sed 's/^/| /' conftest.$ac_ext >&5
28213
28214
28215fi
28216
28217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28218    fi
28219    if test $ac_cv_c_bigendian = unknown; then
28220      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28221      cat >conftest.$ac_ext <<_ACEOF
28222/* confdefs.h.  */
28223_ACEOF
28224cat confdefs.h >>conftest.$ac_ext
28225cat >>conftest.$ac_ext <<_ACEOF
28226/* end confdefs.h.  */
28227#include <limits.h>
28228
28229int
28230main ()
28231{
28232#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28233	      bogus endian macros
28234	     #endif
28235
28236  ;
28237  return 0;
28238}
28239_ACEOF
28240rm -f conftest.$ac_objext
28241if { (ac_try="$ac_compile"
28242case "(($ac_try" in
28243  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28244  *) ac_try_echo=$ac_try;;
28245esac
28246eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28247$as_echo "$ac_try_echo") >&5
28248  (eval "$ac_compile") 2>conftest.er1
28249  ac_status=$?
28250  grep -v '^ *+' conftest.er1 >conftest.err
28251  rm -f conftest.er1
28252  cat conftest.err >&5
28253  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28254  (exit $ac_status); } && {
28255	 test -z "$ac_cxx_werror_flag" ||
28256	 test ! -s conftest.err
28257       } && test -s conftest.$ac_objext; then
28258  # It does; now see whether it defined to _BIG_ENDIAN or not.
28259	 cat >conftest.$ac_ext <<_ACEOF
28260/* confdefs.h.  */
28261_ACEOF
28262cat confdefs.h >>conftest.$ac_ext
28263cat >>conftest.$ac_ext <<_ACEOF
28264/* end confdefs.h.  */
28265#include <limits.h>
28266
28267int
28268main ()
28269{
28270#ifndef _BIG_ENDIAN
28271		 not big endian
28272		#endif
28273
28274  ;
28275  return 0;
28276}
28277_ACEOF
28278rm -f conftest.$ac_objext
28279if { (ac_try="$ac_compile"
28280case "(($ac_try" in
28281  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28282  *) ac_try_echo=$ac_try;;
28283esac
28284eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28285$as_echo "$ac_try_echo") >&5
28286  (eval "$ac_compile") 2>conftest.er1
28287  ac_status=$?
28288  grep -v '^ *+' conftest.er1 >conftest.err
28289  rm -f conftest.er1
28290  cat conftest.err >&5
28291  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28292  (exit $ac_status); } && {
28293	 test -z "$ac_cxx_werror_flag" ||
28294	 test ! -s conftest.err
28295       } && test -s conftest.$ac_objext; then
28296  ac_cv_c_bigendian=yes
28297else
28298  $as_echo "$as_me: failed program was:" >&5
28299sed 's/^/| /' conftest.$ac_ext >&5
28300
28301	ac_cv_c_bigendian=no
28302fi
28303
28304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28305else
28306  $as_echo "$as_me: failed program was:" >&5
28307sed 's/^/| /' conftest.$ac_ext >&5
28308
28309
28310fi
28311
28312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28313    fi
28314    if test $ac_cv_c_bigendian = unknown; then
28315      # Compile a test program.
28316      if test "$cross_compiling" = yes; then
28317  # Try to guess by grepping values from an object file.
28318	 cat >conftest.$ac_ext <<_ACEOF
28319/* confdefs.h.  */
28320_ACEOF
28321cat confdefs.h >>conftest.$ac_ext
28322cat >>conftest.$ac_ext <<_ACEOF
28323/* end confdefs.h.  */
28324short int ascii_mm[] =
28325		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28326		short int ascii_ii[] =
28327		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28328		int use_ascii (int i) {
28329		  return ascii_mm[i] + ascii_ii[i];
28330		}
28331		short int ebcdic_ii[] =
28332		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28333		short int ebcdic_mm[] =
28334		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28335		int use_ebcdic (int i) {
28336		  return ebcdic_mm[i] + ebcdic_ii[i];
28337		}
28338		extern int foo;
28339
28340int
28341main ()
28342{
28343return use_ascii (foo) == use_ebcdic (foo);
28344  ;
28345  return 0;
28346}
28347_ACEOF
28348rm -f conftest.$ac_objext
28349if { (ac_try="$ac_compile"
28350case "(($ac_try" in
28351  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28352  *) ac_try_echo=$ac_try;;
28353esac
28354eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28355$as_echo "$ac_try_echo") >&5
28356  (eval "$ac_compile") 2>conftest.er1
28357  ac_status=$?
28358  grep -v '^ *+' conftest.er1 >conftest.err
28359  rm -f conftest.er1
28360  cat conftest.err >&5
28361  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28362  (exit $ac_status); } && {
28363	 test -z "$ac_cxx_werror_flag" ||
28364	 test ! -s conftest.err
28365       } && test -s conftest.$ac_objext; then
28366  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28367	      ac_cv_c_bigendian=yes
28368	    fi
28369	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28370	      if test "$ac_cv_c_bigendian" = unknown; then
28371		ac_cv_c_bigendian=no
28372	      else
28373		# finding both strings is unlikely to happen, but who knows?
28374		ac_cv_c_bigendian=unknown
28375	      fi
28376	    fi
28377else
28378  $as_echo "$as_me: failed program was:" >&5
28379sed 's/^/| /' conftest.$ac_ext >&5
28380
28381
28382fi
28383
28384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28385else
28386  cat >conftest.$ac_ext <<_ACEOF
28387/* confdefs.h.  */
28388_ACEOF
28389cat confdefs.h >>conftest.$ac_ext
28390cat >>conftest.$ac_ext <<_ACEOF
28391/* end confdefs.h.  */
28392$ac_includes_default
28393int
28394main ()
28395{
28396
28397	     /* Are we little or big endian?  From Harbison&Steele.  */
28398	     union
28399	     {
28400	       long int l;
28401	       char c[sizeof (long int)];
28402	     } u;
28403	     u.l = 1;
28404	     return u.c[sizeof (long int) - 1] == 1;
28405
28406  ;
28407  return 0;
28408}
28409_ACEOF
28410rm -f conftest$ac_exeext
28411if { (ac_try="$ac_link"
28412case "(($ac_try" in
28413  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28414  *) ac_try_echo=$ac_try;;
28415esac
28416eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28417$as_echo "$ac_try_echo") >&5
28418  (eval "$ac_link") 2>&5
28419  ac_status=$?
28420  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28421  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28422  { (case "(($ac_try" in
28423  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28424  *) ac_try_echo=$ac_try;;
28425esac
28426eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28427$as_echo "$ac_try_echo") >&5
28428  (eval "$ac_try") 2>&5
28429  ac_status=$?
28430  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28431  (exit $ac_status); }; }; then
28432  ac_cv_c_bigendian=no
28433else
28434  $as_echo "$as_me: program exited with status $ac_status" >&5
28435$as_echo "$as_me: failed program was:" >&5
28436sed 's/^/| /' conftest.$ac_ext >&5
28437
28438( exit $ac_status )
28439ac_cv_c_bigendian=yes
28440fi
28441rm -rf conftest.dSYM
28442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28443fi
28444
28445
28446    fi
28447fi
28448{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
28449$as_echo "$ac_cv_c_bigendian" >&6; }
28450 case $ac_cv_c_bigendian in #(
28451   yes)
28452     ENDIAN="big";; #(
28453   no)
28454     ENDIAN="little" ;; #(
28455   universal)
28456     ENDIAN="universal_endianness"
28457     ;; #(
28458   *)
28459     ENDIAN="unknown" ;;
28460 esac
28461
28462
28463if test "x$ENDIAN" = xuniversal_endianness; then
28464    { { $as_echo "$as_me:$LINENO: error: Building with both big and little endianness is not supported" >&5
28465$as_echo "$as_me: error: Building with both big and little endianness is not supported" >&2;}
28466   { (exit 1); exit 1; }; }
28467fi
28468if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28469    { { $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
28470$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;}
28471   { (exit 1); exit 1; }; }
28472fi
28473
28474
28475# Configure flags for the tools
28476
28477
28478###############################################################################
28479#
28480# How to compile shared libraries.
28481#
28482
28483if test "x$GCC" = xyes; then
28484    COMPILER_NAME=gcc
28485    PICFLAG="-fPIC"
28486    LIBRARY_PREFIX=lib
28487    SHARED_LIBRARY='lib$1.so'
28488    STATIC_LIBRARY='lib$1.a'
28489    SHARED_LIBRARY_FLAGS="-shared"
28490    SHARED_LIBRARY_SUFFIX='.so'
28491    STATIC_LIBRARY_SUFFIX='.a'
28492    OBJ_SUFFIX='.o'
28493    EXE_SUFFIX=''
28494    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28495    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28496    C_FLAG_REORDER=''
28497    CXX_FLAG_REORDER=''
28498    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28499    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28500    LD="$CC"
28501    LDEXE="$CC"
28502    LDCXX="$CXX"
28503    LDEXECXX="$CXX"
28504    POST_STRIP_CMD="$STRIP -g"
28505
28506    # Linking is different on MacOSX
28507    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28508        # Might change in the future to clang.
28509        COMPILER_NAME=gcc
28510        SHARED_LIBRARY='lib$1.dylib'
28511        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28512        SHARED_LIBRARY_SUFFIX='.dylib'
28513        EXE_SUFFIX=''
28514        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28515        SET_SHARED_LIBRARY_MAPFILE=''
28516        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28517        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28518        POST_STRIP_CMD="$STRIP -S"
28519    fi
28520else
28521    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28522        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28523        COMPILER_NAME=ossc
28524        PICFLAG="-KPIC"
28525        LIBRARY_PREFIX=lib
28526        SHARED_LIBRARY='lib$1.so'
28527        STATIC_LIBRARY='lib$1.a'
28528        SHARED_LIBRARY_FLAGS="-G"
28529        SHARED_LIBRARY_SUFFIX='.so'
28530        STATIC_LIBRARY_SUFFIX='.a'
28531        OBJ_SUFFIX='.o'
28532        EXE_SUFFIX=''
28533        SET_SHARED_LIBRARY_NAME=''
28534        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28535	C_FLAG_REORDER='-xF'
28536	CXX_FLAG_REORDER='-xF'
28537        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28538        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28539        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28540        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28541        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28542        POST_STRIP_CMD="$STRIP -x"
28543        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28544    fi
28545    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28546        # If it is not gcc, then assume it is the MS Visual Studio compiler
28547        COMPILER_NAME=cl
28548        PICFLAG=""
28549        LIBRARY_PREFIX=
28550        SHARED_LIBRARY='$1.dll'
28551        STATIC_LIBRARY='$1.lib'
28552        SHARED_LIBRARY_FLAGS="-LD"
28553        SHARED_LIBRARY_SUFFIX='.dll'
28554        STATIC_LIBRARY_SUFFIX='.lib'
28555        OBJ_SUFFIX='.obj'
28556        EXE_SUFFIX='.exe'
28557        SET_SHARED_LIBRARY_NAME=''
28558        SET_SHARED_LIBRARY_MAPFILE=''
28559        SET_SHARED_LIBRARY_ORIGIN=''
28560        SET_EXECUTABLE_ORIGIN=''
28561    fi
28562fi
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576
28577
28578
28579
28580
28581# The (cross) compiler is now configured, we can now test capabilities
28582# of the target platform.
28583
28584
28585
28586###############################################################################
28587#
28588# Setup the opt flags for different compilers
28589# and different operating systems.
28590#
28591
28592#
28593# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28594#
28595if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28596    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28597    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28598    CFLAGS="$CFLAGS -mstackrealign"
28599    { $as_echo "$as_me:$LINENO: checking if 32-bit compiler supports -mstackrealign" >&5
28600$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28601    cat >conftest.$ac_ext <<_ACEOF
28602/* confdefs.h.  */
28603_ACEOF
28604cat confdefs.h >>conftest.$ac_ext
28605cat >>conftest.$ac_ext <<_ACEOF
28606/* end confdefs.h.  */
28607int main() { return 0; }
28608_ACEOF
28609rm -f conftest.$ac_objext conftest$ac_exeext
28610if { (ac_try="$ac_link"
28611case "(($ac_try" in
28612  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28613  *) ac_try_echo=$ac_try;;
28614esac
28615eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28616$as_echo "$ac_try_echo") >&5
28617  (eval "$ac_link") 2>conftest.er1
28618  ac_status=$?
28619  grep -v '^ *+' conftest.er1 >conftest.err
28620  rm -f conftest.er1
28621  cat conftest.err >&5
28622  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28623  (exit $ac_status); } && {
28624	 test -z "$ac_cxx_werror_flag" ||
28625	 test ! -s conftest.err
28626       } && test -s conftest$ac_exeext && {
28627	 test "$cross_compiling" = yes ||
28628	 $as_test_x conftest$ac_exeext
28629       }; then
28630
28631		        { $as_echo "$as_me:$LINENO: result: yes" >&5
28632$as_echo "yes" >&6; }
28633
28634else
28635  $as_echo "$as_me: failed program was:" >&5
28636sed 's/^/| /' conftest.$ac_ext >&5
28637
28638
28639		        { $as_echo "$as_me:$LINENO: result: no" >&5
28640$as_echo "no" >&6; }
28641	                { { $as_echo "$as_me:$LINENO: error: The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." >&5
28642$as_echo "$as_me: error: The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." >&2;}
28643   { (exit 1); exit 1; }; }
28644
28645fi
28646
28647rm -rf conftest.dSYM
28648rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28649      conftest$ac_exeext conftest.$ac_ext
28650fi
28651
28652C_FLAG_DEPS="-MMD -MF"
28653CXX_FLAG_DEPS="-MMD -MF"
28654
28655case $COMPILER_TYPE in
28656  CC )
28657    D_FLAG="-g"
28658    case $COMPILER_NAME in
28659      gcc )
28660      	case $OPENJDK_TARGET_OS in
28661	  macosx )
28662	    # On MacOSX we optimize for size, something
28663	    # we should do for all platforms?
28664	    C_O_FLAG_HI="-Os"
28665	    C_O_FLAG_NORM="-Os"
28666	    C_O_FLAG_NONE=""
28667	    ;;
28668	  *)
28669	    C_O_FLAG_HI="-O3"
28670	    C_O_FLAG_NORM="-O2"
28671	    C_O_FLAG_NONE="-O0"
28672	    CFLAGS_DEBUG_SYMBOLS="-g"
28673	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28674	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28675	       CFLAGS_DEBUG_SYMBOLS="-g1"
28676	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28677	    fi
28678	    ;;
28679	esac
28680        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28681        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28682        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28683        ;;
28684      ossc )
28685        #
28686        # Forte has different names for this with their C++ compiler...
28687        #
28688        C_FLAG_DEPS="-xMMD -xMF"
28689        CXX_FLAG_DEPS="-xMMD -xMF"
28690
28691        # Extra options used with HIGHEST
28692        #
28693        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28694        #          done with care, there are some assumptions below that need to
28695        #          be understood about the use of pointers, and IEEE behavior.
28696        #
28697        # Use non-standard floating point mode (not IEEE 754)
28698        CC_HIGHEST="$CC_HIGHEST -fns"
28699        # Do some simplification of floating point arithmetic (not IEEE 754)
28700        CC_HIGHEST="$CC_HIGHEST -fsimple"
28701        # Use single precision floating point with 'float'
28702        CC_HIGHEST="$CC_HIGHEST -fsingle"
28703        # Assume memory references via basic pointer types do not alias
28704        #   (Source with excessing pointer casting and data access with mixed
28705        #    pointer types are not recommended)
28706        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28707        # Use intrinsic or inline versions for math/std functions
28708        #   (If you expect perfect errno behavior, do not use this)
28709        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28710        # Loop data dependency optimizations (need -xO3 or higher)
28711        CC_HIGHEST="$CC_HIGHEST -xdepend"
28712        # Pointer parameters to functions do not overlap
28713        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28714        #    If you pass in multiple pointers to the same data, do not use this)
28715        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28716        # Inline some library routines
28717        #   (If you expect perfect errno behavior, do not use this)
28718        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28719        # Use optimized math routines
28720        #   (If you expect perfect errno behavior, do not use this)
28721        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28722        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28723
28724        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28725          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28726          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28727        fi
28728
28729        case $OPENJDK_TARGET_CPU_ARCH in
28730          x86)
28731            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28732            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28733            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28734            C_O_FLAG_NONE="-xregs=no%frameptr"
28735            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28736            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28737            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28738            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28739            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28740               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28741               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28742            fi
28743            ;;
28744          sparc)
28745            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28746            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28747            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28748            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28749            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28750            C_O_FLAG_NONE=""
28751            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28752            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28753            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28754            CXX_O_FLAG_NONE=""
28755            ;;
28756        esac
28757
28758    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28759    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28760    esac
28761    ;;
28762  CL )
28763    D_FLAG=
28764    C_O_FLAG_HIGHEST="-O2"
28765    C_O_FLAG_HI="-O1"
28766    C_O_FLAG_NORM="-O1"
28767    C_O_FLAG_NONE="-Od"
28768    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28769    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28770    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28771    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28772    ;;
28773esac
28774
28775if test -z "$C_O_FLAG_HIGHEST"; then
28776   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28777fi
28778
28779if test -z "$CXX_O_FLAG_HIGHEST"; then
28780   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28781fi
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795
28796if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28797   { $as_echo "$as_me:$LINENO: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28798$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28799fi
28800
28801if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28802   { $as_echo "$as_me:$LINENO: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28803$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28804fi
28805
28806if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28807   { $as_echo "$as_me:$LINENO: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28808$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28809fi
28810
28811
28812# Check whether --with-extra-cflags was given.
28813if test "${with_extra_cflags+set}" = set; then
28814  withval=$with_extra_cflags;
28815fi
28816
28817
28818
28819# Check whether --with-extra-cxxflags was given.
28820if test "${with_extra_cxxflags+set}" = set; then
28821  withval=$with_extra_cxxflags;
28822fi
28823
28824
28825
28826# Check whether --with-extra-ldflags was given.
28827if test "${with_extra_ldflags+set}" = set; then
28828  withval=$with_extra_ldflags;
28829fi
28830
28831
28832CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28833CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28834LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28835
28836# Hotspot needs these set in their legacy form
28837LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28838LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28839LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28840
28841
28842
28843
28844
28845###############################################################################
28846#
28847# Now setup the CFLAGS and LDFLAGS for the JDK build.
28848# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28849#
28850case $COMPILER_NAME in
28851      gcc )
28852      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28853                          -pipe \
28854                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28855	  case $OPENJDK_TARGET_CPU_ARCH in
28856	  arm )
28857            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28858	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28859	  ;;
28860	  ppc )
28861            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28862	  ;;
28863	  * )
28864	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28865	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28866          ;;
28867	  esac
28868          ;;
28869      ossc )
28870          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28871          case $OPENJDK_TARGET_CPU_ARCH in
28872          x86 )
28873            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28874       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28875          ;;
28876          esac
28877
28878      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28879      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28880
28881          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28882          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28883          ;;
28884      cl )
28885          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28886               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28887	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28888	       -DWIN32 -DIAL"
28889          case $OPENJDK_TARGET_CPU in
28890              x86 )
28891                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28892                  ;;
28893              x86_64 )
28894                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28895                  ;;
28896          esac
28897          ;;
28898esac
28899
28900###############################################################################
28901
28902CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28903
28904# The package path is used only on macosx?
28905PACKAGE_PATH=/opt/local
28906
28907
28908if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28909    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28910    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28911    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28912    #   Note: -Dmacro         is the same as    #define macro 1
28913    #         -Dmacro=	    is the same as    #define macro
28914    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28915        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28916    else
28917        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28918    fi
28919else
28920    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28921fi
28922if test "x$OPENJDK_TARGET_OS" = xlinux; then
28923    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28924fi
28925if test "x$OPENJDK_TARGET_OS" = xwindows; then
28926    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28927fi
28928if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28929    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28930fi
28931if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28932    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28933fi
28934if test "x$OPENJDK_TARGET_OS" = xbsd; then
28935    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28936fi
28937if test "x$DEBUG_LEVEL" = xrelease; then
28938    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28939    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28940        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28941    fi
28942else
28943    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28944fi
28945
28946CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28947CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28948
28949CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28950        -I${JDK_OUTPUTDIR}/include \
28951        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28952        -I${JDK_TOPDIR}/src/share/javavm/export \
28953        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28954        -I${JDK_TOPDIR}/src/share/native/common \
28955        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28956
28957# The shared libraries are compiled using the picflag.
28958CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28959CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28960
28961# Executable flags
28962CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28963CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28964
28965# Now this is odd. The JDK native libraries have to link against libjvm.so
28966# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28967# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28968# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28969# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28970# libraries will link to whatever is in memory. Yuck.
28971#
28972# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28973if test "x$COMPILER_NAME" = xcl; then
28974    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28975    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28976        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28977    fi
28978    # TODO: make -debug optional "--disable-full-debug-symbols"
28979    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28980    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28981    LDFLAGS_JDKLIB_SUFFIX=""
28982    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28983        LDFLAGS_STACK_SIZE=1048576
28984    else
28985        LDFLAGS_STACK_SIZE=327680
28986    fi
28987    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28988else
28989    if test "x$COMPILER_NAME" = xgcc; then
28990        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28991        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28992        if test -n "$HAS_GNU_HASH"; then
28993            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28994        fi
28995        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28996          # And since we now know that the linker is gnu, then add -z defs, to forbid
28997          # undefined symbols in object files.
28998          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28999          if test "x$DEBUG_LEVEL" = "xrelease"; then
29000              # When building release libraries, tell the linker optimize them.
29001              # Should this be supplied to the OSS linker as well?
29002              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29003          fi
29004        fi
29005    fi
29006    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29007                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server \
29008                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client \
29009                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29010
29011    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29012    if test "x$COMPILER_NAME" = xossc; then
29013        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29014    fi
29015
29016    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29017    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29018        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29019    fi
29020fi
29021
29022# Adjust flags according to debug level.
29023case $DEBUG_LEVEL in
29024      fastdebug )
29025              CFLAGS="$CFLAGS $D_FLAG"
29026              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29027              ;;
29028      slowdebug )
29029              CFLAGS="$CFLAGS $D_FLAG"
29030	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29031	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29032	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29033	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29034              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29035              ;;
29036esac
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051
29052# Setup debug symbols (need objcopy from the toolchain for that)
29053
29054#
29055# ENABLE_DEBUG_SYMBOLS
29056# This must be done after the toolchain is setup, since we're looking at objcopy.
29057#
29058ENABLE_DEBUG_SYMBOLS=default
29059
29060# default on macosx is no...
29061if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29062   ENABLE_DEBUG_SYMBOLS=no
29063fi
29064
29065# Check whether --enable-debug-symbols was given.
29066if test "${enable_debug_symbols+set}" = set; then
29067  enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
29068fi
29069
29070
29071{ $as_echo "$as_me:$LINENO: checking if we should generate debug symbols" >&5
29072$as_echo_n "checking if we should generate debug symbols... " >&6; }
29073
29074if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
29075   # explicit enabling of enable-debug-symbols and can't find objcopy
29076   #   this is an error
29077   { { $as_echo "$as_me:$LINENO: error: Unable to find objcopy, cannot enable debug-symbols" >&5
29078$as_echo "$as_me: error: Unable to find objcopy, cannot enable debug-symbols" >&2;}
29079   { (exit 1); exit 1; }; }
29080fi
29081
29082if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
29083  # Default is on if objcopy is found, otherwise off
29084  if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29085     ENABLE_DEBUG_SYMBOLS=yes
29086  else
29087     ENABLE_DEBUG_SYMBOLS=no
29088  fi
29089fi
29090
29091{ $as_echo "$as_me:$LINENO: result: $ENABLE_DEBUG_SYMBOLS" >&5
29092$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29093
29094#
29095# ZIP_DEBUGINFO_FILES
29096#
29097ZIP_DEBUGINFO_FILES=yes
29098
29099# Check whether --enable-zip-debug-info was given.
29100if test "${enable_zip_debug_info+set}" = set; then
29101  enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
29102fi
29103
29104
29105{ $as_echo "$as_me:$LINENO: checking if we should zip debug-info files" >&5
29106$as_echo_n "checking if we should zip debug-info files... " >&6; }
29107{ $as_echo "$as_me:$LINENO: result: $ZIP_DEBUGINFO_FILES" >&5
29108$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
29109
29110# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
29111#   use that...
29112if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
29113   ZIP_DEBUGINFO_FILES=1
29114else
29115   ZIP_DEBUGINFO_FILES=0
29116fi
29117
29118
29119
29120
29121
29122
29123
29124###############################################################################
29125#
29126# Check dependencies for external and internal libraries.
29127#
29128###############################################################################
29129
29130
29131
29132###############################################################################
29133#
29134# OS specific settings that we never will need to probe.
29135#
29136if test "x$OPENJDK_TARGET_OS" = xlinux; then
29137    { $as_echo "$as_me:$LINENO: checking what is not needed on Linux?" >&5
29138$as_echo_n "checking what is not needed on Linux?... " >&6; }
29139    PULSE_NOT_NEEDED=yes
29140    { $as_echo "$as_me:$LINENO: result: pulse" >&5
29141$as_echo "pulse" >&6; }
29142fi
29143
29144if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29145    { $as_echo "$as_me:$LINENO: checking what is not needed on Solaris?" >&5
29146$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29147    ALSA_NOT_NEEDED=yes
29148    PULSE_NOT_NEEDED=yes
29149    { $as_echo "$as_me:$LINENO: result: alsa pulse" >&5
29150$as_echo "alsa pulse" >&6; }
29151fi
29152
29153if test "x$OPENJDK_TARGET_OS" = xwindows; then
29154    { $as_echo "$as_me:$LINENO: checking what is not needed on Windows?" >&5
29155$as_echo_n "checking what is not needed on Windows?... " >&6; }
29156    CUPS_NOT_NEEDED=yes
29157    ALSA_NOT_NEEDED=yes
29158    PULSE_NOT_NEEDED=yes
29159    X11_NOT_NEEDED=yes
29160    { $as_echo "$as_me:$LINENO: result: alsa cups pulse x11" >&5
29161$as_echo "alsa cups pulse x11" >&6; }
29162fi
29163
29164if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29165    { $as_echo "$as_me:$LINENO: checking what is not needed on MacOSX?" >&5
29166$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29167    ALSA_NOT_NEEDED=yes
29168    PULSE_NOT_NEEDED=yes
29169    X11_NOT_NEEDED=yes
29170    FREETYPE2_NOT_NEEDED=yes
29171    # If the java runtime framework is disabled, then we need X11.
29172    # This will be adjusted below.
29173    { $as_echo "$as_me:$LINENO: result: alsa pulse x11" >&5
29174$as_echo "alsa pulse x11" >&6; }
29175fi
29176
29177if test "x$OPENJDK_TARGET_OS" = xbsd; then
29178    { $as_echo "$as_me:$LINENO: checking what is not needed on bsd?" >&5
29179$as_echo_n "checking what is not needed on bsd?... " >&6; }
29180    ALSA_NOT_NEEDED=yes
29181    { $as_echo "$as_me:$LINENO: result: alsa" >&5
29182$as_echo "alsa" >&6; }
29183fi
29184
29185if test "x$OPENJDK" = "xfalse"; then
29186    FREETYPE2_NOT_NEEDED=yes
29187fi
29188
29189if test "x$SUPPORT_HEADFUL" = xno; then
29190    X11_NOT_NEEDED=yes
29191fi
29192
29193###############################################################################
29194#
29195# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29196# that uses this API.
29197#
29198# Check whether --enable-macosx-runtime-support was given.
29199if test "${enable_macosx_runtime_support+set}" = set; then
29200  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29201else
29202  MACOSX_RUNTIME_SUPPORT="no"
29203fi
29204
29205
29206USE_MACOSX_RUNTIME_SUPPORT=no
29207{ $as_echo "$as_me:$LINENO: checking for explicit Java runtime support in the OS" >&5
29208$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29209if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29210    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29211        MACOSX_RUNTIME_SUPPORT=yes
29212        USE_MACOSX_RUNTIME_SUPPORT=yes
29213        { $as_echo "$as_me:$LINENO: result: yes, does not need alsa freetype2 pulse and X11" >&5
29214$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29215    else
29216        { $as_echo "$as_me:$LINENO: result: yes, but explicitly disabled." >&5
29217$as_echo "yes, but explicitly disabled." >&6; }
29218    fi
29219else
29220    { $as_echo "$as_me:$LINENO: result: no" >&5
29221$as_echo "no" >&6; }
29222fi
29223
29224if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29225    { $as_echo "$as_me:$LINENO: checking what is not needed on an X11 build on MacOSX?" >&5
29226$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29227    X11_NOT_NEEDED=
29228    FREETYPE2_NOT_NEEDED=
29229    { $as_echo "$as_me:$LINENO: result: alsa pulse" >&5
29230$as_echo "alsa pulse" >&6; }
29231fi
29232
29233
29234
29235
29236###############################################################################
29237#
29238# Check for X Windows
29239#
29240
29241# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29242# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29243# --x-libraries for the sysroot, if that seems to be correct.
29244if test "x$SYS_ROOT" != "x/"; then
29245  if test "x$x_includes" = xNONE; then
29246    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29247      x_includes="$SYS_ROOT/usr/X11R6/include"
29248    fi
29249  fi
29250  if test "x$x_libraries" = xNONE; then
29251    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29252      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29253    fi
29254  fi
29255fi
29256
29257# Now let autoconf do it's magic
29258{ $as_echo "$as_me:$LINENO: checking for X" >&5
29259$as_echo_n "checking for X... " >&6; }
29260
29261
29262# Check whether --with-x was given.
29263if test "${with_x+set}" = set; then
29264  withval=$with_x;
29265fi
29266
29267# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29268if test "x$with_x" = xno; then
29269  # The user explicitly disabled X.
29270  have_x=disabled
29271else
29272  case $x_includes,$x_libraries in #(
29273    *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5
29274$as_echo "$as_me: error: cannot use X directory names containing '" >&2;}
29275   { (exit 1); exit 1; }; };; #(
29276    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
29277  $as_echo_n "(cached) " >&6
29278else
29279  # One or both of the vars are not set, and there is no cached value.
29280ac_x_includes=no ac_x_libraries=no
29281rm -f -r conftest.dir
29282if mkdir conftest.dir; then
29283  cd conftest.dir
29284  cat >Imakefile <<'_ACEOF'
29285incroot:
29286	@echo incroot='${INCROOT}'
29287usrlibdir:
29288	@echo usrlibdir='${USRLIBDIR}'
29289libdir:
29290	@echo libdir='${LIBDIR}'
29291_ACEOF
29292  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29293    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
29294    for ac_var in incroot usrlibdir libdir; do
29295      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29296    done
29297    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29298    for ac_extension in a so sl dylib la dll; do
29299      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29300	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29301	ac_im_usrlibdir=$ac_im_libdir; break
29302      fi
29303    done
29304    # Screen out bogus values from the imake configuration.  They are
29305    # bogus both because they are the default anyway, and because
29306    # using them would break gcc on systems where it needs fixed includes.
29307    case $ac_im_incroot in
29308	/usr/include) ac_x_includes= ;;
29309	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29310    esac
29311    case $ac_im_usrlibdir in
29312	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29313	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29314    esac
29315  fi
29316  cd ..
29317  rm -f -r conftest.dir
29318fi
29319
29320# Standard set of common directories for X headers.
29321# Check X11 before X11Rn because it is often a symlink to the current release.
29322ac_x_header_dirs='
29323/usr/X11/include
29324/usr/X11R6/include
29325/usr/X11R5/include
29326/usr/X11R4/include
29327
29328/usr/include/X11
29329/usr/include/X11R6
29330/usr/include/X11R5
29331/usr/include/X11R4
29332
29333/usr/local/X11/include
29334/usr/local/X11R6/include
29335/usr/local/X11R5/include
29336/usr/local/X11R4/include
29337
29338/usr/local/include/X11
29339/usr/local/include/X11R6
29340/usr/local/include/X11R5
29341/usr/local/include/X11R4
29342
29343/usr/X386/include
29344/usr/x386/include
29345/usr/XFree86/include/X11
29346
29347/usr/include
29348/usr/local/include
29349/usr/unsupported/include
29350/usr/athena/include
29351/usr/local/x11r5/include
29352/usr/lpp/Xamples/include
29353
29354/usr/openwin/include
29355/usr/openwin/share/include'
29356
29357if test "$ac_x_includes" = no; then
29358  # Guess where to find include files, by looking for Xlib.h.
29359  # First, try using that file with no special directory specified.
29360  cat >conftest.$ac_ext <<_ACEOF
29361/* confdefs.h.  */
29362_ACEOF
29363cat confdefs.h >>conftest.$ac_ext
29364cat >>conftest.$ac_ext <<_ACEOF
29365/* end confdefs.h.  */
29366#include <X11/Xlib.h>
29367_ACEOF
29368if { (ac_try="$ac_cpp conftest.$ac_ext"
29369case "(($ac_try" in
29370  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29371  *) ac_try_echo=$ac_try;;
29372esac
29373eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29374$as_echo "$ac_try_echo") >&5
29375  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29376  ac_status=$?
29377  grep -v '^ *+' conftest.er1 >conftest.err
29378  rm -f conftest.er1
29379  cat conftest.err >&5
29380  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29381  (exit $ac_status); } >/dev/null && {
29382	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
29383	 test ! -s conftest.err
29384       }; then
29385  # We can compile using X headers with no special include directory.
29386ac_x_includes=
29387else
29388  $as_echo "$as_me: failed program was:" >&5
29389sed 's/^/| /' conftest.$ac_ext >&5
29390
29391  for ac_dir in $ac_x_header_dirs; do
29392  if test -r "$ac_dir/X11/Xlib.h"; then
29393    ac_x_includes=$ac_dir
29394    break
29395  fi
29396done
29397fi
29398
29399rm -f conftest.err conftest.$ac_ext
29400fi # $ac_x_includes = no
29401
29402if test "$ac_x_libraries" = no; then
29403  # Check for the libraries.
29404  # See if we find them without any special options.
29405  # Don't add to $LIBS permanently.
29406  ac_save_LIBS=$LIBS
29407  LIBS="-lX11 $LIBS"
29408  cat >conftest.$ac_ext <<_ACEOF
29409/* confdefs.h.  */
29410_ACEOF
29411cat confdefs.h >>conftest.$ac_ext
29412cat >>conftest.$ac_ext <<_ACEOF
29413/* end confdefs.h.  */
29414#include <X11/Xlib.h>
29415int
29416main ()
29417{
29418XrmInitialize ()
29419  ;
29420  return 0;
29421}
29422_ACEOF
29423rm -f conftest.$ac_objext conftest$ac_exeext
29424if { (ac_try="$ac_link"
29425case "(($ac_try" in
29426  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29427  *) ac_try_echo=$ac_try;;
29428esac
29429eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29430$as_echo "$ac_try_echo") >&5
29431  (eval "$ac_link") 2>conftest.er1
29432  ac_status=$?
29433  grep -v '^ *+' conftest.er1 >conftest.err
29434  rm -f conftest.er1
29435  cat conftest.err >&5
29436  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29437  (exit $ac_status); } && {
29438	 test -z "$ac_cxx_werror_flag" ||
29439	 test ! -s conftest.err
29440       } && test -s conftest$ac_exeext && {
29441	 test "$cross_compiling" = yes ||
29442	 $as_test_x conftest$ac_exeext
29443       }; then
29444  LIBS=$ac_save_LIBS
29445# We can link X programs with no special library path.
29446ac_x_libraries=
29447else
29448  $as_echo "$as_me: failed program was:" >&5
29449sed 's/^/| /' conftest.$ac_ext >&5
29450
29451	LIBS=$ac_save_LIBS
29452for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29453do
29454  # Don't even attempt the hair of trying to link an X program!
29455  for ac_extension in a so sl dylib la dll; do
29456    if test -r "$ac_dir/libX11.$ac_extension"; then
29457      ac_x_libraries=$ac_dir
29458      break 2
29459    fi
29460  done
29461done
29462fi
29463
29464rm -rf conftest.dSYM
29465rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29466      conftest$ac_exeext conftest.$ac_ext
29467fi # $ac_x_libraries = no
29468
29469case $ac_x_includes,$ac_x_libraries in #(
29470  no,* | *,no | *\'*)
29471    # Didn't find X, or a directory has "'" in its name.
29472    ac_cv_have_x="have_x=no";; #(
29473  *)
29474    # Record where we found X for the cache.
29475    ac_cv_have_x="have_x=yes\
29476	ac_x_includes='$ac_x_includes'\
29477	ac_x_libraries='$ac_x_libraries'"
29478esac
29479fi
29480;; #(
29481    *) have_x=yes;;
29482  esac
29483  eval "$ac_cv_have_x"
29484fi # $with_x != no
29485
29486if test "$have_x" != yes; then
29487  { $as_echo "$as_me:$LINENO: result: $have_x" >&5
29488$as_echo "$have_x" >&6; }
29489  no_x=yes
29490else
29491  # If each of the values was on the command line, it overrides each guess.
29492  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29493  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29494  # Update the cache value to reflect the command line values.
29495  ac_cv_have_x="have_x=yes\
29496	ac_x_includes='$x_includes'\
29497	ac_x_libraries='$x_libraries'"
29498  { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
29499$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29500fi
29501
29502if test "$no_x" = yes; then
29503  # Not all programs may use this symbol, but it does not hurt to define it.
29504
29505cat >>confdefs.h <<\_ACEOF
29506#define X_DISPLAY_MISSING 1
29507_ACEOF
29508
29509  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29510else
29511  if test -n "$x_includes"; then
29512    X_CFLAGS="$X_CFLAGS -I$x_includes"
29513  fi
29514
29515  # It would also be nice to do this for all -L options, not just this one.
29516  if test -n "$x_libraries"; then
29517    X_LIBS="$X_LIBS -L$x_libraries"
29518    # For Solaris; some versions of Sun CC require a space after -R and
29519    # others require no space.  Words are not sufficient . . . .
29520    { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
29521$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29522    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29523    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29524    ac_cxx_werror_flag=yes
29525    cat >conftest.$ac_ext <<_ACEOF
29526/* confdefs.h.  */
29527_ACEOF
29528cat confdefs.h >>conftest.$ac_ext
29529cat >>conftest.$ac_ext <<_ACEOF
29530/* end confdefs.h.  */
29531
29532int
29533main ()
29534{
29535
29536  ;
29537  return 0;
29538}
29539_ACEOF
29540rm -f conftest.$ac_objext conftest$ac_exeext
29541if { (ac_try="$ac_link"
29542case "(($ac_try" in
29543  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29544  *) ac_try_echo=$ac_try;;
29545esac
29546eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29547$as_echo "$ac_try_echo") >&5
29548  (eval "$ac_link") 2>conftest.er1
29549  ac_status=$?
29550  grep -v '^ *+' conftest.er1 >conftest.err
29551  rm -f conftest.er1
29552  cat conftest.err >&5
29553  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29554  (exit $ac_status); } && {
29555	 test -z "$ac_cxx_werror_flag" ||
29556	 test ! -s conftest.err
29557       } && test -s conftest$ac_exeext && {
29558	 test "$cross_compiling" = yes ||
29559	 $as_test_x conftest$ac_exeext
29560       }; then
29561  { $as_echo "$as_me:$LINENO: result: no" >&5
29562$as_echo "no" >&6; }
29563       X_LIBS="$X_LIBS -R$x_libraries"
29564else
29565  $as_echo "$as_me: failed program was:" >&5
29566sed 's/^/| /' conftest.$ac_ext >&5
29567
29568	LIBS="$ac_xsave_LIBS -R $x_libraries"
29569       cat >conftest.$ac_ext <<_ACEOF
29570/* confdefs.h.  */
29571_ACEOF
29572cat confdefs.h >>conftest.$ac_ext
29573cat >>conftest.$ac_ext <<_ACEOF
29574/* end confdefs.h.  */
29575
29576int
29577main ()
29578{
29579
29580  ;
29581  return 0;
29582}
29583_ACEOF
29584rm -f conftest.$ac_objext conftest$ac_exeext
29585if { (ac_try="$ac_link"
29586case "(($ac_try" in
29587  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29588  *) ac_try_echo=$ac_try;;
29589esac
29590eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29591$as_echo "$ac_try_echo") >&5
29592  (eval "$ac_link") 2>conftest.er1
29593  ac_status=$?
29594  grep -v '^ *+' conftest.er1 >conftest.err
29595  rm -f conftest.er1
29596  cat conftest.err >&5
29597  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29598  (exit $ac_status); } && {
29599	 test -z "$ac_cxx_werror_flag" ||
29600	 test ! -s conftest.err
29601       } && test -s conftest$ac_exeext && {
29602	 test "$cross_compiling" = yes ||
29603	 $as_test_x conftest$ac_exeext
29604       }; then
29605  { $as_echo "$as_me:$LINENO: result: yes" >&5
29606$as_echo "yes" >&6; }
29607	  X_LIBS="$X_LIBS -R $x_libraries"
29608else
29609  $as_echo "$as_me: failed program was:" >&5
29610sed 's/^/| /' conftest.$ac_ext >&5
29611
29612	{ $as_echo "$as_me:$LINENO: result: neither works" >&5
29613$as_echo "neither works" >&6; }
29614fi
29615
29616rm -rf conftest.dSYM
29617rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29618      conftest$ac_exeext conftest.$ac_ext
29619fi
29620
29621rm -rf conftest.dSYM
29622rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29623      conftest$ac_exeext conftest.$ac_ext
29624    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29625    LIBS=$ac_xsave_LIBS
29626  fi
29627
29628  # Check for system-dependent libraries X programs must link with.
29629  # Do this before checking for the system-independent R6 libraries
29630  # (-lICE), since we may need -lsocket or whatever for X linking.
29631
29632  if test "$ISC" = yes; then
29633    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29634  else
29635    # Martyn Johnson says this is needed for Ultrix, if the X
29636    # libraries were built with DECnet support.  And Karl Berry says
29637    # the Alpha needs dnet_stub (dnet does not exist).
29638    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29639    cat >conftest.$ac_ext <<_ACEOF
29640/* confdefs.h.  */
29641_ACEOF
29642cat confdefs.h >>conftest.$ac_ext
29643cat >>conftest.$ac_ext <<_ACEOF
29644/* end confdefs.h.  */
29645
29646/* Override any GCC internal prototype to avoid an error.
29647   Use char because int might match the return type of a GCC
29648   builtin and then its argument prototype would still apply.  */
29649#ifdef __cplusplus
29650extern "C"
29651#endif
29652char XOpenDisplay ();
29653int
29654main ()
29655{
29656return XOpenDisplay ();
29657  ;
29658  return 0;
29659}
29660_ACEOF
29661rm -f conftest.$ac_objext conftest$ac_exeext
29662if { (ac_try="$ac_link"
29663case "(($ac_try" in
29664  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29665  *) ac_try_echo=$ac_try;;
29666esac
29667eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29668$as_echo "$ac_try_echo") >&5
29669  (eval "$ac_link") 2>conftest.er1
29670  ac_status=$?
29671  grep -v '^ *+' conftest.er1 >conftest.err
29672  rm -f conftest.er1
29673  cat conftest.err >&5
29674  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29675  (exit $ac_status); } && {
29676	 test -z "$ac_cxx_werror_flag" ||
29677	 test ! -s conftest.err
29678       } && test -s conftest$ac_exeext && {
29679	 test "$cross_compiling" = yes ||
29680	 $as_test_x conftest$ac_exeext
29681       }; then
29682  :
29683else
29684  $as_echo "$as_me: failed program was:" >&5
29685sed 's/^/| /' conftest.$ac_ext >&5
29686
29687	{ $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
29688$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29689if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
29690  $as_echo_n "(cached) " >&6
29691else
29692  ac_check_lib_save_LIBS=$LIBS
29693LIBS="-ldnet  $LIBS"
29694cat >conftest.$ac_ext <<_ACEOF
29695/* confdefs.h.  */
29696_ACEOF
29697cat confdefs.h >>conftest.$ac_ext
29698cat >>conftest.$ac_ext <<_ACEOF
29699/* end confdefs.h.  */
29700
29701/* Override any GCC internal prototype to avoid an error.
29702   Use char because int might match the return type of a GCC
29703   builtin and then its argument prototype would still apply.  */
29704#ifdef __cplusplus
29705extern "C"
29706#endif
29707char dnet_ntoa ();
29708int
29709main ()
29710{
29711return dnet_ntoa ();
29712  ;
29713  return 0;
29714}
29715_ACEOF
29716rm -f conftest.$ac_objext conftest$ac_exeext
29717if { (ac_try="$ac_link"
29718case "(($ac_try" in
29719  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29720  *) ac_try_echo=$ac_try;;
29721esac
29722eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29723$as_echo "$ac_try_echo") >&5
29724  (eval "$ac_link") 2>conftest.er1
29725  ac_status=$?
29726  grep -v '^ *+' conftest.er1 >conftest.err
29727  rm -f conftest.er1
29728  cat conftest.err >&5
29729  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29730  (exit $ac_status); } && {
29731	 test -z "$ac_cxx_werror_flag" ||
29732	 test ! -s conftest.err
29733       } && test -s conftest$ac_exeext && {
29734	 test "$cross_compiling" = yes ||
29735	 $as_test_x conftest$ac_exeext
29736       }; then
29737  ac_cv_lib_dnet_dnet_ntoa=yes
29738else
29739  $as_echo "$as_me: failed program was:" >&5
29740sed 's/^/| /' conftest.$ac_ext >&5
29741
29742	ac_cv_lib_dnet_dnet_ntoa=no
29743fi
29744
29745rm -rf conftest.dSYM
29746rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29747      conftest$ac_exeext conftest.$ac_ext
29748LIBS=$ac_check_lib_save_LIBS
29749fi
29750{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29751$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29752if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then
29753  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29754fi
29755
29756    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
29757      { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
29758$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
29759if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
29760  $as_echo_n "(cached) " >&6
29761else
29762  ac_check_lib_save_LIBS=$LIBS
29763LIBS="-ldnet_stub  $LIBS"
29764cat >conftest.$ac_ext <<_ACEOF
29765/* confdefs.h.  */
29766_ACEOF
29767cat confdefs.h >>conftest.$ac_ext
29768cat >>conftest.$ac_ext <<_ACEOF
29769/* end confdefs.h.  */
29770
29771/* Override any GCC internal prototype to avoid an error.
29772   Use char because int might match the return type of a GCC
29773   builtin and then its argument prototype would still apply.  */
29774#ifdef __cplusplus
29775extern "C"
29776#endif
29777char dnet_ntoa ();
29778int
29779main ()
29780{
29781return dnet_ntoa ();
29782  ;
29783  return 0;
29784}
29785_ACEOF
29786rm -f conftest.$ac_objext conftest$ac_exeext
29787if { (ac_try="$ac_link"
29788case "(($ac_try" in
29789  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29790  *) ac_try_echo=$ac_try;;
29791esac
29792eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29793$as_echo "$ac_try_echo") >&5
29794  (eval "$ac_link") 2>conftest.er1
29795  ac_status=$?
29796  grep -v '^ *+' conftest.er1 >conftest.err
29797  rm -f conftest.er1
29798  cat conftest.err >&5
29799  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29800  (exit $ac_status); } && {
29801	 test -z "$ac_cxx_werror_flag" ||
29802	 test ! -s conftest.err
29803       } && test -s conftest$ac_exeext && {
29804	 test "$cross_compiling" = yes ||
29805	 $as_test_x conftest$ac_exeext
29806       }; then
29807  ac_cv_lib_dnet_stub_dnet_ntoa=yes
29808else
29809  $as_echo "$as_me: failed program was:" >&5
29810sed 's/^/| /' conftest.$ac_ext >&5
29811
29812	ac_cv_lib_dnet_stub_dnet_ntoa=no
29813fi
29814
29815rm -rf conftest.dSYM
29816rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29817      conftest$ac_exeext conftest.$ac_ext
29818LIBS=$ac_check_lib_save_LIBS
29819fi
29820{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
29821$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
29822if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then
29823  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
29824fi
29825
29826    fi
29827fi
29828
29829rm -rf conftest.dSYM
29830rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29831      conftest$ac_exeext conftest.$ac_ext
29832    LIBS="$ac_xsave_LIBS"
29833
29834    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
29835    # to get the SysV transport functions.
29836    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
29837    # needs -lnsl.
29838    # The nsl library prevents programs from opening the X display
29839    # on Irix 5.2, according to T.E. Dickey.
29840    # The functions gethostbyname, getservbyname, and inet_addr are
29841    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
29842    { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5
29843$as_echo_n "checking for gethostbyname... " >&6; }
29844if test "${ac_cv_func_gethostbyname+set}" = set; then
29845  $as_echo_n "(cached) " >&6
29846else
29847  cat >conftest.$ac_ext <<_ACEOF
29848/* confdefs.h.  */
29849_ACEOF
29850cat confdefs.h >>conftest.$ac_ext
29851cat >>conftest.$ac_ext <<_ACEOF
29852/* end confdefs.h.  */
29853/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
29854   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
29855#define gethostbyname innocuous_gethostbyname
29856
29857/* System header to define __stub macros and hopefully few prototypes,
29858    which can conflict with char gethostbyname (); below.
29859    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
29860    <limits.h> exists even on freestanding compilers.  */
29861
29862#ifdef __STDC__
29863# include <limits.h>
29864#else
29865# include <assert.h>
29866#endif
29867
29868#undef gethostbyname
29869
29870/* Override any GCC internal prototype to avoid an error.
29871   Use char because int might match the return type of a GCC
29872   builtin and then its argument prototype would still apply.  */
29873#ifdef __cplusplus
29874extern "C"
29875#endif
29876char gethostbyname ();
29877/* The GNU C library defines this for functions which it implements
29878    to always fail with ENOSYS.  Some functions are actually named
29879    something starting with __ and the normal name is an alias.  */
29880#if defined __stub_gethostbyname || defined __stub___gethostbyname
29881choke me
29882#endif
29883
29884int
29885main ()
29886{
29887return gethostbyname ();
29888  ;
29889  return 0;
29890}
29891_ACEOF
29892rm -f conftest.$ac_objext conftest$ac_exeext
29893if { (ac_try="$ac_link"
29894case "(($ac_try" in
29895  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29896  *) ac_try_echo=$ac_try;;
29897esac
29898eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29899$as_echo "$ac_try_echo") >&5
29900  (eval "$ac_link") 2>conftest.er1
29901  ac_status=$?
29902  grep -v '^ *+' conftest.er1 >conftest.err
29903  rm -f conftest.er1
29904  cat conftest.err >&5
29905  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29906  (exit $ac_status); } && {
29907	 test -z "$ac_cxx_werror_flag" ||
29908	 test ! -s conftest.err
29909       } && test -s conftest$ac_exeext && {
29910	 test "$cross_compiling" = yes ||
29911	 $as_test_x conftest$ac_exeext
29912       }; then
29913  ac_cv_func_gethostbyname=yes
29914else
29915  $as_echo "$as_me: failed program was:" >&5
29916sed 's/^/| /' conftest.$ac_ext >&5
29917
29918	ac_cv_func_gethostbyname=no
29919fi
29920
29921rm -rf conftest.dSYM
29922rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29923      conftest$ac_exeext conftest.$ac_ext
29924fi
29925{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
29926$as_echo "$ac_cv_func_gethostbyname" >&6; }
29927
29928    if test $ac_cv_func_gethostbyname = no; then
29929      { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
29930$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
29931if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
29932  $as_echo_n "(cached) " >&6
29933else
29934  ac_check_lib_save_LIBS=$LIBS
29935LIBS="-lnsl  $LIBS"
29936cat >conftest.$ac_ext <<_ACEOF
29937/* confdefs.h.  */
29938_ACEOF
29939cat confdefs.h >>conftest.$ac_ext
29940cat >>conftest.$ac_ext <<_ACEOF
29941/* end confdefs.h.  */
29942
29943/* Override any GCC internal prototype to avoid an error.
29944   Use char because int might match the return type of a GCC
29945   builtin and then its argument prototype would still apply.  */
29946#ifdef __cplusplus
29947extern "C"
29948#endif
29949char gethostbyname ();
29950int
29951main ()
29952{
29953return gethostbyname ();
29954  ;
29955  return 0;
29956}
29957_ACEOF
29958rm -f conftest.$ac_objext conftest$ac_exeext
29959if { (ac_try="$ac_link"
29960case "(($ac_try" in
29961  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29962  *) ac_try_echo=$ac_try;;
29963esac
29964eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29965$as_echo "$ac_try_echo") >&5
29966  (eval "$ac_link") 2>conftest.er1
29967  ac_status=$?
29968  grep -v '^ *+' conftest.er1 >conftest.err
29969  rm -f conftest.er1
29970  cat conftest.err >&5
29971  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29972  (exit $ac_status); } && {
29973	 test -z "$ac_cxx_werror_flag" ||
29974	 test ! -s conftest.err
29975       } && test -s conftest$ac_exeext && {
29976	 test "$cross_compiling" = yes ||
29977	 $as_test_x conftest$ac_exeext
29978       }; then
29979  ac_cv_lib_nsl_gethostbyname=yes
29980else
29981  $as_echo "$as_me: failed program was:" >&5
29982sed 's/^/| /' conftest.$ac_ext >&5
29983
29984	ac_cv_lib_nsl_gethostbyname=no
29985fi
29986
29987rm -rf conftest.dSYM
29988rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29989      conftest$ac_exeext conftest.$ac_ext
29990LIBS=$ac_check_lib_save_LIBS
29991fi
29992{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
29993$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29994if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
29995  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29996fi
29997
29998      if test $ac_cv_lib_nsl_gethostbyname = no; then
29999	{ $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
30000$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30001if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
30002  $as_echo_n "(cached) " >&6
30003else
30004  ac_check_lib_save_LIBS=$LIBS
30005LIBS="-lbsd  $LIBS"
30006cat >conftest.$ac_ext <<_ACEOF
30007/* confdefs.h.  */
30008_ACEOF
30009cat confdefs.h >>conftest.$ac_ext
30010cat >>conftest.$ac_ext <<_ACEOF
30011/* end confdefs.h.  */
30012
30013/* Override any GCC internal prototype to avoid an error.
30014   Use char because int might match the return type of a GCC
30015   builtin and then its argument prototype would still apply.  */
30016#ifdef __cplusplus
30017extern "C"
30018#endif
30019char gethostbyname ();
30020int
30021main ()
30022{
30023return gethostbyname ();
30024  ;
30025  return 0;
30026}
30027_ACEOF
30028rm -f conftest.$ac_objext conftest$ac_exeext
30029if { (ac_try="$ac_link"
30030case "(($ac_try" in
30031  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30032  *) ac_try_echo=$ac_try;;
30033esac
30034eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30035$as_echo "$ac_try_echo") >&5
30036  (eval "$ac_link") 2>conftest.er1
30037  ac_status=$?
30038  grep -v '^ *+' conftest.er1 >conftest.err
30039  rm -f conftest.er1
30040  cat conftest.err >&5
30041  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30042  (exit $ac_status); } && {
30043	 test -z "$ac_cxx_werror_flag" ||
30044	 test ! -s conftest.err
30045       } && test -s conftest$ac_exeext && {
30046	 test "$cross_compiling" = yes ||
30047	 $as_test_x conftest$ac_exeext
30048       }; then
30049  ac_cv_lib_bsd_gethostbyname=yes
30050else
30051  $as_echo "$as_me: failed program was:" >&5
30052sed 's/^/| /' conftest.$ac_ext >&5
30053
30054	ac_cv_lib_bsd_gethostbyname=no
30055fi
30056
30057rm -rf conftest.dSYM
30058rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30059      conftest$ac_exeext conftest.$ac_ext
30060LIBS=$ac_check_lib_save_LIBS
30061fi
30062{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
30063$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30064if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then
30065  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30066fi
30067
30068      fi
30069    fi
30070
30071    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30072    # socket/setsockopt and other routines are undefined under SCO ODT
30073    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30074    # on later versions), says Simon Leinen: it contains gethostby*
30075    # variants that don't use the name server (or something).  -lsocket
30076    # must be given before -lnsl if both are needed.  We assume that
30077    # if connect needs -lnsl, so does gethostbyname.
30078    { $as_echo "$as_me:$LINENO: checking for connect" >&5
30079$as_echo_n "checking for connect... " >&6; }
30080if test "${ac_cv_func_connect+set}" = set; then
30081  $as_echo_n "(cached) " >&6
30082else
30083  cat >conftest.$ac_ext <<_ACEOF
30084/* confdefs.h.  */
30085_ACEOF
30086cat confdefs.h >>conftest.$ac_ext
30087cat >>conftest.$ac_ext <<_ACEOF
30088/* end confdefs.h.  */
30089/* Define connect to an innocuous variant, in case <limits.h> declares connect.
30090   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
30091#define connect innocuous_connect
30092
30093/* System header to define __stub macros and hopefully few prototypes,
30094    which can conflict with char connect (); below.
30095    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30096    <limits.h> exists even on freestanding compilers.  */
30097
30098#ifdef __STDC__
30099# include <limits.h>
30100#else
30101# include <assert.h>
30102#endif
30103
30104#undef connect
30105
30106/* Override any GCC internal prototype to avoid an error.
30107   Use char because int might match the return type of a GCC
30108   builtin and then its argument prototype would still apply.  */
30109#ifdef __cplusplus
30110extern "C"
30111#endif
30112char connect ();
30113/* The GNU C library defines this for functions which it implements
30114    to always fail with ENOSYS.  Some functions are actually named
30115    something starting with __ and the normal name is an alias.  */
30116#if defined __stub_connect || defined __stub___connect
30117choke me
30118#endif
30119
30120int
30121main ()
30122{
30123return connect ();
30124  ;
30125  return 0;
30126}
30127_ACEOF
30128rm -f conftest.$ac_objext conftest$ac_exeext
30129if { (ac_try="$ac_link"
30130case "(($ac_try" in
30131  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30132  *) ac_try_echo=$ac_try;;
30133esac
30134eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30135$as_echo "$ac_try_echo") >&5
30136  (eval "$ac_link") 2>conftest.er1
30137  ac_status=$?
30138  grep -v '^ *+' conftest.er1 >conftest.err
30139  rm -f conftest.er1
30140  cat conftest.err >&5
30141  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30142  (exit $ac_status); } && {
30143	 test -z "$ac_cxx_werror_flag" ||
30144	 test ! -s conftest.err
30145       } && test -s conftest$ac_exeext && {
30146	 test "$cross_compiling" = yes ||
30147	 $as_test_x conftest$ac_exeext
30148       }; then
30149  ac_cv_func_connect=yes
30150else
30151  $as_echo "$as_me: failed program was:" >&5
30152sed 's/^/| /' conftest.$ac_ext >&5
30153
30154	ac_cv_func_connect=no
30155fi
30156
30157rm -rf conftest.dSYM
30158rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30159      conftest$ac_exeext conftest.$ac_ext
30160fi
30161{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
30162$as_echo "$ac_cv_func_connect" >&6; }
30163
30164    if test $ac_cv_func_connect = no; then
30165      { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
30166$as_echo_n "checking for connect in -lsocket... " >&6; }
30167if test "${ac_cv_lib_socket_connect+set}" = set; then
30168  $as_echo_n "(cached) " >&6
30169else
30170  ac_check_lib_save_LIBS=$LIBS
30171LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30172cat >conftest.$ac_ext <<_ACEOF
30173/* confdefs.h.  */
30174_ACEOF
30175cat confdefs.h >>conftest.$ac_ext
30176cat >>conftest.$ac_ext <<_ACEOF
30177/* end confdefs.h.  */
30178
30179/* Override any GCC internal prototype to avoid an error.
30180   Use char because int might match the return type of a GCC
30181   builtin and then its argument prototype would still apply.  */
30182#ifdef __cplusplus
30183extern "C"
30184#endif
30185char connect ();
30186int
30187main ()
30188{
30189return connect ();
30190  ;
30191  return 0;
30192}
30193_ACEOF
30194rm -f conftest.$ac_objext conftest$ac_exeext
30195if { (ac_try="$ac_link"
30196case "(($ac_try" in
30197  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30198  *) ac_try_echo=$ac_try;;
30199esac
30200eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30201$as_echo "$ac_try_echo") >&5
30202  (eval "$ac_link") 2>conftest.er1
30203  ac_status=$?
30204  grep -v '^ *+' conftest.er1 >conftest.err
30205  rm -f conftest.er1
30206  cat conftest.err >&5
30207  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30208  (exit $ac_status); } && {
30209	 test -z "$ac_cxx_werror_flag" ||
30210	 test ! -s conftest.err
30211       } && test -s conftest$ac_exeext && {
30212	 test "$cross_compiling" = yes ||
30213	 $as_test_x conftest$ac_exeext
30214       }; then
30215  ac_cv_lib_socket_connect=yes
30216else
30217  $as_echo "$as_me: failed program was:" >&5
30218sed 's/^/| /' conftest.$ac_ext >&5
30219
30220	ac_cv_lib_socket_connect=no
30221fi
30222
30223rm -rf conftest.dSYM
30224rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30225      conftest$ac_exeext conftest.$ac_ext
30226LIBS=$ac_check_lib_save_LIBS
30227fi
30228{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
30229$as_echo "$ac_cv_lib_socket_connect" >&6; }
30230if test "x$ac_cv_lib_socket_connect" = x""yes; then
30231  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30232fi
30233
30234    fi
30235
30236    # Guillermo Gomez says -lposix is necessary on A/UX.
30237    { $as_echo "$as_me:$LINENO: checking for remove" >&5
30238$as_echo_n "checking for remove... " >&6; }
30239if test "${ac_cv_func_remove+set}" = set; then
30240  $as_echo_n "(cached) " >&6
30241else
30242  cat >conftest.$ac_ext <<_ACEOF
30243/* confdefs.h.  */
30244_ACEOF
30245cat confdefs.h >>conftest.$ac_ext
30246cat >>conftest.$ac_ext <<_ACEOF
30247/* end confdefs.h.  */
30248/* Define remove to an innocuous variant, in case <limits.h> declares remove.
30249   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
30250#define remove innocuous_remove
30251
30252/* System header to define __stub macros and hopefully few prototypes,
30253    which can conflict with char remove (); below.
30254    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30255    <limits.h> exists even on freestanding compilers.  */
30256
30257#ifdef __STDC__
30258# include <limits.h>
30259#else
30260# include <assert.h>
30261#endif
30262
30263#undef remove
30264
30265/* Override any GCC internal prototype to avoid an error.
30266   Use char because int might match the return type of a GCC
30267   builtin and then its argument prototype would still apply.  */
30268#ifdef __cplusplus
30269extern "C"
30270#endif
30271char remove ();
30272/* The GNU C library defines this for functions which it implements
30273    to always fail with ENOSYS.  Some functions are actually named
30274    something starting with __ and the normal name is an alias.  */
30275#if defined __stub_remove || defined __stub___remove
30276choke me
30277#endif
30278
30279int
30280main ()
30281{
30282return remove ();
30283  ;
30284  return 0;
30285}
30286_ACEOF
30287rm -f conftest.$ac_objext conftest$ac_exeext
30288if { (ac_try="$ac_link"
30289case "(($ac_try" in
30290  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30291  *) ac_try_echo=$ac_try;;
30292esac
30293eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30294$as_echo "$ac_try_echo") >&5
30295  (eval "$ac_link") 2>conftest.er1
30296  ac_status=$?
30297  grep -v '^ *+' conftest.er1 >conftest.err
30298  rm -f conftest.er1
30299  cat conftest.err >&5
30300  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30301  (exit $ac_status); } && {
30302	 test -z "$ac_cxx_werror_flag" ||
30303	 test ! -s conftest.err
30304       } && test -s conftest$ac_exeext && {
30305	 test "$cross_compiling" = yes ||
30306	 $as_test_x conftest$ac_exeext
30307       }; then
30308  ac_cv_func_remove=yes
30309else
30310  $as_echo "$as_me: failed program was:" >&5
30311sed 's/^/| /' conftest.$ac_ext >&5
30312
30313	ac_cv_func_remove=no
30314fi
30315
30316rm -rf conftest.dSYM
30317rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30318      conftest$ac_exeext conftest.$ac_ext
30319fi
30320{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
30321$as_echo "$ac_cv_func_remove" >&6; }
30322
30323    if test $ac_cv_func_remove = no; then
30324      { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5
30325$as_echo_n "checking for remove in -lposix... " >&6; }
30326if test "${ac_cv_lib_posix_remove+set}" = set; then
30327  $as_echo_n "(cached) " >&6
30328else
30329  ac_check_lib_save_LIBS=$LIBS
30330LIBS="-lposix  $LIBS"
30331cat >conftest.$ac_ext <<_ACEOF
30332/* confdefs.h.  */
30333_ACEOF
30334cat confdefs.h >>conftest.$ac_ext
30335cat >>conftest.$ac_ext <<_ACEOF
30336/* end confdefs.h.  */
30337
30338/* Override any GCC internal prototype to avoid an error.
30339   Use char because int might match the return type of a GCC
30340   builtin and then its argument prototype would still apply.  */
30341#ifdef __cplusplus
30342extern "C"
30343#endif
30344char remove ();
30345int
30346main ()
30347{
30348return remove ();
30349  ;
30350  return 0;
30351}
30352_ACEOF
30353rm -f conftest.$ac_objext conftest$ac_exeext
30354if { (ac_try="$ac_link"
30355case "(($ac_try" in
30356  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30357  *) ac_try_echo=$ac_try;;
30358esac
30359eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30360$as_echo "$ac_try_echo") >&5
30361  (eval "$ac_link") 2>conftest.er1
30362  ac_status=$?
30363  grep -v '^ *+' conftest.er1 >conftest.err
30364  rm -f conftest.er1
30365  cat conftest.err >&5
30366  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30367  (exit $ac_status); } && {
30368	 test -z "$ac_cxx_werror_flag" ||
30369	 test ! -s conftest.err
30370       } && test -s conftest$ac_exeext && {
30371	 test "$cross_compiling" = yes ||
30372	 $as_test_x conftest$ac_exeext
30373       }; then
30374  ac_cv_lib_posix_remove=yes
30375else
30376  $as_echo "$as_me: failed program was:" >&5
30377sed 's/^/| /' conftest.$ac_ext >&5
30378
30379	ac_cv_lib_posix_remove=no
30380fi
30381
30382rm -rf conftest.dSYM
30383rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30384      conftest$ac_exeext conftest.$ac_ext
30385LIBS=$ac_check_lib_save_LIBS
30386fi
30387{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
30388$as_echo "$ac_cv_lib_posix_remove" >&6; }
30389if test "x$ac_cv_lib_posix_remove" = x""yes; then
30390  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30391fi
30392
30393    fi
30394
30395    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30396    { $as_echo "$as_me:$LINENO: checking for shmat" >&5
30397$as_echo_n "checking for shmat... " >&6; }
30398if test "${ac_cv_func_shmat+set}" = set; then
30399  $as_echo_n "(cached) " >&6
30400else
30401  cat >conftest.$ac_ext <<_ACEOF
30402/* confdefs.h.  */
30403_ACEOF
30404cat confdefs.h >>conftest.$ac_ext
30405cat >>conftest.$ac_ext <<_ACEOF
30406/* end confdefs.h.  */
30407/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
30408   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
30409#define shmat innocuous_shmat
30410
30411/* System header to define __stub macros and hopefully few prototypes,
30412    which can conflict with char shmat (); below.
30413    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30414    <limits.h> exists even on freestanding compilers.  */
30415
30416#ifdef __STDC__
30417# include <limits.h>
30418#else
30419# include <assert.h>
30420#endif
30421
30422#undef shmat
30423
30424/* Override any GCC internal prototype to avoid an error.
30425   Use char because int might match the return type of a GCC
30426   builtin and then its argument prototype would still apply.  */
30427#ifdef __cplusplus
30428extern "C"
30429#endif
30430char shmat ();
30431/* The GNU C library defines this for functions which it implements
30432    to always fail with ENOSYS.  Some functions are actually named
30433    something starting with __ and the normal name is an alias.  */
30434#if defined __stub_shmat || defined __stub___shmat
30435choke me
30436#endif
30437
30438int
30439main ()
30440{
30441return shmat ();
30442  ;
30443  return 0;
30444}
30445_ACEOF
30446rm -f conftest.$ac_objext conftest$ac_exeext
30447if { (ac_try="$ac_link"
30448case "(($ac_try" in
30449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30450  *) ac_try_echo=$ac_try;;
30451esac
30452eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30453$as_echo "$ac_try_echo") >&5
30454  (eval "$ac_link") 2>conftest.er1
30455  ac_status=$?
30456  grep -v '^ *+' conftest.er1 >conftest.err
30457  rm -f conftest.er1
30458  cat conftest.err >&5
30459  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30460  (exit $ac_status); } && {
30461	 test -z "$ac_cxx_werror_flag" ||
30462	 test ! -s conftest.err
30463       } && test -s conftest$ac_exeext && {
30464	 test "$cross_compiling" = yes ||
30465	 $as_test_x conftest$ac_exeext
30466       }; then
30467  ac_cv_func_shmat=yes
30468else
30469  $as_echo "$as_me: failed program was:" >&5
30470sed 's/^/| /' conftest.$ac_ext >&5
30471
30472	ac_cv_func_shmat=no
30473fi
30474
30475rm -rf conftest.dSYM
30476rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30477      conftest$ac_exeext conftest.$ac_ext
30478fi
30479{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
30480$as_echo "$ac_cv_func_shmat" >&6; }
30481
30482    if test $ac_cv_func_shmat = no; then
30483      { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
30484$as_echo_n "checking for shmat in -lipc... " >&6; }
30485if test "${ac_cv_lib_ipc_shmat+set}" = set; then
30486  $as_echo_n "(cached) " >&6
30487else
30488  ac_check_lib_save_LIBS=$LIBS
30489LIBS="-lipc  $LIBS"
30490cat >conftest.$ac_ext <<_ACEOF
30491/* confdefs.h.  */
30492_ACEOF
30493cat confdefs.h >>conftest.$ac_ext
30494cat >>conftest.$ac_ext <<_ACEOF
30495/* end confdefs.h.  */
30496
30497/* Override any GCC internal prototype to avoid an error.
30498   Use char because int might match the return type of a GCC
30499   builtin and then its argument prototype would still apply.  */
30500#ifdef __cplusplus
30501extern "C"
30502#endif
30503char shmat ();
30504int
30505main ()
30506{
30507return shmat ();
30508  ;
30509  return 0;
30510}
30511_ACEOF
30512rm -f conftest.$ac_objext conftest$ac_exeext
30513if { (ac_try="$ac_link"
30514case "(($ac_try" in
30515  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30516  *) ac_try_echo=$ac_try;;
30517esac
30518eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30519$as_echo "$ac_try_echo") >&5
30520  (eval "$ac_link") 2>conftest.er1
30521  ac_status=$?
30522  grep -v '^ *+' conftest.er1 >conftest.err
30523  rm -f conftest.er1
30524  cat conftest.err >&5
30525  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30526  (exit $ac_status); } && {
30527	 test -z "$ac_cxx_werror_flag" ||
30528	 test ! -s conftest.err
30529       } && test -s conftest$ac_exeext && {
30530	 test "$cross_compiling" = yes ||
30531	 $as_test_x conftest$ac_exeext
30532       }; then
30533  ac_cv_lib_ipc_shmat=yes
30534else
30535  $as_echo "$as_me: failed program was:" >&5
30536sed 's/^/| /' conftest.$ac_ext >&5
30537
30538	ac_cv_lib_ipc_shmat=no
30539fi
30540
30541rm -rf conftest.dSYM
30542rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30543      conftest$ac_exeext conftest.$ac_ext
30544LIBS=$ac_check_lib_save_LIBS
30545fi
30546{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
30547$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30548if test "x$ac_cv_lib_ipc_shmat" = x""yes; then
30549  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30550fi
30551
30552    fi
30553  fi
30554
30555  # Check for libraries that X11R6 Xt/Xaw programs need.
30556  ac_save_LDFLAGS=$LDFLAGS
30557  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30558  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30559  # check for ICE first), but we must link in the order -lSM -lICE or
30560  # we get undefined symbols.  So assume we have SM if we have ICE.
30561  # These have to be linked with before -lX11, unlike the other
30562  # libraries we check for below, so use a different variable.
30563  # John Interrante, Karl Berry
30564  { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
30565$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30566if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
30567  $as_echo_n "(cached) " >&6
30568else
30569  ac_check_lib_save_LIBS=$LIBS
30570LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30571cat >conftest.$ac_ext <<_ACEOF
30572/* confdefs.h.  */
30573_ACEOF
30574cat confdefs.h >>conftest.$ac_ext
30575cat >>conftest.$ac_ext <<_ACEOF
30576/* end confdefs.h.  */
30577
30578/* Override any GCC internal prototype to avoid an error.
30579   Use char because int might match the return type of a GCC
30580   builtin and then its argument prototype would still apply.  */
30581#ifdef __cplusplus
30582extern "C"
30583#endif
30584char IceConnectionNumber ();
30585int
30586main ()
30587{
30588return IceConnectionNumber ();
30589  ;
30590  return 0;
30591}
30592_ACEOF
30593rm -f conftest.$ac_objext conftest$ac_exeext
30594if { (ac_try="$ac_link"
30595case "(($ac_try" in
30596  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30597  *) ac_try_echo=$ac_try;;
30598esac
30599eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30600$as_echo "$ac_try_echo") >&5
30601  (eval "$ac_link") 2>conftest.er1
30602  ac_status=$?
30603  grep -v '^ *+' conftest.er1 >conftest.err
30604  rm -f conftest.er1
30605  cat conftest.err >&5
30606  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30607  (exit $ac_status); } && {
30608	 test -z "$ac_cxx_werror_flag" ||
30609	 test ! -s conftest.err
30610       } && test -s conftest$ac_exeext && {
30611	 test "$cross_compiling" = yes ||
30612	 $as_test_x conftest$ac_exeext
30613       }; then
30614  ac_cv_lib_ICE_IceConnectionNumber=yes
30615else
30616  $as_echo "$as_me: failed program was:" >&5
30617sed 's/^/| /' conftest.$ac_ext >&5
30618
30619	ac_cv_lib_ICE_IceConnectionNumber=no
30620fi
30621
30622rm -rf conftest.dSYM
30623rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30624      conftest$ac_exeext conftest.$ac_ext
30625LIBS=$ac_check_lib_save_LIBS
30626fi
30627{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30628$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30629if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then
30630  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30631fi
30632
30633  LDFLAGS=$ac_save_LDFLAGS
30634
30635fi
30636
30637
30638if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30639
30640    # Print a helpful message on how to acquire the necessary build dependency.
30641    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30642    MISSING_DEPENDENCY=x11
30643    PKGHANDLER_COMMAND=
30644
30645    case $PKGHANDLER in
30646	apt-get)
30647                apt_help     $MISSING_DEPENDENCY ;;
30648    yum)
30649                yum_help     $MISSING_DEPENDENCY ;;
30650	port)
30651                port_help    $MISSING_DEPENDENCY ;;
30652	pkgutil)
30653                pkgutil_help $MISSING_DEPENDENCY ;;
30654	pkgadd)
30655                pkgadd_help  $MISSING_DEPENDENCY ;;
30656    * )
30657      break ;;
30658    esac
30659
30660    if test "x$PKGHANDLER_COMMAND" != x; then
30661        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30662    fi
30663
30664    { { $as_echo "$as_me:$LINENO: error: Could not find X11 libraries. $HELP_MSG" >&5
30665$as_echo "$as_me: error: Could not find X11 libraries. $HELP_MSG" >&2;}
30666   { (exit 1); exit 1; }; }
30667fi
30668
30669# Some of the old makefiles require a setting of OPENWIN_HOME
30670# Since the X11R6 directory has disappeared on later Linuxes,
30671# we need to probe for it.
30672if test "x$OPENJDK_TARGET_OS" = xlinux; then
30673    if test -d "$SYS_ROOT/usr/X11R6"; then
30674        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30675    fi
30676    if test -d "$SYS_ROOT/usr/include/X11"; then
30677        OPENWIN_HOME="$SYS_ROOT/usr"
30678    fi
30679fi
30680if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30681    OPENWIN_HOME="/usr/openwin"
30682fi
30683
30684
30685
30686#
30687# Weird Sol10 something check...TODO change to try compile
30688#
30689if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30690  if test "`uname -r`" = "5.10"; then
30691     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30692     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30693     fi
30694  fi
30695fi
30696
30697ac_ext=c
30698ac_cpp='$CPP $CPPFLAGS'
30699ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30700ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30701ac_compiler_gnu=$ac_cv_c_compiler_gnu
30702
30703OLD_CFLAGS="$CFLAGS"
30704CFLAGS="$CFLAGS $X_CFLAGS"
30705
30706# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30707
30708
30709
30710for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30711do
30712as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30713{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
30714$as_echo_n "checking for $ac_header... " >&6; }
30715if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
30716  $as_echo_n "(cached) " >&6
30717else
30718  cat >conftest.$ac_ext <<_ACEOF
30719/* confdefs.h.  */
30720_ACEOF
30721cat confdefs.h >>conftest.$ac_ext
30722cat >>conftest.$ac_ext <<_ACEOF
30723/* end confdefs.h.  */
30724 # include <X11/Xlib.h>
30725                   # include <X11/Xutil.h>
30726
30727
30728#include <$ac_header>
30729_ACEOF
30730rm -f conftest.$ac_objext
30731if { (ac_try="$ac_compile"
30732case "(($ac_try" in
30733  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30734  *) ac_try_echo=$ac_try;;
30735esac
30736eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30737$as_echo "$ac_try_echo") >&5
30738  (eval "$ac_compile") 2>conftest.er1
30739  ac_status=$?
30740  grep -v '^ *+' conftest.er1 >conftest.err
30741  rm -f conftest.er1
30742  cat conftest.err >&5
30743  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30744  (exit $ac_status); } && {
30745	 test -z "$ac_c_werror_flag" ||
30746	 test ! -s conftest.err
30747       } && test -s conftest.$ac_objext; then
30748  eval "$as_ac_Header=yes"
30749else
30750  $as_echo "$as_me: failed program was:" >&5
30751sed 's/^/| /' conftest.$ac_ext >&5
30752
30753	eval "$as_ac_Header=no"
30754fi
30755
30756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30757fi
30758ac_res=`eval 'as_val=${'$as_ac_Header'}
30759		 $as_echo "$as_val"'`
30760	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
30761$as_echo "$ac_res" >&6; }
30762as_val=`eval 'as_val=${'$as_ac_Header'}
30763		 $as_echo "$as_val"'`
30764   if test "x$as_val" = x""yes; then
30765  cat >>confdefs.h <<_ACEOF
30766#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30767_ACEOF
30768 X11_A_OK=yes
30769else
30770  X11_A_OK=no
30771fi
30772
30773done
30774
30775
30776CFLAGS="$OLD_CFLAGS"
30777ac_ext=cpp
30778ac_cpp='$CXXCPP $CPPFLAGS'
30779ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30780ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30781ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30782
30783
30784if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30785
30786    # Print a helpful message on how to acquire the necessary build dependency.
30787    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30788    MISSING_DEPENDENCY=x11
30789    PKGHANDLER_COMMAND=
30790
30791    case $PKGHANDLER in
30792	apt-get)
30793                apt_help     $MISSING_DEPENDENCY ;;
30794    yum)
30795                yum_help     $MISSING_DEPENDENCY ;;
30796	port)
30797                port_help    $MISSING_DEPENDENCY ;;
30798	pkgutil)
30799                pkgutil_help $MISSING_DEPENDENCY ;;
30800	pkgadd)
30801                pkgadd_help  $MISSING_DEPENDENCY ;;
30802    * )
30803      break ;;
30804    esac
30805
30806    if test "x$PKGHANDLER_COMMAND" != x; then
30807        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30808    fi
30809
30810    { { $as_echo "$as_me:$LINENO: error: Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" >&5
30811$as_echo "$as_me: error: Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" >&2;}
30812   { (exit 1); exit 1; }; }
30813fi
30814
30815
30816
30817
30818
30819
30820###############################################################################
30821#
30822# The common unix printing system cups is used to print from java.
30823#
30824
30825# Check whether --with-cups was given.
30826if test "${with_cups+set}" = set; then
30827  withval=$with_cups;
30828fi
30829
30830
30831# Check whether --with-cups-include was given.
30832if test "${with_cups_include+set}" = set; then
30833  withval=$with_cups_include;
30834fi
30835
30836
30837if test "x$CUPS_NOT_NEEDED" = xyes; then
30838	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30839		{ $as_echo "$as_me:$LINENO: WARNING: cups not used, so --with-cups is ignored" >&5
30840$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30841	fi
30842	CUPS_CFLAGS=
30843else
30844	CUPS_FOUND=no
30845
30846	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30847	    { { $as_echo "$as_me:$LINENO: error: It is not possible to disable the use of cups. Remove the --without-cups option." >&5
30848$as_echo "$as_me: error: It is not possible to disable the use of cups. Remove the --without-cups option." >&2;}
30849   { (exit 1); exit 1; }; }
30850	fi
30851
30852	if test "x${with_cups}" != x; then
30853	    CUPS_CFLAGS="-I${with_cups}/include"
30854	    CUPS_FOUND=yes
30855	fi
30856	if test "x${with_cups_include}" != x; then
30857	    CUPS_CFLAGS="-I${with_cups_include}"
30858	    CUPS_FOUND=yes
30859	fi
30860	if test "x$CUPS_FOUND" = xno; then
30861
30862
30863    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30864        # Source the builddeps file again, to make sure it uses the latest variables!
30865        . $builddepsfile
30866        # Look for a target and build machine specific resource!
30867        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30868        if test "x$resource" = x; then
30869            # Ok, lets instead look for a target specific resource
30870            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30871        fi
30872        if test "x$resource" = x; then
30873            # Ok, lets instead look for a build specific resource
30874            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30875        fi
30876        if test "x$resource" = x; then
30877            # Ok, lets instead look for a generic resource
30878            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30879            resource=${builddep_cups}
30880        fi
30881        if test "x$resource" != x; then
30882            { $as_echo "$as_me:$LINENO: Using builddeps $resource for cups" >&5
30883$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30884	    # If the resource in the builddeps.conf file is an existing directory,
30885	    # for example /java/linux/cups
30886	    if test -d ${resource}; then
30887	       depdir=${resource}
30888	    else
30889
30890# cups is for example mymodule
30891# $resource is for example libs/general/libmymod_1_2_3.zip
30892# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30893# $with_builddeps_dir is for example /localhome/builddeps
30894# depdir is the name of the variable into which we store the depdir, eg MYMOD
30895# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30896# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30897    filename=`basename $resource`
30898    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30899    filebase=${filename%%.*}
30900    extension=${filename#*.}
30901    installdir=$with_builddeps_dir/$filebase
30902    if test ! -f $installdir/$filename.unpacked; then
30903        { $as_echo "$as_me:$LINENO: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30904$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30905        if test ! -d $installdir; then
30906            mkdir -p $installdir
30907        fi
30908        if test ! -d $installdir; then
30909            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
30910$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
30911   { (exit 1); exit 1; }; }
30912        fi
30913        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30914        touch $tmpfile
30915        if test ! -f $tmpfile; then
30916            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
30917$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
30918   { (exit 1); exit 1; }; }
30919        fi
30920
30921    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30922    # $tmpfile is the local file name for the downloaded file.
30923    VALID_TOOL=no
30924    if test "x$BDEPS_FTP" = xwget; then
30925       VALID_TOOL=yes
30926       wget -O $tmpfile $with_builddeps_server/$resource
30927    fi
30928    if test "x$BDEPS_FTP" = xlftp; then
30929       VALID_TOOL=yes
30930       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30931    fi
30932    if test "x$BDEPS_FTP" = xftp; then
30933        VALID_TOOL=yes
30934        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30935        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30936        FTPUSERPWD=${FTPSERVER%%@*}
30937        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30938            FTPUSER=${userpwd%%:*}
30939            FTPPWD=${userpwd#*@}
30940            FTPSERVER=${FTPSERVER#*@}
30941        else
30942            FTPUSER=ftp
30943            FTPPWD=ftp
30944        fi
30945        # the "pass" command does not work on some
30946        # ftp clients (read ftp.exe) but if it works,
30947        # passive mode is better!
30948        (\
30949            echo "user $FTPUSER $FTPPWD"        ;\
30950            echo "pass"                         ;\
30951            echo "bin"                          ;\
30952            echo "get $FTPPATH $tmpfile"              ;\
30953        ) | ftp -in $FTPSERVER
30954    fi
30955    if test "x$VALID_TOOL" != xyes; then
30956       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
30957$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
30958   { (exit 1); exit 1; }; }
30959    fi
30960
30961        mv $tmpfile $installdir/$filename
30962        if test ! -s $installdir/$filename; then
30963            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
30964$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
30965   { (exit 1); exit 1; }; }
30966        fi
30967        case "$extension" in
30968            zip)  echo "Unzipping $installdir/$filename..."
30969               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30970            ;;
30971            tar.gz) echo "Untaring $installdir/$filename..."
30972               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30973            ;;
30974            tgz) echo "Untaring $installdir/$filename..."
30975               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30976            ;;
30977            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
30978$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
30979   { (exit 1); exit 1; }; }
30980            ;;
30981        esac
30982    fi
30983    if test -f $installdir/$filename.unpacked; then
30984        depdir=$installdir
30985    fi
30986
30987	    fi
30988            # Source the builddeps file again, because in the previous command, the depdir
30989            # was updated to point at the current build dependency install directory.
30990            . $builddepsfile
30991            # Now extract variables from the builddeps.conf files.
30992            theroot=${builddep_cups_ROOT}
30993            thecflags=${builddep_cups_CFLAGS}
30994            thelibs=${builddep_cups_LIBS}
30995            if test "x$depdir" = x; then
30996                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency cups" >&5
30997$as_echo "$as_me: error: Could not download build dependency cups" >&2;}
30998   { (exit 1); exit 1; }; }
30999            fi
31000            CUPS=$depdir
31001            if test "x$theroot" != x; then
31002               CUPS="$theroot"
31003            fi
31004            if test "x$thecflags" != x; then
31005               CUPS_CFLAGS="$thecflags"
31006            fi
31007            if test "x$thelibs" != x; then
31008               CUPS_LIBS="$thelibs"
31009            fi
31010            CUPS_FOUND=yes
31011
31012        fi
31013
31014    fi
31015
31016	fi
31017	if test "x$CUPS_FOUND" = xno; then
31018	    # Are the cups headers installed in the default /usr/include location?
31019
31020
31021for ac_header in cups/cups.h cups/ppd.h
31022do
31023as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31024if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
31025  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
31026$as_echo_n "checking for $ac_header... " >&6; }
31027if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
31028  $as_echo_n "(cached) " >&6
31029fi
31030ac_res=`eval 'as_val=${'$as_ac_Header'}
31031		 $as_echo "$as_val"'`
31032	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
31033$as_echo "$ac_res" >&6; }
31034else
31035  # Is the header compilable?
31036{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
31037$as_echo_n "checking $ac_header usability... " >&6; }
31038cat >conftest.$ac_ext <<_ACEOF
31039/* confdefs.h.  */
31040_ACEOF
31041cat confdefs.h >>conftest.$ac_ext
31042cat >>conftest.$ac_ext <<_ACEOF
31043/* end confdefs.h.  */
31044$ac_includes_default
31045#include <$ac_header>
31046_ACEOF
31047rm -f conftest.$ac_objext
31048if { (ac_try="$ac_compile"
31049case "(($ac_try" in
31050  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31051  *) ac_try_echo=$ac_try;;
31052esac
31053eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31054$as_echo "$ac_try_echo") >&5
31055  (eval "$ac_compile") 2>conftest.er1
31056  ac_status=$?
31057  grep -v '^ *+' conftest.er1 >conftest.err
31058  rm -f conftest.er1
31059  cat conftest.err >&5
31060  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31061  (exit $ac_status); } && {
31062	 test -z "$ac_cxx_werror_flag" ||
31063	 test ! -s conftest.err
31064       } && test -s conftest.$ac_objext; then
31065  ac_header_compiler=yes
31066else
31067  $as_echo "$as_me: failed program was:" >&5
31068sed 's/^/| /' conftest.$ac_ext >&5
31069
31070	ac_header_compiler=no
31071fi
31072
31073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31074{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
31075$as_echo "$ac_header_compiler" >&6; }
31076
31077# Is the header present?
31078{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
31079$as_echo_n "checking $ac_header presence... " >&6; }
31080cat >conftest.$ac_ext <<_ACEOF
31081/* confdefs.h.  */
31082_ACEOF
31083cat confdefs.h >>conftest.$ac_ext
31084cat >>conftest.$ac_ext <<_ACEOF
31085/* end confdefs.h.  */
31086#include <$ac_header>
31087_ACEOF
31088if { (ac_try="$ac_cpp conftest.$ac_ext"
31089case "(($ac_try" in
31090  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31091  *) ac_try_echo=$ac_try;;
31092esac
31093eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31094$as_echo "$ac_try_echo") >&5
31095  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
31096  ac_status=$?
31097  grep -v '^ *+' conftest.er1 >conftest.err
31098  rm -f conftest.er1
31099  cat conftest.err >&5
31100  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31101  (exit $ac_status); } >/dev/null && {
31102	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
31103	 test ! -s conftest.err
31104       }; then
31105  ac_header_preproc=yes
31106else
31107  $as_echo "$as_me: failed program was:" >&5
31108sed 's/^/| /' conftest.$ac_ext >&5
31109
31110  ac_header_preproc=no
31111fi
31112
31113rm -f conftest.err conftest.$ac_ext
31114{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
31115$as_echo "$ac_header_preproc" >&6; }
31116
31117# So?  What about this header?
31118case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
31119  yes:no: )
31120    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
31121$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
31122    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
31123$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
31124    ac_header_preproc=yes
31125    ;;
31126  no:yes:* )
31127    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
31128$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
31129    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
31130$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
31131    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
31132$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
31133    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
31134$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
31135    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
31136$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
31137    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
31138$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
31139    ( cat <<\_ASBOX
31140## ----------------------------------------- ##
31141## Report this to build-dev@openjdk.java.net ##
31142## ----------------------------------------- ##
31143_ASBOX
31144     ) | sed "s/^/$as_me: WARNING:     /" >&2
31145    ;;
31146esac
31147{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
31148$as_echo_n "checking for $ac_header... " >&6; }
31149if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
31150  $as_echo_n "(cached) " >&6
31151else
31152  eval "$as_ac_Header=\$ac_header_preproc"
31153fi
31154ac_res=`eval 'as_val=${'$as_ac_Header'}
31155		 $as_echo "$as_val"'`
31156	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
31157$as_echo "$ac_res" >&6; }
31158
31159fi
31160as_val=`eval 'as_val=${'$as_ac_Header'}
31161		 $as_echo "$as_val"'`
31162   if test "x$as_val" = x""yes; then
31163  cat >>confdefs.h <<_ACEOF
31164#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31165_ACEOF
31166 CUPS_FOUND=yes
31167	                      CUPS_CFLAGS=
31168	                      DEFAULT_CUPS=yes
31169fi
31170
31171done
31172
31173	fi
31174	if test "x$CUPS_FOUND" = xno; then
31175	    # Getting nervous now? Lets poke around for standard Solaris third-party
31176	    # package installation locations.
31177	    { $as_echo "$as_me:$LINENO: checking for cups headers" >&5
31178$as_echo_n "checking for cups headers... " >&6; }
31179	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31180	       # An SFW package seems to be installed!
31181	       CUPS_FOUND=yes
31182	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31183	    elif test -s /opt/csw/include/cups/cups.h; then
31184	       # A CSW package seems to be installed!
31185	       CUPS_FOUND=yes
31186	       CUPS_CFLAGS="-I/opt/csw/include"
31187	    fi
31188	    { $as_echo "$as_me:$LINENO: result: $CUPS_FOUND" >&5
31189$as_echo "$CUPS_FOUND" >&6; }
31190	fi
31191	if test "x$CUPS_FOUND" = xno; then
31192
31193    # Print a helpful message on how to acquire the necessary build dependency.
31194    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31195    MISSING_DEPENDENCY=cups
31196    PKGHANDLER_COMMAND=
31197
31198    case $PKGHANDLER in
31199	apt-get)
31200                apt_help     $MISSING_DEPENDENCY ;;
31201    yum)
31202                yum_help     $MISSING_DEPENDENCY ;;
31203	port)
31204                port_help    $MISSING_DEPENDENCY ;;
31205	pkgutil)
31206                pkgutil_help $MISSING_DEPENDENCY ;;
31207	pkgadd)
31208                pkgadd_help  $MISSING_DEPENDENCY ;;
31209    * )
31210      break ;;
31211    esac
31212
31213    if test "x$PKGHANDLER_COMMAND" != x; then
31214        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31215    fi
31216
31217	    { { $as_echo "$as_me:$LINENO: error: Could not find cups! $HELP_MSG " >&5
31218$as_echo "$as_me: error: Could not find cups! $HELP_MSG " >&2;}
31219   { (exit 1); exit 1; }; }
31220	fi
31221fi
31222
31223
31224
31225
31226
31227
31228###############################################################################
31229#
31230# The ubiquitous freetype2 library is used to render fonts.
31231#
31232
31233# Check whether --with-freetype was given.
31234if test "${with_freetype+set}" = set; then
31235  withval=$with_freetype;
31236fi
31237
31238
31239# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31240USING_SYSTEM_FT_LIB=false
31241
31242if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31243	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31244		{ $as_echo "$as_me:$LINENO: WARNING: freetype not used, so --with-freetype is ignored" >&5
31245$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31246	fi
31247	FREETYPE2_CFLAGS=
31248	FREETYPE2_LIBS=
31249        FREETYPE2_LIB_PATH=
31250else
31251	FREETYPE2_FOUND=no
31252
31253	if test "x$with_freetype" != x; then
31254
31255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31256
31257  # Input might be given as Windows format, start by converting to
31258  # unix format.
31259  path="$with_freetype"
31260  new_path=`$CYGPATH -u "$path"`
31261
31262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31265  # "foo.exe" is OK but "foo" is an error.
31266  #
31267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31268  # It is also a way to make sure we got the proper file name for the real test later on.
31269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31270  if test "x$test_shortpath" = x; then
31271    { $as_echo "$as_me:$LINENO: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31272$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31273    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of with_freetype" >&5
31274$as_echo "$as_me: error: Cannot locate the the path of with_freetype" >&2;}
31275   { (exit 1); exit 1; }; }
31276  fi
31277
31278  # Call helper function which possibly converts this using DOS-style short mode.
31279  # If so, the updated path is stored in $new_path.
31280
31281  input_path="$new_path"
31282  # Check if we need to convert this using DOS-style short mode. If the path
31283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31284  # take no chances and rewrite it.
31285  # Note: m4 eats our [], so we need to use [ and ] instead.
31286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31287  if test "x$has_forbidden_chars" != x; then
31288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31292      # Going to short mode and back again did indeed matter. Since short mode is
31293      # case insensitive, let's make it lowercase to improve readability.
31294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31295      # Now convert it back to Unix-stile (cygpath)
31296      input_path=`$CYGPATH -u "$shortmode_path"`
31297      new_path="$input_path"
31298    fi
31299  fi
31300
31301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31302  if test "x$test_cygdrive_prefix" = x; then
31303    # As a simple fix, exclude /usr/bin since it's not a real path.
31304    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31306      # a path prefixed by /cygdrive for fixpath to work.
31307      new_path="$CYGWIN_ROOT_PATH$input_path"
31308    fi
31309  fi
31310
31311
31312  if test "x$path" != "x$new_path"; then
31313    with_freetype="$new_path"
31314    { $as_echo "$as_me:$LINENO: Rewriting with_freetype to \"$new_path\"" >&5
31315$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31316  fi
31317
31318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31319
31320  path="$with_freetype"
31321  has_colon=`$ECHO $path | $GREP ^.:`
31322  new_path="$path"
31323  if test "x$has_colon" = x; then
31324    # Not in mixed or Windows style, start by that.
31325    new_path=`cmd //c echo $path`
31326  fi
31327
31328
31329  input_path="$new_path"
31330  # Check if we need to convert this using DOS-style short mode. If the path
31331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31332  # take no chances and rewrite it.
31333  # Note: m4 eats our [], so we need to use [ and ] instead.
31334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31335  if test "x$has_forbidden_chars" != x; then
31336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31338  fi
31339
31340
31341  windows_path="$new_path"
31342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31343    unix_path=`$CYGPATH -u "$windows_path"`
31344    new_path="$unix_path"
31345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31347    new_path="$unix_path"
31348  fi
31349
31350  if test "x$path" != "x$new_path"; then
31351    with_freetype="$new_path"
31352    { $as_echo "$as_me:$LINENO: Rewriting with_freetype to \"$new_path\"" >&5
31353$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31354  fi
31355
31356  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31357  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31358
31359  else
31360    # We're on a posix platform. Hooray! :)
31361    path="$with_freetype"
31362
31363    if test ! -f "$path" && test ! -d "$path"; then
31364      { { $as_echo "$as_me:$LINENO: error: The path of with_freetype, which resolves as \"$path\", is not found." >&5
31365$as_echo "$as_me: error: The path of with_freetype, which resolves as \"$path\", is not found." >&2;}
31366   { (exit 1); exit 1; }; }
31367    fi
31368
31369    has_space=`$ECHO "$path" | $GREP " "`
31370    if test "x$has_space" != x; then
31371      { $as_echo "$as_me:$LINENO: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31372$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31373      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
31374$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
31375   { (exit 1); exit 1; }; }
31376    fi
31377  fi
31378
31379	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31380            FREETYPE2_LIB_PATH="$with_freetype/lib"
31381            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31382                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31383                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31384            fi
31385            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31386                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31387            fi
31388	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31389            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31390                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31391            fi
31392 	    FREETYPE2_FOUND=yes
31393   	    if test "x$FREETYPE2_FOUND" = xyes; then
31394	        # Verify that the directories exist
31395                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31396		   { { $as_echo "$as_me:$LINENO: error: Could not find the expected directories $with_freetype/lib and $with_freetype/include" >&5
31397$as_echo "$as_me: error: Could not find the expected directories $with_freetype/lib and $with_freetype/include" >&2;}
31398   { (exit 1); exit 1; }; }
31399		fi
31400	        # List the contents of the lib.
31401		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31402                if test "x$FREETYPELIB" = x; then
31403		   { { $as_echo "$as_me:$LINENO: error: Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" >&5
31404$as_echo "$as_me: error: Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" >&2;}
31405   { (exit 1); exit 1; }; }
31406		fi
31407	        # Check one h-file
31408                if ! test -s "$with_freetype/include/ft2build.h"; then
31409		   { { $as_echo "$as_me:$LINENO: error: Could not find $with_freetype/include/ft2build.h" >&5
31410$as_echo "$as_me: error: Could not find $with_freetype/include/ft2build.h" >&2;}
31411   { (exit 1); exit 1; }; }
31412		fi
31413            fi
31414        fi
31415	if test "x$FREETYPE2_FOUND" = xno; then
31416
31417
31418    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31419        # Source the builddeps file again, to make sure it uses the latest variables!
31420        . $builddepsfile
31421        # Look for a target and build machine specific resource!
31422        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31423        if test "x$resource" = x; then
31424            # Ok, lets instead look for a target specific resource
31425            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31426        fi
31427        if test "x$resource" = x; then
31428            # Ok, lets instead look for a build specific resource
31429            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31430        fi
31431        if test "x$resource" = x; then
31432            # Ok, lets instead look for a generic resource
31433            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31434            resource=${builddep_freetype2}
31435        fi
31436        if test "x$resource" != x; then
31437            { $as_echo "$as_me:$LINENO: Using builddeps $resource for freetype2" >&5
31438$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31439	    # If the resource in the builddeps.conf file is an existing directory,
31440	    # for example /java/linux/cups
31441	    if test -d ${resource}; then
31442	       depdir=${resource}
31443	    else
31444
31445# freetype2 is for example mymodule
31446# $resource is for example libs/general/libmymod_1_2_3.zip
31447# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31448# $with_builddeps_dir is for example /localhome/builddeps
31449# depdir is the name of the variable into which we store the depdir, eg MYMOD
31450# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31451# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31452    filename=`basename $resource`
31453    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31454    filebase=${filename%%.*}
31455    extension=${filename#*.}
31456    installdir=$with_builddeps_dir/$filebase
31457    if test ! -f $installdir/$filename.unpacked; then
31458        { $as_echo "$as_me:$LINENO: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31459$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31460        if test ! -d $installdir; then
31461            mkdir -p $installdir
31462        fi
31463        if test ! -d $installdir; then
31464            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
31465$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
31466   { (exit 1); exit 1; }; }
31467        fi
31468        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31469        touch $tmpfile
31470        if test ! -f $tmpfile; then
31471            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
31472$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
31473   { (exit 1); exit 1; }; }
31474        fi
31475
31476    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31477    # $tmpfile is the local file name for the downloaded file.
31478    VALID_TOOL=no
31479    if test "x$BDEPS_FTP" = xwget; then
31480       VALID_TOOL=yes
31481       wget -O $tmpfile $with_builddeps_server/$resource
31482    fi
31483    if test "x$BDEPS_FTP" = xlftp; then
31484       VALID_TOOL=yes
31485       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31486    fi
31487    if test "x$BDEPS_FTP" = xftp; then
31488        VALID_TOOL=yes
31489        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31490        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31491        FTPUSERPWD=${FTPSERVER%%@*}
31492        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31493            FTPUSER=${userpwd%%:*}
31494            FTPPWD=${userpwd#*@}
31495            FTPSERVER=${FTPSERVER#*@}
31496        else
31497            FTPUSER=ftp
31498            FTPPWD=ftp
31499        fi
31500        # the "pass" command does not work on some
31501        # ftp clients (read ftp.exe) but if it works,
31502        # passive mode is better!
31503        (\
31504            echo "user $FTPUSER $FTPPWD"        ;\
31505            echo "pass"                         ;\
31506            echo "bin"                          ;\
31507            echo "get $FTPPATH $tmpfile"              ;\
31508        ) | ftp -in $FTPSERVER
31509    fi
31510    if test "x$VALID_TOOL" != xyes; then
31511       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
31512$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
31513   { (exit 1); exit 1; }; }
31514    fi
31515
31516        mv $tmpfile $installdir/$filename
31517        if test ! -s $installdir/$filename; then
31518            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
31519$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
31520   { (exit 1); exit 1; }; }
31521        fi
31522        case "$extension" in
31523            zip)  echo "Unzipping $installdir/$filename..."
31524               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31525            ;;
31526            tar.gz) echo "Untaring $installdir/$filename..."
31527               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31528            ;;
31529            tgz) echo "Untaring $installdir/$filename..."
31530               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31531            ;;
31532            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
31533$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
31534   { (exit 1); exit 1; }; }
31535            ;;
31536        esac
31537    fi
31538    if test -f $installdir/$filename.unpacked; then
31539        depdir=$installdir
31540    fi
31541
31542	    fi
31543            # Source the builddeps file again, because in the previous command, the depdir
31544            # was updated to point at the current build dependency install directory.
31545            . $builddepsfile
31546            # Now extract variables from the builddeps.conf files.
31547            theroot=${builddep_freetype2_ROOT}
31548            thecflags=${builddep_freetype2_CFLAGS}
31549            thelibs=${builddep_freetype2_LIBS}
31550            if test "x$depdir" = x; then
31551                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency freetype2" >&5
31552$as_echo "$as_me: error: Could not download build dependency freetype2" >&2;}
31553   { (exit 1); exit 1; }; }
31554            fi
31555            FREETYPE2=$depdir
31556            if test "x$theroot" != x; then
31557               FREETYPE2="$theroot"
31558            fi
31559            if test "x$thecflags" != x; then
31560               FREETYPE2_CFLAGS="$thecflags"
31561            fi
31562            if test "x$thelibs" != x; then
31563               FREETYPE2_LIBS="$thelibs"
31564            fi
31565            FREETYPE2_FOUND=yes
31566            else FREETYPE2_FOUND=no
31567
31568        fi
31569        else FREETYPE2_FOUND=no
31570
31571    fi
31572
31573            USING_SYSTEM_FT_LIB=true
31574	fi
31575	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31576            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31577
31578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31579
31580  # Input might be given as Windows format, start by converting to
31581  # unix format.
31582  path="$FREETYPELOCATION"
31583  new_path=`$CYGPATH -u "$path"`
31584
31585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31588  # "foo.exe" is OK but "foo" is an error.
31589  #
31590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31591  # It is also a way to make sure we got the proper file name for the real test later on.
31592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31593  if test "x$test_shortpath" = x; then
31594    { $as_echo "$as_me:$LINENO: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31595$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31596    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FREETYPELOCATION" >&5
31597$as_echo "$as_me: error: Cannot locate the the path of FREETYPELOCATION" >&2;}
31598   { (exit 1); exit 1; }; }
31599  fi
31600
31601  # Call helper function which possibly converts this using DOS-style short mode.
31602  # If so, the updated path is stored in $new_path.
31603
31604  input_path="$new_path"
31605  # Check if we need to convert this using DOS-style short mode. If the path
31606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31607  # take no chances and rewrite it.
31608  # Note: m4 eats our [], so we need to use [ and ] instead.
31609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31610  if test "x$has_forbidden_chars" != x; then
31611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31615      # Going to short mode and back again did indeed matter. Since short mode is
31616      # case insensitive, let's make it lowercase to improve readability.
31617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31618      # Now convert it back to Unix-stile (cygpath)
31619      input_path=`$CYGPATH -u "$shortmode_path"`
31620      new_path="$input_path"
31621    fi
31622  fi
31623
31624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31625  if test "x$test_cygdrive_prefix" = x; then
31626    # As a simple fix, exclude /usr/bin since it's not a real path.
31627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31629      # a path prefixed by /cygdrive for fixpath to work.
31630      new_path="$CYGWIN_ROOT_PATH$input_path"
31631    fi
31632  fi
31633
31634
31635  if test "x$path" != "x$new_path"; then
31636    FREETYPELOCATION="$new_path"
31637    { $as_echo "$as_me:$LINENO: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31638$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31639  fi
31640
31641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31642
31643  path="$FREETYPELOCATION"
31644  has_colon=`$ECHO $path | $GREP ^.:`
31645  new_path="$path"
31646  if test "x$has_colon" = x; then
31647    # Not in mixed or Windows style, start by that.
31648    new_path=`cmd //c echo $path`
31649  fi
31650
31651
31652  input_path="$new_path"
31653  # Check if we need to convert this using DOS-style short mode. If the path
31654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31655  # take no chances and rewrite it.
31656  # Note: m4 eats our [], so we need to use [ and ] instead.
31657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31658  if test "x$has_forbidden_chars" != x; then
31659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31661  fi
31662
31663
31664  windows_path="$new_path"
31665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31666    unix_path=`$CYGPATH -u "$windows_path"`
31667    new_path="$unix_path"
31668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31670    new_path="$unix_path"
31671  fi
31672
31673  if test "x$path" != "x$new_path"; then
31674    FREETYPELOCATION="$new_path"
31675    { $as_echo "$as_me:$LINENO: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31676$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31677  fi
31678
31679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31681
31682  else
31683    # We're on a posix platform. Hooray! :)
31684    path="$FREETYPELOCATION"
31685
31686    if test ! -f "$path" && test ! -d "$path"; then
31687      { { $as_echo "$as_me:$LINENO: error: The path of FREETYPELOCATION, which resolves as \"$path\", is not found." >&5
31688$as_echo "$as_me: error: The path of FREETYPELOCATION, which resolves as \"$path\", is not found." >&2;}
31689   { (exit 1); exit 1; }; }
31690    fi
31691
31692    has_space=`$ECHO "$path" | $GREP " "`
31693    if test "x$has_space" != x; then
31694      { $as_echo "$as_me:$LINENO: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31695$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31696      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
31697$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
31698   { (exit 1); exit 1; }; }
31699    fi
31700  fi
31701
31702	    { $as_echo "$as_me:$LINENO: checking for freetype in some standard windows locations" >&5
31703$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31704	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31705	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31706	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31707 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31708                if ! test -s "$FREETYPE2_LIBS"; then
31709		   { { $as_echo "$as_me:$LINENO: error: Could not find $FREETYPE2_LIBS" >&5
31710$as_echo "$as_me: error: Could not find $FREETYPE2_LIBS" >&2;}
31711   { (exit 1); exit 1; }; }
31712		fi
31713                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31714		   { { $as_echo "$as_me:$LINENO: error: Could not find $FREETYPE2_LIB_PATH/freetype.dll" >&5
31715$as_echo "$as_me: error: Could not find $FREETYPE2_LIB_PATH/freetype.dll" >&2;}
31716   { (exit 1); exit 1; }; }
31717		fi
31718                USING_SYSTEM_FT_LIB=true
31719                FREETYPE2_FOUND=yes
31720	    fi
31721	    { $as_echo "$as_me:$LINENO: result: $FREETYPE2_FOUND" >&5
31722$as_echo "$FREETYPE2_FOUND" >&6; }
31723        fi
31724	if test "x$FREETYPE2_FOUND" = xno; then
31725
31726pkg_failed=no
31727{ $as_echo "$as_me:$LINENO: checking for FREETYPE2" >&5
31728$as_echo_n "checking for FREETYPE2... " >&6; }
31729
31730if test -n "$FREETYPE2_CFLAGS"; then
31731    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31732 elif test -n "$PKG_CONFIG"; then
31733    if test -n "$PKG_CONFIG" && \
31734    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5
31735  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31736  ac_status=$?
31737  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31738  (exit $ac_status); }; then
31739  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31740else
31741  pkg_failed=yes
31742fi
31743 else
31744    pkg_failed=untried
31745fi
31746if test -n "$FREETYPE2_LIBS"; then
31747    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31748 elif test -n "$PKG_CONFIG"; then
31749    if test -n "$PKG_CONFIG" && \
31750    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5
31751  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31752  ac_status=$?
31753  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31754  (exit $ac_status); }; then
31755  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31756else
31757  pkg_failed=yes
31758fi
31759 else
31760    pkg_failed=untried
31761fi
31762
31763
31764
31765if test $pkg_failed = yes; then
31766
31767if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31768        _pkg_short_errors_supported=yes
31769else
31770        _pkg_short_errors_supported=no
31771fi
31772        if test $_pkg_short_errors_supported = yes; then
31773	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31774        else
31775	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31776        fi
31777	# Put the nasty error message in config.log where it belongs
31778	echo "$FREETYPE2_PKG_ERRORS" >&5
31779
31780	{ $as_echo "$as_me:$LINENO: result: no" >&5
31781$as_echo "no" >&6; }
31782                FREETYPE2_FOUND=no
31783elif test $pkg_failed = untried; then
31784	FREETYPE2_FOUND=no
31785else
31786	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31787	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31788        { $as_echo "$as_me:$LINENO: result: yes" >&5
31789$as_echo "yes" >&6; }
31790	FREETYPE2_FOUND=yes
31791fi
31792            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31793            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31794            USING_SYSTEM_FT_LIB=true
31795            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31796            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31797              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31798            fi
31799	fi
31800	if test "x$FREETYPE2_FOUND" = xno; then
31801	    { $as_echo "$as_me:$LINENO: checking for freetype in some standard locations" >&5
31802$as_echo_n "checking for freetype in some standard locations... " >&6; }
31803
31804	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
31805	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
31806	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
31807	    fi
31808	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
31809	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
31810	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31811	    fi
31812
31813	    PREV_CXXCFLAGS="$CXXFLAGS"
31814	    PREV_LDFLAGS="$LDFLAGS"
31815	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31816	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31817	    cat >conftest.$ac_ext <<_ACEOF
31818/* confdefs.h.  */
31819_ACEOF
31820cat confdefs.h >>conftest.$ac_ext
31821cat >>conftest.$ac_ext <<_ACEOF
31822/* end confdefs.h.  */
31823#include<ft2build.h>
31824	                    #include FT_FREETYPE_H
31825	                   int main() { return 0; }
31826
31827_ACEOF
31828rm -f conftest.$ac_objext conftest$ac_exeext
31829if { (ac_try="$ac_link"
31830case "(($ac_try" in
31831  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31832  *) ac_try_echo=$ac_try;;
31833esac
31834eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31835$as_echo "$ac_try_echo") >&5
31836  (eval "$ac_link") 2>conftest.er1
31837  ac_status=$?
31838  grep -v '^ *+' conftest.er1 >conftest.err
31839  rm -f conftest.er1
31840  cat conftest.err >&5
31841  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31842  (exit $ac_status); } && {
31843	 test -z "$ac_cxx_werror_flag" ||
31844	 test ! -s conftest.err
31845       } && test -s conftest$ac_exeext && {
31846	 test "$cross_compiling" = yes ||
31847	 $as_test_x conftest$ac_exeext
31848       }; then
31849
31850	                      # Yes, the default cflags and libs did the trick.
31851	                      FREETYPE2_FOUND=yes
31852	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31853	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31854
31855else
31856  $as_echo "$as_me: failed program was:" >&5
31857sed 's/^/| /' conftest.$ac_ext >&5
31858
31859
31860	                      FREETYPE2_FOUND=no
31861
31862fi
31863
31864rm -rf conftest.dSYM
31865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
31866      conftest$ac_exeext conftest.$ac_ext
31867            CXXCFLAGS="$PREV_CXXFLAGS"
31868	    LDFLAGS="$PREV_LDFLAGS"
31869	    { $as_echo "$as_me:$LINENO: result: $FREETYPE2_FOUND" >&5
31870$as_echo "$FREETYPE2_FOUND" >&6; }
31871            USING_SYSTEM_FT_LIB=true
31872	fi
31873	if test "x$FREETYPE2_FOUND" = xno; then
31874
31875    # Print a helpful message on how to acquire the necessary build dependency.
31876    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31877    MISSING_DEPENDENCY=freetype2
31878    PKGHANDLER_COMMAND=
31879
31880    case $PKGHANDLER in
31881	apt-get)
31882                apt_help     $MISSING_DEPENDENCY ;;
31883    yum)
31884                yum_help     $MISSING_DEPENDENCY ;;
31885	port)
31886                port_help    $MISSING_DEPENDENCY ;;
31887	pkgutil)
31888                pkgutil_help $MISSING_DEPENDENCY ;;
31889	pkgadd)
31890                pkgadd_help  $MISSING_DEPENDENCY ;;
31891    * )
31892      break ;;
31893    esac
31894
31895    if test "x$PKGHANDLER_COMMAND" != x; then
31896        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31897    fi
31898
31899		{ { $as_echo "$as_me:$LINENO: error: Could not find freetype2! $HELP_MSG " >&5
31900$as_echo "$as_me: error: Could not find freetype2! $HELP_MSG " >&2;}
31901   { (exit 1); exit 1; }; }
31902	fi
31903
31904        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31905            # AC_CHECK_LIB does not support use of cl.exe
31906            PREV_LDFLAGS="$LDFLAGS"
31907            LDFLAGS="$FREETYPE2_LIBS"
31908            { $as_echo "$as_me:$LINENO: checking for FT_Init_FreeType in -lfreetype" >&5
31909$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31910if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then
31911  $as_echo_n "(cached) " >&6
31912else
31913  ac_check_lib_save_LIBS=$LIBS
31914LIBS="-lfreetype  $LIBS"
31915cat >conftest.$ac_ext <<_ACEOF
31916/* confdefs.h.  */
31917_ACEOF
31918cat confdefs.h >>conftest.$ac_ext
31919cat >>conftest.$ac_ext <<_ACEOF
31920/* end confdefs.h.  */
31921
31922/* Override any GCC internal prototype to avoid an error.
31923   Use char because int might match the return type of a GCC
31924   builtin and then its argument prototype would still apply.  */
31925#ifdef __cplusplus
31926extern "C"
31927#endif
31928char FT_Init_FreeType ();
31929int
31930main ()
31931{
31932return FT_Init_FreeType ();
31933  ;
31934  return 0;
31935}
31936_ACEOF
31937rm -f conftest.$ac_objext conftest$ac_exeext
31938if { (ac_try="$ac_link"
31939case "(($ac_try" in
31940  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31941  *) ac_try_echo=$ac_try;;
31942esac
31943eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31944$as_echo "$ac_try_echo") >&5
31945  (eval "$ac_link") 2>conftest.er1
31946  ac_status=$?
31947  grep -v '^ *+' conftest.er1 >conftest.err
31948  rm -f conftest.er1
31949  cat conftest.err >&5
31950  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31951  (exit $ac_status); } && {
31952	 test -z "$ac_cxx_werror_flag" ||
31953	 test ! -s conftest.err
31954       } && test -s conftest$ac_exeext && {
31955	 test "$cross_compiling" = yes ||
31956	 $as_test_x conftest$ac_exeext
31957       }; then
31958  ac_cv_lib_freetype_FT_Init_FreeType=yes
31959else
31960  $as_echo "$as_me: failed program was:" >&5
31961sed 's/^/| /' conftest.$ac_ext >&5
31962
31963	ac_cv_lib_freetype_FT_Init_FreeType=no
31964fi
31965
31966rm -rf conftest.dSYM
31967rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
31968      conftest$ac_exeext conftest.$ac_ext
31969LIBS=$ac_check_lib_save_LIBS
31970fi
31971{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31972$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31973if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then
31974  FREETYPE2_FOUND=true
31975else
31976  { { $as_echo "$as_me:$LINENO: error: Could not find freetype2! $HELP_MSG " >&5
31977$as_echo "$as_me: error: Could not find freetype2! $HELP_MSG " >&2;}
31978   { (exit 1); exit 1; }; }
31979fi
31980
31981            LDFLAGS="$PREV_LDFLAGS"
31982        fi
31983fi
31984
31985
31986
31987
31988
31989
31990
31991
31992
31993###############################################################################
31994#
31995# Check for alsa headers and libraries. Used on Linux/GNU systems.
31996#
31997
31998# Check whether --with-alsa was given.
31999if test "${with_alsa+set}" = set; then
32000  withval=$with_alsa;
32001fi
32002
32003
32004# Check whether --with-alsa-include was given.
32005if test "${with_alsa_include+set}" = set; then
32006  withval=$with_alsa_include;
32007fi
32008
32009
32010# Check whether --with-alsa-lib was given.
32011if test "${with_alsa_lib+set}" = set; then
32012  withval=$with_alsa_lib;
32013fi
32014
32015
32016if test "x$ALSA_NOT_NEEDED" = xyes; then
32017	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
32018		{ $as_echo "$as_me:$LINENO: WARNING: alsa not used, so --with-alsa is ignored" >&5
32019$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
32020	fi
32021	ALSA_CFLAGS=
32022	ALSA_LIBS=
32023else
32024	ALSA_FOUND=no
32025
32026	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
32027	    { { $as_echo "$as_me:$LINENO: error: It is not possible to disable the use of alsa. Remove the --without-alsa option." >&5
32028$as_echo "$as_me: error: It is not possible to disable the use of alsa. Remove the --without-alsa option." >&2;}
32029   { (exit 1); exit 1; }; }
32030	fi
32031
32032	if test "x${with_alsa}" != x; then
32033	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
32034	    ALSA_CFLAGS="-I${with_alsa}/include"
32035	    ALSA_FOUND=yes
32036	fi
32037	if test "x${with_alsa_include}" != x; then
32038	    ALSA_CFLAGS="-I${with_alsa_include}"
32039	    ALSA_FOUND=yes
32040	fi
32041	if test "x${with_alsa_lib}" != x; then
32042	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
32043	    ALSA_FOUND=yes
32044	fi
32045	if test "x$ALSA_FOUND" = xno; then
32046
32047
32048    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
32049        # Source the builddeps file again, to make sure it uses the latest variables!
32050        . $builddepsfile
32051        # Look for a target and build machine specific resource!
32052        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
32053        if test "x$resource" = x; then
32054            # Ok, lets instead look for a target specific resource
32055            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
32056        fi
32057        if test "x$resource" = x; then
32058            # Ok, lets instead look for a build specific resource
32059            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
32060        fi
32061        if test "x$resource" = x; then
32062            # Ok, lets instead look for a generic resource
32063            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
32064            resource=${builddep_alsa}
32065        fi
32066        if test "x$resource" != x; then
32067            { $as_echo "$as_me:$LINENO: Using builddeps $resource for alsa" >&5
32068$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
32069	    # If the resource in the builddeps.conf file is an existing directory,
32070	    # for example /java/linux/cups
32071	    if test -d ${resource}; then
32072	       depdir=${resource}
32073	    else
32074
32075# alsa is for example mymodule
32076# $resource is for example libs/general/libmymod_1_2_3.zip
32077# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
32078# $with_builddeps_dir is for example /localhome/builddeps
32079# depdir is the name of the variable into which we store the depdir, eg MYMOD
32080# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
32081# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
32082    filename=`basename $resource`
32083    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
32084    filebase=${filename%%.*}
32085    extension=${filename#*.}
32086    installdir=$with_builddeps_dir/$filebase
32087    if test ! -f $installdir/$filename.unpacked; then
32088        { $as_echo "$as_me:$LINENO: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
32089$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
32090        if test ! -d $installdir; then
32091            mkdir -p $installdir
32092        fi
32093        if test ! -d $installdir; then
32094            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
32095$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
32096   { (exit 1); exit 1; }; }
32097        fi
32098        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
32099        touch $tmpfile
32100        if test ! -f $tmpfile; then
32101            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
32102$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
32103   { (exit 1); exit 1; }; }
32104        fi
32105
32106    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
32107    # $tmpfile is the local file name for the downloaded file.
32108    VALID_TOOL=no
32109    if test "x$BDEPS_FTP" = xwget; then
32110       VALID_TOOL=yes
32111       wget -O $tmpfile $with_builddeps_server/$resource
32112    fi
32113    if test "x$BDEPS_FTP" = xlftp; then
32114       VALID_TOOL=yes
32115       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
32116    fi
32117    if test "x$BDEPS_FTP" = xftp; then
32118        VALID_TOOL=yes
32119        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
32120        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
32121        FTPUSERPWD=${FTPSERVER%%@*}
32122        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
32123            FTPUSER=${userpwd%%:*}
32124            FTPPWD=${userpwd#*@}
32125            FTPSERVER=${FTPSERVER#*@}
32126        else
32127            FTPUSER=ftp
32128            FTPPWD=ftp
32129        fi
32130        # the "pass" command does not work on some
32131        # ftp clients (read ftp.exe) but if it works,
32132        # passive mode is better!
32133        (\
32134            echo "user $FTPUSER $FTPPWD"        ;\
32135            echo "pass"                         ;\
32136            echo "bin"                          ;\
32137            echo "get $FTPPATH $tmpfile"              ;\
32138        ) | ftp -in $FTPSERVER
32139    fi
32140    if test "x$VALID_TOOL" != xyes; then
32141       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
32142$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
32143   { (exit 1); exit 1; }; }
32144    fi
32145
32146        mv $tmpfile $installdir/$filename
32147        if test ! -s $installdir/$filename; then
32148            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
32149$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
32150   { (exit 1); exit 1; }; }
32151        fi
32152        case "$extension" in
32153            zip)  echo "Unzipping $installdir/$filename..."
32154               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32155            ;;
32156            tar.gz) echo "Untaring $installdir/$filename..."
32157               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32158            ;;
32159            tgz) echo "Untaring $installdir/$filename..."
32160               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32161            ;;
32162            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
32163$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
32164   { (exit 1); exit 1; }; }
32165            ;;
32166        esac
32167    fi
32168    if test -f $installdir/$filename.unpacked; then
32169        depdir=$installdir
32170    fi
32171
32172	    fi
32173            # Source the builddeps file again, because in the previous command, the depdir
32174            # was updated to point at the current build dependency install directory.
32175            . $builddepsfile
32176            # Now extract variables from the builddeps.conf files.
32177            theroot=${builddep_alsa_ROOT}
32178            thecflags=${builddep_alsa_CFLAGS}
32179            thelibs=${builddep_alsa_LIBS}
32180            if test "x$depdir" = x; then
32181                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency alsa" >&5
32182$as_echo "$as_me: error: Could not download build dependency alsa" >&2;}
32183   { (exit 1); exit 1; }; }
32184            fi
32185            ALSA=$depdir
32186            if test "x$theroot" != x; then
32187               ALSA="$theroot"
32188            fi
32189            if test "x$thecflags" != x; then
32190               ALSA_CFLAGS="$thecflags"
32191            fi
32192            if test "x$thelibs" != x; then
32193               ALSA_LIBS="$thelibs"
32194            fi
32195            ALSA_FOUND=yes
32196            else ALSA_FOUND=no
32197
32198        fi
32199        else ALSA_FOUND=no
32200
32201    fi
32202
32203	fi
32204	if test "x$ALSA_FOUND" = xno; then
32205
32206pkg_failed=no
32207{ $as_echo "$as_me:$LINENO: checking for ALSA" >&5
32208$as_echo_n "checking for ALSA... " >&6; }
32209
32210if test -n "$ALSA_CFLAGS"; then
32211    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32212 elif test -n "$PKG_CONFIG"; then
32213    if test -n "$PKG_CONFIG" && \
32214    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&5
32215  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32216  ac_status=$?
32217  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32218  (exit $ac_status); }; then
32219  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32220else
32221  pkg_failed=yes
32222fi
32223 else
32224    pkg_failed=untried
32225fi
32226if test -n "$ALSA_LIBS"; then
32227    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32228 elif test -n "$PKG_CONFIG"; then
32229    if test -n "$PKG_CONFIG" && \
32230    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&5
32231  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32232  ac_status=$?
32233  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32234  (exit $ac_status); }; then
32235  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32236else
32237  pkg_failed=yes
32238fi
32239 else
32240    pkg_failed=untried
32241fi
32242
32243
32244
32245if test $pkg_failed = yes; then
32246
32247if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32248        _pkg_short_errors_supported=yes
32249else
32250        _pkg_short_errors_supported=no
32251fi
32252        if test $_pkg_short_errors_supported = yes; then
32253	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32254        else
32255	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32256        fi
32257	# Put the nasty error message in config.log where it belongs
32258	echo "$ALSA_PKG_ERRORS" >&5
32259
32260	{ $as_echo "$as_me:$LINENO: result: no" >&5
32261$as_echo "no" >&6; }
32262                ALSA_FOUND=no
32263elif test $pkg_failed = untried; then
32264	ALSA_FOUND=no
32265else
32266	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32267	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32268        { $as_echo "$as_me:$LINENO: result: yes" >&5
32269$as_echo "yes" >&6; }
32270	ALSA_FOUND=yes
32271fi
32272	fi
32273	if test "x$ALSA_FOUND" = xno; then
32274
32275for ac_header in alsa/asoundlib.h
32276do
32277as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
32278if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
32279  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
32280$as_echo_n "checking for $ac_header... " >&6; }
32281if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
32282  $as_echo_n "(cached) " >&6
32283fi
32284ac_res=`eval 'as_val=${'$as_ac_Header'}
32285		 $as_echo "$as_val"'`
32286	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
32287$as_echo "$ac_res" >&6; }
32288else
32289  # Is the header compilable?
32290{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
32291$as_echo_n "checking $ac_header usability... " >&6; }
32292cat >conftest.$ac_ext <<_ACEOF
32293/* confdefs.h.  */
32294_ACEOF
32295cat confdefs.h >>conftest.$ac_ext
32296cat >>conftest.$ac_ext <<_ACEOF
32297/* end confdefs.h.  */
32298$ac_includes_default
32299#include <$ac_header>
32300_ACEOF
32301rm -f conftest.$ac_objext
32302if { (ac_try="$ac_compile"
32303case "(($ac_try" in
32304  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32305  *) ac_try_echo=$ac_try;;
32306esac
32307eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32308$as_echo "$ac_try_echo") >&5
32309  (eval "$ac_compile") 2>conftest.er1
32310  ac_status=$?
32311  grep -v '^ *+' conftest.er1 >conftest.err
32312  rm -f conftest.er1
32313  cat conftest.err >&5
32314  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32315  (exit $ac_status); } && {
32316	 test -z "$ac_cxx_werror_flag" ||
32317	 test ! -s conftest.err
32318       } && test -s conftest.$ac_objext; then
32319  ac_header_compiler=yes
32320else
32321  $as_echo "$as_me: failed program was:" >&5
32322sed 's/^/| /' conftest.$ac_ext >&5
32323
32324	ac_header_compiler=no
32325fi
32326
32327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32328{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
32329$as_echo "$ac_header_compiler" >&6; }
32330
32331# Is the header present?
32332{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
32333$as_echo_n "checking $ac_header presence... " >&6; }
32334cat >conftest.$ac_ext <<_ACEOF
32335/* confdefs.h.  */
32336_ACEOF
32337cat confdefs.h >>conftest.$ac_ext
32338cat >>conftest.$ac_ext <<_ACEOF
32339/* end confdefs.h.  */
32340#include <$ac_header>
32341_ACEOF
32342if { (ac_try="$ac_cpp conftest.$ac_ext"
32343case "(($ac_try" in
32344  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32345  *) ac_try_echo=$ac_try;;
32346esac
32347eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32348$as_echo "$ac_try_echo") >&5
32349  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
32350  ac_status=$?
32351  grep -v '^ *+' conftest.er1 >conftest.err
32352  rm -f conftest.er1
32353  cat conftest.err >&5
32354  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32355  (exit $ac_status); } >/dev/null && {
32356	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
32357	 test ! -s conftest.err
32358       }; then
32359  ac_header_preproc=yes
32360else
32361  $as_echo "$as_me: failed program was:" >&5
32362sed 's/^/| /' conftest.$ac_ext >&5
32363
32364  ac_header_preproc=no
32365fi
32366
32367rm -f conftest.err conftest.$ac_ext
32368{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
32369$as_echo "$ac_header_preproc" >&6; }
32370
32371# So?  What about this header?
32372case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
32373  yes:no: )
32374    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
32375$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
32376    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
32377$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
32378    ac_header_preproc=yes
32379    ;;
32380  no:yes:* )
32381    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
32382$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
32383    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
32384$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
32385    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
32386$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
32387    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
32388$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
32389    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
32390$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
32391    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
32392$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
32393    ( cat <<\_ASBOX
32394## ----------------------------------------- ##
32395## Report this to build-dev@openjdk.java.net ##
32396## ----------------------------------------- ##
32397_ASBOX
32398     ) | sed "s/^/$as_me: WARNING:     /" >&2
32399    ;;
32400esac
32401{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
32402$as_echo_n "checking for $ac_header... " >&6; }
32403if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
32404  $as_echo_n "(cached) " >&6
32405else
32406  eval "$as_ac_Header=\$ac_header_preproc"
32407fi
32408ac_res=`eval 'as_val=${'$as_ac_Header'}
32409		 $as_echo "$as_val"'`
32410	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
32411$as_echo "$ac_res" >&6; }
32412
32413fi
32414as_val=`eval 'as_val=${'$as_ac_Header'}
32415		 $as_echo "$as_val"'`
32416   if test "x$as_val" = x""yes; then
32417  cat >>confdefs.h <<_ACEOF
32418#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
32419_ACEOF
32420 ALSA_FOUND=yes
32421	                      ALSA_CFLAGS=-Iignoreme
32422	                      ALSA_LIBS=-lasound
32423	                      DEFAULT_ALSA=yes
32424else
32425  ALSA_FOUND=no
32426fi
32427
32428done
32429
32430	fi
32431	if test "x$ALSA_FOUND" = xno; then
32432
32433    # Print a helpful message on how to acquire the necessary build dependency.
32434    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32435    MISSING_DEPENDENCY=alsa
32436    PKGHANDLER_COMMAND=
32437
32438    case $PKGHANDLER in
32439	apt-get)
32440                apt_help     $MISSING_DEPENDENCY ;;
32441    yum)
32442                yum_help     $MISSING_DEPENDENCY ;;
32443	port)
32444                port_help    $MISSING_DEPENDENCY ;;
32445	pkgutil)
32446                pkgutil_help $MISSING_DEPENDENCY ;;
32447	pkgadd)
32448                pkgadd_help  $MISSING_DEPENDENCY ;;
32449    * )
32450      break ;;
32451    esac
32452
32453    if test "x$PKGHANDLER_COMMAND" != x; then
32454        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32455    fi
32456
32457	    { { $as_echo "$as_me:$LINENO: error: Could not find alsa! $HELP_MSG " >&5
32458$as_echo "$as_me: error: Could not find alsa! $HELP_MSG " >&2;}
32459   { (exit 1); exit 1; }; }
32460	fi
32461fi
32462
32463
32464
32465
32466
32467
32468
32469###############################################################################
32470#
32471# Check for the jpeg library
32472#
32473
32474USE_EXTERNAL_LIBJPEG=true
32475
32476{ $as_echo "$as_me:$LINENO: checking for main in -ljpeg" >&5
32477$as_echo_n "checking for main in -ljpeg... " >&6; }
32478if test "${ac_cv_lib_jpeg_main+set}" = set; then
32479  $as_echo_n "(cached) " >&6
32480else
32481  ac_check_lib_save_LIBS=$LIBS
32482LIBS="-ljpeg  $LIBS"
32483cat >conftest.$ac_ext <<_ACEOF
32484/* confdefs.h.  */
32485_ACEOF
32486cat confdefs.h >>conftest.$ac_ext
32487cat >>conftest.$ac_ext <<_ACEOF
32488/* end confdefs.h.  */
32489
32490
32491int
32492main ()
32493{
32494return main ();
32495  ;
32496  return 0;
32497}
32498_ACEOF
32499rm -f conftest.$ac_objext conftest$ac_exeext
32500if { (ac_try="$ac_link"
32501case "(($ac_try" in
32502  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32503  *) ac_try_echo=$ac_try;;
32504esac
32505eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32506$as_echo "$ac_try_echo") >&5
32507  (eval "$ac_link") 2>conftest.er1
32508  ac_status=$?
32509  grep -v '^ *+' conftest.er1 >conftest.err
32510  rm -f conftest.er1
32511  cat conftest.err >&5
32512  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32513  (exit $ac_status); } && {
32514	 test -z "$ac_cxx_werror_flag" ||
32515	 test ! -s conftest.err
32516       } && test -s conftest$ac_exeext && {
32517	 test "$cross_compiling" = yes ||
32518	 $as_test_x conftest$ac_exeext
32519       }; then
32520  ac_cv_lib_jpeg_main=yes
32521else
32522  $as_echo "$as_me: failed program was:" >&5
32523sed 's/^/| /' conftest.$ac_ext >&5
32524
32525	ac_cv_lib_jpeg_main=no
32526fi
32527
32528rm -rf conftest.dSYM
32529rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32530      conftest$ac_exeext conftest.$ac_ext
32531LIBS=$ac_check_lib_save_LIBS
32532fi
32533{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_main" >&5
32534$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32535if test "x$ac_cv_lib_jpeg_main" = x""yes; then
32536  cat >>confdefs.h <<_ACEOF
32537#define HAVE_LIBJPEG 1
32538_ACEOF
32539
32540  LIBS="-ljpeg $LIBS"
32541
32542else
32543   USE_EXTERNAL_LIBJPEG=false
32544               { $as_echo "$as_me:$LINENO: Will use jpeg decoder bundled with the OpenJDK source" >&5
32545$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32546
32547fi
32548
32549
32550
32551###############################################################################
32552#
32553# Check for the gif library
32554#
32555
32556USE_EXTERNAL_LIBJPEG=true
32557
32558{ $as_echo "$as_me:$LINENO: checking for main in -lgif" >&5
32559$as_echo_n "checking for main in -lgif... " >&6; }
32560if test "${ac_cv_lib_gif_main+set}" = set; then
32561  $as_echo_n "(cached) " >&6
32562else
32563  ac_check_lib_save_LIBS=$LIBS
32564LIBS="-lgif  $LIBS"
32565cat >conftest.$ac_ext <<_ACEOF
32566/* confdefs.h.  */
32567_ACEOF
32568cat confdefs.h >>conftest.$ac_ext
32569cat >>conftest.$ac_ext <<_ACEOF
32570/* end confdefs.h.  */
32571
32572
32573int
32574main ()
32575{
32576return main ();
32577  ;
32578  return 0;
32579}
32580_ACEOF
32581rm -f conftest.$ac_objext conftest$ac_exeext
32582if { (ac_try="$ac_link"
32583case "(($ac_try" in
32584  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32585  *) ac_try_echo=$ac_try;;
32586esac
32587eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32588$as_echo "$ac_try_echo") >&5
32589  (eval "$ac_link") 2>conftest.er1
32590  ac_status=$?
32591  grep -v '^ *+' conftest.er1 >conftest.err
32592  rm -f conftest.er1
32593  cat conftest.err >&5
32594  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32595  (exit $ac_status); } && {
32596	 test -z "$ac_cxx_werror_flag" ||
32597	 test ! -s conftest.err
32598       } && test -s conftest$ac_exeext && {
32599	 test "$cross_compiling" = yes ||
32600	 $as_test_x conftest$ac_exeext
32601       }; then
32602  ac_cv_lib_gif_main=yes
32603else
32604  $as_echo "$as_me: failed program was:" >&5
32605sed 's/^/| /' conftest.$ac_ext >&5
32606
32607	ac_cv_lib_gif_main=no
32608fi
32609
32610rm -rf conftest.dSYM
32611rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32612      conftest$ac_exeext conftest.$ac_ext
32613LIBS=$ac_check_lib_save_LIBS
32614fi
32615{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gif_main" >&5
32616$as_echo "$ac_cv_lib_gif_main" >&6; }
32617if test "x$ac_cv_lib_gif_main" = x""yes; then
32618  cat >>confdefs.h <<_ACEOF
32619#define HAVE_LIBGIF 1
32620_ACEOF
32621
32622  LIBS="-lgif $LIBS"
32623
32624else
32625   USE_EXTERNAL_LIBGIF=false
32626               { $as_echo "$as_me:$LINENO: Will use gif decoder bundled with the OpenJDK source" >&5
32627$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
32628
32629fi
32630
32631
32632
32633###############################################################################
32634#
32635# Check for the zlib library
32636#
32637
32638
32639# Check whether --with-zlib was given.
32640if test "${with_zlib+set}" = set; then
32641  withval=$with_zlib;
32642fi
32643
32644
32645{ $as_echo "$as_me:$LINENO: checking for compress in -lz" >&5
32646$as_echo_n "checking for compress in -lz... " >&6; }
32647if test "${ac_cv_lib_z_compress+set}" = set; then
32648  $as_echo_n "(cached) " >&6
32649else
32650  ac_check_lib_save_LIBS=$LIBS
32651LIBS="-lz  $LIBS"
32652cat >conftest.$ac_ext <<_ACEOF
32653/* confdefs.h.  */
32654_ACEOF
32655cat confdefs.h >>conftest.$ac_ext
32656cat >>conftest.$ac_ext <<_ACEOF
32657/* end confdefs.h.  */
32658
32659/* Override any GCC internal prototype to avoid an error.
32660   Use char because int might match the return type of a GCC
32661   builtin and then its argument prototype would still apply.  */
32662#ifdef __cplusplus
32663extern "C"
32664#endif
32665char compress ();
32666int
32667main ()
32668{
32669return compress ();
32670  ;
32671  return 0;
32672}
32673_ACEOF
32674rm -f conftest.$ac_objext conftest$ac_exeext
32675if { (ac_try="$ac_link"
32676case "(($ac_try" in
32677  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32678  *) ac_try_echo=$ac_try;;
32679esac
32680eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32681$as_echo "$ac_try_echo") >&5
32682  (eval "$ac_link") 2>conftest.er1
32683  ac_status=$?
32684  grep -v '^ *+' conftest.er1 >conftest.err
32685  rm -f conftest.er1
32686  cat conftest.err >&5
32687  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32688  (exit $ac_status); } && {
32689	 test -z "$ac_cxx_werror_flag" ||
32690	 test ! -s conftest.err
32691       } && test -s conftest$ac_exeext && {
32692	 test "$cross_compiling" = yes ||
32693	 $as_test_x conftest$ac_exeext
32694       }; then
32695  ac_cv_lib_z_compress=yes
32696else
32697  $as_echo "$as_me: failed program was:" >&5
32698sed 's/^/| /' conftest.$ac_ext >&5
32699
32700	ac_cv_lib_z_compress=no
32701fi
32702
32703rm -rf conftest.dSYM
32704rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32705      conftest$ac_exeext conftest.$ac_ext
32706LIBS=$ac_check_lib_save_LIBS
32707fi
32708{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5
32709$as_echo "$ac_cv_lib_z_compress" >&6; }
32710if test "x$ac_cv_lib_z_compress" = x""yes; then
32711   ZLIB_FOUND=yes
32712else
32713   ZLIB_FOUND=no
32714fi
32715
32716
32717{ $as_echo "$as_me:$LINENO: checking for which zlib to use" >&5
32718$as_echo_n "checking for which zlib to use... " >&6; }
32719
32720DEFAULT_ZLIB=bundled
32721if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32722#
32723# On macosx default is system...on others default is
32724#
32725    DEFAULT_ZLIB=system
32726fi
32727
32728if test "x${ZLIB_FOUND}" != "xyes"; then
32729#
32730# If we don't find any system...set default to bundled
32731#
32732    DEFAULT_ZLIB=bundled
32733fi
32734
32735#
32736# If user didn't specify, use DEFAULT_ZLIB
32737#
32738if test "x${with_zlib}" = "x"; then
32739    with_zlib=${DEFAULT_ZLIB}
32740fi
32741
32742if test "x${with_zlib}" = "xbundled"; then
32743    USE_EXTERNAL_LIBZ=false
32744    { $as_echo "$as_me:$LINENO: result: bundled" >&5
32745$as_echo "bundled" >&6; }
32746elif test "x${with_zlib}" = "xsystem"; then
32747    if test "x${ZLIB_FOUND}" = "xyes"; then
32748        USE_EXTERNAL_LIBZ=true
32749        { $as_echo "$as_me:$LINENO: result: system" >&5
32750$as_echo "system" >&6; }
32751    else
32752        { $as_echo "$as_me:$LINENO: result: system not found" >&5
32753$as_echo "system not found" >&6; }
32754        { { $as_echo "$as_me:$LINENO: error: --with-zlib=system specified, but no zlib found!" >&5
32755$as_echo "$as_me: error: --with-zlib=system specified, but no zlib found!" >&2;}
32756   { (exit 1); exit 1; }; }
32757    fi
32758else
32759    { { $as_echo "$as_me:$LINENO: error: Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" >&5
32760$as_echo "$as_me: error: Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" >&2;}
32761   { (exit 1); exit 1; }; }
32762fi
32763
32764
32765
32766###############################################################################
32767LIBZIP_CAN_USE_MMAP=true
32768
32769
32770
32771###############################################################################
32772#
32773# Check if altzone exists in time.h
32774#
32775
32776cat >conftest.$ac_ext <<_ACEOF
32777/* confdefs.h.  */
32778_ACEOF
32779cat confdefs.h >>conftest.$ac_ext
32780cat >>conftest.$ac_ext <<_ACEOF
32781/* end confdefs.h.  */
32782#include <time.h>
32783int
32784main ()
32785{
32786return (int)altzone;
32787  ;
32788  return 0;
32789}
32790_ACEOF
32791rm -f conftest.$ac_objext conftest$ac_exeext
32792if { (ac_try="$ac_link"
32793case "(($ac_try" in
32794  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32795  *) ac_try_echo=$ac_try;;
32796esac
32797eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32798$as_echo "$ac_try_echo") >&5
32799  (eval "$ac_link") 2>conftest.er1
32800  ac_status=$?
32801  grep -v '^ *+' conftest.er1 >conftest.err
32802  rm -f conftest.er1
32803  cat conftest.err >&5
32804  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32805  (exit $ac_status); } && {
32806	 test -z "$ac_cxx_werror_flag" ||
32807	 test ! -s conftest.err
32808       } && test -s conftest$ac_exeext && {
32809	 test "$cross_compiling" = yes ||
32810	 $as_test_x conftest$ac_exeext
32811       }; then
32812  has_altzone=yes
32813else
32814  $as_echo "$as_me: failed program was:" >&5
32815sed 's/^/| /' conftest.$ac_ext >&5
32816
32817	has_altzone=no
32818fi
32819
32820rm -rf conftest.dSYM
32821rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32822      conftest$ac_exeext conftest.$ac_ext
32823if test "x$has_altzone" = xyes; then
32824
32825cat >>confdefs.h <<\_ACEOF
32826#define HAVE_ALTZONE 1
32827_ACEOF
32828
32829fi
32830
32831###############################################################################
32832#
32833# Check the maths library
32834#
32835
32836
32837{ $as_echo "$as_me:$LINENO: checking for cos in -lm" >&5
32838$as_echo_n "checking for cos in -lm... " >&6; }
32839if test "${ac_cv_lib_m_cos+set}" = set; then
32840  $as_echo_n "(cached) " >&6
32841else
32842  ac_check_lib_save_LIBS=$LIBS
32843LIBS="-lm  $LIBS"
32844cat >conftest.$ac_ext <<_ACEOF
32845/* confdefs.h.  */
32846_ACEOF
32847cat confdefs.h >>conftest.$ac_ext
32848cat >>conftest.$ac_ext <<_ACEOF
32849/* end confdefs.h.  */
32850
32851/* Override any GCC internal prototype to avoid an error.
32852   Use char because int might match the return type of a GCC
32853   builtin and then its argument prototype would still apply.  */
32854#ifdef __cplusplus
32855extern "C"
32856#endif
32857char cos ();
32858int
32859main ()
32860{
32861return cos ();
32862  ;
32863  return 0;
32864}
32865_ACEOF
32866rm -f conftest.$ac_objext conftest$ac_exeext
32867if { (ac_try="$ac_link"
32868case "(($ac_try" in
32869  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32870  *) ac_try_echo=$ac_try;;
32871esac
32872eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32873$as_echo "$ac_try_echo") >&5
32874  (eval "$ac_link") 2>conftest.er1
32875  ac_status=$?
32876  grep -v '^ *+' conftest.er1 >conftest.err
32877  rm -f conftest.er1
32878  cat conftest.err >&5
32879  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32880  (exit $ac_status); } && {
32881	 test -z "$ac_cxx_werror_flag" ||
32882	 test ! -s conftest.err
32883       } && test -s conftest$ac_exeext && {
32884	 test "$cross_compiling" = yes ||
32885	 $as_test_x conftest$ac_exeext
32886       }; then
32887  ac_cv_lib_m_cos=yes
32888else
32889  $as_echo "$as_me: failed program was:" >&5
32890sed 's/^/| /' conftest.$ac_ext >&5
32891
32892	ac_cv_lib_m_cos=no
32893fi
32894
32895rm -rf conftest.dSYM
32896rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32897      conftest$ac_exeext conftest.$ac_ext
32898LIBS=$ac_check_lib_save_LIBS
32899fi
32900{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5
32901$as_echo "$ac_cv_lib_m_cos" >&6; }
32902if test "x$ac_cv_lib_m_cos" = x""yes; then
32903  cat >>confdefs.h <<_ACEOF
32904#define HAVE_LIBM 1
32905_ACEOF
32906
32907  LIBS="-lm $LIBS"
32908
32909else
32910
32911                  { $as_echo "$as_me:$LINENO: Maths library was not found" >&5
32912$as_echo "$as_me: Maths library was not found" >&6;}
32913
32914fi
32915
32916
32917
32918###############################################################################
32919#
32920# Check for libdl.so
32921
32922save_LIBS="$LIBS"
32923LIBS=""
32924
32925{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
32926$as_echo_n "checking for dlopen in -ldl... " >&6; }
32927if test "${ac_cv_lib_dl_dlopen+set}" = set; then
32928  $as_echo_n "(cached) " >&6
32929else
32930  ac_check_lib_save_LIBS=$LIBS
32931LIBS="-ldl  $LIBS"
32932cat >conftest.$ac_ext <<_ACEOF
32933/* confdefs.h.  */
32934_ACEOF
32935cat confdefs.h >>conftest.$ac_ext
32936cat >>conftest.$ac_ext <<_ACEOF
32937/* end confdefs.h.  */
32938
32939/* Override any GCC internal prototype to avoid an error.
32940   Use char because int might match the return type of a GCC
32941   builtin and then its argument prototype would still apply.  */
32942#ifdef __cplusplus
32943extern "C"
32944#endif
32945char dlopen ();
32946int
32947main ()
32948{
32949return dlopen ();
32950  ;
32951  return 0;
32952}
32953_ACEOF
32954rm -f conftest.$ac_objext conftest$ac_exeext
32955if { (ac_try="$ac_link"
32956case "(($ac_try" in
32957  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32958  *) ac_try_echo=$ac_try;;
32959esac
32960eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32961$as_echo "$ac_try_echo") >&5
32962  (eval "$ac_link") 2>conftest.er1
32963  ac_status=$?
32964  grep -v '^ *+' conftest.er1 >conftest.err
32965  rm -f conftest.er1
32966  cat conftest.err >&5
32967  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32968  (exit $ac_status); } && {
32969	 test -z "$ac_cxx_werror_flag" ||
32970	 test ! -s conftest.err
32971       } && test -s conftest$ac_exeext && {
32972	 test "$cross_compiling" = yes ||
32973	 $as_test_x conftest$ac_exeext
32974       }; then
32975  ac_cv_lib_dl_dlopen=yes
32976else
32977  $as_echo "$as_me: failed program was:" >&5
32978sed 's/^/| /' conftest.$ac_ext >&5
32979
32980	ac_cv_lib_dl_dlopen=no
32981fi
32982
32983rm -rf conftest.dSYM
32984rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32985      conftest$ac_exeext conftest.$ac_ext
32986LIBS=$ac_check_lib_save_LIBS
32987fi
32988{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
32989$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32990if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
32991  cat >>confdefs.h <<_ACEOF
32992#define HAVE_LIBDL 1
32993_ACEOF
32994
32995  LIBS="-ldl $LIBS"
32996
32997fi
32998
32999LIBDL="$LIBS"
33000
33001LIBS="$save_LIBS"
33002
33003
33004
33005###############################################################################
33006#
33007# statically link libstdc++ before C++ ABI is stablized on Linux unless
33008# dynamic build is configured on command line.
33009#
33010
33011# Check whether --with-stdc++lib was given.
33012if test "${with_stdc++lib+set}" = set; then
33013  withval=$with_stdc++lib;
33014    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
33015        && test "x$with_stdc__lib" != xdefault; then
33016      { { $as_echo "$as_me:$LINENO: error: Bad parameter value --with-stdc++lib=$with_stdc__lib!" >&5
33017$as_echo "$as_me: error: Bad parameter value --with-stdc++lib=$with_stdc__lib!" >&2;}
33018   { (exit 1); exit 1; }; }
33019    fi
33020
33021else
33022  with_stdc__lib=default
33023
33024fi
33025
33026
33027if test "x$OPENJDK_TARGET_OS" = xlinux; then
33028    # Test if -lstdc++ works.
33029    { $as_echo "$as_me:$LINENO: checking if dynamic link of stdc++ is possible" >&5
33030$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
33031    ac_ext=cpp
33032ac_cpp='$CXXCPP $CPPFLAGS'
33033ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33034ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33035ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33036
33037    OLD_CXXFLAGS="$CXXFLAGS"
33038    CXXFLAGS="$CXXFLAGS -lstdc++"
33039    cat >conftest.$ac_ext <<_ACEOF
33040/* confdefs.h.  */
33041_ACEOF
33042cat confdefs.h >>conftest.$ac_ext
33043cat >>conftest.$ac_ext <<_ACEOF
33044/* end confdefs.h.  */
33045
33046int
33047main ()
33048{
33049return 0;
33050  ;
33051  return 0;
33052}
33053_ACEOF
33054rm -f conftest.$ac_objext conftest$ac_exeext
33055if { (ac_try="$ac_link"
33056case "(($ac_try" in
33057  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33058  *) ac_try_echo=$ac_try;;
33059esac
33060eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
33061$as_echo "$ac_try_echo") >&5
33062  (eval "$ac_link") 2>conftest.er1
33063  ac_status=$?
33064  grep -v '^ *+' conftest.er1 >conftest.err
33065  rm -f conftest.er1
33066  cat conftest.err >&5
33067  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33068  (exit $ac_status); } && {
33069	 test -z "$ac_cxx_werror_flag" ||
33070	 test ! -s conftest.err
33071       } && test -s conftest$ac_exeext && {
33072	 test "$cross_compiling" = yes ||
33073	 $as_test_x conftest$ac_exeext
33074       }; then
33075  has_dynamic_libstdcxx=yes
33076else
33077  $as_echo "$as_me: failed program was:" >&5
33078sed 's/^/| /' conftest.$ac_ext >&5
33079
33080	has_dynamic_libstdcxx=no
33081fi
33082
33083rm -rf conftest.dSYM
33084rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
33085      conftest$ac_exeext conftest.$ac_ext
33086    CXXFLAGS="$OLD_CXXFLAGS"
33087    ac_ext=cpp
33088ac_cpp='$CXXCPP $CPPFLAGS'
33089ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33090ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33091ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33092
33093    { $as_echo "$as_me:$LINENO: result: $has_dynamic_libstdcxx" >&5
33094$as_echo "$has_dynamic_libstdcxx" >&6; }
33095
33096    # Test if stdc++ can be linked statically.
33097    { $as_echo "$as_me:$LINENO: checking if static link of stdc++ is possible" >&5
33098$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
33099    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
33100    ac_ext=cpp
33101ac_cpp='$CXXCPP $CPPFLAGS'
33102ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33103ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33104ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33105
33106    OLD_LIBS="$LIBS"
33107    OLD_CXX="$CXX"
33108    LIBS="$STATIC_STDCXX_FLAGS"
33109    CXX="$CC"
33110    cat >conftest.$ac_ext <<_ACEOF
33111/* confdefs.h.  */
33112_ACEOF
33113cat confdefs.h >>conftest.$ac_ext
33114cat >>conftest.$ac_ext <<_ACEOF
33115/* end confdefs.h.  */
33116
33117int
33118main ()
33119{
33120return 0;
33121  ;
33122  return 0;
33123}
33124_ACEOF
33125rm -f conftest.$ac_objext conftest$ac_exeext
33126if { (ac_try="$ac_link"
33127case "(($ac_try" in
33128  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33129  *) ac_try_echo=$ac_try;;
33130esac
33131eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
33132$as_echo "$ac_try_echo") >&5
33133  (eval "$ac_link") 2>conftest.er1
33134  ac_status=$?
33135  grep -v '^ *+' conftest.er1 >conftest.err
33136  rm -f conftest.er1
33137  cat conftest.err >&5
33138  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33139  (exit $ac_status); } && {
33140	 test -z "$ac_cxx_werror_flag" ||
33141	 test ! -s conftest.err
33142       } && test -s conftest$ac_exeext && {
33143	 test "$cross_compiling" = yes ||
33144	 $as_test_x conftest$ac_exeext
33145       }; then
33146  has_static_libstdcxx=yes
33147else
33148  $as_echo "$as_me: failed program was:" >&5
33149sed 's/^/| /' conftest.$ac_ext >&5
33150
33151	has_static_libstdcxx=no
33152fi
33153
33154rm -rf conftest.dSYM
33155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
33156      conftest$ac_exeext conftest.$ac_ext
33157    LIBS="$OLD_LIBS"
33158    CXX="$OLD_CXX"
33159    ac_ext=cpp
33160ac_cpp='$CXXCPP $CPPFLAGS'
33161ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33162ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33163ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33164
33165    { $as_echo "$as_me:$LINENO: result: $has_static_libstdcxx" >&5
33166$as_echo "$has_static_libstdcxx" >&6; }
33167
33168    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
33169        { { $as_echo "$as_me:$LINENO: error: Cannot link to stdc++, neither dynamically nor statically!" >&5
33170$as_echo "$as_me: error: Cannot link to stdc++, neither dynamically nor statically!" >&2;}
33171   { (exit 1); exit 1; }; }
33172    fi
33173
33174    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
33175        { { $as_echo "$as_me:$LINENO: error: Static linking of libstdc++ was not possible!" >&5
33176$as_echo "$as_me: error: Static linking of libstdc++ was not possible!" >&2;}
33177   { (exit 1); exit 1; }; }
33178    fi
33179
33180    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
33181        { { $as_echo "$as_me:$LINENO: error: Dynamic linking of libstdc++ was not possible!" >&5
33182$as_echo "$as_me: error: Dynamic linking of libstdc++ was not possible!" >&2;}
33183   { (exit 1); exit 1; }; }
33184    fi
33185
33186    { $as_echo "$as_me:$LINENO: checking how to link with libstdc++" >&5
33187$as_echo_n "checking how to link with libstdc++... " >&6; }
33188    # If dynamic was requested, it's available since it would fail above otherwise.
33189    # If dynamic wasn't requested, go with static unless it isn't available.
33190    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
33191        LIBCXX="$LIBCXX -lstdc++"
33192        LDCXX="$CXX"
33193        STATIC_CXX_SETTING="STATIC_CXX=false"
33194        { $as_echo "$as_me:$LINENO: result: dynamic" >&5
33195$as_echo "dynamic" >&6; }
33196    else
33197        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
33198        LDCXX="$CC"
33199        STATIC_CXX_SETTING="STATIC_CXX=true"
33200        { $as_echo "$as_me:$LINENO: result: static" >&5
33201$as_echo "static" >&6; }
33202    fi
33203fi
33204
33205
33206# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
33207if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
33208    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
33209fi
33210
33211# TODO better (platform agnostic) test
33212if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
33213    LIBCXX="-lstdc++"
33214fi
33215
33216
33217
33218
33219
33220# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
33221
33222# When using cygwin or msys, we need a wrapper binary that renames
33223# /cygdrive/c/ arguments into c:/ arguments and peeks into
33224# @files and rewrites these too! This wrapper binary is
33225# called fixpath.
33226FIXPATH=
33227if test "x$OPENJDK_BUILD_OS" = xwindows; then
33228    { $as_echo "$as_me:$LINENO: checking if fixpath can be created" >&5
33229$as_echo_n "checking if fixpath can be created... " >&6; }
33230    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
33231    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
33232    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
33233      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
33234      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
33235      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
33236      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
33237    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
33238      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
33239      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
33240
33241      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
33242      # @ was chosen as separator to minimize risk of other tools messing around with it
33243      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
33244      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
33245
33246      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
33247    fi
33248    rm -f $OUTPUT_ROOT/fixpath*
33249    cd $OUTPUT_ROOT
33250    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
33251    cd $CURDIR
33252
33253    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
33254        { $as_echo "$as_me:$LINENO: result: no" >&5
33255$as_echo "no" >&6; }
33256        cat $OUTPUT_ROOT/fixpath1.log
33257        { { $as_echo "$as_me:$LINENO: error: Could not create $OUTPUT_ROOT/fixpath.exe" >&5
33258$as_echo "$as_me: error: Could not create $OUTPUT_ROOT/fixpath.exe" >&2;}
33259   { (exit 1); exit 1; }; }
33260    fi
33261    { $as_echo "$as_me:$LINENO: result: yes" >&5
33262$as_echo "yes" >&6; }
33263    { $as_echo "$as_me:$LINENO: checking if fixpath.exe works" >&5
33264$as_echo_n "checking if fixpath.exe works... " >&6; }
33265    cd $OUTPUT_ROOT
33266    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
33267    cd $CURDIR
33268    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
33269        { $as_echo "$as_me:$LINENO: result: no" >&5
33270$as_echo "no" >&6; }
33271        cat $OUTPUT_ROOT/fixpath2.log
33272        { { $as_echo "$as_me:$LINENO: error: fixpath did not work!" >&5
33273$as_echo "$as_me: error: fixpath did not work!" >&2;}
33274   { (exit 1); exit 1; }; }
33275    fi
33276    { $as_echo "$as_me:$LINENO: result: yes" >&5
33277$as_echo "yes" >&6; }
33278    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
33279fi
33280
33281
33282
33283
33284###############################################################################
33285#
33286# We need to do some final tweaking, when everything else is done.
33287#
33288###############################################################################
33289
33290
33291HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
33292
33293
33294# The name of the Service Agent jar.
33295SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
33296if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
33297    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
33298fi
33299
33300
33301
33302
33303###############################################################################
33304#
33305# Configure parts of the build that only affect the build performance,
33306# not the result.
33307#
33308###############################################################################
33309
33310
33311# How many cores do we have on this build system?
33312
33313# Check whether --with-num-cores was given.
33314if test "${with_num_cores+set}" = set; then
33315  withval=$with_num_cores;
33316fi
33317
33318if test "x$with_num_cores" = x; then
33319    # The number of cores were not specified, try to probe them.
33320
33321    { $as_echo "$as_me:$LINENO: checking for number of cores" >&5
33322$as_echo_n "checking for number of cores... " >&6; }
33323    NUM_CORES=1
33324    FOUND_CORES=no
33325
33326    if test -f /proc/cpuinfo; then
33327        # Looks like a Linux (or cygwin) system
33328        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
33329        FOUND_CORES=yes
33330    elif test -x /usr/sbin/psrinfo; then
33331        # Looks like a Solaris system
33332        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
33333        FOUND_CORES=yes
33334    elif test -x /usr/sbin/system_profiler; then
33335        # Looks like a MacOSX system
33336        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
33337        FOUND_CORES=yes
33338    elif test -n "$NUMBER_OF_PROCESSORS"; then
33339        # On windows, look in the env
33340        NUM_CORES=$NUMBER_OF_PROCESSORS
33341        FOUND_CORES=yes
33342    fi
33343
33344    # For c/c++ code we run twice as many concurrent build
33345    # jobs than we have cores, otherwise we will stall on io.
33346    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
33347
33348    if test "x$FOUND_CORES" = xyes; then
33349        { $as_echo "$as_me:$LINENO: result: $NUM_CORES" >&5
33350$as_echo "$NUM_CORES" >&6; }
33351    else
33352        { $as_echo "$as_me:$LINENO: result: could not detect number of cores, defaulting to 1" >&5
33353$as_echo "could not detect number of cores, defaulting to 1" >&6; }
33354        { $as_echo "$as_me:$LINENO: WARNING: This will disable all parallelism from build!" >&5
33355$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
33356    fi
33357
33358
33359else
33360    NUM_CORES=$with_num_cores
33361    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
33362fi
33363
33364
33365
33366
33367# How much memory do we have on this build system?
33368
33369# Check whether --with-memory-size was given.
33370if test "${with_memory_size+set}" = set; then
33371  withval=$with_memory_size;
33372fi
33373
33374if test "x$with_memory_size" = x; then
33375    # The memory size was not specified, try to probe it.
33376
33377    { $as_echo "$as_me:$LINENO: checking for memory size" >&5
33378$as_echo_n "checking for memory size... " >&6; }
33379    # Default to 1024 MB
33380    MEMORY_SIZE=1024
33381    FOUND_MEM=no
33382
33383    if test -f /proc/meminfo; then
33384        # Looks like a Linux (or cygwin) system
33385        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33386        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33387        FOUND_MEM=yes
33388    elif test -x /usr/sbin/prtconf; then
33389        # Looks like a Solaris system
33390        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33391        FOUND_MEM=yes
33392    elif test -x /usr/sbin/system_profiler; then
33393        # Looks like a MacOSX system
33394        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33395        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33396        FOUND_MEM=yes
33397    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33398        # Windows, but without cygwin
33399        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33400        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33401        FOUND_MEM=yes
33402    fi
33403
33404    if test "x$FOUND_MEM" = xyes; then
33405        { $as_echo "$as_me:$LINENO: result: $MEMORY_SIZE MB" >&5
33406$as_echo "$MEMORY_SIZE MB" >&6; }
33407    else
33408        { $as_echo "$as_me:$LINENO: result: could not detect memory size, defaulting to 1024 MB" >&5
33409$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33410        { $as_echo "$as_me:$LINENO: WARNING: This might seriously impact build performance!" >&5
33411$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33412    fi
33413
33414else
33415    MEMORY_SIZE=$with_memory_size
33416fi
33417
33418
33419
33420# Setup smart javac (after cores and memory have been setup)
33421
33422
33423# Check whether --with-sjavac-server-java was given.
33424if test "${with_sjavac_server_java+set}" = set; then
33425  withval=$with_sjavac_server_java;
33426fi
33427
33428
33429if test "x$with_sjavac_server_java" != x; then
33430    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33431    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33432    if test "x$FOUND_VERSION" = x; then
33433        { { $as_echo "$as_me:$LINENO: error: Could not execute server java: $SJAVAC_SERVER_JAVA" >&5
33434$as_echo "$as_me: error: Could not execute server java: $SJAVAC_SERVER_JAVA" >&2;}
33435   { (exit 1); exit 1; }; }
33436    fi
33437else
33438    SJAVAC_SERVER_JAVA=""
33439    # Hotspot specific options.
33440
33441    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
33442    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
33443    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
33444    FOUND_VERSION=`$JAVA -verbosegc -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 -verbosegc"
33447    fi
33448
33449    # JRockit specific options.
33450
33451    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
33452    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
33453    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
33454    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
33455    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33456        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33457    fi
33458
33459    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33460fi
33461
33462
33463
33464# Check whether --with-sjavac-server-cores was given.
33465if test "${with_sjavac_server_cores+set}" = set; then
33466  withval=$with_sjavac_server_cores;
33467fi
33468
33469if test "x$with_sjavac_server_cores" != x; then
33470    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
33471else
33472    if test "$NUM_CORES" -gt 16; then
33473        # We set this arbitrary limit because we want to limit the heap
33474        # size of the javac server.
33475        # In the future we will make the javac compilers in the server
33476        # share more and more state, thus enabling us to use more and
33477        # more concurrent threads in the server.
33478        SJAVAC_SERVER_CORES="16"
33479    else
33480        SJAVAC_SERVER_CORES="$NUM_CORES"
33481    fi
33482
33483    if test "$MEMORY_SIZE" -gt "17000"; then
33484        MAX_HEAP_MEM=10000
33485
33486    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33487    # If so, then append -d64 to SJAVAC_SERVER_JAVA
33488    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
33489    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
33490    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33491        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33492    fi
33493
33494
33495    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33496    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
33497    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
33498    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
33499    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33500        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33501    fi
33502
33503    elif test "$MEMORY_SIZE" -gt "10000"; then
33504        MAX_HEAP_MEM=6000
33505
33506    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33507    # If so, then append -d64 to SJAVAC_SERVER_JAVA
33508    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
33509    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
33510    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33511        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33512    fi
33513
33514
33515    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33516    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
33517    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
33518    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
33519    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33520        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33521    fi
33522
33523    elif test "$MEMORY_SIZE" -gt "5000"; then
33524        MAX_HEAP_MEM=3000
33525
33526    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33527    # If so, then append -d64 to SJAVAC_SERVER_JAVA
33528    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
33529    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
33530    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33531        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33532    fi
33533
33534
33535    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33536    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
33537    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
33538    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
33539    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33540        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33541    fi
33542
33543    elif test "$MEMORY_SIZE" -gt "3800"; then
33544        MAX_HEAP_MEM=2500
33545
33546    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33547    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
33548    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
33549    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
33550    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33551        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33552    fi
33553
33554    elif test "$MEMORY_SIZE" -gt "1900"; then
33555        MAX_HEAP_MEM=1200
33556
33557    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33558    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
33559    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
33560    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
33561    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33562        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
33563    fi
33564
33565    elif test "$MEMORY_SIZE" -gt "1000"; then
33566        MAX_HEAP_MEM=900
33567
33568    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33569    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
33570    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
33571    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
33572    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33573        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33574    fi
33575
33576    else
33577        MAX_HEAP_MEM=512
33578
33579    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33580    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
33581    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
33582    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
33583    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33584        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33585    fi
33586
33587    fi
33588
33589
33590    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33591    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
33592    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
33593    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
33594    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33595        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
33596    fi
33597
33598
33599    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33600    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
33601    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
33602    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
33603    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33604        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
33605    fi
33606
33607
33608    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33609    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
33610    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
33611    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
33612    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33613        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
33614    fi
33615
33616
33617    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
33618    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
33619        { $as_echo "$as_me:$LINENO: checking if number of server cores must be reduced" >&5
33620$as_echo_n "checking if number of server cores must be reduced... " >&6; }
33621        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
33622        { $as_echo "$as_me:$LINENO: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
33623$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
33624    fi
33625fi
33626
33627
33628{ $as_echo "$as_me:$LINENO: checking whether to use sjavac" >&5
33629$as_echo_n "checking whether to use sjavac... " >&6; }
33630# Check whether --enable-sjavac was given.
33631if test "${enable_sjavac+set}" = set; then
33632  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33633else
33634  ENABLE_SJAVAC='no'
33635fi
33636
33637{ $as_echo "$as_me:$LINENO: result: $ENABLE_SJAVAC" >&5
33638$as_echo "$ENABLE_SJAVAC" >&6; }
33639
33640
33641if test "x$ENABLE_SJAVAC" = xyes; then
33642    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33643else
33644    SJAVAC_SERVER_DIR=
33645fi
33646
33647
33648
33649
33650# Can the C/C++ compiler use precompiled headers?
33651
33652
33653###############################################################################
33654#
33655# Can the C/C++ compiler use precompiled headers?
33656#
33657# Check whether --enable-precompiled-headers was given.
33658if test "${enable_precompiled_headers+set}" = set; then
33659  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33660else
33661  ENABLE_PRECOMPH=yes
33662fi
33663
33664
33665USE_PRECOMPILED_HEADER=1
33666if test "x$ENABLE_PRECOMPH" = xno; then
33667    USE_PRECOMPILED_HEADER=0
33668fi
33669
33670if test "x$ENABLE_PRECOMPH" = xyes; then
33671    # Check that the compiler actually supports precomp headers.
33672    if test "x$GCC" = xyes; then
33673         { $as_echo "$as_me:$LINENO: checking that precompiled headers work" >&5
33674$as_echo_n "checking that precompiled headers work... " >&6; }
33675         echo "int alfa();" > conftest.h
33676         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33677         if test ! -f conftest.hpp.gch; then
33678             USE_PRECOMPILED_HEADER=0
33679             { $as_echo "$as_me:$LINENO: result: no" >&5
33680$as_echo "no" >&6; }
33681         else
33682             { $as_echo "$as_me:$LINENO: result: yes" >&5
33683$as_echo "yes" >&6; }
33684         fi
33685         rm -f conftest.h conftest.hpp.gch
33686    fi
33687fi
33688
33689
33690
33691
33692# Setup use of ccache, if available
33693
33694    # Check whether --enable-ccache was given.
33695if test "${enable_ccache+set}" = set; then
33696  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33697else
33698  ENABLE_CCACHE=yes
33699fi
33700
33701    if test "x$ENABLE_CCACHE" = xyes; then
33702        # Extract the first word of "ccache", so it can be a program name with args.
33703set dummy ccache; ac_word=$2
33704{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
33705$as_echo_n "checking for $ac_word... " >&6; }
33706if test "${ac_cv_path_CCACHE+set}" = set; then
33707  $as_echo_n "(cached) " >&6
33708else
33709  case $CCACHE in
33710  [\\/]* | ?:[\\/]*)
33711  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33712  ;;
33713  *)
33714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33715for as_dir in $PATH
33716do
33717  IFS=$as_save_IFS
33718  test -z "$as_dir" && as_dir=.
33719  for ac_exec_ext in '' $ac_executable_extensions; do
33720  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33721    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33722    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
33723    break 2
33724  fi
33725done
33726done
33727IFS=$as_save_IFS
33728
33729  ;;
33730esac
33731fi
33732CCACHE=$ac_cv_path_CCACHE
33733if test -n "$CCACHE"; then
33734  { $as_echo "$as_me:$LINENO: result: $CCACHE" >&5
33735$as_echo "$CCACHE" >&6; }
33736else
33737  { $as_echo "$as_me:$LINENO: result: no" >&5
33738$as_echo "no" >&6; }
33739fi
33740
33741
33742    else
33743        { $as_echo "$as_me:$LINENO: checking for ccache" >&5
33744$as_echo_n "checking for ccache... " >&6; }
33745        { $as_echo "$as_me:$LINENO: result: explicitly disabled" >&5
33746$as_echo "explicitly disabled" >&6; }
33747        CCACHE=
33748    fi
33749
33750
33751
33752# Check whether --with-ccache-dir was given.
33753if test "${with_ccache_dir+set}" = set; then
33754  withval=$with_ccache_dir;
33755fi
33756
33757
33758    if test "x$with_ccache_dir" != x; then
33759        # When using a non home ccache directory, assume the use is to share ccache files
33760        # with other users. Thus change the umask.
33761        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33762    fi
33763    CCACHE_FOUND=""
33764    if test "x$CCACHE" != x; then
33765
33766    if test "x$CCACHE" != x; then
33767        CCACHE_FOUND="true"
33768        # Only use ccache if it is 3.1.4 or later, which supports
33769        # precompiled headers.
33770        { $as_echo "$as_me:$LINENO: checking if ccache supports precompiled headers" >&5
33771$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33772        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33773        if test "x$HAS_GOOD_CCACHE" = x; then
33774            { $as_echo "$as_me:$LINENO: result: no, disabling ccache" >&5
33775$as_echo "no, disabling ccache" >&6; }
33776            CCACHE=
33777        else
33778            { $as_echo "$as_me:$LINENO: result: yes" >&5
33779$as_echo "yes" >&6; }
33780            { $as_echo "$as_me:$LINENO: checking if C-compiler supports ccache precompiled headers" >&5
33781$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33782            PUSHED_FLAGS="$CXXFLAGS"
33783            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33784            cat >conftest.$ac_ext <<_ACEOF
33785/* confdefs.h.  */
33786_ACEOF
33787cat confdefs.h >>conftest.$ac_ext
33788cat >>conftest.$ac_ext <<_ACEOF
33789/* end confdefs.h.  */
33790
33791int
33792main ()
33793{
33794
33795  ;
33796  return 0;
33797}
33798_ACEOF
33799rm -f conftest.$ac_objext
33800if { (ac_try="$ac_compile"
33801case "(($ac_try" in
33802  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33803  *) ac_try_echo=$ac_try;;
33804esac
33805eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
33806$as_echo "$ac_try_echo") >&5
33807  (eval "$ac_compile") 2>conftest.er1
33808  ac_status=$?
33809  grep -v '^ *+' conftest.er1 >conftest.err
33810  rm -f conftest.er1
33811  cat conftest.err >&5
33812  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33813  (exit $ac_status); } && {
33814	 test -z "$ac_cxx_werror_flag" ||
33815	 test ! -s conftest.err
33816       } && test -s conftest.$ac_objext; then
33817  CC_KNOWS_CCACHE_TRICK=yes
33818else
33819  $as_echo "$as_me: failed program was:" >&5
33820sed 's/^/| /' conftest.$ac_ext >&5
33821
33822	CC_KNOWS_CCACHE_TRICK=no
33823fi
33824
33825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33826            CXXFLAGS="$PUSHED_FLAGS"
33827            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33828                { $as_echo "$as_me:$LINENO: result: yes" >&5
33829$as_echo "yes" >&6; }
33830            else
33831                { $as_echo "$as_me:$LINENO: result: no, disabling ccaching of precompiled headers" >&5
33832$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33833                CCACHE=
33834            fi
33835        fi
33836    fi
33837
33838    if test "x$CCACHE" != x; then
33839        CCACHE_SLOPPINESS=time_macros
33840        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33841        CCACHE_FLAGS=-fpch-preprocess
33842
33843        if test "x$SET_CCACHE_DIR" != x; then
33844            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33845	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33846        fi
33847    fi
33848
33849    fi
33850
33851
33852###############################################################################
33853#
33854# And now the finish...
33855#
33856###############################################################################
33857
33858# Check for some common pitfalls
33859
33860
33861{ $as_echo "$as_me:$LINENO: checking if build directory is on local disk" >&5
33862$as_echo_n "checking if build directory is on local disk... " >&6; }
33863
33864	# df -l lists only local disks; if the given directory is not found then
33865	# a non-zero exit code is given
33866  if test "x$DF" = x; then
33867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33868      # msys does not have df; use Windows "net use" instead.
33869      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33870      if test "x$IS_NETWORK_DISK" = x; then
33871        OUTPUT_DIR_IS_LOCAL="yes"
33872      else
33873        OUTPUT_DIR_IS_LOCAL="no"
33874      fi
33875    else
33876      # No df here, say it's local
33877      OUTPUT_DIR_IS_LOCAL="yes"
33878    fi
33879  else
33880    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33881      OUTPUT_DIR_IS_LOCAL="yes"
33882    else
33883      OUTPUT_DIR_IS_LOCAL="no"
33884    fi
33885  fi
33886
33887{ $as_echo "$as_me:$LINENO: result: $OUTPUT_DIR_IS_LOCAL" >&5
33888$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33889
33890# Check if the user has any old-style ALT_ variables set.
33891FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33892
33893# Before generating output files, test if they exist. If they do, this is a reconfigure.
33894# Since we can't properly handle the dependencies for this, warn the user about the situation
33895if test -e $OUTPUT_ROOT/spec.gmk; then
33896  IS_RECONFIGURE=yes
33897else
33898  IS_RECONFIGURE=no
33899fi
33900
33901if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33902  HIDE_PERFORMANCE_HINTS=yes
33903else
33904  HIDE_PERFORMANCE_HINTS=no
33905  # Hide it the next time around...
33906  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33907fi
33908
33909
33910
33911# At the end, call the custom hook. (Dummy macro if no custom sources available)
33912
33913
33914# We're messing a bit with internal autoconf variables to put the config.status
33915# in the output directory instead of the current directory.
33916CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33917# Create the actual output files. Now the main work of configure is done.
33918cat >confcache <<\_ACEOF
33919# This file is a shell script that caches the results of configure
33920# tests run on this system so they can be shared between configure
33921# scripts and configure runs, see configure's option --config-cache.
33922# It is not useful on other systems.  If it contains results you don't
33923# want to keep, you may remove or edit it.
33924#
33925# config.status only pays attention to the cache file if you give it
33926# the --recheck option to rerun configure.
33927#
33928# `ac_cv_env_foo' variables (set or unset) will be overridden when
33929# loading this file, other *unset* `ac_cv_foo' will be assigned the
33930# following values.
33931
33932_ACEOF
33933
33934# The following way of writing the cache mishandles newlines in values,
33935# but we know of no workaround that is simple, portable, and efficient.
33936# So, we kill variables containing newlines.
33937# Ultrix sh set writes to stderr and can't be redirected directly,
33938# and sets the high bit in the cache file unless we assign to the vars.
33939(
33940  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33941    eval ac_val=\$$ac_var
33942    case $ac_val in #(
33943    *${as_nl}*)
33944      case $ac_var in #(
33945      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
33946$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33947      esac
33948      case $ac_var in #(
33949      _ | IFS | as_nl) ;; #(
33950      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33951      *) $as_unset $ac_var ;;
33952      esac ;;
33953    esac
33954  done
33955
33956  (set) 2>&1 |
33957    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33958    *${as_nl}ac_space=\ *)
33959      # `set' does not quote correctly, so add quotes (double-quote
33960      # substitution turns \\\\ into \\, and sed turns \\ into \).
33961      sed -n \
33962	"s/'/'\\\\''/g;
33963	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33964      ;; #(
33965    *)
33966      # `set' quotes correctly as required by POSIX, so do not add quotes.
33967      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33968      ;;
33969    esac |
33970    sort
33971) |
33972  sed '
33973     /^ac_cv_env_/b end
33974     t clear
33975     :clear
33976     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33977     t end
33978     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33979     :end' >>confcache
33980if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33981  if test -w "$cache_file"; then
33982    test "x$cache_file" != "x/dev/null" &&
33983      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
33984$as_echo "$as_me: updating cache $cache_file" >&6;}
33985    cat confcache >$cache_file
33986  else
33987    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
33988$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33989  fi
33990fi
33991rm -f confcache
33992
33993test "x$prefix" = xNONE && prefix=$ac_default_prefix
33994# Let make expand exec_prefix.
33995test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33996
33997DEFS=-DHAVE_CONFIG_H
33998
33999ac_libobjs=
34000ac_ltlibobjs=
34001for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
34002  # 1. Remove the extension, and $U if already installed.
34003  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
34004  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
34005  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
34006  #    will be set to the directory where LIBOBJS objects are built.
34007  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
34008  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
34009done
34010LIBOBJS=$ac_libobjs
34011
34012LTLIBOBJS=$ac_ltlibobjs
34013
34014
34015
34016: ${CONFIG_STATUS=./config.status}
34017ac_write_fail=0
34018ac_clean_files_save=$ac_clean_files
34019ac_clean_files="$ac_clean_files $CONFIG_STATUS"
34020{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
34021$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
34022cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34023#! $SHELL
34024# Generated by $as_me.
34025# Run this file to recreate the current configuration.
34026# Compiler output produced by configure, useful for debugging
34027# configure, is in config.log if it exists.
34028
34029debug=false
34030ac_cs_recheck=false
34031ac_cs_silent=false
34032SHELL=\${CONFIG_SHELL-$SHELL}
34033_ACEOF
34034
34035cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34036## --------------------- ##
34037## M4sh Initialization.  ##
34038## --------------------- ##
34039
34040# Be more Bourne compatible
34041DUALCASE=1; export DUALCASE # for MKS sh
34042if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
34043  emulate sh
34044  NULLCMD=:
34045  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
34046  # is contrary to our usage.  Disable this feature.
34047  alias -g '${1+"$@"}'='"$@"'
34048  setopt NO_GLOB_SUBST
34049else
34050  case `(set -o) 2>/dev/null` in
34051  *posix*) set -o posix ;;
34052esac
34053
34054fi
34055
34056
34057
34058
34059# PATH needs CR
34060# Avoid depending upon Character Ranges.
34061as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34062as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34063as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34064as_cr_digits='0123456789'
34065as_cr_alnum=$as_cr_Letters$as_cr_digits
34066
34067as_nl='
34068'
34069export as_nl
34070# Printing a long string crashes Solaris 7 /usr/bin/printf.
34071as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
34072as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
34073as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
34074if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
34075  as_echo='printf %s\n'
34076  as_echo_n='printf %s'
34077else
34078  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
34079    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
34080    as_echo_n='/usr/ucb/echo -n'
34081  else
34082    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
34083    as_echo_n_body='eval
34084      arg=$1;
34085      case $arg in
34086      *"$as_nl"*)
34087	expr "X$arg" : "X\\(.*\\)$as_nl";
34088	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
34089      esac;
34090      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
34091    '
34092    export as_echo_n_body
34093    as_echo_n='sh -c $as_echo_n_body as_echo'
34094  fi
34095  export as_echo_body
34096  as_echo='sh -c $as_echo_body as_echo'
34097fi
34098
34099# The user is always right.
34100if test "${PATH_SEPARATOR+set}" != set; then
34101  PATH_SEPARATOR=:
34102  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
34103    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
34104      PATH_SEPARATOR=';'
34105  }
34106fi
34107
34108# Support unset when possible.
34109if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
34110  as_unset=unset
34111else
34112  as_unset=false
34113fi
34114
34115
34116# IFS
34117# We need space, tab and new line, in precisely that order.  Quoting is
34118# there to prevent editors from complaining about space-tab.
34119# (If _AS_PATH_WALK were called with IFS unset, it would disable word
34120# splitting by setting IFS to empty value.)
34121IFS=" ""	$as_nl"
34122
34123# Find who we are.  Look in the path if we contain no directory separator.
34124case $0 in
34125  *[\\/]* ) as_myself=$0 ;;
34126  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34127for as_dir in $PATH
34128do
34129  IFS=$as_save_IFS
34130  test -z "$as_dir" && as_dir=.
34131  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
34132done
34133IFS=$as_save_IFS
34134
34135     ;;
34136esac
34137# We did not find ourselves, most probably we were run as `sh COMMAND'
34138# in which case we are not to be found in the path.
34139if test "x$as_myself" = x; then
34140  as_myself=$0
34141fi
34142if test ! -f "$as_myself"; then
34143  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
34144  { (exit 1); exit 1; }
34145fi
34146
34147# Work around bugs in pre-3.0 UWIN ksh.
34148for as_var in ENV MAIL MAILPATH
34149do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
34150done
34151PS1='$ '
34152PS2='> '
34153PS4='+ '
34154
34155# NLS nuisances.
34156LC_ALL=C
34157export LC_ALL
34158LANGUAGE=C
34159export LANGUAGE
34160
34161# Required to use basename.
34162if expr a : '\(a\)' >/dev/null 2>&1 &&
34163   test "X`expr 00001 : '.*\(...\)'`" = X001; then
34164  as_expr=expr
34165else
34166  as_expr=false
34167fi
34168
34169if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
34170  as_basename=basename
34171else
34172  as_basename=false
34173fi
34174
34175
34176# Name of the executable.
34177as_me=`$as_basename -- "$0" ||
34178$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34179	 X"$0" : 'X\(//\)$' \| \
34180	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
34181$as_echo X/"$0" |
34182    sed '/^.*\/\([^/][^/]*\)\/*$/{
34183	    s//\1/
34184	    q
34185	  }
34186	  /^X\/\(\/\/\)$/{
34187	    s//\1/
34188	    q
34189	  }
34190	  /^X\/\(\/\).*/{
34191	    s//\1/
34192	    q
34193	  }
34194	  s/.*/./; q'`
34195
34196# CDPATH.
34197$as_unset CDPATH
34198
34199
34200
34201  as_lineno_1=$LINENO
34202  as_lineno_2=$LINENO
34203  test "x$as_lineno_1" != "x$as_lineno_2" &&
34204  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
34205
34206  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
34207  # uniformly replaced by the line number.  The first 'sed' inserts a
34208  # line-number line after each line using $LINENO; the second 'sed'
34209  # does the real work.  The second script uses 'N' to pair each
34210  # line-number line with the line containing $LINENO, and appends
34211  # trailing '-' during substitution so that $LINENO is not a special
34212  # case at line end.
34213  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
34214  # scripts with optimization help from Paolo Bonzini.  Blame Lee
34215  # E. McMahon (1931-1989) for sed's syntax.  :-)
34216  sed -n '
34217    p
34218    /[$]LINENO/=
34219  ' <$as_myself |
34220    sed '
34221      s/[$]LINENO.*/&-/
34222      t lineno
34223      b
34224      :lineno
34225      N
34226      :loop
34227      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
34228      t loop
34229      s/-\n.*//
34230    ' >$as_me.lineno &&
34231  chmod +x "$as_me.lineno" ||
34232    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
34233   { (exit 1); exit 1; }; }
34234
34235  # Don't try to exec as it changes $[0], causing all sort of problems
34236  # (the dirname of $[0] is not the place where we might find the
34237  # original and so on.  Autoconf is especially sensitive to this).
34238  . "./$as_me.lineno"
34239  # Exit status is that of the last command.
34240  exit
34241}
34242
34243
34244if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
34245  as_dirname=dirname
34246else
34247  as_dirname=false
34248fi
34249
34250ECHO_C= ECHO_N= ECHO_T=
34251case `echo -n x` in
34252-n*)
34253  case `echo 'x\c'` in
34254  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
34255  *)   ECHO_C='\c';;
34256  esac;;
34257*)
34258  ECHO_N='-n';;
34259esac
34260if expr a : '\(a\)' >/dev/null 2>&1 &&
34261   test "X`expr 00001 : '.*\(...\)'`" = X001; then
34262  as_expr=expr
34263else
34264  as_expr=false
34265fi
34266
34267rm -f conf$$ conf$$.exe conf$$.file
34268if test -d conf$$.dir; then
34269  rm -f conf$$.dir/conf$$.file
34270else
34271  rm -f conf$$.dir
34272  mkdir conf$$.dir 2>/dev/null
34273fi
34274if (echo >conf$$.file) 2>/dev/null; then
34275  if ln -s conf$$.file conf$$ 2>/dev/null; then
34276    as_ln_s='ln -s'
34277    # ... but there are two gotchas:
34278    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34279    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34280    # In both cases, we have to default to `cp -p'.
34281    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34282      as_ln_s='cp -p'
34283  elif ln conf$$.file conf$$ 2>/dev/null; then
34284    as_ln_s=ln
34285  else
34286    as_ln_s='cp -p'
34287  fi
34288else
34289  as_ln_s='cp -p'
34290fi
34291rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34292rmdir conf$$.dir 2>/dev/null
34293
34294if mkdir -p . 2>/dev/null; then
34295  as_mkdir_p=:
34296else
34297  test -d ./-p && rmdir ./-p
34298  as_mkdir_p=false
34299fi
34300
34301if test -x / >/dev/null 2>&1; then
34302  as_test_x='test -x'
34303else
34304  if ls -dL / >/dev/null 2>&1; then
34305    as_ls_L_option=L
34306  else
34307    as_ls_L_option=
34308  fi
34309  as_test_x='
34310    eval sh -c '\''
34311      if test -d "$1"; then
34312	test -d "$1/.";
34313      else
34314	case $1 in
34315	-*)set "./$1";;
34316	esac;
34317	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
34318	???[sx]*):;;*)false;;esac;fi
34319    '\'' sh
34320  '
34321fi
34322as_executable_p=$as_test_x
34323
34324# Sed expression to map a string onto a valid CPP name.
34325as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34326
34327# Sed expression to map a string onto a valid variable name.
34328as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34329
34330
34331exec 6>&1
34332
34333# Save the log message, to keep $[0] and so on meaningful, and to
34334# report actual input values of CONFIG_FILES etc. instead of their
34335# values after options handling.
34336ac_log="
34337This file was extended by OpenJDK $as_me jdk8, which was
34338generated by GNU Autoconf 2.63.  Invocation command line was
34339
34340  CONFIG_FILES    = $CONFIG_FILES
34341  CONFIG_HEADERS  = $CONFIG_HEADERS
34342  CONFIG_LINKS    = $CONFIG_LINKS
34343  CONFIG_COMMANDS = $CONFIG_COMMANDS
34344  $ $0 $@
34345
34346on `(hostname || uname -n) 2>/dev/null | sed 1q`
34347"
34348
34349_ACEOF
34350
34351case $ac_config_files in *"
34352"*) set x $ac_config_files; shift; ac_config_files=$*;;
34353esac
34354
34355case $ac_config_headers in *"
34356"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34357esac
34358
34359
34360cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34361# Files that config.status was made for.
34362config_files="$ac_config_files"
34363config_headers="$ac_config_headers"
34364
34365_ACEOF
34366
34367cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34368ac_cs_usage="\
34369\`$as_me' instantiates files from templates according to the
34370current configuration.
34371
34372Usage: $0 [OPTION]... [FILE]...
34373
34374  -h, --help       print this help, then exit
34375  -V, --version    print version number and configuration settings, then exit
34376  -q, --quiet, --silent
34377                   do not print progress messages
34378  -d, --debug      don't remove temporary files
34379      --recheck    update $as_me by reconfiguring in the same conditions
34380      --file=FILE[:TEMPLATE]
34381                   instantiate the configuration file FILE
34382      --header=FILE[:TEMPLATE]
34383                   instantiate the configuration header FILE
34384
34385Configuration files:
34386$config_files
34387
34388Configuration headers:
34389$config_headers
34390
34391Report bugs to <bug-autoconf@gnu.org>."
34392
34393_ACEOF
34394cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34395ac_cs_version="\\
34396OpenJDK config.status jdk8
34397configured by $0, generated by GNU Autoconf 2.63,
34398  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
34399
34400Copyright (C) 2008 Free Software Foundation, Inc.
34401This config.status script is free software; the Free Software Foundation
34402gives unlimited permission to copy, distribute and modify it."
34403
34404ac_pwd='$ac_pwd'
34405srcdir='$srcdir'
34406AWK='$AWK'
34407test -n "\$AWK" || AWK=awk
34408_ACEOF
34409
34410cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34411# The default lists apply if the user does not specify any file.
34412ac_need_defaults=:
34413while test $# != 0
34414do
34415  case $1 in
34416  --*=*)
34417    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34418    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34419    ac_shift=:
34420    ;;
34421  *)
34422    ac_option=$1
34423    ac_optarg=$2
34424    ac_shift=shift
34425    ;;
34426  esac
34427
34428  case $ac_option in
34429  # Handling of the options.
34430  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34431    ac_cs_recheck=: ;;
34432  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34433    $as_echo "$ac_cs_version"; exit ;;
34434  --debug | --debu | --deb | --de | --d | -d )
34435    debug=: ;;
34436  --file | --fil | --fi | --f )
34437    $ac_shift
34438    case $ac_optarg in
34439    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34440    esac
34441    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
34442    ac_need_defaults=false;;
34443  --header | --heade | --head | --hea )
34444    $ac_shift
34445    case $ac_optarg in
34446    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34447    esac
34448    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
34449    ac_need_defaults=false;;
34450  --he | --h)
34451    # Conflict between --help and --header
34452    { $as_echo "$as_me: error: ambiguous option: $1
34453Try \`$0 --help' for more information." >&2
34454   { (exit 1); exit 1; }; };;
34455  --help | --hel | -h )
34456    $as_echo "$ac_cs_usage"; exit ;;
34457  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34458  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34459    ac_cs_silent=: ;;
34460
34461  # This is an error.
34462  -*) { $as_echo "$as_me: error: unrecognized option: $1
34463Try \`$0 --help' for more information." >&2
34464   { (exit 1); exit 1; }; } ;;
34465
34466  *) ac_config_targets="$ac_config_targets $1"
34467     ac_need_defaults=false ;;
34468
34469  esac
34470  shift
34471done
34472
34473ac_configure_extra_args=
34474
34475if $ac_cs_silent; then
34476  exec 6>/dev/null
34477  ac_configure_extra_args="$ac_configure_extra_args --silent"
34478fi
34479
34480_ACEOF
34481cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34482if \$ac_cs_recheck; then
34483  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34484  shift
34485  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34486  CONFIG_SHELL='$SHELL'
34487  export CONFIG_SHELL
34488  exec "\$@"
34489fi
34490
34491_ACEOF
34492cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34493exec 5>>config.log
34494{
34495  echo
34496  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34497## Running $as_me. ##
34498_ASBOX
34499  $as_echo "$ac_log"
34500} >&5
34501
34502_ACEOF
34503cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34504_ACEOF
34505
34506cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34507
34508# Handling of arguments.
34509for ac_config_target in $ac_config_targets
34510do
34511  case $ac_config_target in
34512    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34513    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34514    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34515    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34516    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34517    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34518    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34519
34520  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
34521$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
34522   { (exit 1); exit 1; }; };;
34523  esac
34524done
34525
34526
34527# If the user did not use the arguments to specify the items to instantiate,
34528# then the envvar interface is used.  Set only those that are not.
34529# We use the long form for the default assignment because of an extremely
34530# bizarre bug on SunOS 4.1.3.
34531if $ac_need_defaults; then
34532  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34533  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34534fi
34535
34536# Have a temporary directory for convenience.  Make it in the build tree
34537# simply because there is no reason against having it here, and in addition,
34538# creating and moving files from /tmp can sometimes cause problems.
34539# Hook for its removal unless debugging.
34540# Note that there is a small window in which the directory will not be cleaned:
34541# after its creation but before its name has been assigned to `$tmp'.
34542$debug ||
34543{
34544  tmp=
34545  trap 'exit_status=$?
34546  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34547' 0
34548  trap '{ (exit 1); exit 1; }' 1 2 13 15
34549}
34550# Create a (secure) tmp directory for tmp files.
34551
34552{
34553  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34554  test -n "$tmp" && test -d "$tmp"
34555}  ||
34556{
34557  tmp=./conf$$-$RANDOM
34558  (umask 077 && mkdir "$tmp")
34559} ||
34560{
34561   $as_echo "$as_me: cannot create a temporary directory in ." >&2
34562   { (exit 1); exit 1; }
34563}
34564
34565# Set up the scripts for CONFIG_FILES section.
34566# No need to generate them if there are no CONFIG_FILES.
34567# This happens for instance with `./config.status config.h'.
34568if test -n "$CONFIG_FILES"; then
34569
34570
34571ac_cr='
34572'
34573ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34574if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34575  ac_cs_awk_cr='\\r'
34576else
34577  ac_cs_awk_cr=$ac_cr
34578fi
34579
34580echo 'BEGIN {' >"$tmp/subs1.awk" &&
34581_ACEOF
34582
34583
34584{
34585  echo "cat >conf$$subs.awk <<_ACEOF" &&
34586  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34587  echo "_ACEOF"
34588} >conf$$subs.sh ||
34589  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
34590$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
34591   { (exit 1); exit 1; }; }
34592ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
34593ac_delim='%!_!# '
34594for ac_last_try in false false false false false :; do
34595  . ./conf$$subs.sh ||
34596    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
34597$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
34598   { (exit 1); exit 1; }; }
34599
34600  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34601  if test $ac_delim_n = $ac_delim_num; then
34602    break
34603  elif $ac_last_try; then
34604    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
34605$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
34606   { (exit 1); exit 1; }; }
34607  else
34608    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34609  fi
34610done
34611rm -f conf$$subs.sh
34612
34613cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34614cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34615_ACEOF
34616sed -n '
34617h
34618s/^/S["/; s/!.*/"]=/
34619p
34620g
34621s/^[^!]*!//
34622:repl
34623t repl
34624s/'"$ac_delim"'$//
34625t delim
34626:nl
34627h
34628s/\(.\{148\}\).*/\1/
34629t more1
34630s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34631p
34632n
34633b repl
34634:more1
34635s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34636p
34637g
34638s/.\{148\}//
34639t nl
34640:delim
34641h
34642s/\(.\{148\}\).*/\1/
34643t more2
34644s/["\\]/\\&/g; s/^/"/; s/$/"/
34645p
34646b
34647:more2
34648s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34649p
34650g
34651s/.\{148\}//
34652t delim
34653' <conf$$subs.awk | sed '
34654/^[^""]/{
34655  N
34656  s/\n//
34657}
34658' >>$CONFIG_STATUS || ac_write_fail=1
34659rm -f conf$$subs.awk
34660cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34661_ACAWK
34662cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34663  for (key in S) S_is_set[key] = 1
34664  FS = ""
34665
34666}
34667{
34668  line = $ 0
34669  nfields = split(line, field, "@")
34670  substed = 0
34671  len = length(field[1])
34672  for (i = 2; i < nfields; i++) {
34673    key = field[i]
34674    keylen = length(key)
34675    if (S_is_set[key]) {
34676      value = S[key]
34677      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34678      len += length(value) + length(field[++i])
34679      substed = 1
34680    } else
34681      len += 1 + keylen
34682  }
34683
34684  print line
34685}
34686
34687_ACAWK
34688_ACEOF
34689cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34690if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34691  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34692else
34693  cat
34694fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34695  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
34696$as_echo "$as_me: error: could not setup config files machinery" >&2;}
34697   { (exit 1); exit 1; }; }
34698_ACEOF
34699
34700# VPATH may cause trouble with some makes, so we remove $(srcdir),
34701# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
34702# trailing colons and then remove the whole line if VPATH becomes empty
34703# (actually we leave an empty line to preserve line numbers).
34704if test "x$srcdir" = x.; then
34705  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
34706s/:*\$(srcdir):*/:/
34707s/:*\${srcdir}:*/:/
34708s/:*@srcdir@:*/:/
34709s/^\([^=]*=[	 ]*\):*/\1/
34710s/:*$//
34711s/^[^=]*=[	 ]*$//
34712}'
34713fi
34714
34715cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34716fi # test -n "$CONFIG_FILES"
34717
34718# Set up the scripts for CONFIG_HEADERS section.
34719# No need to generate them if there are no CONFIG_HEADERS.
34720# This happens for instance with `./config.status Makefile'.
34721if test -n "$CONFIG_HEADERS"; then
34722cat >"$tmp/defines.awk" <<\_ACAWK ||
34723BEGIN {
34724_ACEOF
34725
34726# Transform confdefs.h into an awk script `defines.awk', embedded as
34727# here-document in config.status, that substitutes the proper values into
34728# config.h.in to produce config.h.
34729
34730# Create a delimiter string that does not exist in confdefs.h, to ease
34731# handling of long lines.
34732ac_delim='%!_!# '
34733for ac_last_try in false false :; do
34734  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34735  if test -z "$ac_t"; then
34736    break
34737  elif $ac_last_try; then
34738    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
34739$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
34740   { (exit 1); exit 1; }; }
34741  else
34742    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34743  fi
34744done
34745
34746# For the awk script, D is an array of macro values keyed by name,
34747# likewise P contains macro parameters if any.  Preserve backslash
34748# newline sequences.
34749
34750ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34751sed -n '
34752s/.\{148\}/&'"$ac_delim"'/g
34753t rset
34754:rset
34755s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34756t def
34757d
34758:def
34759s/\\$//
34760t bsnl
34761s/["\\]/\\&/g
34762s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34763D["\1"]=" \3"/p
34764s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34765d
34766:bsnl
34767s/["\\]/\\&/g
34768s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34769D["\1"]=" \3\\\\\\n"\\/p
34770t cont
34771s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34772t cont
34773d
34774:cont
34775n
34776s/.\{148\}/&'"$ac_delim"'/g
34777t clear
34778:clear
34779s/\\$//
34780t bsnlc
34781s/["\\]/\\&/g; s/^/"/; s/$/"/p
34782d
34783:bsnlc
34784s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34785b cont
34786' <confdefs.h | sed '
34787s/'"$ac_delim"'/"\\\
34788"/g' >>$CONFIG_STATUS || ac_write_fail=1
34789
34790cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34791  for (key in D) D_is_set[key] = 1
34792  FS = ""
34793}
34794/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34795  line = \$ 0
34796  split(line, arg, " ")
34797  if (arg[1] == "#") {
34798    defundef = arg[2]
34799    mac1 = arg[3]
34800  } else {
34801    defundef = substr(arg[1], 2)
34802    mac1 = arg[2]
34803  }
34804  split(mac1, mac2, "(") #)
34805  macro = mac2[1]
34806  prefix = substr(line, 1, index(line, defundef) - 1)
34807  if (D_is_set[macro]) {
34808    # Preserve the white space surrounding the "#".
34809    print prefix "define", macro P[macro] D[macro]
34810    next
34811  } else {
34812    # Replace #undef with comments.  This is necessary, for example,
34813    # in the case of _POSIX_SOURCE, which is predefined and required
34814    # on some systems where configure will not decide to define it.
34815    if (defundef == "undef") {
34816      print "/*", prefix defundef, macro, "*/"
34817      next
34818    }
34819  }
34820}
34821{ print }
34822_ACAWK
34823_ACEOF
34824cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34825  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
34826$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
34827   { (exit 1); exit 1; }; }
34828fi # test -n "$CONFIG_HEADERS"
34829
34830
34831eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34832shift
34833for ac_tag
34834do
34835  case $ac_tag in
34836  :[FHLC]) ac_mode=$ac_tag; continue;;
34837  esac
34838  case $ac_mode$ac_tag in
34839  :[FHL]*:*);;
34840  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
34841$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
34842   { (exit 1); exit 1; }; };;
34843  :[FH]-) ac_tag=-:-;;
34844  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34845  esac
34846  ac_save_IFS=$IFS
34847  IFS=:
34848  set x $ac_tag
34849  IFS=$ac_save_IFS
34850  shift
34851  ac_file=$1
34852  shift
34853
34854  case $ac_mode in
34855  :L) ac_source=$1;;
34856  :[FH])
34857    ac_file_inputs=
34858    for ac_f
34859    do
34860      case $ac_f in
34861      -) ac_f="$tmp/stdin";;
34862      *) # Look for the file first in the build tree, then in the source tree
34863	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34864	 # because $ac_f cannot contain `:'.
34865	 test -f "$ac_f" ||
34866	   case $ac_f in
34867	   [\\/$]*) false;;
34868	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34869	   esac ||
34870	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
34871$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
34872   { (exit 1); exit 1; }; };;
34873      esac
34874      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34875      ac_file_inputs="$ac_file_inputs '$ac_f'"
34876    done
34877
34878    # Let's still pretend it is `configure' which instantiates (i.e., don't
34879    # use $as_me), people would be surprised to read:
34880    #    /* config.h.  Generated by config.status.  */
34881    configure_input='Generated from '`
34882	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34883	`' by configure.'
34884    if test x"$ac_file" != x-; then
34885      configure_input="$ac_file.  $configure_input"
34886      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
34887$as_echo "$as_me: creating $ac_file" >&6;}
34888    fi
34889    # Neutralize special characters interpreted by sed in replacement strings.
34890    case $configure_input in #(
34891    *\&* | *\|* | *\\* )
34892       ac_sed_conf_input=`$as_echo "$configure_input" |
34893       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34894    *) ac_sed_conf_input=$configure_input;;
34895    esac
34896
34897    case $ac_tag in
34898    *:-:* | *:-) cat >"$tmp/stdin" \
34899      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
34900$as_echo "$as_me: error: could not create $ac_file" >&2;}
34901   { (exit 1); exit 1; }; } ;;
34902    esac
34903    ;;
34904  esac
34905
34906  ac_dir=`$as_dirname -- "$ac_file" ||
34907$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34908	 X"$ac_file" : 'X\(//\)[^/]' \| \
34909	 X"$ac_file" : 'X\(//\)$' \| \
34910	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34911$as_echo X"$ac_file" |
34912    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34913	    s//\1/
34914	    q
34915	  }
34916	  /^X\(\/\/\)[^/].*/{
34917	    s//\1/
34918	    q
34919	  }
34920	  /^X\(\/\/\)$/{
34921	    s//\1/
34922	    q
34923	  }
34924	  /^X\(\/\).*/{
34925	    s//\1/
34926	    q
34927	  }
34928	  s/.*/./; q'`
34929  { as_dir="$ac_dir"
34930  case $as_dir in #(
34931  -*) as_dir=./$as_dir;;
34932  esac
34933  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
34934    as_dirs=
34935    while :; do
34936      case $as_dir in #(
34937      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34938      *) as_qdir=$as_dir;;
34939      esac
34940      as_dirs="'$as_qdir' $as_dirs"
34941      as_dir=`$as_dirname -- "$as_dir" ||
34942$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34943	 X"$as_dir" : 'X\(//\)[^/]' \| \
34944	 X"$as_dir" : 'X\(//\)$' \| \
34945	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34946$as_echo X"$as_dir" |
34947    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34948	    s//\1/
34949	    q
34950	  }
34951	  /^X\(\/\/\)[^/].*/{
34952	    s//\1/
34953	    q
34954	  }
34955	  /^X\(\/\/\)$/{
34956	    s//\1/
34957	    q
34958	  }
34959	  /^X\(\/\).*/{
34960	    s//\1/
34961	    q
34962	  }
34963	  s/.*/./; q'`
34964      test -d "$as_dir" && break
34965    done
34966    test -z "$as_dirs" || eval "mkdir $as_dirs"
34967  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
34968$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
34969   { (exit 1); exit 1; }; }; }
34970  ac_builddir=.
34971
34972case "$ac_dir" in
34973.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34974*)
34975  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34976  # A ".." for each directory in $ac_dir_suffix.
34977  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34978  case $ac_top_builddir_sub in
34979  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34980  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34981  esac ;;
34982esac
34983ac_abs_top_builddir=$ac_pwd
34984ac_abs_builddir=$ac_pwd$ac_dir_suffix
34985# for backward compatibility:
34986ac_top_builddir=$ac_top_build_prefix
34987
34988case $srcdir in
34989  .)  # We are building in place.
34990    ac_srcdir=.
34991    ac_top_srcdir=$ac_top_builddir_sub
34992    ac_abs_top_srcdir=$ac_pwd ;;
34993  [\\/]* | ?:[\\/]* )  # Absolute name.
34994    ac_srcdir=$srcdir$ac_dir_suffix;
34995    ac_top_srcdir=$srcdir
34996    ac_abs_top_srcdir=$srcdir ;;
34997  *) # Relative name.
34998    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34999    ac_top_srcdir=$ac_top_build_prefix$srcdir
35000    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
35001esac
35002ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
35003
35004
35005  case $ac_mode in
35006  :F)
35007  #
35008  # CONFIG_FILE
35009  #
35010
35011_ACEOF
35012
35013cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35014# If the template does not know about datarootdir, expand it.
35015# FIXME: This hack should be removed a few years after 2.60.
35016ac_datarootdir_hack=; ac_datarootdir_seen=
35017
35018ac_sed_dataroot='
35019/datarootdir/ {
35020  p
35021  q
35022}
35023/@datadir@/p
35024/@docdir@/p
35025/@infodir@/p
35026/@localedir@/p
35027/@mandir@/p
35028'
35029case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
35030*datarootdir*) ac_datarootdir_seen=yes;;
35031*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
35032  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
35033$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
35034_ACEOF
35035cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35036  ac_datarootdir_hack='
35037  s&@datadir@&$datadir&g
35038  s&@docdir@&$docdir&g
35039  s&@infodir@&$infodir&g
35040  s&@localedir@&$localedir&g
35041  s&@mandir@&$mandir&g
35042    s&\\\${datarootdir}&$datarootdir&g' ;;
35043esac
35044_ACEOF
35045
35046# Neutralize VPATH when `$srcdir' = `.'.
35047# Shell code in configure.ac might set extrasub.
35048# FIXME: do we really want to maintain this feature?
35049cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35050ac_sed_extra="$ac_vpsub
35051$extrasub
35052_ACEOF
35053cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35054:t
35055/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
35056s|@configure_input@|$ac_sed_conf_input|;t t
35057s&@top_builddir@&$ac_top_builddir_sub&;t t
35058s&@top_build_prefix@&$ac_top_build_prefix&;t t
35059s&@srcdir@&$ac_srcdir&;t t
35060s&@abs_srcdir@&$ac_abs_srcdir&;t t
35061s&@top_srcdir@&$ac_top_srcdir&;t t
35062s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
35063s&@builddir@&$ac_builddir&;t t
35064s&@abs_builddir@&$ac_abs_builddir&;t t
35065s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
35066$ac_datarootdir_hack
35067"
35068eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
35069  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
35070$as_echo "$as_me: error: could not create $ac_file" >&2;}
35071   { (exit 1); exit 1; }; }
35072
35073test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
35074  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
35075  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
35076  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35077which seems to be undefined.  Please make sure it is defined." >&5
35078$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35079which seems to be undefined.  Please make sure it is defined." >&2;}
35080
35081  rm -f "$tmp/stdin"
35082  case $ac_file in
35083  -) cat "$tmp/out" && rm -f "$tmp/out";;
35084  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
35085  esac \
35086  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
35087$as_echo "$as_me: error: could not create $ac_file" >&2;}
35088   { (exit 1); exit 1; }; }
35089 ;;
35090  :H)
35091  #
35092  # CONFIG_HEADER
35093  #
35094  if test x"$ac_file" != x-; then
35095    {
35096      $as_echo "/* $configure_input  */" \
35097      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
35098    } >"$tmp/config.h" \
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    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
35103      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
35104$as_echo "$as_me: $ac_file is unchanged" >&6;}
35105    else
35106      rm -f "$ac_file"
35107      mv "$tmp/config.h" "$ac_file" \
35108	|| { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
35109$as_echo "$as_me: error: could not create $ac_file" >&2;}
35110   { (exit 1); exit 1; }; }
35111    fi
35112  else
35113    $as_echo "/* $configure_input  */" \
35114      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
35115      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
35116$as_echo "$as_me: error: could not create -" >&2;}
35117   { (exit 1); exit 1; }; }
35118  fi
35119 ;;
35120
35121
35122  esac
35123
35124done # for ac_tag
35125
35126
35127{ (exit 0); exit 0; }
35128_ACEOF
35129chmod +x $CONFIG_STATUS
35130ac_clean_files=$ac_clean_files_save
35131
35132test $ac_write_fail = 0 ||
35133  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
35134$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
35135   { (exit 1); exit 1; }; }
35136
35137
35138# configure is writing to config.log, and then calls config.status.
35139# config.status does its own redirection, appending to config.log.
35140# Unfortunately, on DOS this fails, as config.log is still kept open
35141# by configure, so config.status won't be able to write to it; its
35142# output is simply discarded.  So we exec the FD to /dev/null,
35143# effectively closing config.log, so it can be properly (re)opened and
35144# appended to by config.status.  When coming back to configure, we
35145# need to make the FD available again.
35146if test "$no_create" != yes; then
35147  ac_cs_success=:
35148  ac_config_status_args=
35149  test "$silent" = yes &&
35150    ac_config_status_args="$ac_config_status_args --quiet"
35151  exec 5>/dev/null
35152  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
35153  exec 5>>config.log
35154  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
35155  # would make configure fail if this is the last instruction.
35156  $ac_cs_success || { (exit 1); exit 1; }
35157fi
35158if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
35159  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
35160$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
35161fi
35162
35163
35164# Make the compare script executable
35165$CHMOD +x $OUTPUT_ROOT/compare.sh
35166
35167# Finally output some useful information to the user
35168
35169# Finally output some useful information to the user
35170
35171if test "x$CCACHE_FOUND" != x; then
35172	if  test "x$HAS_GOOD_CCACHE" = x; then
35173		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
35174		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
35175	else
35176		CCACHE_STATUS="installed and in use"
35177	fi
35178else
35179	if test "x$GCC" = xyes; then
35180		CCACHE_STATUS="not installed (consider installing)"
35181		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
35182	else
35183		CCACHE_STATUS="not available for your system"
35184	fi
35185fi
35186
35187printf "\n"
35188printf "====================================================\n"
35189printf "A new configuration has been successfully created in\n"
35190printf "$OUTPUT_ROOT\n"
35191if test "x$CONFIGURE_COMMAND_LINE" != x; then
35192	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
35193else
35194	printf "using default settings.\n"
35195fi
35196
35197printf "\n"
35198printf "Configuration summary:\n"
35199printf "* Debug level:    $DEBUG_LEVEL\n"
35200printf "* JDK variant:    $JDK_VARIANT\n"
35201printf "* JVM variants:   $with_jvm_variants\n"
35202printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
35203
35204printf "\n"
35205printf "Tools summary:\n"
35206if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
35207  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
35208fi
35209printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
35210printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
35211printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
35212
35213printf "\n"
35214printf "Build performance summary:\n"
35215printf "* Cores to use:   $NUM_CORES\n"
35216printf "* Memory limit:   $MEMORY_SIZE MB\n"
35217printf "* ccache status:  $CCACHE_STATUS\n"
35218printf "\n"
35219
35220if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
35221	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
35222	printf "$CCACHE_HELP_MSG\n"
35223
35224    # Print a helpful message on how to acquire the necessary build dependency.
35225    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
35226    MISSING_DEPENDENCY=ccache
35227    PKGHANDLER_COMMAND=
35228
35229    case $PKGHANDLER in
35230	apt-get)
35231                apt_help     $MISSING_DEPENDENCY ;;
35232    yum)
35233                yum_help     $MISSING_DEPENDENCY ;;
35234	port)
35235                port_help    $MISSING_DEPENDENCY ;;
35236	pkgutil)
35237                pkgutil_help $MISSING_DEPENDENCY ;;
35238	pkgadd)
35239                pkgadd_help  $MISSING_DEPENDENCY ;;
35240    * )
35241      break ;;
35242    esac
35243
35244    if test "x$PKGHANDLER_COMMAND" != x; then
35245        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35246    fi
35247
35248	printf "$HELP_MSG\n"
35249	printf "\n"
35250fi
35251
35252if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
35253	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
35254	printf "will result in longer build times.\n"
35255	printf "\n"
35256fi
35257
35258if test "x$FOUND_ALT_VARIABLES" != "x"; then
35259	printf "WARNING: You have old-style ALT_ environment variables set.\n"
35260	printf "These are not respected, and will be ignored. It is recommended\n"
35261	printf "that you clean your environment. The following variables are set:\n"
35262	printf "$FOUND_ALT_VARIABLES\n"
35263	printf "\n"
35264fi
35265
35266if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
35267	printf "WARNING: Your build output directory is not on a local disk.\n"
35268	printf "This will severely degrade build performance!\n"
35269	printf "It is recommended that you create an output directory on a local disk,\n"
35270	printf "and run the configure script again from that directory.\n"
35271	printf "\n"
35272fi
35273
35274if test "x$IS_RECONFIGURE" = "xyes"; then
35275	printf "WARNING: The result of this configuration has overridden an older\n"
35276	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
35277	printf "proper build. Failure to do so might result in strange build problems.\n"
35278	printf "\n"
35279fi
35280
35281