generated-configure.sh revision 511:f59a07f85125
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=1352917083
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.
7140# To enable comparison of directories, CURDIR needs to be symlink free
7141# just like SRC_ROOT already is
7142NOSYM_CURDIR="$CURDIR"
7143
7144    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7145        # Follow a chain of symbolic links. Use readlink
7146        # where it exists, else fall back to horribly
7147        # complicated shell code.
7148        if test "x$READLINK_TESTED" != yes; then
7149            # On MacOSX there is a readlink tool with a different
7150            # purpose than the GNU readlink tool. Check the found readlink.
7151            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
7152            if test "x$ISGNU" = x; then
7153                 # A readlink that we do not know how to use.
7154                 # Are there other non-GNU readlinks out there?
7155                 READLINK_TESTED=yes
7156                 READLINK=
7157            fi
7158        fi
7159
7160        if test "x$READLINK" != x; then
7161            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7162        else
7163            STARTDIR=$PWD
7164            COUNTER=0
7165            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7166            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7167            while test $COUNTER -lt 20; do
7168                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7169                if test "x$ISLINK" == x; then
7170                    # This is not a symbolic link! We are done!
7171                    break
7172                fi
7173                # The link might be relative! We have to use cd to travel safely.
7174                cd $sym_link_dir
7175                # ... and we must get the to the absolute path, not one using symbolic links.
7176                cd `pwd -P`
7177                cd `$DIRNAME $ISLINK`
7178                sym_link_dir=`$THEPWDCMD`
7179                sym_link_file=`$BASENAME $ISLINK`
7180                let COUNTER=COUNTER+1
7181            done
7182            cd $STARTDIR
7183            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7184        fi
7185    fi
7186
7187if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7188        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7189        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7190    # We are running configure from the src root.
7191    # Create a default ./build/target-variant-debuglevel output root.
7192    if test "x${CONF_NAME}" = x; then
7193        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7194    fi
7195    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7196    $MKDIR -p "$OUTPUT_ROOT"
7197    if test ! -d "$OUTPUT_ROOT"; then
7198        { { $as_echo "$as_me:$LINENO: error: Could not create build directory $OUTPUT_ROOT" >&5
7199$as_echo "$as_me: error: Could not create build directory $OUTPUT_ROOT" >&2;}
7200   { (exit 1); exit 1; }; }
7201    fi
7202else
7203    # We are running configure from outside of the src dir.
7204    # Then use the current directory as output dir!
7205    # If configuration is situated in normal build directory, just use the build
7206    # directory name as configuration name, otherwise use the complete path.
7207    if test "x${CONF_NAME}" = x; then
7208        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7209    fi
7210    OUTPUT_ROOT="$CURDIR"
7211
7212    # WARNING: This might be a bad thing to do. You need to be sure you want to
7213    # have a configuration in this directory. Do some sanity checks!
7214
7215    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7216      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7217      # other files
7218      files_present=`$LS $OUTPUT_ROOT`
7219      # Configure has already touched config.log and confdefs.h in the current dir when this check
7220      # is performed.
7221      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7222                                             | $TR -d '\n'`
7223      if test "x$filtered_files" != x; then
7224        { $as_echo "$as_me:$LINENO: Current directory is $CURDIR." >&5
7225$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7226        { $as_echo "$as_me:$LINENO: Since this is not the source root, configure will output the configuration here" >&5
7227$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7228        { $as_echo "$as_me:$LINENO: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7229$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7230        { $as_echo "$as_me:$LINENO: However, this directory is not empty. This is not allowed, since it could" >&5
7231$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7232        { $as_echo "$as_me:$LINENO: seriously mess up just about everything." >&5
7233$as_echo "$as_me: seriously mess up just about everything." >&6;}
7234        { $as_echo "$as_me:$LINENO: Try 'cd $SRC_ROOT' and restart configure" >&5
7235$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7236        { $as_echo "$as_me:$LINENO: (or create a new empty directory and cd to it)." >&5
7237$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7238        { { $as_echo "$as_me:$LINENO: error: Will not continue creating configuration in $CURDIR" >&5
7239$as_echo "$as_me: error: Will not continue creating configuration in $CURDIR" >&2;}
7240   { (exit 1); exit 1; }; }
7241      fi
7242    fi
7243fi
7244{ $as_echo "$as_me:$LINENO: checking what configuration name to use" >&5
7245$as_echo_n "checking what configuration name to use... " >&6; }
7246{ $as_echo "$as_me:$LINENO: result: $CONF_NAME" >&5
7247$as_echo "$CONF_NAME" >&6; }
7248
7249
7250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7251
7252  # Input might be given as Windows format, start by converting to
7253  # unix format.
7254  path="$OUTPUT_ROOT"
7255  new_path=`$CYGPATH -u "$path"`
7256
7257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7260  # "foo.exe" is OK but "foo" is an error.
7261  #
7262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7263  # It is also a way to make sure we got the proper file name for the real test later on.
7264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7265  if test "x$test_shortpath" = x; then
7266    { $as_echo "$as_me:$LINENO: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7267$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7268    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OUTPUT_ROOT" >&5
7269$as_echo "$as_me: error: Cannot locate the the path of OUTPUT_ROOT" >&2;}
7270   { (exit 1); exit 1; }; }
7271  fi
7272
7273  # Call helper function which possibly converts this using DOS-style short mode.
7274  # If so, the updated path is stored in $new_path.
7275
7276  input_path="$new_path"
7277  # Check if we need to convert this using DOS-style short mode. If the path
7278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7279  # take no chances and rewrite it.
7280  # Note: m4 eats our [], so we need to use [ and ] instead.
7281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7282  if test "x$has_forbidden_chars" != x; then
7283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7287      # Going to short mode and back again did indeed matter. Since short mode is
7288      # case insensitive, let's make it lowercase to improve readability.
7289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7290      # Now convert it back to Unix-stile (cygpath)
7291      input_path=`$CYGPATH -u "$shortmode_path"`
7292      new_path="$input_path"
7293    fi
7294  fi
7295
7296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7297  if test "x$test_cygdrive_prefix" = x; then
7298    # As a simple fix, exclude /usr/bin since it's not a real path.
7299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7301      # a path prefixed by /cygdrive for fixpath to work.
7302      new_path="$CYGWIN_ROOT_PATH$input_path"
7303    fi
7304  fi
7305
7306
7307  if test "x$path" != "x$new_path"; then
7308    OUTPUT_ROOT="$new_path"
7309    { $as_echo "$as_me:$LINENO: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7310$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7311  fi
7312
7313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7314
7315  path="$OUTPUT_ROOT"
7316  has_colon=`$ECHO $path | $GREP ^.:`
7317  new_path="$path"
7318  if test "x$has_colon" = x; then
7319    # Not in mixed or Windows style, start by that.
7320    new_path=`cmd //c echo $path`
7321  fi
7322
7323
7324  input_path="$new_path"
7325  # Check if we need to convert this using DOS-style short mode. If the path
7326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7327  # take no chances and rewrite it.
7328  # Note: m4 eats our [], so we need to use [ and ] instead.
7329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7330  if test "x$has_forbidden_chars" != x; then
7331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7333  fi
7334
7335
7336  windows_path="$new_path"
7337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7338    unix_path=`$CYGPATH -u "$windows_path"`
7339    new_path="$unix_path"
7340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7342    new_path="$unix_path"
7343  fi
7344
7345  if test "x$path" != "x$new_path"; then
7346    OUTPUT_ROOT="$new_path"
7347    { $as_echo "$as_me:$LINENO: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7348$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7349  fi
7350
7351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7353
7354  else
7355    # We're on a posix platform. Hooray! :)
7356    path="$OUTPUT_ROOT"
7357
7358    if test ! -f "$path" && test ! -d "$path"; then
7359      { { $as_echo "$as_me:$LINENO: error: The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." >&5
7360$as_echo "$as_me: error: The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." >&2;}
7361   { (exit 1); exit 1; }; }
7362    fi
7363
7364    has_space=`$ECHO "$path" | $GREP " "`
7365    if test "x$has_space" != x; then
7366      { $as_echo "$as_me:$LINENO: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7367$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7368      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
7369$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
7370   { (exit 1); exit 1; }; }
7371    fi
7372  fi
7373
7374
7375SPEC=$OUTPUT_ROOT/spec.gmk
7376
7377CONF_NAME=$CONF_NAME
7378
7379OUTPUT_ROOT=$OUTPUT_ROOT
7380
7381
7382# Most of the probed defines are put into config.h
7383ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7384
7385# The spec.gmk file contains all variables for the make system.
7386ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7387
7388# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7389ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7390
7391# The bootcycle-spec.gmk file contains support for boot cycle builds.
7392ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7393
7394# The compare.sh is used to compare the build output to other builds.
7395ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7396
7397# Spec.sh is currently used by compare-objects.sh
7398ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7399
7400# The generated Makefile knows where the spec.gmk is and where the source is.
7401# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7402# which will look for generated configurations
7403ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7404
7405
7406# Save the arguments given to us
7407echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7408
7409
7410# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
7411
7412    for ac_prog in apt-get yum port pkgutil pkgadd
7413do
7414  # Extract the first word of "$ac_prog", so it can be a program name with args.
7415set dummy $ac_prog; ac_word=$2
7416{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7417$as_echo_n "checking for $ac_word... " >&6; }
7418if test "${ac_cv_prog_PKGHANDLER+set}" = set; then
7419  $as_echo_n "(cached) " >&6
7420else
7421  if test -n "$PKGHANDLER"; then
7422  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
7423else
7424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7425for as_dir in $PATH
7426do
7427  IFS=$as_save_IFS
7428  test -z "$as_dir" && as_dir=.
7429  for ac_exec_ext in '' $ac_executable_extensions; do
7430  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7431    ac_cv_prog_PKGHANDLER="$ac_prog"
7432    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7433    break 2
7434  fi
7435done
7436done
7437IFS=$as_save_IFS
7438
7439fi
7440fi
7441PKGHANDLER=$ac_cv_prog_PKGHANDLER
7442if test -n "$PKGHANDLER"; then
7443  { $as_echo "$as_me:$LINENO: result: $PKGHANDLER" >&5
7444$as_echo "$PKGHANDLER" >&6; }
7445else
7446  { $as_echo "$as_me:$LINENO: result: no" >&5
7447$as_echo "no" >&6; }
7448fi
7449
7450
7451  test -n "$PKGHANDLER" && break
7452done
7453
7454
7455
7456# Setup tools that requires more complex handling, or that is not needed by the configure script.
7457
7458
7459  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
7460  if test "x$MAKE" != x; then
7461    # User has supplied a make, test it.
7462    if test ! -f "$MAKE"; then
7463      { { $as_echo "$as_me:$LINENO: error: The specified make (by MAKE=$MAKE) is not found." >&5
7464$as_echo "$as_me: error: The specified make (by MAKE=$MAKE) is not found." >&2;}
7465   { (exit 1); exit 1; }; }
7466    fi
7467
7468  MAKE_CANDIDATE=""$MAKE""
7469  DESCRIPTION="user supplied MAKE=$MAKE"
7470  if test "x$MAKE_CANDIDATE" != x; then
7471    { $as_echo "$as_me:$LINENO: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7472$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7473    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7474    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7475    if test "x$IS_GNU_MAKE" = x; then
7476      { $as_echo "$as_me:$LINENO: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7477$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7478    else
7479      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7480      if test "x$IS_MODERN_MAKE" = x; then
7481        { $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
7482$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;}
7483      else
7484        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7485          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7486            MAKE_EXPECTED_ENV='cygwin'
7487          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7488            MAKE_EXPECTED_ENV='msys'
7489          else
7490            { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment" >&5
7491$as_echo "$as_me: error: Unknown Windows environment" >&2;}
7492   { (exit 1); exit 1; }; }
7493          fi
7494          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7495          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7496        else
7497          # Not relevant for non-Windows
7498          IS_MAKE_CORRECT_ENV=true
7499        fi
7500        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7501          { $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
7502$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;}
7503        else
7504          FOUND_MAKE=$MAKE_CANDIDATE
7505
7506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7507
7508  # First separate the path from the arguments. This will split at the first
7509  # space.
7510  complete="$FOUND_MAKE"
7511  path="${complete%% *}"
7512  tmp="$complete EOL"
7513  arguments="${tmp#* }"
7514
7515  # Input might be given as Windows format, start by converting to
7516  # unix format.
7517  new_path=`$CYGPATH -u "$path"`
7518
7519  # Now try to locate executable using which
7520  new_path=`$WHICH "$new_path" 2> /dev/null`
7521  # bat and cmd files are not always considered executable in cygwin causing which
7522  # to not find them
7523  if test "x$new_path" = x \
7524           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7525           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7526    new_path=`$CYGPATH -u "$path"`
7527  fi
7528  if test "x$new_path" = x; then
7529    # Oops. Which didn't find the executable.
7530    # The splitting of arguments from the executable at a space might have been incorrect,
7531    # since paths with space are more likely in Windows. Give it another try with the whole
7532    # argument.
7533    path="$complete"
7534    arguments="EOL"
7535    new_path=`$CYGPATH -u "$path"`
7536    new_path=`$WHICH "$new_path" 2> /dev/null`
7537    # bat and cmd files are not always considered executable in cygwin causing which
7538    # to not find them
7539    if test "x$new_path" = x \
7540             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7541             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7542      new_path=`$CYGPATH -u "$path"`
7543    fi
7544    if test "x$new_path" = x; then
7545      # It's still not found. Now this is an unrecoverable error.
7546      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7547$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7548      has_space=`$ECHO "$complete" | $GREP " "`
7549      if test "x$has_space" != x; then
7550        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7551$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7552      fi
7553      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7554$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7555   { (exit 1); exit 1; }; }
7556    fi
7557  fi
7558
7559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7562  # "foo.exe" is OK but "foo" is an error.
7563  #
7564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7565  # It is also a way to make sure we got the proper file name for the real test later on.
7566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7567  if test "x$test_shortpath" = x; then
7568    # Short path failed, file does not exist as specified.
7569    # Try adding .exe or .cmd
7570    if test -f "${new_path}.exe"; then
7571       input_to_shortpath="${new_path}.exe"
7572    elif test -f "${new_path}.cmd"; then
7573       input_to_shortpath="${new_path}.cmd"
7574    else
7575      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
7576$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
7577      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
7578$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
7579      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7580$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7581   { (exit 1); exit 1; }; }
7582    fi
7583  else
7584    input_to_shortpath="$new_path"
7585  fi
7586
7587  # Call helper function which possibly converts this using DOS-style short mode.
7588  # If so, the updated path is stored in $new_path.
7589  new_path="$input_to_shortpath"
7590
7591  input_path="$input_to_shortpath"
7592  # Check if we need to convert this using DOS-style short mode. If the path
7593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7594  # take no chances and rewrite it.
7595  # Note: m4 eats our [], so we need to use [ and ] instead.
7596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7597  if test "x$has_forbidden_chars" != x; then
7598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7602      # Going to short mode and back again did indeed matter. Since short mode is
7603      # case insensitive, let's make it lowercase to improve readability.
7604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7605      # Now convert it back to Unix-stile (cygpath)
7606      input_path=`$CYGPATH -u "$shortmode_path"`
7607      new_path="$input_path"
7608    fi
7609  fi
7610
7611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7612  if test "x$test_cygdrive_prefix" = x; then
7613    # As a simple fix, exclude /usr/bin since it's not a real path.
7614    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
7615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7616      # a path prefixed by /cygdrive for fixpath to work.
7617      new_path="$CYGWIN_ROOT_PATH$input_path"
7618    fi
7619  fi
7620
7621  # remove trailing .exe if any
7622  new_path="${new_path/%.exe/}"
7623
7624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7625
7626  # First separate the path from the arguments. This will split at the first
7627  # space.
7628  complete="$FOUND_MAKE"
7629  path="${complete%% *}"
7630  tmp="$complete EOL"
7631  arguments="${tmp#* }"
7632
7633  # Input might be given as Windows format, start by converting to
7634  # unix format.
7635  new_path="$path"
7636
7637  windows_path="$new_path"
7638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7639    unix_path=`$CYGPATH -u "$windows_path"`
7640    new_path="$unix_path"
7641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7643    new_path="$unix_path"
7644  fi
7645
7646
7647  # Now try to locate executable using which
7648  new_path=`$WHICH "$new_path" 2> /dev/null`
7649
7650  if test "x$new_path" = x; then
7651    # Oops. Which didn't find the executable.
7652    # The splitting of arguments from the executable at a space might have been incorrect,
7653    # since paths with space are more likely in Windows. Give it another try with the whole
7654    # argument.
7655    path="$complete"
7656    arguments="EOL"
7657    new_path="$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
7669    new_path=`$WHICH "$new_path" 2> /dev/null`
7670
7671    if test "x$new_path" = x; then
7672      # It's still not found. Now this is an unrecoverable error.
7673      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7674$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7675      has_space=`$ECHO "$complete" | $GREP " "`
7676      if test "x$has_space" != x; then
7677        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7678$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7679      fi
7680      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7681$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7682   { (exit 1); exit 1; }; }
7683    fi
7684  fi
7685
7686  # Now new_path has a complete unix path to the binary
7687  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
7688    # Keep paths in /bin as-is, but remove trailing .exe if any
7689    new_path="${new_path/%.exe/}"
7690    # Do not save /bin paths to all_fixpath_prefixes!
7691  else
7692    # Not in mixed or Windows style, start by that.
7693    new_path=`cmd //c echo $new_path`
7694
7695  input_path="$new_path"
7696  # Check if we need to convert this using DOS-style short mode. If the path
7697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7698  # take no chances and rewrite it.
7699  # Note: m4 eats our [], so we need to use [ and ] instead.
7700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7701  if test "x$has_forbidden_chars" != x; then
7702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7704  fi
7705
7706    # Output is in $new_path
7707
7708  windows_path="$new_path"
7709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7710    unix_path=`$CYGPATH -u "$windows_path"`
7711    new_path="$unix_path"
7712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7714    new_path="$unix_path"
7715  fi
7716
7717    # remove trailing .exe if any
7718    new_path="${new_path/%.exe/}"
7719
7720    # Save the first 10 bytes of this path to the storage, so fixpath can work.
7721    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7722  fi
7723
7724  else
7725    # We're on a posix platform. Hooray! :)
7726    # First separate the path from the arguments. This will split at the first
7727    # space.
7728    complete="$FOUND_MAKE"
7729    path="${complete%% *}"
7730    tmp="$complete EOL"
7731    arguments="${tmp#* }"
7732
7733    new_path=`$WHICH $path 2> /dev/null`
7734    if test "x$new_path" = x; then
7735      is_absolute_path=`$ECHO "$path" | $GREP ^/`
7736      if test "x$is_absolute_path" != x; then
7737        { $as_echo "$as_me:$LINENO: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
7738$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
7739        new_path="$path"
7740      else
7741        { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7742$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7743        has_space=`$ECHO "$complete" | $GREP " "`
7744        if test "x$has_space" != x; then
7745          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
7746$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
7747        fi
7748        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7749$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7750   { (exit 1); exit 1; }; }
7751      fi
7752    fi
7753  fi
7754
7755  # Now join together the path and the arguments once again
7756  if test "x$arguments" != xEOL; then
7757      new_complete="$new_path ${arguments% *}"
7758  else
7759      new_complete="$new_path"
7760  fi
7761
7762  if test "x$complete" != "x$new_complete"; then
7763    FOUND_MAKE="$new_complete"
7764    { $as_echo "$as_me:$LINENO: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
7765$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
7766  fi
7767
7768        fi
7769      fi
7770    fi
7771  fi
7772
7773    if test "x$FOUND_MAKE" = x; then
7774      { { $as_echo "$as_me:$LINENO: error: The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." >&5
7775$as_echo "$as_me: error: The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." >&2;}
7776   { (exit 1); exit 1; }; }
7777    fi
7778  else
7779    # Try our hardest to locate a correct version of GNU make
7780    for ac_prog in gmake
7781do
7782  # Extract the first word of "$ac_prog", so it can be a program name with args.
7783set dummy $ac_prog; ac_word=$2
7784{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7785$as_echo_n "checking for $ac_word... " >&6; }
7786if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then
7787  $as_echo_n "(cached) " >&6
7788else
7789  case $CHECK_GMAKE in
7790  [\\/]* | ?:[\\/]*)
7791  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
7792  ;;
7793  *)
7794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7795for as_dir in $PATH
7796do
7797  IFS=$as_save_IFS
7798  test -z "$as_dir" && as_dir=.
7799  for ac_exec_ext in '' $ac_executable_extensions; do
7800  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7801    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
7802    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7803    break 2
7804  fi
7805done
7806done
7807IFS=$as_save_IFS
7808
7809  ;;
7810esac
7811fi
7812CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
7813if test -n "$CHECK_GMAKE"; then
7814  { $as_echo "$as_me:$LINENO: result: $CHECK_GMAKE" >&5
7815$as_echo "$CHECK_GMAKE" >&6; }
7816else
7817  { $as_echo "$as_me:$LINENO: result: no" >&5
7818$as_echo "no" >&6; }
7819fi
7820
7821
7822  test -n "$CHECK_GMAKE" && break
7823done
7824
7825
7826  MAKE_CANDIDATE=""$CHECK_GMAKE""
7827  DESCRIPTION="gmake in PATH"
7828  if test "x$MAKE_CANDIDATE" != x; then
7829    { $as_echo "$as_me:$LINENO: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7830$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7831    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7832    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7833    if test "x$IS_GNU_MAKE" = x; then
7834      { $as_echo "$as_me:$LINENO: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7835$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7836    else
7837      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7838      if test "x$IS_MODERN_MAKE" = x; then
7839        { $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
7840$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;}
7841      else
7842        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7843          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7844            MAKE_EXPECTED_ENV='cygwin'
7845          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7846            MAKE_EXPECTED_ENV='msys'
7847          else
7848            { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment" >&5
7849$as_echo "$as_me: error: Unknown Windows environment" >&2;}
7850   { (exit 1); exit 1; }; }
7851          fi
7852          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7853          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7854        else
7855          # Not relevant for non-Windows
7856          IS_MAKE_CORRECT_ENV=true
7857        fi
7858        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7859          { $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
7860$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;}
7861        else
7862          FOUND_MAKE=$MAKE_CANDIDATE
7863
7864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7865
7866  # First separate the path from the arguments. This will split at the first
7867  # space.
7868  complete="$FOUND_MAKE"
7869  path="${complete%% *}"
7870  tmp="$complete EOL"
7871  arguments="${tmp#* }"
7872
7873  # Input might be given as Windows format, start by converting to
7874  # unix format.
7875  new_path=`$CYGPATH -u "$path"`
7876
7877  # Now try to locate executable using which
7878  new_path=`$WHICH "$new_path" 2> /dev/null`
7879  # bat and cmd files are not always considered executable in cygwin causing which
7880  # to not find them
7881  if test "x$new_path" = x \
7882           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7883           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7884    new_path=`$CYGPATH -u "$path"`
7885  fi
7886  if test "x$new_path" = x; then
7887    # Oops. Which didn't find the executable.
7888    # The splitting of arguments from the executable at a space might have been incorrect,
7889    # since paths with space are more likely in Windows. Give it another try with the whole
7890    # argument.
7891    path="$complete"
7892    arguments="EOL"
7893    new_path=`$CYGPATH -u "$path"`
7894    new_path=`$WHICH "$new_path" 2> /dev/null`
7895    # bat and cmd files are not always considered executable in cygwin causing which
7896    # to not find them
7897    if test "x$new_path" = x \
7898             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7899             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7900      new_path=`$CYGPATH -u "$path"`
7901    fi
7902    if test "x$new_path" = x; then
7903      # It's still not found. Now this is an unrecoverable error.
7904      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7905$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7906      has_space=`$ECHO "$complete" | $GREP " "`
7907      if test "x$has_space" != x; then
7908        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7910      fi
7911      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7912$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7913   { (exit 1); exit 1; }; }
7914    fi
7915  fi
7916
7917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7920  # "foo.exe" is OK but "foo" is an error.
7921  #
7922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7923  # It is also a way to make sure we got the proper file name for the real test later on.
7924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7925  if test "x$test_shortpath" = x; then
7926    # Short path failed, file does not exist as specified.
7927    # Try adding .exe or .cmd
7928    if test -f "${new_path}.exe"; then
7929       input_to_shortpath="${new_path}.exe"
7930    elif test -f "${new_path}.cmd"; then
7931       input_to_shortpath="${new_path}.cmd"
7932    else
7933      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
7934$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
7935      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
7936$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
7937      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
7938$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
7939   { (exit 1); exit 1; }; }
7940    fi
7941  else
7942    input_to_shortpath="$new_path"
7943  fi
7944
7945  # Call helper function which possibly converts this using DOS-style short mode.
7946  # If so, the updated path is stored in $new_path.
7947  new_path="$input_to_shortpath"
7948
7949  input_path="$input_to_shortpath"
7950  # Check if we need to convert this using DOS-style short mode. If the path
7951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7952  # take no chances and rewrite it.
7953  # Note: m4 eats our [], so we need to use [ and ] instead.
7954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7955  if test "x$has_forbidden_chars" != x; then
7956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7960      # Going to short mode and back again did indeed matter. Since short mode is
7961      # case insensitive, let's make it lowercase to improve readability.
7962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7963      # Now convert it back to Unix-stile (cygpath)
7964      input_path=`$CYGPATH -u "$shortmode_path"`
7965      new_path="$input_path"
7966    fi
7967  fi
7968
7969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7970  if test "x$test_cygdrive_prefix" = x; then
7971    # As a simple fix, exclude /usr/bin since it's not a real path.
7972    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
7973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7974      # a path prefixed by /cygdrive for fixpath to work.
7975      new_path="$CYGWIN_ROOT_PATH$input_path"
7976    fi
7977  fi
7978
7979  # remove trailing .exe if any
7980  new_path="${new_path/%.exe/}"
7981
7982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7983
7984  # First separate the path from the arguments. This will split at the first
7985  # space.
7986  complete="$FOUND_MAKE"
7987  path="${complete%% *}"
7988  tmp="$complete EOL"
7989  arguments="${tmp#* }"
7990
7991  # Input might be given as Windows format, start by converting to
7992  # unix format.
7993  new_path="$path"
7994
7995  windows_path="$new_path"
7996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7997    unix_path=`$CYGPATH -u "$windows_path"`
7998    new_path="$unix_path"
7999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8001    new_path="$unix_path"
8002  fi
8003
8004
8005  # Now try to locate executable using which
8006  new_path=`$WHICH "$new_path" 2> /dev/null`
8007
8008  if test "x$new_path" = x; then
8009    # Oops. Which didn't find the executable.
8010    # The splitting of arguments from the executable at a space might have been incorrect,
8011    # since paths with space are more likely in Windows. Give it another try with the whole
8012    # argument.
8013    path="$complete"
8014    arguments="EOL"
8015    new_path="$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
8027    new_path=`$WHICH "$new_path" 2> /dev/null`
8028
8029    if test "x$new_path" = x; then
8030      # It's still not found. Now this is an unrecoverable error.
8031      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8032$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8033      has_space=`$ECHO "$complete" | $GREP " "`
8034      if test "x$has_space" != x; then
8035        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8036$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8037      fi
8038      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8039$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8040   { (exit 1); exit 1; }; }
8041    fi
8042  fi
8043
8044  # Now new_path has a complete unix path to the binary
8045  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8046    # Keep paths in /bin as-is, but remove trailing .exe if any
8047    new_path="${new_path/%.exe/}"
8048    # Do not save /bin paths to all_fixpath_prefixes!
8049  else
8050    # Not in mixed or Windows style, start by that.
8051    new_path=`cmd //c echo $new_path`
8052
8053  input_path="$new_path"
8054  # Check if we need to convert this using DOS-style short mode. If the path
8055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8056  # take no chances and rewrite it.
8057  # Note: m4 eats our [], so we need to use [ and ] instead.
8058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8059  if test "x$has_forbidden_chars" != x; then
8060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8062  fi
8063
8064    # Output is in $new_path
8065
8066  windows_path="$new_path"
8067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8068    unix_path=`$CYGPATH -u "$windows_path"`
8069    new_path="$unix_path"
8070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8072    new_path="$unix_path"
8073  fi
8074
8075    # remove trailing .exe if any
8076    new_path="${new_path/%.exe/}"
8077
8078    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8079    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8080  fi
8081
8082  else
8083    # We're on a posix platform. Hooray! :)
8084    # First separate the path from the arguments. This will split at the first
8085    # space.
8086    complete="$FOUND_MAKE"
8087    path="${complete%% *}"
8088    tmp="$complete EOL"
8089    arguments="${tmp#* }"
8090
8091    new_path=`$WHICH $path 2> /dev/null`
8092    if test "x$new_path" = x; then
8093      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8094      if test "x$is_absolute_path" != x; then
8095        { $as_echo "$as_me:$LINENO: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8096$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8097        new_path="$path"
8098      else
8099        { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8100$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8101        has_space=`$ECHO "$complete" | $GREP " "`
8102        if test "x$has_space" != x; then
8103          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
8104$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8105        fi
8106        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8107$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8108   { (exit 1); exit 1; }; }
8109      fi
8110    fi
8111  fi
8112
8113  # Now join together the path and the arguments once again
8114  if test "x$arguments" != xEOL; then
8115      new_complete="$new_path ${arguments% *}"
8116  else
8117      new_complete="$new_path"
8118  fi
8119
8120  if test "x$complete" != "x$new_complete"; then
8121    FOUND_MAKE="$new_complete"
8122    { $as_echo "$as_me:$LINENO: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8123$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8124  fi
8125
8126        fi
8127      fi
8128    fi
8129  fi
8130
8131
8132    if test "x$FOUND_MAKE" = x; then
8133      for ac_prog in make
8134do
8135  # Extract the first word of "$ac_prog", so it can be a program name with args.
8136set dummy $ac_prog; ac_word=$2
8137{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8138$as_echo_n "checking for $ac_word... " >&6; }
8139if test "${ac_cv_path_CHECK_MAKE+set}" = set; then
8140  $as_echo_n "(cached) " >&6
8141else
8142  case $CHECK_MAKE in
8143  [\\/]* | ?:[\\/]*)
8144  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8145  ;;
8146  *)
8147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8148for as_dir in $PATH
8149do
8150  IFS=$as_save_IFS
8151  test -z "$as_dir" && as_dir=.
8152  for ac_exec_ext in '' $ac_executable_extensions; do
8153  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8154    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8155    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8156    break 2
8157  fi
8158done
8159done
8160IFS=$as_save_IFS
8161
8162  ;;
8163esac
8164fi
8165CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8166if test -n "$CHECK_MAKE"; then
8167  { $as_echo "$as_me:$LINENO: result: $CHECK_MAKE" >&5
8168$as_echo "$CHECK_MAKE" >&6; }
8169else
8170  { $as_echo "$as_me:$LINENO: result: no" >&5
8171$as_echo "no" >&6; }
8172fi
8173
8174
8175  test -n "$CHECK_MAKE" && break
8176done
8177
8178
8179  MAKE_CANDIDATE=""$CHECK_MAKE""
8180  DESCRIPTION="make in PATH"
8181  if test "x$MAKE_CANDIDATE" != x; then
8182    { $as_echo "$as_me:$LINENO: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8183$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8184    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8185    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8186    if test "x$IS_GNU_MAKE" = x; then
8187      { $as_echo "$as_me:$LINENO: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8188$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8189    else
8190      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8191      if test "x$IS_MODERN_MAKE" = x; then
8192        { $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
8193$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;}
8194      else
8195        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8196          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8197            MAKE_EXPECTED_ENV='cygwin'
8198          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8199            MAKE_EXPECTED_ENV='msys'
8200          else
8201            { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment" >&5
8202$as_echo "$as_me: error: Unknown Windows environment" >&2;}
8203   { (exit 1); exit 1; }; }
8204          fi
8205          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8206          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8207        else
8208          # Not relevant for non-Windows
8209          IS_MAKE_CORRECT_ENV=true
8210        fi
8211        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8212          { $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
8213$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;}
8214        else
8215          FOUND_MAKE=$MAKE_CANDIDATE
8216
8217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8218
8219  # First separate the path from the arguments. This will split at the first
8220  # space.
8221  complete="$FOUND_MAKE"
8222  path="${complete%% *}"
8223  tmp="$complete EOL"
8224  arguments="${tmp#* }"
8225
8226  # Input might be given as Windows format, start by converting to
8227  # unix format.
8228  new_path=`$CYGPATH -u "$path"`
8229
8230  # Now try to locate executable using which
8231  new_path=`$WHICH "$new_path" 2> /dev/null`
8232  # bat and cmd files are not always considered executable in cygwin causing which
8233  # to not find them
8234  if test "x$new_path" = x \
8235           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8236           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8237    new_path=`$CYGPATH -u "$path"`
8238  fi
8239  if test "x$new_path" = x; then
8240    # Oops. Which didn't find the executable.
8241    # The splitting of arguments from the executable at a space might have been incorrect,
8242    # since paths with space are more likely in Windows. Give it another try with the whole
8243    # argument.
8244    path="$complete"
8245    arguments="EOL"
8246    new_path=`$CYGPATH -u "$path"`
8247    new_path=`$WHICH "$new_path" 2> /dev/null`
8248    # bat and cmd files are not always considered executable in cygwin causing which
8249    # to not find them
8250    if test "x$new_path" = x \
8251             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8252             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8253      new_path=`$CYGPATH -u "$path"`
8254    fi
8255    if test "x$new_path" = x; then
8256      # It's still not found. Now this is an unrecoverable error.
8257      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8258$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8259      has_space=`$ECHO "$complete" | $GREP " "`
8260      if test "x$has_space" != x; then
8261        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8262$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8263      fi
8264      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8265$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8266   { (exit 1); exit 1; }; }
8267    fi
8268  fi
8269
8270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8273  # "foo.exe" is OK but "foo" is an error.
8274  #
8275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8276  # It is also a way to make sure we got the proper file name for the real test later on.
8277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8278  if test "x$test_shortpath" = x; then
8279    # Short path failed, file does not exist as specified.
8280    # Try adding .exe or .cmd
8281    if test -f "${new_path}.exe"; then
8282       input_to_shortpath="${new_path}.exe"
8283    elif test -f "${new_path}.cmd"; then
8284       input_to_shortpath="${new_path}.cmd"
8285    else
8286      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8287$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8288      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8289$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8290      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8291$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8292   { (exit 1); exit 1; }; }
8293    fi
8294  else
8295    input_to_shortpath="$new_path"
8296  fi
8297
8298  # Call helper function which possibly converts this using DOS-style short mode.
8299  # If so, the updated path is stored in $new_path.
8300  new_path="$input_to_shortpath"
8301
8302  input_path="$input_to_shortpath"
8303  # Check if we need to convert this using DOS-style short mode. If the path
8304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8305  # take no chances and rewrite it.
8306  # Note: m4 eats our [], so we need to use [ and ] instead.
8307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8308  if test "x$has_forbidden_chars" != x; then
8309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8310    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8311    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8312    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8313      # Going to short mode and back again did indeed matter. Since short mode is
8314      # case insensitive, let's make it lowercase to improve readability.
8315      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8316      # Now convert it back to Unix-stile (cygpath)
8317      input_path=`$CYGPATH -u "$shortmode_path"`
8318      new_path="$input_path"
8319    fi
8320  fi
8321
8322  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8323  if test "x$test_cygdrive_prefix" = x; then
8324    # As a simple fix, exclude /usr/bin since it's not a real path.
8325    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8326      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8327      # a path prefixed by /cygdrive for fixpath to work.
8328      new_path="$CYGWIN_ROOT_PATH$input_path"
8329    fi
8330  fi
8331
8332  # remove trailing .exe if any
8333  new_path="${new_path/%.exe/}"
8334
8335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8336
8337  # First separate the path from the arguments. This will split at the first
8338  # space.
8339  complete="$FOUND_MAKE"
8340  path="${complete%% *}"
8341  tmp="$complete EOL"
8342  arguments="${tmp#* }"
8343
8344  # Input might be given as Windows format, start by converting to
8345  # unix format.
8346  new_path="$path"
8347
8348  windows_path="$new_path"
8349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8350    unix_path=`$CYGPATH -u "$windows_path"`
8351    new_path="$unix_path"
8352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8354    new_path="$unix_path"
8355  fi
8356
8357
8358  # Now try to locate executable using which
8359  new_path=`$WHICH "$new_path" 2> /dev/null`
8360
8361  if test "x$new_path" = x; then
8362    # Oops. Which didn't find the executable.
8363    # The splitting of arguments from the executable at a space might have been incorrect,
8364    # since paths with space are more likely in Windows. Give it another try with the whole
8365    # argument.
8366    path="$complete"
8367    arguments="EOL"
8368    new_path="$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
8380    new_path=`$WHICH "$new_path" 2> /dev/null`
8381
8382    if test "x$new_path" = x; then
8383      # It's still not found. Now this is an unrecoverable error.
8384      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8385$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8386      has_space=`$ECHO "$complete" | $GREP " "`
8387      if test "x$has_space" != x; then
8388        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8390      fi
8391      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8392$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8393   { (exit 1); exit 1; }; }
8394    fi
8395  fi
8396
8397  # Now new_path has a complete unix path to the binary
8398  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8399    # Keep paths in /bin as-is, but remove trailing .exe if any
8400    new_path="${new_path/%.exe/}"
8401    # Do not save /bin paths to all_fixpath_prefixes!
8402  else
8403    # Not in mixed or Windows style, start by that.
8404    new_path=`cmd //c echo $new_path`
8405
8406  input_path="$new_path"
8407  # Check if we need to convert this using DOS-style short mode. If the path
8408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8409  # take no chances and rewrite it.
8410  # Note: m4 eats our [], so we need to use [ and ] instead.
8411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8412  if test "x$has_forbidden_chars" != x; then
8413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8415  fi
8416
8417    # Output is in $new_path
8418
8419  windows_path="$new_path"
8420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8421    unix_path=`$CYGPATH -u "$windows_path"`
8422    new_path="$unix_path"
8423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8425    new_path="$unix_path"
8426  fi
8427
8428    # remove trailing .exe if any
8429    new_path="${new_path/%.exe/}"
8430
8431    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8432    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8433  fi
8434
8435  else
8436    # We're on a posix platform. Hooray! :)
8437    # First separate the path from the arguments. This will split at the first
8438    # space.
8439    complete="$FOUND_MAKE"
8440    path="${complete%% *}"
8441    tmp="$complete EOL"
8442    arguments="${tmp#* }"
8443
8444    new_path=`$WHICH $path 2> /dev/null`
8445    if test "x$new_path" = x; then
8446      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8447      if test "x$is_absolute_path" != x; then
8448        { $as_echo "$as_me:$LINENO: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8449$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8450        new_path="$path"
8451      else
8452        { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8453$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8454        has_space=`$ECHO "$complete" | $GREP " "`
8455        if test "x$has_space" != x; then
8456          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
8457$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8458        fi
8459        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8460$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8461   { (exit 1); exit 1; }; }
8462      fi
8463    fi
8464  fi
8465
8466  # Now join together the path and the arguments once again
8467  if test "x$arguments" != xEOL; then
8468      new_complete="$new_path ${arguments% *}"
8469  else
8470      new_complete="$new_path"
8471  fi
8472
8473  if test "x$complete" != "x$new_complete"; then
8474    FOUND_MAKE="$new_complete"
8475    { $as_echo "$as_me:$LINENO: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8476$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8477  fi
8478
8479        fi
8480      fi
8481    fi
8482  fi
8483
8484    fi
8485
8486    if test "x$FOUND_MAKE" = x; then
8487      if test "x$TOOLS_DIR" != x; then
8488        # We have a tools-dir, check that as well before giving up.
8489        OLD_PATH=$PATH
8490        PATH=$TOOLS_DIR:$PATH
8491        for ac_prog in gmake
8492do
8493  # Extract the first word of "$ac_prog", so it can be a program name with args.
8494set dummy $ac_prog; ac_word=$2
8495{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8496$as_echo_n "checking for $ac_word... " >&6; }
8497if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then
8498  $as_echo_n "(cached) " >&6
8499else
8500  case $CHECK_TOOLSDIR_GMAKE in
8501  [\\/]* | ?:[\\/]*)
8502  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
8503  ;;
8504  *)
8505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8506for as_dir in $PATH
8507do
8508  IFS=$as_save_IFS
8509  test -z "$as_dir" && as_dir=.
8510  for ac_exec_ext in '' $ac_executable_extensions; do
8511  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8512    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8513    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8514    break 2
8515  fi
8516done
8517done
8518IFS=$as_save_IFS
8519
8520  ;;
8521esac
8522fi
8523CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
8524if test -n "$CHECK_TOOLSDIR_GMAKE"; then
8525  { $as_echo "$as_me:$LINENO: result: $CHECK_TOOLSDIR_GMAKE" >&5
8526$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
8527else
8528  { $as_echo "$as_me:$LINENO: result: no" >&5
8529$as_echo "no" >&6; }
8530fi
8531
8532
8533  test -n "$CHECK_TOOLSDIR_GMAKE" && break
8534done
8535
8536
8537  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
8538  DESCRIPTION="gmake in tools-dir"
8539  if test "x$MAKE_CANDIDATE" != x; then
8540    { $as_echo "$as_me:$LINENO: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8541$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8542    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8543    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8544    if test "x$IS_GNU_MAKE" = x; then
8545      { $as_echo "$as_me:$LINENO: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8546$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8547    else
8548      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8549      if test "x$IS_MODERN_MAKE" = x; then
8550        { $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
8551$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;}
8552      else
8553        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8554          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8555            MAKE_EXPECTED_ENV='cygwin'
8556          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8557            MAKE_EXPECTED_ENV='msys'
8558          else
8559            { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment" >&5
8560$as_echo "$as_me: error: Unknown Windows environment" >&2;}
8561   { (exit 1); exit 1; }; }
8562          fi
8563          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8564          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8565        else
8566          # Not relevant for non-Windows
8567          IS_MAKE_CORRECT_ENV=true
8568        fi
8569        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8570          { $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
8571$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;}
8572        else
8573          FOUND_MAKE=$MAKE_CANDIDATE
8574
8575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8576
8577  # First separate the path from the arguments. This will split at the first
8578  # space.
8579  complete="$FOUND_MAKE"
8580  path="${complete%% *}"
8581  tmp="$complete EOL"
8582  arguments="${tmp#* }"
8583
8584  # Input might be given as Windows format, start by converting to
8585  # unix format.
8586  new_path=`$CYGPATH -u "$path"`
8587
8588  # Now try to locate executable using which
8589  new_path=`$WHICH "$new_path" 2> /dev/null`
8590  # bat and cmd files are not always considered executable in cygwin causing which
8591  # to not find them
8592  if test "x$new_path" = x \
8593           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8594           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8595    new_path=`$CYGPATH -u "$path"`
8596  fi
8597  if test "x$new_path" = x; then
8598    # Oops. Which didn't find the executable.
8599    # The splitting of arguments from the executable at a space might have been incorrect,
8600    # since paths with space are more likely in Windows. Give it another try with the whole
8601    # argument.
8602    path="$complete"
8603    arguments="EOL"
8604    new_path=`$CYGPATH -u "$path"`
8605    new_path=`$WHICH "$new_path" 2> /dev/null`
8606    # bat and cmd files are not always considered executable in cygwin causing which
8607    # to not find them
8608    if test "x$new_path" = x \
8609             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8610             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8611      new_path=`$CYGPATH -u "$path"`
8612    fi
8613    if test "x$new_path" = x; then
8614      # It's still not found. Now this is an unrecoverable error.
8615      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8616$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8617      has_space=`$ECHO "$complete" | $GREP " "`
8618      if test "x$has_space" != x; then
8619        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8620$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8621      fi
8622      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8623$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8624   { (exit 1); exit 1; }; }
8625    fi
8626  fi
8627
8628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8631  # "foo.exe" is OK but "foo" is an error.
8632  #
8633  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8634  # It is also a way to make sure we got the proper file name for the real test later on.
8635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8636  if test "x$test_shortpath" = x; then
8637    # Short path failed, file does not exist as specified.
8638    # Try adding .exe or .cmd
8639    if test -f "${new_path}.exe"; then
8640       input_to_shortpath="${new_path}.exe"
8641    elif test -f "${new_path}.cmd"; then
8642       input_to_shortpath="${new_path}.cmd"
8643    else
8644      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8645$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8646      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8647$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8648      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8649$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8650   { (exit 1); exit 1; }; }
8651    fi
8652  else
8653    input_to_shortpath="$new_path"
8654  fi
8655
8656  # Call helper function which possibly converts this using DOS-style short mode.
8657  # If so, the updated path is stored in $new_path.
8658  new_path="$input_to_shortpath"
8659
8660  input_path="$input_to_shortpath"
8661  # Check if we need to convert this using DOS-style short mode. If the path
8662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8663  # take no chances and rewrite it.
8664  # Note: m4 eats our [], so we need to use [ and ] instead.
8665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8666  if test "x$has_forbidden_chars" != x; then
8667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8671      # Going to short mode and back again did indeed matter. Since short mode is
8672      # case insensitive, let's make it lowercase to improve readability.
8673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8674      # Now convert it back to Unix-stile (cygpath)
8675      input_path=`$CYGPATH -u "$shortmode_path"`
8676      new_path="$input_path"
8677    fi
8678  fi
8679
8680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8681  if test "x$test_cygdrive_prefix" = x; then
8682    # As a simple fix, exclude /usr/bin since it's not a real path.
8683    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8685      # a path prefixed by /cygdrive for fixpath to work.
8686      new_path="$CYGWIN_ROOT_PATH$input_path"
8687    fi
8688  fi
8689
8690  # remove trailing .exe if any
8691  new_path="${new_path/%.exe/}"
8692
8693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8694
8695  # First separate the path from the arguments. This will split at the first
8696  # space.
8697  complete="$FOUND_MAKE"
8698  path="${complete%% *}"
8699  tmp="$complete EOL"
8700  arguments="${tmp#* }"
8701
8702  # Input might be given as Windows format, start by converting to
8703  # unix format.
8704  new_path="$path"
8705
8706  windows_path="$new_path"
8707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8708    unix_path=`$CYGPATH -u "$windows_path"`
8709    new_path="$unix_path"
8710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8712    new_path="$unix_path"
8713  fi
8714
8715
8716  # Now try to locate executable using which
8717  new_path=`$WHICH "$new_path" 2> /dev/null`
8718
8719  if test "x$new_path" = x; then
8720    # Oops. Which didn't find the executable.
8721    # The splitting of arguments from the executable at a space might have been incorrect,
8722    # since paths with space are more likely in Windows. Give it another try with the whole
8723    # argument.
8724    path="$complete"
8725    arguments="EOL"
8726    new_path="$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
8738    new_path=`$WHICH "$new_path" 2> /dev/null`
8739
8740    if test "x$new_path" = x; then
8741      # It's still not found. Now this is an unrecoverable error.
8742      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8743$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8744      has_space=`$ECHO "$complete" | $GREP " "`
8745      if test "x$has_space" != x; then
8746        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8747$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8748      fi
8749      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8750$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8751   { (exit 1); exit 1; }; }
8752    fi
8753  fi
8754
8755  # Now new_path has a complete unix path to the binary
8756  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8757    # Keep paths in /bin as-is, but remove trailing .exe if any
8758    new_path="${new_path/%.exe/}"
8759    # Do not save /bin paths to all_fixpath_prefixes!
8760  else
8761    # Not in mixed or Windows style, start by that.
8762    new_path=`cmd //c echo $new_path`
8763
8764  input_path="$new_path"
8765  # Check if we need to convert this using DOS-style short mode. If the path
8766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8767  # take no chances and rewrite it.
8768  # Note: m4 eats our [], so we need to use [ and ] instead.
8769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8770  if test "x$has_forbidden_chars" != x; then
8771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8773  fi
8774
8775    # Output is in $new_path
8776
8777  windows_path="$new_path"
8778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8779    unix_path=`$CYGPATH -u "$windows_path"`
8780    new_path="$unix_path"
8781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8783    new_path="$unix_path"
8784  fi
8785
8786    # remove trailing .exe if any
8787    new_path="${new_path/%.exe/}"
8788
8789    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8790    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8791  fi
8792
8793  else
8794    # We're on a posix platform. Hooray! :)
8795    # First separate the path from the arguments. This will split at the first
8796    # space.
8797    complete="$FOUND_MAKE"
8798    path="${complete%% *}"
8799    tmp="$complete EOL"
8800    arguments="${tmp#* }"
8801
8802    new_path=`$WHICH $path 2> /dev/null`
8803    if test "x$new_path" = x; then
8804      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8805      if test "x$is_absolute_path" != x; then
8806        { $as_echo "$as_me:$LINENO: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8807$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8808        new_path="$path"
8809      else
8810        { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8811$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8812        has_space=`$ECHO "$complete" | $GREP " "`
8813        if test "x$has_space" != x; then
8814          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
8815$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8816        fi
8817        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8818$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8819   { (exit 1); exit 1; }; }
8820      fi
8821    fi
8822  fi
8823
8824  # Now join together the path and the arguments once again
8825  if test "x$arguments" != xEOL; then
8826      new_complete="$new_path ${arguments% *}"
8827  else
8828      new_complete="$new_path"
8829  fi
8830
8831  if test "x$complete" != "x$new_complete"; then
8832    FOUND_MAKE="$new_complete"
8833    { $as_echo "$as_me:$LINENO: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8834$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8835  fi
8836
8837        fi
8838      fi
8839    fi
8840  fi
8841
8842        if test "x$FOUND_MAKE" = x; then
8843          for ac_prog in make
8844do
8845  # Extract the first word of "$ac_prog", so it can be a program name with args.
8846set dummy $ac_prog; ac_word=$2
8847{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8848$as_echo_n "checking for $ac_word... " >&6; }
8849if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then
8850  $as_echo_n "(cached) " >&6
8851else
8852  case $CHECK_TOOLSDIR_MAKE in
8853  [\\/]* | ?:[\\/]*)
8854  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
8855  ;;
8856  *)
8857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8858for as_dir in $PATH
8859do
8860  IFS=$as_save_IFS
8861  test -z "$as_dir" && as_dir=.
8862  for ac_exec_ext in '' $ac_executable_extensions; do
8863  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8864    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
8865    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8866    break 2
8867  fi
8868done
8869done
8870IFS=$as_save_IFS
8871
8872  ;;
8873esac
8874fi
8875CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
8876if test -n "$CHECK_TOOLSDIR_MAKE"; then
8877  { $as_echo "$as_me:$LINENO: result: $CHECK_TOOLSDIR_MAKE" >&5
8878$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
8879else
8880  { $as_echo "$as_me:$LINENO: result: no" >&5
8881$as_echo "no" >&6; }
8882fi
8883
8884
8885  test -n "$CHECK_TOOLSDIR_MAKE" && break
8886done
8887
8888
8889  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
8890  DESCRIPTION="make in tools-dir"
8891  if test "x$MAKE_CANDIDATE" != x; then
8892    { $as_echo "$as_me:$LINENO: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8893$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8894    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8895    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8896    if test "x$IS_GNU_MAKE" = x; then
8897      { $as_echo "$as_me:$LINENO: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8898$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8899    else
8900      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8901      if test "x$IS_MODERN_MAKE" = x; then
8902        { $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
8903$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;}
8904      else
8905        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8906          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8907            MAKE_EXPECTED_ENV='cygwin'
8908          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8909            MAKE_EXPECTED_ENV='msys'
8910          else
8911            { { $as_echo "$as_me:$LINENO: error: Unknown Windows environment" >&5
8912$as_echo "$as_me: error: Unknown Windows environment" >&2;}
8913   { (exit 1); exit 1; }; }
8914          fi
8915          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8916          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8917        else
8918          # Not relevant for non-Windows
8919          IS_MAKE_CORRECT_ENV=true
8920        fi
8921        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8922          { $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
8923$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;}
8924        else
8925          FOUND_MAKE=$MAKE_CANDIDATE
8926
8927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8928
8929  # First separate the path from the arguments. This will split at the first
8930  # space.
8931  complete="$FOUND_MAKE"
8932  path="${complete%% *}"
8933  tmp="$complete EOL"
8934  arguments="${tmp#* }"
8935
8936  # Input might be given as Windows format, start by converting to
8937  # unix format.
8938  new_path=`$CYGPATH -u "$path"`
8939
8940  # Now try to locate executable using which
8941  new_path=`$WHICH "$new_path" 2> /dev/null`
8942  # bat and cmd files are not always considered executable in cygwin causing which
8943  # to not find them
8944  if test "x$new_path" = x \
8945           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8946           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8947    new_path=`$CYGPATH -u "$path"`
8948  fi
8949  if test "x$new_path" = x; then
8950    # Oops. Which didn't find the executable.
8951    # The splitting of arguments from the executable at a space might have been incorrect,
8952    # since paths with space are more likely in Windows. Give it another try with the whole
8953    # argument.
8954    path="$complete"
8955    arguments="EOL"
8956    new_path=`$CYGPATH -u "$path"`
8957    new_path=`$WHICH "$new_path" 2> /dev/null`
8958    # bat and cmd files are not always considered executable in cygwin causing which
8959    # to not find them
8960    if test "x$new_path" = x \
8961             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8962             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8963      new_path=`$CYGPATH -u "$path"`
8964    fi
8965    if test "x$new_path" = x; then
8966      # It's still not found. Now this is an unrecoverable error.
8967      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8968$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8969      has_space=`$ECHO "$complete" | $GREP " "`
8970      if test "x$has_space" != x; then
8971        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8972$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8973      fi
8974      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
8975$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
8976   { (exit 1); exit 1; }; }
8977    fi
8978  fi
8979
8980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8983  # "foo.exe" is OK but "foo" is an error.
8984  #
8985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8986  # It is also a way to make sure we got the proper file name for the real test later on.
8987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8988  if test "x$test_shortpath" = x; then
8989    # Short path failed, file does not exist as specified.
8990    # Try adding .exe or .cmd
8991    if test -f "${new_path}.exe"; then
8992       input_to_shortpath="${new_path}.exe"
8993    elif test -f "${new_path}.cmd"; then
8994       input_to_shortpath="${new_path}.cmd"
8995    else
8996      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8997$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8998      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8999$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9000      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
9001$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
9002   { (exit 1); exit 1; }; }
9003    fi
9004  else
9005    input_to_shortpath="$new_path"
9006  fi
9007
9008  # Call helper function which possibly converts this using DOS-style short mode.
9009  # If so, the updated path is stored in $new_path.
9010  new_path="$input_to_shortpath"
9011
9012  input_path="$input_to_shortpath"
9013  # Check if we need to convert this using DOS-style short mode. If the path
9014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9015  # take no chances and rewrite it.
9016  # Note: m4 eats our [], so we need to use [ and ] instead.
9017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9018  if test "x$has_forbidden_chars" != x; then
9019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9023      # Going to short mode and back again did indeed matter. Since short mode is
9024      # case insensitive, let's make it lowercase to improve readability.
9025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9026      # Now convert it back to Unix-stile (cygpath)
9027      input_path=`$CYGPATH -u "$shortmode_path"`
9028      new_path="$input_path"
9029    fi
9030  fi
9031
9032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9033  if test "x$test_cygdrive_prefix" = x; then
9034    # As a simple fix, exclude /usr/bin since it's not a real path.
9035    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9037      # a path prefixed by /cygdrive for fixpath to work.
9038      new_path="$CYGWIN_ROOT_PATH$input_path"
9039    fi
9040  fi
9041
9042  # remove trailing .exe if any
9043  new_path="${new_path/%.exe/}"
9044
9045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9046
9047  # First separate the path from the arguments. This will split at the first
9048  # space.
9049  complete="$FOUND_MAKE"
9050  path="${complete%% *}"
9051  tmp="$complete EOL"
9052  arguments="${tmp#* }"
9053
9054  # Input might be given as Windows format, start by converting to
9055  # unix format.
9056  new_path="$path"
9057
9058  windows_path="$new_path"
9059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9060    unix_path=`$CYGPATH -u "$windows_path"`
9061    new_path="$unix_path"
9062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9064    new_path="$unix_path"
9065  fi
9066
9067
9068  # Now try to locate executable using which
9069  new_path=`$WHICH "$new_path" 2> /dev/null`
9070
9071  if test "x$new_path" = x; then
9072    # Oops. Which didn't find the executable.
9073    # The splitting of arguments from the executable at a space might have been incorrect,
9074    # since paths with space are more likely in Windows. Give it another try with the whole
9075    # argument.
9076    path="$complete"
9077    arguments="EOL"
9078    new_path="$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
9090    new_path=`$WHICH "$new_path" 2> /dev/null`
9091
9092    if test "x$new_path" = x; then
9093      # It's still not found. Now this is an unrecoverable error.
9094      { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9095$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9096      has_space=`$ECHO "$complete" | $GREP " "`
9097      if test "x$has_space" != x; then
9098        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9099$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9100      fi
9101      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
9102$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
9103   { (exit 1); exit 1; }; }
9104    fi
9105  fi
9106
9107  # Now new_path has a complete unix path to the binary
9108  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9109    # Keep paths in /bin as-is, but remove trailing .exe if any
9110    new_path="${new_path/%.exe/}"
9111    # Do not save /bin paths to all_fixpath_prefixes!
9112  else
9113    # Not in mixed or Windows style, start by that.
9114    new_path=`cmd //c echo $new_path`
9115
9116  input_path="$new_path"
9117  # Check if we need to convert this using DOS-style short mode. If the path
9118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9119  # take no chances and rewrite it.
9120  # Note: m4 eats our [], so we need to use [ and ] instead.
9121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9122  if test "x$has_forbidden_chars" != x; then
9123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9125  fi
9126
9127    # Output is in $new_path
9128
9129  windows_path="$new_path"
9130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9131    unix_path=`$CYGPATH -u "$windows_path"`
9132    new_path="$unix_path"
9133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9135    new_path="$unix_path"
9136  fi
9137
9138    # remove trailing .exe if any
9139    new_path="${new_path/%.exe/}"
9140
9141    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9142    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9143  fi
9144
9145  else
9146    # We're on a posix platform. Hooray! :)
9147    # First separate the path from the arguments. This will split at the first
9148    # space.
9149    complete="$FOUND_MAKE"
9150    path="${complete%% *}"
9151    tmp="$complete EOL"
9152    arguments="${tmp#* }"
9153
9154    new_path=`$WHICH $path 2> /dev/null`
9155    if test "x$new_path" = x; then
9156      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9157      if test "x$is_absolute_path" != x; then
9158        { $as_echo "$as_me:$LINENO: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9159$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9160        new_path="$path"
9161      else
9162        { $as_echo "$as_me:$LINENO: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9163$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9164        has_space=`$ECHO "$complete" | $GREP " "`
9165        if test "x$has_space" != x; then
9166          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
9167$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9168        fi
9169        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FOUND_MAKE" >&5
9170$as_echo "$as_me: error: Cannot locate the the path of FOUND_MAKE" >&2;}
9171   { (exit 1); exit 1; }; }
9172      fi
9173    fi
9174  fi
9175
9176  # Now join together the path and the arguments once again
9177  if test "x$arguments" != xEOL; then
9178      new_complete="$new_path ${arguments% *}"
9179  else
9180      new_complete="$new_path"
9181  fi
9182
9183  if test "x$complete" != "x$new_complete"; then
9184    FOUND_MAKE="$new_complete"
9185    { $as_echo "$as_me:$LINENO: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9186$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9187  fi
9188
9189        fi
9190      fi
9191    fi
9192  fi
9193
9194        fi
9195        PATH=$OLD_PATH
9196      fi
9197    fi
9198
9199    if test "x$FOUND_MAKE" = x; then
9200      { { $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
9201$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;}
9202   { (exit 1); exit 1; }; }
9203    fi
9204  fi
9205
9206  MAKE=$FOUND_MAKE
9207
9208  { $as_echo "$as_me:$LINENO: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9209$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9210
9211
9212
9213    # Test if find supports -delete
9214    { $as_echo "$as_me:$LINENO: checking if find supports -delete" >&5
9215$as_echo_n "checking if find supports -delete... " >&6; }
9216    FIND_DELETE="-delete"
9217
9218    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9219
9220    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9221
9222    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9223    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9224        # No, it does not.
9225        rm $DELETEDIR/TestIfFindSupportsDelete
9226        FIND_DELETE="-exec rm \{\} \+"
9227        { $as_echo "$as_me:$LINENO: result: no" >&5
9228$as_echo "no" >&6; }
9229    else
9230        { $as_echo "$as_me:$LINENO: result: yes" >&5
9231$as_echo "yes" >&6; }
9232    fi
9233    rmdir $DELETEDIR
9234
9235
9236
9237# These tools might not be installed by default,
9238# need hint on how to install them.
9239
9240    for ac_prog in unzip
9241do
9242  # Extract the first word of "$ac_prog", so it can be a program name with args.
9243set dummy $ac_prog; ac_word=$2
9244{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9245$as_echo_n "checking for $ac_word... " >&6; }
9246if test "${ac_cv_path_UNZIP+set}" = set; then
9247  $as_echo_n "(cached) " >&6
9248else
9249  case $UNZIP in
9250  [\\/]* | ?:[\\/]*)
9251  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9252  ;;
9253  *)
9254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9255for as_dir in $PATH
9256do
9257  IFS=$as_save_IFS
9258  test -z "$as_dir" && as_dir=.
9259  for ac_exec_ext in '' $ac_executable_extensions; do
9260  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9261    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9262    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9263    break 2
9264  fi
9265done
9266done
9267IFS=$as_save_IFS
9268
9269  ;;
9270esac
9271fi
9272UNZIP=$ac_cv_path_UNZIP
9273if test -n "$UNZIP"; then
9274  { $as_echo "$as_me:$LINENO: result: $UNZIP" >&5
9275$as_echo "$UNZIP" >&6; }
9276else
9277  { $as_echo "$as_me:$LINENO: result: no" >&5
9278$as_echo "no" >&6; }
9279fi
9280
9281
9282  test -n "$UNZIP" && break
9283done
9284
9285
9286    if test "x$UNZIP" = x; then
9287        if test "xunzip" = x; then
9288          PROG_NAME=unzip
9289        else
9290          PROG_NAME=unzip
9291        fi
9292        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
9293$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9294        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
9295$as_echo "$as_me: error: Cannot continue" >&2;}
9296   { (exit 1); exit 1; }; }
9297    fi
9298
9299
9300
9301    for ac_prog in zip
9302do
9303  # Extract the first word of "$ac_prog", so it can be a program name with args.
9304set dummy $ac_prog; ac_word=$2
9305{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9306$as_echo_n "checking for $ac_word... " >&6; }
9307if test "${ac_cv_path_ZIP+set}" = set; then
9308  $as_echo_n "(cached) " >&6
9309else
9310  case $ZIP in
9311  [\\/]* | ?:[\\/]*)
9312  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9313  ;;
9314  *)
9315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9316for as_dir in $PATH
9317do
9318  IFS=$as_save_IFS
9319  test -z "$as_dir" && as_dir=.
9320  for ac_exec_ext in '' $ac_executable_extensions; do
9321  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9322    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9323    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9324    break 2
9325  fi
9326done
9327done
9328IFS=$as_save_IFS
9329
9330  ;;
9331esac
9332fi
9333ZIP=$ac_cv_path_ZIP
9334if test -n "$ZIP"; then
9335  { $as_echo "$as_me:$LINENO: result: $ZIP" >&5
9336$as_echo "$ZIP" >&6; }
9337else
9338  { $as_echo "$as_me:$LINENO: result: no" >&5
9339$as_echo "no" >&6; }
9340fi
9341
9342
9343  test -n "$ZIP" && break
9344done
9345
9346
9347    if test "x$ZIP" = x; then
9348        if test "xzip" = x; then
9349          PROG_NAME=zip
9350        else
9351          PROG_NAME=zip
9352        fi
9353        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
9354$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9355        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
9356$as_echo "$as_me: error: Cannot continue" >&2;}
9357   { (exit 1); exit 1; }; }
9358    fi
9359
9360
9361
9362# Non-required basic tools
9363
9364# Extract the first word of "ldd", so it can be a program name with args.
9365set dummy ldd; ac_word=$2
9366{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9367$as_echo_n "checking for $ac_word... " >&6; }
9368if test "${ac_cv_path_LDD+set}" = set; then
9369  $as_echo_n "(cached) " >&6
9370else
9371  case $LDD in
9372  [\\/]* | ?:[\\/]*)
9373  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9374  ;;
9375  *)
9376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9377for as_dir in $PATH
9378do
9379  IFS=$as_save_IFS
9380  test -z "$as_dir" && as_dir=.
9381  for ac_exec_ext in '' $ac_executable_extensions; do
9382  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9383    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9384    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9385    break 2
9386  fi
9387done
9388done
9389IFS=$as_save_IFS
9390
9391  ;;
9392esac
9393fi
9394LDD=$ac_cv_path_LDD
9395if test -n "$LDD"; then
9396  { $as_echo "$as_me:$LINENO: result: $LDD" >&5
9397$as_echo "$LDD" >&6; }
9398else
9399  { $as_echo "$as_me:$LINENO: result: no" >&5
9400$as_echo "no" >&6; }
9401fi
9402
9403
9404if test "x$LDD" = "x"; then
9405    # List shared lib dependencies is used for
9406    # debug output and checking for forbidden dependencies.
9407    # We can build without it.
9408    LDD="true"
9409fi
9410# Extract the first word of "otool", so it can be a program name with args.
9411set dummy otool; ac_word=$2
9412{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9413$as_echo_n "checking for $ac_word... " >&6; }
9414if test "${ac_cv_path_OTOOL+set}" = set; then
9415  $as_echo_n "(cached) " >&6
9416else
9417  case $OTOOL in
9418  [\\/]* | ?:[\\/]*)
9419  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
9420  ;;
9421  *)
9422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9423for as_dir in $PATH
9424do
9425  IFS=$as_save_IFS
9426  test -z "$as_dir" && as_dir=.
9427  for ac_exec_ext in '' $ac_executable_extensions; do
9428  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9429    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
9430    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9431    break 2
9432  fi
9433done
9434done
9435IFS=$as_save_IFS
9436
9437  ;;
9438esac
9439fi
9440OTOOL=$ac_cv_path_OTOOL
9441if test -n "$OTOOL"; then
9442  { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5
9443$as_echo "$OTOOL" >&6; }
9444else
9445  { $as_echo "$as_me:$LINENO: result: no" >&5
9446$as_echo "no" >&6; }
9447fi
9448
9449
9450if test "x$OTOOL" = "x"; then
9451   OTOOL="true"
9452fi
9453for ac_prog in readelf greadelf
9454do
9455  # Extract the first word of "$ac_prog", so it can be a program name with args.
9456set dummy $ac_prog; ac_word=$2
9457{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9458$as_echo_n "checking for $ac_word... " >&6; }
9459if test "${ac_cv_path_READELF+set}" = set; then
9460  $as_echo_n "(cached) " >&6
9461else
9462  case $READELF in
9463  [\\/]* | ?:[\\/]*)
9464  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
9465  ;;
9466  *)
9467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9468for as_dir in $PATH
9469do
9470  IFS=$as_save_IFS
9471  test -z "$as_dir" && as_dir=.
9472  for ac_exec_ext in '' $ac_executable_extensions; do
9473  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9474    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
9475    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9476    break 2
9477  fi
9478done
9479done
9480IFS=$as_save_IFS
9481
9482  ;;
9483esac
9484fi
9485READELF=$ac_cv_path_READELF
9486if test -n "$READELF"; then
9487  { $as_echo "$as_me:$LINENO: result: $READELF" >&5
9488$as_echo "$READELF" >&6; }
9489else
9490  { $as_echo "$as_me:$LINENO: result: no" >&5
9491$as_echo "no" >&6; }
9492fi
9493
9494
9495  test -n "$READELF" && break
9496done
9497
9498# Extract the first word of "hg", so it can be a program name with args.
9499set dummy hg; ac_word=$2
9500{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9501$as_echo_n "checking for $ac_word... " >&6; }
9502if test "${ac_cv_path_HG+set}" = set; then
9503  $as_echo_n "(cached) " >&6
9504else
9505  case $HG in
9506  [\\/]* | ?:[\\/]*)
9507  ac_cv_path_HG="$HG" # Let the user override the test with a path.
9508  ;;
9509  *)
9510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9511for as_dir in $PATH
9512do
9513  IFS=$as_save_IFS
9514  test -z "$as_dir" && as_dir=.
9515  for ac_exec_ext in '' $ac_executable_extensions; do
9516  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9517    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
9518    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9519    break 2
9520  fi
9521done
9522done
9523IFS=$as_save_IFS
9524
9525  ;;
9526esac
9527fi
9528HG=$ac_cv_path_HG
9529if test -n "$HG"; then
9530  { $as_echo "$as_me:$LINENO: result: $HG" >&5
9531$as_echo "$HG" >&6; }
9532else
9533  { $as_echo "$as_me:$LINENO: result: no" >&5
9534$as_echo "no" >&6; }
9535fi
9536
9537
9538# Extract the first word of "stat", so it can be a program name with args.
9539set dummy stat; ac_word=$2
9540{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9541$as_echo_n "checking for $ac_word... " >&6; }
9542if test "${ac_cv_path_STAT+set}" = set; then
9543  $as_echo_n "(cached) " >&6
9544else
9545  case $STAT in
9546  [\\/]* | ?:[\\/]*)
9547  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
9548  ;;
9549  *)
9550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9551for as_dir in $PATH
9552do
9553  IFS=$as_save_IFS
9554  test -z "$as_dir" && as_dir=.
9555  for ac_exec_ext in '' $ac_executable_extensions; do
9556  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9557    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
9558    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9559    break 2
9560  fi
9561done
9562done
9563IFS=$as_save_IFS
9564
9565  ;;
9566esac
9567fi
9568STAT=$ac_cv_path_STAT
9569if test -n "$STAT"; then
9570  { $as_echo "$as_me:$LINENO: result: $STAT" >&5
9571$as_echo "$STAT" >&6; }
9572else
9573  { $as_echo "$as_me:$LINENO: result: no" >&5
9574$as_echo "no" >&6; }
9575fi
9576
9577
9578# Extract the first word of "time", so it can be a program name with args.
9579set dummy time; ac_word=$2
9580{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9581$as_echo_n "checking for $ac_word... " >&6; }
9582if test "${ac_cv_path_TIME+set}" = set; then
9583  $as_echo_n "(cached) " >&6
9584else
9585  case $TIME in
9586  [\\/]* | ?:[\\/]*)
9587  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
9588  ;;
9589  *)
9590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9591for as_dir in $PATH
9592do
9593  IFS=$as_save_IFS
9594  test -z "$as_dir" && as_dir=.
9595  for ac_exec_ext in '' $ac_executable_extensions; do
9596  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9597    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
9598    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9599    break 2
9600  fi
9601done
9602done
9603IFS=$as_save_IFS
9604
9605  ;;
9606esac
9607fi
9608TIME=$ac_cv_path_TIME
9609if test -n "$TIME"; then
9610  { $as_echo "$as_me:$LINENO: result: $TIME" >&5
9611$as_echo "$TIME" >&6; }
9612else
9613  { $as_echo "$as_me:$LINENO: result: no" >&5
9614$as_echo "no" >&6; }
9615fi
9616
9617
9618
9619if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
9620
9621    for ac_prog in comm
9622do
9623  # Extract the first word of "$ac_prog", so it can be a program name with args.
9624set dummy $ac_prog; ac_word=$2
9625{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9626$as_echo_n "checking for $ac_word... " >&6; }
9627if test "${ac_cv_path_COMM+set}" = set; then
9628  $as_echo_n "(cached) " >&6
9629else
9630  case $COMM in
9631  [\\/]* | ?:[\\/]*)
9632  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
9633  ;;
9634  *)
9635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9636for as_dir in $PATH
9637do
9638  IFS=$as_save_IFS
9639  test -z "$as_dir" && as_dir=.
9640  for ac_exec_ext in '' $ac_executable_extensions; do
9641  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9642    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
9643    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9644    break 2
9645  fi
9646done
9647done
9648IFS=$as_save_IFS
9649
9650  ;;
9651esac
9652fi
9653COMM=$ac_cv_path_COMM
9654if test -n "$COMM"; then
9655  { $as_echo "$as_me:$LINENO: result: $COMM" >&5
9656$as_echo "$COMM" >&6; }
9657else
9658  { $as_echo "$as_me:$LINENO: result: no" >&5
9659$as_echo "no" >&6; }
9660fi
9661
9662
9663  test -n "$COMM" && break
9664done
9665
9666
9667    if test "x$COMM" = x; then
9668        if test "xcomm" = x; then
9669          PROG_NAME=comm
9670        else
9671          PROG_NAME=comm
9672        fi
9673        { $as_echo "$as_me:$LINENO: Could not find $PROG_NAME!" >&5
9674$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9675        { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
9676$as_echo "$as_me: error: Cannot continue" >&2;}
9677   { (exit 1); exit 1; }; }
9678    fi
9679
9680
9681fi
9682
9683
9684# Check if pkg-config is available.
9685
9686
9687if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9688	if test -n "$ac_tool_prefix"; then
9689  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9690set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9691{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9692$as_echo_n "checking for $ac_word... " >&6; }
9693if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9694  $as_echo_n "(cached) " >&6
9695else
9696  case $PKG_CONFIG in
9697  [\\/]* | ?:[\\/]*)
9698  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9699  ;;
9700  *)
9701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9702for as_dir in $PATH
9703do
9704  IFS=$as_save_IFS
9705  test -z "$as_dir" && as_dir=.
9706  for ac_exec_ext in '' $ac_executable_extensions; do
9707  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9708    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9709    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9710    break 2
9711  fi
9712done
9713done
9714IFS=$as_save_IFS
9715
9716  ;;
9717esac
9718fi
9719PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9720if test -n "$PKG_CONFIG"; then
9721  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
9722$as_echo "$PKG_CONFIG" >&6; }
9723else
9724  { $as_echo "$as_me:$LINENO: result: no" >&5
9725$as_echo "no" >&6; }
9726fi
9727
9728
9729fi
9730if test -z "$ac_cv_path_PKG_CONFIG"; then
9731  ac_pt_PKG_CONFIG=$PKG_CONFIG
9732  # Extract the first word of "pkg-config", so it can be a program name with args.
9733set dummy pkg-config; ac_word=$2
9734{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9735$as_echo_n "checking for $ac_word... " >&6; }
9736if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
9737  $as_echo_n "(cached) " >&6
9738else
9739  case $ac_pt_PKG_CONFIG in
9740  [\\/]* | ?:[\\/]*)
9741  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9742  ;;
9743  *)
9744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9745for as_dir in $PATH
9746do
9747  IFS=$as_save_IFS
9748  test -z "$as_dir" && as_dir=.
9749  for ac_exec_ext in '' $ac_executable_extensions; do
9750  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9751    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9752    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9753    break 2
9754  fi
9755done
9756done
9757IFS=$as_save_IFS
9758
9759  ;;
9760esac
9761fi
9762ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9763if test -n "$ac_pt_PKG_CONFIG"; then
9764  { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
9765$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9766else
9767  { $as_echo "$as_me:$LINENO: result: no" >&5
9768$as_echo "no" >&6; }
9769fi
9770
9771  if test "x$ac_pt_PKG_CONFIG" = x; then
9772    PKG_CONFIG=""
9773  else
9774    case $cross_compiling:$ac_tool_warned in
9775yes:)
9776{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
9777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9778ac_tool_warned=yes ;;
9779esac
9780    PKG_CONFIG=$ac_pt_PKG_CONFIG
9781  fi
9782else
9783  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9784fi
9785
9786fi
9787if test -n "$PKG_CONFIG"; then
9788	_pkg_min_version=0.9.0
9789	{ $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
9790$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9791	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9792		{ $as_echo "$as_me:$LINENO: result: yes" >&5
9793$as_echo "yes" >&6; }
9794	else
9795		{ $as_echo "$as_me:$LINENO: result: no" >&5
9796$as_echo "no" >&6; }
9797		PKG_CONFIG=""
9798	fi
9799
9800fi
9801
9802# After basic tools have been setup, we can check build os specific details.
9803
9804###############################################################################
9805
9806# Note that this is the build platform OS version!
9807
9808OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
9809OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
9810OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
9811OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
9812
9813
9814
9815
9816
9817# Setup builddeps, for automatic downloading of tools we need.
9818# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
9819# boot-jdk setup, but we need to have basic tools setup first.
9820
9821
9822# Check whether --with-builddeps-conf was given.
9823if test "${with_builddeps_conf+set}" = set; then
9824  withval=$with_builddeps_conf;
9825fi
9826
9827
9828
9829# Check whether --with-builddeps-server was given.
9830if test "${with_builddeps_server+set}" = set; then
9831  withval=$with_builddeps_server;
9832fi
9833
9834
9835
9836# Check whether --with-builddeps-dir was given.
9837if test "${with_builddeps_dir+set}" = set; then
9838  withval=$with_builddeps_dir;
9839else
9840  with_builddeps_dir=/localhome/builddeps
9841fi
9842
9843
9844
9845# Check whether --with-builddeps-group was given.
9846if test "${with_builddeps_group+set}" = set; then
9847  withval=$with_builddeps_group;
9848fi
9849
9850
9851
9852
9853    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
9854        if test "x$with_builddeps_conf" != x; then
9855            { $as_echo "$as_me:$LINENO: checking for supplied builddeps configuration file" >&5
9856$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
9857            builddepsfile=$with_builddeps_conf
9858            if test -s $builddepsfile; then
9859                . $builddepsfile
9860                { $as_echo "$as_me:$LINENO: result: loaded!" >&5
9861$as_echo "loaded!" >&6; }
9862            else
9863               { { $as_echo "$as_me:$LINENO: error: The given builddeps conf file $with_builddeps_conf could not be loaded!" >&5
9864$as_echo "$as_me: error: The given builddeps conf file $with_builddeps_conf could not be loaded!" >&2;}
9865   { (exit 1); exit 1; }; }
9866           fi
9867        else
9868            { $as_echo "$as_me:$LINENO: checking for builddeps.conf files in sources..." >&5
9869$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
9870            builddepsfile=`mktemp`
9871            touch $builddepsfile
9872            # Put all found confs into a single file.
9873            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
9874            # Source the file to acquire the variables
9875            if test -s $builddepsfile; then
9876                . $builddepsfile
9877                { $as_echo "$as_me:$LINENO: result: found at least one!" >&5
9878$as_echo "found at least one!" >&6; }
9879            else
9880               { { $as_echo "$as_me:$LINENO: error: Could not find any builddeps.conf at all!" >&5
9881$as_echo "$as_me: error: Could not find any builddeps.conf at all!" >&2;}
9882   { (exit 1); exit 1; }; }
9883           fi
9884        fi
9885        # Create build and target names that use _ instead of "-" and ".".
9886        # This is necessary to use them in variable names.
9887        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
9888        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
9889        # Extract rewrite information for build and target
9890        eval rewritten_build=\${REWRITE_${build_var}}
9891        if test "x$rewritten_build" = x; then
9892            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
9893            echo Build stays the same $rewritten_build
9894        else
9895            echo Rewriting build for builddeps into $rewritten_build
9896        fi
9897        eval rewritten_target=\${REWRITE_${target_var}}
9898        if test "x$rewritten_target" = x; then
9899            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
9900            echo Target stays the same $rewritten_target
9901        else
9902            echo Rewriting target for builddeps into $rewritten_target
9903        fi
9904        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
9905        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
9906    fi
9907    for ac_prog in 7z unzip
9908do
9909  # Extract the first word of "$ac_prog", so it can be a program name with args.
9910set dummy $ac_prog; ac_word=$2
9911{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9912$as_echo_n "checking for $ac_word... " >&6; }
9913if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then
9914  $as_echo_n "(cached) " >&6
9915else
9916  if test -n "$BDEPS_UNZIP"; then
9917  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
9918else
9919as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9920for as_dir in $PATH
9921do
9922  IFS=$as_save_IFS
9923  test -z "$as_dir" && as_dir=.
9924  for ac_exec_ext in '' $ac_executable_extensions; do
9925  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9926    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
9927    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9928    break 2
9929  fi
9930done
9931done
9932IFS=$as_save_IFS
9933
9934fi
9935fi
9936BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
9937if test -n "$BDEPS_UNZIP"; then
9938  { $as_echo "$as_me:$LINENO: result: $BDEPS_UNZIP" >&5
9939$as_echo "$BDEPS_UNZIP" >&6; }
9940else
9941  { $as_echo "$as_me:$LINENO: result: no" >&5
9942$as_echo "no" >&6; }
9943fi
9944
9945
9946  test -n "$BDEPS_UNZIP" && break
9947done
9948
9949    if test "x$BDEPS_UNZIP" = x7z; then
9950        BDEPS_UNZIP="7z x"
9951    fi
9952
9953    for ac_prog in wget lftp ftp
9954do
9955  # Extract the first word of "$ac_prog", so it can be a program name with args.
9956set dummy $ac_prog; ac_word=$2
9957{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
9958$as_echo_n "checking for $ac_word... " >&6; }
9959if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then
9960  $as_echo_n "(cached) " >&6
9961else
9962  if test -n "$BDEPS_FTP"; then
9963  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
9964else
9965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9966for as_dir in $PATH
9967do
9968  IFS=$as_save_IFS
9969  test -z "$as_dir" && as_dir=.
9970  for ac_exec_ext in '' $ac_executable_extensions; do
9971  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9972    ac_cv_prog_BDEPS_FTP="$ac_prog"
9973    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9974    break 2
9975  fi
9976done
9977done
9978IFS=$as_save_IFS
9979
9980fi
9981fi
9982BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
9983if test -n "$BDEPS_FTP"; then
9984  { $as_echo "$as_me:$LINENO: result: $BDEPS_FTP" >&5
9985$as_echo "$BDEPS_FTP" >&6; }
9986else
9987  { $as_echo "$as_me:$LINENO: result: no" >&5
9988$as_echo "no" >&6; }
9989fi
9990
9991
9992  test -n "$BDEPS_FTP" && break
9993done
9994
9995
9996
9997###############################################################################
9998#
9999# Determine OpenJDK variants, options and version numbers.
10000#
10001###############################################################################
10002
10003# We need build & target for this.
10004
10005
10006###############################################################################
10007#
10008# Should we build only OpenJDK even if closed sources are present?
10009#
10010# Check whether --enable-openjdk-only was given.
10011if test "${enable_openjdk_only+set}" = set; then
10012  enableval=$enable_openjdk_only;
10013else
10014  enable_openjdk_only="no"
10015fi
10016
10017
10018{ $as_echo "$as_me:$LINENO: checking for presence of closed sources" >&5
10019$as_echo_n "checking for presence of closed sources... " >&6; }
10020if test -d "$SRC_ROOT/jdk/src/closed"; then
10021    CLOSED_SOURCE_PRESENT=yes
10022else
10023    CLOSED_SOURCE_PRESENT=no
10024fi
10025{ $as_echo "$as_me:$LINENO: result: $CLOSED_SOURCE_PRESENT" >&5
10026$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
10027
10028{ $as_echo "$as_me:$LINENO: checking if closed source is supressed (openjdk-only)" >&5
10029$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
10030SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
10031{ $as_echo "$as_me:$LINENO: result: $SUPRESS_CLOSED_SOURCE" >&5
10032$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
10033
10034if test "x$CLOSED_SOURCE_PRESENT" = xno; then
10035  OPENJDK=true
10036  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10037    { $as_echo "$as_me:$LINENO: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
10038$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
10039  fi
10040else
10041  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10042    OPENJDK=true
10043  else
10044    OPENJDK=false
10045  fi
10046fi
10047
10048if test "x$OPENJDK" = "xtrue"; then
10049    SET_OPENJDK="OPENJDK=true"
10050fi
10051
10052
10053
10054###############################################################################
10055#
10056# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10057# We always build headless support.
10058#
10059{ $as_echo "$as_me:$LINENO: checking headful support" >&5
10060$as_echo_n "checking headful support... " >&6; }
10061# Check whether --enable-headful was given.
10062if test "${enable_headful+set}" = set; then
10063  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10064else
10065  SUPPORT_HEADFUL=yes
10066fi
10067
10068
10069SUPPORT_HEADLESS=yes
10070BUILD_HEADLESS="BUILD_HEADLESS:=true"
10071
10072if test "x$SUPPORT_HEADFUL" = xyes; then
10073    # We are building both headful and headless.
10074    headful_msg="inlude support for both headful and headless"
10075fi
10076
10077if test "x$SUPPORT_HEADFUL" = xno; then
10078    # Thus we are building headless only.
10079    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10080    headful_msg="headless only"
10081fi
10082
10083{ $as_echo "$as_me:$LINENO: result: $headful_msg" >&5
10084$as_echo "$headful_msg" >&6; }
10085
10086
10087
10088
10089
10090# Control wether Hotspot runs Queens test after build.
10091# Check whether --enable-hotspot-test-in-build was given.
10092if test "${enable_hotspot_test_in_build+set}" = set; then
10093  enableval=$enable_hotspot_test_in_build;
10094else
10095  enable_hotspot_test_in_build=no
10096fi
10097
10098if test "x$enable_hotspot_test_in_build" = "xyes"; then
10099    TEST_IN_BUILD=true
10100else
10101    TEST_IN_BUILD=false
10102fi
10103
10104
10105###############################################################################
10106#
10107# Choose cacerts source file
10108#
10109
10110# Check whether --with-cacerts-file was given.
10111if test "${with_cacerts_file+set}" = set; then
10112  withval=$with_cacerts_file;
10113fi
10114
10115if test "x$with_cacerts_file" != x; then
10116    CACERTS_FILE=$with_cacerts_file
10117else
10118    if test "x$OPENJDK" = "xtrue"; then
10119        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10120    else
10121        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10122    fi
10123fi
10124
10125
10126###############################################################################
10127#
10128# Enable or disable unlimited crypto
10129#
10130# Check whether --enable-unlimited-crypto was given.
10131if test "${enable_unlimited_crypto+set}" = set; then
10132  enableval=$enable_unlimited_crypto;
10133else
10134  enable_unlimited_crypto=no
10135fi
10136
10137if test "x$enable_unlimited_crypto" = "xyes"; then
10138    UNLIMITED_CRYPTO=true
10139else
10140    UNLIMITED_CRYPTO=false
10141fi
10142
10143
10144###############################################################################
10145#
10146# Compress jars
10147#
10148COMPRESS_JARS=false
10149
10150
10151
10152
10153# Source the version numbers
10154. $AUTOCONF_DIR/version.numbers
10155if test "x$OPENJDK" = "xfalse"; then
10156    . $AUTOCONF_DIR/closed.version.numbers
10157fi
10158# Now set the JDK version, milestone, build number etc.
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173COPYRIGHT_YEAR=`date +'%Y'`
10174
10175
10176RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
10177
10178
10179if test "x$JDK_UPDATE_VERSION" != x; then
10180    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10181else
10182    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10183fi
10184
10185
10186if test "x$MILESTONE" != x; then
10187    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
10188else
10189    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
10190fi
10191
10192
10193if test "x$JDK_BUILD_NUMBER" != x; then
10194    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
10195else
10196    JDK_BUILD_NUMBER=b00
10197    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10198    # Avoid [:alnum:] since it depends on the locale.
10199    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10200    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10201    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
10202fi
10203
10204COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10205
10206
10207
10208###############################################################################
10209#
10210# Setup BootJDK, used to bootstrap the build.
10211#
10212###############################################################################
10213
10214
10215BOOT_JDK_FOUND=no
10216
10217# Check whether --with-boot-jdk was given.
10218if test "${with_boot_jdk+set}" = set; then
10219  withval=$with_boot_jdk;
10220fi
10221
10222
10223# We look for the Boot JDK through various means, going from more certain to
10224# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10225# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10226# must check if this is indeed valid; otherwise we'll continue looking.
10227
10228# Test: Is bootjdk explicitely set by command line arguments?
10229
10230  if test "x$BOOT_JDK_FOUND" = xno; then
10231    # Now execute the test
10232
10233if test "x$with_boot_jdk" != x; then
10234    BOOT_JDK=$with_boot_jdk
10235    BOOT_JDK_FOUND=maybe
10236    { $as_echo "$as_me:$LINENO: Found potential Boot JDK using configure arguments" >&5
10237$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10238fi
10239
10240
10241    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10242    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10243      # Do we have a bin/java?
10244      if test ! -x "$BOOT_JDK/bin/java"; then
10245        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10247        BOOT_JDK_FOUND=no
10248      else
10249        # Do we have a bin/javac?
10250        if test ! -x "$BOOT_JDK/bin/javac"; then
10251          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10252$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10253          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
10254$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10255          BOOT_JDK_FOUND=no
10256        else
10257          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10258          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10259            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10261            BOOT_JDK_FOUND=no
10262          else
10263            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10264            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10265
10266            # Extra M4 quote needed to protect [] in grep expression.
10267            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10268            if test "x$FOUND_VERSION_78" = x; then
10269              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10271              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
10272$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10273              BOOT_JDK_FOUND=no
10274            else
10275              # We're done! :-)
10276              BOOT_JDK_FOUND=yes
10277
10278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10279
10280  # Input might be given as Windows format, start by converting to
10281  # unix format.
10282  path="$BOOT_JDK"
10283  new_path=`$CYGPATH -u "$path"`
10284
10285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10288  # "foo.exe" is OK but "foo" is an error.
10289  #
10290  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10291  # It is also a way to make sure we got the proper file name for the real test later on.
10292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10293  if test "x$test_shortpath" = x; then
10294    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10295$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10296    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
10297$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
10298   { (exit 1); exit 1; }; }
10299  fi
10300
10301  # Call helper function which possibly converts this using DOS-style short mode.
10302  # If so, the updated path is stored in $new_path.
10303
10304  input_path="$new_path"
10305  # Check if we need to convert this using DOS-style short mode. If the path
10306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10307  # take no chances and rewrite it.
10308  # Note: m4 eats our [], so we need to use [ and ] instead.
10309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10310  if test "x$has_forbidden_chars" != x; then
10311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10315      # Going to short mode and back again did indeed matter. Since short mode is
10316      # case insensitive, let's make it lowercase to improve readability.
10317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10318      # Now convert it back to Unix-stile (cygpath)
10319      input_path=`$CYGPATH -u "$shortmode_path"`
10320      new_path="$input_path"
10321    fi
10322  fi
10323
10324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10325  if test "x$test_cygdrive_prefix" = x; then
10326    # As a simple fix, exclude /usr/bin since it's not a real path.
10327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10329      # a path prefixed by /cygdrive for fixpath to work.
10330      new_path="$CYGWIN_ROOT_PATH$input_path"
10331    fi
10332  fi
10333
10334
10335  if test "x$path" != "x$new_path"; then
10336    BOOT_JDK="$new_path"
10337    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
10338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10339  fi
10340
10341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10342
10343  path="$BOOT_JDK"
10344  has_colon=`$ECHO $path | $GREP ^.:`
10345  new_path="$path"
10346  if test "x$has_colon" = x; then
10347    # Not in mixed or Windows style, start by that.
10348    new_path=`cmd //c echo $path`
10349  fi
10350
10351
10352  input_path="$new_path"
10353  # Check if we need to convert this using DOS-style short mode. If the path
10354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10355  # take no chances and rewrite it.
10356  # Note: m4 eats our [], so we need to use [ and ] instead.
10357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10358  if test "x$has_forbidden_chars" != x; then
10359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10361  fi
10362
10363
10364  windows_path="$new_path"
10365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10366    unix_path=`$CYGPATH -u "$windows_path"`
10367    new_path="$unix_path"
10368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10370    new_path="$unix_path"
10371  fi
10372
10373  if test "x$path" != "x$new_path"; then
10374    BOOT_JDK="$new_path"
10375    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
10376$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10377  fi
10378
10379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10381
10382  else
10383    # We're on a posix platform. Hooray! :)
10384    path="$BOOT_JDK"
10385
10386    if test ! -f "$path" && test ! -d "$path"; then
10387      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
10388$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
10389   { (exit 1); exit 1; }; }
10390    fi
10391
10392    has_space=`$ECHO "$path" | $GREP " "`
10393    if test "x$has_space" != x; then
10394      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10395$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10396      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
10397$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
10398   { (exit 1); exit 1; }; }
10399    fi
10400  fi
10401
10402              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
10403$as_echo_n "checking for Boot JDK... " >&6; }
10404              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
10405$as_echo "$BOOT_JDK" >&6; }
10406              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
10407$as_echo_n "checking Boot JDK version... " >&6; }
10408              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10409              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
10410$as_echo "$BOOT_JDK_VERSION" >&6; }
10411            fi # end check jdk version
10412          fi # end check rt.jar
10413        fi # end check javac
10414      fi # end check java
10415    fi # end check boot jdk found
10416  fi
10417
10418if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
10419  # Having specified an argument which is incorrect will produce an instant failure;
10420  # we should not go on looking
10421  { { $as_echo "$as_me:$LINENO: error: The path given by --with-boot-jdk does not contain a valid Boot JDK" >&5
10422$as_echo "$as_me: error: The path given by --with-boot-jdk does not contain a valid Boot JDK" >&2;}
10423   { (exit 1); exit 1; }; }
10424fi
10425
10426# Test: Is bootjdk available from builddeps?
10427
10428  if test "x$BOOT_JDK_FOUND" = xno; then
10429    # Now execute the test
10430
10431
10432
10433    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10434        # Source the builddeps file again, to make sure it uses the latest variables!
10435        . $builddepsfile
10436        # Look for a target and build machine specific resource!
10437        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10438        if test "x$resource" = x; then
10439            # Ok, lets instead look for a target specific resource
10440            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
10441        fi
10442        if test "x$resource" = x; then
10443            # Ok, lets instead look for a build specific resource
10444            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
10445        fi
10446        if test "x$resource" = x; then
10447            # Ok, lets instead look for a generic resource
10448            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
10449            resource=${builddep_bootjdk}
10450        fi
10451        if test "x$resource" != x; then
10452            { $as_echo "$as_me:$LINENO: Using builddeps $resource for bootjdk" >&5
10453$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
10454	    # If the resource in the builddeps.conf file is an existing directory,
10455	    # for example /java/linux/cups
10456	    if test -d ${resource}; then
10457	       depdir=${resource}
10458	    else
10459
10460# bootjdk is for example mymodule
10461# $resource is for example libs/general/libmymod_1_2_3.zip
10462# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10463# $with_builddeps_dir is for example /localhome/builddeps
10464# depdir is the name of the variable into which we store the depdir, eg MYMOD
10465# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10466# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10467    filename=`basename $resource`
10468    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10469    filebase=${filename%%.*}
10470    extension=${filename#*.}
10471    installdir=$with_builddeps_dir/$filebase
10472    if test ! -f $installdir/$filename.unpacked; then
10473        { $as_echo "$as_me:$LINENO: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
10474$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10475        if test ! -d $installdir; then
10476            mkdir -p $installdir
10477        fi
10478        if test ! -d $installdir; then
10479            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
10480$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
10481   { (exit 1); exit 1; }; }
10482        fi
10483        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
10484        touch $tmpfile
10485        if test ! -f $tmpfile; then
10486            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
10487$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
10488   { (exit 1); exit 1; }; }
10489        fi
10490
10491    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10492    # $tmpfile is the local file name for the downloaded file.
10493    VALID_TOOL=no
10494    if test "x$BDEPS_FTP" = xwget; then
10495       VALID_TOOL=yes
10496       wget -O $tmpfile $with_builddeps_server/$resource
10497    fi
10498    if test "x$BDEPS_FTP" = xlftp; then
10499       VALID_TOOL=yes
10500       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10501    fi
10502    if test "x$BDEPS_FTP" = xftp; then
10503        VALID_TOOL=yes
10504        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
10505        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
10506        FTPUSERPWD=${FTPSERVER%%@*}
10507        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
10508            FTPUSER=${userpwd%%:*}
10509            FTPPWD=${userpwd#*@}
10510            FTPSERVER=${FTPSERVER#*@}
10511        else
10512            FTPUSER=ftp
10513            FTPPWD=ftp
10514        fi
10515        # the "pass" command does not work on some
10516        # ftp clients (read ftp.exe) but if it works,
10517        # passive mode is better!
10518        (\
10519            echo "user $FTPUSER $FTPPWD"        ;\
10520            echo "pass"                         ;\
10521            echo "bin"                          ;\
10522            echo "get $FTPPATH $tmpfile"              ;\
10523        ) | ftp -in $FTPSERVER
10524    fi
10525    if test "x$VALID_TOOL" != xyes; then
10526       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
10527$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
10528   { (exit 1); exit 1; }; }
10529    fi
10530
10531        mv $tmpfile $installdir/$filename
10532        if test ! -s $installdir/$filename; then
10533            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
10534$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
10535   { (exit 1); exit 1; }; }
10536        fi
10537        case "$extension" in
10538            zip)  echo "Unzipping $installdir/$filename..."
10539               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
10540            ;;
10541            tar.gz) echo "Untaring $installdir/$filename..."
10542               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10543            ;;
10544            tgz) echo "Untaring $installdir/$filename..."
10545               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10546            ;;
10547            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
10548$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
10549   { (exit 1); exit 1; }; }
10550            ;;
10551        esac
10552    fi
10553    if test -f $installdir/$filename.unpacked; then
10554        depdir=$installdir
10555    fi
10556
10557	    fi
10558            # Source the builddeps file again, because in the previous command, the depdir
10559            # was updated to point at the current build dependency install directory.
10560            . $builddepsfile
10561            # Now extract variables from the builddeps.conf files.
10562            theroot=${builddep_bootjdk_ROOT}
10563            thecflags=${builddep_bootjdk_CFLAGS}
10564            thelibs=${builddep_bootjdk_LIBS}
10565            if test "x$depdir" = x; then
10566                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency bootjdk" >&5
10567$as_echo "$as_me: error: Could not download build dependency bootjdk" >&2;}
10568   { (exit 1); exit 1; }; }
10569            fi
10570            BOOT_JDK=$depdir
10571            if test "x$theroot" != x; then
10572               BOOT_JDK="$theroot"
10573            fi
10574            if test "x$thecflags" != x; then
10575               BOOT_JDK_CFLAGS="$thecflags"
10576            fi
10577            if test "x$thelibs" != x; then
10578               BOOT_JDK_LIBS="$thelibs"
10579            fi
10580            BOOT_JDK_FOUND=maybe
10581            else BOOT_JDK_FOUND=no
10582
10583        fi
10584        else BOOT_JDK_FOUND=no
10585
10586    fi
10587
10588
10589
10590    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10591    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10592      # Do we have a bin/java?
10593      if test ! -x "$BOOT_JDK/bin/java"; then
10594        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10596        BOOT_JDK_FOUND=no
10597      else
10598        # Do we have a bin/javac?
10599        if test ! -x "$BOOT_JDK/bin/javac"; then
10600          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10602          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
10603$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10604          BOOT_JDK_FOUND=no
10605        else
10606          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10607          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10608            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10610            BOOT_JDK_FOUND=no
10611          else
10612            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10613            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10614
10615            # Extra M4 quote needed to protect [] in grep expression.
10616            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10617            if test "x$FOUND_VERSION_78" = x; then
10618              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10620              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
10621$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10622              BOOT_JDK_FOUND=no
10623            else
10624              # We're done! :-)
10625              BOOT_JDK_FOUND=yes
10626
10627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10628
10629  # Input might be given as Windows format, start by converting to
10630  # unix format.
10631  path="$BOOT_JDK"
10632  new_path=`$CYGPATH -u "$path"`
10633
10634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10637  # "foo.exe" is OK but "foo" is an error.
10638  #
10639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10640  # It is also a way to make sure we got the proper file name for the real test later on.
10641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10642  if test "x$test_shortpath" = x; then
10643    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10645    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
10646$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
10647   { (exit 1); exit 1; }; }
10648  fi
10649
10650  # Call helper function which possibly converts this using DOS-style short mode.
10651  # If so, the updated path is stored in $new_path.
10652
10653  input_path="$new_path"
10654  # Check if we need to convert this using DOS-style short mode. If the path
10655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10656  # take no chances and rewrite it.
10657  # Note: m4 eats our [], so we need to use [ and ] instead.
10658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10659  if test "x$has_forbidden_chars" != x; then
10660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10664      # Going to short mode and back again did indeed matter. Since short mode is
10665      # case insensitive, let's make it lowercase to improve readability.
10666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10667      # Now convert it back to Unix-stile (cygpath)
10668      input_path=`$CYGPATH -u "$shortmode_path"`
10669      new_path="$input_path"
10670    fi
10671  fi
10672
10673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10674  if test "x$test_cygdrive_prefix" = x; then
10675    # As a simple fix, exclude /usr/bin since it's not a real path.
10676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10678      # a path prefixed by /cygdrive for fixpath to work.
10679      new_path="$CYGWIN_ROOT_PATH$input_path"
10680    fi
10681  fi
10682
10683
10684  if test "x$path" != "x$new_path"; then
10685    BOOT_JDK="$new_path"
10686    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
10687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10688  fi
10689
10690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10691
10692  path="$BOOT_JDK"
10693  has_colon=`$ECHO $path | $GREP ^.:`
10694  new_path="$path"
10695  if test "x$has_colon" = x; then
10696    # Not in mixed or Windows style, start by that.
10697    new_path=`cmd //c echo $path`
10698  fi
10699
10700
10701  input_path="$new_path"
10702  # Check if we need to convert this using DOS-style short mode. If the path
10703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10704  # take no chances and rewrite it.
10705  # Note: m4 eats our [], so we need to use [ and ] instead.
10706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10707  if test "x$has_forbidden_chars" != x; then
10708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10710  fi
10711
10712
10713  windows_path="$new_path"
10714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10715    unix_path=`$CYGPATH -u "$windows_path"`
10716    new_path="$unix_path"
10717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10719    new_path="$unix_path"
10720  fi
10721
10722  if test "x$path" != "x$new_path"; then
10723    BOOT_JDK="$new_path"
10724    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
10725$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10726  fi
10727
10728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10730
10731  else
10732    # We're on a posix platform. Hooray! :)
10733    path="$BOOT_JDK"
10734
10735    if test ! -f "$path" && test ! -d "$path"; then
10736      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
10737$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
10738   { (exit 1); exit 1; }; }
10739    fi
10740
10741    has_space=`$ECHO "$path" | $GREP " "`
10742    if test "x$has_space" != x; then
10743      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10744$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10745      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
10746$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
10747   { (exit 1); exit 1; }; }
10748    fi
10749  fi
10750
10751              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
10752$as_echo_n "checking for Boot JDK... " >&6; }
10753              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
10754$as_echo "$BOOT_JDK" >&6; }
10755              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
10756$as_echo_n "checking Boot JDK version... " >&6; }
10757              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10758              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
10759$as_echo "$BOOT_JDK_VERSION" >&6; }
10760            fi # end check jdk version
10761          fi # end check rt.jar
10762        fi # end check javac
10763      fi # end check java
10764    fi # end check boot jdk found
10765  fi
10766
10767
10768# Test: Is $JAVA_HOME set?
10769
10770  if test "x$BOOT_JDK_FOUND" = xno; then
10771    # Now execute the test
10772
10773    if test "x$JAVA_HOME" != x; then
10774        JAVA_HOME_PROCESSED="$JAVA_HOME"
10775
10776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10777
10778  # Input might be given as Windows format, start by converting to
10779  # unix format.
10780  path="$JAVA_HOME_PROCESSED"
10781  new_path=`$CYGPATH -u "$path"`
10782
10783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10786  # "foo.exe" is OK but "foo" is an error.
10787  #
10788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10789  # It is also a way to make sure we got the proper file name for the real test later on.
10790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10791  if test "x$test_shortpath" = x; then
10792    { $as_echo "$as_me:$LINENO: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
10793$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
10794    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of JAVA_HOME_PROCESSED" >&5
10795$as_echo "$as_me: error: Cannot locate the the path of JAVA_HOME_PROCESSED" >&2;}
10796   { (exit 1); exit 1; }; }
10797  fi
10798
10799  # Call helper function which possibly converts this using DOS-style short mode.
10800  # If so, the updated path is stored in $new_path.
10801
10802  input_path="$new_path"
10803  # Check if we need to convert this using DOS-style short mode. If the path
10804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10805  # take no chances and rewrite it.
10806  # Note: m4 eats our [], so we need to use [ and ] instead.
10807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10808  if test "x$has_forbidden_chars" != x; then
10809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10813      # Going to short mode and back again did indeed matter. Since short mode is
10814      # case insensitive, let's make it lowercase to improve readability.
10815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10816      # Now convert it back to Unix-stile (cygpath)
10817      input_path=`$CYGPATH -u "$shortmode_path"`
10818      new_path="$input_path"
10819    fi
10820  fi
10821
10822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10823  if test "x$test_cygdrive_prefix" = x; then
10824    # As a simple fix, exclude /usr/bin since it's not a real path.
10825    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10827      # a path prefixed by /cygdrive for fixpath to work.
10828      new_path="$CYGWIN_ROOT_PATH$input_path"
10829    fi
10830  fi
10831
10832
10833  if test "x$path" != "x$new_path"; then
10834    JAVA_HOME_PROCESSED="$new_path"
10835    { $as_echo "$as_me:$LINENO: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
10836$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
10837  fi
10838
10839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10840
10841  path="$JAVA_HOME_PROCESSED"
10842  has_colon=`$ECHO $path | $GREP ^.:`
10843  new_path="$path"
10844  if test "x$has_colon" = x; then
10845    # Not in mixed or Windows style, start by that.
10846    new_path=`cmd //c echo $path`
10847  fi
10848
10849
10850  input_path="$new_path"
10851  # Check if we need to convert this using DOS-style short mode. If the path
10852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10853  # take no chances and rewrite it.
10854  # Note: m4 eats our [], so we need to use [ and ] instead.
10855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10856  if test "x$has_forbidden_chars" != x; then
10857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10859  fi
10860
10861
10862  windows_path="$new_path"
10863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10864    unix_path=`$CYGPATH -u "$windows_path"`
10865    new_path="$unix_path"
10866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10868    new_path="$unix_path"
10869  fi
10870
10871  if test "x$path" != "x$new_path"; then
10872    JAVA_HOME_PROCESSED="$new_path"
10873    { $as_echo "$as_me:$LINENO: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
10874$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
10875  fi
10876
10877  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10878  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10879
10880  else
10881    # We're on a posix platform. Hooray! :)
10882    path="$JAVA_HOME_PROCESSED"
10883
10884    if test ! -f "$path" && test ! -d "$path"; then
10885      { { $as_echo "$as_me:$LINENO: error: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." >&5
10886$as_echo "$as_me: error: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." >&2;}
10887   { (exit 1); exit 1; }; }
10888    fi
10889
10890    has_space=`$ECHO "$path" | $GREP " "`
10891    if test "x$has_space" != x; then
10892      { $as_echo "$as_me:$LINENO: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
10893$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
10894      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
10895$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
10896   { (exit 1); exit 1; }; }
10897    fi
10898  fi
10899
10900        if test ! -d "$JAVA_HOME_PROCESSED"; then
10901            { $as_echo "$as_me:$LINENO: Your JAVA_HOME points to a non-existing directory!" >&5
10902$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
10903        else
10904          # Aha, the user has set a JAVA_HOME
10905          # let us use that as the Boot JDK.
10906          BOOT_JDK="$JAVA_HOME_PROCESSED"
10907          BOOT_JDK_FOUND=maybe
10908          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using JAVA_HOME" >&5
10909$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
10910        fi
10911    fi
10912
10913
10914    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10915    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10916      # Do we have a bin/java?
10917      if test ! -x "$BOOT_JDK/bin/java"; then
10918        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10920        BOOT_JDK_FOUND=no
10921      else
10922        # Do we have a bin/javac?
10923        if test ! -x "$BOOT_JDK/bin/javac"; then
10924          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10926          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
10927$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10928          BOOT_JDK_FOUND=no
10929        else
10930          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10931          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10932            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10934            BOOT_JDK_FOUND=no
10935          else
10936            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10937            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10938
10939            # Extra M4 quote needed to protect [] in grep expression.
10940            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10941            if test "x$FOUND_VERSION_78" = x; then
10942              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10944              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
10945$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10946              BOOT_JDK_FOUND=no
10947            else
10948              # We're done! :-)
10949              BOOT_JDK_FOUND=yes
10950
10951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10952
10953  # Input might be given as Windows format, start by converting to
10954  # unix format.
10955  path="$BOOT_JDK"
10956  new_path=`$CYGPATH -u "$path"`
10957
10958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10961  # "foo.exe" is OK but "foo" is an error.
10962  #
10963  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10964  # It is also a way to make sure we got the proper file name for the real test later on.
10965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10966  if test "x$test_shortpath" = x; then
10967    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10968$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10969    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
10970$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
10971   { (exit 1); exit 1; }; }
10972  fi
10973
10974  # Call helper function which possibly converts this using DOS-style short mode.
10975  # If so, the updated path is stored in $new_path.
10976
10977  input_path="$new_path"
10978  # Check if we need to convert this using DOS-style short mode. If the path
10979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10980  # take no chances and rewrite it.
10981  # Note: m4 eats our [], so we need to use [ and ] instead.
10982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10983  if test "x$has_forbidden_chars" != x; then
10984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10988      # Going to short mode and back again did indeed matter. Since short mode is
10989      # case insensitive, let's make it lowercase to improve readability.
10990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10991      # Now convert it back to Unix-stile (cygpath)
10992      input_path=`$CYGPATH -u "$shortmode_path"`
10993      new_path="$input_path"
10994    fi
10995  fi
10996
10997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10998  if test "x$test_cygdrive_prefix" = x; then
10999    # As a simple fix, exclude /usr/bin since it's not a real path.
11000    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11002      # a path prefixed by /cygdrive for fixpath to work.
11003      new_path="$CYGWIN_ROOT_PATH$input_path"
11004    fi
11005  fi
11006
11007
11008  if test "x$path" != "x$new_path"; then
11009    BOOT_JDK="$new_path"
11010    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11011$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11012  fi
11013
11014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11015
11016  path="$BOOT_JDK"
11017  has_colon=`$ECHO $path | $GREP ^.:`
11018  new_path="$path"
11019  if test "x$has_colon" = x; then
11020    # Not in mixed or Windows style, start by that.
11021    new_path=`cmd //c echo $path`
11022  fi
11023
11024
11025  input_path="$new_path"
11026  # Check if we need to convert this using DOS-style short mode. If the path
11027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11028  # take no chances and rewrite it.
11029  # Note: m4 eats our [], so we need to use [ and ] instead.
11030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11031  if test "x$has_forbidden_chars" != x; then
11032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11034  fi
11035
11036
11037  windows_path="$new_path"
11038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11039    unix_path=`$CYGPATH -u "$windows_path"`
11040    new_path="$unix_path"
11041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11043    new_path="$unix_path"
11044  fi
11045
11046  if test "x$path" != "x$new_path"; then
11047    BOOT_JDK="$new_path"
11048    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11049$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11050  fi
11051
11052  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11053  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11054
11055  else
11056    # We're on a posix platform. Hooray! :)
11057    path="$BOOT_JDK"
11058
11059    if test ! -f "$path" && test ! -d "$path"; then
11060      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
11061$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
11062   { (exit 1); exit 1; }; }
11063    fi
11064
11065    has_space=`$ECHO "$path" | $GREP " "`
11066    if test "x$has_space" != x; then
11067      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11068$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11069      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
11070$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
11071   { (exit 1); exit 1; }; }
11072    fi
11073  fi
11074
11075              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
11076$as_echo_n "checking for Boot JDK... " >&6; }
11077              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
11078$as_echo "$BOOT_JDK" >&6; }
11079              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
11080$as_echo_n "checking Boot JDK version... " >&6; }
11081              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11082              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
11083$as_echo "$BOOT_JDK_VERSION" >&6; }
11084            fi # end check jdk version
11085          fi # end check rt.jar
11086        fi # end check javac
11087      fi # end check java
11088    fi # end check boot jdk found
11089  fi
11090
11091
11092# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11093
11094  if test "x$BOOT_JDK_FOUND" = xno; then
11095    # Now execute the test
11096
11097    if test -x /usr/libexec/java_home; then
11098        BOOT_JDK=`/usr/libexec/java_home`
11099        BOOT_JDK_FOUND=maybe
11100        { $as_echo "$as_me:$LINENO: Found potential Boot JDK using /usr/libexec/java_home" >&5
11101$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11102    fi
11103
11104
11105    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11106    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11107      # Do we have a bin/java?
11108      if test ! -x "$BOOT_JDK/bin/java"; then
11109        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11111        BOOT_JDK_FOUND=no
11112      else
11113        # Do we have a bin/javac?
11114        if test ! -x "$BOOT_JDK/bin/javac"; then
11115          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11116$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11117          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
11118$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11119          BOOT_JDK_FOUND=no
11120        else
11121          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11122          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11123            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11124$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11125            BOOT_JDK_FOUND=no
11126          else
11127            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11128            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11129
11130            # Extra M4 quote needed to protect [] in grep expression.
11131            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11132            if test "x$FOUND_VERSION_78" = x; then
11133              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11135              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
11136$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11137              BOOT_JDK_FOUND=no
11138            else
11139              # We're done! :-)
11140              BOOT_JDK_FOUND=yes
11141
11142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11143
11144  # Input might be given as Windows format, start by converting to
11145  # unix format.
11146  path="$BOOT_JDK"
11147  new_path=`$CYGPATH -u "$path"`
11148
11149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11152  # "foo.exe" is OK but "foo" is an error.
11153  #
11154  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11155  # It is also a way to make sure we got the proper file name for the real test later on.
11156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11157  if test "x$test_shortpath" = x; then
11158    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11159$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11160    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
11161$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
11162   { (exit 1); exit 1; }; }
11163  fi
11164
11165  # Call helper function which possibly converts this using DOS-style short mode.
11166  # If so, the updated path is stored in $new_path.
11167
11168  input_path="$new_path"
11169  # Check if we need to convert this using DOS-style short mode. If the path
11170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11171  # take no chances and rewrite it.
11172  # Note: m4 eats our [], so we need to use [ and ] instead.
11173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11174  if test "x$has_forbidden_chars" != x; then
11175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11179      # Going to short mode and back again did indeed matter. Since short mode is
11180      # case insensitive, let's make it lowercase to improve readability.
11181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11182      # Now convert it back to Unix-stile (cygpath)
11183      input_path=`$CYGPATH -u "$shortmode_path"`
11184      new_path="$input_path"
11185    fi
11186  fi
11187
11188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11189  if test "x$test_cygdrive_prefix" = x; then
11190    # As a simple fix, exclude /usr/bin since it's not a real path.
11191    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11193      # a path prefixed by /cygdrive for fixpath to work.
11194      new_path="$CYGWIN_ROOT_PATH$input_path"
11195    fi
11196  fi
11197
11198
11199  if test "x$path" != "x$new_path"; then
11200    BOOT_JDK="$new_path"
11201    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11202$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11203  fi
11204
11205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11206
11207  path="$BOOT_JDK"
11208  has_colon=`$ECHO $path | $GREP ^.:`
11209  new_path="$path"
11210  if test "x$has_colon" = x; then
11211    # Not in mixed or Windows style, start by that.
11212    new_path=`cmd //c echo $path`
11213  fi
11214
11215
11216  input_path="$new_path"
11217  # Check if we need to convert this using DOS-style short mode. If the path
11218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11219  # take no chances and rewrite it.
11220  # Note: m4 eats our [], so we need to use [ and ] instead.
11221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11222  if test "x$has_forbidden_chars" != x; then
11223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11225  fi
11226
11227
11228  windows_path="$new_path"
11229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11230    unix_path=`$CYGPATH -u "$windows_path"`
11231    new_path="$unix_path"
11232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11234    new_path="$unix_path"
11235  fi
11236
11237  if test "x$path" != "x$new_path"; then
11238    BOOT_JDK="$new_path"
11239    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11240$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11241  fi
11242
11243  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11244  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11245
11246  else
11247    # We're on a posix platform. Hooray! :)
11248    path="$BOOT_JDK"
11249
11250    if test ! -f "$path" && test ! -d "$path"; then
11251      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
11252$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
11253   { (exit 1); exit 1; }; }
11254    fi
11255
11256    has_space=`$ECHO "$path" | $GREP " "`
11257    if test "x$has_space" != x; then
11258      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11259$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11260      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
11261$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
11262   { (exit 1); exit 1; }; }
11263    fi
11264  fi
11265
11266              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
11267$as_echo_n "checking for Boot JDK... " >&6; }
11268              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
11269$as_echo "$BOOT_JDK" >&6; }
11270              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
11271$as_echo_n "checking Boot JDK version... " >&6; }
11272              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11273              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
11274$as_echo "$BOOT_JDK_VERSION" >&6; }
11275            fi # end check jdk version
11276          fi # end check rt.jar
11277        fi # end check javac
11278      fi # end check java
11279    fi # end check boot jdk found
11280  fi
11281
11282
11283# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11284
11285  if test "x$BOOT_JDK_FOUND" = xno; then
11286    # Now execute the test
11287
11288    # Extract the first word of "javac", so it can be a program name with args.
11289set dummy javac; ac_word=$2
11290{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
11291$as_echo_n "checking for $ac_word... " >&6; }
11292if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then
11293  $as_echo_n "(cached) " >&6
11294else
11295  case $JAVAC_CHECK in
11296  [\\/]* | ?:[\\/]*)
11297  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11298  ;;
11299  *)
11300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11301for as_dir in $PATH
11302do
11303  IFS=$as_save_IFS
11304  test -z "$as_dir" && as_dir=.
11305  for ac_exec_ext in '' $ac_executable_extensions; do
11306  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11307    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11308    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11309    break 2
11310  fi
11311done
11312done
11313IFS=$as_save_IFS
11314
11315  ;;
11316esac
11317fi
11318JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11319if test -n "$JAVAC_CHECK"; then
11320  { $as_echo "$as_me:$LINENO: result: $JAVAC_CHECK" >&5
11321$as_echo "$JAVAC_CHECK" >&6; }
11322else
11323  { $as_echo "$as_me:$LINENO: result: no" >&5
11324$as_echo "no" >&6; }
11325fi
11326
11327
11328    # Extract the first word of "java", so it can be a program name with args.
11329set dummy java; ac_word=$2
11330{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
11331$as_echo_n "checking for $ac_word... " >&6; }
11332if test "${ac_cv_path_JAVA_CHECK+set}" = set; then
11333  $as_echo_n "(cached) " >&6
11334else
11335  case $JAVA_CHECK in
11336  [\\/]* | ?:[\\/]*)
11337  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11338  ;;
11339  *)
11340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11341for as_dir in $PATH
11342do
11343  IFS=$as_save_IFS
11344  test -z "$as_dir" && as_dir=.
11345  for ac_exec_ext in '' $ac_executable_extensions; do
11346  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11347    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11348    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11349    break 2
11350  fi
11351done
11352done
11353IFS=$as_save_IFS
11354
11355  ;;
11356esac
11357fi
11358JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11359if test -n "$JAVA_CHECK"; then
11360  { $as_echo "$as_me:$LINENO: result: $JAVA_CHECK" >&5
11361$as_echo "$JAVA_CHECK" >&6; }
11362else
11363  { $as_echo "$as_me:$LINENO: result: no" >&5
11364$as_echo "no" >&6; }
11365fi
11366
11367
11368    BINARY="$JAVAC_CHECK"
11369    if test "x$JAVAC_CHECK" = x; then
11370        BINARY="$JAVA_CHECK"
11371    fi
11372    if test "x$BINARY" != x; then
11373        # So there is a java(c) binary, it might be part of a JDK.
11374        # Lets find the JDK/JRE directory by following symbolic links.
11375        # Linux/GNU systems often have links from /usr/bin/java to
11376        # /etc/alternatives/java to the real JDK binary.
11377
11378    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11379        # Follow a chain of symbolic links. Use readlink
11380        # where it exists, else fall back to horribly
11381        # complicated shell code.
11382        if test "x$READLINK_TESTED" != yes; then
11383            # On MacOSX there is a readlink tool with a different
11384            # purpose than the GNU readlink tool. Check the found readlink.
11385            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
11386            if test "x$ISGNU" = x; then
11387                 # A readlink that we do not know how to use.
11388                 # Are there other non-GNU readlinks out there?
11389                 READLINK_TESTED=yes
11390                 READLINK=
11391            fi
11392        fi
11393
11394        if test "x$READLINK" != x; then
11395            BINARY=`$READLINK -f $BINARY`
11396        else
11397            STARTDIR=$PWD
11398            COUNTER=0
11399            sym_link_dir=`$DIRNAME $BINARY`
11400            sym_link_file=`$BASENAME $BINARY`
11401            while test $COUNTER -lt 20; do
11402                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11403                if test "x$ISLINK" == x; then
11404                    # This is not a symbolic link! We are done!
11405                    break
11406                fi
11407                # The link might be relative! We have to use cd to travel safely.
11408                cd $sym_link_dir
11409                # ... and we must get the to the absolute path, not one using symbolic links.
11410                cd `pwd -P`
11411                cd `$DIRNAME $ISLINK`
11412                sym_link_dir=`$THEPWDCMD`
11413                sym_link_file=`$BASENAME $ISLINK`
11414                let COUNTER=COUNTER+1
11415            done
11416            cd $STARTDIR
11417            BINARY=$sym_link_dir/$sym_link_file
11418        fi
11419    fi
11420
11421        BOOT_JDK=`dirname "$BINARY"`
11422        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11423        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11424            # Looks like we found ourselves an JDK
11425            BOOT_JDK_FOUND=maybe
11426            { $as_echo "$as_me:$LINENO: Found potential Boot JDK using java(c) in PATH" >&5
11427$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11428        fi
11429    fi
11430
11431
11432    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11433    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11434      # Do we have a bin/java?
11435      if test ! -x "$BOOT_JDK/bin/java"; then
11436        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11437$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11438        BOOT_JDK_FOUND=no
11439      else
11440        # Do we have a bin/javac?
11441        if test ! -x "$BOOT_JDK/bin/javac"; then
11442          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11444          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
11445$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11446          BOOT_JDK_FOUND=no
11447        else
11448          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11449          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11450            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11452            BOOT_JDK_FOUND=no
11453          else
11454            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11455            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11456
11457            # Extra M4 quote needed to protect [] in grep expression.
11458            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11459            if test "x$FOUND_VERSION_78" = x; then
11460              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11461$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11462              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
11463$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11464              BOOT_JDK_FOUND=no
11465            else
11466              # We're done! :-)
11467              BOOT_JDK_FOUND=yes
11468
11469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11470
11471  # Input might be given as Windows format, start by converting to
11472  # unix format.
11473  path="$BOOT_JDK"
11474  new_path=`$CYGPATH -u "$path"`
11475
11476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11479  # "foo.exe" is OK but "foo" is an error.
11480  #
11481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11482  # It is also a way to make sure we got the proper file name for the real test later on.
11483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11484  if test "x$test_shortpath" = x; then
11485    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11486$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11487    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
11488$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
11489   { (exit 1); exit 1; }; }
11490  fi
11491
11492  # Call helper function which possibly converts this using DOS-style short mode.
11493  # If so, the updated path is stored in $new_path.
11494
11495  input_path="$new_path"
11496  # Check if we need to convert this using DOS-style short mode. If the path
11497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11498  # take no chances and rewrite it.
11499  # Note: m4 eats our [], so we need to use [ and ] instead.
11500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11501  if test "x$has_forbidden_chars" != x; then
11502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11506      # Going to short mode and back again did indeed matter. Since short mode is
11507      # case insensitive, let's make it lowercase to improve readability.
11508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11509      # Now convert it back to Unix-stile (cygpath)
11510      input_path=`$CYGPATH -u "$shortmode_path"`
11511      new_path="$input_path"
11512    fi
11513  fi
11514
11515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11516  if test "x$test_cygdrive_prefix" = x; then
11517    # As a simple fix, exclude /usr/bin since it's not a real path.
11518    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11520      # a path prefixed by /cygdrive for fixpath to work.
11521      new_path="$CYGWIN_ROOT_PATH$input_path"
11522    fi
11523  fi
11524
11525
11526  if test "x$path" != "x$new_path"; then
11527    BOOT_JDK="$new_path"
11528    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11529$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11530  fi
11531
11532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11533
11534  path="$BOOT_JDK"
11535  has_colon=`$ECHO $path | $GREP ^.:`
11536  new_path="$path"
11537  if test "x$has_colon" = x; then
11538    # Not in mixed or Windows style, start by that.
11539    new_path=`cmd //c echo $path`
11540  fi
11541
11542
11543  input_path="$new_path"
11544  # Check if we need to convert this using DOS-style short mode. If the path
11545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11546  # take no chances and rewrite it.
11547  # Note: m4 eats our [], so we need to use [ and ] instead.
11548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11549  if test "x$has_forbidden_chars" != x; then
11550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11551    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11552  fi
11553
11554
11555  windows_path="$new_path"
11556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11557    unix_path=`$CYGPATH -u "$windows_path"`
11558    new_path="$unix_path"
11559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11561    new_path="$unix_path"
11562  fi
11563
11564  if test "x$path" != "x$new_path"; then
11565    BOOT_JDK="$new_path"
11566    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11567$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11568  fi
11569
11570  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11571  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11572
11573  else
11574    # We're on a posix platform. Hooray! :)
11575    path="$BOOT_JDK"
11576
11577    if test ! -f "$path" && test ! -d "$path"; then
11578      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
11579$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
11580   { (exit 1); exit 1; }; }
11581    fi
11582
11583    has_space=`$ECHO "$path" | $GREP " "`
11584    if test "x$has_space" != x; then
11585      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11586$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11587      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
11588$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
11589   { (exit 1); exit 1; }; }
11590    fi
11591  fi
11592
11593              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
11594$as_echo_n "checking for Boot JDK... " >&6; }
11595              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
11596$as_echo "$BOOT_JDK" >&6; }
11597              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
11598$as_echo_n "checking Boot JDK version... " >&6; }
11599              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11600              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
11601$as_echo "$BOOT_JDK_VERSION" >&6; }
11602            fi # end check jdk version
11603          fi # end check rt.jar
11604        fi # end check javac
11605      fi # end check java
11606    fi # end check boot jdk found
11607  fi
11608
11609
11610# Test: Is there a JDK installed in default, well-known locations?
11611
11612  if test "x$BOOT_JDK_FOUND" = xno; then
11613    # Now execute the test
11614
11615  if test "x$OPENJDK_TARGET_OS" = xwindows; then
11616
11617  if test "x$BOOT_JDK_FOUND" = xno; then
11618    # Now execute the test
11619
11620  if test "x$ProgramW6432" != x; then
11621    VIRTUAL_DIR="$ProgramW6432/Java"
11622
11623  windows_path="$VIRTUAL_DIR"
11624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11625    unix_path=`$CYGPATH -u "$windows_path"`
11626    VIRTUAL_DIR="$unix_path"
11627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11629    VIRTUAL_DIR="$unix_path"
11630  fi
11631
11632
11633  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
11634  BOOT_JDK_SUFFIX=""
11635  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
11636  if test "x$ALL_JDKS_FOUND" != x; then
11637    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
11638
11639  if test "x$BOOT_JDK_FOUND" = xno; then
11640    # Now execute the test
11641
11642        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
11643        if test -d "$BOOT_JDK"; then
11644          BOOT_JDK_FOUND=maybe
11645          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
11646$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
11647        fi
11648
11649
11650    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11651    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11652      # Do we have a bin/java?
11653      if test ! -x "$BOOT_JDK/bin/java"; then
11654        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11656        BOOT_JDK_FOUND=no
11657      else
11658        # Do we have a bin/javac?
11659        if test ! -x "$BOOT_JDK/bin/javac"; then
11660          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11662          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
11663$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11664          BOOT_JDK_FOUND=no
11665        else
11666          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11667          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11668            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11669$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11670            BOOT_JDK_FOUND=no
11671          else
11672            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11673            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11674
11675            # Extra M4 quote needed to protect [] in grep expression.
11676            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11677            if test "x$FOUND_VERSION_78" = x; then
11678              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11680              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
11681$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11682              BOOT_JDK_FOUND=no
11683            else
11684              # We're done! :-)
11685              BOOT_JDK_FOUND=yes
11686
11687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11688
11689  # Input might be given as Windows format, start by converting to
11690  # unix format.
11691  path="$BOOT_JDK"
11692  new_path=`$CYGPATH -u "$path"`
11693
11694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11697  # "foo.exe" is OK but "foo" is an error.
11698  #
11699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11700  # It is also a way to make sure we got the proper file name for the real test later on.
11701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11702  if test "x$test_shortpath" = x; then
11703    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11705    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
11706$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
11707   { (exit 1); exit 1; }; }
11708  fi
11709
11710  # Call helper function which possibly converts this using DOS-style short mode.
11711  # If so, the updated path is stored in $new_path.
11712
11713  input_path="$new_path"
11714  # Check if we need to convert this using DOS-style short mode. If the path
11715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11716  # take no chances and rewrite it.
11717  # Note: m4 eats our [], so we need to use [ and ] instead.
11718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11719  if test "x$has_forbidden_chars" != x; then
11720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11724      # Going to short mode and back again did indeed matter. Since short mode is
11725      # case insensitive, let's make it lowercase to improve readability.
11726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11727      # Now convert it back to Unix-stile (cygpath)
11728      input_path=`$CYGPATH -u "$shortmode_path"`
11729      new_path="$input_path"
11730    fi
11731  fi
11732
11733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11734  if test "x$test_cygdrive_prefix" = x; then
11735    # As a simple fix, exclude /usr/bin since it's not a real path.
11736    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11738      # a path prefixed by /cygdrive for fixpath to work.
11739      new_path="$CYGWIN_ROOT_PATH$input_path"
11740    fi
11741  fi
11742
11743
11744  if test "x$path" != "x$new_path"; then
11745    BOOT_JDK="$new_path"
11746    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11747$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11748  fi
11749
11750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11751
11752  path="$BOOT_JDK"
11753  has_colon=`$ECHO $path | $GREP ^.:`
11754  new_path="$path"
11755  if test "x$has_colon" = x; then
11756    # Not in mixed or Windows style, start by that.
11757    new_path=`cmd //c echo $path`
11758  fi
11759
11760
11761  input_path="$new_path"
11762  # Check if we need to convert this using DOS-style short mode. If the path
11763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11764  # take no chances and rewrite it.
11765  # Note: m4 eats our [], so we need to use [ and ] instead.
11766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11767  if test "x$has_forbidden_chars" != x; then
11768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11770  fi
11771
11772
11773  windows_path="$new_path"
11774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11775    unix_path=`$CYGPATH -u "$windows_path"`
11776    new_path="$unix_path"
11777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11779    new_path="$unix_path"
11780  fi
11781
11782  if test "x$path" != "x$new_path"; then
11783    BOOT_JDK="$new_path"
11784    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11785$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11786  fi
11787
11788  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11789  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11790
11791  else
11792    # We're on a posix platform. Hooray! :)
11793    path="$BOOT_JDK"
11794
11795    if test ! -f "$path" && test ! -d "$path"; then
11796      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
11797$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
11798   { (exit 1); exit 1; }; }
11799    fi
11800
11801    has_space=`$ECHO "$path" | $GREP " "`
11802    if test "x$has_space" != x; then
11803      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11804$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11805      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
11806$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
11807   { (exit 1); exit 1; }; }
11808    fi
11809  fi
11810
11811              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
11812$as_echo_n "checking for Boot JDK... " >&6; }
11813              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
11814$as_echo "$BOOT_JDK" >&6; }
11815              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
11816$as_echo_n "checking Boot JDK version... " >&6; }
11817              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11818              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
11819$as_echo "$BOOT_JDK_VERSION" >&6; }
11820            fi # end check jdk version
11821          fi # end check rt.jar
11822        fi # end check javac
11823      fi # end check java
11824    fi # end check boot jdk found
11825  fi
11826
11827    done
11828  fi
11829
11830  fi
11831
11832
11833    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11834    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11835      # Do we have a bin/java?
11836      if test ! -x "$BOOT_JDK/bin/java"; then
11837        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11839        BOOT_JDK_FOUND=no
11840      else
11841        # Do we have a bin/javac?
11842        if test ! -x "$BOOT_JDK/bin/javac"; then
11843          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11844$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11845          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
11846$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11847          BOOT_JDK_FOUND=no
11848        else
11849          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11850          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11851            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11852$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11853            BOOT_JDK_FOUND=no
11854          else
11855            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11856            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11857
11858            # Extra M4 quote needed to protect [] in grep expression.
11859            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11860            if test "x$FOUND_VERSION_78" = x; then
11861              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11862$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11863              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
11864$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11865              BOOT_JDK_FOUND=no
11866            else
11867              # We're done! :-)
11868              BOOT_JDK_FOUND=yes
11869
11870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11871
11872  # Input might be given as Windows format, start by converting to
11873  # unix format.
11874  path="$BOOT_JDK"
11875  new_path=`$CYGPATH -u "$path"`
11876
11877  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11878  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11879  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11880  # "foo.exe" is OK but "foo" is an error.
11881  #
11882  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11883  # It is also a way to make sure we got the proper file name for the real test later on.
11884  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11885  if test "x$test_shortpath" = x; then
11886    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11887$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11888    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
11889$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
11890   { (exit 1); exit 1; }; }
11891  fi
11892
11893  # Call helper function which possibly converts this using DOS-style short mode.
11894  # If so, the updated path is stored in $new_path.
11895
11896  input_path="$new_path"
11897  # Check if we need to convert this using DOS-style short mode. If the path
11898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11899  # take no chances and rewrite it.
11900  # Note: m4 eats our [], so we need to use [ and ] instead.
11901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11902  if test "x$has_forbidden_chars" != x; then
11903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11904    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11905    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11906    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11907      # Going to short mode and back again did indeed matter. Since short mode is
11908      # case insensitive, let's make it lowercase to improve readability.
11909      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11910      # Now convert it back to Unix-stile (cygpath)
11911      input_path=`$CYGPATH -u "$shortmode_path"`
11912      new_path="$input_path"
11913    fi
11914  fi
11915
11916  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11917  if test "x$test_cygdrive_prefix" = x; then
11918    # As a simple fix, exclude /usr/bin since it's not a real path.
11919    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11920      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11921      # a path prefixed by /cygdrive for fixpath to work.
11922      new_path="$CYGWIN_ROOT_PATH$input_path"
11923    fi
11924  fi
11925
11926
11927  if test "x$path" != "x$new_path"; then
11928    BOOT_JDK="$new_path"
11929    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11930$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11931  fi
11932
11933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11934
11935  path="$BOOT_JDK"
11936  has_colon=`$ECHO $path | $GREP ^.:`
11937  new_path="$path"
11938  if test "x$has_colon" = x; then
11939    # Not in mixed or Windows style, start by that.
11940    new_path=`cmd //c echo $path`
11941  fi
11942
11943
11944  input_path="$new_path"
11945  # Check if we need to convert this using DOS-style short mode. If the path
11946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11947  # take no chances and rewrite it.
11948  # Note: m4 eats our [], so we need to use [ and ] instead.
11949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11950  if test "x$has_forbidden_chars" != x; then
11951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11953  fi
11954
11955
11956  windows_path="$new_path"
11957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11958    unix_path=`$CYGPATH -u "$windows_path"`
11959    new_path="$unix_path"
11960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11962    new_path="$unix_path"
11963  fi
11964
11965  if test "x$path" != "x$new_path"; then
11966    BOOT_JDK="$new_path"
11967    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
11968$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11969  fi
11970
11971  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11972  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11973
11974  else
11975    # We're on a posix platform. Hooray! :)
11976    path="$BOOT_JDK"
11977
11978    if test ! -f "$path" && test ! -d "$path"; then
11979      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
11980$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
11981   { (exit 1); exit 1; }; }
11982    fi
11983
11984    has_space=`$ECHO "$path" | $GREP " "`
11985    if test "x$has_space" != x; then
11986      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11987$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11988      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
11989$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
11990   { (exit 1); exit 1; }; }
11991    fi
11992  fi
11993
11994              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
11995$as_echo_n "checking for Boot JDK... " >&6; }
11996              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
11997$as_echo "$BOOT_JDK" >&6; }
11998              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
11999$as_echo_n "checking Boot JDK version... " >&6; }
12000              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12001              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
12002$as_echo "$BOOT_JDK_VERSION" >&6; }
12003            fi # end check jdk version
12004          fi # end check rt.jar
12005        fi # end check javac
12006      fi # end check java
12007    fi # end check boot jdk found
12008  fi
12009
12010
12011  if test "x$BOOT_JDK_FOUND" = xno; then
12012    # Now execute the test
12013
12014  if test "x$PROGRAMW6432" != x; then
12015    VIRTUAL_DIR="$PROGRAMW6432/Java"
12016
12017  windows_path="$VIRTUAL_DIR"
12018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12019    unix_path=`$CYGPATH -u "$windows_path"`
12020    VIRTUAL_DIR="$unix_path"
12021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12023    VIRTUAL_DIR="$unix_path"
12024  fi
12025
12026
12027  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12028  BOOT_JDK_SUFFIX=""
12029  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12030  if test "x$ALL_JDKS_FOUND" != x; then
12031    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12032
12033  if test "x$BOOT_JDK_FOUND" = xno; then
12034    # Now execute the test
12035
12036        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12037        if test -d "$BOOT_JDK"; then
12038          BOOT_JDK_FOUND=maybe
12039          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12040$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12041        fi
12042
12043
12044    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12045    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12046      # Do we have a bin/java?
12047      if test ! -x "$BOOT_JDK/bin/java"; then
12048        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12049$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12050        BOOT_JDK_FOUND=no
12051      else
12052        # Do we have a bin/javac?
12053        if test ! -x "$BOOT_JDK/bin/javac"; then
12054          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12056          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12057$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12058          BOOT_JDK_FOUND=no
12059        else
12060          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12061          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12062            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12063$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12064            BOOT_JDK_FOUND=no
12065          else
12066            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12067            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12068
12069            # Extra M4 quote needed to protect [] in grep expression.
12070            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12071            if test "x$FOUND_VERSION_78" = x; then
12072              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12074              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12075$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12076              BOOT_JDK_FOUND=no
12077            else
12078              # We're done! :-)
12079              BOOT_JDK_FOUND=yes
12080
12081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12082
12083  # Input might be given as Windows format, start by converting to
12084  # unix format.
12085  path="$BOOT_JDK"
12086  new_path=`$CYGPATH -u "$path"`
12087
12088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12091  # "foo.exe" is OK but "foo" is an error.
12092  #
12093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12094  # It is also a way to make sure we got the proper file name for the real test later on.
12095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12096  if test "x$test_shortpath" = x; then
12097    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12098$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12099    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
12100$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
12101   { (exit 1); exit 1; }; }
12102  fi
12103
12104  # Call helper function which possibly converts this using DOS-style short mode.
12105  # If so, the updated path is stored in $new_path.
12106
12107  input_path="$new_path"
12108  # Check if we need to convert this using DOS-style short mode. If the path
12109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12110  # take no chances and rewrite it.
12111  # Note: m4 eats our [], so we need to use [ and ] instead.
12112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12113  if test "x$has_forbidden_chars" != x; then
12114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12118      # Going to short mode and back again did indeed matter. Since short mode is
12119      # case insensitive, let's make it lowercase to improve readability.
12120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12121      # Now convert it back to Unix-stile (cygpath)
12122      input_path=`$CYGPATH -u "$shortmode_path"`
12123      new_path="$input_path"
12124    fi
12125  fi
12126
12127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12128  if test "x$test_cygdrive_prefix" = x; then
12129    # As a simple fix, exclude /usr/bin since it's not a real path.
12130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12132      # a path prefixed by /cygdrive for fixpath to work.
12133      new_path="$CYGWIN_ROOT_PATH$input_path"
12134    fi
12135  fi
12136
12137
12138  if test "x$path" != "x$new_path"; then
12139    BOOT_JDK="$new_path"
12140    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12142  fi
12143
12144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12145
12146  path="$BOOT_JDK"
12147  has_colon=`$ECHO $path | $GREP ^.:`
12148  new_path="$path"
12149  if test "x$has_colon" = x; then
12150    # Not in mixed or Windows style, start by that.
12151    new_path=`cmd //c echo $path`
12152  fi
12153
12154
12155  input_path="$new_path"
12156  # Check if we need to convert this using DOS-style short mode. If the path
12157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12158  # take no chances and rewrite it.
12159  # Note: m4 eats our [], so we need to use [ and ] instead.
12160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12161  if test "x$has_forbidden_chars" != x; then
12162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12164  fi
12165
12166
12167  windows_path="$new_path"
12168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12169    unix_path=`$CYGPATH -u "$windows_path"`
12170    new_path="$unix_path"
12171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12173    new_path="$unix_path"
12174  fi
12175
12176  if test "x$path" != "x$new_path"; then
12177    BOOT_JDK="$new_path"
12178    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12179$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12180  fi
12181
12182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12184
12185  else
12186    # We're on a posix platform. Hooray! :)
12187    path="$BOOT_JDK"
12188
12189    if test ! -f "$path" && test ! -d "$path"; then
12190      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
12191$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
12192   { (exit 1); exit 1; }; }
12193    fi
12194
12195    has_space=`$ECHO "$path" | $GREP " "`
12196    if test "x$has_space" != x; then
12197      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12198$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12199      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
12200$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
12201   { (exit 1); exit 1; }; }
12202    fi
12203  fi
12204
12205              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
12206$as_echo_n "checking for Boot JDK... " >&6; }
12207              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
12208$as_echo "$BOOT_JDK" >&6; }
12209              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
12210$as_echo_n "checking Boot JDK version... " >&6; }
12211              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12212              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
12213$as_echo "$BOOT_JDK_VERSION" >&6; }
12214            fi # end check jdk version
12215          fi # end check rt.jar
12216        fi # end check javac
12217      fi # end check java
12218    fi # end check boot jdk found
12219  fi
12220
12221    done
12222  fi
12223
12224  fi
12225
12226
12227    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12228    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12229      # Do we have a bin/java?
12230      if test ! -x "$BOOT_JDK/bin/java"; then
12231        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12233        BOOT_JDK_FOUND=no
12234      else
12235        # Do we have a bin/javac?
12236        if test ! -x "$BOOT_JDK/bin/javac"; then
12237          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12239          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12240$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12241          BOOT_JDK_FOUND=no
12242        else
12243          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12244          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12245            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12247            BOOT_JDK_FOUND=no
12248          else
12249            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12250            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12251
12252            # Extra M4 quote needed to protect [] in grep expression.
12253            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12254            if test "x$FOUND_VERSION_78" = x; then
12255              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12257              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12258$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12259              BOOT_JDK_FOUND=no
12260            else
12261              # We're done! :-)
12262              BOOT_JDK_FOUND=yes
12263
12264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12265
12266  # Input might be given as Windows format, start by converting to
12267  # unix format.
12268  path="$BOOT_JDK"
12269  new_path=`$CYGPATH -u "$path"`
12270
12271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12274  # "foo.exe" is OK but "foo" is an error.
12275  #
12276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12277  # It is also a way to make sure we got the proper file name for the real test later on.
12278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12279  if test "x$test_shortpath" = x; then
12280    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12281$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12282    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
12283$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
12284   { (exit 1); exit 1; }; }
12285  fi
12286
12287  # Call helper function which possibly converts this using DOS-style short mode.
12288  # If so, the updated path is stored in $new_path.
12289
12290  input_path="$new_path"
12291  # Check if we need to convert this using DOS-style short mode. If the path
12292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12293  # take no chances and rewrite it.
12294  # Note: m4 eats our [], so we need to use [ and ] instead.
12295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12296  if test "x$has_forbidden_chars" != x; then
12297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12298    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12299    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12300    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12301      # Going to short mode and back again did indeed matter. Since short mode is
12302      # case insensitive, let's make it lowercase to improve readability.
12303      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12304      # Now convert it back to Unix-stile (cygpath)
12305      input_path=`$CYGPATH -u "$shortmode_path"`
12306      new_path="$input_path"
12307    fi
12308  fi
12309
12310  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12311  if test "x$test_cygdrive_prefix" = x; then
12312    # As a simple fix, exclude /usr/bin since it's not a real path.
12313    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12314      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12315      # a path prefixed by /cygdrive for fixpath to work.
12316      new_path="$CYGWIN_ROOT_PATH$input_path"
12317    fi
12318  fi
12319
12320
12321  if test "x$path" != "x$new_path"; then
12322    BOOT_JDK="$new_path"
12323    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12324$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12325  fi
12326
12327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12328
12329  path="$BOOT_JDK"
12330  has_colon=`$ECHO $path | $GREP ^.:`
12331  new_path="$path"
12332  if test "x$has_colon" = x; then
12333    # Not in mixed or Windows style, start by that.
12334    new_path=`cmd //c echo $path`
12335  fi
12336
12337
12338  input_path="$new_path"
12339  # Check if we need to convert this using DOS-style short mode. If the path
12340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12341  # take no chances and rewrite it.
12342  # Note: m4 eats our [], so we need to use [ and ] instead.
12343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12344  if test "x$has_forbidden_chars" != x; then
12345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12346    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12347  fi
12348
12349
12350  windows_path="$new_path"
12351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12352    unix_path=`$CYGPATH -u "$windows_path"`
12353    new_path="$unix_path"
12354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12356    new_path="$unix_path"
12357  fi
12358
12359  if test "x$path" != "x$new_path"; then
12360    BOOT_JDK="$new_path"
12361    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12362$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12363  fi
12364
12365  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12366  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12367
12368  else
12369    # We're on a posix platform. Hooray! :)
12370    path="$BOOT_JDK"
12371
12372    if test ! -f "$path" && test ! -d "$path"; then
12373      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
12374$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
12375   { (exit 1); exit 1; }; }
12376    fi
12377
12378    has_space=`$ECHO "$path" | $GREP " "`
12379    if test "x$has_space" != x; then
12380      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12381$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12382      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
12383$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
12384   { (exit 1); exit 1; }; }
12385    fi
12386  fi
12387
12388              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
12389$as_echo_n "checking for Boot JDK... " >&6; }
12390              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
12391$as_echo "$BOOT_JDK" >&6; }
12392              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
12393$as_echo_n "checking Boot JDK version... " >&6; }
12394              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12395              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
12396$as_echo "$BOOT_JDK_VERSION" >&6; }
12397            fi # end check jdk version
12398          fi # end check rt.jar
12399        fi # end check javac
12400      fi # end check java
12401    fi # end check boot jdk found
12402  fi
12403
12404
12405  if test "x$BOOT_JDK_FOUND" = xno; then
12406    # Now execute the test
12407
12408  if test "x$PROGRAMFILES" != x; then
12409    VIRTUAL_DIR="$PROGRAMFILES/Java"
12410
12411  windows_path="$VIRTUAL_DIR"
12412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12413    unix_path=`$CYGPATH -u "$windows_path"`
12414    VIRTUAL_DIR="$unix_path"
12415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12417    VIRTUAL_DIR="$unix_path"
12418  fi
12419
12420
12421  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12422  BOOT_JDK_SUFFIX=""
12423  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12424  if test "x$ALL_JDKS_FOUND" != x; then
12425    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12426
12427  if test "x$BOOT_JDK_FOUND" = xno; then
12428    # Now execute the test
12429
12430        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12431        if test -d "$BOOT_JDK"; then
12432          BOOT_JDK_FOUND=maybe
12433          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12434$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12435        fi
12436
12437
12438    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12439    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12440      # Do we have a bin/java?
12441      if test ! -x "$BOOT_JDK/bin/java"; then
12442        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12444        BOOT_JDK_FOUND=no
12445      else
12446        # Do we have a bin/javac?
12447        if test ! -x "$BOOT_JDK/bin/javac"; then
12448          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12450          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12451$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12452          BOOT_JDK_FOUND=no
12453        else
12454          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12455          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12456            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12458            BOOT_JDK_FOUND=no
12459          else
12460            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12461            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12462
12463            # Extra M4 quote needed to protect [] in grep expression.
12464            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12465            if test "x$FOUND_VERSION_78" = x; then
12466              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12467$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12468              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12469$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12470              BOOT_JDK_FOUND=no
12471            else
12472              # We're done! :-)
12473              BOOT_JDK_FOUND=yes
12474
12475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12476
12477  # Input might be given as Windows format, start by converting to
12478  # unix format.
12479  path="$BOOT_JDK"
12480  new_path=`$CYGPATH -u "$path"`
12481
12482  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12483  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12484  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12485  # "foo.exe" is OK but "foo" is an error.
12486  #
12487  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12488  # It is also a way to make sure we got the proper file name for the real test later on.
12489  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12490  if test "x$test_shortpath" = x; then
12491    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12492$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12493    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
12494$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
12495   { (exit 1); exit 1; }; }
12496  fi
12497
12498  # Call helper function which possibly converts this using DOS-style short mode.
12499  # If so, the updated path is stored in $new_path.
12500
12501  input_path="$new_path"
12502  # Check if we need to convert this using DOS-style short mode. If the path
12503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12504  # take no chances and rewrite it.
12505  # Note: m4 eats our [], so we need to use [ and ] instead.
12506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12507  if test "x$has_forbidden_chars" != x; then
12508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12512      # Going to short mode and back again did indeed matter. Since short mode is
12513      # case insensitive, let's make it lowercase to improve readability.
12514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12515      # Now convert it back to Unix-stile (cygpath)
12516      input_path=`$CYGPATH -u "$shortmode_path"`
12517      new_path="$input_path"
12518    fi
12519  fi
12520
12521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12522  if test "x$test_cygdrive_prefix" = x; then
12523    # As a simple fix, exclude /usr/bin since it's not a real path.
12524    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12526      # a path prefixed by /cygdrive for fixpath to work.
12527      new_path="$CYGWIN_ROOT_PATH$input_path"
12528    fi
12529  fi
12530
12531
12532  if test "x$path" != "x$new_path"; then
12533    BOOT_JDK="$new_path"
12534    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12535$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12536  fi
12537
12538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12539
12540  path="$BOOT_JDK"
12541  has_colon=`$ECHO $path | $GREP ^.:`
12542  new_path="$path"
12543  if test "x$has_colon" = x; then
12544    # Not in mixed or Windows style, start by that.
12545    new_path=`cmd //c echo $path`
12546  fi
12547
12548
12549  input_path="$new_path"
12550  # Check if we need to convert this using DOS-style short mode. If the path
12551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12552  # take no chances and rewrite it.
12553  # Note: m4 eats our [], so we need to use [ and ] instead.
12554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12555  if test "x$has_forbidden_chars" != x; then
12556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12558  fi
12559
12560
12561  windows_path="$new_path"
12562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12563    unix_path=`$CYGPATH -u "$windows_path"`
12564    new_path="$unix_path"
12565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12567    new_path="$unix_path"
12568  fi
12569
12570  if test "x$path" != "x$new_path"; then
12571    BOOT_JDK="$new_path"
12572    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12573$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12574  fi
12575
12576  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12577  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12578
12579  else
12580    # We're on a posix platform. Hooray! :)
12581    path="$BOOT_JDK"
12582
12583    if test ! -f "$path" && test ! -d "$path"; then
12584      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
12585$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
12586   { (exit 1); exit 1; }; }
12587    fi
12588
12589    has_space=`$ECHO "$path" | $GREP " "`
12590    if test "x$has_space" != x; then
12591      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12592$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12593      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
12594$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
12595   { (exit 1); exit 1; }; }
12596    fi
12597  fi
12598
12599              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
12600$as_echo_n "checking for Boot JDK... " >&6; }
12601              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
12602$as_echo "$BOOT_JDK" >&6; }
12603              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
12604$as_echo_n "checking Boot JDK version... " >&6; }
12605              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12606              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
12607$as_echo "$BOOT_JDK_VERSION" >&6; }
12608            fi # end check jdk version
12609          fi # end check rt.jar
12610        fi # end check javac
12611      fi # end check java
12612    fi # end check boot jdk found
12613  fi
12614
12615    done
12616  fi
12617
12618  fi
12619
12620
12621    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12622    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12623      # Do we have a bin/java?
12624      if test ! -x "$BOOT_JDK/bin/java"; then
12625        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12627        BOOT_JDK_FOUND=no
12628      else
12629        # Do we have a bin/javac?
12630        if test ! -x "$BOOT_JDK/bin/javac"; then
12631          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12633          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12634$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12635          BOOT_JDK_FOUND=no
12636        else
12637          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12638          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12639            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12641            BOOT_JDK_FOUND=no
12642          else
12643            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12644            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12645
12646            # Extra M4 quote needed to protect [] in grep expression.
12647            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12648            if test "x$FOUND_VERSION_78" = x; then
12649              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12651              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12652$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12653              BOOT_JDK_FOUND=no
12654            else
12655              # We're done! :-)
12656              BOOT_JDK_FOUND=yes
12657
12658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12659
12660  # Input might be given as Windows format, start by converting to
12661  # unix format.
12662  path="$BOOT_JDK"
12663  new_path=`$CYGPATH -u "$path"`
12664
12665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12668  # "foo.exe" is OK but "foo" is an error.
12669  #
12670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12671  # It is also a way to make sure we got the proper file name for the real test later on.
12672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12673  if test "x$test_shortpath" = x; then
12674    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12675$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12676    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
12677$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
12678   { (exit 1); exit 1; }; }
12679  fi
12680
12681  # Call helper function which possibly converts this using DOS-style short mode.
12682  # If so, the updated path is stored in $new_path.
12683
12684  input_path="$new_path"
12685  # Check if we need to convert this using DOS-style short mode. If the path
12686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12687  # take no chances and rewrite it.
12688  # Note: m4 eats our [], so we need to use [ and ] instead.
12689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12690  if test "x$has_forbidden_chars" != x; then
12691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12695      # Going to short mode and back again did indeed matter. Since short mode is
12696      # case insensitive, let's make it lowercase to improve readability.
12697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12698      # Now convert it back to Unix-stile (cygpath)
12699      input_path=`$CYGPATH -u "$shortmode_path"`
12700      new_path="$input_path"
12701    fi
12702  fi
12703
12704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12705  if test "x$test_cygdrive_prefix" = x; then
12706    # As a simple fix, exclude /usr/bin since it's not a real path.
12707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12709      # a path prefixed by /cygdrive for fixpath to work.
12710      new_path="$CYGWIN_ROOT_PATH$input_path"
12711    fi
12712  fi
12713
12714
12715  if test "x$path" != "x$new_path"; then
12716    BOOT_JDK="$new_path"
12717    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12718$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12719  fi
12720
12721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12722
12723  path="$BOOT_JDK"
12724  has_colon=`$ECHO $path | $GREP ^.:`
12725  new_path="$path"
12726  if test "x$has_colon" = x; then
12727    # Not in mixed or Windows style, start by that.
12728    new_path=`cmd //c echo $path`
12729  fi
12730
12731
12732  input_path="$new_path"
12733  # Check if we need to convert this using DOS-style short mode. If the path
12734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12735  # take no chances and rewrite it.
12736  # Note: m4 eats our [], so we need to use [ and ] instead.
12737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12738  if test "x$has_forbidden_chars" != x; then
12739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12741  fi
12742
12743
12744  windows_path="$new_path"
12745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12746    unix_path=`$CYGPATH -u "$windows_path"`
12747    new_path="$unix_path"
12748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12750    new_path="$unix_path"
12751  fi
12752
12753  if test "x$path" != "x$new_path"; then
12754    BOOT_JDK="$new_path"
12755    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12756$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12757  fi
12758
12759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12761
12762  else
12763    # We're on a posix platform. Hooray! :)
12764    path="$BOOT_JDK"
12765
12766    if test ! -f "$path" && test ! -d "$path"; then
12767      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
12768$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
12769   { (exit 1); exit 1; }; }
12770    fi
12771
12772    has_space=`$ECHO "$path" | $GREP " "`
12773    if test "x$has_space" != x; then
12774      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12775$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12776      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
12777$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
12778   { (exit 1); exit 1; }; }
12779    fi
12780  fi
12781
12782              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
12783$as_echo_n "checking for Boot JDK... " >&6; }
12784              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
12785$as_echo "$BOOT_JDK" >&6; }
12786              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
12787$as_echo_n "checking Boot JDK version... " >&6; }
12788              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12789              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
12790$as_echo "$BOOT_JDK_VERSION" >&6; }
12791            fi # end check jdk version
12792          fi # end check rt.jar
12793        fi # end check javac
12794      fi # end check java
12795    fi # end check boot jdk found
12796  fi
12797
12798
12799  if test "x$BOOT_JDK_FOUND" = xno; then
12800    # Now execute the test
12801
12802  if test "x$ProgramFiles" != x; then
12803    VIRTUAL_DIR="$ProgramFiles/Java"
12804
12805  windows_path="$VIRTUAL_DIR"
12806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12807    unix_path=`$CYGPATH -u "$windows_path"`
12808    VIRTUAL_DIR="$unix_path"
12809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12811    VIRTUAL_DIR="$unix_path"
12812  fi
12813
12814
12815  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12816  BOOT_JDK_SUFFIX=""
12817  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12818  if test "x$ALL_JDKS_FOUND" != x; then
12819    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12820
12821  if test "x$BOOT_JDK_FOUND" = xno; then
12822    # Now execute the test
12823
12824        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12825        if test -d "$BOOT_JDK"; then
12826          BOOT_JDK_FOUND=maybe
12827          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12828$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12829        fi
12830
12831
12832    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12833    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12834      # Do we have a bin/java?
12835      if test ! -x "$BOOT_JDK/bin/java"; then
12836        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12838        BOOT_JDK_FOUND=no
12839      else
12840        # Do we have a bin/javac?
12841        if test ! -x "$BOOT_JDK/bin/javac"; then
12842          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12843$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12844          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
12845$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12846          BOOT_JDK_FOUND=no
12847        else
12848          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12849          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12850            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12852            BOOT_JDK_FOUND=no
12853          else
12854            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12855            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12856
12857            # Extra M4 quote needed to protect [] in grep expression.
12858            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12859            if test "x$FOUND_VERSION_78" = x; then
12860              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12861$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12862              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
12863$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12864              BOOT_JDK_FOUND=no
12865            else
12866              # We're done! :-)
12867              BOOT_JDK_FOUND=yes
12868
12869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12870
12871  # Input might be given as Windows format, start by converting to
12872  # unix format.
12873  path="$BOOT_JDK"
12874  new_path=`$CYGPATH -u "$path"`
12875
12876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12879  # "foo.exe" is OK but "foo" is an error.
12880  #
12881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12882  # It is also a way to make sure we got the proper file name for the real test later on.
12883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12884  if test "x$test_shortpath" = x; then
12885    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12886$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12887    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
12888$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
12889   { (exit 1); exit 1; }; }
12890  fi
12891
12892  # Call helper function which possibly converts this using DOS-style short mode.
12893  # If so, the updated path is stored in $new_path.
12894
12895  input_path="$new_path"
12896  # Check if we need to convert this using DOS-style short mode. If the path
12897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12898  # take no chances and rewrite it.
12899  # Note: m4 eats our [], so we need to use [ and ] instead.
12900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12901  if test "x$has_forbidden_chars" != x; then
12902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12906      # Going to short mode and back again did indeed matter. Since short mode is
12907      # case insensitive, let's make it lowercase to improve readability.
12908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12909      # Now convert it back to Unix-stile (cygpath)
12910      input_path=`$CYGPATH -u "$shortmode_path"`
12911      new_path="$input_path"
12912    fi
12913  fi
12914
12915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12916  if test "x$test_cygdrive_prefix" = x; then
12917    # As a simple fix, exclude /usr/bin since it's not a real path.
12918    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12920      # a path prefixed by /cygdrive for fixpath to work.
12921      new_path="$CYGWIN_ROOT_PATH$input_path"
12922    fi
12923  fi
12924
12925
12926  if test "x$path" != "x$new_path"; then
12927    BOOT_JDK="$new_path"
12928    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12929$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12930  fi
12931
12932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12933
12934  path="$BOOT_JDK"
12935  has_colon=`$ECHO $path | $GREP ^.:`
12936  new_path="$path"
12937  if test "x$has_colon" = x; then
12938    # Not in mixed or Windows style, start by that.
12939    new_path=`cmd //c echo $path`
12940  fi
12941
12942
12943  input_path="$new_path"
12944  # Check if we need to convert this using DOS-style short mode. If the path
12945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12946  # take no chances and rewrite it.
12947  # Note: m4 eats our [], so we need to use [ and ] instead.
12948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12949  if test "x$has_forbidden_chars" != x; then
12950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12952  fi
12953
12954
12955  windows_path="$new_path"
12956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12957    unix_path=`$CYGPATH -u "$windows_path"`
12958    new_path="$unix_path"
12959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12961    new_path="$unix_path"
12962  fi
12963
12964  if test "x$path" != "x$new_path"; then
12965    BOOT_JDK="$new_path"
12966    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
12967$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12968  fi
12969
12970  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12971  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12972
12973  else
12974    # We're on a posix platform. Hooray! :)
12975    path="$BOOT_JDK"
12976
12977    if test ! -f "$path" && test ! -d "$path"; then
12978      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
12979$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
12980   { (exit 1); exit 1; }; }
12981    fi
12982
12983    has_space=`$ECHO "$path" | $GREP " "`
12984    if test "x$has_space" != x; then
12985      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12986$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12987      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
12988$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
12989   { (exit 1); exit 1; }; }
12990    fi
12991  fi
12992
12993              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
12994$as_echo_n "checking for Boot JDK... " >&6; }
12995              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
12996$as_echo "$BOOT_JDK" >&6; }
12997              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
12998$as_echo_n "checking Boot JDK version... " >&6; }
12999              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13000              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13001$as_echo "$BOOT_JDK_VERSION" >&6; }
13002            fi # end check jdk version
13003          fi # end check rt.jar
13004        fi # end check javac
13005      fi # end check java
13006    fi # end check boot jdk found
13007  fi
13008
13009    done
13010  fi
13011
13012  fi
13013
13014
13015    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13016    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13017      # Do we have a bin/java?
13018      if test ! -x "$BOOT_JDK/bin/java"; then
13019        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13021        BOOT_JDK_FOUND=no
13022      else
13023        # Do we have a bin/javac?
13024        if test ! -x "$BOOT_JDK/bin/javac"; then
13025          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13027          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13028$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13029          BOOT_JDK_FOUND=no
13030        else
13031          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13032          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13033            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13035            BOOT_JDK_FOUND=no
13036          else
13037            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13038            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13039
13040            # Extra M4 quote needed to protect [] in grep expression.
13041            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13042            if test "x$FOUND_VERSION_78" = x; then
13043              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13045              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
13046$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13047              BOOT_JDK_FOUND=no
13048            else
13049              # We're done! :-)
13050              BOOT_JDK_FOUND=yes
13051
13052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13053
13054  # Input might be given as Windows format, start by converting to
13055  # unix format.
13056  path="$BOOT_JDK"
13057  new_path=`$CYGPATH -u "$path"`
13058
13059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13062  # "foo.exe" is OK but "foo" is an error.
13063  #
13064  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13065  # It is also a way to make sure we got the proper file name for the real test later on.
13066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13067  if test "x$test_shortpath" = x; then
13068    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13069$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13070    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13071$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13072   { (exit 1); exit 1; }; }
13073  fi
13074
13075  # Call helper function which possibly converts this using DOS-style short mode.
13076  # If so, the updated path is stored in $new_path.
13077
13078  input_path="$new_path"
13079  # Check if we need to convert this using DOS-style short mode. If the path
13080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13081  # take no chances and rewrite it.
13082  # Note: m4 eats our [], so we need to use [ and ] instead.
13083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13084  if test "x$has_forbidden_chars" != x; then
13085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13089      # Going to short mode and back again did indeed matter. Since short mode is
13090      # case insensitive, let's make it lowercase to improve readability.
13091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13092      # Now convert it back to Unix-stile (cygpath)
13093      input_path=`$CYGPATH -u "$shortmode_path"`
13094      new_path="$input_path"
13095    fi
13096  fi
13097
13098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13099  if test "x$test_cygdrive_prefix" = x; then
13100    # As a simple fix, exclude /usr/bin since it's not a real path.
13101    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13103      # a path prefixed by /cygdrive for fixpath to work.
13104      new_path="$CYGWIN_ROOT_PATH$input_path"
13105    fi
13106  fi
13107
13108
13109  if test "x$path" != "x$new_path"; then
13110    BOOT_JDK="$new_path"
13111    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13113  fi
13114
13115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13116
13117  path="$BOOT_JDK"
13118  has_colon=`$ECHO $path | $GREP ^.:`
13119  new_path="$path"
13120  if test "x$has_colon" = x; then
13121    # Not in mixed or Windows style, start by that.
13122    new_path=`cmd //c echo $path`
13123  fi
13124
13125
13126  input_path="$new_path"
13127  # Check if we need to convert this using DOS-style short mode. If the path
13128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13129  # take no chances and rewrite it.
13130  # Note: m4 eats our [], so we need to use [ and ] instead.
13131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13132  if test "x$has_forbidden_chars" != x; then
13133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13135  fi
13136
13137
13138  windows_path="$new_path"
13139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13140    unix_path=`$CYGPATH -u "$windows_path"`
13141    new_path="$unix_path"
13142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13144    new_path="$unix_path"
13145  fi
13146
13147  if test "x$path" != "x$new_path"; then
13148    BOOT_JDK="$new_path"
13149    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13150$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13151  fi
13152
13153  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13154  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13155
13156  else
13157    # We're on a posix platform. Hooray! :)
13158    path="$BOOT_JDK"
13159
13160    if test ! -f "$path" && test ! -d "$path"; then
13161      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
13162$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
13163   { (exit 1); exit 1; }; }
13164    fi
13165
13166    has_space=`$ECHO "$path" | $GREP " "`
13167    if test "x$has_space" != x; then
13168      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13169$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13170      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
13171$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
13172   { (exit 1); exit 1; }; }
13173    fi
13174  fi
13175
13176              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
13177$as_echo_n "checking for Boot JDK... " >&6; }
13178              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
13179$as_echo "$BOOT_JDK" >&6; }
13180              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
13181$as_echo_n "checking Boot JDK version... " >&6; }
13182              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13183              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13184$as_echo "$BOOT_JDK_VERSION" >&6; }
13185            fi # end check jdk version
13186          fi # end check rt.jar
13187        fi # end check javac
13188      fi # end check java
13189    fi # end check boot jdk found
13190  fi
13191
13192
13193  if test "x$BOOT_JDK_FOUND" = xno; then
13194    # Now execute the test
13195
13196  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13197  BOOT_JDK_SUFFIX=""
13198  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13199  if test "x$ALL_JDKS_FOUND" != x; then
13200    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13201
13202  if test "x$BOOT_JDK_FOUND" = xno; then
13203    # Now execute the test
13204
13205        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13206        if test -d "$BOOT_JDK"; then
13207          BOOT_JDK_FOUND=maybe
13208          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13209$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13210        fi
13211
13212
13213    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13214    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13215      # Do we have a bin/java?
13216      if test ! -x "$BOOT_JDK/bin/java"; then
13217        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13219        BOOT_JDK_FOUND=no
13220      else
13221        # Do we have a bin/javac?
13222        if test ! -x "$BOOT_JDK/bin/javac"; then
13223          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13225          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13226$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13227          BOOT_JDK_FOUND=no
13228        else
13229          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13230          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13231            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13233            BOOT_JDK_FOUND=no
13234          else
13235            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13236            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13237
13238            # Extra M4 quote needed to protect [] in grep expression.
13239            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13240            if test "x$FOUND_VERSION_78" = x; then
13241              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13242$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13243              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
13244$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13245              BOOT_JDK_FOUND=no
13246            else
13247              # We're done! :-)
13248              BOOT_JDK_FOUND=yes
13249
13250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13251
13252  # Input might be given as Windows format, start by converting to
13253  # unix format.
13254  path="$BOOT_JDK"
13255  new_path=`$CYGPATH -u "$path"`
13256
13257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13260  # "foo.exe" is OK but "foo" is an error.
13261  #
13262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13263  # It is also a way to make sure we got the proper file name for the real test later on.
13264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13265  if test "x$test_shortpath" = x; then
13266    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13267$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13268    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13269$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13270   { (exit 1); exit 1; }; }
13271  fi
13272
13273  # Call helper function which possibly converts this using DOS-style short mode.
13274  # If so, the updated path is stored in $new_path.
13275
13276  input_path="$new_path"
13277  # Check if we need to convert this using DOS-style short mode. If the path
13278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13279  # take no chances and rewrite it.
13280  # Note: m4 eats our [], so we need to use [ and ] instead.
13281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13282  if test "x$has_forbidden_chars" != x; then
13283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13287      # Going to short mode and back again did indeed matter. Since short mode is
13288      # case insensitive, let's make it lowercase to improve readability.
13289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13290      # Now convert it back to Unix-stile (cygpath)
13291      input_path=`$CYGPATH -u "$shortmode_path"`
13292      new_path="$input_path"
13293    fi
13294  fi
13295
13296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13297  if test "x$test_cygdrive_prefix" = x; then
13298    # As a simple fix, exclude /usr/bin since it's not a real path.
13299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13301      # a path prefixed by /cygdrive for fixpath to work.
13302      new_path="$CYGWIN_ROOT_PATH$input_path"
13303    fi
13304  fi
13305
13306
13307  if test "x$path" != "x$new_path"; then
13308    BOOT_JDK="$new_path"
13309    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13311  fi
13312
13313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13314
13315  path="$BOOT_JDK"
13316  has_colon=`$ECHO $path | $GREP ^.:`
13317  new_path="$path"
13318  if test "x$has_colon" = x; then
13319    # Not in mixed or Windows style, start by that.
13320    new_path=`cmd //c echo $path`
13321  fi
13322
13323
13324  input_path="$new_path"
13325  # Check if we need to convert this using DOS-style short mode. If the path
13326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13327  # take no chances and rewrite it.
13328  # Note: m4 eats our [], so we need to use [ and ] instead.
13329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13330  if test "x$has_forbidden_chars" != x; then
13331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13333  fi
13334
13335
13336  windows_path="$new_path"
13337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13338    unix_path=`$CYGPATH -u "$windows_path"`
13339    new_path="$unix_path"
13340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13342    new_path="$unix_path"
13343  fi
13344
13345  if test "x$path" != "x$new_path"; then
13346    BOOT_JDK="$new_path"
13347    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13348$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13349  fi
13350
13351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13353
13354  else
13355    # We're on a posix platform. Hooray! :)
13356    path="$BOOT_JDK"
13357
13358    if test ! -f "$path" && test ! -d "$path"; then
13359      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
13360$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
13361   { (exit 1); exit 1; }; }
13362    fi
13363
13364    has_space=`$ECHO "$path" | $GREP " "`
13365    if test "x$has_space" != x; then
13366      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13367$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13368      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
13369$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
13370   { (exit 1); exit 1; }; }
13371    fi
13372  fi
13373
13374              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
13375$as_echo_n "checking for Boot JDK... " >&6; }
13376              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
13377$as_echo "$BOOT_JDK" >&6; }
13378              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
13379$as_echo_n "checking Boot JDK version... " >&6; }
13380              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13381              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13382$as_echo "$BOOT_JDK_VERSION" >&6; }
13383            fi # end check jdk version
13384          fi # end check rt.jar
13385        fi # end check javac
13386      fi # end check java
13387    fi # end check boot jdk found
13388  fi
13389
13390    done
13391  fi
13392
13393
13394    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13395    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13396      # Do we have a bin/java?
13397      if test ! -x "$BOOT_JDK/bin/java"; then
13398        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13400        BOOT_JDK_FOUND=no
13401      else
13402        # Do we have a bin/javac?
13403        if test ! -x "$BOOT_JDK/bin/javac"; then
13404          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13406          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13407$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13408          BOOT_JDK_FOUND=no
13409        else
13410          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13411          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13412            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13414            BOOT_JDK_FOUND=no
13415          else
13416            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13417            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13418
13419            # Extra M4 quote needed to protect [] in grep expression.
13420            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13421            if test "x$FOUND_VERSION_78" = x; then
13422              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13424              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
13425$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13426              BOOT_JDK_FOUND=no
13427            else
13428              # We're done! :-)
13429              BOOT_JDK_FOUND=yes
13430
13431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13432
13433  # Input might be given as Windows format, start by converting to
13434  # unix format.
13435  path="$BOOT_JDK"
13436  new_path=`$CYGPATH -u "$path"`
13437
13438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13441  # "foo.exe" is OK but "foo" is an error.
13442  #
13443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13444  # It is also a way to make sure we got the proper file name for the real test later on.
13445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13446  if test "x$test_shortpath" = x; then
13447    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13448$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13449    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13450$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13451   { (exit 1); exit 1; }; }
13452  fi
13453
13454  # Call helper function which possibly converts this using DOS-style short mode.
13455  # If so, the updated path is stored in $new_path.
13456
13457  input_path="$new_path"
13458  # Check if we need to convert this using DOS-style short mode. If the path
13459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13460  # take no chances and rewrite it.
13461  # Note: m4 eats our [], so we need to use [ and ] instead.
13462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13463  if test "x$has_forbidden_chars" != x; then
13464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13468      # Going to short mode and back again did indeed matter. Since short mode is
13469      # case insensitive, let's make it lowercase to improve readability.
13470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13471      # Now convert it back to Unix-stile (cygpath)
13472      input_path=`$CYGPATH -u "$shortmode_path"`
13473      new_path="$input_path"
13474    fi
13475  fi
13476
13477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13478  if test "x$test_cygdrive_prefix" = x; then
13479    # As a simple fix, exclude /usr/bin since it's not a real path.
13480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13482      # a path prefixed by /cygdrive for fixpath to work.
13483      new_path="$CYGWIN_ROOT_PATH$input_path"
13484    fi
13485  fi
13486
13487
13488  if test "x$path" != "x$new_path"; then
13489    BOOT_JDK="$new_path"
13490    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13492  fi
13493
13494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13495
13496  path="$BOOT_JDK"
13497  has_colon=`$ECHO $path | $GREP ^.:`
13498  new_path="$path"
13499  if test "x$has_colon" = x; then
13500    # Not in mixed or Windows style, start by that.
13501    new_path=`cmd //c echo $path`
13502  fi
13503
13504
13505  input_path="$new_path"
13506  # Check if we need to convert this using DOS-style short mode. If the path
13507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13508  # take no chances and rewrite it.
13509  # Note: m4 eats our [], so we need to use [ and ] instead.
13510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13511  if test "x$has_forbidden_chars" != x; then
13512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13514  fi
13515
13516
13517  windows_path="$new_path"
13518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13519    unix_path=`$CYGPATH -u "$windows_path"`
13520    new_path="$unix_path"
13521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13523    new_path="$unix_path"
13524  fi
13525
13526  if test "x$path" != "x$new_path"; then
13527    BOOT_JDK="$new_path"
13528    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13529$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13530  fi
13531
13532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13534
13535  else
13536    # We're on a posix platform. Hooray! :)
13537    path="$BOOT_JDK"
13538
13539    if test ! -f "$path" && test ! -d "$path"; then
13540      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
13541$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
13542   { (exit 1); exit 1; }; }
13543    fi
13544
13545    has_space=`$ECHO "$path" | $GREP " "`
13546    if test "x$has_space" != x; then
13547      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13548$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13549      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
13550$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
13551   { (exit 1); exit 1; }; }
13552    fi
13553  fi
13554
13555              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
13556$as_echo_n "checking for Boot JDK... " >&6; }
13557              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
13558$as_echo "$BOOT_JDK" >&6; }
13559              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
13560$as_echo_n "checking Boot JDK version... " >&6; }
13561              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13562              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13563$as_echo "$BOOT_JDK_VERSION" >&6; }
13564            fi # end check jdk version
13565          fi # end check rt.jar
13566        fi # end check javac
13567      fi # end check java
13568    fi # end check boot jdk found
13569  fi
13570
13571  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
13572
13573  if test "x$BOOT_JDK_FOUND" = xno; then
13574    # Now execute the test
13575
13576  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
13577  BOOT_JDK_SUFFIX="/Contents/Home"
13578  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13579  if test "x$ALL_JDKS_FOUND" != x; then
13580    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13581
13582  if test "x$BOOT_JDK_FOUND" = xno; then
13583    # Now execute the test
13584
13585        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13586        if test -d "$BOOT_JDK"; then
13587          BOOT_JDK_FOUND=maybe
13588          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13589$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13590        fi
13591
13592
13593    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13594    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13595      # Do we have a bin/java?
13596      if test ! -x "$BOOT_JDK/bin/java"; then
13597        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13599        BOOT_JDK_FOUND=no
13600      else
13601        # Do we have a bin/javac?
13602        if test ! -x "$BOOT_JDK/bin/javac"; then
13603          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13605          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13606$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13607          BOOT_JDK_FOUND=no
13608        else
13609          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13610          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13611            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13613            BOOT_JDK_FOUND=no
13614          else
13615            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13616            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13617
13618            # Extra M4 quote needed to protect [] in grep expression.
13619            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13620            if test "x$FOUND_VERSION_78" = x; then
13621              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13623              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
13624$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13625              BOOT_JDK_FOUND=no
13626            else
13627              # We're done! :-)
13628              BOOT_JDK_FOUND=yes
13629
13630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13631
13632  # Input might be given as Windows format, start by converting to
13633  # unix format.
13634  path="$BOOT_JDK"
13635  new_path=`$CYGPATH -u "$path"`
13636
13637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13640  # "foo.exe" is OK but "foo" is an error.
13641  #
13642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13643  # It is also a way to make sure we got the proper file name for the real test later on.
13644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13645  if test "x$test_shortpath" = x; then
13646    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13647$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13648    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13649$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13650   { (exit 1); exit 1; }; }
13651  fi
13652
13653  # Call helper function which possibly converts this using DOS-style short mode.
13654  # If so, the updated path is stored in $new_path.
13655
13656  input_path="$new_path"
13657  # Check if we need to convert this using DOS-style short mode. If the path
13658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13659  # take no chances and rewrite it.
13660  # Note: m4 eats our [], so we need to use [ and ] instead.
13661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13662  if test "x$has_forbidden_chars" != x; then
13663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13667      # Going to short mode and back again did indeed matter. Since short mode is
13668      # case insensitive, let's make it lowercase to improve readability.
13669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13670      # Now convert it back to Unix-stile (cygpath)
13671      input_path=`$CYGPATH -u "$shortmode_path"`
13672      new_path="$input_path"
13673    fi
13674  fi
13675
13676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13677  if test "x$test_cygdrive_prefix" = x; then
13678    # As a simple fix, exclude /usr/bin since it's not a real path.
13679    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13681      # a path prefixed by /cygdrive for fixpath to work.
13682      new_path="$CYGWIN_ROOT_PATH$input_path"
13683    fi
13684  fi
13685
13686
13687  if test "x$path" != "x$new_path"; then
13688    BOOT_JDK="$new_path"
13689    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13690$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13691  fi
13692
13693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13694
13695  path="$BOOT_JDK"
13696  has_colon=`$ECHO $path | $GREP ^.:`
13697  new_path="$path"
13698  if test "x$has_colon" = x; then
13699    # Not in mixed or Windows style, start by that.
13700    new_path=`cmd //c echo $path`
13701  fi
13702
13703
13704  input_path="$new_path"
13705  # Check if we need to convert this using DOS-style short mode. If the path
13706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13707  # take no chances and rewrite it.
13708  # Note: m4 eats our [], so we need to use [ and ] instead.
13709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13710  if test "x$has_forbidden_chars" != x; then
13711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13712    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13713  fi
13714
13715
13716  windows_path="$new_path"
13717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13718    unix_path=`$CYGPATH -u "$windows_path"`
13719    new_path="$unix_path"
13720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13722    new_path="$unix_path"
13723  fi
13724
13725  if test "x$path" != "x$new_path"; then
13726    BOOT_JDK="$new_path"
13727    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13728$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13729  fi
13730
13731  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13732  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13733
13734  else
13735    # We're on a posix platform. Hooray! :)
13736    path="$BOOT_JDK"
13737
13738    if test ! -f "$path" && test ! -d "$path"; then
13739      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
13740$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
13741   { (exit 1); exit 1; }; }
13742    fi
13743
13744    has_space=`$ECHO "$path" | $GREP " "`
13745    if test "x$has_space" != x; then
13746      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13747$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13748      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
13749$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
13750   { (exit 1); exit 1; }; }
13751    fi
13752  fi
13753
13754              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
13755$as_echo_n "checking for Boot JDK... " >&6; }
13756              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
13757$as_echo "$BOOT_JDK" >&6; }
13758              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
13759$as_echo_n "checking Boot JDK version... " >&6; }
13760              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13761              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13762$as_echo "$BOOT_JDK_VERSION" >&6; }
13763            fi # end check jdk version
13764          fi # end check rt.jar
13765        fi # end check javac
13766      fi # end check java
13767    fi # end check boot jdk found
13768  fi
13769
13770    done
13771  fi
13772
13773
13774    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13775    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13776      # Do we have a bin/java?
13777      if test ! -x "$BOOT_JDK/bin/java"; then
13778        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13780        BOOT_JDK_FOUND=no
13781      else
13782        # Do we have a bin/javac?
13783        if test ! -x "$BOOT_JDK/bin/javac"; then
13784          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13786          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13787$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13788          BOOT_JDK_FOUND=no
13789        else
13790          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13791          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13792            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13794            BOOT_JDK_FOUND=no
13795          else
13796            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13797            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13798
13799            # Extra M4 quote needed to protect [] in grep expression.
13800            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13801            if test "x$FOUND_VERSION_78" = x; then
13802              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13804              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
13805$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13806              BOOT_JDK_FOUND=no
13807            else
13808              # We're done! :-)
13809              BOOT_JDK_FOUND=yes
13810
13811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13812
13813  # Input might be given as Windows format, start by converting to
13814  # unix format.
13815  path="$BOOT_JDK"
13816  new_path=`$CYGPATH -u "$path"`
13817
13818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13821  # "foo.exe" is OK but "foo" is an error.
13822  #
13823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13824  # It is also a way to make sure we got the proper file name for the real test later on.
13825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13826  if test "x$test_shortpath" = x; then
13827    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13829    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
13830$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
13831   { (exit 1); exit 1; }; }
13832  fi
13833
13834  # Call helper function which possibly converts this using DOS-style short mode.
13835  # If so, the updated path is stored in $new_path.
13836
13837  input_path="$new_path"
13838  # Check if we need to convert this using DOS-style short mode. If the path
13839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13840  # take no chances and rewrite it.
13841  # Note: m4 eats our [], so we need to use [ and ] instead.
13842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13843  if test "x$has_forbidden_chars" != x; then
13844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13848      # Going to short mode and back again did indeed matter. Since short mode is
13849      # case insensitive, let's make it lowercase to improve readability.
13850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13851      # Now convert it back to Unix-stile (cygpath)
13852      input_path=`$CYGPATH -u "$shortmode_path"`
13853      new_path="$input_path"
13854    fi
13855  fi
13856
13857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13858  if test "x$test_cygdrive_prefix" = x; then
13859    # As a simple fix, exclude /usr/bin since it's not a real path.
13860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13862      # a path prefixed by /cygdrive for fixpath to work.
13863      new_path="$CYGWIN_ROOT_PATH$input_path"
13864    fi
13865  fi
13866
13867
13868  if test "x$path" != "x$new_path"; then
13869    BOOT_JDK="$new_path"
13870    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13872  fi
13873
13874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13875
13876  path="$BOOT_JDK"
13877  has_colon=`$ECHO $path | $GREP ^.:`
13878  new_path="$path"
13879  if test "x$has_colon" = x; then
13880    # Not in mixed or Windows style, start by that.
13881    new_path=`cmd //c echo $path`
13882  fi
13883
13884
13885  input_path="$new_path"
13886  # Check if we need to convert this using DOS-style short mode. If the path
13887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13888  # take no chances and rewrite it.
13889  # Note: m4 eats our [], so we need to use [ and ] instead.
13890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13891  if test "x$has_forbidden_chars" != x; then
13892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13894  fi
13895
13896
13897  windows_path="$new_path"
13898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13899    unix_path=`$CYGPATH -u "$windows_path"`
13900    new_path="$unix_path"
13901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13903    new_path="$unix_path"
13904  fi
13905
13906  if test "x$path" != "x$new_path"; then
13907    BOOT_JDK="$new_path"
13908    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
13909$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13910  fi
13911
13912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13914
13915  else
13916    # We're on a posix platform. Hooray! :)
13917    path="$BOOT_JDK"
13918
13919    if test ! -f "$path" && test ! -d "$path"; then
13920      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
13921$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
13922   { (exit 1); exit 1; }; }
13923    fi
13924
13925    has_space=`$ECHO "$path" | $GREP " "`
13926    if test "x$has_space" != x; then
13927      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13929      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
13930$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
13931   { (exit 1); exit 1; }; }
13932    fi
13933  fi
13934
13935              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
13936$as_echo_n "checking for Boot JDK... " >&6; }
13937              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
13938$as_echo "$BOOT_JDK" >&6; }
13939              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
13940$as_echo_n "checking Boot JDK version... " >&6; }
13941              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13942              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
13943$as_echo "$BOOT_JDK_VERSION" >&6; }
13944            fi # end check jdk version
13945          fi # end check rt.jar
13946        fi # end check javac
13947      fi # end check java
13948    fi # end check boot jdk found
13949  fi
13950
13951
13952  if test "x$BOOT_JDK_FOUND" = xno; then
13953    # Now execute the test
13954
13955  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
13956  BOOT_JDK_SUFFIX="/Contents/Home"
13957  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13958  if test "x$ALL_JDKS_FOUND" != x; then
13959    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13960
13961  if test "x$BOOT_JDK_FOUND" = xno; then
13962    # Now execute the test
13963
13964        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13965        if test -d "$BOOT_JDK"; then
13966          BOOT_JDK_FOUND=maybe
13967          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13968$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13969        fi
13970
13971
13972    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13973    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13974      # Do we have a bin/java?
13975      if test ! -x "$BOOT_JDK/bin/java"; then
13976        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13978        BOOT_JDK_FOUND=no
13979      else
13980        # Do we have a bin/javac?
13981        if test ! -x "$BOOT_JDK/bin/javac"; then
13982          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13984          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
13985$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13986          BOOT_JDK_FOUND=no
13987        else
13988          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13989          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13990            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13992            BOOT_JDK_FOUND=no
13993          else
13994            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13995            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13996
13997            # Extra M4 quote needed to protect [] in grep expression.
13998            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13999            if test "x$FOUND_VERSION_78" = x; then
14000              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14002              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
14003$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14004              BOOT_JDK_FOUND=no
14005            else
14006              # We're done! :-)
14007              BOOT_JDK_FOUND=yes
14008
14009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14010
14011  # Input might be given as Windows format, start by converting to
14012  # unix format.
14013  path="$BOOT_JDK"
14014  new_path=`$CYGPATH -u "$path"`
14015
14016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14019  # "foo.exe" is OK but "foo" is an error.
14020  #
14021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14022  # It is also a way to make sure we got the proper file name for the real test later on.
14023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14024  if test "x$test_shortpath" = x; then
14025    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14026$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14027    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
14028$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
14029   { (exit 1); exit 1; }; }
14030  fi
14031
14032  # Call helper function which possibly converts this using DOS-style short mode.
14033  # If so, the updated path is stored in $new_path.
14034
14035  input_path="$new_path"
14036  # Check if we need to convert this using DOS-style short mode. If the path
14037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14038  # take no chances and rewrite it.
14039  # Note: m4 eats our [], so we need to use [ and ] instead.
14040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14041  if test "x$has_forbidden_chars" != x; then
14042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14046      # Going to short mode and back again did indeed matter. Since short mode is
14047      # case insensitive, let's make it lowercase to improve readability.
14048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14049      # Now convert it back to Unix-stile (cygpath)
14050      input_path=`$CYGPATH -u "$shortmode_path"`
14051      new_path="$input_path"
14052    fi
14053  fi
14054
14055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14056  if test "x$test_cygdrive_prefix" = x; then
14057    # As a simple fix, exclude /usr/bin since it's not a real path.
14058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14060      # a path prefixed by /cygdrive for fixpath to work.
14061      new_path="$CYGWIN_ROOT_PATH$input_path"
14062    fi
14063  fi
14064
14065
14066  if test "x$path" != "x$new_path"; then
14067    BOOT_JDK="$new_path"
14068    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14069$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14070  fi
14071
14072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14073
14074  path="$BOOT_JDK"
14075  has_colon=`$ECHO $path | $GREP ^.:`
14076  new_path="$path"
14077  if test "x$has_colon" = x; then
14078    # Not in mixed or Windows style, start by that.
14079    new_path=`cmd //c echo $path`
14080  fi
14081
14082
14083  input_path="$new_path"
14084  # Check if we need to convert this using DOS-style short mode. If the path
14085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14086  # take no chances and rewrite it.
14087  # Note: m4 eats our [], so we need to use [ and ] instead.
14088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14089  if test "x$has_forbidden_chars" != x; then
14090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14092  fi
14093
14094
14095  windows_path="$new_path"
14096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14097    unix_path=`$CYGPATH -u "$windows_path"`
14098    new_path="$unix_path"
14099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14101    new_path="$unix_path"
14102  fi
14103
14104  if test "x$path" != "x$new_path"; then
14105    BOOT_JDK="$new_path"
14106    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14107$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14108  fi
14109
14110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14112
14113  else
14114    # We're on a posix platform. Hooray! :)
14115    path="$BOOT_JDK"
14116
14117    if test ! -f "$path" && test ! -d "$path"; then
14118      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
14119$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
14120   { (exit 1); exit 1; }; }
14121    fi
14122
14123    has_space=`$ECHO "$path" | $GREP " "`
14124    if test "x$has_space" != x; then
14125      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14126$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14127      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
14128$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
14129   { (exit 1); exit 1; }; }
14130    fi
14131  fi
14132
14133              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
14134$as_echo_n "checking for Boot JDK... " >&6; }
14135              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
14136$as_echo "$BOOT_JDK" >&6; }
14137              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
14138$as_echo_n "checking Boot JDK version... " >&6; }
14139              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14140              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
14141$as_echo "$BOOT_JDK_VERSION" >&6; }
14142            fi # end check jdk version
14143          fi # end check rt.jar
14144        fi # end check javac
14145      fi # end check java
14146    fi # end check boot jdk found
14147  fi
14148
14149    done
14150  fi
14151
14152
14153    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14154    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14155      # Do we have a bin/java?
14156      if test ! -x "$BOOT_JDK/bin/java"; then
14157        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14159        BOOT_JDK_FOUND=no
14160      else
14161        # Do we have a bin/javac?
14162        if test ! -x "$BOOT_JDK/bin/javac"; then
14163          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14165          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
14166$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14167          BOOT_JDK_FOUND=no
14168        else
14169          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14170          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14171            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14173            BOOT_JDK_FOUND=no
14174          else
14175            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14176            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14177
14178            # Extra M4 quote needed to protect [] in grep expression.
14179            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14180            if test "x$FOUND_VERSION_78" = x; then
14181              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14183              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
14184$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14185              BOOT_JDK_FOUND=no
14186            else
14187              # We're done! :-)
14188              BOOT_JDK_FOUND=yes
14189
14190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14191
14192  # Input might be given as Windows format, start by converting to
14193  # unix format.
14194  path="$BOOT_JDK"
14195  new_path=`$CYGPATH -u "$path"`
14196
14197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14200  # "foo.exe" is OK but "foo" is an error.
14201  #
14202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14203  # It is also a way to make sure we got the proper file name for the real test later on.
14204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14205  if test "x$test_shortpath" = x; then
14206    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14207$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14208    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
14209$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
14210   { (exit 1); exit 1; }; }
14211  fi
14212
14213  # Call helper function which possibly converts this using DOS-style short mode.
14214  # If so, the updated path is stored in $new_path.
14215
14216  input_path="$new_path"
14217  # Check if we need to convert this using DOS-style short mode. If the path
14218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14219  # take no chances and rewrite it.
14220  # Note: m4 eats our [], so we need to use [ and ] instead.
14221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14222  if test "x$has_forbidden_chars" != x; then
14223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14227      # Going to short mode and back again did indeed matter. Since short mode is
14228      # case insensitive, let's make it lowercase to improve readability.
14229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14230      # Now convert it back to Unix-stile (cygpath)
14231      input_path=`$CYGPATH -u "$shortmode_path"`
14232      new_path="$input_path"
14233    fi
14234  fi
14235
14236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14237  if test "x$test_cygdrive_prefix" = x; then
14238    # As a simple fix, exclude /usr/bin since it's not a real path.
14239    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14241      # a path prefixed by /cygdrive for fixpath to work.
14242      new_path="$CYGWIN_ROOT_PATH$input_path"
14243    fi
14244  fi
14245
14246
14247  if test "x$path" != "x$new_path"; then
14248    BOOT_JDK="$new_path"
14249    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14250$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14251  fi
14252
14253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14254
14255  path="$BOOT_JDK"
14256  has_colon=`$ECHO $path | $GREP ^.:`
14257  new_path="$path"
14258  if test "x$has_colon" = x; then
14259    # Not in mixed or Windows style, start by that.
14260    new_path=`cmd //c echo $path`
14261  fi
14262
14263
14264  input_path="$new_path"
14265  # Check if we need to convert this using DOS-style short mode. If the path
14266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14267  # take no chances and rewrite it.
14268  # Note: m4 eats our [], so we need to use [ and ] instead.
14269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14270  if test "x$has_forbidden_chars" != x; then
14271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14273  fi
14274
14275
14276  windows_path="$new_path"
14277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14278    unix_path=`$CYGPATH -u "$windows_path"`
14279    new_path="$unix_path"
14280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14282    new_path="$unix_path"
14283  fi
14284
14285  if test "x$path" != "x$new_path"; then
14286    BOOT_JDK="$new_path"
14287    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14288$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14289  fi
14290
14291  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14292  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14293
14294  else
14295    # We're on a posix platform. Hooray! :)
14296    path="$BOOT_JDK"
14297
14298    if test ! -f "$path" && test ! -d "$path"; then
14299      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
14300$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
14301   { (exit 1); exit 1; }; }
14302    fi
14303
14304    has_space=`$ECHO "$path" | $GREP " "`
14305    if test "x$has_space" != x; then
14306      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14308      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
14309$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
14310   { (exit 1); exit 1; }; }
14311    fi
14312  fi
14313
14314              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
14315$as_echo_n "checking for Boot JDK... " >&6; }
14316              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
14317$as_echo "$BOOT_JDK" >&6; }
14318              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
14319$as_echo_n "checking Boot JDK version... " >&6; }
14320              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14321              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
14322$as_echo "$BOOT_JDK_VERSION" >&6; }
14323            fi # end check jdk version
14324          fi # end check rt.jar
14325        fi # end check javac
14326      fi # end check java
14327    fi # end check boot jdk found
14328  fi
14329
14330  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14331
14332  if test "x$BOOT_JDK_FOUND" = xno; then
14333    # Now execute the test
14334
14335  BOOT_JDK_PREFIX="/usr/lib/jvm"
14336  BOOT_JDK_SUFFIX=""
14337  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14338  if test "x$ALL_JDKS_FOUND" != x; then
14339    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14340
14341  if test "x$BOOT_JDK_FOUND" = xno; then
14342    # Now execute the test
14343
14344        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14345        if test -d "$BOOT_JDK"; then
14346          BOOT_JDK_FOUND=maybe
14347          { $as_echo "$as_me:$LINENO: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14348$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14349        fi
14350
14351
14352    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14353    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14354      # Do we have a bin/java?
14355      if test ! -x "$BOOT_JDK/bin/java"; then
14356        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14358        BOOT_JDK_FOUND=no
14359      else
14360        # Do we have a bin/javac?
14361        if test ! -x "$BOOT_JDK/bin/javac"; then
14362          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14363$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14364          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
14365$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14366          BOOT_JDK_FOUND=no
14367        else
14368          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14369          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14370            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14372            BOOT_JDK_FOUND=no
14373          else
14374            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14375            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14376
14377            # Extra M4 quote needed to protect [] in grep expression.
14378            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14379            if test "x$FOUND_VERSION_78" = x; then
14380              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14381$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14382              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
14383$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14384              BOOT_JDK_FOUND=no
14385            else
14386              # We're done! :-)
14387              BOOT_JDK_FOUND=yes
14388
14389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14390
14391  # Input might be given as Windows format, start by converting to
14392  # unix format.
14393  path="$BOOT_JDK"
14394  new_path=`$CYGPATH -u "$path"`
14395
14396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14399  # "foo.exe" is OK but "foo" is an error.
14400  #
14401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14402  # It is also a way to make sure we got the proper file name for the real test later on.
14403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14404  if test "x$test_shortpath" = x; then
14405    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14406$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14407    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
14408$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
14409   { (exit 1); exit 1; }; }
14410  fi
14411
14412  # Call helper function which possibly converts this using DOS-style short mode.
14413  # If so, the updated path is stored in $new_path.
14414
14415  input_path="$new_path"
14416  # Check if we need to convert this using DOS-style short mode. If the path
14417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14418  # take no chances and rewrite it.
14419  # Note: m4 eats our [], so we need to use [ and ] instead.
14420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14421  if test "x$has_forbidden_chars" != x; then
14422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14426      # Going to short mode and back again did indeed matter. Since short mode is
14427      # case insensitive, let's make it lowercase to improve readability.
14428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14429      # Now convert it back to Unix-stile (cygpath)
14430      input_path=`$CYGPATH -u "$shortmode_path"`
14431      new_path="$input_path"
14432    fi
14433  fi
14434
14435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14436  if test "x$test_cygdrive_prefix" = x; then
14437    # As a simple fix, exclude /usr/bin since it's not a real path.
14438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14440      # a path prefixed by /cygdrive for fixpath to work.
14441      new_path="$CYGWIN_ROOT_PATH$input_path"
14442    fi
14443  fi
14444
14445
14446  if test "x$path" != "x$new_path"; then
14447    BOOT_JDK="$new_path"
14448    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14450  fi
14451
14452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14453
14454  path="$BOOT_JDK"
14455  has_colon=`$ECHO $path | $GREP ^.:`
14456  new_path="$path"
14457  if test "x$has_colon" = x; then
14458    # Not in mixed or Windows style, start by that.
14459    new_path=`cmd //c echo $path`
14460  fi
14461
14462
14463  input_path="$new_path"
14464  # Check if we need to convert this using DOS-style short mode. If the path
14465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14466  # take no chances and rewrite it.
14467  # Note: m4 eats our [], so we need to use [ and ] instead.
14468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14469  if test "x$has_forbidden_chars" != x; then
14470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14472  fi
14473
14474
14475  windows_path="$new_path"
14476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14477    unix_path=`$CYGPATH -u "$windows_path"`
14478    new_path="$unix_path"
14479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14481    new_path="$unix_path"
14482  fi
14483
14484  if test "x$path" != "x$new_path"; then
14485    BOOT_JDK="$new_path"
14486    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14487$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14488  fi
14489
14490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14492
14493  else
14494    # We're on a posix platform. Hooray! :)
14495    path="$BOOT_JDK"
14496
14497    if test ! -f "$path" && test ! -d "$path"; then
14498      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
14499$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
14500   { (exit 1); exit 1; }; }
14501    fi
14502
14503    has_space=`$ECHO "$path" | $GREP " "`
14504    if test "x$has_space" != x; then
14505      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14506$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14507      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
14508$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
14509   { (exit 1); exit 1; }; }
14510    fi
14511  fi
14512
14513              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
14514$as_echo_n "checking for Boot JDK... " >&6; }
14515              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
14516$as_echo "$BOOT_JDK" >&6; }
14517              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
14518$as_echo_n "checking Boot JDK version... " >&6; }
14519              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14520              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
14521$as_echo "$BOOT_JDK_VERSION" >&6; }
14522            fi # end check jdk version
14523          fi # end check rt.jar
14524        fi # end check javac
14525      fi # end check java
14526    fi # end check boot jdk found
14527  fi
14528
14529    done
14530  fi
14531
14532
14533    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14534    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14535      # Do we have a bin/java?
14536      if test ! -x "$BOOT_JDK/bin/java"; then
14537        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14538$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14539        BOOT_JDK_FOUND=no
14540      else
14541        # Do we have a bin/javac?
14542        if test ! -x "$BOOT_JDK/bin/javac"; then
14543          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14544$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14545          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
14546$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14547          BOOT_JDK_FOUND=no
14548        else
14549          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14550          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14551            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14553            BOOT_JDK_FOUND=no
14554          else
14555            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14556            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14557
14558            # Extra M4 quote needed to protect [] in grep expression.
14559            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14560            if test "x$FOUND_VERSION_78" = x; then
14561              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14563              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
14564$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14565              BOOT_JDK_FOUND=no
14566            else
14567              # We're done! :-)
14568              BOOT_JDK_FOUND=yes
14569
14570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14571
14572  # Input might be given as Windows format, start by converting to
14573  # unix format.
14574  path="$BOOT_JDK"
14575  new_path=`$CYGPATH -u "$path"`
14576
14577  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14578  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14579  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14580  # "foo.exe" is OK but "foo" is an error.
14581  #
14582  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14583  # It is also a way to make sure we got the proper file name for the real test later on.
14584  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14585  if test "x$test_shortpath" = x; then
14586    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14587$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14588    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
14589$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
14590   { (exit 1); exit 1; }; }
14591  fi
14592
14593  # Call helper function which possibly converts this using DOS-style short mode.
14594  # If so, the updated path is stored in $new_path.
14595
14596  input_path="$new_path"
14597  # Check if we need to convert this using DOS-style short mode. If the path
14598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14599  # take no chances and rewrite it.
14600  # Note: m4 eats our [], so we need to use [ and ] instead.
14601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14602  if test "x$has_forbidden_chars" != x; then
14603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14607      # Going to short mode and back again did indeed matter. Since short mode is
14608      # case insensitive, let's make it lowercase to improve readability.
14609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14610      # Now convert it back to Unix-stile (cygpath)
14611      input_path=`$CYGPATH -u "$shortmode_path"`
14612      new_path="$input_path"
14613    fi
14614  fi
14615
14616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14617  if test "x$test_cygdrive_prefix" = x; then
14618    # As a simple fix, exclude /usr/bin since it's not a real path.
14619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14621      # a path prefixed by /cygdrive for fixpath to work.
14622      new_path="$CYGWIN_ROOT_PATH$input_path"
14623    fi
14624  fi
14625
14626
14627  if test "x$path" != "x$new_path"; then
14628    BOOT_JDK="$new_path"
14629    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14630$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14631  fi
14632
14633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14634
14635  path="$BOOT_JDK"
14636  has_colon=`$ECHO $path | $GREP ^.:`
14637  new_path="$path"
14638  if test "x$has_colon" = x; then
14639    # Not in mixed or Windows style, start by that.
14640    new_path=`cmd //c echo $path`
14641  fi
14642
14643
14644  input_path="$new_path"
14645  # Check if we need to convert this using DOS-style short mode. If the path
14646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14647  # take no chances and rewrite it.
14648  # Note: m4 eats our [], so we need to use [ and ] instead.
14649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14650  if test "x$has_forbidden_chars" != x; then
14651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14653  fi
14654
14655
14656  windows_path="$new_path"
14657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14658    unix_path=`$CYGPATH -u "$windows_path"`
14659    new_path="$unix_path"
14660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14662    new_path="$unix_path"
14663  fi
14664
14665  if test "x$path" != "x$new_path"; then
14666    BOOT_JDK="$new_path"
14667    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14668$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14669  fi
14670
14671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14673
14674  else
14675    # We're on a posix platform. Hooray! :)
14676    path="$BOOT_JDK"
14677
14678    if test ! -f "$path" && test ! -d "$path"; then
14679      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
14680$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
14681   { (exit 1); exit 1; }; }
14682    fi
14683
14684    has_space=`$ECHO "$path" | $GREP " "`
14685    if test "x$has_space" != x; then
14686      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14687$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14688      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
14689$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
14690   { (exit 1); exit 1; }; }
14691    fi
14692  fi
14693
14694              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
14695$as_echo_n "checking for Boot JDK... " >&6; }
14696              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
14697$as_echo "$BOOT_JDK" >&6; }
14698              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
14699$as_echo_n "checking Boot JDK version... " >&6; }
14700              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14701              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
14702$as_echo "$BOOT_JDK_VERSION" >&6; }
14703            fi # end check jdk version
14704          fi # end check rt.jar
14705        fi # end check javac
14706      fi # end check java
14707    fi # end check boot jdk found
14708  fi
14709
14710  fi
14711
14712
14713    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14714    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14715      # Do we have a bin/java?
14716      if test ! -x "$BOOT_JDK/bin/java"; then
14717        { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14719        BOOT_JDK_FOUND=no
14720      else
14721        # Do we have a bin/javac?
14722        if test ! -x "$BOOT_JDK/bin/javac"; then
14723          { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14724$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14725          { $as_echo "$as_me:$LINENO: (This might be an JRE instead of an JDK)" >&5
14726$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14727          BOOT_JDK_FOUND=no
14728        else
14729          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14730          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14731            { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14733            BOOT_JDK_FOUND=no
14734          else
14735            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14736            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14737
14738            # Extra M4 quote needed to protect [] in grep expression.
14739            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14740            if test "x$FOUND_VERSION_78" = x; then
14741              { $as_echo "$as_me:$LINENO: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14743              { $as_echo "$as_me:$LINENO: (Your Boot JDK must be version 7 or 8)" >&5
14744$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14745              BOOT_JDK_FOUND=no
14746            else
14747              # We're done! :-)
14748              BOOT_JDK_FOUND=yes
14749
14750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14751
14752  # Input might be given as Windows format, start by converting to
14753  # unix format.
14754  path="$BOOT_JDK"
14755  new_path=`$CYGPATH -u "$path"`
14756
14757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14760  # "foo.exe" is OK but "foo" is an error.
14761  #
14762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14763  # It is also a way to make sure we got the proper file name for the real test later on.
14764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14765  if test "x$test_shortpath" = x; then
14766    { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14767$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14768    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BOOT_JDK" >&5
14769$as_echo "$as_me: error: Cannot locate the the path of BOOT_JDK" >&2;}
14770   { (exit 1); exit 1; }; }
14771  fi
14772
14773  # Call helper function which possibly converts this using DOS-style short mode.
14774  # If so, the updated path is stored in $new_path.
14775
14776  input_path="$new_path"
14777  # Check if we need to convert this using DOS-style short mode. If the path
14778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14779  # take no chances and rewrite it.
14780  # Note: m4 eats our [], so we need to use [ and ] instead.
14781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14782  if test "x$has_forbidden_chars" != x; then
14783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14787      # Going to short mode and back again did indeed matter. Since short mode is
14788      # case insensitive, let's make it lowercase to improve readability.
14789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14790      # Now convert it back to Unix-stile (cygpath)
14791      input_path=`$CYGPATH -u "$shortmode_path"`
14792      new_path="$input_path"
14793    fi
14794  fi
14795
14796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14797  if test "x$test_cygdrive_prefix" = x; then
14798    # As a simple fix, exclude /usr/bin since it's not a real path.
14799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14801      # a path prefixed by /cygdrive for fixpath to work.
14802      new_path="$CYGWIN_ROOT_PATH$input_path"
14803    fi
14804  fi
14805
14806
14807  if test "x$path" != "x$new_path"; then
14808    BOOT_JDK="$new_path"
14809    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14811  fi
14812
14813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14814
14815  path="$BOOT_JDK"
14816  has_colon=`$ECHO $path | $GREP ^.:`
14817  new_path="$path"
14818  if test "x$has_colon" = x; then
14819    # Not in mixed or Windows style, start by that.
14820    new_path=`cmd //c echo $path`
14821  fi
14822
14823
14824  input_path="$new_path"
14825  # Check if we need to convert this using DOS-style short mode. If the path
14826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14827  # take no chances and rewrite it.
14828  # Note: m4 eats our [], so we need to use [ and ] instead.
14829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14830  if test "x$has_forbidden_chars" != x; then
14831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14833  fi
14834
14835
14836  windows_path="$new_path"
14837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14838    unix_path=`$CYGPATH -u "$windows_path"`
14839    new_path="$unix_path"
14840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14842    new_path="$unix_path"
14843  fi
14844
14845  if test "x$path" != "x$new_path"; then
14846    BOOT_JDK="$new_path"
14847    { $as_echo "$as_me:$LINENO: Rewriting BOOT_JDK to \"$new_path\"" >&5
14848$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14849  fi
14850
14851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14853
14854  else
14855    # We're on a posix platform. Hooray! :)
14856    path="$BOOT_JDK"
14857
14858    if test ! -f "$path" && test ! -d "$path"; then
14859      { { $as_echo "$as_me:$LINENO: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&5
14860$as_echo "$as_me: error: The path of BOOT_JDK, which resolves as \"$path\", is not found." >&2;}
14861   { (exit 1); exit 1; }; }
14862    fi
14863
14864    has_space=`$ECHO "$path" | $GREP " "`
14865    if test "x$has_space" != x; then
14866      { $as_echo "$as_me:$LINENO: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14867$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14868      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
14869$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
14870   { (exit 1); exit 1; }; }
14871    fi
14872  fi
14873
14874              { $as_echo "$as_me:$LINENO: checking for Boot JDK" >&5
14875$as_echo_n "checking for Boot JDK... " >&6; }
14876              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK" >&5
14877$as_echo "$BOOT_JDK" >&6; }
14878              { $as_echo "$as_me:$LINENO: checking Boot JDK version" >&5
14879$as_echo_n "checking Boot JDK version... " >&6; }
14880              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14881              { $as_echo "$as_me:$LINENO: result: $BOOT_JDK_VERSION" >&5
14882$as_echo "$BOOT_JDK_VERSION" >&6; }
14883            fi # end check jdk version
14884          fi # end check rt.jar
14885        fi # end check javac
14886      fi # end check java
14887    fi # end check boot jdk found
14888  fi
14889
14890
14891# If we haven't found anything yet, we've truly lost. Give up.
14892if test "x$BOOT_JDK_FOUND" = xno; then
14893
14894    # Print a helpful message on how to acquire the necessary build dependency.
14895    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
14896    MISSING_DEPENDENCY=openjdk
14897    PKGHANDLER_COMMAND=
14898
14899    case $PKGHANDLER in
14900	apt-get)
14901                apt_help     $MISSING_DEPENDENCY ;;
14902    yum)
14903                yum_help     $MISSING_DEPENDENCY ;;
14904	port)
14905                port_help    $MISSING_DEPENDENCY ;;
14906	pkgutil)
14907                pkgutil_help $MISSING_DEPENDENCY ;;
14908	pkgadd)
14909                pkgadd_help  $MISSING_DEPENDENCY ;;
14910    * )
14911      break ;;
14912    esac
14913
14914    if test "x$PKGHANDLER_COMMAND" != x; then
14915        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
14916    fi
14917
14918  { $as_echo "$as_me:$LINENO: Could not find a valid Boot JDK. $HELP_MSG" >&5
14919$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
14920  { $as_echo "$as_me:$LINENO: This might be fixed by explicitely setting --with-boot-jdk" >&5
14921$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14922  { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
14923$as_echo "$as_me: error: Cannot continue" >&2;}
14924   { (exit 1); exit 1; }; }
14925fi
14926
14927# Setup proper paths for what we found
14928BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
14929if test ! -f "$BOOT_RTJAR"; then
14930    # On MacOSX it is called classes.jar
14931    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
14932    if test -f "$BOOT_RTJAR"; then
14933      # Remove the ..
14934      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
14935    fi
14936fi
14937BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
14938BOOT_JDK="$BOOT_JDK"
14939
14940
14941
14942
14943# Setup tools from the Boot JDK.
14944
14945  { $as_echo "$as_me:$LINENO: checking for java in Boot JDK" >&5
14946$as_echo_n "checking for java in Boot JDK... " >&6; }
14947  JAVA=$BOOT_JDK/bin/java
14948  if test ! -x $JAVA; then
14949      { $as_echo "$as_me:$LINENO: result: not found" >&5
14950$as_echo "not found" >&6; }
14951      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14952$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14953      { { $as_echo "$as_me:$LINENO: error: Could not find java in the Boot JDK" >&5
14954$as_echo "$as_me: error: Could not find java in the Boot JDK" >&2;}
14955   { (exit 1); exit 1; }; }
14956  fi
14957  { $as_echo "$as_me:$LINENO: result: ok" >&5
14958$as_echo "ok" >&6; }
14959
14960
14961  { $as_echo "$as_me:$LINENO: checking for javac in Boot JDK" >&5
14962$as_echo_n "checking for javac in Boot JDK... " >&6; }
14963  JAVAC=$BOOT_JDK/bin/javac
14964  if test ! -x $JAVAC; then
14965      { $as_echo "$as_me:$LINENO: result: not found" >&5
14966$as_echo "not found" >&6; }
14967      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14968$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14969      { { $as_echo "$as_me:$LINENO: error: Could not find javac in the Boot JDK" >&5
14970$as_echo "$as_me: error: Could not find javac in the Boot JDK" >&2;}
14971   { (exit 1); exit 1; }; }
14972  fi
14973  { $as_echo "$as_me:$LINENO: result: ok" >&5
14974$as_echo "ok" >&6; }
14975
14976
14977  { $as_echo "$as_me:$LINENO: checking for javah in Boot JDK" >&5
14978$as_echo_n "checking for javah in Boot JDK... " >&6; }
14979  JAVAH=$BOOT_JDK/bin/javah
14980  if test ! -x $JAVAH; then
14981      { $as_echo "$as_me:$LINENO: result: not found" >&5
14982$as_echo "not found" >&6; }
14983      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
14984$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
14985      { { $as_echo "$as_me:$LINENO: error: Could not find javah in the Boot JDK" >&5
14986$as_echo "$as_me: error: Could not find javah in the Boot JDK" >&2;}
14987   { (exit 1); exit 1; }; }
14988  fi
14989  { $as_echo "$as_me:$LINENO: result: ok" >&5
14990$as_echo "ok" >&6; }
14991
14992
14993  { $as_echo "$as_me:$LINENO: checking for javap in Boot JDK" >&5
14994$as_echo_n "checking for javap in Boot JDK... " >&6; }
14995  JAVAP=$BOOT_JDK/bin/javap
14996  if test ! -x $JAVAP; then
14997      { $as_echo "$as_me:$LINENO: result: not found" >&5
14998$as_echo "not found" >&6; }
14999      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15000$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15001      { { $as_echo "$as_me:$LINENO: error: Could not find javap in the Boot JDK" >&5
15002$as_echo "$as_me: error: Could not find javap in the Boot JDK" >&2;}
15003   { (exit 1); exit 1; }; }
15004  fi
15005  { $as_echo "$as_me:$LINENO: result: ok" >&5
15006$as_echo "ok" >&6; }
15007
15008
15009  { $as_echo "$as_me:$LINENO: checking for jar in Boot JDK" >&5
15010$as_echo_n "checking for jar in Boot JDK... " >&6; }
15011  JAR=$BOOT_JDK/bin/jar
15012  if test ! -x $JAR; then
15013      { $as_echo "$as_me:$LINENO: result: not found" >&5
15014$as_echo "not found" >&6; }
15015      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15016$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15017      { { $as_echo "$as_me:$LINENO: error: Could not find jar in the Boot JDK" >&5
15018$as_echo "$as_me: error: Could not find jar in the Boot JDK" >&2;}
15019   { (exit 1); exit 1; }; }
15020  fi
15021  { $as_echo "$as_me:$LINENO: result: ok" >&5
15022$as_echo "ok" >&6; }
15023
15024
15025  { $as_echo "$as_me:$LINENO: checking for rmic in Boot JDK" >&5
15026$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15027  RMIC=$BOOT_JDK/bin/rmic
15028  if test ! -x $RMIC; then
15029      { $as_echo "$as_me:$LINENO: result: not found" >&5
15030$as_echo "not found" >&6; }
15031      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15032$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15033      { { $as_echo "$as_me:$LINENO: error: Could not find rmic in the Boot JDK" >&5
15034$as_echo "$as_me: error: Could not find rmic in the Boot JDK" >&2;}
15035   { (exit 1); exit 1; }; }
15036  fi
15037  { $as_echo "$as_me:$LINENO: result: ok" >&5
15038$as_echo "ok" >&6; }
15039
15040
15041  { $as_echo "$as_me:$LINENO: checking for native2ascii in Boot JDK" >&5
15042$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15043  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15044  if test ! -x $NATIVE2ASCII; then
15045      { $as_echo "$as_me:$LINENO: result: not found" >&5
15046$as_echo "not found" >&6; }
15047      { $as_echo "$as_me:$LINENO: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15048$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15049      { { $as_echo "$as_me:$LINENO: error: Could not find native2ascii in the Boot JDK" >&5
15050$as_echo "$as_me: error: Could not find native2ascii in the Boot JDK" >&2;}
15051   { (exit 1); exit 1; }; }
15052  fi
15053  { $as_echo "$as_me:$LINENO: result: ok" >&5
15054$as_echo "ok" >&6; }
15055
15056
15057# Finally, set some other options...
15058
15059# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15060BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15061
15062
15063
15064
15065##############################################################################
15066#
15067# Specify options for anything that is run with the Boot JDK.
15068#
15069
15070# Check whether --with-boot-jdk-jvmargs was given.
15071if test "${with_boot_jdk_jvmargs+set}" = set; then
15072  withval=$with_boot_jdk_jvmargs;
15073fi
15074
15075
15076if test "x$with_boot_jdk_jvmargs" = x; then
15077    # Not all JVM:s accept the same arguments on the command line.
15078    # OpenJDK specific increase in thread stack for JDK build,
15079    # well more specifically, when running javac.
15080    if test "x$BUILD_NUM_BITS" = x32; then
15081       STACK_SIZE=768
15082    else
15083       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15084       # since 64-bit pointers are pushed on the stach. Apparently, we need
15085       # to increase the stack space when javacing the JDK....
15086       STACK_SIZE=1536
15087    fi
15088
15089    # Minimum amount of heap memory.
15090
15091    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15092    # If so, then append -Xms64M to boot_jdk_jvmargs
15093    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15094    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15095    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15096        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15097    fi
15098
15099    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15100        # Why does macosx need more heap? Its the huge JDK batch.
15101
15102    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15103    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15104    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15105    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15106    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15107        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15108    fi
15109
15110    else
15111
15112    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15113    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15114    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15115    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15116    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15117        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15118    fi
15119
15120    fi
15121    # When is adding -client something that speeds up the JVM?
15122    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15123
15124    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15125    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15126    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15127    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15128    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15129        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15130    fi
15131
15132
15133    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15134    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15135    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15136    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15137    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15138        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15139    fi
15140
15141
15142    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15143    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15144    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15145    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15146    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15147        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15148    fi
15149
15150    # Disable special log output when a debug build is used as Boot JDK...
15151
15152    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15153    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15154    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15155    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15156    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15157        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15158    fi
15159
15160fi
15161
15162BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15163
15164
15165
15166###############################################################################
15167#
15168# Configure the sources to use. We can add or override individual directories.
15169#
15170###############################################################################
15171
15172
15173
15174# Where are the sources. Any of these can be overridden
15175# using --with-override-corba and the likes.
15176LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15177CORBA_TOPDIR="$SRC_ROOT/corba"
15178JAXP_TOPDIR="$SRC_ROOT/jaxp"
15179JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15180HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15181JDK_TOPDIR="$SRC_ROOT/jdk"
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191###############################################################################
15192#
15193# Pickup additional source for a component from outside of the source root
15194# or override source for a component.
15195#
15196
15197# Check whether --with-add-source-root was given.
15198if test "${with_add_source_root+set}" = set; then
15199  withval=$with_add_source_root;
15200fi
15201
15202
15203
15204# Check whether --with-override-source-root was given.
15205if test "${with_override_source_root+set}" = set; then
15206  withval=$with_override_source_root;
15207fi
15208
15209
15210
15211# Check whether --with-adds-and-overrides was given.
15212if test "${with_adds_and_overrides+set}" = set; then
15213  withval=$with_adds_and_overrides;
15214fi
15215
15216
15217if test "x$with_adds_and_overrides" != x; then
15218    with_add_source_root="$with_adds_and_overrides/adds"
15219    with_override_source_root="$with_adds_and_overrides/overrides"
15220fi
15221
15222if test "x$with_add_source_root" != x; then
15223    if ! test -d $with_add_source_root; then
15224       { { $as_echo "$as_me:$LINENO: error: Trying to use a non-existant add-source-root $with_add_source_root" >&5
15225$as_echo "$as_me: error: Trying to use a non-existant add-source-root $with_add_source_root" >&2;}
15226   { (exit 1); exit 1; }; }
15227    fi
15228    CURDIR="$PWD"
15229    cd "$with_add_source_root"
15230    ADD_SRC_ROOT="`pwd`"
15231    cd "$CURDIR"
15232    # Verify that the addon source root does not have any root makefiles.
15233    # If it does, then it is usually an error, prevent this.
15234    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15235       test -f $with_add_source_root/langtools/make/Makefile; then
15236        { { $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
15237$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;}
15238   { (exit 1); exit 1; }; }
15239    fi
15240    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15241       test -f $with_add_source_root/corba/make/Makefile; then
15242        { { $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
15243$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;}
15244   { (exit 1); exit 1; }; }
15245    fi
15246    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15247       test -f $with_add_source_root/jaxp/make/Makefile; then
15248        { { $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
15249$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;}
15250   { (exit 1); exit 1; }; }
15251    fi
15252    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15253       test -f $with_add_source_root/jaxws/make/Makefile; then
15254        { { $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
15255$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;}
15256   { (exit 1); exit 1; }; }
15257    fi
15258    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15259       test -f $with_add_source_root/hotspot/make/Makefile; then
15260        { { $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
15261$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;}
15262   { (exit 1); exit 1; }; }
15263    fi
15264    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15265       test -f $with_add_source_root/jdk/make/Makefile; then
15266        { { $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
15267$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;}
15268   { (exit 1); exit 1; }; }
15269    fi
15270fi
15271
15272
15273if test "x$with_override_source_root" != x; then
15274    if ! test -d $with_override_source_root; then
15275       { { $as_echo "$as_me:$LINENO: error: Trying to use a non-existant override-source-root $with_override_source_root" >&5
15276$as_echo "$as_me: error: Trying to use a non-existant override-source-root $with_override_source_root" >&2;}
15277   { (exit 1); exit 1; }; }
15278    fi
15279    CURDIR="$PWD"
15280    cd "$with_override_source_root"
15281    OVERRIDE_SRC_ROOT="`pwd`"
15282    cd "$CURDIR"
15283    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15284       test -f $with_override_source_root/langtools/make/Makefile; then
15285        { { $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
15286$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;}
15287   { (exit 1); exit 1; }; }
15288    fi
15289    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15290       test -f $with_override_source_root/corba/make/Makefile; then
15291        { { $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
15292$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;}
15293   { (exit 1); exit 1; }; }
15294    fi
15295    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15296       test -f $with_override_source_root/jaxp/make/Makefile; then
15297        { { $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
15298$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;}
15299   { (exit 1); exit 1; }; }
15300    fi
15301    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15302       test -f $with_override_source_root/jaxws/make/Makefile; then
15303        { { $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
15304$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;}
15305   { (exit 1); exit 1; }; }
15306    fi
15307    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15308       test -f $with_override_source_root/hotspot/make/Makefile; then
15309        { { $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
15310$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;}
15311   { (exit 1); exit 1; }; }
15312    fi
15313    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15314       test -f $with_override_source_root/jdk/make/Makefile; then
15315        { { $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
15316$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;}
15317   { (exit 1); exit 1; }; }
15318    fi
15319fi
15320
15321
15322###############################################################################
15323#
15324# Override a repo completely, this is used for example when you have 3 small
15325# development sandboxes of the langtools sources and want to avoid having 3 full
15326# OpenJDK sources checked out on disk.
15327#
15328# Assuming that the 3 langtools sandboxes are located here:
15329# /home/fredrik/sandbox1/langtools
15330# /home/fredrik/sandbox2/langtools
15331# /home/fredrik/sandbox3/langtools
15332#
15333# From the source root you create build subdirs manually:
15334#     mkdir -p build1 build2 build3
15335# in each build directory run:
15336#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15337#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15338#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15339#
15340
15341
15342# Check whether --with-override-langtools was given.
15343if test "${with_override_langtools+set}" = set; then
15344  withval=$with_override_langtools;
15345fi
15346
15347
15348
15349# Check whether --with-override-corba was given.
15350if test "${with_override_corba+set}" = set; then
15351  withval=$with_override_corba;
15352fi
15353
15354
15355
15356# Check whether --with-override-jaxp was given.
15357if test "${with_override_jaxp+set}" = set; then
15358  withval=$with_override_jaxp;
15359fi
15360
15361
15362
15363# Check whether --with-override-jaxws was given.
15364if test "${with_override_jaxws+set}" = set; then
15365  withval=$with_override_jaxws;
15366fi
15367
15368
15369
15370# Check whether --with-override-hotspot was given.
15371if test "${with_override_hotspot+set}" = set; then
15372  withval=$with_override_hotspot;
15373fi
15374
15375
15376
15377# Check whether --with-override-jdk was given.
15378if test "${with_override_jdk+set}" = set; then
15379  withval=$with_override_jdk;
15380fi
15381
15382
15383if test "x$with_override_langtools" != x; then
15384    CURDIR="$PWD"
15385    cd "$with_override_langtools"
15386    LANGTOOLS_TOPDIR="`pwd`"
15387    cd "$CURDIR"
15388    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15389        { { $as_echo "$as_me:$LINENO: error: You have to override langtools with a full langtools repo!" >&5
15390$as_echo "$as_me: error: You have to override langtools with a full langtools repo!" >&2;}
15391   { (exit 1); exit 1; }; }
15392    fi
15393    { $as_echo "$as_me:$LINENO: checking if langtools should be overridden" >&5
15394$as_echo_n "checking if langtools should be overridden... " >&6; }
15395    { $as_echo "$as_me:$LINENO: result: yes with $LANGTOOLS_TOPDIR" >&5
15396$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15397fi
15398if test "x$with_override_corba" != x; then
15399    CURDIR="$PWD"
15400    cd "$with_override_corba"
15401    CORBA_TOPDIR="`pwd`"
15402    cd "$CURDIR"
15403    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15404        { { $as_echo "$as_me:$LINENO: error: You have to override corba with a full corba repo!" >&5
15405$as_echo "$as_me: error: You have to override corba with a full corba repo!" >&2;}
15406   { (exit 1); exit 1; }; }
15407    fi
15408    { $as_echo "$as_me:$LINENO: checking if corba should be overridden" >&5
15409$as_echo_n "checking if corba should be overridden... " >&6; }
15410    { $as_echo "$as_me:$LINENO: result: yes with $CORBA_TOPDIR" >&5
15411$as_echo "yes with $CORBA_TOPDIR" >&6; }
15412fi
15413if test "x$with_override_jaxp" != x; then
15414    CURDIR="$PWD"
15415    cd "$with_override_jaxp"
15416    JAXP_TOPDIR="`pwd`"
15417    cd "$CURDIR"
15418    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15419        { { $as_echo "$as_me:$LINENO: error: You have to override jaxp with a full jaxp repo!" >&5
15420$as_echo "$as_me: error: You have to override jaxp with a full jaxp repo!" >&2;}
15421   { (exit 1); exit 1; }; }
15422    fi
15423    { $as_echo "$as_me:$LINENO: checking if jaxp should be overridden" >&5
15424$as_echo_n "checking if jaxp should be overridden... " >&6; }
15425    { $as_echo "$as_me:$LINENO: result: yes with $JAXP_TOPDIR" >&5
15426$as_echo "yes with $JAXP_TOPDIR" >&6; }
15427fi
15428if test "x$with_override_jaxws" != x; then
15429    CURDIR="$PWD"
15430    cd "$with_override_jaxws"
15431    JAXWS_TOPDIR="`pwd`"
15432    cd "$CURDIR"
15433    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15434        { { $as_echo "$as_me:$LINENO: error: You have to override jaxws with a full jaxws repo!" >&5
15435$as_echo "$as_me: error: You have to override jaxws with a full jaxws repo!" >&2;}
15436   { (exit 1); exit 1; }; }
15437    fi
15438    { $as_echo "$as_me:$LINENO: checking if jaxws should be overridden" >&5
15439$as_echo_n "checking if jaxws should be overridden... " >&6; }
15440    { $as_echo "$as_me:$LINENO: result: yes with $JAXWS_TOPDIR" >&5
15441$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15442fi
15443if test "x$with_override_hotspot" != x; then
15444    CURDIR="$PWD"
15445    cd "$with_override_hotspot"
15446    HOTSPOT_TOPDIR="`pwd`"
15447    cd "$CURDIR"
15448    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15449       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15450        { { $as_echo "$as_me:$LINENO: error: You have to override hotspot with a full hotspot repo!" >&5
15451$as_echo "$as_me: error: You have to override hotspot with a full hotspot repo!" >&2;}
15452   { (exit 1); exit 1; }; }
15453    fi
15454    { $as_echo "$as_me:$LINENO: checking if hotspot should be overridden" >&5
15455$as_echo_n "checking if hotspot should be overridden... " >&6; }
15456    { $as_echo "$as_me:$LINENO: result: yes with $HOTSPOT_TOPDIR" >&5
15457$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15458fi
15459if test "x$with_override_jdk" != x; then
15460    CURDIR="$PWD"
15461    cd "$with_override_jdk"
15462    JDK_TOPDIR="`pwd`"
15463    cd "$CURDIR"
15464    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15465        { { $as_echo "$as_me:$LINENO: error: You have to override JDK with a full JDK repo!" >&5
15466$as_echo "$as_me: error: You have to override JDK with a full JDK repo!" >&2;}
15467   { (exit 1); exit 1; }; }
15468    fi
15469    { $as_echo "$as_me:$LINENO: checking if JDK should be overridden" >&5
15470$as_echo_n "checking if JDK should be overridden... " >&6; }
15471    { $as_echo "$as_me:$LINENO: result: yes with $JDK_TOPDIR" >&5
15472$as_echo "yes with $JDK_TOPDIR" >&6; }
15473fi
15474
15475
15476
15477BUILD_OUTPUT="$OUTPUT_ROOT"
15478
15479
15480HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15481BUILD_HOTSPOT=true
15482
15483
15484
15485# Check whether --with-import-hotspot was given.
15486if test "${with_import_hotspot+set}" = set; then
15487  withval=$with_import_hotspot;
15488fi
15489
15490if test "x$with_import_hotspot" != x; then
15491    CURDIR="$PWD"
15492    cd "$with_import_hotspot"
15493    HOTSPOT_DIST="`pwd`"
15494    cd "$CURDIR"
15495    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15496        { { $as_echo "$as_me:$LINENO: error: You have to import hotspot from a full jdk image or hotspot build dist dir!" >&5
15497$as_echo "$as_me: error: You have to import hotspot from a full jdk image or hotspot build dist dir!" >&2;}
15498   { (exit 1); exit 1; }; }
15499    fi
15500    { $as_echo "$as_me:$LINENO: checking if hotspot should be imported" >&5
15501$as_echo_n "checking if hotspot should be imported... " >&6; }
15502    { $as_echo "$as_me:$LINENO: result: yes from $HOTSPOT_DIST" >&5
15503$as_echo "yes from $HOTSPOT_DIST" >&6; }
15504    BUILD_HOTSPOT=false
15505fi
15506
15507JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15508
15509
15510###############################################################################
15511#
15512# Setup the toolchain (compilers etc), i.e. the tools that need to be
15513# cross-compilation aware.
15514#
15515###############################################################################
15516
15517
15518###############################################################################
15519#
15520# Configure the development tool paths and potential sysroot.
15521#
15522ac_ext=cpp
15523ac_cpp='$CXXCPP $CPPFLAGS'
15524ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15525ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15526ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15527
15528
15529# The option used to specify the target .o,.a or .so file.
15530# When compiling, how to specify the to be created object file.
15531CC_OUT_OPTION='-o$(SPACE)'
15532# When linking, how to specify the to be created executable.
15533EXE_OUT_OPTION='-o$(SPACE)'
15534# When linking, how to specify the to be created dynamically linkable library.
15535LD_OUT_OPTION='-o$(SPACE)'
15536# When archiving, how to specify the to be create static archive for object files.
15537AR_OUT_OPTION='rcs$(SPACE)'
15538
15539
15540
15541
15542
15543# Locate the actual tools
15544
15545if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15546
15547  # Store path to cygwin link.exe to help excluding it when searching for
15548  # VS linker. This must be done before changing the PATH when looking for VS.
15549  # Extract the first word of "link", so it can be a program name with args.
15550set dummy link; ac_word=$2
15551{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
15552$as_echo_n "checking for $ac_word... " >&6; }
15553if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then
15554  $as_echo_n "(cached) " >&6
15555else
15556  case $CYGWIN_LINK in
15557  [\\/]* | ?:[\\/]*)
15558  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15559  ;;
15560  *)
15561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15562for as_dir in $PATH
15563do
15564  IFS=$as_save_IFS
15565  test -z "$as_dir" && as_dir=.
15566  for ac_exec_ext in '' $ac_executable_extensions; do
15567  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15568    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15569    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15570    break 2
15571  fi
15572done
15573done
15574IFS=$as_save_IFS
15575
15576  ;;
15577esac
15578fi
15579CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15580if test -n "$CYGWIN_LINK"; then
15581  { $as_echo "$as_me:$LINENO: result: $CYGWIN_LINK" >&5
15582$as_echo "$CYGWIN_LINK" >&6; }
15583else
15584  { $as_echo "$as_me:$LINENO: result: no" >&5
15585$as_echo "no" >&6; }
15586fi
15587
15588
15589  if test "x$CYGWIN_LINK" != x; then
15590    { $as_echo "$as_me:$LINENO: checking if the first found link.exe is actually the Cygwin link tool" >&5
15591$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15592    "$CYGWIN_LINK" --version > /dev/null
15593    if test $? -eq 0 ; then
15594      { $as_echo "$as_me:$LINENO: result: yes" >&5
15595$as_echo "yes" >&6; }
15596    else
15597      { $as_echo "$as_me:$LINENO: result: no" >&5
15598$as_echo "no" >&6; }
15599      # This might be the VS linker. Don't exclude it later on.
15600      CYGWIN_LINK=""
15601    fi
15602  fi
15603
15604  # First-hand choice is to locate and run the vsvars bat file.
15605
15606  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15607    VCVARSFILE="vc/bin/vcvars32.bat"
15608  else
15609    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15610  fi
15611
15612  VS_ENV_CMD=""
15613  VS_ENV_ARGS=""
15614  if test "x$with_toolsdir" != x; then
15615
15616  if test "x$VS_ENV_CMD" = x; then
15617    VS100BASE="$with_toolsdir/../.."
15618    METHOD="--with-tools-dir"
15619
15620  windows_path="$VS100BASE"
15621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15622    unix_path=`$CYGPATH -u "$windows_path"`
15623    VS100BASE="$unix_path"
15624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15626    VS100BASE="$unix_path"
15627  fi
15628
15629    if test -d "$VS100BASE"; then
15630      if test -f "$VS100BASE/$VCVARSFILE"; then
15631        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15632$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15633        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15634      else
15635        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15636$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15637        { $as_echo "$as_me:$LINENO: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15638$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15639      fi
15640    fi
15641  fi
15642
15643  fi
15644
15645  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
15646    # Having specified an argument which is incorrect will produce an instant failure;
15647    # we should not go on looking
15648    { $as_echo "$as_me:$LINENO: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
15649$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
15650    { $as_echo "$as_me:$LINENO: Please point to the VC/bin directory within the Visual Studio installation" >&5
15651$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
15652    { { $as_echo "$as_me:$LINENO: error: Cannot locate a valid Visual Studio installation" >&5
15653$as_echo "$as_me: error: Cannot locate a valid Visual Studio installation" >&2;}
15654   { (exit 1); exit 1; }; }
15655  fi
15656
15657  if test "x$ProgramW6432" != x; then
15658
15659  if test "x$VS_ENV_CMD" = x; then
15660    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
15661    METHOD="well-known name"
15662
15663  windows_path="$WIN_SDK_BASE"
15664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15665    unix_path=`$CYGPATH -u "$windows_path"`
15666    WIN_SDK_BASE="$unix_path"
15667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15669    WIN_SDK_BASE="$unix_path"
15670  fi
15671
15672    if test -d "$WIN_SDK_BASE"; then
15673      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15674        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15675$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15676        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15677        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15678          VS_ENV_ARGS="/x86"
15679        else
15680          VS_ENV_ARGS="/x64"
15681        fi
15682      else
15683        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15684$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15685        { $as_echo "$as_me:$LINENO: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15686$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15687      fi
15688    fi
15689  fi
15690
15691  fi
15692  if test "x$PROGRAMW6432" != x; then
15693
15694  if test "x$VS_ENV_CMD" = x; then
15695    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
15696    METHOD="well-known name"
15697
15698  windows_path="$WIN_SDK_BASE"
15699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15700    unix_path=`$CYGPATH -u "$windows_path"`
15701    WIN_SDK_BASE="$unix_path"
15702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15704    WIN_SDK_BASE="$unix_path"
15705  fi
15706
15707    if test -d "$WIN_SDK_BASE"; then
15708      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15709        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15710$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15711        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15712        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15713          VS_ENV_ARGS="/x86"
15714        else
15715          VS_ENV_ARGS="/x64"
15716        fi
15717      else
15718        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15719$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15720        { $as_echo "$as_me:$LINENO: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15721$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15722      fi
15723    fi
15724  fi
15725
15726  fi
15727  if test "x$PROGRAMFILES" != x; then
15728
15729  if test "x$VS_ENV_CMD" = x; then
15730    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
15731    METHOD="well-known name"
15732
15733  windows_path="$WIN_SDK_BASE"
15734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15735    unix_path=`$CYGPATH -u "$windows_path"`
15736    WIN_SDK_BASE="$unix_path"
15737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15739    WIN_SDK_BASE="$unix_path"
15740  fi
15741
15742    if test -d "$WIN_SDK_BASE"; then
15743      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15744        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15745$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15746        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15747        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15748          VS_ENV_ARGS="/x86"
15749        else
15750          VS_ENV_ARGS="/x64"
15751        fi
15752      else
15753        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15754$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15755        { $as_echo "$as_me:$LINENO: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15756$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15757      fi
15758    fi
15759  fi
15760
15761  fi
15762
15763  if test "x$VS_ENV_CMD" = x; then
15764    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
15765    METHOD="well-known name"
15766
15767  windows_path="$WIN_SDK_BASE"
15768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15769    unix_path=`$CYGPATH -u "$windows_path"`
15770    WIN_SDK_BASE="$unix_path"
15771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15773    WIN_SDK_BASE="$unix_path"
15774  fi
15775
15776    if test -d "$WIN_SDK_BASE"; then
15777      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15778        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15779$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15780        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15781        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15782          VS_ENV_ARGS="/x86"
15783        else
15784          VS_ENV_ARGS="/x64"
15785        fi
15786      else
15787        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15788$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15789        { $as_echo "$as_me:$LINENO: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15790$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15791      fi
15792    fi
15793  fi
15794
15795
15796  if test "x$VS_ENV_CMD" = x; then
15797    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
15798    METHOD="well-known name"
15799
15800  windows_path="$WIN_SDK_BASE"
15801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15802    unix_path=`$CYGPATH -u "$windows_path"`
15803    WIN_SDK_BASE="$unix_path"
15804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15806    WIN_SDK_BASE="$unix_path"
15807  fi
15808
15809    if test -d "$WIN_SDK_BASE"; then
15810      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15811        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15812$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15813        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15814        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15815          VS_ENV_ARGS="/x86"
15816        else
15817          VS_ENV_ARGS="/x64"
15818        fi
15819      else
15820        { $as_echo "$as_me:$LINENO: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15821$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15822        { $as_echo "$as_me:$LINENO: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15823$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15824      fi
15825    fi
15826  fi
15827
15828
15829  if test "x$VS100COMNTOOLS" != x; then
15830
15831  if test "x$VS_ENV_CMD" = x; then
15832    VS100BASE="$VS100COMNTOOLS/../.."
15833    METHOD="VS100COMNTOOLS variable"
15834
15835  windows_path="$VS100BASE"
15836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15837    unix_path=`$CYGPATH -u "$windows_path"`
15838    VS100BASE="$unix_path"
15839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15841    VS100BASE="$unix_path"
15842  fi
15843
15844    if test -d "$VS100BASE"; then
15845      if test -f "$VS100BASE/$VCVARSFILE"; then
15846        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15847$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15848        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15849      else
15850        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15851$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15852        { $as_echo "$as_me:$LINENO: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15853$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15854      fi
15855    fi
15856  fi
15857
15858  fi
15859  if test "x$PROGRAMFILES" != x; then
15860
15861  if test "x$VS_ENV_CMD" = x; then
15862    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
15863    METHOD="well-known name"
15864
15865  windows_path="$VS100BASE"
15866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15867    unix_path=`$CYGPATH -u "$windows_path"`
15868    VS100BASE="$unix_path"
15869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15871    VS100BASE="$unix_path"
15872  fi
15873
15874    if test -d "$VS100BASE"; then
15875      if test -f "$VS100BASE/$VCVARSFILE"; then
15876        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15877$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15878        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15879      else
15880        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15881$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15882        { $as_echo "$as_me:$LINENO: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15883$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15884      fi
15885    fi
15886  fi
15887
15888  fi
15889
15890  if test "x$VS_ENV_CMD" = x; then
15891    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
15892    METHOD="well-known name"
15893
15894  windows_path="$VS100BASE"
15895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15896    unix_path=`$CYGPATH -u "$windows_path"`
15897    VS100BASE="$unix_path"
15898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15900    VS100BASE="$unix_path"
15901  fi
15902
15903    if test -d "$VS100BASE"; then
15904      if test -f "$VS100BASE/$VCVARSFILE"; then
15905        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15906$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15907        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15908      else
15909        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15910$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15911        { $as_echo "$as_me:$LINENO: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15912$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15913      fi
15914    fi
15915  fi
15916
15917
15918  if test "x$VS_ENV_CMD" = x; then
15919    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
15920    METHOD="well-known name"
15921
15922  windows_path="$VS100BASE"
15923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15924    unix_path=`$CYGPATH -u "$windows_path"`
15925    VS100BASE="$unix_path"
15926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15928    VS100BASE="$unix_path"
15929  fi
15930
15931    if test -d "$VS100BASE"; then
15932      if test -f "$VS100BASE/$VCVARSFILE"; then
15933        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15934$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15935        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15936      else
15937        { $as_echo "$as_me:$LINENO: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15938$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15939        { $as_echo "$as_me:$LINENO: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15940$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15941      fi
15942    fi
15943  fi
15944
15945
15946  if test "x$VS_ENV_CMD" != x; then
15947    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
15948
15949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15950
15951  # First separate the path from the arguments. This will split at the first
15952  # space.
15953  complete="$VS_ENV_CMD"
15954  path="${complete%% *}"
15955  tmp="$complete EOL"
15956  arguments="${tmp#* }"
15957
15958  # Input might be given as Windows format, start by converting to
15959  # unix format.
15960  new_path=`$CYGPATH -u "$path"`
15961
15962  # Now try to locate executable using which
15963  new_path=`$WHICH "$new_path" 2> /dev/null`
15964  # bat and cmd files are not always considered executable in cygwin causing which
15965  # to not find them
15966  if test "x$new_path" = x \
15967           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15968           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15969    new_path=`$CYGPATH -u "$path"`
15970  fi
15971  if test "x$new_path" = x; then
15972    # Oops. Which didn't find the executable.
15973    # The splitting of arguments from the executable at a space might have been incorrect,
15974    # since paths with space are more likely in Windows. Give it another try with the whole
15975    # argument.
15976    path="$complete"
15977    arguments="EOL"
15978    new_path=`$CYGPATH -u "$path"`
15979    new_path=`$WHICH "$new_path" 2> /dev/null`
15980    # bat and cmd files are not always considered executable in cygwin causing which
15981    # to not find them
15982    if test "x$new_path" = x \
15983             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15984             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15985      new_path=`$CYGPATH -u "$path"`
15986    fi
15987    if test "x$new_path" = x; then
15988      # It's still not found. Now this is an unrecoverable error.
15989      { $as_echo "$as_me:$LINENO: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
15990$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
15991      has_space=`$ECHO "$complete" | $GREP " "`
15992      if test "x$has_space" != x; then
15993        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15994$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15995      fi
15996      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of VS_ENV_CMD" >&5
15997$as_echo "$as_me: error: Cannot locate the the path of VS_ENV_CMD" >&2;}
15998   { (exit 1); exit 1; }; }
15999    fi
16000  fi
16001
16002  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16003  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16004  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16005  # "foo.exe" is OK but "foo" is an error.
16006  #
16007  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16008  # It is also a way to make sure we got the proper file name for the real test later on.
16009  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16010  if test "x$test_shortpath" = x; then
16011    # Short path failed, file does not exist as specified.
16012    # Try adding .exe or .cmd
16013    if test -f "${new_path}.exe"; then
16014       input_to_shortpath="${new_path}.exe"
16015    elif test -f "${new_path}.cmd"; then
16016       input_to_shortpath="${new_path}.cmd"
16017    else
16018      { $as_echo "$as_me:$LINENO: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16019$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16020      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16021$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16022      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of VS_ENV_CMD" >&5
16023$as_echo "$as_me: error: Cannot locate the the path of VS_ENV_CMD" >&2;}
16024   { (exit 1); exit 1; }; }
16025    fi
16026  else
16027    input_to_shortpath="$new_path"
16028  fi
16029
16030  # Call helper function which possibly converts this using DOS-style short mode.
16031  # If so, the updated path is stored in $new_path.
16032  new_path="$input_to_shortpath"
16033
16034  input_path="$input_to_shortpath"
16035  # Check if we need to convert this using DOS-style short mode. If the path
16036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16037  # take no chances and rewrite it.
16038  # Note: m4 eats our [], so we need to use [ and ] instead.
16039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16040  if test "x$has_forbidden_chars" != x; then
16041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16045      # Going to short mode and back again did indeed matter. Since short mode is
16046      # case insensitive, let's make it lowercase to improve readability.
16047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16048      # Now convert it back to Unix-stile (cygpath)
16049      input_path=`$CYGPATH -u "$shortmode_path"`
16050      new_path="$input_path"
16051    fi
16052  fi
16053
16054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16055  if test "x$test_cygdrive_prefix" = x; then
16056    # As a simple fix, exclude /usr/bin since it's not a real path.
16057    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16059      # a path prefixed by /cygdrive for fixpath to work.
16060      new_path="$CYGWIN_ROOT_PATH$input_path"
16061    fi
16062  fi
16063
16064  # remove trailing .exe if any
16065  new_path="${new_path/%.exe/}"
16066
16067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16068
16069  # First separate the path from the arguments. This will split at the first
16070  # space.
16071  complete="$VS_ENV_CMD"
16072  path="${complete%% *}"
16073  tmp="$complete EOL"
16074  arguments="${tmp#* }"
16075
16076  # Input might be given as Windows format, start by converting to
16077  # unix format.
16078  new_path="$path"
16079
16080  windows_path="$new_path"
16081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16082    unix_path=`$CYGPATH -u "$windows_path"`
16083    new_path="$unix_path"
16084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16086    new_path="$unix_path"
16087  fi
16088
16089
16090  # Now try to locate executable using which
16091  new_path=`$WHICH "$new_path" 2> /dev/null`
16092
16093  if test "x$new_path" = x; then
16094    # Oops. Which didn't find the executable.
16095    # The splitting of arguments from the executable at a space might have been incorrect,
16096    # since paths with space are more likely in Windows. Give it another try with the whole
16097    # argument.
16098    path="$complete"
16099    arguments="EOL"
16100    new_path="$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
16112    new_path=`$WHICH "$new_path" 2> /dev/null`
16113
16114    if test "x$new_path" = x; then
16115      # It's still not found. Now this is an unrecoverable error.
16116      { $as_echo "$as_me:$LINENO: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16117$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16118      has_space=`$ECHO "$complete" | $GREP " "`
16119      if test "x$has_space" != x; then
16120        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16121$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16122      fi
16123      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of VS_ENV_CMD" >&5
16124$as_echo "$as_me: error: Cannot locate the the path of VS_ENV_CMD" >&2;}
16125   { (exit 1); exit 1; }; }
16126    fi
16127  fi
16128
16129  # Now new_path has a complete unix path to the binary
16130  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16131    # Keep paths in /bin as-is, but remove trailing .exe if any
16132    new_path="${new_path/%.exe/}"
16133    # Do not save /bin paths to all_fixpath_prefixes!
16134  else
16135    # Not in mixed or Windows style, start by that.
16136    new_path=`cmd //c echo $new_path`
16137
16138  input_path="$new_path"
16139  # Check if we need to convert this using DOS-style short mode. If the path
16140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16141  # take no chances and rewrite it.
16142  # Note: m4 eats our [], so we need to use [ and ] instead.
16143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16144  if test "x$has_forbidden_chars" != x; then
16145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16147  fi
16148
16149    # Output is in $new_path
16150
16151  windows_path="$new_path"
16152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16153    unix_path=`$CYGPATH -u "$windows_path"`
16154    new_path="$unix_path"
16155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16157    new_path="$unix_path"
16158  fi
16159
16160    # remove trailing .exe if any
16161    new_path="${new_path/%.exe/}"
16162
16163    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16164    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16165  fi
16166
16167  else
16168    # We're on a posix platform. Hooray! :)
16169    # First separate the path from the arguments. This will split at the first
16170    # space.
16171    complete="$VS_ENV_CMD"
16172    path="${complete%% *}"
16173    tmp="$complete EOL"
16174    arguments="${tmp#* }"
16175
16176    new_path=`$WHICH $path 2> /dev/null`
16177    if test "x$new_path" = x; then
16178      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16179      if test "x$is_absolute_path" != x; then
16180        { $as_echo "$as_me:$LINENO: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&5
16181$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&6;}
16182        new_path="$path"
16183      else
16184        { $as_echo "$as_me:$LINENO: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16185$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16186        has_space=`$ECHO "$complete" | $GREP " "`
16187        if test "x$has_space" != x; then
16188          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
16189$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16190        fi
16191        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of VS_ENV_CMD" >&5
16192$as_echo "$as_me: error: Cannot locate the the path of VS_ENV_CMD" >&2;}
16193   { (exit 1); exit 1; }; }
16194      fi
16195    fi
16196  fi
16197
16198  # Now join together the path and the arguments once again
16199  if test "x$arguments" != xEOL; then
16200      new_complete="$new_path ${arguments% *}"
16201  else
16202      new_complete="$new_path"
16203  fi
16204
16205  if test "x$complete" != "x$new_complete"; then
16206    VS_ENV_CMD="$new_complete"
16207    { $as_echo "$as_me:$LINENO: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16208$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16209  fi
16210
16211
16212    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16213    { $as_echo "$as_me:$LINENO: Trying to extract Visual Studio environment variables" >&5
16214$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16215    cd $OUTPUT_ROOT
16216    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16217    # to autoconf standards.
16218
16219    #----
16220
16221    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16222    # but calculate the difference in Cygwin environment before/after running it and then
16223    # apply the diff.
16224
16225    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16226      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16227      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16228      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16229    else
16230      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16231      _dosbash=`cmd //c echo \`which bash\``
16232    fi
16233
16234    # generate the set of exported vars before/after the vs10 setup
16235    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16236    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16237    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16238    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16239
16240    # Now execute the newly created bat file.
16241    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16242    cmd /c localdevenvtmp.bat | cat
16243
16244    # apply the diff (less some non-vs10 vars named by "!")
16245    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16246    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16247    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16248
16249    # cleanup
16250    $RM localdevenvtmp*
16251    #----
16252    cd $CURDIR
16253    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16254      { $as_echo "$as_me:$LINENO: result: no" >&5
16255$as_echo "no" >&6; }
16256      { $as_echo "$as_me:$LINENO: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16257$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16258      { $as_echo "$as_me:$LINENO: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16259$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16260      { $as_echo "$as_me:$LINENO: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16261$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16262      { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
16263$as_echo "$as_me: error: Cannot continue" >&2;}
16264   { (exit 1); exit 1; }; }
16265    fi
16266
16267    # Now set all paths and other env variables. This will allow the rest of
16268    # the configure script to find and run the compiler in the proper way.
16269    { $as_echo "$as_me:$LINENO: Setting extracted environment variables" >&5
16270$as_echo "$as_me: Setting extracted environment variables" >&6;}
16271    . $OUTPUT_ROOT/localdevenv.sh
16272  else
16273    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16274    { $as_echo "$as_me:$LINENO: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16275$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16276  fi
16277
16278  # At this point, we should have corrent variables in the environment, or we can't continue.
16279  { $as_echo "$as_me:$LINENO: checking for Visual Studio variables" >&5
16280$as_echo_n "checking for Visual Studio variables... " >&6; }
16281
16282  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16283    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16284      { $as_echo "$as_me:$LINENO: result: present but broken" >&5
16285$as_echo "present but broken" >&6; }
16286      { { $as_echo "$as_me:$LINENO: error: Your VC command prompt seems broken, INCLUDE and/or LIB is missing." >&5
16287$as_echo "$as_me: error: Your VC command prompt seems broken, INCLUDE and/or LIB is missing." >&2;}
16288   { (exit 1); exit 1; }; }
16289    else
16290      { $as_echo "$as_me:$LINENO: result: ok" >&5
16291$as_echo "ok" >&6; }
16292      VS_INCLUDE="$INCLUDE"
16293      VS_LIB="$LIB"
16294      VS_PATH="$PATH"
16295
16296
16297
16298    fi
16299  else
16300    { $as_echo "$as_me:$LINENO: result: not found" >&5
16301$as_echo "not found" >&6; }
16302
16303    if test "x$VS_ENV_CMD" = x; then
16304      { $as_echo "$as_me:$LINENO: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16305$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16306      { $as_echo "$as_me:$LINENO: nor is this script run from a Visual Studio command prompt." >&5
16307$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16308    else
16309      { $as_echo "$as_me:$LINENO: Running the extraction script failed." >&5
16310$as_echo "$as_me: Running the extraction script failed." >&6;}
16311    fi
16312    { $as_echo "$as_me:$LINENO: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16313$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16314    { $as_echo "$as_me:$LINENO: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16315$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16316    { { $as_echo "$as_me:$LINENO: error: Cannot continue" >&5
16317$as_echo "$as_me: error: Cannot continue" >&2;}
16318   { (exit 1); exit 1; }; }
16319  fi
16320
16321  { $as_echo "$as_me:$LINENO: checking for msvcr100.dll" >&5
16322$as_echo_n "checking for msvcr100.dll... " >&6; }
16323
16324# Check whether --with-msvcr-dll was given.
16325if test "${with_msvcr_dll+set}" = set; then
16326  withval=$with_msvcr_dll;
16327fi
16328
16329  if test "x$with_msvcr_dll" != x; then
16330    MSVCR_DLL="$with_msvcr_dll"
16331  else
16332    if test "x$VCINSTALLDIR" != x; then
16333      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16334        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16335      else
16336        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16337        if test "x$MSVCR_DLL" = x; then
16338          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16339        fi
16340      fi
16341      if test "x$MSVCR_DLL" != x; then
16342        { $as_echo "$as_me:$LINENO: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16343$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16344      else
16345        { $as_echo "$as_me:$LINENO: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16346$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16347      fi
16348    fi
16349    if test "x$MSVCR_DLL" = x; then
16350      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16351        { $as_echo "$as_me:$LINENO: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16352$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16353        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16354      fi
16355    fi
16356  fi
16357  if test "x$MSVCR_DLL" = x; then
16358    { $as_echo "$as_me:$LINENO: result: no" >&5
16359$as_echo "no" >&6; }
16360    { { $as_echo "$as_me:$LINENO: error: Could not find msvcr100.dll !" >&5
16361$as_echo "$as_me: error: Could not find msvcr100.dll !" >&2;}
16362   { (exit 1); exit 1; }; }
16363  fi
16364  { $as_echo "$as_me:$LINENO: result: $MSVCR_DLL" >&5
16365$as_echo "$MSVCR_DLL" >&6; }
16366
16367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16368
16369  # Input might be given as Windows format, start by converting to
16370  # unix format.
16371  path="$MSVCR_DLL"
16372  new_path=`$CYGPATH -u "$path"`
16373
16374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16377  # "foo.exe" is OK but "foo" is an error.
16378  #
16379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16380  # It is also a way to make sure we got the proper file name for the real test later on.
16381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16382  if test "x$test_shortpath" = x; then
16383    { $as_echo "$as_me:$LINENO: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16384$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16385    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MSVCR_DLL" >&5
16386$as_echo "$as_me: error: Cannot locate the the path of MSVCR_DLL" >&2;}
16387   { (exit 1); exit 1; }; }
16388  fi
16389
16390  # Call helper function which possibly converts this using DOS-style short mode.
16391  # If so, the updated path is stored in $new_path.
16392
16393  input_path="$new_path"
16394  # Check if we need to convert this using DOS-style short mode. If the path
16395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16396  # take no chances and rewrite it.
16397  # Note: m4 eats our [], so we need to use [ and ] instead.
16398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16399  if test "x$has_forbidden_chars" != x; then
16400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16404      # Going to short mode and back again did indeed matter. Since short mode is
16405      # case insensitive, let's make it lowercase to improve readability.
16406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16407      # Now convert it back to Unix-stile (cygpath)
16408      input_path=`$CYGPATH -u "$shortmode_path"`
16409      new_path="$input_path"
16410    fi
16411  fi
16412
16413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16414  if test "x$test_cygdrive_prefix" = x; then
16415    # As a simple fix, exclude /usr/bin since it's not a real path.
16416    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16418      # a path prefixed by /cygdrive for fixpath to work.
16419      new_path="$CYGWIN_ROOT_PATH$input_path"
16420    fi
16421  fi
16422
16423
16424  if test "x$path" != "x$new_path"; then
16425    MSVCR_DLL="$new_path"
16426    { $as_echo "$as_me:$LINENO: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16427$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16428  fi
16429
16430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16431
16432  path="$MSVCR_DLL"
16433  has_colon=`$ECHO $path | $GREP ^.:`
16434  new_path="$path"
16435  if test "x$has_colon" = x; then
16436    # Not in mixed or Windows style, start by that.
16437    new_path=`cmd //c echo $path`
16438  fi
16439
16440
16441  input_path="$new_path"
16442  # Check if we need to convert this using DOS-style short mode. If the path
16443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16444  # take no chances and rewrite it.
16445  # Note: m4 eats our [], so we need to use [ and ] instead.
16446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16447  if test "x$has_forbidden_chars" != x; then
16448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16450  fi
16451
16452
16453  windows_path="$new_path"
16454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16455    unix_path=`$CYGPATH -u "$windows_path"`
16456    new_path="$unix_path"
16457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16459    new_path="$unix_path"
16460  fi
16461
16462  if test "x$path" != "x$new_path"; then
16463    MSVCR_DLL="$new_path"
16464    { $as_echo "$as_me:$LINENO: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16465$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16466  fi
16467
16468  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16469  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16470
16471  else
16472    # We're on a posix platform. Hooray! :)
16473    path="$MSVCR_DLL"
16474
16475    if test ! -f "$path" && test ! -d "$path"; then
16476      { { $as_echo "$as_me:$LINENO: error: The path of MSVCR_DLL, which resolves as \"$path\", is not found." >&5
16477$as_echo "$as_me: error: The path of MSVCR_DLL, which resolves as \"$path\", is not found." >&2;}
16478   { (exit 1); exit 1; }; }
16479    fi
16480
16481    has_space=`$ECHO "$path" | $GREP " "`
16482    if test "x$has_space" != x; then
16483      { $as_echo "$as_me:$LINENO: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16484$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16485      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
16486$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
16487   { (exit 1); exit 1; }; }
16488    fi
16489  fi
16490
16491
16492fi
16493
16494
16495
16496# If --build AND --host is set, then the configure script will find any
16497# cross compilation tools in the PATH. Cross compilation tools
16498# follows the cross compilation standard where they are prefixed with ${host}.
16499# For example the binary i686-sun-solaris2.10-gcc
16500# will cross compile for i686-sun-solaris2.10
16501# If neither of build and host is not set, then build=host and the
16502# default compiler found in the path will be used.
16503# Setting only --host, does not seem to be really supported.
16504# Please set both --build and --host if you want to cross compile.
16505
16506if test "x$COMPILE_TYPE" = "xcross"; then
16507    # Now we to find a C/C++ compiler that can build executables for the build
16508    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16509    # once. Also, we need to do this before adding a tools dir to the path,
16510    # otherwise we might pick up cross-compilers which don't use standard naming.
16511    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16512    # to wait until they are properly discovered.
16513    for ac_prog in cl cc gcc
16514do
16515  # Extract the first word of "$ac_prog", so it can be a program name with args.
16516set dummy $ac_prog; ac_word=$2
16517{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16518$as_echo_n "checking for $ac_word... " >&6; }
16519if test "${ac_cv_path_BUILD_CC+set}" = set; then
16520  $as_echo_n "(cached) " >&6
16521else
16522  case $BUILD_CC in
16523  [\\/]* | ?:[\\/]*)
16524  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16525  ;;
16526  *)
16527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16528for as_dir in $PATH
16529do
16530  IFS=$as_save_IFS
16531  test -z "$as_dir" && as_dir=.
16532  for ac_exec_ext in '' $ac_executable_extensions; do
16533  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16534    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16535    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16536    break 2
16537  fi
16538done
16539done
16540IFS=$as_save_IFS
16541
16542  ;;
16543esac
16544fi
16545BUILD_CC=$ac_cv_path_BUILD_CC
16546if test -n "$BUILD_CC"; then
16547  { $as_echo "$as_me:$LINENO: result: $BUILD_CC" >&5
16548$as_echo "$BUILD_CC" >&6; }
16549else
16550  { $as_echo "$as_me:$LINENO: result: no" >&5
16551$as_echo "no" >&6; }
16552fi
16553
16554
16555  test -n "$BUILD_CC" && break
16556done
16557
16558
16559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16560
16561  # First separate the path from the arguments. This will split at the first
16562  # space.
16563  complete="$BUILD_CC"
16564  path="${complete%% *}"
16565  tmp="$complete EOL"
16566  arguments="${tmp#* }"
16567
16568  # Input might be given as Windows format, start by converting to
16569  # unix format.
16570  new_path=`$CYGPATH -u "$path"`
16571
16572  # Now try to locate executable using which
16573  new_path=`$WHICH "$new_path" 2> /dev/null`
16574  # bat and cmd files are not always considered executable in cygwin causing which
16575  # to not find them
16576  if test "x$new_path" = x \
16577           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16578           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16579    new_path=`$CYGPATH -u "$path"`
16580  fi
16581  if test "x$new_path" = x; then
16582    # Oops. Which didn't find the executable.
16583    # The splitting of arguments from the executable at a space might have been incorrect,
16584    # since paths with space are more likely in Windows. Give it another try with the whole
16585    # argument.
16586    path="$complete"
16587    arguments="EOL"
16588    new_path=`$CYGPATH -u "$path"`
16589    new_path=`$WHICH "$new_path" 2> /dev/null`
16590    # bat and cmd files are not always considered executable in cygwin causing which
16591    # to not find them
16592    if test "x$new_path" = x \
16593             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16594             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16595      new_path=`$CYGPATH -u "$path"`
16596    fi
16597    if test "x$new_path" = x; then
16598      # It's still not found. Now this is an unrecoverable error.
16599      { $as_echo "$as_me:$LINENO: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16600$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16601      has_space=`$ECHO "$complete" | $GREP " "`
16602      if test "x$has_space" != x; then
16603        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16605      fi
16606      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CC" >&5
16607$as_echo "$as_me: error: Cannot locate the the path of BUILD_CC" >&2;}
16608   { (exit 1); exit 1; }; }
16609    fi
16610  fi
16611
16612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16615  # "foo.exe" is OK but "foo" is an error.
16616  #
16617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16618  # It is also a way to make sure we got the proper file name for the real test later on.
16619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16620  if test "x$test_shortpath" = x; then
16621    # Short path failed, file does not exist as specified.
16622    # Try adding .exe or .cmd
16623    if test -f "${new_path}.exe"; then
16624       input_to_shortpath="${new_path}.exe"
16625    elif test -f "${new_path}.cmd"; then
16626       input_to_shortpath="${new_path}.cmd"
16627    else
16628      { $as_echo "$as_me:$LINENO: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
16629$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
16630      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16631$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16632      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CC" >&5
16633$as_echo "$as_me: error: Cannot locate the the path of BUILD_CC" >&2;}
16634   { (exit 1); exit 1; }; }
16635    fi
16636  else
16637    input_to_shortpath="$new_path"
16638  fi
16639
16640  # Call helper function which possibly converts this using DOS-style short mode.
16641  # If so, the updated path is stored in $new_path.
16642  new_path="$input_to_shortpath"
16643
16644  input_path="$input_to_shortpath"
16645  # Check if we need to convert this using DOS-style short mode. If the path
16646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16647  # take no chances and rewrite it.
16648  # Note: m4 eats our [], so we need to use [ and ] instead.
16649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16650  if test "x$has_forbidden_chars" != x; then
16651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16655      # Going to short mode and back again did indeed matter. Since short mode is
16656      # case insensitive, let's make it lowercase to improve readability.
16657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16658      # Now convert it back to Unix-stile (cygpath)
16659      input_path=`$CYGPATH -u "$shortmode_path"`
16660      new_path="$input_path"
16661    fi
16662  fi
16663
16664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16665  if test "x$test_cygdrive_prefix" = x; then
16666    # As a simple fix, exclude /usr/bin since it's not a real path.
16667    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16669      # a path prefixed by /cygdrive for fixpath to work.
16670      new_path="$CYGWIN_ROOT_PATH$input_path"
16671    fi
16672  fi
16673
16674  # remove trailing .exe if any
16675  new_path="${new_path/%.exe/}"
16676
16677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16678
16679  # First separate the path from the arguments. This will split at the first
16680  # space.
16681  complete="$BUILD_CC"
16682  path="${complete%% *}"
16683  tmp="$complete EOL"
16684  arguments="${tmp#* }"
16685
16686  # Input might be given as Windows format, start by converting to
16687  # unix format.
16688  new_path="$path"
16689
16690  windows_path="$new_path"
16691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16692    unix_path=`$CYGPATH -u "$windows_path"`
16693    new_path="$unix_path"
16694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16696    new_path="$unix_path"
16697  fi
16698
16699
16700  # Now try to locate executable using which
16701  new_path=`$WHICH "$new_path" 2> /dev/null`
16702
16703  if test "x$new_path" = x; then
16704    # Oops. Which didn't find the executable.
16705    # The splitting of arguments from the executable at a space might have been incorrect,
16706    # since paths with space are more likely in Windows. Give it another try with the whole
16707    # argument.
16708    path="$complete"
16709    arguments="EOL"
16710    new_path="$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
16722    new_path=`$WHICH "$new_path" 2> /dev/null`
16723
16724    if test "x$new_path" = x; then
16725      # It's still not found. Now this is an unrecoverable error.
16726      { $as_echo "$as_me:$LINENO: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16727$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16728      has_space=`$ECHO "$complete" | $GREP " "`
16729      if test "x$has_space" != x; then
16730        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16731$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16732      fi
16733      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CC" >&5
16734$as_echo "$as_me: error: Cannot locate the the path of BUILD_CC" >&2;}
16735   { (exit 1); exit 1; }; }
16736    fi
16737  fi
16738
16739  # Now new_path has a complete unix path to the binary
16740  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16741    # Keep paths in /bin as-is, but remove trailing .exe if any
16742    new_path="${new_path/%.exe/}"
16743    # Do not save /bin paths to all_fixpath_prefixes!
16744  else
16745    # Not in mixed or Windows style, start by that.
16746    new_path=`cmd //c echo $new_path`
16747
16748  input_path="$new_path"
16749  # Check if we need to convert this using DOS-style short mode. If the path
16750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16751  # take no chances and rewrite it.
16752  # Note: m4 eats our [], so we need to use [ and ] instead.
16753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16754  if test "x$has_forbidden_chars" != x; then
16755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16756    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16757  fi
16758
16759    # Output is in $new_path
16760
16761  windows_path="$new_path"
16762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16763    unix_path=`$CYGPATH -u "$windows_path"`
16764    new_path="$unix_path"
16765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16767    new_path="$unix_path"
16768  fi
16769
16770    # remove trailing .exe if any
16771    new_path="${new_path/%.exe/}"
16772
16773    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16774    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16775  fi
16776
16777  else
16778    # We're on a posix platform. Hooray! :)
16779    # First separate the path from the arguments. This will split at the first
16780    # space.
16781    complete="$BUILD_CC"
16782    path="${complete%% *}"
16783    tmp="$complete EOL"
16784    arguments="${tmp#* }"
16785
16786    new_path=`$WHICH $path 2> /dev/null`
16787    if test "x$new_path" = x; then
16788      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16789      if test "x$is_absolute_path" != x; then
16790        { $as_echo "$as_me:$LINENO: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&5
16791$as_echo "$as_me: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&6;}
16792        new_path="$path"
16793      else
16794        { $as_echo "$as_me:$LINENO: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16795$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16796        has_space=`$ECHO "$complete" | $GREP " "`
16797        if test "x$has_space" != x; then
16798          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
16799$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16800        fi
16801        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CC" >&5
16802$as_echo "$as_me: error: Cannot locate the the path of BUILD_CC" >&2;}
16803   { (exit 1); exit 1; }; }
16804      fi
16805    fi
16806  fi
16807
16808  # Now join together the path and the arguments once again
16809  if test "x$arguments" != xEOL; then
16810      new_complete="$new_path ${arguments% *}"
16811  else
16812      new_complete="$new_path"
16813  fi
16814
16815  if test "x$complete" != "x$new_complete"; then
16816    BUILD_CC="$new_complete"
16817    { $as_echo "$as_me:$LINENO: Rewriting BUILD_CC to \"$new_complete\"" >&5
16818$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
16819  fi
16820
16821    for ac_prog in cl CC g++
16822do
16823  # Extract the first word of "$ac_prog", so it can be a program name with args.
16824set dummy $ac_prog; ac_word=$2
16825{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16826$as_echo_n "checking for $ac_word... " >&6; }
16827if test "${ac_cv_path_BUILD_CXX+set}" = set; then
16828  $as_echo_n "(cached) " >&6
16829else
16830  case $BUILD_CXX in
16831  [\\/]* | ?:[\\/]*)
16832  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
16833  ;;
16834  *)
16835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16836for as_dir in $PATH
16837do
16838  IFS=$as_save_IFS
16839  test -z "$as_dir" && as_dir=.
16840  for ac_exec_ext in '' $ac_executable_extensions; do
16841  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16842    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
16843    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16844    break 2
16845  fi
16846done
16847done
16848IFS=$as_save_IFS
16849
16850  ;;
16851esac
16852fi
16853BUILD_CXX=$ac_cv_path_BUILD_CXX
16854if test -n "$BUILD_CXX"; then
16855  { $as_echo "$as_me:$LINENO: result: $BUILD_CXX" >&5
16856$as_echo "$BUILD_CXX" >&6; }
16857else
16858  { $as_echo "$as_me:$LINENO: result: no" >&5
16859$as_echo "no" >&6; }
16860fi
16861
16862
16863  test -n "$BUILD_CXX" && break
16864done
16865
16866
16867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16868
16869  # First separate the path from the arguments. This will split at the first
16870  # space.
16871  complete="$BUILD_CXX"
16872  path="${complete%% *}"
16873  tmp="$complete EOL"
16874  arguments="${tmp#* }"
16875
16876  # Input might be given as Windows format, start by converting to
16877  # unix format.
16878  new_path=`$CYGPATH -u "$path"`
16879
16880  # Now try to locate executable using which
16881  new_path=`$WHICH "$new_path" 2> /dev/null`
16882  # bat and cmd files are not always considered executable in cygwin causing which
16883  # to not find them
16884  if test "x$new_path" = x \
16885           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16886           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16887    new_path=`$CYGPATH -u "$path"`
16888  fi
16889  if test "x$new_path" = x; then
16890    # Oops. Which didn't find the executable.
16891    # The splitting of arguments from the executable at a space might have been incorrect,
16892    # since paths with space are more likely in Windows. Give it another try with the whole
16893    # argument.
16894    path="$complete"
16895    arguments="EOL"
16896    new_path=`$CYGPATH -u "$path"`
16897    new_path=`$WHICH "$new_path" 2> /dev/null`
16898    # bat and cmd files are not always considered executable in cygwin causing which
16899    # to not find them
16900    if test "x$new_path" = x \
16901             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16902             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16903      new_path=`$CYGPATH -u "$path"`
16904    fi
16905    if test "x$new_path" = x; then
16906      # It's still not found. Now this is an unrecoverable error.
16907      { $as_echo "$as_me:$LINENO: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
16908$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
16909      has_space=`$ECHO "$complete" | $GREP " "`
16910      if test "x$has_space" != x; then
16911        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16913      fi
16914      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CXX" >&5
16915$as_echo "$as_me: error: Cannot locate the the path of BUILD_CXX" >&2;}
16916   { (exit 1); exit 1; }; }
16917    fi
16918  fi
16919
16920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16923  # "foo.exe" is OK but "foo" is an error.
16924  #
16925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16926  # It is also a way to make sure we got the proper file name for the real test later on.
16927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16928  if test "x$test_shortpath" = x; then
16929    # Short path failed, file does not exist as specified.
16930    # Try adding .exe or .cmd
16931    if test -f "${new_path}.exe"; then
16932       input_to_shortpath="${new_path}.exe"
16933    elif test -f "${new_path}.cmd"; then
16934       input_to_shortpath="${new_path}.cmd"
16935    else
16936      { $as_echo "$as_me:$LINENO: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
16937$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
16938      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16939$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16940      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CXX" >&5
16941$as_echo "$as_me: error: Cannot locate the the path of BUILD_CXX" >&2;}
16942   { (exit 1); exit 1; }; }
16943    fi
16944  else
16945    input_to_shortpath="$new_path"
16946  fi
16947
16948  # Call helper function which possibly converts this using DOS-style short mode.
16949  # If so, the updated path is stored in $new_path.
16950  new_path="$input_to_shortpath"
16951
16952  input_path="$input_to_shortpath"
16953  # Check if we need to convert this using DOS-style short mode. If the path
16954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16955  # take no chances and rewrite it.
16956  # Note: m4 eats our [], so we need to use [ and ] instead.
16957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16958  if test "x$has_forbidden_chars" != x; then
16959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16963      # Going to short mode and back again did indeed matter. Since short mode is
16964      # case insensitive, let's make it lowercase to improve readability.
16965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16966      # Now convert it back to Unix-stile (cygpath)
16967      input_path=`$CYGPATH -u "$shortmode_path"`
16968      new_path="$input_path"
16969    fi
16970  fi
16971
16972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16973  if test "x$test_cygdrive_prefix" = x; then
16974    # As a simple fix, exclude /usr/bin since it's not a real path.
16975    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16977      # a path prefixed by /cygdrive for fixpath to work.
16978      new_path="$CYGWIN_ROOT_PATH$input_path"
16979    fi
16980  fi
16981
16982  # remove trailing .exe if any
16983  new_path="${new_path/%.exe/}"
16984
16985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16986
16987  # First separate the path from the arguments. This will split at the first
16988  # space.
16989  complete="$BUILD_CXX"
16990  path="${complete%% *}"
16991  tmp="$complete EOL"
16992  arguments="${tmp#* }"
16993
16994  # Input might be given as Windows format, start by converting to
16995  # unix format.
16996  new_path="$path"
16997
16998  windows_path="$new_path"
16999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17000    unix_path=`$CYGPATH -u "$windows_path"`
17001    new_path="$unix_path"
17002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17004    new_path="$unix_path"
17005  fi
17006
17007
17008  # Now try to locate executable using which
17009  new_path=`$WHICH "$new_path" 2> /dev/null`
17010
17011  if test "x$new_path" = x; then
17012    # Oops. Which didn't find the executable.
17013    # The splitting of arguments from the executable at a space might have been incorrect,
17014    # since paths with space are more likely in Windows. Give it another try with the whole
17015    # argument.
17016    path="$complete"
17017    arguments="EOL"
17018    new_path="$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
17030    new_path=`$WHICH "$new_path" 2> /dev/null`
17031
17032    if test "x$new_path" = x; then
17033      # It's still not found. Now this is an unrecoverable error.
17034      { $as_echo "$as_me:$LINENO: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17035$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17036      has_space=`$ECHO "$complete" | $GREP " "`
17037      if test "x$has_space" != x; then
17038        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17039$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17040      fi
17041      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CXX" >&5
17042$as_echo "$as_me: error: Cannot locate the the path of BUILD_CXX" >&2;}
17043   { (exit 1); exit 1; }; }
17044    fi
17045  fi
17046
17047  # Now new_path has a complete unix path to the binary
17048  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17049    # Keep paths in /bin as-is, but remove trailing .exe if any
17050    new_path="${new_path/%.exe/}"
17051    # Do not save /bin paths to all_fixpath_prefixes!
17052  else
17053    # Not in mixed or Windows style, start by that.
17054    new_path=`cmd //c echo $new_path`
17055
17056  input_path="$new_path"
17057  # Check if we need to convert this using DOS-style short mode. If the path
17058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17059  # take no chances and rewrite it.
17060  # Note: m4 eats our [], so we need to use [ and ] instead.
17061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17062  if test "x$has_forbidden_chars" != x; then
17063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17065  fi
17066
17067    # Output is in $new_path
17068
17069  windows_path="$new_path"
17070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17071    unix_path=`$CYGPATH -u "$windows_path"`
17072    new_path="$unix_path"
17073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17075    new_path="$unix_path"
17076  fi
17077
17078    # remove trailing .exe if any
17079    new_path="${new_path/%.exe/}"
17080
17081    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17082    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17083  fi
17084
17085  else
17086    # We're on a posix platform. Hooray! :)
17087    # First separate the path from the arguments. This will split at the first
17088    # space.
17089    complete="$BUILD_CXX"
17090    path="${complete%% *}"
17091    tmp="$complete EOL"
17092    arguments="${tmp#* }"
17093
17094    new_path=`$WHICH $path 2> /dev/null`
17095    if test "x$new_path" = x; then
17096      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17097      if test "x$is_absolute_path" != x; then
17098        { $as_echo "$as_me:$LINENO: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&5
17099$as_echo "$as_me: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&6;}
17100        new_path="$path"
17101      else
17102        { $as_echo "$as_me:$LINENO: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17103$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17104        has_space=`$ECHO "$complete" | $GREP " "`
17105        if test "x$has_space" != x; then
17106          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
17107$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17108        fi
17109        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_CXX" >&5
17110$as_echo "$as_me: error: Cannot locate the the path of BUILD_CXX" >&2;}
17111   { (exit 1); exit 1; }; }
17112      fi
17113    fi
17114  fi
17115
17116  # Now join together the path and the arguments once again
17117  if test "x$arguments" != xEOL; then
17118      new_complete="$new_path ${arguments% *}"
17119  else
17120      new_complete="$new_path"
17121  fi
17122
17123  if test "x$complete" != "x$new_complete"; then
17124    BUILD_CXX="$new_complete"
17125    { $as_echo "$as_me:$LINENO: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17126$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17127  fi
17128
17129    # Extract the first word of "ld", so it can be a program name with args.
17130set dummy ld; ac_word=$2
17131{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
17132$as_echo_n "checking for $ac_word... " >&6; }
17133if test "${ac_cv_path_BUILD_LD+set}" = set; then
17134  $as_echo_n "(cached) " >&6
17135else
17136  case $BUILD_LD in
17137  [\\/]* | ?:[\\/]*)
17138  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17139  ;;
17140  *)
17141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17142for as_dir in $PATH
17143do
17144  IFS=$as_save_IFS
17145  test -z "$as_dir" && as_dir=.
17146  for ac_exec_ext in '' $ac_executable_extensions; do
17147  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17148    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17149    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17150    break 2
17151  fi
17152done
17153done
17154IFS=$as_save_IFS
17155
17156  ;;
17157esac
17158fi
17159BUILD_LD=$ac_cv_path_BUILD_LD
17160if test -n "$BUILD_LD"; then
17161  { $as_echo "$as_me:$LINENO: result: $BUILD_LD" >&5
17162$as_echo "$BUILD_LD" >&6; }
17163else
17164  { $as_echo "$as_me:$LINENO: result: no" >&5
17165$as_echo "no" >&6; }
17166fi
17167
17168
17169
17170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17171
17172  # First separate the path from the arguments. This will split at the first
17173  # space.
17174  complete="$BUILD_LD"
17175  path="${complete%% *}"
17176  tmp="$complete EOL"
17177  arguments="${tmp#* }"
17178
17179  # Input might be given as Windows format, start by converting to
17180  # unix format.
17181  new_path=`$CYGPATH -u "$path"`
17182
17183  # Now try to locate executable using which
17184  new_path=`$WHICH "$new_path" 2> /dev/null`
17185  # bat and cmd files are not always considered executable in cygwin causing which
17186  # to not find them
17187  if test "x$new_path" = x \
17188           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17189           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17190    new_path=`$CYGPATH -u "$path"`
17191  fi
17192  if test "x$new_path" = x; then
17193    # Oops. Which didn't find the executable.
17194    # The splitting of arguments from the executable at a space might have been incorrect,
17195    # since paths with space are more likely in Windows. Give it another try with the whole
17196    # argument.
17197    path="$complete"
17198    arguments="EOL"
17199    new_path=`$CYGPATH -u "$path"`
17200    new_path=`$WHICH "$new_path" 2> /dev/null`
17201    # bat and cmd files are not always considered executable in cygwin causing which
17202    # to not find them
17203    if test "x$new_path" = x \
17204             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17205             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17206      new_path=`$CYGPATH -u "$path"`
17207    fi
17208    if test "x$new_path" = x; then
17209      # It's still not found. Now this is an unrecoverable error.
17210      { $as_echo "$as_me:$LINENO: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17211$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17212      has_space=`$ECHO "$complete" | $GREP " "`
17213      if test "x$has_space" != x; then
17214        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17216      fi
17217      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_LD" >&5
17218$as_echo "$as_me: error: Cannot locate the the path of BUILD_LD" >&2;}
17219   { (exit 1); exit 1; }; }
17220    fi
17221  fi
17222
17223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17226  # "foo.exe" is OK but "foo" is an error.
17227  #
17228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17229  # It is also a way to make sure we got the proper file name for the real test later on.
17230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17231  if test "x$test_shortpath" = x; then
17232    # Short path failed, file does not exist as specified.
17233    # Try adding .exe or .cmd
17234    if test -f "${new_path}.exe"; then
17235       input_to_shortpath="${new_path}.exe"
17236    elif test -f "${new_path}.cmd"; then
17237       input_to_shortpath="${new_path}.cmd"
17238    else
17239      { $as_echo "$as_me:$LINENO: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17240$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17241      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17242$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17243      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_LD" >&5
17244$as_echo "$as_me: error: Cannot locate the the path of BUILD_LD" >&2;}
17245   { (exit 1); exit 1; }; }
17246    fi
17247  else
17248    input_to_shortpath="$new_path"
17249  fi
17250
17251  # Call helper function which possibly converts this using DOS-style short mode.
17252  # If so, the updated path is stored in $new_path.
17253  new_path="$input_to_shortpath"
17254
17255  input_path="$input_to_shortpath"
17256  # Check if we need to convert this using DOS-style short mode. If the path
17257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17258  # take no chances and rewrite it.
17259  # Note: m4 eats our [], so we need to use [ and ] instead.
17260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17261  if test "x$has_forbidden_chars" != x; then
17262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17266      # Going to short mode and back again did indeed matter. Since short mode is
17267      # case insensitive, let's make it lowercase to improve readability.
17268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17269      # Now convert it back to Unix-stile (cygpath)
17270      input_path=`$CYGPATH -u "$shortmode_path"`
17271      new_path="$input_path"
17272    fi
17273  fi
17274
17275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17276  if test "x$test_cygdrive_prefix" = x; then
17277    # As a simple fix, exclude /usr/bin since it's not a real path.
17278    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17280      # a path prefixed by /cygdrive for fixpath to work.
17281      new_path="$CYGWIN_ROOT_PATH$input_path"
17282    fi
17283  fi
17284
17285  # remove trailing .exe if any
17286  new_path="${new_path/%.exe/}"
17287
17288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17289
17290  # First separate the path from the arguments. This will split at the first
17291  # space.
17292  complete="$BUILD_LD"
17293  path="${complete%% *}"
17294  tmp="$complete EOL"
17295  arguments="${tmp#* }"
17296
17297  # Input might be given as Windows format, start by converting to
17298  # unix format.
17299  new_path="$path"
17300
17301  windows_path="$new_path"
17302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17303    unix_path=`$CYGPATH -u "$windows_path"`
17304    new_path="$unix_path"
17305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17307    new_path="$unix_path"
17308  fi
17309
17310
17311  # Now try to locate executable using which
17312  new_path=`$WHICH "$new_path" 2> /dev/null`
17313
17314  if test "x$new_path" = x; then
17315    # Oops. Which didn't find the executable.
17316    # The splitting of arguments from the executable at a space might have been incorrect,
17317    # since paths with space are more likely in Windows. Give it another try with the whole
17318    # argument.
17319    path="$complete"
17320    arguments="EOL"
17321    new_path="$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
17333    new_path=`$WHICH "$new_path" 2> /dev/null`
17334
17335    if test "x$new_path" = x; then
17336      # It's still not found. Now this is an unrecoverable error.
17337      { $as_echo "$as_me:$LINENO: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17338$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17339      has_space=`$ECHO "$complete" | $GREP " "`
17340      if test "x$has_space" != x; then
17341        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17342$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17343      fi
17344      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_LD" >&5
17345$as_echo "$as_me: error: Cannot locate the the path of BUILD_LD" >&2;}
17346   { (exit 1); exit 1; }; }
17347    fi
17348  fi
17349
17350  # Now new_path has a complete unix path to the binary
17351  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17352    # Keep paths in /bin as-is, but remove trailing .exe if any
17353    new_path="${new_path/%.exe/}"
17354    # Do not save /bin paths to all_fixpath_prefixes!
17355  else
17356    # Not in mixed or Windows style, start by that.
17357    new_path=`cmd //c echo $new_path`
17358
17359  input_path="$new_path"
17360  # Check if we need to convert this using DOS-style short mode. If the path
17361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17362  # take no chances and rewrite it.
17363  # Note: m4 eats our [], so we need to use [ and ] instead.
17364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17365  if test "x$has_forbidden_chars" != x; then
17366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17368  fi
17369
17370    # Output is in $new_path
17371
17372  windows_path="$new_path"
17373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17374    unix_path=`$CYGPATH -u "$windows_path"`
17375    new_path="$unix_path"
17376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17378    new_path="$unix_path"
17379  fi
17380
17381    # remove trailing .exe if any
17382    new_path="${new_path/%.exe/}"
17383
17384    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17385    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17386  fi
17387
17388  else
17389    # We're on a posix platform. Hooray! :)
17390    # First separate the path from the arguments. This will split at the first
17391    # space.
17392    complete="$BUILD_LD"
17393    path="${complete%% *}"
17394    tmp="$complete EOL"
17395    arguments="${tmp#* }"
17396
17397    new_path=`$WHICH $path 2> /dev/null`
17398    if test "x$new_path" = x; then
17399      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17400      if test "x$is_absolute_path" != x; then
17401        { $as_echo "$as_me:$LINENO: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&5
17402$as_echo "$as_me: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&6;}
17403        new_path="$path"
17404      else
17405        { $as_echo "$as_me:$LINENO: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17406$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17407        has_space=`$ECHO "$complete" | $GREP " "`
17408        if test "x$has_space" != x; then
17409          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
17410$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17411        fi
17412        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of BUILD_LD" >&5
17413$as_echo "$as_me: error: Cannot locate the the path of BUILD_LD" >&2;}
17414   { (exit 1); exit 1; }; }
17415      fi
17416    fi
17417  fi
17418
17419  # Now join together the path and the arguments once again
17420  if test "x$arguments" != xEOL; then
17421      new_complete="$new_path ${arguments% *}"
17422  else
17423      new_complete="$new_path"
17424  fi
17425
17426  if test "x$complete" != "x$new_complete"; then
17427    BUILD_LD="$new_complete"
17428    { $as_echo "$as_me:$LINENO: Rewriting BUILD_LD to \"$new_complete\"" >&5
17429$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17430  fi
17431
17432fi
17433
17434
17435
17436
17437# If a devkit is found on the builddeps server, then prepend its path to the
17438# PATH variable. If there are cross compilers available in the devkit, these
17439# will be found by AC_PROG_CC et al.
17440DEVKIT=
17441
17442
17443    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17444        # Source the builddeps file again, to make sure it uses the latest variables!
17445        . $builddepsfile
17446        # Look for a target and build machine specific resource!
17447        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17448        if test "x$resource" = x; then
17449            # Ok, lets instead look for a target specific resource
17450            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17451        fi
17452        if test "x$resource" = x; then
17453            # Ok, lets instead look for a build specific resource
17454            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17455        fi
17456        if test "x$resource" = x; then
17457            # Ok, lets instead look for a generic resource
17458            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17459            resource=${builddep_devkit}
17460        fi
17461        if test "x$resource" != x; then
17462            { $as_echo "$as_me:$LINENO: Using builddeps $resource for devkit" >&5
17463$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17464	    # If the resource in the builddeps.conf file is an existing directory,
17465	    # for example /java/linux/cups
17466	    if test -d ${resource}; then
17467	       depdir=${resource}
17468	    else
17469
17470# devkit is for example mymodule
17471# $resource is for example libs/general/libmymod_1_2_3.zip
17472# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17473# $with_builddeps_dir is for example /localhome/builddeps
17474# depdir is the name of the variable into which we store the depdir, eg MYMOD
17475# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17476# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17477    filename=`basename $resource`
17478    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17479    filebase=${filename%%.*}
17480    extension=${filename#*.}
17481    installdir=$with_builddeps_dir/$filebase
17482    if test ! -f $installdir/$filename.unpacked; then
17483        { $as_echo "$as_me:$LINENO: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17484$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17485        if test ! -d $installdir; then
17486            mkdir -p $installdir
17487        fi
17488        if test ! -d $installdir; then
17489            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
17490$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
17491   { (exit 1); exit 1; }; }
17492        fi
17493        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17494        touch $tmpfile
17495        if test ! -f $tmpfile; then
17496            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
17497$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
17498   { (exit 1); exit 1; }; }
17499        fi
17500
17501    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17502    # $tmpfile is the local file name for the downloaded file.
17503    VALID_TOOL=no
17504    if test "x$BDEPS_FTP" = xwget; then
17505       VALID_TOOL=yes
17506       wget -O $tmpfile $with_builddeps_server/$resource
17507    fi
17508    if test "x$BDEPS_FTP" = xlftp; then
17509       VALID_TOOL=yes
17510       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17511    fi
17512    if test "x$BDEPS_FTP" = xftp; then
17513        VALID_TOOL=yes
17514        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17515        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17516        FTPUSERPWD=${FTPSERVER%%@*}
17517        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17518            FTPUSER=${userpwd%%:*}
17519            FTPPWD=${userpwd#*@}
17520            FTPSERVER=${FTPSERVER#*@}
17521        else
17522            FTPUSER=ftp
17523            FTPPWD=ftp
17524        fi
17525        # the "pass" command does not work on some
17526        # ftp clients (read ftp.exe) but if it works,
17527        # passive mode is better!
17528        (\
17529            echo "user $FTPUSER $FTPPWD"        ;\
17530            echo "pass"                         ;\
17531            echo "bin"                          ;\
17532            echo "get $FTPPATH $tmpfile"              ;\
17533        ) | ftp -in $FTPSERVER
17534    fi
17535    if test "x$VALID_TOOL" != xyes; then
17536       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
17537$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
17538   { (exit 1); exit 1; }; }
17539    fi
17540
17541        mv $tmpfile $installdir/$filename
17542        if test ! -s $installdir/$filename; then
17543            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
17544$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
17545   { (exit 1); exit 1; }; }
17546        fi
17547        case "$extension" in
17548            zip)  echo "Unzipping $installdir/$filename..."
17549               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17550            ;;
17551            tar.gz) echo "Untaring $installdir/$filename..."
17552               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17553            ;;
17554            tgz) echo "Untaring $installdir/$filename..."
17555               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17556            ;;
17557            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
17558$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
17559   { (exit 1); exit 1; }; }
17560            ;;
17561        esac
17562    fi
17563    if test -f $installdir/$filename.unpacked; then
17564        depdir=$installdir
17565    fi
17566
17567	    fi
17568            # Source the builddeps file again, because in the previous command, the depdir
17569            # was updated to point at the current build dependency install directory.
17570            . $builddepsfile
17571            # Now extract variables from the builddeps.conf files.
17572            theroot=${builddep_devkit_ROOT}
17573            thecflags=${builddep_devkit_CFLAGS}
17574            thelibs=${builddep_devkit_LIBS}
17575            if test "x$depdir" = x; then
17576                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency devkit" >&5
17577$as_echo "$as_me: error: Could not download build dependency devkit" >&2;}
17578   { (exit 1); exit 1; }; }
17579            fi
17580            DEVKIT=$depdir
17581            if test "x$theroot" != x; then
17582               DEVKIT="$theroot"
17583            fi
17584            if test "x$thecflags" != x; then
17585               DEVKIT_CFLAGS="$thecflags"
17586            fi
17587            if test "x$thelibs" != x; then
17588               DEVKIT_LIBS="$thelibs"
17589            fi
17590            # Found devkit
17591                     PATH="$DEVKIT/bin:$PATH"
17592                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17593                     if test "x$x_includes" = "xNONE"; then
17594                         x_includes="$SYS_ROOT/usr/include/X11"
17595                     fi
17596                     if test "x$x_libraries" = "xNONE"; then
17597                         x_libraries="$SYS_ROOT/usr/lib"
17598                     fi
17599
17600
17601        fi
17602
17603    fi
17604
17605
17606if test "x$SYS_ROOT" != "x/" ; then
17607    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
17608    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
17609    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17610    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17611    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
17612    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
17613fi
17614
17615# Store the CFLAGS etal passed to the configure script.
17616ORG_CFLAGS="$CFLAGS"
17617ORG_CXXFLAGS="$CXXFLAGS"
17618ORG_OBJCFLAGS="$OBJCFLAGS"
17619
17620# autoconf magic only relies on PATH, so update it if tools dir is specified
17621OLD_PATH="$PATH"
17622if test "x$TOOLS_DIR" != x; then
17623  PATH=$TOOLS_DIR:$PATH
17624fi
17625
17626
17627### Locate C compiler (CC)
17628
17629# gcc is almost always present, but on Windows we
17630# prefer cl.exe and on Solaris we prefer CC.
17631# Thus test for them in this order.
17632if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17633  # Do not probe for cc on MacOSX.
17634  COMPILER_CHECK_LIST="cl gcc"
17635else
17636  COMPILER_CHECK_LIST="cl cc gcc"
17637fi
17638
17639
17640  COMPILER_NAME=C
17641
17642  # Do a first initial attempt at searching the list of compiler names.
17643  # AC_PATH_PROGS can't be run multiple times with the same variable,
17644  # so create a new name for this run.
17645  for ac_prog in $COMPILER_CHECK_LIST
17646do
17647  # Extract the first word of "$ac_prog", so it can be a program name with args.
17648set dummy $ac_prog; ac_word=$2
17649{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
17650$as_echo_n "checking for $ac_word... " >&6; }
17651if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then
17652  $as_echo_n "(cached) " >&6
17653else
17654  case $POTENTIAL_CC in
17655  [\\/]* | ?:[\\/]*)
17656  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
17657  ;;
17658  *)
17659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17660for as_dir in $PATH
17661do
17662  IFS=$as_save_IFS
17663  test -z "$as_dir" && as_dir=.
17664  for ac_exec_ext in '' $ac_executable_extensions; do
17665  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17666    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
17667    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17668    break 2
17669  fi
17670done
17671done
17672IFS=$as_save_IFS
17673
17674  ;;
17675esac
17676fi
17677POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
17678if test -n "$POTENTIAL_CC"; then
17679  { $as_echo "$as_me:$LINENO: result: $POTENTIAL_CC" >&5
17680$as_echo "$POTENTIAL_CC" >&6; }
17681else
17682  { $as_echo "$as_me:$LINENO: result: no" >&5
17683$as_echo "no" >&6; }
17684fi
17685
17686
17687  test -n "$POTENTIAL_CC" && break
17688done
17689
17690  CC=$POTENTIAL_CC
17691
17692  if test "x$$CC" = x; then
17693
17694    # Print a helpful message on how to acquire the necessary build dependency.
17695    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
17696    MISSING_DEPENDENCY=devkit
17697    PKGHANDLER_COMMAND=
17698
17699    case $PKGHANDLER in
17700	apt-get)
17701                apt_help     $MISSING_DEPENDENCY ;;
17702    yum)
17703                yum_help     $MISSING_DEPENDENCY ;;
17704	port)
17705                port_help    $MISSING_DEPENDENCY ;;
17706	pkgutil)
17707                pkgutil_help $MISSING_DEPENDENCY ;;
17708	pkgadd)
17709                pkgadd_help  $MISSING_DEPENDENCY ;;
17710    * )
17711      break ;;
17712    esac
17713
17714    if test "x$PKGHANDLER_COMMAND" != x; then
17715        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
17716    fi
17717
17718      { { $as_echo "$as_me:$LINENO: error: Could not find a $COMPILER_NAME compiler. $HELP_MSG" >&5
17719$as_echo "$as_me: error: Could not find a $COMPILER_NAME compiler. $HELP_MSG" >&2;}
17720   { (exit 1); exit 1; }; }
17721  fi
17722
17723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17724
17725  # First separate the path from the arguments. This will split at the first
17726  # space.
17727  complete="$CC"
17728  path="${complete%% *}"
17729  tmp="$complete EOL"
17730  arguments="${tmp#* }"
17731
17732  # Input might be given as Windows format, start by converting to
17733  # unix format.
17734  new_path=`$CYGPATH -u "$path"`
17735
17736  # Now try to locate executable using which
17737  new_path=`$WHICH "$new_path" 2> /dev/null`
17738  # bat and cmd files are not always considered executable in cygwin causing which
17739  # to not find them
17740  if test "x$new_path" = x \
17741           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17742           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17743    new_path=`$CYGPATH -u "$path"`
17744  fi
17745  if test "x$new_path" = x; then
17746    # Oops. Which didn't find the executable.
17747    # The splitting of arguments from the executable at a space might have been incorrect,
17748    # since paths with space are more likely in Windows. Give it another try with the whole
17749    # argument.
17750    path="$complete"
17751    arguments="EOL"
17752    new_path=`$CYGPATH -u "$path"`
17753    new_path=`$WHICH "$new_path" 2> /dev/null`
17754    # bat and cmd files are not always considered executable in cygwin causing which
17755    # to not find them
17756    if test "x$new_path" = x \
17757             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17758             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17759      new_path=`$CYGPATH -u "$path"`
17760    fi
17761    if test "x$new_path" = x; then
17762      # It's still not found. Now this is an unrecoverable error.
17763      { $as_echo "$as_me:$LINENO: The path of CC, which resolves as \"$complete\", is not found." >&5
17764$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17765      has_space=`$ECHO "$complete" | $GREP " "`
17766      if test "x$has_space" != x; then
17767        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17768$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17769      fi
17770      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CC" >&5
17771$as_echo "$as_me: error: Cannot locate the the path of CC" >&2;}
17772   { (exit 1); exit 1; }; }
17773    fi
17774  fi
17775
17776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17779  # "foo.exe" is OK but "foo" is an error.
17780  #
17781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17782  # It is also a way to make sure we got the proper file name for the real test later on.
17783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17784  if test "x$test_shortpath" = x; then
17785    # Short path failed, file does not exist as specified.
17786    # Try adding .exe or .cmd
17787    if test -f "${new_path}.exe"; then
17788       input_to_shortpath="${new_path}.exe"
17789    elif test -f "${new_path}.cmd"; then
17790       input_to_shortpath="${new_path}.cmd"
17791    else
17792      { $as_echo "$as_me:$LINENO: The path of CC, which resolves as \"$new_path\", is invalid." >&5
17793$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
17794      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17795$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17796      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CC" >&5
17797$as_echo "$as_me: error: Cannot locate the the path of CC" >&2;}
17798   { (exit 1); exit 1; }; }
17799    fi
17800  else
17801    input_to_shortpath="$new_path"
17802  fi
17803
17804  # Call helper function which possibly converts this using DOS-style short mode.
17805  # If so, the updated path is stored in $new_path.
17806  new_path="$input_to_shortpath"
17807
17808  input_path="$input_to_shortpath"
17809  # Check if we need to convert this using DOS-style short mode. If the path
17810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17811  # take no chances and rewrite it.
17812  # Note: m4 eats our [], so we need to use [ and ] instead.
17813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17814  if test "x$has_forbidden_chars" != x; then
17815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17819      # Going to short mode and back again did indeed matter. Since short mode is
17820      # case insensitive, let's make it lowercase to improve readability.
17821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17822      # Now convert it back to Unix-stile (cygpath)
17823      input_path=`$CYGPATH -u "$shortmode_path"`
17824      new_path="$input_path"
17825    fi
17826  fi
17827
17828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17829  if test "x$test_cygdrive_prefix" = x; then
17830    # As a simple fix, exclude /usr/bin since it's not a real path.
17831    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17833      # a path prefixed by /cygdrive for fixpath to work.
17834      new_path="$CYGWIN_ROOT_PATH$input_path"
17835    fi
17836  fi
17837
17838  # remove trailing .exe if any
17839  new_path="${new_path/%.exe/}"
17840
17841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17842
17843  # First separate the path from the arguments. This will split at the first
17844  # space.
17845  complete="$CC"
17846  path="${complete%% *}"
17847  tmp="$complete EOL"
17848  arguments="${tmp#* }"
17849
17850  # Input might be given as Windows format, start by converting to
17851  # unix format.
17852  new_path="$path"
17853
17854  windows_path="$new_path"
17855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17856    unix_path=`$CYGPATH -u "$windows_path"`
17857    new_path="$unix_path"
17858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17860    new_path="$unix_path"
17861  fi
17862
17863
17864  # Now try to locate executable using which
17865  new_path=`$WHICH "$new_path" 2> /dev/null`
17866
17867  if test "x$new_path" = x; then
17868    # Oops. Which didn't find the executable.
17869    # The splitting of arguments from the executable at a space might have been incorrect,
17870    # since paths with space are more likely in Windows. Give it another try with the whole
17871    # argument.
17872    path="$complete"
17873    arguments="EOL"
17874    new_path="$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
17886    new_path=`$WHICH "$new_path" 2> /dev/null`
17887
17888    if test "x$new_path" = x; then
17889      # It's still not found. Now this is an unrecoverable error.
17890      { $as_echo "$as_me:$LINENO: The path of CC, which resolves as \"$complete\", is not found." >&5
17891$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17892      has_space=`$ECHO "$complete" | $GREP " "`
17893      if test "x$has_space" != x; then
17894        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17895$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17896      fi
17897      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CC" >&5
17898$as_echo "$as_me: error: Cannot locate the the path of CC" >&2;}
17899   { (exit 1); exit 1; }; }
17900    fi
17901  fi
17902
17903  # Now new_path has a complete unix path to the binary
17904  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17905    # Keep paths in /bin as-is, but remove trailing .exe if any
17906    new_path="${new_path/%.exe/}"
17907    # Do not save /bin paths to all_fixpath_prefixes!
17908  else
17909    # Not in mixed or Windows style, start by that.
17910    new_path=`cmd //c echo $new_path`
17911
17912  input_path="$new_path"
17913  # Check if we need to convert this using DOS-style short mode. If the path
17914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17915  # take no chances and rewrite it.
17916  # Note: m4 eats our [], so we need to use [ and ] instead.
17917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17918  if test "x$has_forbidden_chars" != x; then
17919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17921  fi
17922
17923    # Output is in $new_path
17924
17925  windows_path="$new_path"
17926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17927    unix_path=`$CYGPATH -u "$windows_path"`
17928    new_path="$unix_path"
17929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17931    new_path="$unix_path"
17932  fi
17933
17934    # remove trailing .exe if any
17935    new_path="${new_path/%.exe/}"
17936
17937    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17938    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17939  fi
17940
17941  else
17942    # We're on a posix platform. Hooray! :)
17943    # First separate the path from the arguments. This will split at the first
17944    # space.
17945    complete="$CC"
17946    path="${complete%% *}"
17947    tmp="$complete EOL"
17948    arguments="${tmp#* }"
17949
17950    new_path=`$WHICH $path 2> /dev/null`
17951    if test "x$new_path" = x; then
17952      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17953      if test "x$is_absolute_path" != x; then
17954        { $as_echo "$as_me:$LINENO: Resolving CC (as $path) with 'which' failed, using $path directly." >&5
17955$as_echo "$as_me: Resolving CC (as $path) with 'which' failed, using $path directly." >&6;}
17956        new_path="$path"
17957      else
17958        { $as_echo "$as_me:$LINENO: The path of CC, which resolves as \"$complete\", is not found." >&5
17959$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17960        has_space=`$ECHO "$complete" | $GREP " "`
17961        if test "x$has_space" != x; then
17962          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
17963$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17964        fi
17965        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CC" >&5
17966$as_echo "$as_me: error: Cannot locate the the path of CC" >&2;}
17967   { (exit 1); exit 1; }; }
17968      fi
17969    fi
17970  fi
17971
17972  # Now join together the path and the arguments once again
17973  if test "x$arguments" != xEOL; then
17974      new_complete="$new_path ${arguments% *}"
17975  else
17976      new_complete="$new_path"
17977  fi
17978
17979  if test "x$complete" != "x$new_complete"; then
17980    CC="$new_complete"
17981    { $as_echo "$as_me:$LINENO: Rewriting CC to \"$new_complete\"" >&5
17982$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
17983  fi
17984
17985  { $as_echo "$as_me:$LINENO: checking resolved symbolic links for CC" >&5
17986$as_echo_n "checking resolved symbolic links for CC... " >&6; }
17987  TEST_COMPILER="$CC"
17988
17989    if test "x$OPENJDK_BUILD_OS" != xwindows; then
17990        # Follow a chain of symbolic links. Use readlink
17991        # where it exists, else fall back to horribly
17992        # complicated shell code.
17993        if test "x$READLINK_TESTED" != yes; then
17994            # On MacOSX there is a readlink tool with a different
17995            # purpose than the GNU readlink tool. Check the found readlink.
17996            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
17997            if test "x$ISGNU" = x; then
17998                 # A readlink that we do not know how to use.
17999                 # Are there other non-GNU readlinks out there?
18000                 READLINK_TESTED=yes
18001                 READLINK=
18002            fi
18003        fi
18004
18005        if test "x$READLINK" != x; then
18006            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18007        else
18008            STARTDIR=$PWD
18009            COUNTER=0
18010            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18011            sym_link_file=`$BASENAME $TEST_COMPILER`
18012            while test $COUNTER -lt 20; do
18013                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18014                if test "x$ISLINK" == x; then
18015                    # This is not a symbolic link! We are done!
18016                    break
18017                fi
18018                # The link might be relative! We have to use cd to travel safely.
18019                cd $sym_link_dir
18020                # ... and we must get the to the absolute path, not one using symbolic links.
18021                cd `pwd -P`
18022                cd `$DIRNAME $ISLINK`
18023                sym_link_dir=`$THEPWDCMD`
18024                sym_link_file=`$BASENAME $ISLINK`
18025                let COUNTER=COUNTER+1
18026            done
18027            cd $STARTDIR
18028            TEST_COMPILER=$sym_link_dir/$sym_link_file
18029        fi
18030    fi
18031
18032  { $as_echo "$as_me:$LINENO: result: $TEST_COMPILER" >&5
18033$as_echo "$TEST_COMPILER" >&6; }
18034  { $as_echo "$as_me:$LINENO: checking if CC is disguised ccache" >&5
18035$as_echo_n "checking if CC is disguised ccache... " >&6; }
18036
18037  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18038  if test "x$COMPILER_BASENAME" = "xccache"; then
18039    { $as_echo "$as_me:$LINENO: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18040$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18041    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18042    # We want to control ccache invocation ourselves, so ignore this cc and try
18043    # searching again.
18044
18045    # Remove the path to the fake ccache cc from the PATH
18046    RETRY_COMPILER_SAVED_PATH="$PATH"
18047    COMPILER_DIRNAME=`$DIRNAME $CC`
18048    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18049
18050    # Try again looking for our compiler
18051    if test -n "$ac_tool_prefix"; then
18052  for ac_prog in $COMPILER_CHECK_LIST
18053  do
18054    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18055set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18056{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
18057$as_echo_n "checking for $ac_word... " >&6; }
18058if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then
18059  $as_echo_n "(cached) " >&6
18060else
18061  if test -n "$PROPER_COMPILER_CC"; then
18062  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18063else
18064as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18065for as_dir in $PATH
18066do
18067  IFS=$as_save_IFS
18068  test -z "$as_dir" && as_dir=.
18069  for ac_exec_ext in '' $ac_executable_extensions; do
18070  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18071    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18072    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18073    break 2
18074  fi
18075done
18076done
18077IFS=$as_save_IFS
18078
18079fi
18080fi
18081PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18082if test -n "$PROPER_COMPILER_CC"; then
18083  { $as_echo "$as_me:$LINENO: result: $PROPER_COMPILER_CC" >&5
18084$as_echo "$PROPER_COMPILER_CC" >&6; }
18085else
18086  { $as_echo "$as_me:$LINENO: result: no" >&5
18087$as_echo "no" >&6; }
18088fi
18089
18090
18091    test -n "$PROPER_COMPILER_CC" && break
18092  done
18093fi
18094if test -z "$PROPER_COMPILER_CC"; then
18095  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18096  for ac_prog in $COMPILER_CHECK_LIST
18097do
18098  # Extract the first word of "$ac_prog", so it can be a program name with args.
18099set dummy $ac_prog; ac_word=$2
18100{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
18101$as_echo_n "checking for $ac_word... " >&6; }
18102if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then
18103  $as_echo_n "(cached) " >&6
18104else
18105  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18106  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18107else
18108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18109for as_dir in $PATH
18110do
18111  IFS=$as_save_IFS
18112  test -z "$as_dir" && as_dir=.
18113  for ac_exec_ext in '' $ac_executable_extensions; do
18114  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18115    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18116    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18117    break 2
18118  fi
18119done
18120done
18121IFS=$as_save_IFS
18122
18123fi
18124fi
18125ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18126if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18127  { $as_echo "$as_me:$LINENO: result: $ac_ct_PROPER_COMPILER_CC" >&5
18128$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18129else
18130  { $as_echo "$as_me:$LINENO: result: no" >&5
18131$as_echo "no" >&6; }
18132fi
18133
18134
18135  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18136done
18137
18138  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18139    PROPER_COMPILER_CC=""
18140  else
18141    case $cross_compiling:$ac_tool_warned in
18142yes:)
18143{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
18144$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18145ac_tool_warned=yes ;;
18146esac
18147    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18148  fi
18149fi
18150
18151
18152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18153
18154  # First separate the path from the arguments. This will split at the first
18155  # space.
18156  complete="$PROPER_COMPILER_CC"
18157  path="${complete%% *}"
18158  tmp="$complete EOL"
18159  arguments="${tmp#* }"
18160
18161  # Input might be given as Windows format, start by converting to
18162  # unix format.
18163  new_path=`$CYGPATH -u "$path"`
18164
18165  # Now try to locate executable using which
18166  new_path=`$WHICH "$new_path" 2> /dev/null`
18167  # bat and cmd files are not always considered executable in cygwin causing which
18168  # to not find them
18169  if test "x$new_path" = x \
18170           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18171           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18172    new_path=`$CYGPATH -u "$path"`
18173  fi
18174  if test "x$new_path" = x; then
18175    # Oops. Which didn't find the executable.
18176    # The splitting of arguments from the executable at a space might have been incorrect,
18177    # since paths with space are more likely in Windows. Give it another try with the whole
18178    # argument.
18179    path="$complete"
18180    arguments="EOL"
18181    new_path=`$CYGPATH -u "$path"`
18182    new_path=`$WHICH "$new_path" 2> /dev/null`
18183    # bat and cmd files are not always considered executable in cygwin causing which
18184    # to not find them
18185    if test "x$new_path" = x \
18186             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18187             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18188      new_path=`$CYGPATH -u "$path"`
18189    fi
18190    if test "x$new_path" = x; then
18191      # It's still not found. Now this is an unrecoverable error.
18192      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18193$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18194      has_space=`$ECHO "$complete" | $GREP " "`
18195      if test "x$has_space" != x; then
18196        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18198      fi
18199      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CC" >&5
18200$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CC" >&2;}
18201   { (exit 1); exit 1; }; }
18202    fi
18203  fi
18204
18205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18208  # "foo.exe" is OK but "foo" is an error.
18209  #
18210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18211  # It is also a way to make sure we got the proper file name for the real test later on.
18212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18213  if test "x$test_shortpath" = x; then
18214    # Short path failed, file does not exist as specified.
18215    # Try adding .exe or .cmd
18216    if test -f "${new_path}.exe"; then
18217       input_to_shortpath="${new_path}.exe"
18218    elif test -f "${new_path}.cmd"; then
18219       input_to_shortpath="${new_path}.cmd"
18220    else
18221      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18222$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18223      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18224$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18225      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CC" >&5
18226$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CC" >&2;}
18227   { (exit 1); exit 1; }; }
18228    fi
18229  else
18230    input_to_shortpath="$new_path"
18231  fi
18232
18233  # Call helper function which possibly converts this using DOS-style short mode.
18234  # If so, the updated path is stored in $new_path.
18235  new_path="$input_to_shortpath"
18236
18237  input_path="$input_to_shortpath"
18238  # Check if we need to convert this using DOS-style short mode. If the path
18239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18240  # take no chances and rewrite it.
18241  # Note: m4 eats our [], so we need to use [ and ] instead.
18242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18243  if test "x$has_forbidden_chars" != x; then
18244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18248      # Going to short mode and back again did indeed matter. Since short mode is
18249      # case insensitive, let's make it lowercase to improve readability.
18250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18251      # Now convert it back to Unix-stile (cygpath)
18252      input_path=`$CYGPATH -u "$shortmode_path"`
18253      new_path="$input_path"
18254    fi
18255  fi
18256
18257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18258  if test "x$test_cygdrive_prefix" = x; then
18259    # As a simple fix, exclude /usr/bin since it's not a real path.
18260    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18262      # a path prefixed by /cygdrive for fixpath to work.
18263      new_path="$CYGWIN_ROOT_PATH$input_path"
18264    fi
18265  fi
18266
18267  # remove trailing .exe if any
18268  new_path="${new_path/%.exe/}"
18269
18270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18271
18272  # First separate the path from the arguments. This will split at the first
18273  # space.
18274  complete="$PROPER_COMPILER_CC"
18275  path="${complete%% *}"
18276  tmp="$complete EOL"
18277  arguments="${tmp#* }"
18278
18279  # Input might be given as Windows format, start by converting to
18280  # unix format.
18281  new_path="$path"
18282
18283  windows_path="$new_path"
18284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18285    unix_path=`$CYGPATH -u "$windows_path"`
18286    new_path="$unix_path"
18287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18289    new_path="$unix_path"
18290  fi
18291
18292
18293  # Now try to locate executable using which
18294  new_path=`$WHICH "$new_path" 2> /dev/null`
18295
18296  if test "x$new_path" = x; then
18297    # Oops. Which didn't find the executable.
18298    # The splitting of arguments from the executable at a space might have been incorrect,
18299    # since paths with space are more likely in Windows. Give it another try with the whole
18300    # argument.
18301    path="$complete"
18302    arguments="EOL"
18303    new_path="$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
18315    new_path=`$WHICH "$new_path" 2> /dev/null`
18316
18317    if test "x$new_path" = x; then
18318      # It's still not found. Now this is an unrecoverable error.
18319      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18320$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18321      has_space=`$ECHO "$complete" | $GREP " "`
18322      if test "x$has_space" != x; then
18323        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18325      fi
18326      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CC" >&5
18327$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CC" >&2;}
18328   { (exit 1); exit 1; }; }
18329    fi
18330  fi
18331
18332  # Now new_path has a complete unix path to the binary
18333  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18334    # Keep paths in /bin as-is, but remove trailing .exe if any
18335    new_path="${new_path/%.exe/}"
18336    # Do not save /bin paths to all_fixpath_prefixes!
18337  else
18338    # Not in mixed or Windows style, start by that.
18339    new_path=`cmd //c echo $new_path`
18340
18341  input_path="$new_path"
18342  # Check if we need to convert this using DOS-style short mode. If the path
18343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18344  # take no chances and rewrite it.
18345  # Note: m4 eats our [], so we need to use [ and ] instead.
18346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18347  if test "x$has_forbidden_chars" != x; then
18348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18350  fi
18351
18352    # Output is in $new_path
18353
18354  windows_path="$new_path"
18355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18356    unix_path=`$CYGPATH -u "$windows_path"`
18357    new_path="$unix_path"
18358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18360    new_path="$unix_path"
18361  fi
18362
18363    # remove trailing .exe if any
18364    new_path="${new_path/%.exe/}"
18365
18366    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18367    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18368  fi
18369
18370  else
18371    # We're on a posix platform. Hooray! :)
18372    # First separate the path from the arguments. This will split at the first
18373    # space.
18374    complete="$PROPER_COMPILER_CC"
18375    path="${complete%% *}"
18376    tmp="$complete EOL"
18377    arguments="${tmp#* }"
18378
18379    new_path=`$WHICH $path 2> /dev/null`
18380    if test "x$new_path" = x; then
18381      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18382      if test "x$is_absolute_path" != x; then
18383        { $as_echo "$as_me:$LINENO: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&5
18384$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&6;}
18385        new_path="$path"
18386      else
18387        { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18388$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18389        has_space=`$ECHO "$complete" | $GREP " "`
18390        if test "x$has_space" != x; then
18391          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
18392$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18393        fi
18394        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CC" >&5
18395$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CC" >&2;}
18396   { (exit 1); exit 1; }; }
18397      fi
18398    fi
18399  fi
18400
18401  # Now join together the path and the arguments once again
18402  if test "x$arguments" != xEOL; then
18403      new_complete="$new_path ${arguments% *}"
18404  else
18405      new_complete="$new_path"
18406  fi
18407
18408  if test "x$complete" != "x$new_complete"; then
18409    PROPER_COMPILER_CC="$new_complete"
18410    { $as_echo "$as_me:$LINENO: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18411$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18412  fi
18413
18414    PATH="$RETRY_COMPILER_SAVED_PATH"
18415
18416    { $as_echo "$as_me:$LINENO: checking for resolved symbolic links for CC" >&5
18417$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18418
18419    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18420        # Follow a chain of symbolic links. Use readlink
18421        # where it exists, else fall back to horribly
18422        # complicated shell code.
18423        if test "x$READLINK_TESTED" != yes; then
18424            # On MacOSX there is a readlink tool with a different
18425            # purpose than the GNU readlink tool. Check the found readlink.
18426            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
18427            if test "x$ISGNU" = x; then
18428                 # A readlink that we do not know how to use.
18429                 # Are there other non-GNU readlinks out there?
18430                 READLINK_TESTED=yes
18431                 READLINK=
18432            fi
18433        fi
18434
18435        if test "x$READLINK" != x; then
18436            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18437        else
18438            STARTDIR=$PWD
18439            COUNTER=0
18440            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18441            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18442            while test $COUNTER -lt 20; do
18443                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18444                if test "x$ISLINK" == x; then
18445                    # This is not a symbolic link! We are done!
18446                    break
18447                fi
18448                # The link might be relative! We have to use cd to travel safely.
18449                cd $sym_link_dir
18450                # ... and we must get the to the absolute path, not one using symbolic links.
18451                cd `pwd -P`
18452                cd `$DIRNAME $ISLINK`
18453                sym_link_dir=`$THEPWDCMD`
18454                sym_link_file=`$BASENAME $ISLINK`
18455                let COUNTER=COUNTER+1
18456            done
18457            cd $STARTDIR
18458            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18459        fi
18460    fi
18461
18462    { $as_echo "$as_me:$LINENO: result: $PROPER_COMPILER_CC" >&5
18463$as_echo "$PROPER_COMPILER_CC" >&6; }
18464    CC="$PROPER_COMPILER_CC"
18465  else
18466    { $as_echo "$as_me:$LINENO: result: no, keeping CC" >&5
18467$as_echo "no, keeping CC" >&6; }
18468    CC="$TEST_COMPILER"
18469  fi
18470
18471  COMPILER=$CC
18472  COMPILER_NAME=$COMPILER_NAME
18473
18474  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18475    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18476    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18477    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18478    if test $? -ne 0; then
18479      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18480
18481      { $as_echo "$as_me:$LINENO: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
18482$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18483      { $as_echo "$as_me:$LINENO: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18484$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18485      { { $as_echo "$as_me:$LINENO: error: Sun Studio compiler is required. Try setting --with-tools-dir." >&5
18486$as_echo "$as_me: error: Sun Studio compiler is required. Try setting --with-tools-dir." >&2;}
18487   { (exit 1); exit 1; }; }
18488    else
18489      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18490      COMPILER_VENDOR="Sun Studio"
18491    fi
18492  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18493    # First line typically looks something like:
18494    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18495    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18496    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18497    COMPILER_VENDOR="Microsoft CL.EXE"
18498    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18499    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18500      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18501        { { $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
18502$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;}
18503   { (exit 1); exit 1; }; }
18504      fi
18505    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18506      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18507        { { $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
18508$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;}
18509   { (exit 1); exit 1; }; }
18510      fi
18511    fi
18512  else
18513    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18514    # Check that this is likely to be GCC.
18515    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18516    if test $? -ne 0; then
18517      { $as_echo "$as_me:$LINENO: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18518$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18519      { $as_echo "$as_me:$LINENO: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18520$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18521      { { $as_echo "$as_me:$LINENO: error: GCC compiler is required. Try setting --with-tools-dir." >&5
18522$as_echo "$as_me: error: GCC compiler is required. Try setting --with-tools-dir." >&2;}
18523   { (exit 1); exit 1; }; }
18524    fi
18525
18526    # First line typically looks something like:
18527    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18528    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18529    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18530  fi
18531  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18532  CC_VERSION="$COMPILER_VERSION"
18533  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18534  CC_VENDOR="$COMPILER_VENDOR"
18535
18536  { $as_echo "$as_me:$LINENO: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
18537$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
18538
18539
18540# Now that we have resolved CC ourself, let autoconf have it's go at it
18541ac_ext=c
18542ac_cpp='$CPP $CPPFLAGS'
18543ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18544ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18545ac_compiler_gnu=$ac_cv_c_compiler_gnu
18546if test -n "$ac_tool_prefix"; then
18547  for ac_prog in $CC
18548  do
18549    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18550set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18551{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
18552$as_echo_n "checking for $ac_word... " >&6; }
18553if test "${ac_cv_prog_CC+set}" = set; then
18554  $as_echo_n "(cached) " >&6
18555else
18556  if test -n "$CC"; then
18557  ac_cv_prog_CC="$CC" # Let the user override the test.
18558else
18559as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18560for as_dir in $PATH
18561do
18562  IFS=$as_save_IFS
18563  test -z "$as_dir" && as_dir=.
18564  for ac_exec_ext in '' $ac_executable_extensions; do
18565  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18566    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
18567    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18568    break 2
18569  fi
18570done
18571done
18572IFS=$as_save_IFS
18573
18574fi
18575fi
18576CC=$ac_cv_prog_CC
18577if test -n "$CC"; then
18578  { $as_echo "$as_me:$LINENO: result: $CC" >&5
18579$as_echo "$CC" >&6; }
18580else
18581  { $as_echo "$as_me:$LINENO: result: no" >&5
18582$as_echo "no" >&6; }
18583fi
18584
18585
18586    test -n "$CC" && break
18587  done
18588fi
18589if test -z "$CC"; then
18590  ac_ct_CC=$CC
18591  for ac_prog in $CC
18592do
18593  # Extract the first word of "$ac_prog", so it can be a program name with args.
18594set dummy $ac_prog; ac_word=$2
18595{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
18596$as_echo_n "checking for $ac_word... " >&6; }
18597if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
18598  $as_echo_n "(cached) " >&6
18599else
18600  if test -n "$ac_ct_CC"; then
18601  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
18602else
18603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18604for as_dir in $PATH
18605do
18606  IFS=$as_save_IFS
18607  test -z "$as_dir" && as_dir=.
18608  for ac_exec_ext in '' $ac_executable_extensions; do
18609  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18610    ac_cv_prog_ac_ct_CC="$ac_prog"
18611    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18612    break 2
18613  fi
18614done
18615done
18616IFS=$as_save_IFS
18617
18618fi
18619fi
18620ac_ct_CC=$ac_cv_prog_ac_ct_CC
18621if test -n "$ac_ct_CC"; then
18622  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
18623$as_echo "$ac_ct_CC" >&6; }
18624else
18625  { $as_echo "$as_me:$LINENO: result: no" >&5
18626$as_echo "no" >&6; }
18627fi
18628
18629
18630  test -n "$ac_ct_CC" && break
18631done
18632
18633  if test "x$ac_ct_CC" = x; then
18634    CC=""
18635  else
18636    case $cross_compiling:$ac_tool_warned in
18637yes:)
18638{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
18639$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18640ac_tool_warned=yes ;;
18641esac
18642    CC=$ac_ct_CC
18643  fi
18644fi
18645
18646
18647test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18648$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18649{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
18650See \`config.log' for more details." >&5
18651$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
18652See \`config.log' for more details." >&2;}
18653   { (exit 1); exit 1; }; }; }
18654
18655# Provide some information about the compiler.
18656$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
18657set X $ac_compile
18658ac_compiler=$2
18659{ (ac_try="$ac_compiler --version >&5"
18660case "(($ac_try" in
18661  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18662  *) ac_try_echo=$ac_try;;
18663esac
18664eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18665$as_echo "$ac_try_echo") >&5
18666  (eval "$ac_compiler --version >&5") 2>&5
18667  ac_status=$?
18668  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18669  (exit $ac_status); }
18670{ (ac_try="$ac_compiler -v >&5"
18671case "(($ac_try" in
18672  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18673  *) ac_try_echo=$ac_try;;
18674esac
18675eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18676$as_echo "$ac_try_echo") >&5
18677  (eval "$ac_compiler -v >&5") 2>&5
18678  ac_status=$?
18679  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18680  (exit $ac_status); }
18681{ (ac_try="$ac_compiler -V >&5"
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_compiler -V >&5") 2>&5
18689  ac_status=$?
18690  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18691  (exit $ac_status); }
18692
18693cat >conftest.$ac_ext <<_ACEOF
18694/* confdefs.h.  */
18695_ACEOF
18696cat confdefs.h >>conftest.$ac_ext
18697cat >>conftest.$ac_ext <<_ACEOF
18698/* end confdefs.h.  */
18699
18700int
18701main ()
18702{
18703
18704  ;
18705  return 0;
18706}
18707_ACEOF
18708ac_clean_files_save=$ac_clean_files
18709ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
18710# Try to create an executable without -o first, disregard a.out.
18711# It will help us diagnose broken compilers, and finding out an intuition
18712# of exeext.
18713{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
18714$as_echo_n "checking for C compiler default output file name... " >&6; }
18715ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
18716
18717# The possible output files:
18718ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
18719
18720ac_rmfiles=
18721for ac_file in $ac_files
18722do
18723  case $ac_file in
18724    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18725    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
18726  esac
18727done
18728rm -f $ac_rmfiles
18729
18730if { (ac_try="$ac_link_default"
18731case "(($ac_try" in
18732  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18733  *) ac_try_echo=$ac_try;;
18734esac
18735eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18736$as_echo "$ac_try_echo") >&5
18737  (eval "$ac_link_default") 2>&5
18738  ac_status=$?
18739  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18740  (exit $ac_status); }; then
18741  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
18742# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
18743# in a Makefile.  We should not override ac_cv_exeext if it was cached,
18744# so that the user can short-circuit this test for compilers unknown to
18745# Autoconf.
18746for ac_file in $ac_files ''
18747do
18748  test -f "$ac_file" || continue
18749  case $ac_file in
18750    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
18751	;;
18752    [ab].out )
18753	# We found the default executable, but exeext='' is most
18754	# certainly right.
18755	break;;
18756    *.* )
18757        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
18758	then :; else
18759	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18760	fi
18761	# We set ac_cv_exeext here because the later test for it is not
18762	# safe: cross compilers may not add the suffix if given an `-o'
18763	# argument, so we may need to know it at that point already.
18764	# Even if this section looks crufty: it has the advantage of
18765	# actually working.
18766	break;;
18767    * )
18768	break;;
18769  esac
18770done
18771test "$ac_cv_exeext" = no && ac_cv_exeext=
18772
18773else
18774  ac_file=''
18775fi
18776
18777{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
18778$as_echo "$ac_file" >&6; }
18779if test -z "$ac_file"; then
18780  $as_echo "$as_me: failed program was:" >&5
18781sed 's/^/| /' conftest.$ac_ext >&5
18782
18783{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18785{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
18786See \`config.log' for more details." >&5
18787$as_echo "$as_me: error: C compiler cannot create executables
18788See \`config.log' for more details." >&2;}
18789   { (exit 77); exit 77; }; }; }
18790fi
18791
18792ac_exeext=$ac_cv_exeext
18793
18794# Check that the compiler produces executables we can run.  If not, either
18795# the compiler is broken, or we cross compile.
18796{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
18797$as_echo_n "checking whether the C compiler works... " >&6; }
18798# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
18799# If not cross compiling, check that we can run a simple program.
18800if test "$cross_compiling" != yes; then
18801  if { ac_try='./$ac_file'
18802  { (case "(($ac_try" in
18803  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18804  *) ac_try_echo=$ac_try;;
18805esac
18806eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18807$as_echo "$ac_try_echo") >&5
18808  (eval "$ac_try") 2>&5
18809  ac_status=$?
18810  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18811  (exit $ac_status); }; }; then
18812    cross_compiling=no
18813  else
18814    if test "$cross_compiling" = maybe; then
18815	cross_compiling=yes
18816    else
18817	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18819{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
18820If you meant to cross compile, use \`--host'.
18821See \`config.log' for more details." >&5
18822$as_echo "$as_me: error: cannot run C compiled programs.
18823If you meant to cross compile, use \`--host'.
18824See \`config.log' for more details." >&2;}
18825   { (exit 1); exit 1; }; }; }
18826    fi
18827  fi
18828fi
18829{ $as_echo "$as_me:$LINENO: result: yes" >&5
18830$as_echo "yes" >&6; }
18831
18832rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
18833ac_clean_files=$ac_clean_files_save
18834# Check that the compiler produces executables we can run.  If not, either
18835# the compiler is broken, or we cross compile.
18836{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
18837$as_echo_n "checking whether we are cross compiling... " >&6; }
18838{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
18839$as_echo "$cross_compiling" >&6; }
18840
18841{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
18842$as_echo_n "checking for suffix of executables... " >&6; }
18843if { (ac_try="$ac_link"
18844case "(($ac_try" in
18845  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18846  *) ac_try_echo=$ac_try;;
18847esac
18848eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18849$as_echo "$ac_try_echo") >&5
18850  (eval "$ac_link") 2>&5
18851  ac_status=$?
18852  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18853  (exit $ac_status); }; then
18854  # If both `conftest.exe' and `conftest' are `present' (well, observable)
18855# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
18856# work properly (i.e., refer to `conftest.exe'), while it won't with
18857# `rm'.
18858for ac_file in conftest.exe conftest conftest.*; do
18859  test -f "$ac_file" || continue
18860  case $ac_file in
18861    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18862    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18863	  break;;
18864    * ) break;;
18865  esac
18866done
18867else
18868  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18870{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
18871See \`config.log' for more details." >&5
18872$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
18873See \`config.log' for more details." >&2;}
18874   { (exit 1); exit 1; }; }; }
18875fi
18876
18877rm -f conftest$ac_cv_exeext
18878{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
18879$as_echo "$ac_cv_exeext" >&6; }
18880
18881rm -f conftest.$ac_ext
18882EXEEXT=$ac_cv_exeext
18883ac_exeext=$EXEEXT
18884{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
18885$as_echo_n "checking for suffix of object files... " >&6; }
18886if test "${ac_cv_objext+set}" = set; then
18887  $as_echo_n "(cached) " >&6
18888else
18889  cat >conftest.$ac_ext <<_ACEOF
18890/* confdefs.h.  */
18891_ACEOF
18892cat confdefs.h >>conftest.$ac_ext
18893cat >>conftest.$ac_ext <<_ACEOF
18894/* end confdefs.h.  */
18895
18896int
18897main ()
18898{
18899
18900  ;
18901  return 0;
18902}
18903_ACEOF
18904rm -f conftest.o conftest.obj
18905if { (ac_try="$ac_compile"
18906case "(($ac_try" in
18907  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18908  *) ac_try_echo=$ac_try;;
18909esac
18910eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18911$as_echo "$ac_try_echo") >&5
18912  (eval "$ac_compile") 2>&5
18913  ac_status=$?
18914  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18915  (exit $ac_status); }; then
18916  for ac_file in conftest.o conftest.obj conftest.*; do
18917  test -f "$ac_file" || continue;
18918  case $ac_file in
18919    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
18920    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
18921       break;;
18922  esac
18923done
18924else
18925  $as_echo "$as_me: failed program was:" >&5
18926sed 's/^/| /' conftest.$ac_ext >&5
18927
18928{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18930{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
18931See \`config.log' for more details." >&5
18932$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
18933See \`config.log' for more details." >&2;}
18934   { (exit 1); exit 1; }; }; }
18935fi
18936
18937rm -f conftest.$ac_cv_objext conftest.$ac_ext
18938fi
18939{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
18940$as_echo "$ac_cv_objext" >&6; }
18941OBJEXT=$ac_cv_objext
18942ac_objext=$OBJEXT
18943{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
18944$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
18945if test "${ac_cv_c_compiler_gnu+set}" = set; then
18946  $as_echo_n "(cached) " >&6
18947else
18948  cat >conftest.$ac_ext <<_ACEOF
18949/* confdefs.h.  */
18950_ACEOF
18951cat confdefs.h >>conftest.$ac_ext
18952cat >>conftest.$ac_ext <<_ACEOF
18953/* end confdefs.h.  */
18954
18955int
18956main ()
18957{
18958#ifndef __GNUC__
18959       choke me
18960#endif
18961
18962  ;
18963  return 0;
18964}
18965_ACEOF
18966rm -f conftest.$ac_objext
18967if { (ac_try="$ac_compile"
18968case "(($ac_try" in
18969  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18970  *) ac_try_echo=$ac_try;;
18971esac
18972eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18973$as_echo "$ac_try_echo") >&5
18974  (eval "$ac_compile") 2>conftest.er1
18975  ac_status=$?
18976  grep -v '^ *+' conftest.er1 >conftest.err
18977  rm -f conftest.er1
18978  cat conftest.err >&5
18979  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18980  (exit $ac_status); } && {
18981	 test -z "$ac_c_werror_flag" ||
18982	 test ! -s conftest.err
18983       } && test -s conftest.$ac_objext; then
18984  ac_compiler_gnu=yes
18985else
18986  $as_echo "$as_me: failed program was:" >&5
18987sed 's/^/| /' conftest.$ac_ext >&5
18988
18989	ac_compiler_gnu=no
18990fi
18991
18992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18993ac_cv_c_compiler_gnu=$ac_compiler_gnu
18994
18995fi
18996{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
18997$as_echo "$ac_cv_c_compiler_gnu" >&6; }
18998if test $ac_compiler_gnu = yes; then
18999  GCC=yes
19000else
19001  GCC=
19002fi
19003ac_test_CFLAGS=${CFLAGS+set}
19004ac_save_CFLAGS=$CFLAGS
19005{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
19006$as_echo_n "checking whether $CC accepts -g... " >&6; }
19007if test "${ac_cv_prog_cc_g+set}" = set; then
19008  $as_echo_n "(cached) " >&6
19009else
19010  ac_save_c_werror_flag=$ac_c_werror_flag
19011   ac_c_werror_flag=yes
19012   ac_cv_prog_cc_g=no
19013   CFLAGS="-g"
19014   cat >conftest.$ac_ext <<_ACEOF
19015/* confdefs.h.  */
19016_ACEOF
19017cat confdefs.h >>conftest.$ac_ext
19018cat >>conftest.$ac_ext <<_ACEOF
19019/* end confdefs.h.  */
19020
19021int
19022main ()
19023{
19024
19025  ;
19026  return 0;
19027}
19028_ACEOF
19029rm -f conftest.$ac_objext
19030if { (ac_try="$ac_compile"
19031case "(($ac_try" in
19032  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19033  *) ac_try_echo=$ac_try;;
19034esac
19035eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19036$as_echo "$ac_try_echo") >&5
19037  (eval "$ac_compile") 2>conftest.er1
19038  ac_status=$?
19039  grep -v '^ *+' conftest.er1 >conftest.err
19040  rm -f conftest.er1
19041  cat conftest.err >&5
19042  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19043  (exit $ac_status); } && {
19044	 test -z "$ac_c_werror_flag" ||
19045	 test ! -s conftest.err
19046       } && test -s conftest.$ac_objext; then
19047  ac_cv_prog_cc_g=yes
19048else
19049  $as_echo "$as_me: failed program was:" >&5
19050sed 's/^/| /' conftest.$ac_ext >&5
19051
19052	CFLAGS=""
19053      cat >conftest.$ac_ext <<_ACEOF
19054/* confdefs.h.  */
19055_ACEOF
19056cat confdefs.h >>conftest.$ac_ext
19057cat >>conftest.$ac_ext <<_ACEOF
19058/* end confdefs.h.  */
19059
19060int
19061main ()
19062{
19063
19064  ;
19065  return 0;
19066}
19067_ACEOF
19068rm -f conftest.$ac_objext
19069if { (ac_try="$ac_compile"
19070case "(($ac_try" in
19071  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19072  *) ac_try_echo=$ac_try;;
19073esac
19074eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19075$as_echo "$ac_try_echo") >&5
19076  (eval "$ac_compile") 2>conftest.er1
19077  ac_status=$?
19078  grep -v '^ *+' conftest.er1 >conftest.err
19079  rm -f conftest.er1
19080  cat conftest.err >&5
19081  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19082  (exit $ac_status); } && {
19083	 test -z "$ac_c_werror_flag" ||
19084	 test ! -s conftest.err
19085       } && test -s conftest.$ac_objext; then
19086  :
19087else
19088  $as_echo "$as_me: failed program was:" >&5
19089sed 's/^/| /' conftest.$ac_ext >&5
19090
19091	ac_c_werror_flag=$ac_save_c_werror_flag
19092	 CFLAGS="-g"
19093	 cat >conftest.$ac_ext <<_ACEOF
19094/* confdefs.h.  */
19095_ACEOF
19096cat confdefs.h >>conftest.$ac_ext
19097cat >>conftest.$ac_ext <<_ACEOF
19098/* end confdefs.h.  */
19099
19100int
19101main ()
19102{
19103
19104  ;
19105  return 0;
19106}
19107_ACEOF
19108rm -f conftest.$ac_objext
19109if { (ac_try="$ac_compile"
19110case "(($ac_try" in
19111  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19112  *) ac_try_echo=$ac_try;;
19113esac
19114eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19115$as_echo "$ac_try_echo") >&5
19116  (eval "$ac_compile") 2>conftest.er1
19117  ac_status=$?
19118  grep -v '^ *+' conftest.er1 >conftest.err
19119  rm -f conftest.er1
19120  cat conftest.err >&5
19121  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19122  (exit $ac_status); } && {
19123	 test -z "$ac_c_werror_flag" ||
19124	 test ! -s conftest.err
19125       } && test -s conftest.$ac_objext; then
19126  ac_cv_prog_cc_g=yes
19127else
19128  $as_echo "$as_me: failed program was:" >&5
19129sed 's/^/| /' conftest.$ac_ext >&5
19130
19131
19132fi
19133
19134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19135fi
19136
19137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19138fi
19139
19140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19141   ac_c_werror_flag=$ac_save_c_werror_flag
19142fi
19143{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
19144$as_echo "$ac_cv_prog_cc_g" >&6; }
19145if test "$ac_test_CFLAGS" = set; then
19146  CFLAGS=$ac_save_CFLAGS
19147elif test $ac_cv_prog_cc_g = yes; then
19148  if test "$GCC" = yes; then
19149    CFLAGS="-g -O2"
19150  else
19151    CFLAGS="-g"
19152  fi
19153else
19154  if test "$GCC" = yes; then
19155    CFLAGS="-O2"
19156  else
19157    CFLAGS=
19158  fi
19159fi
19160{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
19161$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19162if test "${ac_cv_prog_cc_c89+set}" = set; then
19163  $as_echo_n "(cached) " >&6
19164else
19165  ac_cv_prog_cc_c89=no
19166ac_save_CC=$CC
19167cat >conftest.$ac_ext <<_ACEOF
19168/* confdefs.h.  */
19169_ACEOF
19170cat confdefs.h >>conftest.$ac_ext
19171cat >>conftest.$ac_ext <<_ACEOF
19172/* end confdefs.h.  */
19173#include <stdarg.h>
19174#include <stdio.h>
19175#include <sys/types.h>
19176#include <sys/stat.h>
19177/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19178struct buf { int x; };
19179FILE * (*rcsopen) (struct buf *, struct stat *, int);
19180static char *e (p, i)
19181     char **p;
19182     int i;
19183{
19184  return p[i];
19185}
19186static char *f (char * (*g) (char **, int), char **p, ...)
19187{
19188  char *s;
19189  va_list v;
19190  va_start (v,p);
19191  s = g (p, va_arg (v,int));
19192  va_end (v);
19193  return s;
19194}
19195
19196/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19197   function prototypes and stuff, but not '\xHH' hex character constants.
19198   These don't provoke an error unfortunately, instead are silently treated
19199   as 'x'.  The following induces an error, until -std is added to get
19200   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19201   array size at least.  It's necessary to write '\x00'==0 to get something
19202   that's true only with -std.  */
19203int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19204
19205/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19206   inside strings and character constants.  */
19207#define FOO(x) 'x'
19208int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19209
19210int test (int i, double x);
19211struct s1 {int (*f) (int a);};
19212struct s2 {int (*f) (double a);};
19213int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19214int argc;
19215char **argv;
19216int
19217main ()
19218{
19219return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19220  ;
19221  return 0;
19222}
19223_ACEOF
19224for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19225	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19226do
19227  CC="$ac_save_CC $ac_arg"
19228  rm -f conftest.$ac_objext
19229if { (ac_try="$ac_compile"
19230case "(($ac_try" in
19231  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19232  *) ac_try_echo=$ac_try;;
19233esac
19234eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19235$as_echo "$ac_try_echo") >&5
19236  (eval "$ac_compile") 2>conftest.er1
19237  ac_status=$?
19238  grep -v '^ *+' conftest.er1 >conftest.err
19239  rm -f conftest.er1
19240  cat conftest.err >&5
19241  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19242  (exit $ac_status); } && {
19243	 test -z "$ac_c_werror_flag" ||
19244	 test ! -s conftest.err
19245       } && test -s conftest.$ac_objext; then
19246  ac_cv_prog_cc_c89=$ac_arg
19247else
19248  $as_echo "$as_me: failed program was:" >&5
19249sed 's/^/| /' conftest.$ac_ext >&5
19250
19251
19252fi
19253
19254rm -f core conftest.err conftest.$ac_objext
19255  test "x$ac_cv_prog_cc_c89" != "xno" && break
19256done
19257rm -f conftest.$ac_ext
19258CC=$ac_save_CC
19259
19260fi
19261# AC_CACHE_VAL
19262case "x$ac_cv_prog_cc_c89" in
19263  x)
19264    { $as_echo "$as_me:$LINENO: result: none needed" >&5
19265$as_echo "none needed" >&6; } ;;
19266  xno)
19267    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
19268$as_echo "unsupported" >&6; } ;;
19269  *)
19270    CC="$CC $ac_cv_prog_cc_c89"
19271    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
19272$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19273esac
19274
19275
19276ac_ext=cpp
19277ac_cpp='$CXXCPP $CPPFLAGS'
19278ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19279ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19280ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19281
19282
19283### Locate C++ compiler (CXX)
19284
19285if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19286  # Do not probe for CC on MacOSX.
19287  COMPILER_CHECK_LIST="cl g++"
19288else
19289  COMPILER_CHECK_LIST="cl CC g++"
19290fi
19291
19292  COMPILER_NAME=C++
19293
19294  # Do a first initial attempt at searching the list of compiler names.
19295  # AC_PATH_PROGS can't be run multiple times with the same variable,
19296  # so create a new name for this run.
19297  for ac_prog in $COMPILER_CHECK_LIST
19298do
19299  # Extract the first word of "$ac_prog", so it can be a program name with args.
19300set dummy $ac_prog; ac_word=$2
19301{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
19302$as_echo_n "checking for $ac_word... " >&6; }
19303if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then
19304  $as_echo_n "(cached) " >&6
19305else
19306  case $POTENTIAL_CXX in
19307  [\\/]* | ?:[\\/]*)
19308  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19309  ;;
19310  *)
19311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19312for as_dir in $PATH
19313do
19314  IFS=$as_save_IFS
19315  test -z "$as_dir" && as_dir=.
19316  for ac_exec_ext in '' $ac_executable_extensions; do
19317  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19318    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19319    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19320    break 2
19321  fi
19322done
19323done
19324IFS=$as_save_IFS
19325
19326  ;;
19327esac
19328fi
19329POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19330if test -n "$POTENTIAL_CXX"; then
19331  { $as_echo "$as_me:$LINENO: result: $POTENTIAL_CXX" >&5
19332$as_echo "$POTENTIAL_CXX" >&6; }
19333else
19334  { $as_echo "$as_me:$LINENO: result: no" >&5
19335$as_echo "no" >&6; }
19336fi
19337
19338
19339  test -n "$POTENTIAL_CXX" && break
19340done
19341
19342  CXX=$POTENTIAL_CXX
19343
19344  if test "x$$CXX" = x; then
19345
19346    # Print a helpful message on how to acquire the necessary build dependency.
19347    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19348    MISSING_DEPENDENCY=devkit
19349    PKGHANDLER_COMMAND=
19350
19351    case $PKGHANDLER in
19352	apt-get)
19353                apt_help     $MISSING_DEPENDENCY ;;
19354    yum)
19355                yum_help     $MISSING_DEPENDENCY ;;
19356	port)
19357                port_help    $MISSING_DEPENDENCY ;;
19358	pkgutil)
19359                pkgutil_help $MISSING_DEPENDENCY ;;
19360	pkgadd)
19361                pkgadd_help  $MISSING_DEPENDENCY ;;
19362    * )
19363      break ;;
19364    esac
19365
19366    if test "x$PKGHANDLER_COMMAND" != x; then
19367        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19368    fi
19369
19370      { { $as_echo "$as_me:$LINENO: error: Could not find a $COMPILER_NAME compiler. $HELP_MSG" >&5
19371$as_echo "$as_me: error: Could not find a $COMPILER_NAME compiler. $HELP_MSG" >&2;}
19372   { (exit 1); exit 1; }; }
19373  fi
19374
19375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19376
19377  # First separate the path from the arguments. This will split at the first
19378  # space.
19379  complete="$CXX"
19380  path="${complete%% *}"
19381  tmp="$complete EOL"
19382  arguments="${tmp#* }"
19383
19384  # Input might be given as Windows format, start by converting to
19385  # unix format.
19386  new_path=`$CYGPATH -u "$path"`
19387
19388  # Now try to locate executable using which
19389  new_path=`$WHICH "$new_path" 2> /dev/null`
19390  # bat and cmd files are not always considered executable in cygwin causing which
19391  # to not find them
19392  if test "x$new_path" = x \
19393           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19394           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19395    new_path=`$CYGPATH -u "$path"`
19396  fi
19397  if test "x$new_path" = x; then
19398    # Oops. Which didn't find the executable.
19399    # The splitting of arguments from the executable at a space might have been incorrect,
19400    # since paths with space are more likely in Windows. Give it another try with the whole
19401    # argument.
19402    path="$complete"
19403    arguments="EOL"
19404    new_path=`$CYGPATH -u "$path"`
19405    new_path=`$WHICH "$new_path" 2> /dev/null`
19406    # bat and cmd files are not always considered executable in cygwin causing which
19407    # to not find them
19408    if test "x$new_path" = x \
19409             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19410             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19411      new_path=`$CYGPATH -u "$path"`
19412    fi
19413    if test "x$new_path" = x; then
19414      # It's still not found. Now this is an unrecoverable error.
19415      { $as_echo "$as_me:$LINENO: The path of CXX, which resolves as \"$complete\", is not found." >&5
19416$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19417      has_space=`$ECHO "$complete" | $GREP " "`
19418      if test "x$has_space" != x; then
19419        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19421      fi
19422      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXX" >&5
19423$as_echo "$as_me: error: Cannot locate the the path of CXX" >&2;}
19424   { (exit 1); exit 1; }; }
19425    fi
19426  fi
19427
19428  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19429  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19430  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19431  # "foo.exe" is OK but "foo" is an error.
19432  #
19433  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19434  # It is also a way to make sure we got the proper file name for the real test later on.
19435  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19436  if test "x$test_shortpath" = x; then
19437    # Short path failed, file does not exist as specified.
19438    # Try adding .exe or .cmd
19439    if test -f "${new_path}.exe"; then
19440       input_to_shortpath="${new_path}.exe"
19441    elif test -f "${new_path}.cmd"; then
19442       input_to_shortpath="${new_path}.cmd"
19443    else
19444      { $as_echo "$as_me:$LINENO: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19445$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19446      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19447$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19448      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXX" >&5
19449$as_echo "$as_me: error: Cannot locate the the path of CXX" >&2;}
19450   { (exit 1); exit 1; }; }
19451    fi
19452  else
19453    input_to_shortpath="$new_path"
19454  fi
19455
19456  # Call helper function which possibly converts this using DOS-style short mode.
19457  # If so, the updated path is stored in $new_path.
19458  new_path="$input_to_shortpath"
19459
19460  input_path="$input_to_shortpath"
19461  # Check if we need to convert this using DOS-style short mode. If the path
19462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19463  # take no chances and rewrite it.
19464  # Note: m4 eats our [], so we need to use [ and ] instead.
19465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19466  if test "x$has_forbidden_chars" != x; then
19467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19471      # Going to short mode and back again did indeed matter. Since short mode is
19472      # case insensitive, let's make it lowercase to improve readability.
19473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19474      # Now convert it back to Unix-stile (cygpath)
19475      input_path=`$CYGPATH -u "$shortmode_path"`
19476      new_path="$input_path"
19477    fi
19478  fi
19479
19480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19481  if test "x$test_cygdrive_prefix" = x; then
19482    # As a simple fix, exclude /usr/bin since it's not a real path.
19483    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19485      # a path prefixed by /cygdrive for fixpath to work.
19486      new_path="$CYGWIN_ROOT_PATH$input_path"
19487    fi
19488  fi
19489
19490  # remove trailing .exe if any
19491  new_path="${new_path/%.exe/}"
19492
19493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19494
19495  # First separate the path from the arguments. This will split at the first
19496  # space.
19497  complete="$CXX"
19498  path="${complete%% *}"
19499  tmp="$complete EOL"
19500  arguments="${tmp#* }"
19501
19502  # Input might be given as Windows format, start by converting to
19503  # unix format.
19504  new_path="$path"
19505
19506  windows_path="$new_path"
19507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19508    unix_path=`$CYGPATH -u "$windows_path"`
19509    new_path="$unix_path"
19510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19512    new_path="$unix_path"
19513  fi
19514
19515
19516  # Now try to locate executable using which
19517  new_path=`$WHICH "$new_path" 2> /dev/null`
19518
19519  if test "x$new_path" = x; then
19520    # Oops. Which didn't find the executable.
19521    # The splitting of arguments from the executable at a space might have been incorrect,
19522    # since paths with space are more likely in Windows. Give it another try with the whole
19523    # argument.
19524    path="$complete"
19525    arguments="EOL"
19526    new_path="$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
19538    new_path=`$WHICH "$new_path" 2> /dev/null`
19539
19540    if test "x$new_path" = x; then
19541      # It's still not found. Now this is an unrecoverable error.
19542      { $as_echo "$as_me:$LINENO: The path of CXX, which resolves as \"$complete\", is not found." >&5
19543$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19544      has_space=`$ECHO "$complete" | $GREP " "`
19545      if test "x$has_space" != x; then
19546        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19547$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19548      fi
19549      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXX" >&5
19550$as_echo "$as_me: error: Cannot locate the the path of CXX" >&2;}
19551   { (exit 1); exit 1; }; }
19552    fi
19553  fi
19554
19555  # Now new_path has a complete unix path to the binary
19556  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19557    # Keep paths in /bin as-is, but remove trailing .exe if any
19558    new_path="${new_path/%.exe/}"
19559    # Do not save /bin paths to all_fixpath_prefixes!
19560  else
19561    # Not in mixed or Windows style, start by that.
19562    new_path=`cmd //c echo $new_path`
19563
19564  input_path="$new_path"
19565  # Check if we need to convert this using DOS-style short mode. If the path
19566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19567  # take no chances and rewrite it.
19568  # Note: m4 eats our [], so we need to use [ and ] instead.
19569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19570  if test "x$has_forbidden_chars" != x; then
19571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19572    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19573  fi
19574
19575    # Output is in $new_path
19576
19577  windows_path="$new_path"
19578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19579    unix_path=`$CYGPATH -u "$windows_path"`
19580    new_path="$unix_path"
19581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19583    new_path="$unix_path"
19584  fi
19585
19586    # remove trailing .exe if any
19587    new_path="${new_path/%.exe/}"
19588
19589    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19590    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19591  fi
19592
19593  else
19594    # We're on a posix platform. Hooray! :)
19595    # First separate the path from the arguments. This will split at the first
19596    # space.
19597    complete="$CXX"
19598    path="${complete%% *}"
19599    tmp="$complete EOL"
19600    arguments="${tmp#* }"
19601
19602    new_path=`$WHICH $path 2> /dev/null`
19603    if test "x$new_path" = x; then
19604      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19605      if test "x$is_absolute_path" != x; then
19606        { $as_echo "$as_me:$LINENO: Resolving CXX (as $path) with 'which' failed, using $path directly." >&5
19607$as_echo "$as_me: Resolving CXX (as $path) with 'which' failed, using $path directly." >&6;}
19608        new_path="$path"
19609      else
19610        { $as_echo "$as_me:$LINENO: The path of CXX, which resolves as \"$complete\", is not found." >&5
19611$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19612        has_space=`$ECHO "$complete" | $GREP " "`
19613        if test "x$has_space" != x; then
19614          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
19615$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19616        fi
19617        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXX" >&5
19618$as_echo "$as_me: error: Cannot locate the the path of CXX" >&2;}
19619   { (exit 1); exit 1; }; }
19620      fi
19621    fi
19622  fi
19623
19624  # Now join together the path and the arguments once again
19625  if test "x$arguments" != xEOL; then
19626      new_complete="$new_path ${arguments% *}"
19627  else
19628      new_complete="$new_path"
19629  fi
19630
19631  if test "x$complete" != "x$new_complete"; then
19632    CXX="$new_complete"
19633    { $as_echo "$as_me:$LINENO: Rewriting CXX to \"$new_complete\"" >&5
19634$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
19635  fi
19636
19637  { $as_echo "$as_me:$LINENO: checking resolved symbolic links for CXX" >&5
19638$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
19639  TEST_COMPILER="$CXX"
19640
19641    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19642        # Follow a chain of symbolic links. Use readlink
19643        # where it exists, else fall back to horribly
19644        # complicated shell code.
19645        if test "x$READLINK_TESTED" != yes; then
19646            # On MacOSX there is a readlink tool with a different
19647            # purpose than the GNU readlink tool. Check the found readlink.
19648            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
19649            if test "x$ISGNU" = x; then
19650                 # A readlink that we do not know how to use.
19651                 # Are there other non-GNU readlinks out there?
19652                 READLINK_TESTED=yes
19653                 READLINK=
19654            fi
19655        fi
19656
19657        if test "x$READLINK" != x; then
19658            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19659        else
19660            STARTDIR=$PWD
19661            COUNTER=0
19662            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19663            sym_link_file=`$BASENAME $TEST_COMPILER`
19664            while test $COUNTER -lt 20; do
19665                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19666                if test "x$ISLINK" == x; then
19667                    # This is not a symbolic link! We are done!
19668                    break
19669                fi
19670                # The link might be relative! We have to use cd to travel safely.
19671                cd $sym_link_dir
19672                # ... and we must get the to the absolute path, not one using symbolic links.
19673                cd `pwd -P`
19674                cd `$DIRNAME $ISLINK`
19675                sym_link_dir=`$THEPWDCMD`
19676                sym_link_file=`$BASENAME $ISLINK`
19677                let COUNTER=COUNTER+1
19678            done
19679            cd $STARTDIR
19680            TEST_COMPILER=$sym_link_dir/$sym_link_file
19681        fi
19682    fi
19683
19684  { $as_echo "$as_me:$LINENO: result: $TEST_COMPILER" >&5
19685$as_echo "$TEST_COMPILER" >&6; }
19686  { $as_echo "$as_me:$LINENO: checking if CXX is disguised ccache" >&5
19687$as_echo_n "checking if CXX is disguised ccache... " >&6; }
19688
19689  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19690  if test "x$COMPILER_BASENAME" = "xccache"; then
19691    { $as_echo "$as_me:$LINENO: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19692$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19693    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19694    # We want to control ccache invocation ourselves, so ignore this cc and try
19695    # searching again.
19696
19697    # Remove the path to the fake ccache cc from the PATH
19698    RETRY_COMPILER_SAVED_PATH="$PATH"
19699    COMPILER_DIRNAME=`$DIRNAME $CXX`
19700    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19701
19702    # Try again looking for our compiler
19703    if test -n "$ac_tool_prefix"; then
19704  for ac_prog in $COMPILER_CHECK_LIST
19705  do
19706    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19707set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19708{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
19709$as_echo_n "checking for $ac_word... " >&6; }
19710if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then
19711  $as_echo_n "(cached) " >&6
19712else
19713  if test -n "$PROPER_COMPILER_CXX"; then
19714  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
19715else
19716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19717for as_dir in $PATH
19718do
19719  IFS=$as_save_IFS
19720  test -z "$as_dir" && as_dir=.
19721  for ac_exec_ext in '' $ac_executable_extensions; do
19722  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19723    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
19724    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19725    break 2
19726  fi
19727done
19728done
19729IFS=$as_save_IFS
19730
19731fi
19732fi
19733PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
19734if test -n "$PROPER_COMPILER_CXX"; then
19735  { $as_echo "$as_me:$LINENO: result: $PROPER_COMPILER_CXX" >&5
19736$as_echo "$PROPER_COMPILER_CXX" >&6; }
19737else
19738  { $as_echo "$as_me:$LINENO: result: no" >&5
19739$as_echo "no" >&6; }
19740fi
19741
19742
19743    test -n "$PROPER_COMPILER_CXX" && break
19744  done
19745fi
19746if test -z "$PROPER_COMPILER_CXX"; then
19747  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
19748  for ac_prog in $COMPILER_CHECK_LIST
19749do
19750  # Extract the first word of "$ac_prog", so it can be a program name with args.
19751set dummy $ac_prog; ac_word=$2
19752{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
19753$as_echo_n "checking for $ac_word... " >&6; }
19754if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then
19755  $as_echo_n "(cached) " >&6
19756else
19757  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19758  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
19759else
19760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19761for as_dir in $PATH
19762do
19763  IFS=$as_save_IFS
19764  test -z "$as_dir" && as_dir=.
19765  for ac_exec_ext in '' $ac_executable_extensions; do
19766  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19767    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
19768    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19769    break 2
19770  fi
19771done
19772done
19773IFS=$as_save_IFS
19774
19775fi
19776fi
19777ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
19778if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19779  { $as_echo "$as_me:$LINENO: result: $ac_ct_PROPER_COMPILER_CXX" >&5
19780$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
19781else
19782  { $as_echo "$as_me:$LINENO: result: no" >&5
19783$as_echo "no" >&6; }
19784fi
19785
19786
19787  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
19788done
19789
19790  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
19791    PROPER_COMPILER_CXX=""
19792  else
19793    case $cross_compiling:$ac_tool_warned in
19794yes:)
19795{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
19796$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19797ac_tool_warned=yes ;;
19798esac
19799    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
19800  fi
19801fi
19802
19803
19804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19805
19806  # First separate the path from the arguments. This will split at the first
19807  # space.
19808  complete="$PROPER_COMPILER_CXX"
19809  path="${complete%% *}"
19810  tmp="$complete EOL"
19811  arguments="${tmp#* }"
19812
19813  # Input might be given as Windows format, start by converting to
19814  # unix format.
19815  new_path=`$CYGPATH -u "$path"`
19816
19817  # Now try to locate executable using which
19818  new_path=`$WHICH "$new_path" 2> /dev/null`
19819  # bat and cmd files are not always considered executable in cygwin causing which
19820  # to not find them
19821  if test "x$new_path" = x \
19822           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19823           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19824    new_path=`$CYGPATH -u "$path"`
19825  fi
19826  if test "x$new_path" = x; then
19827    # Oops. Which didn't find the executable.
19828    # The splitting of arguments from the executable at a space might have been incorrect,
19829    # since paths with space are more likely in Windows. Give it another try with the whole
19830    # argument.
19831    path="$complete"
19832    arguments="EOL"
19833    new_path=`$CYGPATH -u "$path"`
19834    new_path=`$WHICH "$new_path" 2> /dev/null`
19835    # bat and cmd files are not always considered executable in cygwin causing which
19836    # to not find them
19837    if test "x$new_path" = x \
19838             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19839             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19840      new_path=`$CYGPATH -u "$path"`
19841    fi
19842    if test "x$new_path" = x; then
19843      # It's still not found. Now this is an unrecoverable error.
19844      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19845$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19846      has_space=`$ECHO "$complete" | $GREP " "`
19847      if test "x$has_space" != x; then
19848        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19849$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19850      fi
19851      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&5
19852$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&2;}
19853   { (exit 1); exit 1; }; }
19854    fi
19855  fi
19856
19857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19860  # "foo.exe" is OK but "foo" is an error.
19861  #
19862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19863  # It is also a way to make sure we got the proper file name for the real test later on.
19864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19865  if test "x$test_shortpath" = x; then
19866    # Short path failed, file does not exist as specified.
19867    # Try adding .exe or .cmd
19868    if test -f "${new_path}.exe"; then
19869       input_to_shortpath="${new_path}.exe"
19870    elif test -f "${new_path}.cmd"; then
19871       input_to_shortpath="${new_path}.cmd"
19872    else
19873      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
19874$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
19875      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19876$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19877      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&5
19878$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&2;}
19879   { (exit 1); exit 1; }; }
19880    fi
19881  else
19882    input_to_shortpath="$new_path"
19883  fi
19884
19885  # Call helper function which possibly converts this using DOS-style short mode.
19886  # If so, the updated path is stored in $new_path.
19887  new_path="$input_to_shortpath"
19888
19889  input_path="$input_to_shortpath"
19890  # Check if we need to convert this using DOS-style short mode. If the path
19891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19892  # take no chances and rewrite it.
19893  # Note: m4 eats our [], so we need to use [ and ] instead.
19894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19895  if test "x$has_forbidden_chars" != x; then
19896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19900      # Going to short mode and back again did indeed matter. Since short mode is
19901      # case insensitive, let's make it lowercase to improve readability.
19902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19903      # Now convert it back to Unix-stile (cygpath)
19904      input_path=`$CYGPATH -u "$shortmode_path"`
19905      new_path="$input_path"
19906    fi
19907  fi
19908
19909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19910  if test "x$test_cygdrive_prefix" = x; then
19911    # As a simple fix, exclude /usr/bin since it's not a real path.
19912    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19914      # a path prefixed by /cygdrive for fixpath to work.
19915      new_path="$CYGWIN_ROOT_PATH$input_path"
19916    fi
19917  fi
19918
19919  # remove trailing .exe if any
19920  new_path="${new_path/%.exe/}"
19921
19922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19923
19924  # First separate the path from the arguments. This will split at the first
19925  # space.
19926  complete="$PROPER_COMPILER_CXX"
19927  path="${complete%% *}"
19928  tmp="$complete EOL"
19929  arguments="${tmp#* }"
19930
19931  # Input might be given as Windows format, start by converting to
19932  # unix format.
19933  new_path="$path"
19934
19935  windows_path="$new_path"
19936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19937    unix_path=`$CYGPATH -u "$windows_path"`
19938    new_path="$unix_path"
19939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19941    new_path="$unix_path"
19942  fi
19943
19944
19945  # Now try to locate executable using which
19946  new_path=`$WHICH "$new_path" 2> /dev/null`
19947
19948  if test "x$new_path" = x; then
19949    # Oops. Which didn't find the executable.
19950    # The splitting of arguments from the executable at a space might have been incorrect,
19951    # since paths with space are more likely in Windows. Give it another try with the whole
19952    # argument.
19953    path="$complete"
19954    arguments="EOL"
19955    new_path="$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
19967    new_path=`$WHICH "$new_path" 2> /dev/null`
19968
19969    if test "x$new_path" = x; then
19970      # It's still not found. Now this is an unrecoverable error.
19971      { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19972$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19973      has_space=`$ECHO "$complete" | $GREP " "`
19974      if test "x$has_space" != x; then
19975        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19977      fi
19978      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&5
19979$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&2;}
19980   { (exit 1); exit 1; }; }
19981    fi
19982  fi
19983
19984  # Now new_path has a complete unix path to the binary
19985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19986    # Keep paths in /bin as-is, but remove trailing .exe if any
19987    new_path="${new_path/%.exe/}"
19988    # Do not save /bin paths to all_fixpath_prefixes!
19989  else
19990    # Not in mixed or Windows style, start by that.
19991    new_path=`cmd //c echo $new_path`
19992
19993  input_path="$new_path"
19994  # Check if we need to convert this using DOS-style short mode. If the path
19995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19996  # take no chances and rewrite it.
19997  # Note: m4 eats our [], so we need to use [ and ] instead.
19998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19999  if test "x$has_forbidden_chars" != x; then
20000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20002  fi
20003
20004    # Output is in $new_path
20005
20006  windows_path="$new_path"
20007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20008    unix_path=`$CYGPATH -u "$windows_path"`
20009    new_path="$unix_path"
20010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20012    new_path="$unix_path"
20013  fi
20014
20015    # remove trailing .exe if any
20016    new_path="${new_path/%.exe/}"
20017
20018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20020  fi
20021
20022  else
20023    # We're on a posix platform. Hooray! :)
20024    # First separate the path from the arguments. This will split at the first
20025    # space.
20026    complete="$PROPER_COMPILER_CXX"
20027    path="${complete%% *}"
20028    tmp="$complete EOL"
20029    arguments="${tmp#* }"
20030
20031    new_path=`$WHICH $path 2> /dev/null`
20032    if test "x$new_path" = x; then
20033      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20034      if test "x$is_absolute_path" != x; then
20035        { $as_echo "$as_me:$LINENO: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&5
20036$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&6;}
20037        new_path="$path"
20038      else
20039        { $as_echo "$as_me:$LINENO: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20040$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20041        has_space=`$ECHO "$complete" | $GREP " "`
20042        if test "x$has_space" != x; then
20043          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
20044$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20045        fi
20046        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&5
20047$as_echo "$as_me: error: Cannot locate the the path of PROPER_COMPILER_CXX" >&2;}
20048   { (exit 1); exit 1; }; }
20049      fi
20050    fi
20051  fi
20052
20053  # Now join together the path and the arguments once again
20054  if test "x$arguments" != xEOL; then
20055      new_complete="$new_path ${arguments% *}"
20056  else
20057      new_complete="$new_path"
20058  fi
20059
20060  if test "x$complete" != "x$new_complete"; then
20061    PROPER_COMPILER_CXX="$new_complete"
20062    { $as_echo "$as_me:$LINENO: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20063$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20064  fi
20065
20066    PATH="$RETRY_COMPILER_SAVED_PATH"
20067
20068    { $as_echo "$as_me:$LINENO: checking for resolved symbolic links for CXX" >&5
20069$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20070
20071    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20072        # Follow a chain of symbolic links. Use readlink
20073        # where it exists, else fall back to horribly
20074        # complicated shell code.
20075        if test "x$READLINK_TESTED" != yes; then
20076            # On MacOSX there is a readlink tool with a different
20077            # purpose than the GNU readlink tool. Check the found readlink.
20078            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
20079            if test "x$ISGNU" = x; then
20080                 # A readlink that we do not know how to use.
20081                 # Are there other non-GNU readlinks out there?
20082                 READLINK_TESTED=yes
20083                 READLINK=
20084            fi
20085        fi
20086
20087        if test "x$READLINK" != x; then
20088            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20089        else
20090            STARTDIR=$PWD
20091            COUNTER=0
20092            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20093            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20094            while test $COUNTER -lt 20; do
20095                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20096                if test "x$ISLINK" == x; then
20097                    # This is not a symbolic link! We are done!
20098                    break
20099                fi
20100                # The link might be relative! We have to use cd to travel safely.
20101                cd $sym_link_dir
20102                # ... and we must get the to the absolute path, not one using symbolic links.
20103                cd `pwd -P`
20104                cd `$DIRNAME $ISLINK`
20105                sym_link_dir=`$THEPWDCMD`
20106                sym_link_file=`$BASENAME $ISLINK`
20107                let COUNTER=COUNTER+1
20108            done
20109            cd $STARTDIR
20110            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20111        fi
20112    fi
20113
20114    { $as_echo "$as_me:$LINENO: result: $PROPER_COMPILER_CXX" >&5
20115$as_echo "$PROPER_COMPILER_CXX" >&6; }
20116    CXX="$PROPER_COMPILER_CXX"
20117  else
20118    { $as_echo "$as_me:$LINENO: result: no, keeping CXX" >&5
20119$as_echo "no, keeping CXX" >&6; }
20120    CXX="$TEST_COMPILER"
20121  fi
20122
20123  COMPILER=$CXX
20124  COMPILER_NAME=$COMPILER_NAME
20125
20126  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20127    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20128    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20129    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20130    if test $? -ne 0; then
20131      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20132
20133      { $as_echo "$as_me:$LINENO: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
20134$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20135      { $as_echo "$as_me:$LINENO: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20136$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20137      { { $as_echo "$as_me:$LINENO: error: Sun Studio compiler is required. Try setting --with-tools-dir." >&5
20138$as_echo "$as_me: error: Sun Studio compiler is required. Try setting --with-tools-dir." >&2;}
20139   { (exit 1); exit 1; }; }
20140    else
20141      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20142      COMPILER_VENDOR="Sun Studio"
20143    fi
20144  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20145    # First line typically looks something like:
20146    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20147    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20148    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20149    COMPILER_VENDOR="Microsoft CL.EXE"
20150    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20151    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20152      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20153        { { $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
20154$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;}
20155   { (exit 1); exit 1; }; }
20156      fi
20157    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20158      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20159        { { $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
20160$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;}
20161   { (exit 1); exit 1; }; }
20162      fi
20163    fi
20164  else
20165    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20166    # Check that this is likely to be GCC.
20167    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20168    if test $? -ne 0; then
20169      { $as_echo "$as_me:$LINENO: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20170$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20171      { $as_echo "$as_me:$LINENO: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20172$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20173      { { $as_echo "$as_me:$LINENO: error: GCC compiler is required. Try setting --with-tools-dir." >&5
20174$as_echo "$as_me: error: GCC compiler is required. Try setting --with-tools-dir." >&2;}
20175   { (exit 1); exit 1; }; }
20176    fi
20177
20178    # First line typically looks something like:
20179    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20180    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20181    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20182  fi
20183  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20184  CXX_VERSION="$COMPILER_VERSION"
20185  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20186  CXX_VENDOR="$COMPILER_VENDOR"
20187
20188  { $as_echo "$as_me:$LINENO: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20189$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20190
20191
20192# Now that we have resolved CXX ourself, let autoconf have it's go at it
20193ac_ext=cpp
20194ac_cpp='$CXXCPP $CPPFLAGS'
20195ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20196ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20197ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20198if test -z "$CXX"; then
20199  if test -n "$CCC"; then
20200    CXX=$CCC
20201  else
20202    if test -n "$ac_tool_prefix"; then
20203  for ac_prog in $CXX
20204  do
20205    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20206set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20207{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
20208$as_echo_n "checking for $ac_word... " >&6; }
20209if test "${ac_cv_prog_CXX+set}" = set; then
20210  $as_echo_n "(cached) " >&6
20211else
20212  if test -n "$CXX"; then
20213  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20214else
20215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20216for as_dir in $PATH
20217do
20218  IFS=$as_save_IFS
20219  test -z "$as_dir" && as_dir=.
20220  for ac_exec_ext in '' $ac_executable_extensions; do
20221  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20222    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20223    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20224    break 2
20225  fi
20226done
20227done
20228IFS=$as_save_IFS
20229
20230fi
20231fi
20232CXX=$ac_cv_prog_CXX
20233if test -n "$CXX"; then
20234  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
20235$as_echo "$CXX" >&6; }
20236else
20237  { $as_echo "$as_me:$LINENO: result: no" >&5
20238$as_echo "no" >&6; }
20239fi
20240
20241
20242    test -n "$CXX" && break
20243  done
20244fi
20245if test -z "$CXX"; then
20246  ac_ct_CXX=$CXX
20247  for ac_prog in $CXX
20248do
20249  # Extract the first word of "$ac_prog", so it can be a program name with args.
20250set dummy $ac_prog; ac_word=$2
20251{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
20252$as_echo_n "checking for $ac_word... " >&6; }
20253if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
20254  $as_echo_n "(cached) " >&6
20255else
20256  if test -n "$ac_ct_CXX"; then
20257  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20258else
20259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20260for as_dir in $PATH
20261do
20262  IFS=$as_save_IFS
20263  test -z "$as_dir" && as_dir=.
20264  for ac_exec_ext in '' $ac_executable_extensions; do
20265  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20266    ac_cv_prog_ac_ct_CXX="$ac_prog"
20267    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20268    break 2
20269  fi
20270done
20271done
20272IFS=$as_save_IFS
20273
20274fi
20275fi
20276ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20277if test -n "$ac_ct_CXX"; then
20278  { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
20279$as_echo "$ac_ct_CXX" >&6; }
20280else
20281  { $as_echo "$as_me:$LINENO: result: no" >&5
20282$as_echo "no" >&6; }
20283fi
20284
20285
20286  test -n "$ac_ct_CXX" && break
20287done
20288
20289  if test "x$ac_ct_CXX" = x; then
20290    CXX="g++"
20291  else
20292    case $cross_compiling:$ac_tool_warned in
20293yes:)
20294{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
20295$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20296ac_tool_warned=yes ;;
20297esac
20298    CXX=$ac_ct_CXX
20299  fi
20300fi
20301
20302  fi
20303fi
20304# Provide some information about the compiler.
20305$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
20306set X $ac_compile
20307ac_compiler=$2
20308{ (ac_try="$ac_compiler --version >&5"
20309case "(($ac_try" in
20310  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20311  *) ac_try_echo=$ac_try;;
20312esac
20313eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20314$as_echo "$ac_try_echo") >&5
20315  (eval "$ac_compiler --version >&5") 2>&5
20316  ac_status=$?
20317  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20318  (exit $ac_status); }
20319{ (ac_try="$ac_compiler -v >&5"
20320case "(($ac_try" in
20321  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20322  *) ac_try_echo=$ac_try;;
20323esac
20324eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20325$as_echo "$ac_try_echo") >&5
20326  (eval "$ac_compiler -v >&5") 2>&5
20327  ac_status=$?
20328  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20329  (exit $ac_status); }
20330{ (ac_try="$ac_compiler -V >&5"
20331case "(($ac_try" in
20332  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20333  *) ac_try_echo=$ac_try;;
20334esac
20335eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20336$as_echo "$ac_try_echo") >&5
20337  (eval "$ac_compiler -V >&5") 2>&5
20338  ac_status=$?
20339  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20340  (exit $ac_status); }
20341
20342{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
20343$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20344if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
20345  $as_echo_n "(cached) " >&6
20346else
20347  cat >conftest.$ac_ext <<_ACEOF
20348/* confdefs.h.  */
20349_ACEOF
20350cat confdefs.h >>conftest.$ac_ext
20351cat >>conftest.$ac_ext <<_ACEOF
20352/* end confdefs.h.  */
20353
20354int
20355main ()
20356{
20357#ifndef __GNUC__
20358       choke me
20359#endif
20360
20361  ;
20362  return 0;
20363}
20364_ACEOF
20365rm -f conftest.$ac_objext
20366if { (ac_try="$ac_compile"
20367case "(($ac_try" in
20368  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20369  *) ac_try_echo=$ac_try;;
20370esac
20371eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20372$as_echo "$ac_try_echo") >&5
20373  (eval "$ac_compile") 2>conftest.er1
20374  ac_status=$?
20375  grep -v '^ *+' conftest.er1 >conftest.err
20376  rm -f conftest.er1
20377  cat conftest.err >&5
20378  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20379  (exit $ac_status); } && {
20380	 test -z "$ac_cxx_werror_flag" ||
20381	 test ! -s conftest.err
20382       } && test -s conftest.$ac_objext; then
20383  ac_compiler_gnu=yes
20384else
20385  $as_echo "$as_me: failed program was:" >&5
20386sed 's/^/| /' conftest.$ac_ext >&5
20387
20388	ac_compiler_gnu=no
20389fi
20390
20391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20392ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20393
20394fi
20395{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
20396$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20397if test $ac_compiler_gnu = yes; then
20398  GXX=yes
20399else
20400  GXX=
20401fi
20402ac_test_CXXFLAGS=${CXXFLAGS+set}
20403ac_save_CXXFLAGS=$CXXFLAGS
20404{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
20405$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20406if test "${ac_cv_prog_cxx_g+set}" = set; then
20407  $as_echo_n "(cached) " >&6
20408else
20409  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20410   ac_cxx_werror_flag=yes
20411   ac_cv_prog_cxx_g=no
20412   CXXFLAGS="-g"
20413   cat >conftest.$ac_ext <<_ACEOF
20414/* confdefs.h.  */
20415_ACEOF
20416cat confdefs.h >>conftest.$ac_ext
20417cat >>conftest.$ac_ext <<_ACEOF
20418/* end confdefs.h.  */
20419
20420int
20421main ()
20422{
20423
20424  ;
20425  return 0;
20426}
20427_ACEOF
20428rm -f conftest.$ac_objext
20429if { (ac_try="$ac_compile"
20430case "(($ac_try" in
20431  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20432  *) ac_try_echo=$ac_try;;
20433esac
20434eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20435$as_echo "$ac_try_echo") >&5
20436  (eval "$ac_compile") 2>conftest.er1
20437  ac_status=$?
20438  grep -v '^ *+' conftest.er1 >conftest.err
20439  rm -f conftest.er1
20440  cat conftest.err >&5
20441  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20442  (exit $ac_status); } && {
20443	 test -z "$ac_cxx_werror_flag" ||
20444	 test ! -s conftest.err
20445       } && test -s conftest.$ac_objext; then
20446  ac_cv_prog_cxx_g=yes
20447else
20448  $as_echo "$as_me: failed program was:" >&5
20449sed 's/^/| /' conftest.$ac_ext >&5
20450
20451	CXXFLAGS=""
20452      cat >conftest.$ac_ext <<_ACEOF
20453/* confdefs.h.  */
20454_ACEOF
20455cat confdefs.h >>conftest.$ac_ext
20456cat >>conftest.$ac_ext <<_ACEOF
20457/* end confdefs.h.  */
20458
20459int
20460main ()
20461{
20462
20463  ;
20464  return 0;
20465}
20466_ACEOF
20467rm -f conftest.$ac_objext
20468if { (ac_try="$ac_compile"
20469case "(($ac_try" in
20470  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20471  *) ac_try_echo=$ac_try;;
20472esac
20473eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20474$as_echo "$ac_try_echo") >&5
20475  (eval "$ac_compile") 2>conftest.er1
20476  ac_status=$?
20477  grep -v '^ *+' conftest.er1 >conftest.err
20478  rm -f conftest.er1
20479  cat conftest.err >&5
20480  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20481  (exit $ac_status); } && {
20482	 test -z "$ac_cxx_werror_flag" ||
20483	 test ! -s conftest.err
20484       } && test -s conftest.$ac_objext; then
20485  :
20486else
20487  $as_echo "$as_me: failed program was:" >&5
20488sed 's/^/| /' conftest.$ac_ext >&5
20489
20490	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20491	 CXXFLAGS="-g"
20492	 cat >conftest.$ac_ext <<_ACEOF
20493/* confdefs.h.  */
20494_ACEOF
20495cat confdefs.h >>conftest.$ac_ext
20496cat >>conftest.$ac_ext <<_ACEOF
20497/* end confdefs.h.  */
20498
20499int
20500main ()
20501{
20502
20503  ;
20504  return 0;
20505}
20506_ACEOF
20507rm -f conftest.$ac_objext
20508if { (ac_try="$ac_compile"
20509case "(($ac_try" in
20510  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20511  *) ac_try_echo=$ac_try;;
20512esac
20513eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20514$as_echo "$ac_try_echo") >&5
20515  (eval "$ac_compile") 2>conftest.er1
20516  ac_status=$?
20517  grep -v '^ *+' conftest.er1 >conftest.err
20518  rm -f conftest.er1
20519  cat conftest.err >&5
20520  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20521  (exit $ac_status); } && {
20522	 test -z "$ac_cxx_werror_flag" ||
20523	 test ! -s conftest.err
20524       } && test -s conftest.$ac_objext; then
20525  ac_cv_prog_cxx_g=yes
20526else
20527  $as_echo "$as_me: failed program was:" >&5
20528sed 's/^/| /' conftest.$ac_ext >&5
20529
20530
20531fi
20532
20533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20534fi
20535
20536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20537fi
20538
20539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20540   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20541fi
20542{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
20543$as_echo "$ac_cv_prog_cxx_g" >&6; }
20544if test "$ac_test_CXXFLAGS" = set; then
20545  CXXFLAGS=$ac_save_CXXFLAGS
20546elif test $ac_cv_prog_cxx_g = yes; then
20547  if test "$GXX" = yes; then
20548    CXXFLAGS="-g -O2"
20549  else
20550    CXXFLAGS="-g"
20551  fi
20552else
20553  if test "$GXX" = yes; then
20554    CXXFLAGS="-O2"
20555  else
20556    CXXFLAGS=
20557  fi
20558fi
20559ac_ext=cpp
20560ac_cpp='$CXXCPP $CPPFLAGS'
20561ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20562ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20563ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20564
20565
20566### Locate other tools
20567
20568if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20569    ac_ext=m
20570ac_cpp='$OBJCPP $CPPFLAGS'
20571ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20572ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20573ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20574if test -n "$ac_tool_prefix"; then
20575  for ac_prog in gcc objcc objc cc CC
20576  do
20577    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20578set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20579{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
20580$as_echo_n "checking for $ac_word... " >&6; }
20581if test "${ac_cv_prog_OBJC+set}" = set; then
20582  $as_echo_n "(cached) " >&6
20583else
20584  if test -n "$OBJC"; then
20585  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20586else
20587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20588for as_dir in $PATH
20589do
20590  IFS=$as_save_IFS
20591  test -z "$as_dir" && as_dir=.
20592  for ac_exec_ext in '' $ac_executable_extensions; do
20593  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20594    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20595    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20596    break 2
20597  fi
20598done
20599done
20600IFS=$as_save_IFS
20601
20602fi
20603fi
20604OBJC=$ac_cv_prog_OBJC
20605if test -n "$OBJC"; then
20606  { $as_echo "$as_me:$LINENO: result: $OBJC" >&5
20607$as_echo "$OBJC" >&6; }
20608else
20609  { $as_echo "$as_me:$LINENO: result: no" >&5
20610$as_echo "no" >&6; }
20611fi
20612
20613
20614    test -n "$OBJC" && break
20615  done
20616fi
20617if test -z "$OBJC"; then
20618  ac_ct_OBJC=$OBJC
20619  for ac_prog in gcc objcc objc cc CC
20620do
20621  # Extract the first word of "$ac_prog", so it can be a program name with args.
20622set dummy $ac_prog; ac_word=$2
20623{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
20624$as_echo_n "checking for $ac_word... " >&6; }
20625if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then
20626  $as_echo_n "(cached) " >&6
20627else
20628  if test -n "$ac_ct_OBJC"; then
20629  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20630else
20631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20632for as_dir in $PATH
20633do
20634  IFS=$as_save_IFS
20635  test -z "$as_dir" && as_dir=.
20636  for ac_exec_ext in '' $ac_executable_extensions; do
20637  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20638    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20639    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20640    break 2
20641  fi
20642done
20643done
20644IFS=$as_save_IFS
20645
20646fi
20647fi
20648ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20649if test -n "$ac_ct_OBJC"; then
20650  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJC" >&5
20651$as_echo "$ac_ct_OBJC" >&6; }
20652else
20653  { $as_echo "$as_me:$LINENO: result: no" >&5
20654$as_echo "no" >&6; }
20655fi
20656
20657
20658  test -n "$ac_ct_OBJC" && break
20659done
20660
20661  if test "x$ac_ct_OBJC" = x; then
20662    OBJC="gcc"
20663  else
20664    case $cross_compiling:$ac_tool_warned in
20665yes:)
20666{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
20667$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20668ac_tool_warned=yes ;;
20669esac
20670    OBJC=$ac_ct_OBJC
20671  fi
20672fi
20673
20674# Provide some information about the compiler.
20675$as_echo "$as_me:$LINENO: checking for Objective C compiler version" >&5
20676set X $ac_compile
20677ac_compiler=$2
20678{ (ac_try="$ac_compiler --version >&5"
20679case "(($ac_try" in
20680  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20681  *) ac_try_echo=$ac_try;;
20682esac
20683eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20684$as_echo "$ac_try_echo") >&5
20685  (eval "$ac_compiler --version >&5") 2>&5
20686  ac_status=$?
20687  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20688  (exit $ac_status); }
20689{ (ac_try="$ac_compiler -v >&5"
20690case "(($ac_try" in
20691  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20692  *) ac_try_echo=$ac_try;;
20693esac
20694eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20695$as_echo "$ac_try_echo") >&5
20696  (eval "$ac_compiler -v >&5") 2>&5
20697  ac_status=$?
20698  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20699  (exit $ac_status); }
20700{ (ac_try="$ac_compiler -V >&5"
20701case "(($ac_try" in
20702  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20703  *) ac_try_echo=$ac_try;;
20704esac
20705eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20706$as_echo "$ac_try_echo") >&5
20707  (eval "$ac_compiler -V >&5") 2>&5
20708  ac_status=$?
20709  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20710  (exit $ac_status); }
20711
20712{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Objective C compiler" >&5
20713$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20714if test "${ac_cv_objc_compiler_gnu+set}" = set; then
20715  $as_echo_n "(cached) " >&6
20716else
20717  cat >conftest.$ac_ext <<_ACEOF
20718/* confdefs.h.  */
20719_ACEOF
20720cat confdefs.h >>conftest.$ac_ext
20721cat >>conftest.$ac_ext <<_ACEOF
20722/* end confdefs.h.  */
20723
20724int
20725main ()
20726{
20727#ifndef __GNUC__
20728       choke me
20729#endif
20730
20731  ;
20732  return 0;
20733}
20734_ACEOF
20735rm -f conftest.$ac_objext
20736if { (ac_try="$ac_compile"
20737case "(($ac_try" in
20738  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20739  *) ac_try_echo=$ac_try;;
20740esac
20741eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20742$as_echo "$ac_try_echo") >&5
20743  (eval "$ac_compile") 2>conftest.er1
20744  ac_status=$?
20745  grep -v '^ *+' conftest.er1 >conftest.err
20746  rm -f conftest.er1
20747  cat conftest.err >&5
20748  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20749  (exit $ac_status); } && {
20750	 test -z "$ac_objc_werror_flag" ||
20751	 test ! -s conftest.err
20752       } && test -s conftest.$ac_objext; then
20753  ac_compiler_gnu=yes
20754else
20755  $as_echo "$as_me: failed program was:" >&5
20756sed 's/^/| /' conftest.$ac_ext >&5
20757
20758	ac_compiler_gnu=no
20759fi
20760
20761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20762ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20763
20764fi
20765{ $as_echo "$as_me:$LINENO: result: $ac_cv_objc_compiler_gnu" >&5
20766$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20767if test $ac_compiler_gnu = yes; then
20768  GOBJC=yes
20769else
20770  GOBJC=
20771fi
20772ac_test_OBJCFLAGS=${OBJCFLAGS+set}
20773ac_save_OBJCFLAGS=$OBJCFLAGS
20774{ $as_echo "$as_me:$LINENO: checking whether $OBJC accepts -g" >&5
20775$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
20776if test "${ac_cv_prog_objc_g+set}" = set; then
20777  $as_echo_n "(cached) " >&6
20778else
20779  ac_save_objc_werror_flag=$ac_objc_werror_flag
20780   ac_objc_werror_flag=yes
20781   ac_cv_prog_objc_g=no
20782   OBJCFLAGS="-g"
20783   cat >conftest.$ac_ext <<_ACEOF
20784/* confdefs.h.  */
20785_ACEOF
20786cat confdefs.h >>conftest.$ac_ext
20787cat >>conftest.$ac_ext <<_ACEOF
20788/* end confdefs.h.  */
20789
20790int
20791main ()
20792{
20793
20794  ;
20795  return 0;
20796}
20797_ACEOF
20798rm -f conftest.$ac_objext
20799if { (ac_try="$ac_compile"
20800case "(($ac_try" in
20801  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20802  *) ac_try_echo=$ac_try;;
20803esac
20804eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20805$as_echo "$ac_try_echo") >&5
20806  (eval "$ac_compile") 2>conftest.er1
20807  ac_status=$?
20808  grep -v '^ *+' conftest.er1 >conftest.err
20809  rm -f conftest.er1
20810  cat conftest.err >&5
20811  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20812  (exit $ac_status); } && {
20813	 test -z "$ac_objc_werror_flag" ||
20814	 test ! -s conftest.err
20815       } && test -s conftest.$ac_objext; then
20816  ac_cv_prog_objc_g=yes
20817else
20818  $as_echo "$as_me: failed program was:" >&5
20819sed 's/^/| /' conftest.$ac_ext >&5
20820
20821	OBJCFLAGS=""
20822      cat >conftest.$ac_ext <<_ACEOF
20823/* confdefs.h.  */
20824_ACEOF
20825cat confdefs.h >>conftest.$ac_ext
20826cat >>conftest.$ac_ext <<_ACEOF
20827/* end confdefs.h.  */
20828
20829int
20830main ()
20831{
20832
20833  ;
20834  return 0;
20835}
20836_ACEOF
20837rm -f conftest.$ac_objext
20838if { (ac_try="$ac_compile"
20839case "(($ac_try" in
20840  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20841  *) ac_try_echo=$ac_try;;
20842esac
20843eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20844$as_echo "$ac_try_echo") >&5
20845  (eval "$ac_compile") 2>conftest.er1
20846  ac_status=$?
20847  grep -v '^ *+' conftest.er1 >conftest.err
20848  rm -f conftest.er1
20849  cat conftest.err >&5
20850  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20851  (exit $ac_status); } && {
20852	 test -z "$ac_objc_werror_flag" ||
20853	 test ! -s conftest.err
20854       } && test -s conftest.$ac_objext; then
20855  :
20856else
20857  $as_echo "$as_me: failed program was:" >&5
20858sed 's/^/| /' conftest.$ac_ext >&5
20859
20860	ac_objc_werror_flag=$ac_save_objc_werror_flag
20861	 OBJCFLAGS="-g"
20862	 cat >conftest.$ac_ext <<_ACEOF
20863/* confdefs.h.  */
20864_ACEOF
20865cat confdefs.h >>conftest.$ac_ext
20866cat >>conftest.$ac_ext <<_ACEOF
20867/* end confdefs.h.  */
20868
20869int
20870main ()
20871{
20872
20873  ;
20874  return 0;
20875}
20876_ACEOF
20877rm -f conftest.$ac_objext
20878if { (ac_try="$ac_compile"
20879case "(($ac_try" in
20880  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20881  *) ac_try_echo=$ac_try;;
20882esac
20883eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20884$as_echo "$ac_try_echo") >&5
20885  (eval "$ac_compile") 2>conftest.er1
20886  ac_status=$?
20887  grep -v '^ *+' conftest.er1 >conftest.err
20888  rm -f conftest.er1
20889  cat conftest.err >&5
20890  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20891  (exit $ac_status); } && {
20892	 test -z "$ac_objc_werror_flag" ||
20893	 test ! -s conftest.err
20894       } && test -s conftest.$ac_objext; then
20895  ac_cv_prog_objc_g=yes
20896else
20897  $as_echo "$as_me: failed program was:" >&5
20898sed 's/^/| /' conftest.$ac_ext >&5
20899
20900
20901fi
20902
20903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20904fi
20905
20906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20907fi
20908
20909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20910   ac_objc_werror_flag=$ac_save_objc_werror_flag
20911fi
20912{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_objc_g" >&5
20913$as_echo "$ac_cv_prog_objc_g" >&6; }
20914if test "$ac_test_OBJCFLAGS" = set; then
20915  OBJCFLAGS=$ac_save_OBJCFLAGS
20916elif test $ac_cv_prog_objc_g = yes; then
20917  if test "$GOBJC" = yes; then
20918    OBJCFLAGS="-g -O2"
20919  else
20920    OBJCFLAGS="-g"
20921  fi
20922else
20923  if test "$GOBJC" = yes; then
20924    OBJCFLAGS="-O2"
20925  else
20926    OBJCFLAGS=
20927  fi
20928fi
20929ac_ext=cpp
20930ac_cpp='$CXXCPP $CPPFLAGS'
20931ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20932ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20933ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20934
20935
20936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20937
20938  # First separate the path from the arguments. This will split at the first
20939  # space.
20940  complete="$OBJC"
20941  path="${complete%% *}"
20942  tmp="$complete EOL"
20943  arguments="${tmp#* }"
20944
20945  # Input might be given as Windows format, start by converting to
20946  # unix format.
20947  new_path=`$CYGPATH -u "$path"`
20948
20949  # Now try to locate executable using which
20950  new_path=`$WHICH "$new_path" 2> /dev/null`
20951  # bat and cmd files are not always considered executable in cygwin causing which
20952  # to not find them
20953  if test "x$new_path" = x \
20954           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20955           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20956    new_path=`$CYGPATH -u "$path"`
20957  fi
20958  if test "x$new_path" = x; then
20959    # Oops. Which didn't find the executable.
20960    # The splitting of arguments from the executable at a space might have been incorrect,
20961    # since paths with space are more likely in Windows. Give it another try with the whole
20962    # argument.
20963    path="$complete"
20964    arguments="EOL"
20965    new_path=`$CYGPATH -u "$path"`
20966    new_path=`$WHICH "$new_path" 2> /dev/null`
20967    # bat and cmd files are not always considered executable in cygwin causing which
20968    # to not find them
20969    if test "x$new_path" = x \
20970             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20971             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20972      new_path=`$CYGPATH -u "$path"`
20973    fi
20974    if test "x$new_path" = x; then
20975      # It's still not found. Now this is an unrecoverable error.
20976      { $as_echo "$as_me:$LINENO: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20977$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20978      has_space=`$ECHO "$complete" | $GREP " "`
20979      if test "x$has_space" != x; then
20980        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20981$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20982      fi
20983      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJC" >&5
20984$as_echo "$as_me: error: Cannot locate the the path of OBJC" >&2;}
20985   { (exit 1); exit 1; }; }
20986    fi
20987  fi
20988
20989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20992  # "foo.exe" is OK but "foo" is an error.
20993  #
20994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20995  # It is also a way to make sure we got the proper file name for the real test later on.
20996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20997  if test "x$test_shortpath" = x; then
20998    # Short path failed, file does not exist as specified.
20999    # Try adding .exe or .cmd
21000    if test -f "${new_path}.exe"; then
21001       input_to_shortpath="${new_path}.exe"
21002    elif test -f "${new_path}.cmd"; then
21003       input_to_shortpath="${new_path}.cmd"
21004    else
21005      { $as_echo "$as_me:$LINENO: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21006$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21007      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21008$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21009      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJC" >&5
21010$as_echo "$as_me: error: Cannot locate the the path of OBJC" >&2;}
21011   { (exit 1); exit 1; }; }
21012    fi
21013  else
21014    input_to_shortpath="$new_path"
21015  fi
21016
21017  # Call helper function which possibly converts this using DOS-style short mode.
21018  # If so, the updated path is stored in $new_path.
21019  new_path="$input_to_shortpath"
21020
21021  input_path="$input_to_shortpath"
21022  # Check if we need to convert this using DOS-style short mode. If the path
21023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21024  # take no chances and rewrite it.
21025  # Note: m4 eats our [], so we need to use [ and ] instead.
21026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21027  if test "x$has_forbidden_chars" != x; then
21028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21032      # Going to short mode and back again did indeed matter. Since short mode is
21033      # case insensitive, let's make it lowercase to improve readability.
21034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21035      # Now convert it back to Unix-stile (cygpath)
21036      input_path=`$CYGPATH -u "$shortmode_path"`
21037      new_path="$input_path"
21038    fi
21039  fi
21040
21041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21042  if test "x$test_cygdrive_prefix" = x; then
21043    # As a simple fix, exclude /usr/bin since it's not a real path.
21044    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21046      # a path prefixed by /cygdrive for fixpath to work.
21047      new_path="$CYGWIN_ROOT_PATH$input_path"
21048    fi
21049  fi
21050
21051  # remove trailing .exe if any
21052  new_path="${new_path/%.exe/}"
21053
21054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21055
21056  # First separate the path from the arguments. This will split at the first
21057  # space.
21058  complete="$OBJC"
21059  path="${complete%% *}"
21060  tmp="$complete EOL"
21061  arguments="${tmp#* }"
21062
21063  # Input might be given as Windows format, start by converting to
21064  # unix format.
21065  new_path="$path"
21066
21067  windows_path="$new_path"
21068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21069    unix_path=`$CYGPATH -u "$windows_path"`
21070    new_path="$unix_path"
21071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21073    new_path="$unix_path"
21074  fi
21075
21076
21077  # Now try to locate executable using which
21078  new_path=`$WHICH "$new_path" 2> /dev/null`
21079
21080  if test "x$new_path" = x; then
21081    # Oops. Which didn't find the executable.
21082    # The splitting of arguments from the executable at a space might have been incorrect,
21083    # since paths with space are more likely in Windows. Give it another try with the whole
21084    # argument.
21085    path="$complete"
21086    arguments="EOL"
21087    new_path="$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
21099    new_path=`$WHICH "$new_path" 2> /dev/null`
21100
21101    if test "x$new_path" = x; then
21102      # It's still not found. Now this is an unrecoverable error.
21103      { $as_echo "$as_me:$LINENO: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21104$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21105      has_space=`$ECHO "$complete" | $GREP " "`
21106      if test "x$has_space" != x; then
21107        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21108$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21109      fi
21110      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJC" >&5
21111$as_echo "$as_me: error: Cannot locate the the path of OBJC" >&2;}
21112   { (exit 1); exit 1; }; }
21113    fi
21114  fi
21115
21116  # Now new_path has a complete unix path to the binary
21117  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21118    # Keep paths in /bin as-is, but remove trailing .exe if any
21119    new_path="${new_path/%.exe/}"
21120    # Do not save /bin paths to all_fixpath_prefixes!
21121  else
21122    # Not in mixed or Windows style, start by that.
21123    new_path=`cmd //c echo $new_path`
21124
21125  input_path="$new_path"
21126  # Check if we need to convert this using DOS-style short mode. If the path
21127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21128  # take no chances and rewrite it.
21129  # Note: m4 eats our [], so we need to use [ and ] instead.
21130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21131  if test "x$has_forbidden_chars" != x; then
21132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21134  fi
21135
21136    # Output is in $new_path
21137
21138  windows_path="$new_path"
21139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21140    unix_path=`$CYGPATH -u "$windows_path"`
21141    new_path="$unix_path"
21142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21144    new_path="$unix_path"
21145  fi
21146
21147    # remove trailing .exe if any
21148    new_path="${new_path/%.exe/}"
21149
21150    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21151    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21152  fi
21153
21154  else
21155    # We're on a posix platform. Hooray! :)
21156    # First separate the path from the arguments. This will split at the first
21157    # space.
21158    complete="$OBJC"
21159    path="${complete%% *}"
21160    tmp="$complete EOL"
21161    arguments="${tmp#* }"
21162
21163    new_path=`$WHICH $path 2> /dev/null`
21164    if test "x$new_path" = x; then
21165      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21166      if test "x$is_absolute_path" != x; then
21167        { $as_echo "$as_me:$LINENO: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&5
21168$as_echo "$as_me: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&6;}
21169        new_path="$path"
21170      else
21171        { $as_echo "$as_me:$LINENO: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21172$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21173        has_space=`$ECHO "$complete" | $GREP " "`
21174        if test "x$has_space" != x; then
21175          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
21176$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21177        fi
21178        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJC" >&5
21179$as_echo "$as_me: error: Cannot locate the the path of OBJC" >&2;}
21180   { (exit 1); exit 1; }; }
21181      fi
21182    fi
21183  fi
21184
21185  # Now join together the path and the arguments once again
21186  if test "x$arguments" != xEOL; then
21187      new_complete="$new_path ${arguments% *}"
21188  else
21189      new_complete="$new_path"
21190  fi
21191
21192  if test "x$complete" != "x$new_complete"; then
21193    OBJC="$new_complete"
21194    { $as_echo "$as_me:$LINENO: Rewriting OBJC to \"$new_complete\"" >&5
21195$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21196  fi
21197
21198else
21199    OBJC=
21200fi
21201
21202# Restore the flags to the user specified values.
21203# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21204CFLAGS="$ORG_CFLAGS"
21205CXXFLAGS="$ORG_CXXFLAGS"
21206OBJCFLAGS="$ORG_OBJCFLAGS"
21207
21208LD="$CC"
21209LDEXE="$CC"
21210LDCXX="$CXX"
21211LDEXECXX="$CXX"
21212
21213# LDEXE is the linker to use, when creating executables.
21214
21215# Linking C++ libraries.
21216
21217# Linking C++ executables.
21218
21219
21220if test "x$OPENJDK_TARGET_OS" != xwindows; then
21221    if test -n "$ac_tool_prefix"; then
21222  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21223set dummy ${ac_tool_prefix}ar; ac_word=$2
21224{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
21225$as_echo_n "checking for $ac_word... " >&6; }
21226if test "${ac_cv_prog_AR+set}" = set; then
21227  $as_echo_n "(cached) " >&6
21228else
21229  if test -n "$AR"; then
21230  ac_cv_prog_AR="$AR" # Let the user override the test.
21231else
21232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21233for as_dir in $PATH
21234do
21235  IFS=$as_save_IFS
21236  test -z "$as_dir" && as_dir=.
21237  for ac_exec_ext in '' $ac_executable_extensions; do
21238  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21239    ac_cv_prog_AR="${ac_tool_prefix}ar"
21240    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21241    break 2
21242  fi
21243done
21244done
21245IFS=$as_save_IFS
21246
21247fi
21248fi
21249AR=$ac_cv_prog_AR
21250if test -n "$AR"; then
21251  { $as_echo "$as_me:$LINENO: result: $AR" >&5
21252$as_echo "$AR" >&6; }
21253else
21254  { $as_echo "$as_me:$LINENO: result: no" >&5
21255$as_echo "no" >&6; }
21256fi
21257
21258
21259fi
21260if test -z "$ac_cv_prog_AR"; then
21261  ac_ct_AR=$AR
21262  # Extract the first word of "ar", so it can be a program name with args.
21263set dummy ar; ac_word=$2
21264{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
21265$as_echo_n "checking for $ac_word... " >&6; }
21266if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
21267  $as_echo_n "(cached) " >&6
21268else
21269  if test -n "$ac_ct_AR"; then
21270  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21271else
21272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21273for as_dir in $PATH
21274do
21275  IFS=$as_save_IFS
21276  test -z "$as_dir" && as_dir=.
21277  for ac_exec_ext in '' $ac_executable_extensions; do
21278  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21279    ac_cv_prog_ac_ct_AR="ar"
21280    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21281    break 2
21282  fi
21283done
21284done
21285IFS=$as_save_IFS
21286
21287fi
21288fi
21289ac_ct_AR=$ac_cv_prog_ac_ct_AR
21290if test -n "$ac_ct_AR"; then
21291  { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
21292$as_echo "$ac_ct_AR" >&6; }
21293else
21294  { $as_echo "$as_me:$LINENO: result: no" >&5
21295$as_echo "no" >&6; }
21296fi
21297
21298  if test "x$ac_ct_AR" = x; then
21299    AR=""
21300  else
21301    case $cross_compiling:$ac_tool_warned in
21302yes:)
21303{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
21304$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21305ac_tool_warned=yes ;;
21306esac
21307    AR=$ac_ct_AR
21308  fi
21309else
21310  AR="$ac_cv_prog_AR"
21311fi
21312
21313
21314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21315
21316  # First separate the path from the arguments. This will split at the first
21317  # space.
21318  complete="$AR"
21319  path="${complete%% *}"
21320  tmp="$complete EOL"
21321  arguments="${tmp#* }"
21322
21323  # Input might be given as Windows format, start by converting to
21324  # unix format.
21325  new_path=`$CYGPATH -u "$path"`
21326
21327  # Now try to locate executable using which
21328  new_path=`$WHICH "$new_path" 2> /dev/null`
21329  # bat and cmd files are not always considered executable in cygwin causing which
21330  # to not find them
21331  if test "x$new_path" = x \
21332           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21333           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21334    new_path=`$CYGPATH -u "$path"`
21335  fi
21336  if test "x$new_path" = x; then
21337    # Oops. Which didn't find the executable.
21338    # The splitting of arguments from the executable at a space might have been incorrect,
21339    # since paths with space are more likely in Windows. Give it another try with the whole
21340    # argument.
21341    path="$complete"
21342    arguments="EOL"
21343    new_path=`$CYGPATH -u "$path"`
21344    new_path=`$WHICH "$new_path" 2> /dev/null`
21345    # bat and cmd files are not always considered executable in cygwin causing which
21346    # to not find them
21347    if test "x$new_path" = x \
21348             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21349             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21350      new_path=`$CYGPATH -u "$path"`
21351    fi
21352    if test "x$new_path" = x; then
21353      # It's still not found. Now this is an unrecoverable error.
21354      { $as_echo "$as_me:$LINENO: The path of AR, which resolves as \"$complete\", is not found." >&5
21355$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21356      has_space=`$ECHO "$complete" | $GREP " "`
21357      if test "x$has_space" != x; then
21358        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21360      fi
21361      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AR" >&5
21362$as_echo "$as_me: error: Cannot locate the the path of AR" >&2;}
21363   { (exit 1); exit 1; }; }
21364    fi
21365  fi
21366
21367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21370  # "foo.exe" is OK but "foo" is an error.
21371  #
21372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21373  # It is also a way to make sure we got the proper file name for the real test later on.
21374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21375  if test "x$test_shortpath" = x; then
21376    # Short path failed, file does not exist as specified.
21377    # Try adding .exe or .cmd
21378    if test -f "${new_path}.exe"; then
21379       input_to_shortpath="${new_path}.exe"
21380    elif test -f "${new_path}.cmd"; then
21381       input_to_shortpath="${new_path}.cmd"
21382    else
21383      { $as_echo "$as_me:$LINENO: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21384$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21385      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21386$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21387      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AR" >&5
21388$as_echo "$as_me: error: Cannot locate the the path of AR" >&2;}
21389   { (exit 1); exit 1; }; }
21390    fi
21391  else
21392    input_to_shortpath="$new_path"
21393  fi
21394
21395  # Call helper function which possibly converts this using DOS-style short mode.
21396  # If so, the updated path is stored in $new_path.
21397  new_path="$input_to_shortpath"
21398
21399  input_path="$input_to_shortpath"
21400  # Check if we need to convert this using DOS-style short mode. If the path
21401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21402  # take no chances and rewrite it.
21403  # Note: m4 eats our [], so we need to use [ and ] instead.
21404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21405  if test "x$has_forbidden_chars" != x; then
21406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21410      # Going to short mode and back again did indeed matter. Since short mode is
21411      # case insensitive, let's make it lowercase to improve readability.
21412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21413      # Now convert it back to Unix-stile (cygpath)
21414      input_path=`$CYGPATH -u "$shortmode_path"`
21415      new_path="$input_path"
21416    fi
21417  fi
21418
21419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21420  if test "x$test_cygdrive_prefix" = x; then
21421    # As a simple fix, exclude /usr/bin since it's not a real path.
21422    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21424      # a path prefixed by /cygdrive for fixpath to work.
21425      new_path="$CYGWIN_ROOT_PATH$input_path"
21426    fi
21427  fi
21428
21429  # remove trailing .exe if any
21430  new_path="${new_path/%.exe/}"
21431
21432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21433
21434  # First separate the path from the arguments. This will split at the first
21435  # space.
21436  complete="$AR"
21437  path="${complete%% *}"
21438  tmp="$complete EOL"
21439  arguments="${tmp#* }"
21440
21441  # Input might be given as Windows format, start by converting to
21442  # unix format.
21443  new_path="$path"
21444
21445  windows_path="$new_path"
21446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21447    unix_path=`$CYGPATH -u "$windows_path"`
21448    new_path="$unix_path"
21449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21451    new_path="$unix_path"
21452  fi
21453
21454
21455  # Now try to locate executable using which
21456  new_path=`$WHICH "$new_path" 2> /dev/null`
21457
21458  if test "x$new_path" = x; then
21459    # Oops. Which didn't find the executable.
21460    # The splitting of arguments from the executable at a space might have been incorrect,
21461    # since paths with space are more likely in Windows. Give it another try with the whole
21462    # argument.
21463    path="$complete"
21464    arguments="EOL"
21465    new_path="$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
21477    new_path=`$WHICH "$new_path" 2> /dev/null`
21478
21479    if test "x$new_path" = x; then
21480      # It's still not found. Now this is an unrecoverable error.
21481      { $as_echo "$as_me:$LINENO: The path of AR, which resolves as \"$complete\", is not found." >&5
21482$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21483      has_space=`$ECHO "$complete" | $GREP " "`
21484      if test "x$has_space" != x; then
21485        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21486$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21487      fi
21488      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AR" >&5
21489$as_echo "$as_me: error: Cannot locate the the path of AR" >&2;}
21490   { (exit 1); exit 1; }; }
21491    fi
21492  fi
21493
21494  # Now new_path has a complete unix path to the binary
21495  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21496    # Keep paths in /bin as-is, but remove trailing .exe if any
21497    new_path="${new_path/%.exe/}"
21498    # Do not save /bin paths to all_fixpath_prefixes!
21499  else
21500    # Not in mixed or Windows style, start by that.
21501    new_path=`cmd //c echo $new_path`
21502
21503  input_path="$new_path"
21504  # Check if we need to convert this using DOS-style short mode. If the path
21505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21506  # take no chances and rewrite it.
21507  # Note: m4 eats our [], so we need to use [ and ] instead.
21508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21509  if test "x$has_forbidden_chars" != x; then
21510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21512  fi
21513
21514    # Output is in $new_path
21515
21516  windows_path="$new_path"
21517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21518    unix_path=`$CYGPATH -u "$windows_path"`
21519    new_path="$unix_path"
21520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21522    new_path="$unix_path"
21523  fi
21524
21525    # remove trailing .exe if any
21526    new_path="${new_path/%.exe/}"
21527
21528    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21529    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21530  fi
21531
21532  else
21533    # We're on a posix platform. Hooray! :)
21534    # First separate the path from the arguments. This will split at the first
21535    # space.
21536    complete="$AR"
21537    path="${complete%% *}"
21538    tmp="$complete EOL"
21539    arguments="${tmp#* }"
21540
21541    new_path=`$WHICH $path 2> /dev/null`
21542    if test "x$new_path" = x; then
21543      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21544      if test "x$is_absolute_path" != x; then
21545        { $as_echo "$as_me:$LINENO: Resolving AR (as $path) with 'which' failed, using $path directly." >&5
21546$as_echo "$as_me: Resolving AR (as $path) with 'which' failed, using $path directly." >&6;}
21547        new_path="$path"
21548      else
21549        { $as_echo "$as_me:$LINENO: The path of AR, which resolves as \"$complete\", is not found." >&5
21550$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21551        has_space=`$ECHO "$complete" | $GREP " "`
21552        if test "x$has_space" != x; then
21553          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
21554$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21555        fi
21556        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AR" >&5
21557$as_echo "$as_me: error: Cannot locate the the path of AR" >&2;}
21558   { (exit 1); exit 1; }; }
21559      fi
21560    fi
21561  fi
21562
21563  # Now join together the path and the arguments once again
21564  if test "x$arguments" != xEOL; then
21565      new_complete="$new_path ${arguments% *}"
21566  else
21567      new_complete="$new_path"
21568  fi
21569
21570  if test "x$complete" != "x$new_complete"; then
21571    AR="$new_complete"
21572    { $as_echo "$as_me:$LINENO: Rewriting AR to \"$new_complete\"" >&5
21573$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21574  fi
21575
21576fi
21577if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21578    ARFLAGS="-r"
21579else
21580    ARFLAGS=""
21581fi
21582
21583
21584# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21585HOTSPOT_CXX="$CXX"
21586HOTSPOT_LD="$LD"
21587
21588
21589
21590COMPILER_NAME=gcc
21591COMPILER_TYPE=CC
21592if test "x$OPENJDK_TARGET_OS" = xwindows; then
21593
21594    # For now, assume that we are always compiling using cl.exe.
21595    CC_OUT_OPTION=-Fo
21596    EXE_OUT_OPTION=-out:
21597    LD_OUT_OPTION=-out:
21598    AR_OUT_OPTION=-out:
21599    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21600    # program for something completely different.
21601    # Extract the first word of "link", so it can be a program name with args.
21602set dummy link; ac_word=$2
21603{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
21604$as_echo_n "checking for $ac_word... " >&6; }
21605if test "${ac_cv_prog_WINLD+set}" = set; then
21606  $as_echo_n "(cached) " >&6
21607else
21608  if test -n "$WINLD"; then
21609  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21610else
21611  ac_prog_rejected=no
21612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21613for as_dir in $PATH
21614do
21615  IFS=$as_save_IFS
21616  test -z "$as_dir" && as_dir=.
21617  for ac_exec_ext in '' $ac_executable_extensions; do
21618  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21619    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21620       ac_prog_rejected=yes
21621       continue
21622     fi
21623    ac_cv_prog_WINLD="link"
21624    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21625    break 2
21626  fi
21627done
21628done
21629IFS=$as_save_IFS
21630
21631if test $ac_prog_rejected = yes; then
21632  # We found a bogon in the path, so make sure we never use it.
21633  set dummy $ac_cv_prog_WINLD
21634  shift
21635  if test $# != 0; then
21636    # We chose a different compiler from the bogus one.
21637    # However, it has the same basename, so the bogon will be chosen
21638    # first if we set WINLD to just the basename; use the full file name.
21639    shift
21640    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21641  fi
21642fi
21643fi
21644fi
21645WINLD=$ac_cv_prog_WINLD
21646if test -n "$WINLD"; then
21647  { $as_echo "$as_me:$LINENO: result: $WINLD" >&5
21648$as_echo "$WINLD" >&6; }
21649else
21650  { $as_echo "$as_me:$LINENO: result: no" >&5
21651$as_echo "no" >&6; }
21652fi
21653
21654
21655    # Since we must ignore the first found link, WINLD will contain
21656    # the full path to the link.exe program.
21657
21658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21659
21660  # First separate the path from the arguments. This will split at the first
21661  # space.
21662  complete="$WINLD"
21663  path="${complete%% *}"
21664  tmp="$complete EOL"
21665  arguments="${tmp#* }"
21666
21667  # Input might be given as Windows format, start by converting to
21668  # unix format.
21669  new_path=`$CYGPATH -u "$path"`
21670
21671  # Now try to locate executable using which
21672  new_path=`$WHICH "$new_path" 2> /dev/null`
21673  # bat and cmd files are not always considered executable in cygwin causing which
21674  # to not find them
21675  if test "x$new_path" = x \
21676           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21677           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21678    new_path=`$CYGPATH -u "$path"`
21679  fi
21680  if test "x$new_path" = x; then
21681    # Oops. Which didn't find the executable.
21682    # The splitting of arguments from the executable at a space might have been incorrect,
21683    # since paths with space are more likely in Windows. Give it another try with the whole
21684    # argument.
21685    path="$complete"
21686    arguments="EOL"
21687    new_path=`$CYGPATH -u "$path"`
21688    new_path=`$WHICH "$new_path" 2> /dev/null`
21689    # bat and cmd files are not always considered executable in cygwin causing which
21690    # to not find them
21691    if test "x$new_path" = x \
21692             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21693             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21694      new_path=`$CYGPATH -u "$path"`
21695    fi
21696    if test "x$new_path" = x; then
21697      # It's still not found. Now this is an unrecoverable error.
21698      { $as_echo "$as_me:$LINENO: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21699$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21700      has_space=`$ECHO "$complete" | $GREP " "`
21701      if test "x$has_space" != x; then
21702        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21704      fi
21705      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINLD" >&5
21706$as_echo "$as_me: error: Cannot locate the the path of WINLD" >&2;}
21707   { (exit 1); exit 1; }; }
21708    fi
21709  fi
21710
21711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21714  # "foo.exe" is OK but "foo" is an error.
21715  #
21716  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21717  # It is also a way to make sure we got the proper file name for the real test later on.
21718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21719  if test "x$test_shortpath" = x; then
21720    # Short path failed, file does not exist as specified.
21721    # Try adding .exe or .cmd
21722    if test -f "${new_path}.exe"; then
21723       input_to_shortpath="${new_path}.exe"
21724    elif test -f "${new_path}.cmd"; then
21725       input_to_shortpath="${new_path}.cmd"
21726    else
21727      { $as_echo "$as_me:$LINENO: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21728$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21729      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21730$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21731      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINLD" >&5
21732$as_echo "$as_me: error: Cannot locate the the path of WINLD" >&2;}
21733   { (exit 1); exit 1; }; }
21734    fi
21735  else
21736    input_to_shortpath="$new_path"
21737  fi
21738
21739  # Call helper function which possibly converts this using DOS-style short mode.
21740  # If so, the updated path is stored in $new_path.
21741  new_path="$input_to_shortpath"
21742
21743  input_path="$input_to_shortpath"
21744  # Check if we need to convert this using DOS-style short mode. If the path
21745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21746  # take no chances and rewrite it.
21747  # Note: m4 eats our [], so we need to use [ and ] instead.
21748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21749  if test "x$has_forbidden_chars" != x; then
21750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21754      # Going to short mode and back again did indeed matter. Since short mode is
21755      # case insensitive, let's make it lowercase to improve readability.
21756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21757      # Now convert it back to Unix-stile (cygpath)
21758      input_path=`$CYGPATH -u "$shortmode_path"`
21759      new_path="$input_path"
21760    fi
21761  fi
21762
21763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21764  if test "x$test_cygdrive_prefix" = x; then
21765    # As a simple fix, exclude /usr/bin since it's not a real path.
21766    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21768      # a path prefixed by /cygdrive for fixpath to work.
21769      new_path="$CYGWIN_ROOT_PATH$input_path"
21770    fi
21771  fi
21772
21773  # remove trailing .exe if any
21774  new_path="${new_path/%.exe/}"
21775
21776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21777
21778  # First separate the path from the arguments. This will split at the first
21779  # space.
21780  complete="$WINLD"
21781  path="${complete%% *}"
21782  tmp="$complete EOL"
21783  arguments="${tmp#* }"
21784
21785  # Input might be given as Windows format, start by converting to
21786  # unix format.
21787  new_path="$path"
21788
21789  windows_path="$new_path"
21790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21791    unix_path=`$CYGPATH -u "$windows_path"`
21792    new_path="$unix_path"
21793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21795    new_path="$unix_path"
21796  fi
21797
21798
21799  # Now try to locate executable using which
21800  new_path=`$WHICH "$new_path" 2> /dev/null`
21801
21802  if test "x$new_path" = x; then
21803    # Oops. Which didn't find the executable.
21804    # The splitting of arguments from the executable at a space might have been incorrect,
21805    # since paths with space are more likely in Windows. Give it another try with the whole
21806    # argument.
21807    path="$complete"
21808    arguments="EOL"
21809    new_path="$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
21821    new_path=`$WHICH "$new_path" 2> /dev/null`
21822
21823    if test "x$new_path" = x; then
21824      # It's still not found. Now this is an unrecoverable error.
21825      { $as_echo "$as_me:$LINENO: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21826$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21827      has_space=`$ECHO "$complete" | $GREP " "`
21828      if test "x$has_space" != x; then
21829        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21830$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21831      fi
21832      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINLD" >&5
21833$as_echo "$as_me: error: Cannot locate the the path of WINLD" >&2;}
21834   { (exit 1); exit 1; }; }
21835    fi
21836  fi
21837
21838  # Now new_path has a complete unix path to the binary
21839  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21840    # Keep paths in /bin as-is, but remove trailing .exe if any
21841    new_path="${new_path/%.exe/}"
21842    # Do not save /bin paths to all_fixpath_prefixes!
21843  else
21844    # Not in mixed or Windows style, start by that.
21845    new_path=`cmd //c echo $new_path`
21846
21847  input_path="$new_path"
21848  # Check if we need to convert this using DOS-style short mode. If the path
21849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21850  # take no chances and rewrite it.
21851  # Note: m4 eats our [], so we need to use [ and ] instead.
21852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21853  if test "x$has_forbidden_chars" != x; then
21854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21856  fi
21857
21858    # Output is in $new_path
21859
21860  windows_path="$new_path"
21861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21862    unix_path=`$CYGPATH -u "$windows_path"`
21863    new_path="$unix_path"
21864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21866    new_path="$unix_path"
21867  fi
21868
21869    # remove trailing .exe if any
21870    new_path="${new_path/%.exe/}"
21871
21872    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21873    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21874  fi
21875
21876  else
21877    # We're on a posix platform. Hooray! :)
21878    # First separate the path from the arguments. This will split at the first
21879    # space.
21880    complete="$WINLD"
21881    path="${complete%% *}"
21882    tmp="$complete EOL"
21883    arguments="${tmp#* }"
21884
21885    new_path=`$WHICH $path 2> /dev/null`
21886    if test "x$new_path" = x; then
21887      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21888      if test "x$is_absolute_path" != x; then
21889        { $as_echo "$as_me:$LINENO: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&5
21890$as_echo "$as_me: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&6;}
21891        new_path="$path"
21892      else
21893        { $as_echo "$as_me:$LINENO: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21894$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21895        has_space=`$ECHO "$complete" | $GREP " "`
21896        if test "x$has_space" != x; then
21897          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
21898$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21899        fi
21900        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINLD" >&5
21901$as_echo "$as_me: error: Cannot locate the the path of WINLD" >&2;}
21902   { (exit 1); exit 1; }; }
21903      fi
21904    fi
21905  fi
21906
21907  # Now join together the path and the arguments once again
21908  if test "x$arguments" != xEOL; then
21909      new_complete="$new_path ${arguments% *}"
21910  else
21911      new_complete="$new_path"
21912  fi
21913
21914  if test "x$complete" != "x$new_complete"; then
21915    WINLD="$new_complete"
21916    { $as_echo "$as_me:$LINENO: Rewriting WINLD to \"$new_complete\"" >&5
21917$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
21918  fi
21919
21920    printf "Windows linker was found at $WINLD\n"
21921    { $as_echo "$as_me:$LINENO: checking if the found link.exe is actually the Visual Studio linker" >&5
21922$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
21923    "$WINLD" --version > /dev/null
21924    if test $? -eq 0 ; then
21925      { $as_echo "$as_me:$LINENO: result: no" >&5
21926$as_echo "no" >&6; }
21927      { { $as_echo "$as_me:$LINENO: error: This is the Cygwin link tool. Please check your PATH and rerun configure." >&5
21928$as_echo "$as_me: error: This is the Cygwin link tool. Please check your PATH and rerun configure." >&2;}
21929   { (exit 1); exit 1; }; }
21930    else
21931      { $as_echo "$as_me:$LINENO: result: yes" >&5
21932$as_echo "yes" >&6; }
21933    fi
21934    LD="$WINLD"
21935    LDEXE="$WINLD"
21936    LDCXX="$WINLD"
21937    LDEXECXX="$WINLD"
21938
21939    # Extract the first word of "mt", so it can be a program name with args.
21940set dummy mt; ac_word=$2
21941{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
21942$as_echo_n "checking for $ac_word... " >&6; }
21943if test "${ac_cv_prog_MT+set}" = set; then
21944  $as_echo_n "(cached) " >&6
21945else
21946  if test -n "$MT"; then
21947  ac_cv_prog_MT="$MT" # Let the user override the test.
21948else
21949  ac_prog_rejected=no
21950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21951for as_dir in $PATH
21952do
21953  IFS=$as_save_IFS
21954  test -z "$as_dir" && as_dir=.
21955  for ac_exec_ext in '' $ac_executable_extensions; do
21956  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21957    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
21958       ac_prog_rejected=yes
21959       continue
21960     fi
21961    ac_cv_prog_MT="mt"
21962    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21963    break 2
21964  fi
21965done
21966done
21967IFS=$as_save_IFS
21968
21969if test $ac_prog_rejected = yes; then
21970  # We found a bogon in the path, so make sure we never use it.
21971  set dummy $ac_cv_prog_MT
21972  shift
21973  if test $# != 0; then
21974    # We chose a different compiler from the bogus one.
21975    # However, it has the same basename, so the bogon will be chosen
21976    # first if we set MT to just the basename; use the full file name.
21977    shift
21978    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
21979  fi
21980fi
21981fi
21982fi
21983MT=$ac_cv_prog_MT
21984if test -n "$MT"; then
21985  { $as_echo "$as_me:$LINENO: result: $MT" >&5
21986$as_echo "$MT" >&6; }
21987else
21988  { $as_echo "$as_me:$LINENO: result: no" >&5
21989$as_echo "no" >&6; }
21990fi
21991
21992
21993
21994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21995
21996  # First separate the path from the arguments. This will split at the first
21997  # space.
21998  complete="$MT"
21999  path="${complete%% *}"
22000  tmp="$complete EOL"
22001  arguments="${tmp#* }"
22002
22003  # Input might be given as Windows format, start by converting to
22004  # unix format.
22005  new_path=`$CYGPATH -u "$path"`
22006
22007  # Now try to locate executable using which
22008  new_path=`$WHICH "$new_path" 2> /dev/null`
22009  # bat and cmd files are not always considered executable in cygwin causing which
22010  # to not find them
22011  if test "x$new_path" = x \
22012           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22013           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22014    new_path=`$CYGPATH -u "$path"`
22015  fi
22016  if test "x$new_path" = x; then
22017    # Oops. Which didn't find the executable.
22018    # The splitting of arguments from the executable at a space might have been incorrect,
22019    # since paths with space are more likely in Windows. Give it another try with the whole
22020    # argument.
22021    path="$complete"
22022    arguments="EOL"
22023    new_path=`$CYGPATH -u "$path"`
22024    new_path=`$WHICH "$new_path" 2> /dev/null`
22025    # bat and cmd files are not always considered executable in cygwin causing which
22026    # to not find them
22027    if test "x$new_path" = x \
22028             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22029             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22030      new_path=`$CYGPATH -u "$path"`
22031    fi
22032    if test "x$new_path" = x; then
22033      # It's still not found. Now this is an unrecoverable error.
22034      { $as_echo "$as_me:$LINENO: The path of MT, which resolves as \"$complete\", is not found." >&5
22035$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22036      has_space=`$ECHO "$complete" | $GREP " "`
22037      if test "x$has_space" != x; then
22038        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22039$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22040      fi
22041      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MT" >&5
22042$as_echo "$as_me: error: Cannot locate the the path of MT" >&2;}
22043   { (exit 1); exit 1; }; }
22044    fi
22045  fi
22046
22047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22050  # "foo.exe" is OK but "foo" is an error.
22051  #
22052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22053  # It is also a way to make sure we got the proper file name for the real test later on.
22054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22055  if test "x$test_shortpath" = x; then
22056    # Short path failed, file does not exist as specified.
22057    # Try adding .exe or .cmd
22058    if test -f "${new_path}.exe"; then
22059       input_to_shortpath="${new_path}.exe"
22060    elif test -f "${new_path}.cmd"; then
22061       input_to_shortpath="${new_path}.cmd"
22062    else
22063      { $as_echo "$as_me:$LINENO: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22064$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22065      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22066$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22067      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MT" >&5
22068$as_echo "$as_me: error: Cannot locate the the path of MT" >&2;}
22069   { (exit 1); exit 1; }; }
22070    fi
22071  else
22072    input_to_shortpath="$new_path"
22073  fi
22074
22075  # Call helper function which possibly converts this using DOS-style short mode.
22076  # If so, the updated path is stored in $new_path.
22077  new_path="$input_to_shortpath"
22078
22079  input_path="$input_to_shortpath"
22080  # Check if we need to convert this using DOS-style short mode. If the path
22081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22082  # take no chances and rewrite it.
22083  # Note: m4 eats our [], so we need to use [ and ] instead.
22084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22085  if test "x$has_forbidden_chars" != x; then
22086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22090      # Going to short mode and back again did indeed matter. Since short mode is
22091      # case insensitive, let's make it lowercase to improve readability.
22092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22093      # Now convert it back to Unix-stile (cygpath)
22094      input_path=`$CYGPATH -u "$shortmode_path"`
22095      new_path="$input_path"
22096    fi
22097  fi
22098
22099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22100  if test "x$test_cygdrive_prefix" = x; then
22101    # As a simple fix, exclude /usr/bin since it's not a real path.
22102    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22104      # a path prefixed by /cygdrive for fixpath to work.
22105      new_path="$CYGWIN_ROOT_PATH$input_path"
22106    fi
22107  fi
22108
22109  # remove trailing .exe if any
22110  new_path="${new_path/%.exe/}"
22111
22112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22113
22114  # First separate the path from the arguments. This will split at the first
22115  # space.
22116  complete="$MT"
22117  path="${complete%% *}"
22118  tmp="$complete EOL"
22119  arguments="${tmp#* }"
22120
22121  # Input might be given as Windows format, start by converting to
22122  # unix format.
22123  new_path="$path"
22124
22125  windows_path="$new_path"
22126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22127    unix_path=`$CYGPATH -u "$windows_path"`
22128    new_path="$unix_path"
22129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22131    new_path="$unix_path"
22132  fi
22133
22134
22135  # Now try to locate executable using which
22136  new_path=`$WHICH "$new_path" 2> /dev/null`
22137
22138  if test "x$new_path" = x; then
22139    # Oops. Which didn't find the executable.
22140    # The splitting of arguments from the executable at a space might have been incorrect,
22141    # since paths with space are more likely in Windows. Give it another try with the whole
22142    # argument.
22143    path="$complete"
22144    arguments="EOL"
22145    new_path="$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
22157    new_path=`$WHICH "$new_path" 2> /dev/null`
22158
22159    if test "x$new_path" = x; then
22160      # It's still not found. Now this is an unrecoverable error.
22161      { $as_echo "$as_me:$LINENO: The path of MT, which resolves as \"$complete\", is not found." >&5
22162$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22163      has_space=`$ECHO "$complete" | $GREP " "`
22164      if test "x$has_space" != x; then
22165        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22166$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22167      fi
22168      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MT" >&5
22169$as_echo "$as_me: error: Cannot locate the the path of MT" >&2;}
22170   { (exit 1); exit 1; }; }
22171    fi
22172  fi
22173
22174  # Now new_path has a complete unix path to the binary
22175  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22176    # Keep paths in /bin as-is, but remove trailing .exe if any
22177    new_path="${new_path/%.exe/}"
22178    # Do not save /bin paths to all_fixpath_prefixes!
22179  else
22180    # Not in mixed or Windows style, start by that.
22181    new_path=`cmd //c echo $new_path`
22182
22183  input_path="$new_path"
22184  # Check if we need to convert this using DOS-style short mode. If the path
22185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22186  # take no chances and rewrite it.
22187  # Note: m4 eats our [], so we need to use [ and ] instead.
22188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22189  if test "x$has_forbidden_chars" != x; then
22190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22192  fi
22193
22194    # Output is in $new_path
22195
22196  windows_path="$new_path"
22197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22198    unix_path=`$CYGPATH -u "$windows_path"`
22199    new_path="$unix_path"
22200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22202    new_path="$unix_path"
22203  fi
22204
22205    # remove trailing .exe if any
22206    new_path="${new_path/%.exe/}"
22207
22208    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22209    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22210  fi
22211
22212  else
22213    # We're on a posix platform. Hooray! :)
22214    # First separate the path from the arguments. This will split at the first
22215    # space.
22216    complete="$MT"
22217    path="${complete%% *}"
22218    tmp="$complete EOL"
22219    arguments="${tmp#* }"
22220
22221    new_path=`$WHICH $path 2> /dev/null`
22222    if test "x$new_path" = x; then
22223      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22224      if test "x$is_absolute_path" != x; then
22225        { $as_echo "$as_me:$LINENO: Resolving MT (as $path) with 'which' failed, using $path directly." >&5
22226$as_echo "$as_me: Resolving MT (as $path) with 'which' failed, using $path directly." >&6;}
22227        new_path="$path"
22228      else
22229        { $as_echo "$as_me:$LINENO: The path of MT, which resolves as \"$complete\", is not found." >&5
22230$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22231        has_space=`$ECHO "$complete" | $GREP " "`
22232        if test "x$has_space" != x; then
22233          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
22234$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22235        fi
22236        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MT" >&5
22237$as_echo "$as_me: error: Cannot locate the the path of MT" >&2;}
22238   { (exit 1); exit 1; }; }
22239      fi
22240    fi
22241  fi
22242
22243  # Now join together the path and the arguments once again
22244  if test "x$arguments" != xEOL; then
22245      new_complete="$new_path ${arguments% *}"
22246  else
22247      new_complete="$new_path"
22248  fi
22249
22250  if test "x$complete" != "x$new_complete"; then
22251    MT="$new_complete"
22252    { $as_echo "$as_me:$LINENO: Rewriting MT to \"$new_complete\"" >&5
22253$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22254  fi
22255
22256    # The resource compiler
22257    # Extract the first word of "rc", so it can be a program name with args.
22258set dummy rc; ac_word=$2
22259{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
22260$as_echo_n "checking for $ac_word... " >&6; }
22261if test "${ac_cv_prog_RC+set}" = set; then
22262  $as_echo_n "(cached) " >&6
22263else
22264  if test -n "$RC"; then
22265  ac_cv_prog_RC="$RC" # Let the user override the test.
22266else
22267  ac_prog_rejected=no
22268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22269for as_dir in $PATH
22270do
22271  IFS=$as_save_IFS
22272  test -z "$as_dir" && as_dir=.
22273  for ac_exec_ext in '' $ac_executable_extensions; do
22274  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22275    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22276       ac_prog_rejected=yes
22277       continue
22278     fi
22279    ac_cv_prog_RC="rc"
22280    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22281    break 2
22282  fi
22283done
22284done
22285IFS=$as_save_IFS
22286
22287if test $ac_prog_rejected = yes; then
22288  # We found a bogon in the path, so make sure we never use it.
22289  set dummy $ac_cv_prog_RC
22290  shift
22291  if test $# != 0; then
22292    # We chose a different compiler from the bogus one.
22293    # However, it has the same basename, so the bogon will be chosen
22294    # first if we set RC to just the basename; use the full file name.
22295    shift
22296    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22297  fi
22298fi
22299fi
22300fi
22301RC=$ac_cv_prog_RC
22302if test -n "$RC"; then
22303  { $as_echo "$as_me:$LINENO: result: $RC" >&5
22304$as_echo "$RC" >&6; }
22305else
22306  { $as_echo "$as_me:$LINENO: result: no" >&5
22307$as_echo "no" >&6; }
22308fi
22309
22310
22311
22312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22313
22314  # First separate the path from the arguments. This will split at the first
22315  # space.
22316  complete="$RC"
22317  path="${complete%% *}"
22318  tmp="$complete EOL"
22319  arguments="${tmp#* }"
22320
22321  # Input might be given as Windows format, start by converting to
22322  # unix format.
22323  new_path=`$CYGPATH -u "$path"`
22324
22325  # Now try to locate executable using which
22326  new_path=`$WHICH "$new_path" 2> /dev/null`
22327  # bat and cmd files are not always considered executable in cygwin causing which
22328  # to not find them
22329  if test "x$new_path" = x \
22330           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22331           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22332    new_path=`$CYGPATH -u "$path"`
22333  fi
22334  if test "x$new_path" = x; then
22335    # Oops. Which didn't find the executable.
22336    # The splitting of arguments from the executable at a space might have been incorrect,
22337    # since paths with space are more likely in Windows. Give it another try with the whole
22338    # argument.
22339    path="$complete"
22340    arguments="EOL"
22341    new_path=`$CYGPATH -u "$path"`
22342    new_path=`$WHICH "$new_path" 2> /dev/null`
22343    # bat and cmd files are not always considered executable in cygwin causing which
22344    # to not find them
22345    if test "x$new_path" = x \
22346             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22347             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22348      new_path=`$CYGPATH -u "$path"`
22349    fi
22350    if test "x$new_path" = x; then
22351      # It's still not found. Now this is an unrecoverable error.
22352      { $as_echo "$as_me:$LINENO: The path of RC, which resolves as \"$complete\", is not found." >&5
22353$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22354      has_space=`$ECHO "$complete" | $GREP " "`
22355      if test "x$has_space" != x; then
22356        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22357$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22358      fi
22359      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of RC" >&5
22360$as_echo "$as_me: error: Cannot locate the the path of RC" >&2;}
22361   { (exit 1); exit 1; }; }
22362    fi
22363  fi
22364
22365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22368  # "foo.exe" is OK but "foo" is an error.
22369  #
22370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22371  # It is also a way to make sure we got the proper file name for the real test later on.
22372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22373  if test "x$test_shortpath" = x; then
22374    # Short path failed, file does not exist as specified.
22375    # Try adding .exe or .cmd
22376    if test -f "${new_path}.exe"; then
22377       input_to_shortpath="${new_path}.exe"
22378    elif test -f "${new_path}.cmd"; then
22379       input_to_shortpath="${new_path}.cmd"
22380    else
22381      { $as_echo "$as_me:$LINENO: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22382$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22383      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22384$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22385      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of RC" >&5
22386$as_echo "$as_me: error: Cannot locate the the path of RC" >&2;}
22387   { (exit 1); exit 1; }; }
22388    fi
22389  else
22390    input_to_shortpath="$new_path"
22391  fi
22392
22393  # Call helper function which possibly converts this using DOS-style short mode.
22394  # If so, the updated path is stored in $new_path.
22395  new_path="$input_to_shortpath"
22396
22397  input_path="$input_to_shortpath"
22398  # Check if we need to convert this using DOS-style short mode. If the path
22399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22400  # take no chances and rewrite it.
22401  # Note: m4 eats our [], so we need to use [ and ] instead.
22402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22403  if test "x$has_forbidden_chars" != x; then
22404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22408      # Going to short mode and back again did indeed matter. Since short mode is
22409      # case insensitive, let's make it lowercase to improve readability.
22410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22411      # Now convert it back to Unix-stile (cygpath)
22412      input_path=`$CYGPATH -u "$shortmode_path"`
22413      new_path="$input_path"
22414    fi
22415  fi
22416
22417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22418  if test "x$test_cygdrive_prefix" = x; then
22419    # As a simple fix, exclude /usr/bin since it's not a real path.
22420    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22422      # a path prefixed by /cygdrive for fixpath to work.
22423      new_path="$CYGWIN_ROOT_PATH$input_path"
22424    fi
22425  fi
22426
22427  # remove trailing .exe if any
22428  new_path="${new_path/%.exe/}"
22429
22430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22431
22432  # First separate the path from the arguments. This will split at the first
22433  # space.
22434  complete="$RC"
22435  path="${complete%% *}"
22436  tmp="$complete EOL"
22437  arguments="${tmp#* }"
22438
22439  # Input might be given as Windows format, start by converting to
22440  # unix format.
22441  new_path="$path"
22442
22443  windows_path="$new_path"
22444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22445    unix_path=`$CYGPATH -u "$windows_path"`
22446    new_path="$unix_path"
22447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22449    new_path="$unix_path"
22450  fi
22451
22452
22453  # Now try to locate executable using which
22454  new_path=`$WHICH "$new_path" 2> /dev/null`
22455
22456  if test "x$new_path" = x; then
22457    # Oops. Which didn't find the executable.
22458    # The splitting of arguments from the executable at a space might have been incorrect,
22459    # since paths with space are more likely in Windows. Give it another try with the whole
22460    # argument.
22461    path="$complete"
22462    arguments="EOL"
22463    new_path="$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
22475    new_path=`$WHICH "$new_path" 2> /dev/null`
22476
22477    if test "x$new_path" = x; then
22478      # It's still not found. Now this is an unrecoverable error.
22479      { $as_echo "$as_me:$LINENO: The path of RC, which resolves as \"$complete\", is not found." >&5
22480$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22481      has_space=`$ECHO "$complete" | $GREP " "`
22482      if test "x$has_space" != x; then
22483        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22485      fi
22486      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of RC" >&5
22487$as_echo "$as_me: error: Cannot locate the the path of RC" >&2;}
22488   { (exit 1); exit 1; }; }
22489    fi
22490  fi
22491
22492  # Now new_path has a complete unix path to the binary
22493  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22494    # Keep paths in /bin as-is, but remove trailing .exe if any
22495    new_path="${new_path/%.exe/}"
22496    # Do not save /bin paths to all_fixpath_prefixes!
22497  else
22498    # Not in mixed or Windows style, start by that.
22499    new_path=`cmd //c echo $new_path`
22500
22501  input_path="$new_path"
22502  # Check if we need to convert this using DOS-style short mode. If the path
22503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22504  # take no chances and rewrite it.
22505  # Note: m4 eats our [], so we need to use [ and ] instead.
22506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22507  if test "x$has_forbidden_chars" != x; then
22508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22510  fi
22511
22512    # Output is in $new_path
22513
22514  windows_path="$new_path"
22515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22516    unix_path=`$CYGPATH -u "$windows_path"`
22517    new_path="$unix_path"
22518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22520    new_path="$unix_path"
22521  fi
22522
22523    # remove trailing .exe if any
22524    new_path="${new_path/%.exe/}"
22525
22526    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22527    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22528  fi
22529
22530  else
22531    # We're on a posix platform. Hooray! :)
22532    # First separate the path from the arguments. This will split at the first
22533    # space.
22534    complete="$RC"
22535    path="${complete%% *}"
22536    tmp="$complete EOL"
22537    arguments="${tmp#* }"
22538
22539    new_path=`$WHICH $path 2> /dev/null`
22540    if test "x$new_path" = x; then
22541      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22542      if test "x$is_absolute_path" != x; then
22543        { $as_echo "$as_me:$LINENO: Resolving RC (as $path) with 'which' failed, using $path directly." >&5
22544$as_echo "$as_me: Resolving RC (as $path) with 'which' failed, using $path directly." >&6;}
22545        new_path="$path"
22546      else
22547        { $as_echo "$as_me:$LINENO: The path of RC, which resolves as \"$complete\", is not found." >&5
22548$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22549        has_space=`$ECHO "$complete" | $GREP " "`
22550        if test "x$has_space" != x; then
22551          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
22552$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22553        fi
22554        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of RC" >&5
22555$as_echo "$as_me: error: Cannot locate the the path of RC" >&2;}
22556   { (exit 1); exit 1; }; }
22557      fi
22558    fi
22559  fi
22560
22561  # Now join together the path and the arguments once again
22562  if test "x$arguments" != xEOL; then
22563      new_complete="$new_path ${arguments% *}"
22564  else
22565      new_complete="$new_path"
22566  fi
22567
22568  if test "x$complete" != "x$new_complete"; then
22569    RC="$new_complete"
22570    { $as_echo "$as_me:$LINENO: Rewriting RC to \"$new_complete\"" >&5
22571$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22572  fi
22573
22574
22575    # For hotspot, we need these in Windows mixed path,
22576    # so rewrite them all. Need added .exe suffix.
22577    HOTSPOT_CXX="$CXX.exe"
22578    HOTSPOT_LD="$LD.exe"
22579    HOTSPOT_MT="$MT.exe"
22580    HOTSPOT_RC="$RC.exe"
22581
22582  unix_path="$HOTSPOT_CXX"
22583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22584    windows_path=`$CYGPATH -m "$unix_path"`
22585    HOTSPOT_CXX="$windows_path"
22586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22587    windows_path=`cmd //c echo $unix_path`
22588    HOTSPOT_CXX="$windows_path"
22589  fi
22590
22591
22592  unix_path="$HOTSPOT_LD"
22593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22594    windows_path=`$CYGPATH -m "$unix_path"`
22595    HOTSPOT_LD="$windows_path"
22596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22597    windows_path=`cmd //c echo $unix_path`
22598    HOTSPOT_LD="$windows_path"
22599  fi
22600
22601
22602  unix_path="$HOTSPOT_MT"
22603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22604    windows_path=`$CYGPATH -m "$unix_path"`
22605    HOTSPOT_MT="$windows_path"
22606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22607    windows_path=`cmd //c echo $unix_path`
22608    HOTSPOT_MT="$windows_path"
22609  fi
22610
22611
22612  unix_path="$HOTSPOT_RC"
22613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22614    windows_path=`$CYGPATH -m "$unix_path"`
22615    HOTSPOT_RC="$windows_path"
22616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22617    windows_path=`cmd //c echo $unix_path`
22618    HOTSPOT_RC="$windows_path"
22619  fi
22620
22621
22622
22623
22624    RC_FLAGS="-nologo -l 0x409 -r"
22625    if test "x$VARIANT" = xOPT; then
22626
22627        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22628
22629fi
22630
22631    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22632    if test "x$JDK_UPDATE_VERSION" = x; then
22633
22634        JDK_UPDATE_VERSION_NOTNULL=0
22635
22636fi
22637
22638    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22639    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22640    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22641    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22642    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22643    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22644    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22645
22646    # lib.exe is used to create static libraries.
22647    # Extract the first word of "lib", so it can be a program name with args.
22648set dummy lib; ac_word=$2
22649{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
22650$as_echo_n "checking for $ac_word... " >&6; }
22651if test "${ac_cv_prog_WINAR+set}" = set; then
22652  $as_echo_n "(cached) " >&6
22653else
22654  if test -n "$WINAR"; then
22655  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22656else
22657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22658for as_dir in $PATH
22659do
22660  IFS=$as_save_IFS
22661  test -z "$as_dir" && as_dir=.
22662  for ac_exec_ext in '' $ac_executable_extensions; do
22663  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22664    ac_cv_prog_WINAR="lib"
22665    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22666    break 2
22667  fi
22668done
22669done
22670IFS=$as_save_IFS
22671
22672fi
22673fi
22674WINAR=$ac_cv_prog_WINAR
22675if test -n "$WINAR"; then
22676  { $as_echo "$as_me:$LINENO: result: $WINAR" >&5
22677$as_echo "$WINAR" >&6; }
22678else
22679  { $as_echo "$as_me:$LINENO: result: no" >&5
22680$as_echo "no" >&6; }
22681fi
22682
22683
22684
22685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22686
22687  # First separate the path from the arguments. This will split at the first
22688  # space.
22689  complete="$WINAR"
22690  path="${complete%% *}"
22691  tmp="$complete EOL"
22692  arguments="${tmp#* }"
22693
22694  # Input might be given as Windows format, start by converting to
22695  # unix format.
22696  new_path=`$CYGPATH -u "$path"`
22697
22698  # Now try to locate executable using which
22699  new_path=`$WHICH "$new_path" 2> /dev/null`
22700  # bat and cmd files are not always considered executable in cygwin causing which
22701  # to not find them
22702  if test "x$new_path" = x \
22703           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22704           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22705    new_path=`$CYGPATH -u "$path"`
22706  fi
22707  if test "x$new_path" = x; then
22708    # Oops. Which didn't find the executable.
22709    # The splitting of arguments from the executable at a space might have been incorrect,
22710    # since paths with space are more likely in Windows. Give it another try with the whole
22711    # argument.
22712    path="$complete"
22713    arguments="EOL"
22714    new_path=`$CYGPATH -u "$path"`
22715    new_path=`$WHICH "$new_path" 2> /dev/null`
22716    # bat and cmd files are not always considered executable in cygwin causing which
22717    # to not find them
22718    if test "x$new_path" = x \
22719             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22720             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22721      new_path=`$CYGPATH -u "$path"`
22722    fi
22723    if test "x$new_path" = x; then
22724      # It's still not found. Now this is an unrecoverable error.
22725      { $as_echo "$as_me:$LINENO: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22726$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22727      has_space=`$ECHO "$complete" | $GREP " "`
22728      if test "x$has_space" != x; then
22729        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22731      fi
22732      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINAR" >&5
22733$as_echo "$as_me: error: Cannot locate the the path of WINAR" >&2;}
22734   { (exit 1); exit 1; }; }
22735    fi
22736  fi
22737
22738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22741  # "foo.exe" is OK but "foo" is an error.
22742  #
22743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22744  # It is also a way to make sure we got the proper file name for the real test later on.
22745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22746  if test "x$test_shortpath" = x; then
22747    # Short path failed, file does not exist as specified.
22748    # Try adding .exe or .cmd
22749    if test -f "${new_path}.exe"; then
22750       input_to_shortpath="${new_path}.exe"
22751    elif test -f "${new_path}.cmd"; then
22752       input_to_shortpath="${new_path}.cmd"
22753    else
22754      { $as_echo "$as_me:$LINENO: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22755$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22756      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22757$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22758      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINAR" >&5
22759$as_echo "$as_me: error: Cannot locate the the path of WINAR" >&2;}
22760   { (exit 1); exit 1; }; }
22761    fi
22762  else
22763    input_to_shortpath="$new_path"
22764  fi
22765
22766  # Call helper function which possibly converts this using DOS-style short mode.
22767  # If so, the updated path is stored in $new_path.
22768  new_path="$input_to_shortpath"
22769
22770  input_path="$input_to_shortpath"
22771  # Check if we need to convert this using DOS-style short mode. If the path
22772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22773  # take no chances and rewrite it.
22774  # Note: m4 eats our [], so we need to use [ and ] instead.
22775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22776  if test "x$has_forbidden_chars" != x; then
22777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22781      # Going to short mode and back again did indeed matter. Since short mode is
22782      # case insensitive, let's make it lowercase to improve readability.
22783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22784      # Now convert it back to Unix-stile (cygpath)
22785      input_path=`$CYGPATH -u "$shortmode_path"`
22786      new_path="$input_path"
22787    fi
22788  fi
22789
22790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22791  if test "x$test_cygdrive_prefix" = x; then
22792    # As a simple fix, exclude /usr/bin since it's not a real path.
22793    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22795      # a path prefixed by /cygdrive for fixpath to work.
22796      new_path="$CYGWIN_ROOT_PATH$input_path"
22797    fi
22798  fi
22799
22800  # remove trailing .exe if any
22801  new_path="${new_path/%.exe/}"
22802
22803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22804
22805  # First separate the path from the arguments. This will split at the first
22806  # space.
22807  complete="$WINAR"
22808  path="${complete%% *}"
22809  tmp="$complete EOL"
22810  arguments="${tmp#* }"
22811
22812  # Input might be given as Windows format, start by converting to
22813  # unix format.
22814  new_path="$path"
22815
22816  windows_path="$new_path"
22817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22818    unix_path=`$CYGPATH -u "$windows_path"`
22819    new_path="$unix_path"
22820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22822    new_path="$unix_path"
22823  fi
22824
22825
22826  # Now try to locate executable using which
22827  new_path=`$WHICH "$new_path" 2> /dev/null`
22828
22829  if test "x$new_path" = x; then
22830    # Oops. Which didn't find the executable.
22831    # The splitting of arguments from the executable at a space might have been incorrect,
22832    # since paths with space are more likely in Windows. Give it another try with the whole
22833    # argument.
22834    path="$complete"
22835    arguments="EOL"
22836    new_path="$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
22848    new_path=`$WHICH "$new_path" 2> /dev/null`
22849
22850    if test "x$new_path" = x; then
22851      # It's still not found. Now this is an unrecoverable error.
22852      { $as_echo "$as_me:$LINENO: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22853$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22854      has_space=`$ECHO "$complete" | $GREP " "`
22855      if test "x$has_space" != x; then
22856        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22858      fi
22859      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINAR" >&5
22860$as_echo "$as_me: error: Cannot locate the the path of WINAR" >&2;}
22861   { (exit 1); exit 1; }; }
22862    fi
22863  fi
22864
22865  # Now new_path has a complete unix path to the binary
22866  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22867    # Keep paths in /bin as-is, but remove trailing .exe if any
22868    new_path="${new_path/%.exe/}"
22869    # Do not save /bin paths to all_fixpath_prefixes!
22870  else
22871    # Not in mixed or Windows style, start by that.
22872    new_path=`cmd //c echo $new_path`
22873
22874  input_path="$new_path"
22875  # Check if we need to convert this using DOS-style short mode. If the path
22876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22877  # take no chances and rewrite it.
22878  # Note: m4 eats our [], so we need to use [ and ] instead.
22879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22880  if test "x$has_forbidden_chars" != x; then
22881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22883  fi
22884
22885    # Output is in $new_path
22886
22887  windows_path="$new_path"
22888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22889    unix_path=`$CYGPATH -u "$windows_path"`
22890    new_path="$unix_path"
22891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22893    new_path="$unix_path"
22894  fi
22895
22896    # remove trailing .exe if any
22897    new_path="${new_path/%.exe/}"
22898
22899    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22900    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22901  fi
22902
22903  else
22904    # We're on a posix platform. Hooray! :)
22905    # First separate the path from the arguments. This will split at the first
22906    # space.
22907    complete="$WINAR"
22908    path="${complete%% *}"
22909    tmp="$complete EOL"
22910    arguments="${tmp#* }"
22911
22912    new_path=`$WHICH $path 2> /dev/null`
22913    if test "x$new_path" = x; then
22914      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22915      if test "x$is_absolute_path" != x; then
22916        { $as_echo "$as_me:$LINENO: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&5
22917$as_echo "$as_me: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&6;}
22918        new_path="$path"
22919      else
22920        { $as_echo "$as_me:$LINENO: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22921$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22922        has_space=`$ECHO "$complete" | $GREP " "`
22923        if test "x$has_space" != x; then
22924          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
22925$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22926        fi
22927        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of WINAR" >&5
22928$as_echo "$as_me: error: Cannot locate the the path of WINAR" >&2;}
22929   { (exit 1); exit 1; }; }
22930      fi
22931    fi
22932  fi
22933
22934  # Now join together the path and the arguments once again
22935  if test "x$arguments" != xEOL; then
22936      new_complete="$new_path ${arguments% *}"
22937  else
22938      new_complete="$new_path"
22939  fi
22940
22941  if test "x$complete" != "x$new_complete"; then
22942    WINAR="$new_complete"
22943    { $as_echo "$as_me:$LINENO: Rewriting WINAR to \"$new_complete\"" >&5
22944$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
22945  fi
22946
22947    AR="$WINAR"
22948    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
22949
22950    # Extract the first word of "dumpbin", so it can be a program name with args.
22951set dummy dumpbin; ac_word=$2
22952{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
22953$as_echo_n "checking for $ac_word... " >&6; }
22954if test "${ac_cv_prog_DUMPBIN+set}" = set; then
22955  $as_echo_n "(cached) " >&6
22956else
22957  if test -n "$DUMPBIN"; then
22958  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
22959else
22960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22961for as_dir in $PATH
22962do
22963  IFS=$as_save_IFS
22964  test -z "$as_dir" && as_dir=.
22965  for ac_exec_ext in '' $ac_executable_extensions; do
22966  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22967    ac_cv_prog_DUMPBIN="dumpbin"
22968    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22969    break 2
22970  fi
22971done
22972done
22973IFS=$as_save_IFS
22974
22975fi
22976fi
22977DUMPBIN=$ac_cv_prog_DUMPBIN
22978if test -n "$DUMPBIN"; then
22979  { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5
22980$as_echo "$DUMPBIN" >&6; }
22981else
22982  { $as_echo "$as_me:$LINENO: result: no" >&5
22983$as_echo "no" >&6; }
22984fi
22985
22986
22987
22988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22989
22990  # First separate the path from the arguments. This will split at the first
22991  # space.
22992  complete="$DUMPBIN"
22993  path="${complete%% *}"
22994  tmp="$complete EOL"
22995  arguments="${tmp#* }"
22996
22997  # Input might be given as Windows format, start by converting to
22998  # unix format.
22999  new_path=`$CYGPATH -u "$path"`
23000
23001  # Now try to locate executable using which
23002  new_path=`$WHICH "$new_path" 2> /dev/null`
23003  # bat and cmd files are not always considered executable in cygwin causing which
23004  # to not find them
23005  if test "x$new_path" = x \
23006           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23007           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23008    new_path=`$CYGPATH -u "$path"`
23009  fi
23010  if test "x$new_path" = x; then
23011    # Oops. Which didn't find the executable.
23012    # The splitting of arguments from the executable at a space might have been incorrect,
23013    # since paths with space are more likely in Windows. Give it another try with the whole
23014    # argument.
23015    path="$complete"
23016    arguments="EOL"
23017    new_path=`$CYGPATH -u "$path"`
23018    new_path=`$WHICH "$new_path" 2> /dev/null`
23019    # bat and cmd files are not always considered executable in cygwin causing which
23020    # to not find them
23021    if test "x$new_path" = x \
23022             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23023             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23024      new_path=`$CYGPATH -u "$path"`
23025    fi
23026    if test "x$new_path" = x; then
23027      # It's still not found. Now this is an unrecoverable error.
23028      { $as_echo "$as_me:$LINENO: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23029$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23030      has_space=`$ECHO "$complete" | $GREP " "`
23031      if test "x$has_space" != x; then
23032        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23034      fi
23035      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of DUMPBIN" >&5
23036$as_echo "$as_me: error: Cannot locate the the path of DUMPBIN" >&2;}
23037   { (exit 1); exit 1; }; }
23038    fi
23039  fi
23040
23041  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23042  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23043  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23044  # "foo.exe" is OK but "foo" is an error.
23045  #
23046  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23047  # It is also a way to make sure we got the proper file name for the real test later on.
23048  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23049  if test "x$test_shortpath" = x; then
23050    # Short path failed, file does not exist as specified.
23051    # Try adding .exe or .cmd
23052    if test -f "${new_path}.exe"; then
23053       input_to_shortpath="${new_path}.exe"
23054    elif test -f "${new_path}.cmd"; then
23055       input_to_shortpath="${new_path}.cmd"
23056    else
23057      { $as_echo "$as_me:$LINENO: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23058$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23059      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23060$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23061      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of DUMPBIN" >&5
23062$as_echo "$as_me: error: Cannot locate the the path of DUMPBIN" >&2;}
23063   { (exit 1); exit 1; }; }
23064    fi
23065  else
23066    input_to_shortpath="$new_path"
23067  fi
23068
23069  # Call helper function which possibly converts this using DOS-style short mode.
23070  # If so, the updated path is stored in $new_path.
23071  new_path="$input_to_shortpath"
23072
23073  input_path="$input_to_shortpath"
23074  # Check if we need to convert this using DOS-style short mode. If the path
23075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23076  # take no chances and rewrite it.
23077  # Note: m4 eats our [], so we need to use [ and ] instead.
23078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23079  if test "x$has_forbidden_chars" != x; then
23080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23084      # Going to short mode and back again did indeed matter. Since short mode is
23085      # case insensitive, let's make it lowercase to improve readability.
23086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23087      # Now convert it back to Unix-stile (cygpath)
23088      input_path=`$CYGPATH -u "$shortmode_path"`
23089      new_path="$input_path"
23090    fi
23091  fi
23092
23093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23094  if test "x$test_cygdrive_prefix" = x; then
23095    # As a simple fix, exclude /usr/bin since it's not a real path.
23096    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23098      # a path prefixed by /cygdrive for fixpath to work.
23099      new_path="$CYGWIN_ROOT_PATH$input_path"
23100    fi
23101  fi
23102
23103  # remove trailing .exe if any
23104  new_path="${new_path/%.exe/}"
23105
23106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23107
23108  # First separate the path from the arguments. This will split at the first
23109  # space.
23110  complete="$DUMPBIN"
23111  path="${complete%% *}"
23112  tmp="$complete EOL"
23113  arguments="${tmp#* }"
23114
23115  # Input might be given as Windows format, start by converting to
23116  # unix format.
23117  new_path="$path"
23118
23119  windows_path="$new_path"
23120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23121    unix_path=`$CYGPATH -u "$windows_path"`
23122    new_path="$unix_path"
23123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23125    new_path="$unix_path"
23126  fi
23127
23128
23129  # Now try to locate executable using which
23130  new_path=`$WHICH "$new_path" 2> /dev/null`
23131
23132  if test "x$new_path" = x; then
23133    # Oops. Which didn't find the executable.
23134    # The splitting of arguments from the executable at a space might have been incorrect,
23135    # since paths with space are more likely in Windows. Give it another try with the whole
23136    # argument.
23137    path="$complete"
23138    arguments="EOL"
23139    new_path="$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
23151    new_path=`$WHICH "$new_path" 2> /dev/null`
23152
23153    if test "x$new_path" = x; then
23154      # It's still not found. Now this is an unrecoverable error.
23155      { $as_echo "$as_me:$LINENO: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23156$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23157      has_space=`$ECHO "$complete" | $GREP " "`
23158      if test "x$has_space" != x; then
23159        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23160$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23161      fi
23162      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of DUMPBIN" >&5
23163$as_echo "$as_me: error: Cannot locate the the path of DUMPBIN" >&2;}
23164   { (exit 1); exit 1; }; }
23165    fi
23166  fi
23167
23168  # Now new_path has a complete unix path to the binary
23169  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23170    # Keep paths in /bin as-is, but remove trailing .exe if any
23171    new_path="${new_path/%.exe/}"
23172    # Do not save /bin paths to all_fixpath_prefixes!
23173  else
23174    # Not in mixed or Windows style, start by that.
23175    new_path=`cmd //c echo $new_path`
23176
23177  input_path="$new_path"
23178  # Check if we need to convert this using DOS-style short mode. If the path
23179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23180  # take no chances and rewrite it.
23181  # Note: m4 eats our [], so we need to use [ and ] instead.
23182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23183  if test "x$has_forbidden_chars" != x; then
23184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23186  fi
23187
23188    # Output is in $new_path
23189
23190  windows_path="$new_path"
23191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23192    unix_path=`$CYGPATH -u "$windows_path"`
23193    new_path="$unix_path"
23194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23196    new_path="$unix_path"
23197  fi
23198
23199    # remove trailing .exe if any
23200    new_path="${new_path/%.exe/}"
23201
23202    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23203    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23204  fi
23205
23206  else
23207    # We're on a posix platform. Hooray! :)
23208    # First separate the path from the arguments. This will split at the first
23209    # space.
23210    complete="$DUMPBIN"
23211    path="${complete%% *}"
23212    tmp="$complete EOL"
23213    arguments="${tmp#* }"
23214
23215    new_path=`$WHICH $path 2> /dev/null`
23216    if test "x$new_path" = x; then
23217      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23218      if test "x$is_absolute_path" != x; then
23219        { $as_echo "$as_me:$LINENO: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&5
23220$as_echo "$as_me: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&6;}
23221        new_path="$path"
23222      else
23223        { $as_echo "$as_me:$LINENO: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23224$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23225        has_space=`$ECHO "$complete" | $GREP " "`
23226        if test "x$has_space" != x; then
23227          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
23228$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23229        fi
23230        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of DUMPBIN" >&5
23231$as_echo "$as_me: error: Cannot locate the the path of DUMPBIN" >&2;}
23232   { (exit 1); exit 1; }; }
23233      fi
23234    fi
23235  fi
23236
23237  # Now join together the path and the arguments once again
23238  if test "x$arguments" != xEOL; then
23239      new_complete="$new_path ${arguments% *}"
23240  else
23241      new_complete="$new_path"
23242  fi
23243
23244  if test "x$complete" != "x$new_complete"; then
23245    DUMPBIN="$new_complete"
23246    { $as_echo "$as_me:$LINENO: Rewriting DUMPBIN to \"$new_complete\"" >&5
23247$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23248  fi
23249
23250
23251    COMPILER_TYPE=CL
23252    CCXXFLAGS="$CCXXFLAGS -nologo"
23253
23254fi
23255
23256
23257
23258
23259ac_ext=c
23260ac_cpp='$CPP $CPPFLAGS'
23261ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23262ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23263ac_compiler_gnu=$ac_cv_c_compiler_gnu
23264{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
23265$as_echo_n "checking how to run the C preprocessor... " >&6; }
23266# On Suns, sometimes $CPP names a directory.
23267if test -n "$CPP" && test -d "$CPP"; then
23268  CPP=
23269fi
23270if test -z "$CPP"; then
23271  if test "${ac_cv_prog_CPP+set}" = set; then
23272  $as_echo_n "(cached) " >&6
23273else
23274      # Double quotes because CPP needs to be expanded
23275    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23276    do
23277      ac_preproc_ok=false
23278for ac_c_preproc_warn_flag in '' yes
23279do
23280  # Use a header file that comes with gcc, so configuring glibc
23281  # with a fresh cross-compiler works.
23282  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23283  # <limits.h> exists even on freestanding compilers.
23284  # On the NeXT, cc -E runs the code through the compiler's parser,
23285  # not just through cpp. "Syntax error" is here to catch this case.
23286  cat >conftest.$ac_ext <<_ACEOF
23287/* confdefs.h.  */
23288_ACEOF
23289cat confdefs.h >>conftest.$ac_ext
23290cat >>conftest.$ac_ext <<_ACEOF
23291/* end confdefs.h.  */
23292#ifdef __STDC__
23293# include <limits.h>
23294#else
23295# include <assert.h>
23296#endif
23297		     Syntax error
23298_ACEOF
23299if { (ac_try="$ac_cpp conftest.$ac_ext"
23300case "(($ac_try" in
23301  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23302  *) ac_try_echo=$ac_try;;
23303esac
23304eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23305$as_echo "$ac_try_echo") >&5
23306  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23307  ac_status=$?
23308  grep -v '^ *+' conftest.er1 >conftest.err
23309  rm -f conftest.er1
23310  cat conftest.err >&5
23311  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23312  (exit $ac_status); } >/dev/null && {
23313	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23314	 test ! -s conftest.err
23315       }; then
23316  :
23317else
23318  $as_echo "$as_me: failed program was:" >&5
23319sed 's/^/| /' conftest.$ac_ext >&5
23320
23321  # Broken: fails on valid input.
23322continue
23323fi
23324
23325rm -f conftest.err conftest.$ac_ext
23326
23327  # OK, works on sane cases.  Now check whether nonexistent headers
23328  # can be detected and how.
23329  cat >conftest.$ac_ext <<_ACEOF
23330/* confdefs.h.  */
23331_ACEOF
23332cat confdefs.h >>conftest.$ac_ext
23333cat >>conftest.$ac_ext <<_ACEOF
23334/* end confdefs.h.  */
23335#include <ac_nonexistent.h>
23336_ACEOF
23337if { (ac_try="$ac_cpp conftest.$ac_ext"
23338case "(($ac_try" in
23339  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23340  *) ac_try_echo=$ac_try;;
23341esac
23342eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23343$as_echo "$ac_try_echo") >&5
23344  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23345  ac_status=$?
23346  grep -v '^ *+' conftest.er1 >conftest.err
23347  rm -f conftest.er1
23348  cat conftest.err >&5
23349  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23350  (exit $ac_status); } >/dev/null && {
23351	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23352	 test ! -s conftest.err
23353       }; then
23354  # Broken: success on invalid input.
23355continue
23356else
23357  $as_echo "$as_me: failed program was:" >&5
23358sed 's/^/| /' conftest.$ac_ext >&5
23359
23360  # Passes both tests.
23361ac_preproc_ok=:
23362break
23363fi
23364
23365rm -f conftest.err conftest.$ac_ext
23366
23367done
23368# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23369rm -f conftest.err conftest.$ac_ext
23370if $ac_preproc_ok; then
23371  break
23372fi
23373
23374    done
23375    ac_cv_prog_CPP=$CPP
23376
23377fi
23378  CPP=$ac_cv_prog_CPP
23379else
23380  ac_cv_prog_CPP=$CPP
23381fi
23382{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
23383$as_echo "$CPP" >&6; }
23384ac_preproc_ok=false
23385for ac_c_preproc_warn_flag in '' yes
23386do
23387  # Use a header file that comes with gcc, so configuring glibc
23388  # with a fresh cross-compiler works.
23389  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23390  # <limits.h> exists even on freestanding compilers.
23391  # On the NeXT, cc -E runs the code through the compiler's parser,
23392  # not just through cpp. "Syntax error" is here to catch this case.
23393  cat >conftest.$ac_ext <<_ACEOF
23394/* confdefs.h.  */
23395_ACEOF
23396cat confdefs.h >>conftest.$ac_ext
23397cat >>conftest.$ac_ext <<_ACEOF
23398/* end confdefs.h.  */
23399#ifdef __STDC__
23400# include <limits.h>
23401#else
23402# include <assert.h>
23403#endif
23404		     Syntax error
23405_ACEOF
23406if { (ac_try="$ac_cpp conftest.$ac_ext"
23407case "(($ac_try" in
23408  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23409  *) ac_try_echo=$ac_try;;
23410esac
23411eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23412$as_echo "$ac_try_echo") >&5
23413  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23414  ac_status=$?
23415  grep -v '^ *+' conftest.er1 >conftest.err
23416  rm -f conftest.er1
23417  cat conftest.err >&5
23418  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23419  (exit $ac_status); } >/dev/null && {
23420	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23421	 test ! -s conftest.err
23422       }; then
23423  :
23424else
23425  $as_echo "$as_me: failed program was:" >&5
23426sed 's/^/| /' conftest.$ac_ext >&5
23427
23428  # Broken: fails on valid input.
23429continue
23430fi
23431
23432rm -f conftest.err conftest.$ac_ext
23433
23434  # OK, works on sane cases.  Now check whether nonexistent headers
23435  # can be detected and how.
23436  cat >conftest.$ac_ext <<_ACEOF
23437/* confdefs.h.  */
23438_ACEOF
23439cat confdefs.h >>conftest.$ac_ext
23440cat >>conftest.$ac_ext <<_ACEOF
23441/* end confdefs.h.  */
23442#include <ac_nonexistent.h>
23443_ACEOF
23444if { (ac_try="$ac_cpp conftest.$ac_ext"
23445case "(($ac_try" in
23446  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23447  *) ac_try_echo=$ac_try;;
23448esac
23449eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23450$as_echo "$ac_try_echo") >&5
23451  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23452  ac_status=$?
23453  grep -v '^ *+' conftest.er1 >conftest.err
23454  rm -f conftest.er1
23455  cat conftest.err >&5
23456  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23457  (exit $ac_status); } >/dev/null && {
23458	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23459	 test ! -s conftest.err
23460       }; then
23461  # Broken: success on invalid input.
23462continue
23463else
23464  $as_echo "$as_me: failed program was:" >&5
23465sed 's/^/| /' conftest.$ac_ext >&5
23466
23467  # Passes both tests.
23468ac_preproc_ok=:
23469break
23470fi
23471
23472rm -f conftest.err conftest.$ac_ext
23473
23474done
23475# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23476rm -f conftest.err conftest.$ac_ext
23477if $ac_preproc_ok; then
23478  :
23479else
23480  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23481$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23482{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
23483See \`config.log' for more details." >&5
23484$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
23485See \`config.log' for more details." >&2;}
23486   { (exit 1); exit 1; }; }; }
23487fi
23488
23489ac_ext=cpp
23490ac_cpp='$CXXCPP $CPPFLAGS'
23491ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23492ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23493ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23494
23495
23496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23497
23498  # First separate the path from the arguments. This will split at the first
23499  # space.
23500  complete="$CPP"
23501  path="${complete%% *}"
23502  tmp="$complete EOL"
23503  arguments="${tmp#* }"
23504
23505  # Input might be given as Windows format, start by converting to
23506  # unix format.
23507  new_path=`$CYGPATH -u "$path"`
23508
23509  # Now try to locate executable using which
23510  new_path=`$WHICH "$new_path" 2> /dev/null`
23511  # bat and cmd files are not always considered executable in cygwin causing which
23512  # to not find them
23513  if test "x$new_path" = x \
23514           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23515           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23516    new_path=`$CYGPATH -u "$path"`
23517  fi
23518  if test "x$new_path" = x; then
23519    # Oops. Which didn't find the executable.
23520    # The splitting of arguments from the executable at a space might have been incorrect,
23521    # since paths with space are more likely in Windows. Give it another try with the whole
23522    # argument.
23523    path="$complete"
23524    arguments="EOL"
23525    new_path=`$CYGPATH -u "$path"`
23526    new_path=`$WHICH "$new_path" 2> /dev/null`
23527    # bat and cmd files are not always considered executable in cygwin causing which
23528    # to not find them
23529    if test "x$new_path" = x \
23530             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23531             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23532      new_path=`$CYGPATH -u "$path"`
23533    fi
23534    if test "x$new_path" = x; then
23535      # It's still not found. Now this is an unrecoverable error.
23536      { $as_echo "$as_me:$LINENO: The path of CPP, which resolves as \"$complete\", is not found." >&5
23537$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23538      has_space=`$ECHO "$complete" | $GREP " "`
23539      if test "x$has_space" != x; then
23540        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23541$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23542      fi
23543      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CPP" >&5
23544$as_echo "$as_me: error: Cannot locate the the path of CPP" >&2;}
23545   { (exit 1); exit 1; }; }
23546    fi
23547  fi
23548
23549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23552  # "foo.exe" is OK but "foo" is an error.
23553  #
23554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23555  # It is also a way to make sure we got the proper file name for the real test later on.
23556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23557  if test "x$test_shortpath" = x; then
23558    # Short path failed, file does not exist as specified.
23559    # Try adding .exe or .cmd
23560    if test -f "${new_path}.exe"; then
23561       input_to_shortpath="${new_path}.exe"
23562    elif test -f "${new_path}.cmd"; then
23563       input_to_shortpath="${new_path}.cmd"
23564    else
23565      { $as_echo "$as_me:$LINENO: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23566$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23567      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23568$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23569      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CPP" >&5
23570$as_echo "$as_me: error: Cannot locate the the path of CPP" >&2;}
23571   { (exit 1); exit 1; }; }
23572    fi
23573  else
23574    input_to_shortpath="$new_path"
23575  fi
23576
23577  # Call helper function which possibly converts this using DOS-style short mode.
23578  # If so, the updated path is stored in $new_path.
23579  new_path="$input_to_shortpath"
23580
23581  input_path="$input_to_shortpath"
23582  # Check if we need to convert this using DOS-style short mode. If the path
23583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23584  # take no chances and rewrite it.
23585  # Note: m4 eats our [], so we need to use [ and ] instead.
23586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23587  if test "x$has_forbidden_chars" != x; then
23588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23592      # Going to short mode and back again did indeed matter. Since short mode is
23593      # case insensitive, let's make it lowercase to improve readability.
23594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23595      # Now convert it back to Unix-stile (cygpath)
23596      input_path=`$CYGPATH -u "$shortmode_path"`
23597      new_path="$input_path"
23598    fi
23599  fi
23600
23601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23602  if test "x$test_cygdrive_prefix" = x; then
23603    # As a simple fix, exclude /usr/bin since it's not a real path.
23604    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23606      # a path prefixed by /cygdrive for fixpath to work.
23607      new_path="$CYGWIN_ROOT_PATH$input_path"
23608    fi
23609  fi
23610
23611  # remove trailing .exe if any
23612  new_path="${new_path/%.exe/}"
23613
23614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23615
23616  # First separate the path from the arguments. This will split at the first
23617  # space.
23618  complete="$CPP"
23619  path="${complete%% *}"
23620  tmp="$complete EOL"
23621  arguments="${tmp#* }"
23622
23623  # Input might be given as Windows format, start by converting to
23624  # unix format.
23625  new_path="$path"
23626
23627  windows_path="$new_path"
23628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23629    unix_path=`$CYGPATH -u "$windows_path"`
23630    new_path="$unix_path"
23631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23633    new_path="$unix_path"
23634  fi
23635
23636
23637  # Now try to locate executable using which
23638  new_path=`$WHICH "$new_path" 2> /dev/null`
23639
23640  if test "x$new_path" = x; then
23641    # Oops. Which didn't find the executable.
23642    # The splitting of arguments from the executable at a space might have been incorrect,
23643    # since paths with space are more likely in Windows. Give it another try with the whole
23644    # argument.
23645    path="$complete"
23646    arguments="EOL"
23647    new_path="$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
23659    new_path=`$WHICH "$new_path" 2> /dev/null`
23660
23661    if test "x$new_path" = x; then
23662      # It's still not found. Now this is an unrecoverable error.
23663      { $as_echo "$as_me:$LINENO: The path of CPP, which resolves as \"$complete\", is not found." >&5
23664$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23665      has_space=`$ECHO "$complete" | $GREP " "`
23666      if test "x$has_space" != x; then
23667        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23668$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23669      fi
23670      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CPP" >&5
23671$as_echo "$as_me: error: Cannot locate the the path of CPP" >&2;}
23672   { (exit 1); exit 1; }; }
23673    fi
23674  fi
23675
23676  # Now new_path has a complete unix path to the binary
23677  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23678    # Keep paths in /bin as-is, but remove trailing .exe if any
23679    new_path="${new_path/%.exe/}"
23680    # Do not save /bin paths to all_fixpath_prefixes!
23681  else
23682    # Not in mixed or Windows style, start by that.
23683    new_path=`cmd //c echo $new_path`
23684
23685  input_path="$new_path"
23686  # Check if we need to convert this using DOS-style short mode. If the path
23687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23688  # take no chances and rewrite it.
23689  # Note: m4 eats our [], so we need to use [ and ] instead.
23690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23691  if test "x$has_forbidden_chars" != x; then
23692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23694  fi
23695
23696    # Output is in $new_path
23697
23698  windows_path="$new_path"
23699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23700    unix_path=`$CYGPATH -u "$windows_path"`
23701    new_path="$unix_path"
23702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23704    new_path="$unix_path"
23705  fi
23706
23707    # remove trailing .exe if any
23708    new_path="${new_path/%.exe/}"
23709
23710    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23711    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23712  fi
23713
23714  else
23715    # We're on a posix platform. Hooray! :)
23716    # First separate the path from the arguments. This will split at the first
23717    # space.
23718    complete="$CPP"
23719    path="${complete%% *}"
23720    tmp="$complete EOL"
23721    arguments="${tmp#* }"
23722
23723    new_path=`$WHICH $path 2> /dev/null`
23724    if test "x$new_path" = x; then
23725      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23726      if test "x$is_absolute_path" != x; then
23727        { $as_echo "$as_me:$LINENO: Resolving CPP (as $path) with 'which' failed, using $path directly." >&5
23728$as_echo "$as_me: Resolving CPP (as $path) with 'which' failed, using $path directly." >&6;}
23729        new_path="$path"
23730      else
23731        { $as_echo "$as_me:$LINENO: The path of CPP, which resolves as \"$complete\", is not found." >&5
23732$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23733        has_space=`$ECHO "$complete" | $GREP " "`
23734        if test "x$has_space" != x; then
23735          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
23736$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23737        fi
23738        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CPP" >&5
23739$as_echo "$as_me: error: Cannot locate the the path of CPP" >&2;}
23740   { (exit 1); exit 1; }; }
23741      fi
23742    fi
23743  fi
23744
23745  # Now join together the path and the arguments once again
23746  if test "x$arguments" != xEOL; then
23747      new_complete="$new_path ${arguments% *}"
23748  else
23749      new_complete="$new_path"
23750  fi
23751
23752  if test "x$complete" != "x$new_complete"; then
23753    CPP="$new_complete"
23754    { $as_echo "$as_me:$LINENO: Rewriting CPP to \"$new_complete\"" >&5
23755$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23756  fi
23757
23758
23759ac_ext=cpp
23760ac_cpp='$CXXCPP $CPPFLAGS'
23761ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23762ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23763ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23764{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
23765$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23766if test -z "$CXXCPP"; then
23767  if test "${ac_cv_prog_CXXCPP+set}" = set; then
23768  $as_echo_n "(cached) " >&6
23769else
23770      # Double quotes because CXXCPP needs to be expanded
23771    for CXXCPP in "$CXX -E" "/lib/cpp"
23772    do
23773      ac_preproc_ok=false
23774for ac_cxx_preproc_warn_flag in '' yes
23775do
23776  # Use a header file that comes with gcc, so configuring glibc
23777  # with a fresh cross-compiler works.
23778  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23779  # <limits.h> exists even on freestanding compilers.
23780  # On the NeXT, cc -E runs the code through the compiler's parser,
23781  # not just through cpp. "Syntax error" is here to catch this case.
23782  cat >conftest.$ac_ext <<_ACEOF
23783/* confdefs.h.  */
23784_ACEOF
23785cat confdefs.h >>conftest.$ac_ext
23786cat >>conftest.$ac_ext <<_ACEOF
23787/* end confdefs.h.  */
23788#ifdef __STDC__
23789# include <limits.h>
23790#else
23791# include <assert.h>
23792#endif
23793		     Syntax error
23794_ACEOF
23795if { (ac_try="$ac_cpp conftest.$ac_ext"
23796case "(($ac_try" in
23797  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23798  *) ac_try_echo=$ac_try;;
23799esac
23800eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23801$as_echo "$ac_try_echo") >&5
23802  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23803  ac_status=$?
23804  grep -v '^ *+' conftest.er1 >conftest.err
23805  rm -f conftest.er1
23806  cat conftest.err >&5
23807  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23808  (exit $ac_status); } >/dev/null && {
23809	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
23810	 test ! -s conftest.err
23811       }; then
23812  :
23813else
23814  $as_echo "$as_me: failed program was:" >&5
23815sed 's/^/| /' conftest.$ac_ext >&5
23816
23817  # Broken: fails on valid input.
23818continue
23819fi
23820
23821rm -f conftest.err conftest.$ac_ext
23822
23823  # OK, works on sane cases.  Now check whether nonexistent headers
23824  # can be detected and how.
23825  cat >conftest.$ac_ext <<_ACEOF
23826/* confdefs.h.  */
23827_ACEOF
23828cat confdefs.h >>conftest.$ac_ext
23829cat >>conftest.$ac_ext <<_ACEOF
23830/* end confdefs.h.  */
23831#include <ac_nonexistent.h>
23832_ACEOF
23833if { (ac_try="$ac_cpp conftest.$ac_ext"
23834case "(($ac_try" in
23835  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23836  *) ac_try_echo=$ac_try;;
23837esac
23838eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23839$as_echo "$ac_try_echo") >&5
23840  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23841  ac_status=$?
23842  grep -v '^ *+' conftest.er1 >conftest.err
23843  rm -f conftest.er1
23844  cat conftest.err >&5
23845  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23846  (exit $ac_status); } >/dev/null && {
23847	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
23848	 test ! -s conftest.err
23849       }; then
23850  # Broken: success on invalid input.
23851continue
23852else
23853  $as_echo "$as_me: failed program was:" >&5
23854sed 's/^/| /' conftest.$ac_ext >&5
23855
23856  # Passes both tests.
23857ac_preproc_ok=:
23858break
23859fi
23860
23861rm -f conftest.err conftest.$ac_ext
23862
23863done
23864# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23865rm -f conftest.err conftest.$ac_ext
23866if $ac_preproc_ok; then
23867  break
23868fi
23869
23870    done
23871    ac_cv_prog_CXXCPP=$CXXCPP
23872
23873fi
23874  CXXCPP=$ac_cv_prog_CXXCPP
23875else
23876  ac_cv_prog_CXXCPP=$CXXCPP
23877fi
23878{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5
23879$as_echo "$CXXCPP" >&6; }
23880ac_preproc_ok=false
23881for ac_cxx_preproc_warn_flag in '' yes
23882do
23883  # Use a header file that comes with gcc, so configuring glibc
23884  # with a fresh cross-compiler works.
23885  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23886  # <limits.h> exists even on freestanding compilers.
23887  # On the NeXT, cc -E runs the code through the compiler's parser,
23888  # not just through cpp. "Syntax error" is here to catch this case.
23889  cat >conftest.$ac_ext <<_ACEOF
23890/* confdefs.h.  */
23891_ACEOF
23892cat confdefs.h >>conftest.$ac_ext
23893cat >>conftest.$ac_ext <<_ACEOF
23894/* end confdefs.h.  */
23895#ifdef __STDC__
23896# include <limits.h>
23897#else
23898# include <assert.h>
23899#endif
23900		     Syntax error
23901_ACEOF
23902if { (ac_try="$ac_cpp conftest.$ac_ext"
23903case "(($ac_try" in
23904  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23905  *) ac_try_echo=$ac_try;;
23906esac
23907eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23908$as_echo "$ac_try_echo") >&5
23909  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23910  ac_status=$?
23911  grep -v '^ *+' conftest.er1 >conftest.err
23912  rm -f conftest.er1
23913  cat conftest.err >&5
23914  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23915  (exit $ac_status); } >/dev/null && {
23916	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
23917	 test ! -s conftest.err
23918       }; then
23919  :
23920else
23921  $as_echo "$as_me: failed program was:" >&5
23922sed 's/^/| /' conftest.$ac_ext >&5
23923
23924  # Broken: fails on valid input.
23925continue
23926fi
23927
23928rm -f conftest.err conftest.$ac_ext
23929
23930  # OK, works on sane cases.  Now check whether nonexistent headers
23931  # can be detected and how.
23932  cat >conftest.$ac_ext <<_ACEOF
23933/* confdefs.h.  */
23934_ACEOF
23935cat confdefs.h >>conftest.$ac_ext
23936cat >>conftest.$ac_ext <<_ACEOF
23937/* end confdefs.h.  */
23938#include <ac_nonexistent.h>
23939_ACEOF
23940if { (ac_try="$ac_cpp conftest.$ac_ext"
23941case "(($ac_try" in
23942  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23943  *) ac_try_echo=$ac_try;;
23944esac
23945eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23946$as_echo "$ac_try_echo") >&5
23947  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23948  ac_status=$?
23949  grep -v '^ *+' conftest.er1 >conftest.err
23950  rm -f conftest.er1
23951  cat conftest.err >&5
23952  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23953  (exit $ac_status); } >/dev/null && {
23954	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
23955	 test ! -s conftest.err
23956       }; then
23957  # Broken: success on invalid input.
23958continue
23959else
23960  $as_echo "$as_me: failed program was:" >&5
23961sed 's/^/| /' conftest.$ac_ext >&5
23962
23963  # Passes both tests.
23964ac_preproc_ok=:
23965break
23966fi
23967
23968rm -f conftest.err conftest.$ac_ext
23969
23970done
23971# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23972rm -f conftest.err conftest.$ac_ext
23973if $ac_preproc_ok; then
23974  :
23975else
23976  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23978{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
23979See \`config.log' for more details." >&5
23980$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
23981See \`config.log' for more details." >&2;}
23982   { (exit 1); exit 1; }; }; }
23983fi
23984
23985ac_ext=cpp
23986ac_cpp='$CXXCPP $CPPFLAGS'
23987ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23988ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23989ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23990
23991
23992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23993
23994  # First separate the path from the arguments. This will split at the first
23995  # space.
23996  complete="$CXXCPP"
23997  path="${complete%% *}"
23998  tmp="$complete EOL"
23999  arguments="${tmp#* }"
24000
24001  # Input might be given as Windows format, start by converting to
24002  # unix format.
24003  new_path=`$CYGPATH -u "$path"`
24004
24005  # Now try to locate executable using which
24006  new_path=`$WHICH "$new_path" 2> /dev/null`
24007  # bat and cmd files are not always considered executable in cygwin causing which
24008  # to not find them
24009  if test "x$new_path" = x \
24010           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24011           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24012    new_path=`$CYGPATH -u "$path"`
24013  fi
24014  if test "x$new_path" = x; then
24015    # Oops. Which didn't find the executable.
24016    # The splitting of arguments from the executable at a space might have been incorrect,
24017    # since paths with space are more likely in Windows. Give it another try with the whole
24018    # argument.
24019    path="$complete"
24020    arguments="EOL"
24021    new_path=`$CYGPATH -u "$path"`
24022    new_path=`$WHICH "$new_path" 2> /dev/null`
24023    # bat and cmd files are not always considered executable in cygwin causing which
24024    # to not find them
24025    if test "x$new_path" = x \
24026             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24027             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24028      new_path=`$CYGPATH -u "$path"`
24029    fi
24030    if test "x$new_path" = x; then
24031      # It's still not found. Now this is an unrecoverable error.
24032      { $as_echo "$as_me:$LINENO: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24033$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24034      has_space=`$ECHO "$complete" | $GREP " "`
24035      if test "x$has_space" != x; then
24036        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24037$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24038      fi
24039      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXXCPP" >&5
24040$as_echo "$as_me: error: Cannot locate the the path of CXXCPP" >&2;}
24041   { (exit 1); exit 1; }; }
24042    fi
24043  fi
24044
24045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24048  # "foo.exe" is OK but "foo" is an error.
24049  #
24050  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24051  # It is also a way to make sure we got the proper file name for the real test later on.
24052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24053  if test "x$test_shortpath" = x; then
24054    # Short path failed, file does not exist as specified.
24055    # Try adding .exe or .cmd
24056    if test -f "${new_path}.exe"; then
24057       input_to_shortpath="${new_path}.exe"
24058    elif test -f "${new_path}.cmd"; then
24059       input_to_shortpath="${new_path}.cmd"
24060    else
24061      { $as_echo "$as_me:$LINENO: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24062$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24063      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24064$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24065      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXXCPP" >&5
24066$as_echo "$as_me: error: Cannot locate the the path of CXXCPP" >&2;}
24067   { (exit 1); exit 1; }; }
24068    fi
24069  else
24070    input_to_shortpath="$new_path"
24071  fi
24072
24073  # Call helper function which possibly converts this using DOS-style short mode.
24074  # If so, the updated path is stored in $new_path.
24075  new_path="$input_to_shortpath"
24076
24077  input_path="$input_to_shortpath"
24078  # Check if we need to convert this using DOS-style short mode. If the path
24079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24080  # take no chances and rewrite it.
24081  # Note: m4 eats our [], so we need to use [ and ] instead.
24082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24083  if test "x$has_forbidden_chars" != x; then
24084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24088      # Going to short mode and back again did indeed matter. Since short mode is
24089      # case insensitive, let's make it lowercase to improve readability.
24090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24091      # Now convert it back to Unix-stile (cygpath)
24092      input_path=`$CYGPATH -u "$shortmode_path"`
24093      new_path="$input_path"
24094    fi
24095  fi
24096
24097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24098  if test "x$test_cygdrive_prefix" = x; then
24099    # As a simple fix, exclude /usr/bin since it's not a real path.
24100    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24102      # a path prefixed by /cygdrive for fixpath to work.
24103      new_path="$CYGWIN_ROOT_PATH$input_path"
24104    fi
24105  fi
24106
24107  # remove trailing .exe if any
24108  new_path="${new_path/%.exe/}"
24109
24110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24111
24112  # First separate the path from the arguments. This will split at the first
24113  # space.
24114  complete="$CXXCPP"
24115  path="${complete%% *}"
24116  tmp="$complete EOL"
24117  arguments="${tmp#* }"
24118
24119  # Input might be given as Windows format, start by converting to
24120  # unix format.
24121  new_path="$path"
24122
24123  windows_path="$new_path"
24124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24125    unix_path=`$CYGPATH -u "$windows_path"`
24126    new_path="$unix_path"
24127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24129    new_path="$unix_path"
24130  fi
24131
24132
24133  # Now try to locate executable using which
24134  new_path=`$WHICH "$new_path" 2> /dev/null`
24135
24136  if test "x$new_path" = x; then
24137    # Oops. Which didn't find the executable.
24138    # The splitting of arguments from the executable at a space might have been incorrect,
24139    # since paths with space are more likely in Windows. Give it another try with the whole
24140    # argument.
24141    path="$complete"
24142    arguments="EOL"
24143    new_path="$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
24155    new_path=`$WHICH "$new_path" 2> /dev/null`
24156
24157    if test "x$new_path" = x; then
24158      # It's still not found. Now this is an unrecoverable error.
24159      { $as_echo "$as_me:$LINENO: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24160$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24161      has_space=`$ECHO "$complete" | $GREP " "`
24162      if test "x$has_space" != x; then
24163        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24165      fi
24166      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXXCPP" >&5
24167$as_echo "$as_me: error: Cannot locate the the path of CXXCPP" >&2;}
24168   { (exit 1); exit 1; }; }
24169    fi
24170  fi
24171
24172  # Now new_path has a complete unix path to the binary
24173  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24174    # Keep paths in /bin as-is, but remove trailing .exe if any
24175    new_path="${new_path/%.exe/}"
24176    # Do not save /bin paths to all_fixpath_prefixes!
24177  else
24178    # Not in mixed or Windows style, start by that.
24179    new_path=`cmd //c echo $new_path`
24180
24181  input_path="$new_path"
24182  # Check if we need to convert this using DOS-style short mode. If the path
24183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24184  # take no chances and rewrite it.
24185  # Note: m4 eats our [], so we need to use [ and ] instead.
24186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24187  if test "x$has_forbidden_chars" != x; then
24188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24190  fi
24191
24192    # Output is in $new_path
24193
24194  windows_path="$new_path"
24195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24196    unix_path=`$CYGPATH -u "$windows_path"`
24197    new_path="$unix_path"
24198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24200    new_path="$unix_path"
24201  fi
24202
24203    # remove trailing .exe if any
24204    new_path="${new_path/%.exe/}"
24205
24206    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24207    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24208  fi
24209
24210  else
24211    # We're on a posix platform. Hooray! :)
24212    # First separate the path from the arguments. This will split at the first
24213    # space.
24214    complete="$CXXCPP"
24215    path="${complete%% *}"
24216    tmp="$complete EOL"
24217    arguments="${tmp#* }"
24218
24219    new_path=`$WHICH $path 2> /dev/null`
24220    if test "x$new_path" = x; then
24221      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24222      if test "x$is_absolute_path" != x; then
24223        { $as_echo "$as_me:$LINENO: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&5
24224$as_echo "$as_me: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&6;}
24225        new_path="$path"
24226      else
24227        { $as_echo "$as_me:$LINENO: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24228$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24229        has_space=`$ECHO "$complete" | $GREP " "`
24230        if test "x$has_space" != x; then
24231          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
24232$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24233        fi
24234        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of CXXCPP" >&5
24235$as_echo "$as_me: error: Cannot locate the the path of CXXCPP" >&2;}
24236   { (exit 1); exit 1; }; }
24237      fi
24238    fi
24239  fi
24240
24241  # Now join together the path and the arguments once again
24242  if test "x$arguments" != xEOL; then
24243      new_complete="$new_path ${arguments% *}"
24244  else
24245      new_complete="$new_path"
24246  fi
24247
24248  if test "x$complete" != "x$new_complete"; then
24249    CXXCPP="$new_complete"
24250    { $as_echo "$as_me:$LINENO: Rewriting CXXCPP to \"$new_complete\"" >&5
24251$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24252  fi
24253
24254
24255if test "x$COMPILE_TYPE" != "xcross"; then
24256    # If we are not cross compiling, use the same compilers for
24257    # building the build platform executables. The cross-compilation
24258    # case needed to be done earlier, but this can only be done after
24259    # the native tools have been localized.
24260    BUILD_CC="$CC"
24261    BUILD_CXX="$CXX"
24262    BUILD_LD="$LD"
24263fi
24264
24265# for solaris we really need solaris tools, and not gnu equivalent
24266#   these seems to normally reside in /usr/ccs/bin so add that to path before
24267#   starting to probe
24268#
24269#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24270#         so that it can be overriden --with-tools-dir
24271if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24272    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24273fi
24274
24275# Find the right assembler.
24276if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24277    # Extract the first word of "as", so it can be a program name with args.
24278set dummy as; ac_word=$2
24279{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
24280$as_echo_n "checking for $ac_word... " >&6; }
24281if test "${ac_cv_path_AS+set}" = set; then
24282  $as_echo_n "(cached) " >&6
24283else
24284  case $AS in
24285  [\\/]* | ?:[\\/]*)
24286  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24287  ;;
24288  *)
24289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24290for as_dir in $PATH
24291do
24292  IFS=$as_save_IFS
24293  test -z "$as_dir" && as_dir=.
24294  for ac_exec_ext in '' $ac_executable_extensions; do
24295  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24296    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24297    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24298    break 2
24299  fi
24300done
24301done
24302IFS=$as_save_IFS
24303
24304  ;;
24305esac
24306fi
24307AS=$ac_cv_path_AS
24308if test -n "$AS"; then
24309  { $as_echo "$as_me:$LINENO: result: $AS" >&5
24310$as_echo "$AS" >&6; }
24311else
24312  { $as_echo "$as_me:$LINENO: result: no" >&5
24313$as_echo "no" >&6; }
24314fi
24315
24316
24317
24318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24319
24320  # First separate the path from the arguments. This will split at the first
24321  # space.
24322  complete="$AS"
24323  path="${complete%% *}"
24324  tmp="$complete EOL"
24325  arguments="${tmp#* }"
24326
24327  # Input might be given as Windows format, start by converting to
24328  # unix format.
24329  new_path=`$CYGPATH -u "$path"`
24330
24331  # Now try to locate executable using which
24332  new_path=`$WHICH "$new_path" 2> /dev/null`
24333  # bat and cmd files are not always considered executable in cygwin causing which
24334  # to not find them
24335  if test "x$new_path" = x \
24336           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24337           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24338    new_path=`$CYGPATH -u "$path"`
24339  fi
24340  if test "x$new_path" = x; then
24341    # Oops. Which didn't find the executable.
24342    # The splitting of arguments from the executable at a space might have been incorrect,
24343    # since paths with space are more likely in Windows. Give it another try with the whole
24344    # argument.
24345    path="$complete"
24346    arguments="EOL"
24347    new_path=`$CYGPATH -u "$path"`
24348    new_path=`$WHICH "$new_path" 2> /dev/null`
24349    # bat and cmd files are not always considered executable in cygwin causing which
24350    # to not find them
24351    if test "x$new_path" = x \
24352             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24353             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24354      new_path=`$CYGPATH -u "$path"`
24355    fi
24356    if test "x$new_path" = x; then
24357      # It's still not found. Now this is an unrecoverable error.
24358      { $as_echo "$as_me:$LINENO: The path of AS, which resolves as \"$complete\", is not found." >&5
24359$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24360      has_space=`$ECHO "$complete" | $GREP " "`
24361      if test "x$has_space" != x; then
24362        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24364      fi
24365      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AS" >&5
24366$as_echo "$as_me: error: Cannot locate the the path of AS" >&2;}
24367   { (exit 1); exit 1; }; }
24368    fi
24369  fi
24370
24371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24374  # "foo.exe" is OK but "foo" is an error.
24375  #
24376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24377  # It is also a way to make sure we got the proper file name for the real test later on.
24378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24379  if test "x$test_shortpath" = x; then
24380    # Short path failed, file does not exist as specified.
24381    # Try adding .exe or .cmd
24382    if test -f "${new_path}.exe"; then
24383       input_to_shortpath="${new_path}.exe"
24384    elif test -f "${new_path}.cmd"; then
24385       input_to_shortpath="${new_path}.cmd"
24386    else
24387      { $as_echo "$as_me:$LINENO: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24388$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24389      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24390$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24391      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AS" >&5
24392$as_echo "$as_me: error: Cannot locate the the path of AS" >&2;}
24393   { (exit 1); exit 1; }; }
24394    fi
24395  else
24396    input_to_shortpath="$new_path"
24397  fi
24398
24399  # Call helper function which possibly converts this using DOS-style short mode.
24400  # If so, the updated path is stored in $new_path.
24401  new_path="$input_to_shortpath"
24402
24403  input_path="$input_to_shortpath"
24404  # Check if we need to convert this using DOS-style short mode. If the path
24405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24406  # take no chances and rewrite it.
24407  # Note: m4 eats our [], so we need to use [ and ] instead.
24408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24409  if test "x$has_forbidden_chars" != x; then
24410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24414      # Going to short mode and back again did indeed matter. Since short mode is
24415      # case insensitive, let's make it lowercase to improve readability.
24416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24417      # Now convert it back to Unix-stile (cygpath)
24418      input_path=`$CYGPATH -u "$shortmode_path"`
24419      new_path="$input_path"
24420    fi
24421  fi
24422
24423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24424  if test "x$test_cygdrive_prefix" = x; then
24425    # As a simple fix, exclude /usr/bin since it's not a real path.
24426    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24428      # a path prefixed by /cygdrive for fixpath to work.
24429      new_path="$CYGWIN_ROOT_PATH$input_path"
24430    fi
24431  fi
24432
24433  # remove trailing .exe if any
24434  new_path="${new_path/%.exe/}"
24435
24436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24437
24438  # First separate the path from the arguments. This will split at the first
24439  # space.
24440  complete="$AS"
24441  path="${complete%% *}"
24442  tmp="$complete EOL"
24443  arguments="${tmp#* }"
24444
24445  # Input might be given as Windows format, start by converting to
24446  # unix format.
24447  new_path="$path"
24448
24449  windows_path="$new_path"
24450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24451    unix_path=`$CYGPATH -u "$windows_path"`
24452    new_path="$unix_path"
24453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24455    new_path="$unix_path"
24456  fi
24457
24458
24459  # Now try to locate executable using which
24460  new_path=`$WHICH "$new_path" 2> /dev/null`
24461
24462  if test "x$new_path" = x; then
24463    # Oops. Which didn't find the executable.
24464    # The splitting of arguments from the executable at a space might have been incorrect,
24465    # since paths with space are more likely in Windows. Give it another try with the whole
24466    # argument.
24467    path="$complete"
24468    arguments="EOL"
24469    new_path="$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
24481    new_path=`$WHICH "$new_path" 2> /dev/null`
24482
24483    if test "x$new_path" = x; then
24484      # It's still not found. Now this is an unrecoverable error.
24485      { $as_echo "$as_me:$LINENO: The path of AS, which resolves as \"$complete\", is not found." >&5
24486$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24487      has_space=`$ECHO "$complete" | $GREP " "`
24488      if test "x$has_space" != x; then
24489        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24490$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24491      fi
24492      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AS" >&5
24493$as_echo "$as_me: error: Cannot locate the the path of AS" >&2;}
24494   { (exit 1); exit 1; }; }
24495    fi
24496  fi
24497
24498  # Now new_path has a complete unix path to the binary
24499  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24500    # Keep paths in /bin as-is, but remove trailing .exe if any
24501    new_path="${new_path/%.exe/}"
24502    # Do not save /bin paths to all_fixpath_prefixes!
24503  else
24504    # Not in mixed or Windows style, start by that.
24505    new_path=`cmd //c echo $new_path`
24506
24507  input_path="$new_path"
24508  # Check if we need to convert this using DOS-style short mode. If the path
24509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24510  # take no chances and rewrite it.
24511  # Note: m4 eats our [], so we need to use [ and ] instead.
24512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24513  if test "x$has_forbidden_chars" != x; then
24514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24516  fi
24517
24518    # Output is in $new_path
24519
24520  windows_path="$new_path"
24521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24522    unix_path=`$CYGPATH -u "$windows_path"`
24523    new_path="$unix_path"
24524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24526    new_path="$unix_path"
24527  fi
24528
24529    # remove trailing .exe if any
24530    new_path="${new_path/%.exe/}"
24531
24532    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24533    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24534  fi
24535
24536  else
24537    # We're on a posix platform. Hooray! :)
24538    # First separate the path from the arguments. This will split at the first
24539    # space.
24540    complete="$AS"
24541    path="${complete%% *}"
24542    tmp="$complete EOL"
24543    arguments="${tmp#* }"
24544
24545    new_path=`$WHICH $path 2> /dev/null`
24546    if test "x$new_path" = x; then
24547      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24548      if test "x$is_absolute_path" != x; then
24549        { $as_echo "$as_me:$LINENO: Resolving AS (as $path) with 'which' failed, using $path directly." >&5
24550$as_echo "$as_me: Resolving AS (as $path) with 'which' failed, using $path directly." >&6;}
24551        new_path="$path"
24552      else
24553        { $as_echo "$as_me:$LINENO: The path of AS, which resolves as \"$complete\", is not found." >&5
24554$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24555        has_space=`$ECHO "$complete" | $GREP " "`
24556        if test "x$has_space" != x; then
24557          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
24558$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24559        fi
24560        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of AS" >&5
24561$as_echo "$as_me: error: Cannot locate the the path of AS" >&2;}
24562   { (exit 1); exit 1; }; }
24563      fi
24564    fi
24565  fi
24566
24567  # Now join together the path and the arguments once again
24568  if test "x$arguments" != xEOL; then
24569      new_complete="$new_path ${arguments% *}"
24570  else
24571      new_complete="$new_path"
24572  fi
24573
24574  if test "x$complete" != "x$new_complete"; then
24575    AS="$new_complete"
24576    { $as_echo "$as_me:$LINENO: Rewriting AS to \"$new_complete\"" >&5
24577$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24578  fi
24579
24580else
24581    AS="$CC -c"
24582fi
24583
24584
24585if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24586    for ac_prog in gnm nm
24587do
24588  # Extract the first word of "$ac_prog", so it can be a program name with args.
24589set dummy $ac_prog; ac_word=$2
24590{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
24591$as_echo_n "checking for $ac_word... " >&6; }
24592if test "${ac_cv_path_NM+set}" = set; then
24593  $as_echo_n "(cached) " >&6
24594else
24595  case $NM in
24596  [\\/]* | ?:[\\/]*)
24597  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24598  ;;
24599  *)
24600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24601for as_dir in $PATH
24602do
24603  IFS=$as_save_IFS
24604  test -z "$as_dir" && as_dir=.
24605  for ac_exec_ext in '' $ac_executable_extensions; do
24606  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24607    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24608    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24609    break 2
24610  fi
24611done
24612done
24613IFS=$as_save_IFS
24614
24615  ;;
24616esac
24617fi
24618NM=$ac_cv_path_NM
24619if test -n "$NM"; then
24620  { $as_echo "$as_me:$LINENO: result: $NM" >&5
24621$as_echo "$NM" >&6; }
24622else
24623  { $as_echo "$as_me:$LINENO: result: no" >&5
24624$as_echo "no" >&6; }
24625fi
24626
24627
24628  test -n "$NM" && break
24629done
24630
24631
24632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24633
24634  # First separate the path from the arguments. This will split at the first
24635  # space.
24636  complete="$NM"
24637  path="${complete%% *}"
24638  tmp="$complete EOL"
24639  arguments="${tmp#* }"
24640
24641  # Input might be given as Windows format, start by converting to
24642  # unix format.
24643  new_path=`$CYGPATH -u "$path"`
24644
24645  # Now try to locate executable using which
24646  new_path=`$WHICH "$new_path" 2> /dev/null`
24647  # bat and cmd files are not always considered executable in cygwin causing which
24648  # to not find them
24649  if test "x$new_path" = x \
24650           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24651           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24652    new_path=`$CYGPATH -u "$path"`
24653  fi
24654  if test "x$new_path" = x; then
24655    # Oops. Which didn't find the executable.
24656    # The splitting of arguments from the executable at a space might have been incorrect,
24657    # since paths with space are more likely in Windows. Give it another try with the whole
24658    # argument.
24659    path="$complete"
24660    arguments="EOL"
24661    new_path=`$CYGPATH -u "$path"`
24662    new_path=`$WHICH "$new_path" 2> /dev/null`
24663    # bat and cmd files are not always considered executable in cygwin causing which
24664    # to not find them
24665    if test "x$new_path" = x \
24666             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24667             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24668      new_path=`$CYGPATH -u "$path"`
24669    fi
24670    if test "x$new_path" = x; then
24671      # It's still not found. Now this is an unrecoverable error.
24672      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
24673$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24674      has_space=`$ECHO "$complete" | $GREP " "`
24675      if test "x$has_space" != x; then
24676        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24678      fi
24679      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
24680$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
24681   { (exit 1); exit 1; }; }
24682    fi
24683  fi
24684
24685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24688  # "foo.exe" is OK but "foo" is an error.
24689  #
24690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24691  # It is also a way to make sure we got the proper file name for the real test later on.
24692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24693  if test "x$test_shortpath" = x; then
24694    # Short path failed, file does not exist as specified.
24695    # Try adding .exe or .cmd
24696    if test -f "${new_path}.exe"; then
24697       input_to_shortpath="${new_path}.exe"
24698    elif test -f "${new_path}.cmd"; then
24699       input_to_shortpath="${new_path}.cmd"
24700    else
24701      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24702$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24703      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24704$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24705      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
24706$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
24707   { (exit 1); exit 1; }; }
24708    fi
24709  else
24710    input_to_shortpath="$new_path"
24711  fi
24712
24713  # Call helper function which possibly converts this using DOS-style short mode.
24714  # If so, the updated path is stored in $new_path.
24715  new_path="$input_to_shortpath"
24716
24717  input_path="$input_to_shortpath"
24718  # Check if we need to convert this using DOS-style short mode. If the path
24719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24720  # take no chances and rewrite it.
24721  # Note: m4 eats our [], so we need to use [ and ] instead.
24722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24723  if test "x$has_forbidden_chars" != x; then
24724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24728      # Going to short mode and back again did indeed matter. Since short mode is
24729      # case insensitive, let's make it lowercase to improve readability.
24730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24731      # Now convert it back to Unix-stile (cygpath)
24732      input_path=`$CYGPATH -u "$shortmode_path"`
24733      new_path="$input_path"
24734    fi
24735  fi
24736
24737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24738  if test "x$test_cygdrive_prefix" = x; then
24739    # As a simple fix, exclude /usr/bin since it's not a real path.
24740    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24742      # a path prefixed by /cygdrive for fixpath to work.
24743      new_path="$CYGWIN_ROOT_PATH$input_path"
24744    fi
24745  fi
24746
24747  # remove trailing .exe if any
24748  new_path="${new_path/%.exe/}"
24749
24750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24751
24752  # First separate the path from the arguments. This will split at the first
24753  # space.
24754  complete="$NM"
24755  path="${complete%% *}"
24756  tmp="$complete EOL"
24757  arguments="${tmp#* }"
24758
24759  # Input might be given as Windows format, start by converting to
24760  # unix format.
24761  new_path="$path"
24762
24763  windows_path="$new_path"
24764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24765    unix_path=`$CYGPATH -u "$windows_path"`
24766    new_path="$unix_path"
24767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24769    new_path="$unix_path"
24770  fi
24771
24772
24773  # Now try to locate executable using which
24774  new_path=`$WHICH "$new_path" 2> /dev/null`
24775
24776  if test "x$new_path" = x; then
24777    # Oops. Which didn't find the executable.
24778    # The splitting of arguments from the executable at a space might have been incorrect,
24779    # since paths with space are more likely in Windows. Give it another try with the whole
24780    # argument.
24781    path="$complete"
24782    arguments="EOL"
24783    new_path="$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
24795    new_path=`$WHICH "$new_path" 2> /dev/null`
24796
24797    if test "x$new_path" = x; then
24798      # It's still not found. Now this is an unrecoverable error.
24799      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
24800$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24801      has_space=`$ECHO "$complete" | $GREP " "`
24802      if test "x$has_space" != x; then
24803        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24804$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24805      fi
24806      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
24807$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
24808   { (exit 1); exit 1; }; }
24809    fi
24810  fi
24811
24812  # Now new_path has a complete unix path to the binary
24813  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24814    # Keep paths in /bin as-is, but remove trailing .exe if any
24815    new_path="${new_path/%.exe/}"
24816    # Do not save /bin paths to all_fixpath_prefixes!
24817  else
24818    # Not in mixed or Windows style, start by that.
24819    new_path=`cmd //c echo $new_path`
24820
24821  input_path="$new_path"
24822  # Check if we need to convert this using DOS-style short mode. If the path
24823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24824  # take no chances and rewrite it.
24825  # Note: m4 eats our [], so we need to use [ and ] instead.
24826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24827  if test "x$has_forbidden_chars" != x; then
24828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24830  fi
24831
24832    # Output is in $new_path
24833
24834  windows_path="$new_path"
24835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24836    unix_path=`$CYGPATH -u "$windows_path"`
24837    new_path="$unix_path"
24838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24840    new_path="$unix_path"
24841  fi
24842
24843    # remove trailing .exe if any
24844    new_path="${new_path/%.exe/}"
24845
24846    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24847    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24848  fi
24849
24850  else
24851    # We're on a posix platform. Hooray! :)
24852    # First separate the path from the arguments. This will split at the first
24853    # space.
24854    complete="$NM"
24855    path="${complete%% *}"
24856    tmp="$complete EOL"
24857    arguments="${tmp#* }"
24858
24859    new_path=`$WHICH $path 2> /dev/null`
24860    if test "x$new_path" = x; then
24861      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24862      if test "x$is_absolute_path" != x; then
24863        { $as_echo "$as_me:$LINENO: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
24864$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
24865        new_path="$path"
24866      else
24867        { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
24868$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24869        has_space=`$ECHO "$complete" | $GREP " "`
24870        if test "x$has_space" != x; then
24871          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
24872$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24873        fi
24874        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
24875$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
24876   { (exit 1); exit 1; }; }
24877      fi
24878    fi
24879  fi
24880
24881  # Now join together the path and the arguments once again
24882  if test "x$arguments" != xEOL; then
24883      new_complete="$new_path ${arguments% *}"
24884  else
24885      new_complete="$new_path"
24886  fi
24887
24888  if test "x$complete" != "x$new_complete"; then
24889    NM="$new_complete"
24890    { $as_echo "$as_me:$LINENO: Rewriting NM to \"$new_complete\"" >&5
24891$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24892  fi
24893
24894    # Extract the first word of "strip", so it can be a program name with args.
24895set dummy strip; ac_word=$2
24896{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
24897$as_echo_n "checking for $ac_word... " >&6; }
24898if test "${ac_cv_path_STRIP+set}" = set; then
24899  $as_echo_n "(cached) " >&6
24900else
24901  case $STRIP in
24902  [\\/]* | ?:[\\/]*)
24903  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24904  ;;
24905  *)
24906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24907for as_dir in $PATH
24908do
24909  IFS=$as_save_IFS
24910  test -z "$as_dir" && as_dir=.
24911  for ac_exec_ext in '' $ac_executable_extensions; do
24912  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24913    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24914    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24915    break 2
24916  fi
24917done
24918done
24919IFS=$as_save_IFS
24920
24921  ;;
24922esac
24923fi
24924STRIP=$ac_cv_path_STRIP
24925if test -n "$STRIP"; then
24926  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
24927$as_echo "$STRIP" >&6; }
24928else
24929  { $as_echo "$as_me:$LINENO: result: no" >&5
24930$as_echo "no" >&6; }
24931fi
24932
24933
24934
24935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24936
24937  # First separate the path from the arguments. This will split at the first
24938  # space.
24939  complete="$STRIP"
24940  path="${complete%% *}"
24941  tmp="$complete EOL"
24942  arguments="${tmp#* }"
24943
24944  # Input might be given as Windows format, start by converting to
24945  # unix format.
24946  new_path=`$CYGPATH -u "$path"`
24947
24948  # Now try to locate executable using which
24949  new_path=`$WHICH "$new_path" 2> /dev/null`
24950  # bat and cmd files are not always considered executable in cygwin causing which
24951  # to not find them
24952  if test "x$new_path" = x \
24953           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24954           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24955    new_path=`$CYGPATH -u "$path"`
24956  fi
24957  if test "x$new_path" = x; then
24958    # Oops. Which didn't find the executable.
24959    # The splitting of arguments from the executable at a space might have been incorrect,
24960    # since paths with space are more likely in Windows. Give it another try with the whole
24961    # argument.
24962    path="$complete"
24963    arguments="EOL"
24964    new_path=`$CYGPATH -u "$path"`
24965    new_path=`$WHICH "$new_path" 2> /dev/null`
24966    # bat and cmd files are not always considered executable in cygwin causing which
24967    # to not find them
24968    if test "x$new_path" = x \
24969             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24970             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24971      new_path=`$CYGPATH -u "$path"`
24972    fi
24973    if test "x$new_path" = x; then
24974      # It's still not found. Now this is an unrecoverable error.
24975      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24976$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24977      has_space=`$ECHO "$complete" | $GREP " "`
24978      if test "x$has_space" != x; then
24979        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24980$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24981      fi
24982      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
24983$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
24984   { (exit 1); exit 1; }; }
24985    fi
24986  fi
24987
24988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24991  # "foo.exe" is OK but "foo" is an error.
24992  #
24993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24994  # It is also a way to make sure we got the proper file name for the real test later on.
24995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24996  if test "x$test_shortpath" = x; then
24997    # Short path failed, file does not exist as specified.
24998    # Try adding .exe or .cmd
24999    if test -f "${new_path}.exe"; then
25000       input_to_shortpath="${new_path}.exe"
25001    elif test -f "${new_path}.cmd"; then
25002       input_to_shortpath="${new_path}.cmd"
25003    else
25004      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25005$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25006      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25007$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25008      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
25009$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
25010   { (exit 1); exit 1; }; }
25011    fi
25012  else
25013    input_to_shortpath="$new_path"
25014  fi
25015
25016  # Call helper function which possibly converts this using DOS-style short mode.
25017  # If so, the updated path is stored in $new_path.
25018  new_path="$input_to_shortpath"
25019
25020  input_path="$input_to_shortpath"
25021  # Check if we need to convert this using DOS-style short mode. If the path
25022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25023  # take no chances and rewrite it.
25024  # Note: m4 eats our [], so we need to use [ and ] instead.
25025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25026  if test "x$has_forbidden_chars" != x; then
25027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25031      # Going to short mode and back again did indeed matter. Since short mode is
25032      # case insensitive, let's make it lowercase to improve readability.
25033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25034      # Now convert it back to Unix-stile (cygpath)
25035      input_path=`$CYGPATH -u "$shortmode_path"`
25036      new_path="$input_path"
25037    fi
25038  fi
25039
25040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25041  if test "x$test_cygdrive_prefix" = x; then
25042    # As a simple fix, exclude /usr/bin since it's not a real path.
25043    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25045      # a path prefixed by /cygdrive for fixpath to work.
25046      new_path="$CYGWIN_ROOT_PATH$input_path"
25047    fi
25048  fi
25049
25050  # remove trailing .exe if any
25051  new_path="${new_path/%.exe/}"
25052
25053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25054
25055  # First separate the path from the arguments. This will split at the first
25056  # space.
25057  complete="$STRIP"
25058  path="${complete%% *}"
25059  tmp="$complete EOL"
25060  arguments="${tmp#* }"
25061
25062  # Input might be given as Windows format, start by converting to
25063  # unix format.
25064  new_path="$path"
25065
25066  windows_path="$new_path"
25067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25068    unix_path=`$CYGPATH -u "$windows_path"`
25069    new_path="$unix_path"
25070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25072    new_path="$unix_path"
25073  fi
25074
25075
25076  # Now try to locate executable using which
25077  new_path=`$WHICH "$new_path" 2> /dev/null`
25078
25079  if test "x$new_path" = x; then
25080    # Oops. Which didn't find the executable.
25081    # The splitting of arguments from the executable at a space might have been incorrect,
25082    # since paths with space are more likely in Windows. Give it another try with the whole
25083    # argument.
25084    path="$complete"
25085    arguments="EOL"
25086    new_path="$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
25098    new_path=`$WHICH "$new_path" 2> /dev/null`
25099
25100    if test "x$new_path" = x; then
25101      # It's still not found. Now this is an unrecoverable error.
25102      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25103$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25104      has_space=`$ECHO "$complete" | $GREP " "`
25105      if test "x$has_space" != x; then
25106        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25108      fi
25109      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
25110$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
25111   { (exit 1); exit 1; }; }
25112    fi
25113  fi
25114
25115  # Now new_path has a complete unix path to the binary
25116  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25117    # Keep paths in /bin as-is, but remove trailing .exe if any
25118    new_path="${new_path/%.exe/}"
25119    # Do not save /bin paths to all_fixpath_prefixes!
25120  else
25121    # Not in mixed or Windows style, start by that.
25122    new_path=`cmd //c echo $new_path`
25123
25124  input_path="$new_path"
25125  # Check if we need to convert this using DOS-style short mode. If the path
25126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25127  # take no chances and rewrite it.
25128  # Note: m4 eats our [], so we need to use [ and ] instead.
25129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25130  if test "x$has_forbidden_chars" != x; then
25131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25133  fi
25134
25135    # Output is in $new_path
25136
25137  windows_path="$new_path"
25138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25139    unix_path=`$CYGPATH -u "$windows_path"`
25140    new_path="$unix_path"
25141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25143    new_path="$unix_path"
25144  fi
25145
25146    # remove trailing .exe if any
25147    new_path="${new_path/%.exe/}"
25148
25149    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25150    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25151  fi
25152
25153  else
25154    # We're on a posix platform. Hooray! :)
25155    # First separate the path from the arguments. This will split at the first
25156    # space.
25157    complete="$STRIP"
25158    path="${complete%% *}"
25159    tmp="$complete EOL"
25160    arguments="${tmp#* }"
25161
25162    new_path=`$WHICH $path 2> /dev/null`
25163    if test "x$new_path" = x; then
25164      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25165      if test "x$is_absolute_path" != x; then
25166        { $as_echo "$as_me:$LINENO: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
25167$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
25168        new_path="$path"
25169      else
25170        { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25171$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25172        has_space=`$ECHO "$complete" | $GREP " "`
25173        if test "x$has_space" != x; then
25174          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
25175$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25176        fi
25177        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
25178$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
25179   { (exit 1); exit 1; }; }
25180      fi
25181    fi
25182  fi
25183
25184  # Now join together the path and the arguments once again
25185  if test "x$arguments" != xEOL; then
25186      new_complete="$new_path ${arguments% *}"
25187  else
25188      new_complete="$new_path"
25189  fi
25190
25191  if test "x$complete" != "x$new_complete"; then
25192    STRIP="$new_complete"
25193    { $as_echo "$as_me:$LINENO: Rewriting STRIP to \"$new_complete\"" >&5
25194$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25195  fi
25196
25197    # Extract the first word of "mcs", so it can be a program name with args.
25198set dummy mcs; ac_word=$2
25199{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
25200$as_echo_n "checking for $ac_word... " >&6; }
25201if test "${ac_cv_path_MCS+set}" = set; then
25202  $as_echo_n "(cached) " >&6
25203else
25204  case $MCS in
25205  [\\/]* | ?:[\\/]*)
25206  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25207  ;;
25208  *)
25209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25210for as_dir in $PATH
25211do
25212  IFS=$as_save_IFS
25213  test -z "$as_dir" && as_dir=.
25214  for ac_exec_ext in '' $ac_executable_extensions; do
25215  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25216    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25217    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25218    break 2
25219  fi
25220done
25221done
25222IFS=$as_save_IFS
25223
25224  ;;
25225esac
25226fi
25227MCS=$ac_cv_path_MCS
25228if test -n "$MCS"; then
25229  { $as_echo "$as_me:$LINENO: result: $MCS" >&5
25230$as_echo "$MCS" >&6; }
25231else
25232  { $as_echo "$as_me:$LINENO: result: no" >&5
25233$as_echo "no" >&6; }
25234fi
25235
25236
25237
25238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25239
25240  # First separate the path from the arguments. This will split at the first
25241  # space.
25242  complete="$MCS"
25243  path="${complete%% *}"
25244  tmp="$complete EOL"
25245  arguments="${tmp#* }"
25246
25247  # Input might be given as Windows format, start by converting to
25248  # unix format.
25249  new_path=`$CYGPATH -u "$path"`
25250
25251  # Now try to locate executable using which
25252  new_path=`$WHICH "$new_path" 2> /dev/null`
25253  # bat and cmd files are not always considered executable in cygwin causing which
25254  # to not find them
25255  if test "x$new_path" = x \
25256           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25257           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25258    new_path=`$CYGPATH -u "$path"`
25259  fi
25260  if test "x$new_path" = x; then
25261    # Oops. Which didn't find the executable.
25262    # The splitting of arguments from the executable at a space might have been incorrect,
25263    # since paths with space are more likely in Windows. Give it another try with the whole
25264    # argument.
25265    path="$complete"
25266    arguments="EOL"
25267    new_path=`$CYGPATH -u "$path"`
25268    new_path=`$WHICH "$new_path" 2> /dev/null`
25269    # bat and cmd files are not always considered executable in cygwin causing which
25270    # to not find them
25271    if test "x$new_path" = x \
25272             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25273             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25274      new_path=`$CYGPATH -u "$path"`
25275    fi
25276    if test "x$new_path" = x; then
25277      # It's still not found. Now this is an unrecoverable error.
25278      { $as_echo "$as_me:$LINENO: The path of MCS, which resolves as \"$complete\", is not found." >&5
25279$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25280      has_space=`$ECHO "$complete" | $GREP " "`
25281      if test "x$has_space" != x; then
25282        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25284      fi
25285      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MCS" >&5
25286$as_echo "$as_me: error: Cannot locate the the path of MCS" >&2;}
25287   { (exit 1); exit 1; }; }
25288    fi
25289  fi
25290
25291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25294  # "foo.exe" is OK but "foo" is an error.
25295  #
25296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25297  # It is also a way to make sure we got the proper file name for the real test later on.
25298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25299  if test "x$test_shortpath" = x; then
25300    # Short path failed, file does not exist as specified.
25301    # Try adding .exe or .cmd
25302    if test -f "${new_path}.exe"; then
25303       input_to_shortpath="${new_path}.exe"
25304    elif test -f "${new_path}.cmd"; then
25305       input_to_shortpath="${new_path}.cmd"
25306    else
25307      { $as_echo "$as_me:$LINENO: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25308$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25309      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25310$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25311      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MCS" >&5
25312$as_echo "$as_me: error: Cannot locate the the path of MCS" >&2;}
25313   { (exit 1); exit 1; }; }
25314    fi
25315  else
25316    input_to_shortpath="$new_path"
25317  fi
25318
25319  # Call helper function which possibly converts this using DOS-style short mode.
25320  # If so, the updated path is stored in $new_path.
25321  new_path="$input_to_shortpath"
25322
25323  input_path="$input_to_shortpath"
25324  # Check if we need to convert this using DOS-style short mode. If the path
25325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25326  # take no chances and rewrite it.
25327  # Note: m4 eats our [], so we need to use [ and ] instead.
25328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25329  if test "x$has_forbidden_chars" != x; then
25330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25334      # Going to short mode and back again did indeed matter. Since short mode is
25335      # case insensitive, let's make it lowercase to improve readability.
25336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25337      # Now convert it back to Unix-stile (cygpath)
25338      input_path=`$CYGPATH -u "$shortmode_path"`
25339      new_path="$input_path"
25340    fi
25341  fi
25342
25343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25344  if test "x$test_cygdrive_prefix" = x; then
25345    # As a simple fix, exclude /usr/bin since it's not a real path.
25346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25348      # a path prefixed by /cygdrive for fixpath to work.
25349      new_path="$CYGWIN_ROOT_PATH$input_path"
25350    fi
25351  fi
25352
25353  # remove trailing .exe if any
25354  new_path="${new_path/%.exe/}"
25355
25356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25357
25358  # First separate the path from the arguments. This will split at the first
25359  # space.
25360  complete="$MCS"
25361  path="${complete%% *}"
25362  tmp="$complete EOL"
25363  arguments="${tmp#* }"
25364
25365  # Input might be given as Windows format, start by converting to
25366  # unix format.
25367  new_path="$path"
25368
25369  windows_path="$new_path"
25370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25371    unix_path=`$CYGPATH -u "$windows_path"`
25372    new_path="$unix_path"
25373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25375    new_path="$unix_path"
25376  fi
25377
25378
25379  # Now try to locate executable using which
25380  new_path=`$WHICH "$new_path" 2> /dev/null`
25381
25382  if test "x$new_path" = x; then
25383    # Oops. Which didn't find the executable.
25384    # The splitting of arguments from the executable at a space might have been incorrect,
25385    # since paths with space are more likely in Windows. Give it another try with the whole
25386    # argument.
25387    path="$complete"
25388    arguments="EOL"
25389    new_path="$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
25401    new_path=`$WHICH "$new_path" 2> /dev/null`
25402
25403    if test "x$new_path" = x; then
25404      # It's still not found. Now this is an unrecoverable error.
25405      { $as_echo "$as_me:$LINENO: The path of MCS, which resolves as \"$complete\", is not found." >&5
25406$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25407      has_space=`$ECHO "$complete" | $GREP " "`
25408      if test "x$has_space" != x; then
25409        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25411      fi
25412      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MCS" >&5
25413$as_echo "$as_me: error: Cannot locate the the path of MCS" >&2;}
25414   { (exit 1); exit 1; }; }
25415    fi
25416  fi
25417
25418  # Now new_path has a complete unix path to the binary
25419  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25420    # Keep paths in /bin as-is, but remove trailing .exe if any
25421    new_path="${new_path/%.exe/}"
25422    # Do not save /bin paths to all_fixpath_prefixes!
25423  else
25424    # Not in mixed or Windows style, start by that.
25425    new_path=`cmd //c echo $new_path`
25426
25427  input_path="$new_path"
25428  # Check if we need to convert this using DOS-style short mode. If the path
25429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25430  # take no chances and rewrite it.
25431  # Note: m4 eats our [], so we need to use [ and ] instead.
25432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25433  if test "x$has_forbidden_chars" != x; then
25434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25436  fi
25437
25438    # Output is in $new_path
25439
25440  windows_path="$new_path"
25441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25442    unix_path=`$CYGPATH -u "$windows_path"`
25443    new_path="$unix_path"
25444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25446    new_path="$unix_path"
25447  fi
25448
25449    # remove trailing .exe if any
25450    new_path="${new_path/%.exe/}"
25451
25452    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25453    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25454  fi
25455
25456  else
25457    # We're on a posix platform. Hooray! :)
25458    # First separate the path from the arguments. This will split at the first
25459    # space.
25460    complete="$MCS"
25461    path="${complete%% *}"
25462    tmp="$complete EOL"
25463    arguments="${tmp#* }"
25464
25465    new_path=`$WHICH $path 2> /dev/null`
25466    if test "x$new_path" = x; then
25467      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25468      if test "x$is_absolute_path" != x; then
25469        { $as_echo "$as_me:$LINENO: Resolving MCS (as $path) with 'which' failed, using $path directly." >&5
25470$as_echo "$as_me: Resolving MCS (as $path) with 'which' failed, using $path directly." >&6;}
25471        new_path="$path"
25472      else
25473        { $as_echo "$as_me:$LINENO: The path of MCS, which resolves as \"$complete\", is not found." >&5
25474$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25475        has_space=`$ECHO "$complete" | $GREP " "`
25476        if test "x$has_space" != x; then
25477          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
25478$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25479        fi
25480        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of MCS" >&5
25481$as_echo "$as_me: error: Cannot locate the the path of MCS" >&2;}
25482   { (exit 1); exit 1; }; }
25483      fi
25484    fi
25485  fi
25486
25487  # Now join together the path and the arguments once again
25488  if test "x$arguments" != xEOL; then
25489      new_complete="$new_path ${arguments% *}"
25490  else
25491      new_complete="$new_path"
25492  fi
25493
25494  if test "x$complete" != "x$new_complete"; then
25495    MCS="$new_complete"
25496    { $as_echo "$as_me:$LINENO: Rewriting MCS to \"$new_complete\"" >&5
25497$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25498  fi
25499
25500elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25501    if test -n "$ac_tool_prefix"; then
25502  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25503set dummy ${ac_tool_prefix}nm; ac_word=$2
25504{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
25505$as_echo_n "checking for $ac_word... " >&6; }
25506if test "${ac_cv_prog_NM+set}" = set; then
25507  $as_echo_n "(cached) " >&6
25508else
25509  if test -n "$NM"; then
25510  ac_cv_prog_NM="$NM" # Let the user override the test.
25511else
25512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25513for as_dir in $PATH
25514do
25515  IFS=$as_save_IFS
25516  test -z "$as_dir" && as_dir=.
25517  for ac_exec_ext in '' $ac_executable_extensions; do
25518  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25519    ac_cv_prog_NM="${ac_tool_prefix}nm"
25520    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25521    break 2
25522  fi
25523done
25524done
25525IFS=$as_save_IFS
25526
25527fi
25528fi
25529NM=$ac_cv_prog_NM
25530if test -n "$NM"; then
25531  { $as_echo "$as_me:$LINENO: result: $NM" >&5
25532$as_echo "$NM" >&6; }
25533else
25534  { $as_echo "$as_me:$LINENO: result: no" >&5
25535$as_echo "no" >&6; }
25536fi
25537
25538
25539fi
25540if test -z "$ac_cv_prog_NM"; then
25541  ac_ct_NM=$NM
25542  # Extract the first word of "nm", so it can be a program name with args.
25543set dummy nm; ac_word=$2
25544{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
25545$as_echo_n "checking for $ac_word... " >&6; }
25546if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
25547  $as_echo_n "(cached) " >&6
25548else
25549  if test -n "$ac_ct_NM"; then
25550  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25551else
25552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25553for as_dir in $PATH
25554do
25555  IFS=$as_save_IFS
25556  test -z "$as_dir" && as_dir=.
25557  for ac_exec_ext in '' $ac_executable_extensions; do
25558  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25559    ac_cv_prog_ac_ct_NM="nm"
25560    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25561    break 2
25562  fi
25563done
25564done
25565IFS=$as_save_IFS
25566
25567fi
25568fi
25569ac_ct_NM=$ac_cv_prog_ac_ct_NM
25570if test -n "$ac_ct_NM"; then
25571  { $as_echo "$as_me:$LINENO: result: $ac_ct_NM" >&5
25572$as_echo "$ac_ct_NM" >&6; }
25573else
25574  { $as_echo "$as_me:$LINENO: result: no" >&5
25575$as_echo "no" >&6; }
25576fi
25577
25578  if test "x$ac_ct_NM" = x; then
25579    NM=""
25580  else
25581    case $cross_compiling:$ac_tool_warned in
25582yes:)
25583{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
25584$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25585ac_tool_warned=yes ;;
25586esac
25587    NM=$ac_ct_NM
25588  fi
25589else
25590  NM="$ac_cv_prog_NM"
25591fi
25592
25593
25594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25595
25596  # First separate the path from the arguments. This will split at the first
25597  # space.
25598  complete="$NM"
25599  path="${complete%% *}"
25600  tmp="$complete EOL"
25601  arguments="${tmp#* }"
25602
25603  # Input might be given as Windows format, start by converting to
25604  # unix format.
25605  new_path=`$CYGPATH -u "$path"`
25606
25607  # Now try to locate executable using which
25608  new_path=`$WHICH "$new_path" 2> /dev/null`
25609  # bat and cmd files are not always considered executable in cygwin causing which
25610  # to not find them
25611  if test "x$new_path" = x \
25612           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25613           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25614    new_path=`$CYGPATH -u "$path"`
25615  fi
25616  if test "x$new_path" = x; then
25617    # Oops. Which didn't find the executable.
25618    # The splitting of arguments from the executable at a space might have been incorrect,
25619    # since paths with space are more likely in Windows. Give it another try with the whole
25620    # argument.
25621    path="$complete"
25622    arguments="EOL"
25623    new_path=`$CYGPATH -u "$path"`
25624    new_path=`$WHICH "$new_path" 2> /dev/null`
25625    # bat and cmd files are not always considered executable in cygwin causing which
25626    # to not find them
25627    if test "x$new_path" = x \
25628             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25629             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25630      new_path=`$CYGPATH -u "$path"`
25631    fi
25632    if test "x$new_path" = x; then
25633      # It's still not found. Now this is an unrecoverable error.
25634      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
25635$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25636      has_space=`$ECHO "$complete" | $GREP " "`
25637      if test "x$has_space" != x; then
25638        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25639$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25640      fi
25641      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
25642$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
25643   { (exit 1); exit 1; }; }
25644    fi
25645  fi
25646
25647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25650  # "foo.exe" is OK but "foo" is an error.
25651  #
25652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25653  # It is also a way to make sure we got the proper file name for the real test later on.
25654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25655  if test "x$test_shortpath" = x; then
25656    # Short path failed, file does not exist as specified.
25657    # Try adding .exe or .cmd
25658    if test -f "${new_path}.exe"; then
25659       input_to_shortpath="${new_path}.exe"
25660    elif test -f "${new_path}.cmd"; then
25661       input_to_shortpath="${new_path}.cmd"
25662    else
25663      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25664$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25665      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25666$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25667      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
25668$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
25669   { (exit 1); exit 1; }; }
25670    fi
25671  else
25672    input_to_shortpath="$new_path"
25673  fi
25674
25675  # Call helper function which possibly converts this using DOS-style short mode.
25676  # If so, the updated path is stored in $new_path.
25677  new_path="$input_to_shortpath"
25678
25679  input_path="$input_to_shortpath"
25680  # Check if we need to convert this using DOS-style short mode. If the path
25681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25682  # take no chances and rewrite it.
25683  # Note: m4 eats our [], so we need to use [ and ] instead.
25684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25685  if test "x$has_forbidden_chars" != x; then
25686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25690      # Going to short mode and back again did indeed matter. Since short mode is
25691      # case insensitive, let's make it lowercase to improve readability.
25692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25693      # Now convert it back to Unix-stile (cygpath)
25694      input_path=`$CYGPATH -u "$shortmode_path"`
25695      new_path="$input_path"
25696    fi
25697  fi
25698
25699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25700  if test "x$test_cygdrive_prefix" = x; then
25701    # As a simple fix, exclude /usr/bin since it's not a real path.
25702    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25704      # a path prefixed by /cygdrive for fixpath to work.
25705      new_path="$CYGWIN_ROOT_PATH$input_path"
25706    fi
25707  fi
25708
25709  # remove trailing .exe if any
25710  new_path="${new_path/%.exe/}"
25711
25712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25713
25714  # First separate the path from the arguments. This will split at the first
25715  # space.
25716  complete="$NM"
25717  path="${complete%% *}"
25718  tmp="$complete EOL"
25719  arguments="${tmp#* }"
25720
25721  # Input might be given as Windows format, start by converting to
25722  # unix format.
25723  new_path="$path"
25724
25725  windows_path="$new_path"
25726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25727    unix_path=`$CYGPATH -u "$windows_path"`
25728    new_path="$unix_path"
25729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25731    new_path="$unix_path"
25732  fi
25733
25734
25735  # Now try to locate executable using which
25736  new_path=`$WHICH "$new_path" 2> /dev/null`
25737
25738  if test "x$new_path" = x; then
25739    # Oops. Which didn't find the executable.
25740    # The splitting of arguments from the executable at a space might have been incorrect,
25741    # since paths with space are more likely in Windows. Give it another try with the whole
25742    # argument.
25743    path="$complete"
25744    arguments="EOL"
25745    new_path="$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
25757    new_path=`$WHICH "$new_path" 2> /dev/null`
25758
25759    if test "x$new_path" = x; then
25760      # It's still not found. Now this is an unrecoverable error.
25761      { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
25762$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25763      has_space=`$ECHO "$complete" | $GREP " "`
25764      if test "x$has_space" != x; then
25765        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25767      fi
25768      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
25769$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
25770   { (exit 1); exit 1; }; }
25771    fi
25772  fi
25773
25774  # Now new_path has a complete unix path to the binary
25775  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25776    # Keep paths in /bin as-is, but remove trailing .exe if any
25777    new_path="${new_path/%.exe/}"
25778    # Do not save /bin paths to all_fixpath_prefixes!
25779  else
25780    # Not in mixed or Windows style, start by that.
25781    new_path=`cmd //c echo $new_path`
25782
25783  input_path="$new_path"
25784  # Check if we need to convert this using DOS-style short mode. If the path
25785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25786  # take no chances and rewrite it.
25787  # Note: m4 eats our [], so we need to use [ and ] instead.
25788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25789  if test "x$has_forbidden_chars" != x; then
25790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25792  fi
25793
25794    # Output is in $new_path
25795
25796  windows_path="$new_path"
25797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25798    unix_path=`$CYGPATH -u "$windows_path"`
25799    new_path="$unix_path"
25800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25802    new_path="$unix_path"
25803  fi
25804
25805    # remove trailing .exe if any
25806    new_path="${new_path/%.exe/}"
25807
25808    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25809    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25810  fi
25811
25812  else
25813    # We're on a posix platform. Hooray! :)
25814    # First separate the path from the arguments. This will split at the first
25815    # space.
25816    complete="$NM"
25817    path="${complete%% *}"
25818    tmp="$complete EOL"
25819    arguments="${tmp#* }"
25820
25821    new_path=`$WHICH $path 2> /dev/null`
25822    if test "x$new_path" = x; then
25823      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25824      if test "x$is_absolute_path" != x; then
25825        { $as_echo "$as_me:$LINENO: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
25826$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
25827        new_path="$path"
25828      else
25829        { $as_echo "$as_me:$LINENO: The path of NM, which resolves as \"$complete\", is not found." >&5
25830$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25831        has_space=`$ECHO "$complete" | $GREP " "`
25832        if test "x$has_space" != x; then
25833          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
25834$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25835        fi
25836        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of NM" >&5
25837$as_echo "$as_me: error: Cannot locate the the path of NM" >&2;}
25838   { (exit 1); exit 1; }; }
25839      fi
25840    fi
25841  fi
25842
25843  # Now join together the path and the arguments once again
25844  if test "x$arguments" != xEOL; then
25845      new_complete="$new_path ${arguments% *}"
25846  else
25847      new_complete="$new_path"
25848  fi
25849
25850  if test "x$complete" != "x$new_complete"; then
25851    NM="$new_complete"
25852    { $as_echo "$as_me:$LINENO: Rewriting NM to \"$new_complete\"" >&5
25853$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25854  fi
25855
25856    if test -n "$ac_tool_prefix"; then
25857  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25858set dummy ${ac_tool_prefix}strip; ac_word=$2
25859{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
25860$as_echo_n "checking for $ac_word... " >&6; }
25861if test "${ac_cv_prog_STRIP+set}" = set; then
25862  $as_echo_n "(cached) " >&6
25863else
25864  if test -n "$STRIP"; then
25865  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25866else
25867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25868for as_dir in $PATH
25869do
25870  IFS=$as_save_IFS
25871  test -z "$as_dir" && as_dir=.
25872  for ac_exec_ext in '' $ac_executable_extensions; do
25873  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25874    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25875    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25876    break 2
25877  fi
25878done
25879done
25880IFS=$as_save_IFS
25881
25882fi
25883fi
25884STRIP=$ac_cv_prog_STRIP
25885if test -n "$STRIP"; then
25886  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
25887$as_echo "$STRIP" >&6; }
25888else
25889  { $as_echo "$as_me:$LINENO: result: no" >&5
25890$as_echo "no" >&6; }
25891fi
25892
25893
25894fi
25895if test -z "$ac_cv_prog_STRIP"; then
25896  ac_ct_STRIP=$STRIP
25897  # Extract the first word of "strip", so it can be a program name with args.
25898set dummy strip; ac_word=$2
25899{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
25900$as_echo_n "checking for $ac_word... " >&6; }
25901if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
25902  $as_echo_n "(cached) " >&6
25903else
25904  if test -n "$ac_ct_STRIP"; then
25905  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25906else
25907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25908for as_dir in $PATH
25909do
25910  IFS=$as_save_IFS
25911  test -z "$as_dir" && as_dir=.
25912  for ac_exec_ext in '' $ac_executable_extensions; do
25913  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25914    ac_cv_prog_ac_ct_STRIP="strip"
25915    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25916    break 2
25917  fi
25918done
25919done
25920IFS=$as_save_IFS
25921
25922fi
25923fi
25924ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25925if test -n "$ac_ct_STRIP"; then
25926  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
25927$as_echo "$ac_ct_STRIP" >&6; }
25928else
25929  { $as_echo "$as_me:$LINENO: result: no" >&5
25930$as_echo "no" >&6; }
25931fi
25932
25933  if test "x$ac_ct_STRIP" = x; then
25934    STRIP=""
25935  else
25936    case $cross_compiling:$ac_tool_warned in
25937yes:)
25938{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
25939$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25940ac_tool_warned=yes ;;
25941esac
25942    STRIP=$ac_ct_STRIP
25943  fi
25944else
25945  STRIP="$ac_cv_prog_STRIP"
25946fi
25947
25948
25949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25950
25951  # First separate the path from the arguments. This will split at the first
25952  # space.
25953  complete="$STRIP"
25954  path="${complete%% *}"
25955  tmp="$complete EOL"
25956  arguments="${tmp#* }"
25957
25958  # Input might be given as Windows format, start by converting to
25959  # unix format.
25960  new_path=`$CYGPATH -u "$path"`
25961
25962  # Now try to locate executable using which
25963  new_path=`$WHICH "$new_path" 2> /dev/null`
25964  # bat and cmd files are not always considered executable in cygwin causing which
25965  # to not find them
25966  if test "x$new_path" = x \
25967           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25968           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25969    new_path=`$CYGPATH -u "$path"`
25970  fi
25971  if test "x$new_path" = x; then
25972    # Oops. Which didn't find the executable.
25973    # The splitting of arguments from the executable at a space might have been incorrect,
25974    # since paths with space are more likely in Windows. Give it another try with the whole
25975    # argument.
25976    path="$complete"
25977    arguments="EOL"
25978    new_path=`$CYGPATH -u "$path"`
25979    new_path=`$WHICH "$new_path" 2> /dev/null`
25980    # bat and cmd files are not always considered executable in cygwin causing which
25981    # to not find them
25982    if test "x$new_path" = x \
25983             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25984             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25985      new_path=`$CYGPATH -u "$path"`
25986    fi
25987    if test "x$new_path" = x; then
25988      # It's still not found. Now this is an unrecoverable error.
25989      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25990$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25991      has_space=`$ECHO "$complete" | $GREP " "`
25992      if test "x$has_space" != x; then
25993        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25994$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25995      fi
25996      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
25997$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
25998   { (exit 1); exit 1; }; }
25999    fi
26000  fi
26001
26002  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26003  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26004  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26005  # "foo.exe" is OK but "foo" is an error.
26006  #
26007  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26008  # It is also a way to make sure we got the proper file name for the real test later on.
26009  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26010  if test "x$test_shortpath" = x; then
26011    # Short path failed, file does not exist as specified.
26012    # Try adding .exe or .cmd
26013    if test -f "${new_path}.exe"; then
26014       input_to_shortpath="${new_path}.exe"
26015    elif test -f "${new_path}.cmd"; then
26016       input_to_shortpath="${new_path}.cmd"
26017    else
26018      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26019$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26020      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26021$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26022      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
26023$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
26024   { (exit 1); exit 1; }; }
26025    fi
26026  else
26027    input_to_shortpath="$new_path"
26028  fi
26029
26030  # Call helper function which possibly converts this using DOS-style short mode.
26031  # If so, the updated path is stored in $new_path.
26032  new_path="$input_to_shortpath"
26033
26034  input_path="$input_to_shortpath"
26035  # Check if we need to convert this using DOS-style short mode. If the path
26036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26037  # take no chances and rewrite it.
26038  # Note: m4 eats our [], so we need to use [ and ] instead.
26039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26040  if test "x$has_forbidden_chars" != x; then
26041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26045      # Going to short mode and back again did indeed matter. Since short mode is
26046      # case insensitive, let's make it lowercase to improve readability.
26047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26048      # Now convert it back to Unix-stile (cygpath)
26049      input_path=`$CYGPATH -u "$shortmode_path"`
26050      new_path="$input_path"
26051    fi
26052  fi
26053
26054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26055  if test "x$test_cygdrive_prefix" = x; then
26056    # As a simple fix, exclude /usr/bin since it's not a real path.
26057    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26059      # a path prefixed by /cygdrive for fixpath to work.
26060      new_path="$CYGWIN_ROOT_PATH$input_path"
26061    fi
26062  fi
26063
26064  # remove trailing .exe if any
26065  new_path="${new_path/%.exe/}"
26066
26067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26068
26069  # First separate the path from the arguments. This will split at the first
26070  # space.
26071  complete="$STRIP"
26072  path="${complete%% *}"
26073  tmp="$complete EOL"
26074  arguments="${tmp#* }"
26075
26076  # Input might be given as Windows format, start by converting to
26077  # unix format.
26078  new_path="$path"
26079
26080  windows_path="$new_path"
26081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26082    unix_path=`$CYGPATH -u "$windows_path"`
26083    new_path="$unix_path"
26084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26086    new_path="$unix_path"
26087  fi
26088
26089
26090  # Now try to locate executable using which
26091  new_path=`$WHICH "$new_path" 2> /dev/null`
26092
26093  if test "x$new_path" = x; then
26094    # Oops. Which didn't find the executable.
26095    # The splitting of arguments from the executable at a space might have been incorrect,
26096    # since paths with space are more likely in Windows. Give it another try with the whole
26097    # argument.
26098    path="$complete"
26099    arguments="EOL"
26100    new_path="$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
26112    new_path=`$WHICH "$new_path" 2> /dev/null`
26113
26114    if test "x$new_path" = x; then
26115      # It's still not found. Now this is an unrecoverable error.
26116      { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26117$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26118      has_space=`$ECHO "$complete" | $GREP " "`
26119      if test "x$has_space" != x; then
26120        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26121$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26122      fi
26123      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
26124$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
26125   { (exit 1); exit 1; }; }
26126    fi
26127  fi
26128
26129  # Now new_path has a complete unix path to the binary
26130  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26131    # Keep paths in /bin as-is, but remove trailing .exe if any
26132    new_path="${new_path/%.exe/}"
26133    # Do not save /bin paths to all_fixpath_prefixes!
26134  else
26135    # Not in mixed or Windows style, start by that.
26136    new_path=`cmd //c echo $new_path`
26137
26138  input_path="$new_path"
26139  # Check if we need to convert this using DOS-style short mode. If the path
26140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26141  # take no chances and rewrite it.
26142  # Note: m4 eats our [], so we need to use [ and ] instead.
26143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26144  if test "x$has_forbidden_chars" != x; then
26145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26147  fi
26148
26149    # Output is in $new_path
26150
26151  windows_path="$new_path"
26152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26153    unix_path=`$CYGPATH -u "$windows_path"`
26154    new_path="$unix_path"
26155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26157    new_path="$unix_path"
26158  fi
26159
26160    # remove trailing .exe if any
26161    new_path="${new_path/%.exe/}"
26162
26163    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26164    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26165  fi
26166
26167  else
26168    # We're on a posix platform. Hooray! :)
26169    # First separate the path from the arguments. This will split at the first
26170    # space.
26171    complete="$STRIP"
26172    path="${complete%% *}"
26173    tmp="$complete EOL"
26174    arguments="${tmp#* }"
26175
26176    new_path=`$WHICH $path 2> /dev/null`
26177    if test "x$new_path" = x; then
26178      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26179      if test "x$is_absolute_path" != x; then
26180        { $as_echo "$as_me:$LINENO: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
26181$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
26182        new_path="$path"
26183      else
26184        { $as_echo "$as_me:$LINENO: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26185$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26186        has_space=`$ECHO "$complete" | $GREP " "`
26187        if test "x$has_space" != x; then
26188          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
26189$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26190        fi
26191        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of STRIP" >&5
26192$as_echo "$as_me: error: Cannot locate the the path of STRIP" >&2;}
26193   { (exit 1); exit 1; }; }
26194      fi
26195    fi
26196  fi
26197
26198  # Now join together the path and the arguments once again
26199  if test "x$arguments" != xEOL; then
26200      new_complete="$new_path ${arguments% *}"
26201  else
26202      new_complete="$new_path"
26203  fi
26204
26205  if test "x$complete" != "x$new_complete"; then
26206    STRIP="$new_complete"
26207    { $as_echo "$as_me:$LINENO: Rewriting STRIP to \"$new_complete\"" >&5
26208$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26209  fi
26210
26211fi
26212
26213# objcopy is used for moving debug symbols to separate files when
26214# full debug symbols are enabled.
26215if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26216    if test -n "$ac_tool_prefix"; then
26217  for ac_prog in gobjcopy objcopy
26218  do
26219    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26220set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26221{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26222$as_echo_n "checking for $ac_word... " >&6; }
26223if test "${ac_cv_prog_OBJCOPY+set}" = set; then
26224  $as_echo_n "(cached) " >&6
26225else
26226  if test -n "$OBJCOPY"; then
26227  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26228else
26229as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26230for as_dir in $PATH
26231do
26232  IFS=$as_save_IFS
26233  test -z "$as_dir" && as_dir=.
26234  for ac_exec_ext in '' $ac_executable_extensions; do
26235  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26236    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26237    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26238    break 2
26239  fi
26240done
26241done
26242IFS=$as_save_IFS
26243
26244fi
26245fi
26246OBJCOPY=$ac_cv_prog_OBJCOPY
26247if test -n "$OBJCOPY"; then
26248  { $as_echo "$as_me:$LINENO: result: $OBJCOPY" >&5
26249$as_echo "$OBJCOPY" >&6; }
26250else
26251  { $as_echo "$as_me:$LINENO: result: no" >&5
26252$as_echo "no" >&6; }
26253fi
26254
26255
26256    test -n "$OBJCOPY" && break
26257  done
26258fi
26259if test -z "$OBJCOPY"; then
26260  ac_ct_OBJCOPY=$OBJCOPY
26261  for ac_prog in gobjcopy objcopy
26262do
26263  # Extract the first word of "$ac_prog", so it can be a program name with args.
26264set dummy $ac_prog; ac_word=$2
26265{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26266$as_echo_n "checking for $ac_word... " >&6; }
26267if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then
26268  $as_echo_n "(cached) " >&6
26269else
26270  if test -n "$ac_ct_OBJCOPY"; then
26271  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26272else
26273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26274for as_dir in $PATH
26275do
26276  IFS=$as_save_IFS
26277  test -z "$as_dir" && as_dir=.
26278  for ac_exec_ext in '' $ac_executable_extensions; do
26279  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26280    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26281    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26282    break 2
26283  fi
26284done
26285done
26286IFS=$as_save_IFS
26287
26288fi
26289fi
26290ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26291if test -n "$ac_ct_OBJCOPY"; then
26292  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJCOPY" >&5
26293$as_echo "$ac_ct_OBJCOPY" >&6; }
26294else
26295  { $as_echo "$as_me:$LINENO: result: no" >&5
26296$as_echo "no" >&6; }
26297fi
26298
26299
26300  test -n "$ac_ct_OBJCOPY" && break
26301done
26302
26303  if test "x$ac_ct_OBJCOPY" = x; then
26304    OBJCOPY=""
26305  else
26306    case $cross_compiling:$ac_tool_warned in
26307yes:)
26308{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
26309$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26310ac_tool_warned=yes ;;
26311esac
26312    OBJCOPY=$ac_ct_OBJCOPY
26313  fi
26314fi
26315
26316
26317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26318
26319  # First separate the path from the arguments. This will split at the first
26320  # space.
26321  complete="$OBJCOPY"
26322  path="${complete%% *}"
26323  tmp="$complete EOL"
26324  arguments="${tmp#* }"
26325
26326  # Input might be given as Windows format, start by converting to
26327  # unix format.
26328  new_path=`$CYGPATH -u "$path"`
26329
26330  # Now try to locate executable using which
26331  new_path=`$WHICH "$new_path" 2> /dev/null`
26332  # bat and cmd files are not always considered executable in cygwin causing which
26333  # to not find them
26334  if test "x$new_path" = x \
26335           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26336           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26337    new_path=`$CYGPATH -u "$path"`
26338  fi
26339  if test "x$new_path" = x; then
26340    # Oops. Which didn't find the executable.
26341    # The splitting of arguments from the executable at a space might have been incorrect,
26342    # since paths with space are more likely in Windows. Give it another try with the whole
26343    # argument.
26344    path="$complete"
26345    arguments="EOL"
26346    new_path=`$CYGPATH -u "$path"`
26347    new_path=`$WHICH "$new_path" 2> /dev/null`
26348    # bat and cmd files are not always considered executable in cygwin causing which
26349    # to not find them
26350    if test "x$new_path" = x \
26351             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26352             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26353      new_path=`$CYGPATH -u "$path"`
26354    fi
26355    if test "x$new_path" = x; then
26356      # It's still not found. Now this is an unrecoverable error.
26357      { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26358$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26359      has_space=`$ECHO "$complete" | $GREP " "`
26360      if test "x$has_space" != x; then
26361        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26363      fi
26364      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26365$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26366   { (exit 1); exit 1; }; }
26367    fi
26368  fi
26369
26370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26373  # "foo.exe" is OK but "foo" is an error.
26374  #
26375  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26376  # It is also a way to make sure we got the proper file name for the real test later on.
26377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26378  if test "x$test_shortpath" = x; then
26379    # Short path failed, file does not exist as specified.
26380    # Try adding .exe or .cmd
26381    if test -f "${new_path}.exe"; then
26382       input_to_shortpath="${new_path}.exe"
26383    elif test -f "${new_path}.cmd"; then
26384       input_to_shortpath="${new_path}.cmd"
26385    else
26386      { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26387$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26388      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26389$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26390      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26391$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26392   { (exit 1); exit 1; }; }
26393    fi
26394  else
26395    input_to_shortpath="$new_path"
26396  fi
26397
26398  # Call helper function which possibly converts this using DOS-style short mode.
26399  # If so, the updated path is stored in $new_path.
26400  new_path="$input_to_shortpath"
26401
26402  input_path="$input_to_shortpath"
26403  # Check if we need to convert this using DOS-style short mode. If the path
26404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26405  # take no chances and rewrite it.
26406  # Note: m4 eats our [], so we need to use [ and ] instead.
26407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26408  if test "x$has_forbidden_chars" != x; then
26409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26410    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26411    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26412    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26413      # Going to short mode and back again did indeed matter. Since short mode is
26414      # case insensitive, let's make it lowercase to improve readability.
26415      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26416      # Now convert it back to Unix-stile (cygpath)
26417      input_path=`$CYGPATH -u "$shortmode_path"`
26418      new_path="$input_path"
26419    fi
26420  fi
26421
26422  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26423  if test "x$test_cygdrive_prefix" = x; then
26424    # As a simple fix, exclude /usr/bin since it's not a real path.
26425    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26426      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26427      # a path prefixed by /cygdrive for fixpath to work.
26428      new_path="$CYGWIN_ROOT_PATH$input_path"
26429    fi
26430  fi
26431
26432  # remove trailing .exe if any
26433  new_path="${new_path/%.exe/}"
26434
26435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26436
26437  # First separate the path from the arguments. This will split at the first
26438  # space.
26439  complete="$OBJCOPY"
26440  path="${complete%% *}"
26441  tmp="$complete EOL"
26442  arguments="${tmp#* }"
26443
26444  # Input might be given as Windows format, start by converting to
26445  # unix format.
26446  new_path="$path"
26447
26448  windows_path="$new_path"
26449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26450    unix_path=`$CYGPATH -u "$windows_path"`
26451    new_path="$unix_path"
26452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26454    new_path="$unix_path"
26455  fi
26456
26457
26458  # Now try to locate executable using which
26459  new_path=`$WHICH "$new_path" 2> /dev/null`
26460
26461  if test "x$new_path" = x; then
26462    # Oops. Which didn't find the executable.
26463    # The splitting of arguments from the executable at a space might have been incorrect,
26464    # since paths with space are more likely in Windows. Give it another try with the whole
26465    # argument.
26466    path="$complete"
26467    arguments="EOL"
26468    new_path="$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
26480    new_path=`$WHICH "$new_path" 2> /dev/null`
26481
26482    if test "x$new_path" = x; then
26483      # It's still not found. Now this is an unrecoverable error.
26484      { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26485$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26486      has_space=`$ECHO "$complete" | $GREP " "`
26487      if test "x$has_space" != x; then
26488        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26489$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26490      fi
26491      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26492$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26493   { (exit 1); exit 1; }; }
26494    fi
26495  fi
26496
26497  # Now new_path has a complete unix path to the binary
26498  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26499    # Keep paths in /bin as-is, but remove trailing .exe if any
26500    new_path="${new_path/%.exe/}"
26501    # Do not save /bin paths to all_fixpath_prefixes!
26502  else
26503    # Not in mixed or Windows style, start by that.
26504    new_path=`cmd //c echo $new_path`
26505
26506  input_path="$new_path"
26507  # Check if we need to convert this using DOS-style short mode. If the path
26508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26509  # take no chances and rewrite it.
26510  # Note: m4 eats our [], so we need to use [ and ] instead.
26511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26512  if test "x$has_forbidden_chars" != x; then
26513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26515  fi
26516
26517    # Output is in $new_path
26518
26519  windows_path="$new_path"
26520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26521    unix_path=`$CYGPATH -u "$windows_path"`
26522    new_path="$unix_path"
26523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26525    new_path="$unix_path"
26526  fi
26527
26528    # remove trailing .exe if any
26529    new_path="${new_path/%.exe/}"
26530
26531    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26532    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26533  fi
26534
26535  else
26536    # We're on a posix platform. Hooray! :)
26537    # First separate the path from the arguments. This will split at the first
26538    # space.
26539    complete="$OBJCOPY"
26540    path="${complete%% *}"
26541    tmp="$complete EOL"
26542    arguments="${tmp#* }"
26543
26544    new_path=`$WHICH $path 2> /dev/null`
26545    if test "x$new_path" = x; then
26546      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26547      if test "x$is_absolute_path" != x; then
26548        { $as_echo "$as_me:$LINENO: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5
26549$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;}
26550        new_path="$path"
26551      else
26552        { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26553$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26554        has_space=`$ECHO "$complete" | $GREP " "`
26555        if test "x$has_space" != x; then
26556          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
26557$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26558        fi
26559        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26560$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26561   { (exit 1); exit 1; }; }
26562      fi
26563    fi
26564  fi
26565
26566  # Now join together the path and the arguments once again
26567  if test "x$arguments" != xEOL; then
26568      new_complete="$new_path ${arguments% *}"
26569  else
26570      new_complete="$new_path"
26571  fi
26572
26573  if test "x$complete" != "x$new_complete"; then
26574    OBJCOPY="$new_complete"
26575    { $as_echo "$as_me:$LINENO: Rewriting OBJCOPY to \"$new_complete\"" >&5
26576$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26577  fi
26578
26579fi
26580
26581if test -n "$ac_tool_prefix"; then
26582  for ac_prog in gobjdump objdump
26583  do
26584    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26585set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26586{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26587$as_echo_n "checking for $ac_word... " >&6; }
26588if test "${ac_cv_prog_OBJDUMP+set}" = set; then
26589  $as_echo_n "(cached) " >&6
26590else
26591  if test -n "$OBJDUMP"; then
26592  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26593else
26594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26595for as_dir in $PATH
26596do
26597  IFS=$as_save_IFS
26598  test -z "$as_dir" && as_dir=.
26599  for ac_exec_ext in '' $ac_executable_extensions; do
26600  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26601    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26602    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26603    break 2
26604  fi
26605done
26606done
26607IFS=$as_save_IFS
26608
26609fi
26610fi
26611OBJDUMP=$ac_cv_prog_OBJDUMP
26612if test -n "$OBJDUMP"; then
26613  { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5
26614$as_echo "$OBJDUMP" >&6; }
26615else
26616  { $as_echo "$as_me:$LINENO: result: no" >&5
26617$as_echo "no" >&6; }
26618fi
26619
26620
26621    test -n "$OBJDUMP" && break
26622  done
26623fi
26624if test -z "$OBJDUMP"; then
26625  ac_ct_OBJDUMP=$OBJDUMP
26626  for ac_prog in gobjdump objdump
26627do
26628  # Extract the first word of "$ac_prog", so it can be a program name with args.
26629set dummy $ac_prog; ac_word=$2
26630{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26631$as_echo_n "checking for $ac_word... " >&6; }
26632if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
26633  $as_echo_n "(cached) " >&6
26634else
26635  if test -n "$ac_ct_OBJDUMP"; then
26636  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26637else
26638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26639for as_dir in $PATH
26640do
26641  IFS=$as_save_IFS
26642  test -z "$as_dir" && as_dir=.
26643  for ac_exec_ext in '' $ac_executable_extensions; do
26644  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26645    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26646    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26647    break 2
26648  fi
26649done
26650done
26651IFS=$as_save_IFS
26652
26653fi
26654fi
26655ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26656if test -n "$ac_ct_OBJDUMP"; then
26657  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
26658$as_echo "$ac_ct_OBJDUMP" >&6; }
26659else
26660  { $as_echo "$as_me:$LINENO: result: no" >&5
26661$as_echo "no" >&6; }
26662fi
26663
26664
26665  test -n "$ac_ct_OBJDUMP" && break
26666done
26667
26668  if test "x$ac_ct_OBJDUMP" = x; then
26669    OBJDUMP=""
26670  else
26671    case $cross_compiling:$ac_tool_warned in
26672yes:)
26673{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
26674$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26675ac_tool_warned=yes ;;
26676esac
26677    OBJDUMP=$ac_ct_OBJDUMP
26678  fi
26679fi
26680
26681if test "x$OBJDUMP" != x; then
26682  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26683
26684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26685
26686  # First separate the path from the arguments. This will split at the first
26687  # space.
26688  complete="$OBJDUMP"
26689  path="${complete%% *}"
26690  tmp="$complete EOL"
26691  arguments="${tmp#* }"
26692
26693  # Input might be given as Windows format, start by converting to
26694  # unix format.
26695  new_path=`$CYGPATH -u "$path"`
26696
26697  # Now try to locate executable using which
26698  new_path=`$WHICH "$new_path" 2> /dev/null`
26699  # bat and cmd files are not always considered executable in cygwin causing which
26700  # to not find them
26701  if test "x$new_path" = x \
26702           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26703           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26704    new_path=`$CYGPATH -u "$path"`
26705  fi
26706  if test "x$new_path" = x; then
26707    # Oops. Which didn't find the executable.
26708    # The splitting of arguments from the executable at a space might have been incorrect,
26709    # since paths with space are more likely in Windows. Give it another try with the whole
26710    # argument.
26711    path="$complete"
26712    arguments="EOL"
26713    new_path=`$CYGPATH -u "$path"`
26714    new_path=`$WHICH "$new_path" 2> /dev/null`
26715    # bat and cmd files are not always considered executable in cygwin causing which
26716    # to not find them
26717    if test "x$new_path" = x \
26718             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26719             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26720      new_path=`$CYGPATH -u "$path"`
26721    fi
26722    if test "x$new_path" = x; then
26723      # It's still not found. Now this is an unrecoverable error.
26724      { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26725$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26726      has_space=`$ECHO "$complete" | $GREP " "`
26727      if test "x$has_space" != x; then
26728        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26730      fi
26731      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26732$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26733   { (exit 1); exit 1; }; }
26734    fi
26735  fi
26736
26737  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26738  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26739  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26740  # "foo.exe" is OK but "foo" is an error.
26741  #
26742  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26743  # It is also a way to make sure we got the proper file name for the real test later on.
26744  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26745  if test "x$test_shortpath" = x; then
26746    # Short path failed, file does not exist as specified.
26747    # Try adding .exe or .cmd
26748    if test -f "${new_path}.exe"; then
26749       input_to_shortpath="${new_path}.exe"
26750    elif test -f "${new_path}.cmd"; then
26751       input_to_shortpath="${new_path}.cmd"
26752    else
26753      { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26754$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26755      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26756$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26757      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26758$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26759   { (exit 1); exit 1; }; }
26760    fi
26761  else
26762    input_to_shortpath="$new_path"
26763  fi
26764
26765  # Call helper function which possibly converts this using DOS-style short mode.
26766  # If so, the updated path is stored in $new_path.
26767  new_path="$input_to_shortpath"
26768
26769  input_path="$input_to_shortpath"
26770  # Check if we need to convert this using DOS-style short mode. If the path
26771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26772  # take no chances and rewrite it.
26773  # Note: m4 eats our [], so we need to use [ and ] instead.
26774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26775  if test "x$has_forbidden_chars" != x; then
26776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26780      # Going to short mode and back again did indeed matter. Since short mode is
26781      # case insensitive, let's make it lowercase to improve readability.
26782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26783      # Now convert it back to Unix-stile (cygpath)
26784      input_path=`$CYGPATH -u "$shortmode_path"`
26785      new_path="$input_path"
26786    fi
26787  fi
26788
26789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26790  if test "x$test_cygdrive_prefix" = x; then
26791    # As a simple fix, exclude /usr/bin since it's not a real path.
26792    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26794      # a path prefixed by /cygdrive for fixpath to work.
26795      new_path="$CYGWIN_ROOT_PATH$input_path"
26796    fi
26797  fi
26798
26799  # remove trailing .exe if any
26800  new_path="${new_path/%.exe/}"
26801
26802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26803
26804  # First separate the path from the arguments. This will split at the first
26805  # space.
26806  complete="$OBJDUMP"
26807  path="${complete%% *}"
26808  tmp="$complete EOL"
26809  arguments="${tmp#* }"
26810
26811  # Input might be given as Windows format, start by converting to
26812  # unix format.
26813  new_path="$path"
26814
26815  windows_path="$new_path"
26816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26817    unix_path=`$CYGPATH -u "$windows_path"`
26818    new_path="$unix_path"
26819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26821    new_path="$unix_path"
26822  fi
26823
26824
26825  # Now try to locate executable using which
26826  new_path=`$WHICH "$new_path" 2> /dev/null`
26827
26828  if test "x$new_path" = x; then
26829    # Oops. Which didn't find the executable.
26830    # The splitting of arguments from the executable at a space might have been incorrect,
26831    # since paths with space are more likely in Windows. Give it another try with the whole
26832    # argument.
26833    path="$complete"
26834    arguments="EOL"
26835    new_path="$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
26847    new_path=`$WHICH "$new_path" 2> /dev/null`
26848
26849    if test "x$new_path" = x; then
26850      # It's still not found. Now this is an unrecoverable error.
26851      { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26852$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26853      has_space=`$ECHO "$complete" | $GREP " "`
26854      if test "x$has_space" != x; then
26855        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26856$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26857      fi
26858      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26859$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26860   { (exit 1); exit 1; }; }
26861    fi
26862  fi
26863
26864  # Now new_path has a complete unix path to the binary
26865  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26866    # Keep paths in /bin as-is, but remove trailing .exe if any
26867    new_path="${new_path/%.exe/}"
26868    # Do not save /bin paths to all_fixpath_prefixes!
26869  else
26870    # Not in mixed or Windows style, start by that.
26871    new_path=`cmd //c echo $new_path`
26872
26873  input_path="$new_path"
26874  # Check if we need to convert this using DOS-style short mode. If the path
26875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26876  # take no chances and rewrite it.
26877  # Note: m4 eats our [], so we need to use [ and ] instead.
26878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26879  if test "x$has_forbidden_chars" != x; then
26880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26882  fi
26883
26884    # Output is in $new_path
26885
26886  windows_path="$new_path"
26887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26888    unix_path=`$CYGPATH -u "$windows_path"`
26889    new_path="$unix_path"
26890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26892    new_path="$unix_path"
26893  fi
26894
26895    # remove trailing .exe if any
26896    new_path="${new_path/%.exe/}"
26897
26898    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26899    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26900  fi
26901
26902  else
26903    # We're on a posix platform. Hooray! :)
26904    # First separate the path from the arguments. This will split at the first
26905    # space.
26906    complete="$OBJDUMP"
26907    path="${complete%% *}"
26908    tmp="$complete EOL"
26909    arguments="${tmp#* }"
26910
26911    new_path=`$WHICH $path 2> /dev/null`
26912    if test "x$new_path" = x; then
26913      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26914      if test "x$is_absolute_path" != x; then
26915        { $as_echo "$as_me:$LINENO: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5
26916$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;}
26917        new_path="$path"
26918      else
26919        { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26920$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26921        has_space=`$ECHO "$complete" | $GREP " "`
26922        if test "x$has_space" != x; then
26923          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
26924$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26925        fi
26926        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26927$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26928   { (exit 1); exit 1; }; }
26929      fi
26930    fi
26931  fi
26932
26933  # Now join together the path and the arguments once again
26934  if test "x$arguments" != xEOL; then
26935      new_complete="$new_path ${arguments% *}"
26936  else
26937      new_complete="$new_path"
26938  fi
26939
26940  if test "x$complete" != "x$new_complete"; then
26941    OBJDUMP="$new_complete"
26942    { $as_echo "$as_me:$LINENO: Rewriting OBJDUMP to \"$new_complete\"" >&5
26943$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26944  fi
26945
26946fi
26947
26948if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26949   # Extract the first word of "lipo", so it can be a program name with args.
26950set dummy lipo; ac_word=$2
26951{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26952$as_echo_n "checking for $ac_word... " >&6; }
26953if test "${ac_cv_path_LIPO+set}" = set; then
26954  $as_echo_n "(cached) " >&6
26955else
26956  case $LIPO in
26957  [\\/]* | ?:[\\/]*)
26958  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26959  ;;
26960  *)
26961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26962for as_dir in $PATH
26963do
26964  IFS=$as_save_IFS
26965  test -z "$as_dir" && as_dir=.
26966  for ac_exec_ext in '' $ac_executable_extensions; do
26967  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26968    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26969    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26970    break 2
26971  fi
26972done
26973done
26974IFS=$as_save_IFS
26975
26976  ;;
26977esac
26978fi
26979LIPO=$ac_cv_path_LIPO
26980if test -n "$LIPO"; then
26981  { $as_echo "$as_me:$LINENO: result: $LIPO" >&5
26982$as_echo "$LIPO" >&6; }
26983else
26984  { $as_echo "$as_me:$LINENO: result: no" >&5
26985$as_echo "no" >&6; }
26986fi
26987
26988
26989
26990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26991
26992  # First separate the path from the arguments. This will split at the first
26993  # space.
26994  complete="$LIPO"
26995  path="${complete%% *}"
26996  tmp="$complete EOL"
26997  arguments="${tmp#* }"
26998
26999  # Input might be given as Windows format, start by converting to
27000  # unix format.
27001  new_path=`$CYGPATH -u "$path"`
27002
27003  # Now try to locate executable using which
27004  new_path=`$WHICH "$new_path" 2> /dev/null`
27005  # bat and cmd files are not always considered executable in cygwin causing which
27006  # to not find them
27007  if test "x$new_path" = x \
27008           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27009           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27010    new_path=`$CYGPATH -u "$path"`
27011  fi
27012  if test "x$new_path" = x; then
27013    # Oops. Which didn't find the executable.
27014    # The splitting of arguments from the executable at a space might have been incorrect,
27015    # since paths with space are more likely in Windows. Give it another try with the whole
27016    # argument.
27017    path="$complete"
27018    arguments="EOL"
27019    new_path=`$CYGPATH -u "$path"`
27020    new_path=`$WHICH "$new_path" 2> /dev/null`
27021    # bat and cmd files are not always considered executable in cygwin causing which
27022    # to not find them
27023    if test "x$new_path" = x \
27024             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27025             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27026      new_path=`$CYGPATH -u "$path"`
27027    fi
27028    if test "x$new_path" = x; then
27029      # It's still not found. Now this is an unrecoverable error.
27030      { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27031$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27032      has_space=`$ECHO "$complete" | $GREP " "`
27033      if test "x$has_space" != x; then
27034        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27035$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27036      fi
27037      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
27038$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
27039   { (exit 1); exit 1; }; }
27040    fi
27041  fi
27042
27043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27046  # "foo.exe" is OK but "foo" is an error.
27047  #
27048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27049  # It is also a way to make sure we got the proper file name for the real test later on.
27050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27051  if test "x$test_shortpath" = x; then
27052    # Short path failed, file does not exist as specified.
27053    # Try adding .exe or .cmd
27054    if test -f "${new_path}.exe"; then
27055       input_to_shortpath="${new_path}.exe"
27056    elif test -f "${new_path}.cmd"; then
27057       input_to_shortpath="${new_path}.cmd"
27058    else
27059      { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27060$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27061      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27062$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27063      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
27064$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
27065   { (exit 1); exit 1; }; }
27066    fi
27067  else
27068    input_to_shortpath="$new_path"
27069  fi
27070
27071  # Call helper function which possibly converts this using DOS-style short mode.
27072  # If so, the updated path is stored in $new_path.
27073  new_path="$input_to_shortpath"
27074
27075  input_path="$input_to_shortpath"
27076  # Check if we need to convert this using DOS-style short mode. If the path
27077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27078  # take no chances and rewrite it.
27079  # Note: m4 eats our [], so we need to use [ and ] instead.
27080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27081  if test "x$has_forbidden_chars" != x; then
27082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27086      # Going to short mode and back again did indeed matter. Since short mode is
27087      # case insensitive, let's make it lowercase to improve readability.
27088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27089      # Now convert it back to Unix-stile (cygpath)
27090      input_path=`$CYGPATH -u "$shortmode_path"`
27091      new_path="$input_path"
27092    fi
27093  fi
27094
27095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27096  if test "x$test_cygdrive_prefix" = x; then
27097    # As a simple fix, exclude /usr/bin since it's not a real path.
27098    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27100      # a path prefixed by /cygdrive for fixpath to work.
27101      new_path="$CYGWIN_ROOT_PATH$input_path"
27102    fi
27103  fi
27104
27105  # remove trailing .exe if any
27106  new_path="${new_path/%.exe/}"
27107
27108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27109
27110  # First separate the path from the arguments. This will split at the first
27111  # space.
27112  complete="$LIPO"
27113  path="${complete%% *}"
27114  tmp="$complete EOL"
27115  arguments="${tmp#* }"
27116
27117  # Input might be given as Windows format, start by converting to
27118  # unix format.
27119  new_path="$path"
27120
27121  windows_path="$new_path"
27122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27123    unix_path=`$CYGPATH -u "$windows_path"`
27124    new_path="$unix_path"
27125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27127    new_path="$unix_path"
27128  fi
27129
27130
27131  # Now try to locate executable using which
27132  new_path=`$WHICH "$new_path" 2> /dev/null`
27133
27134  if test "x$new_path" = x; then
27135    # Oops. Which didn't find the executable.
27136    # The splitting of arguments from the executable at a space might have been incorrect,
27137    # since paths with space are more likely in Windows. Give it another try with the whole
27138    # argument.
27139    path="$complete"
27140    arguments="EOL"
27141    new_path="$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
27153    new_path=`$WHICH "$new_path" 2> /dev/null`
27154
27155    if test "x$new_path" = x; then
27156      # It's still not found. Now this is an unrecoverable error.
27157      { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27158$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27159      has_space=`$ECHO "$complete" | $GREP " "`
27160      if test "x$has_space" != x; then
27161        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27162$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27163      fi
27164      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
27165$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
27166   { (exit 1); exit 1; }; }
27167    fi
27168  fi
27169
27170  # Now new_path has a complete unix path to the binary
27171  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27172    # Keep paths in /bin as-is, but remove trailing .exe if any
27173    new_path="${new_path/%.exe/}"
27174    # Do not save /bin paths to all_fixpath_prefixes!
27175  else
27176    # Not in mixed or Windows style, start by that.
27177    new_path=`cmd //c echo $new_path`
27178
27179  input_path="$new_path"
27180  # Check if we need to convert this using DOS-style short mode. If the path
27181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27182  # take no chances and rewrite it.
27183  # Note: m4 eats our [], so we need to use [ and ] instead.
27184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27185  if test "x$has_forbidden_chars" != x; then
27186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27188  fi
27189
27190    # Output is in $new_path
27191
27192  windows_path="$new_path"
27193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27194    unix_path=`$CYGPATH -u "$windows_path"`
27195    new_path="$unix_path"
27196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27198    new_path="$unix_path"
27199  fi
27200
27201    # remove trailing .exe if any
27202    new_path="${new_path/%.exe/}"
27203
27204    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27205    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27206  fi
27207
27208  else
27209    # We're on a posix platform. Hooray! :)
27210    # First separate the path from the arguments. This will split at the first
27211    # space.
27212    complete="$LIPO"
27213    path="${complete%% *}"
27214    tmp="$complete EOL"
27215    arguments="${tmp#* }"
27216
27217    new_path=`$WHICH $path 2> /dev/null`
27218    if test "x$new_path" = x; then
27219      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27220      if test "x$is_absolute_path" != x; then
27221        { $as_echo "$as_me:$LINENO: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5
27222$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;}
27223        new_path="$path"
27224      else
27225        { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27226$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27227        has_space=`$ECHO "$complete" | $GREP " "`
27228        if test "x$has_space" != x; then
27229          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
27230$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27231        fi
27232        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
27233$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
27234   { (exit 1); exit 1; }; }
27235      fi
27236    fi
27237  fi
27238
27239  # Now join together the path and the arguments once again
27240  if test "x$arguments" != xEOL; then
27241      new_complete="$new_path ${arguments% *}"
27242  else
27243      new_complete="$new_path"
27244  fi
27245
27246  if test "x$complete" != "x$new_complete"; then
27247    LIPO="$new_complete"
27248    { $as_echo "$as_me:$LINENO: Rewriting LIPO to \"$new_complete\"" >&5
27249$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27250  fi
27251
27252fi
27253
27254# Restore old path without tools dir
27255PATH="$OLD_PATH"
27256
27257
27258# FIXME: Currently we must test this after paths but before flags. Fix!
27259
27260# And we can test some aspects on the target using configure macros.
27261
27262
27263{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
27264$as_echo_n "checking for ANSI C header files... " >&6; }
27265if test "${ac_cv_header_stdc+set}" = set; then
27266  $as_echo_n "(cached) " >&6
27267else
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 <stdlib.h>
27275#include <stdarg.h>
27276#include <string.h>
27277#include <float.h>
27278
27279int
27280main ()
27281{
27282
27283  ;
27284  return 0;
27285}
27286_ACEOF
27287rm -f conftest.$ac_objext
27288if { (ac_try="$ac_compile"
27289case "(($ac_try" in
27290  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27291  *) ac_try_echo=$ac_try;;
27292esac
27293eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27294$as_echo "$ac_try_echo") >&5
27295  (eval "$ac_compile") 2>conftest.er1
27296  ac_status=$?
27297  grep -v '^ *+' conftest.er1 >conftest.err
27298  rm -f conftest.er1
27299  cat conftest.err >&5
27300  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27301  (exit $ac_status); } && {
27302	 test -z "$ac_cxx_werror_flag" ||
27303	 test ! -s conftest.err
27304       } && test -s conftest.$ac_objext; then
27305  ac_cv_header_stdc=yes
27306else
27307  $as_echo "$as_me: failed program was:" >&5
27308sed 's/^/| /' conftest.$ac_ext >&5
27309
27310	ac_cv_header_stdc=no
27311fi
27312
27313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27314
27315if test $ac_cv_header_stdc = yes; then
27316  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27317  cat >conftest.$ac_ext <<_ACEOF
27318/* confdefs.h.  */
27319_ACEOF
27320cat confdefs.h >>conftest.$ac_ext
27321cat >>conftest.$ac_ext <<_ACEOF
27322/* end confdefs.h.  */
27323#include <string.h>
27324
27325_ACEOF
27326if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27327  $EGREP "memchr" >/dev/null 2>&1; then
27328  :
27329else
27330  ac_cv_header_stdc=no
27331fi
27332rm -f conftest*
27333
27334fi
27335
27336if test $ac_cv_header_stdc = yes; then
27337  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27338  cat >conftest.$ac_ext <<_ACEOF
27339/* confdefs.h.  */
27340_ACEOF
27341cat confdefs.h >>conftest.$ac_ext
27342cat >>conftest.$ac_ext <<_ACEOF
27343/* end confdefs.h.  */
27344#include <stdlib.h>
27345
27346_ACEOF
27347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27348  $EGREP "free" >/dev/null 2>&1; then
27349  :
27350else
27351  ac_cv_header_stdc=no
27352fi
27353rm -f conftest*
27354
27355fi
27356
27357if test $ac_cv_header_stdc = yes; then
27358  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27359  if test "$cross_compiling" = yes; then
27360  :
27361else
27362  cat >conftest.$ac_ext <<_ACEOF
27363/* confdefs.h.  */
27364_ACEOF
27365cat confdefs.h >>conftest.$ac_ext
27366cat >>conftest.$ac_ext <<_ACEOF
27367/* end confdefs.h.  */
27368#include <ctype.h>
27369#include <stdlib.h>
27370#if ((' ' & 0x0FF) == 0x020)
27371# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27372# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27373#else
27374# define ISLOWER(c) \
27375		   (('a' <= (c) && (c) <= 'i') \
27376		     || ('j' <= (c) && (c) <= 'r') \
27377		     || ('s' <= (c) && (c) <= 'z'))
27378# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27379#endif
27380
27381#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27382int
27383main ()
27384{
27385  int i;
27386  for (i = 0; i < 256; i++)
27387    if (XOR (islower (i), ISLOWER (i))
27388	|| toupper (i) != TOUPPER (i))
27389      return 2;
27390  return 0;
27391}
27392_ACEOF
27393rm -f conftest$ac_exeext
27394if { (ac_try="$ac_link"
27395case "(($ac_try" in
27396  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27397  *) ac_try_echo=$ac_try;;
27398esac
27399eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27400$as_echo "$ac_try_echo") >&5
27401  (eval "$ac_link") 2>&5
27402  ac_status=$?
27403  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27404  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27405  { (case "(($ac_try" in
27406  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27407  *) ac_try_echo=$ac_try;;
27408esac
27409eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27410$as_echo "$ac_try_echo") >&5
27411  (eval "$ac_try") 2>&5
27412  ac_status=$?
27413  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27414  (exit $ac_status); }; }; then
27415  :
27416else
27417  $as_echo "$as_me: program exited with status $ac_status" >&5
27418$as_echo "$as_me: failed program was:" >&5
27419sed 's/^/| /' conftest.$ac_ext >&5
27420
27421( exit $ac_status )
27422ac_cv_header_stdc=no
27423fi
27424rm -rf conftest.dSYM
27425rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27426fi
27427
27428
27429fi
27430fi
27431{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
27432$as_echo "$ac_cv_header_stdc" >&6; }
27433if test $ac_cv_header_stdc = yes; then
27434
27435cat >>confdefs.h <<\_ACEOF
27436#define STDC_HEADERS 1
27437_ACEOF
27438
27439fi
27440
27441# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27442
27443
27444
27445
27446
27447
27448
27449
27450
27451for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27452		  inttypes.h stdint.h unistd.h
27453do
27454as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27455{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
27456$as_echo_n "checking for $ac_header... " >&6; }
27457if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27458  $as_echo_n "(cached) " >&6
27459else
27460  cat >conftest.$ac_ext <<_ACEOF
27461/* confdefs.h.  */
27462_ACEOF
27463cat confdefs.h >>conftest.$ac_ext
27464cat >>conftest.$ac_ext <<_ACEOF
27465/* end confdefs.h.  */
27466$ac_includes_default
27467
27468#include <$ac_header>
27469_ACEOF
27470rm -f conftest.$ac_objext
27471if { (ac_try="$ac_compile"
27472case "(($ac_try" in
27473  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27474  *) ac_try_echo=$ac_try;;
27475esac
27476eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27477$as_echo "$ac_try_echo") >&5
27478  (eval "$ac_compile") 2>conftest.er1
27479  ac_status=$?
27480  grep -v '^ *+' conftest.er1 >conftest.err
27481  rm -f conftest.er1
27482  cat conftest.err >&5
27483  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27484  (exit $ac_status); } && {
27485	 test -z "$ac_cxx_werror_flag" ||
27486	 test ! -s conftest.err
27487       } && test -s conftest.$ac_objext; then
27488  eval "$as_ac_Header=yes"
27489else
27490  $as_echo "$as_me: failed program was:" >&5
27491sed 's/^/| /' conftest.$ac_ext >&5
27492
27493	eval "$as_ac_Header=no"
27494fi
27495
27496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27497fi
27498ac_res=`eval 'as_val=${'$as_ac_Header'}
27499		 $as_echo "$as_val"'`
27500	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
27501$as_echo "$ac_res" >&6; }
27502as_val=`eval 'as_val=${'$as_ac_Header'}
27503		 $as_echo "$as_val"'`
27504   if test "x$as_val" = x""yes; then
27505  cat >>confdefs.h <<_ACEOF
27506#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27507_ACEOF
27508
27509fi
27510
27511done
27512
27513
27514
27515###############################################################################
27516#
27517# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27518# (The JVM can use 32 or 64 bit Java pointers but that decision
27519# is made at runtime.)
27520#
27521if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27522  # Always specify -m flags on Solaris
27523
27524  # keep track of c/cxx flags that we added outselves...
27525  #   to prevent emitting warning...
27526  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27527  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27528  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27529
27530  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27531  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27532  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27533
27534  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27535  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27536  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27537
27538elif test "x$COMPILE_TYPE" = xreduced; then
27539  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27540    # Specify -m if running reduced on other Posix platforms
27541
27542  # keep track of c/cxx flags that we added outselves...
27543  #   to prevent emitting warning...
27544  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27545  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27546  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27547
27548  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27549  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27550  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27551
27552  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27553  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27554  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27555
27556  fi
27557fi
27558
27559# Make compilation sanity check
27560
27561for ac_header in stdio.h
27562do
27563as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27564if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27565  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
27566$as_echo_n "checking for $ac_header... " >&6; }
27567if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27568  $as_echo_n "(cached) " >&6
27569fi
27570ac_res=`eval 'as_val=${'$as_ac_Header'}
27571		 $as_echo "$as_val"'`
27572	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
27573$as_echo "$ac_res" >&6; }
27574else
27575  # Is the header compilable?
27576{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
27577$as_echo_n "checking $ac_header usability... " >&6; }
27578cat >conftest.$ac_ext <<_ACEOF
27579/* confdefs.h.  */
27580_ACEOF
27581cat confdefs.h >>conftest.$ac_ext
27582cat >>conftest.$ac_ext <<_ACEOF
27583/* end confdefs.h.  */
27584$ac_includes_default
27585#include <$ac_header>
27586_ACEOF
27587rm -f conftest.$ac_objext
27588if { (ac_try="$ac_compile"
27589case "(($ac_try" in
27590  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27591  *) ac_try_echo=$ac_try;;
27592esac
27593eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27594$as_echo "$ac_try_echo") >&5
27595  (eval "$ac_compile") 2>conftest.er1
27596  ac_status=$?
27597  grep -v '^ *+' conftest.er1 >conftest.err
27598  rm -f conftest.er1
27599  cat conftest.err >&5
27600  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27601  (exit $ac_status); } && {
27602	 test -z "$ac_cxx_werror_flag" ||
27603	 test ! -s conftest.err
27604       } && test -s conftest.$ac_objext; then
27605  ac_header_compiler=yes
27606else
27607  $as_echo "$as_me: failed program was:" >&5
27608sed 's/^/| /' conftest.$ac_ext >&5
27609
27610	ac_header_compiler=no
27611fi
27612
27613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27614{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27615$as_echo "$ac_header_compiler" >&6; }
27616
27617# Is the header present?
27618{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
27619$as_echo_n "checking $ac_header presence... " >&6; }
27620cat >conftest.$ac_ext <<_ACEOF
27621/* confdefs.h.  */
27622_ACEOF
27623cat confdefs.h >>conftest.$ac_ext
27624cat >>conftest.$ac_ext <<_ACEOF
27625/* end confdefs.h.  */
27626#include <$ac_header>
27627_ACEOF
27628if { (ac_try="$ac_cpp conftest.$ac_ext"
27629case "(($ac_try" in
27630  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27631  *) ac_try_echo=$ac_try;;
27632esac
27633eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27634$as_echo "$ac_try_echo") >&5
27635  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
27636  ac_status=$?
27637  grep -v '^ *+' conftest.er1 >conftest.err
27638  rm -f conftest.er1
27639  cat conftest.err >&5
27640  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27641  (exit $ac_status); } >/dev/null && {
27642	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
27643	 test ! -s conftest.err
27644       }; then
27645  ac_header_preproc=yes
27646else
27647  $as_echo "$as_me: failed program was:" >&5
27648sed 's/^/| /' conftest.$ac_ext >&5
27649
27650  ac_header_preproc=no
27651fi
27652
27653rm -f conftest.err conftest.$ac_ext
27654{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27655$as_echo "$ac_header_preproc" >&6; }
27656
27657# So?  What about this header?
27658case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
27659  yes:no: )
27660    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27661$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27662    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27663$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27664    ac_header_preproc=yes
27665    ;;
27666  no:yes:* )
27667    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27668$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27669    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27670$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27671    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27672$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27673    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27674$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27675    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27676$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27677    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27678$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27679    ( cat <<\_ASBOX
27680## ----------------------------------------- ##
27681## Report this to build-dev@openjdk.java.net ##
27682## ----------------------------------------- ##
27683_ASBOX
27684     ) | sed "s/^/$as_me: WARNING:     /" >&2
27685    ;;
27686esac
27687{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
27688$as_echo_n "checking for $ac_header... " >&6; }
27689if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27690  $as_echo_n "(cached) " >&6
27691else
27692  eval "$as_ac_Header=\$ac_header_preproc"
27693fi
27694ac_res=`eval 'as_val=${'$as_ac_Header'}
27695		 $as_echo "$as_val"'`
27696	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
27697$as_echo "$ac_res" >&6; }
27698
27699fi
27700as_val=`eval 'as_val=${'$as_ac_Header'}
27701		 $as_echo "$as_val"'`
27702   if test "x$as_val" = x""yes; then
27703  cat >>confdefs.h <<_ACEOF
27704#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27705_ACEOF
27706
27707else
27708
27709  { $as_echo "$as_me:$LINENO: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27710$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27711  if test "x$COMPILE_TYPE" = xreduced; then
27712    { $as_echo "$as_me:$LINENO: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27713$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27714  elif test "x$COMPILE_TYPE" = xcross; then
27715    { $as_echo "$as_me:$LINENO: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27716$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27717  fi
27718  { { $as_echo "$as_me:$LINENO: error: Cannot continue." >&5
27719$as_echo "$as_me: error: Cannot continue." >&2;}
27720   { (exit 1); exit 1; }; }
27721
27722fi
27723
27724done
27725
27726
27727# The cast to long int works around a bug in the HP C Compiler
27728# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27729# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27730# This bug is HP SR number 8606223364.
27731{ $as_echo "$as_me:$LINENO: checking size of int *" >&5
27732$as_echo_n "checking size of int *... " >&6; }
27733if test "${ac_cv_sizeof_int_p+set}" = set; then
27734  $as_echo_n "(cached) " >&6
27735else
27736  if test "$cross_compiling" = yes; then
27737  # Depending upon the size, compute the lo and hi bounds.
27738cat >conftest.$ac_ext <<_ACEOF
27739/* confdefs.h.  */
27740_ACEOF
27741cat confdefs.h >>conftest.$ac_ext
27742cat >>conftest.$ac_ext <<_ACEOF
27743/* end confdefs.h.  */
27744$ac_includes_default
27745int
27746main ()
27747{
27748static int test_array [1 - 2 * !(((long int) (sizeof (int *))) >= 0)];
27749test_array [0] = 0
27750
27751  ;
27752  return 0;
27753}
27754_ACEOF
27755rm -f conftest.$ac_objext
27756if { (ac_try="$ac_compile"
27757case "(($ac_try" in
27758  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27759  *) ac_try_echo=$ac_try;;
27760esac
27761eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27762$as_echo "$ac_try_echo") >&5
27763  (eval "$ac_compile") 2>conftest.er1
27764  ac_status=$?
27765  grep -v '^ *+' conftest.er1 >conftest.err
27766  rm -f conftest.er1
27767  cat conftest.err >&5
27768  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27769  (exit $ac_status); } && {
27770	 test -z "$ac_cxx_werror_flag" ||
27771	 test ! -s conftest.err
27772       } && test -s conftest.$ac_objext; then
27773  ac_lo=0 ac_mid=0
27774  while :; do
27775    cat >conftest.$ac_ext <<_ACEOF
27776/* confdefs.h.  */
27777_ACEOF
27778cat confdefs.h >>conftest.$ac_ext
27779cat >>conftest.$ac_ext <<_ACEOF
27780/* end confdefs.h.  */
27781$ac_includes_default
27782int
27783main ()
27784{
27785static int test_array [1 - 2 * !(((long int) (sizeof (int *))) <= $ac_mid)];
27786test_array [0] = 0
27787
27788  ;
27789  return 0;
27790}
27791_ACEOF
27792rm -f conftest.$ac_objext
27793if { (ac_try="$ac_compile"
27794case "(($ac_try" in
27795  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27796  *) ac_try_echo=$ac_try;;
27797esac
27798eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27799$as_echo "$ac_try_echo") >&5
27800  (eval "$ac_compile") 2>conftest.er1
27801  ac_status=$?
27802  grep -v '^ *+' conftest.er1 >conftest.err
27803  rm -f conftest.er1
27804  cat conftest.err >&5
27805  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27806  (exit $ac_status); } && {
27807	 test -z "$ac_cxx_werror_flag" ||
27808	 test ! -s conftest.err
27809       } && test -s conftest.$ac_objext; then
27810  ac_hi=$ac_mid; break
27811else
27812  $as_echo "$as_me: failed program was:" >&5
27813sed 's/^/| /' conftest.$ac_ext >&5
27814
27815	ac_lo=`expr $ac_mid + 1`
27816			if test $ac_lo -le $ac_mid; then
27817			  ac_lo= ac_hi=
27818			  break
27819			fi
27820			ac_mid=`expr 2 '*' $ac_mid + 1`
27821fi
27822
27823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27824  done
27825else
27826  $as_echo "$as_me: failed program was:" >&5
27827sed 's/^/| /' conftest.$ac_ext >&5
27828
27829	cat >conftest.$ac_ext <<_ACEOF
27830/* confdefs.h.  */
27831_ACEOF
27832cat confdefs.h >>conftest.$ac_ext
27833cat >>conftest.$ac_ext <<_ACEOF
27834/* end confdefs.h.  */
27835$ac_includes_default
27836int
27837main ()
27838{
27839static int test_array [1 - 2 * !(((long int) (sizeof (int *))) < 0)];
27840test_array [0] = 0
27841
27842  ;
27843  return 0;
27844}
27845_ACEOF
27846rm -f conftest.$ac_objext
27847if { (ac_try="$ac_compile"
27848case "(($ac_try" in
27849  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27850  *) ac_try_echo=$ac_try;;
27851esac
27852eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27853$as_echo "$ac_try_echo") >&5
27854  (eval "$ac_compile") 2>conftest.er1
27855  ac_status=$?
27856  grep -v '^ *+' conftest.er1 >conftest.err
27857  rm -f conftest.er1
27858  cat conftest.err >&5
27859  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27860  (exit $ac_status); } && {
27861	 test -z "$ac_cxx_werror_flag" ||
27862	 test ! -s conftest.err
27863       } && test -s conftest.$ac_objext; then
27864  ac_hi=-1 ac_mid=-1
27865  while :; do
27866    cat >conftest.$ac_ext <<_ACEOF
27867/* confdefs.h.  */
27868_ACEOF
27869cat confdefs.h >>conftest.$ac_ext
27870cat >>conftest.$ac_ext <<_ACEOF
27871/* end confdefs.h.  */
27872$ac_includes_default
27873int
27874main ()
27875{
27876static int test_array [1 - 2 * !(((long int) (sizeof (int *))) >= $ac_mid)];
27877test_array [0] = 0
27878
27879  ;
27880  return 0;
27881}
27882_ACEOF
27883rm -f conftest.$ac_objext
27884if { (ac_try="$ac_compile"
27885case "(($ac_try" in
27886  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27887  *) ac_try_echo=$ac_try;;
27888esac
27889eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27890$as_echo "$ac_try_echo") >&5
27891  (eval "$ac_compile") 2>conftest.er1
27892  ac_status=$?
27893  grep -v '^ *+' conftest.er1 >conftest.err
27894  rm -f conftest.er1
27895  cat conftest.err >&5
27896  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27897  (exit $ac_status); } && {
27898	 test -z "$ac_cxx_werror_flag" ||
27899	 test ! -s conftest.err
27900       } && test -s conftest.$ac_objext; then
27901  ac_lo=$ac_mid; break
27902else
27903  $as_echo "$as_me: failed program was:" >&5
27904sed 's/^/| /' conftest.$ac_ext >&5
27905
27906	ac_hi=`expr '(' $ac_mid ')' - 1`
27907			if test $ac_mid -le $ac_hi; then
27908			  ac_lo= ac_hi=
27909			  break
27910			fi
27911			ac_mid=`expr 2 '*' $ac_mid`
27912fi
27913
27914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27915  done
27916else
27917  $as_echo "$as_me: failed program was:" >&5
27918sed 's/^/| /' conftest.$ac_ext >&5
27919
27920	ac_lo= ac_hi=
27921fi
27922
27923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27924fi
27925
27926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27927# Binary search between lo and hi bounds.
27928while test "x$ac_lo" != "x$ac_hi"; do
27929  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
27930  cat >conftest.$ac_ext <<_ACEOF
27931/* confdefs.h.  */
27932_ACEOF
27933cat confdefs.h >>conftest.$ac_ext
27934cat >>conftest.$ac_ext <<_ACEOF
27935/* end confdefs.h.  */
27936$ac_includes_default
27937int
27938main ()
27939{
27940static int test_array [1 - 2 * !(((long int) (sizeof (int *))) <= $ac_mid)];
27941test_array [0] = 0
27942
27943  ;
27944  return 0;
27945}
27946_ACEOF
27947rm -f conftest.$ac_objext
27948if { (ac_try="$ac_compile"
27949case "(($ac_try" in
27950  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27951  *) ac_try_echo=$ac_try;;
27952esac
27953eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27954$as_echo "$ac_try_echo") >&5
27955  (eval "$ac_compile") 2>conftest.er1
27956  ac_status=$?
27957  grep -v '^ *+' conftest.er1 >conftest.err
27958  rm -f conftest.er1
27959  cat conftest.err >&5
27960  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27961  (exit $ac_status); } && {
27962	 test -z "$ac_cxx_werror_flag" ||
27963	 test ! -s conftest.err
27964       } && test -s conftest.$ac_objext; then
27965  ac_hi=$ac_mid
27966else
27967  $as_echo "$as_me: failed program was:" >&5
27968sed 's/^/| /' conftest.$ac_ext >&5
27969
27970	ac_lo=`expr '(' $ac_mid ')' + 1`
27971fi
27972
27973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27974done
27975case $ac_lo in
27976?*) ac_cv_sizeof_int_p=$ac_lo;;
27977'') if test "$ac_cv_type_int_p" = yes; then
27978     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27979$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27980{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int *)
27981See \`config.log' for more details." >&5
27982$as_echo "$as_me: error: cannot compute sizeof (int *)
27983See \`config.log' for more details." >&2;}
27984   { (exit 77); exit 77; }; }; }
27985   else
27986     ac_cv_sizeof_int_p=0
27987   fi ;;
27988esac
27989else
27990  cat >conftest.$ac_ext <<_ACEOF
27991/* confdefs.h.  */
27992_ACEOF
27993cat confdefs.h >>conftest.$ac_ext
27994cat >>conftest.$ac_ext <<_ACEOF
27995/* end confdefs.h.  */
27996$ac_includes_default
27997static long int longval () { return (long int) (sizeof (int *)); }
27998static unsigned long int ulongval () { return (long int) (sizeof (int *)); }
27999#include <stdio.h>
28000#include <stdlib.h>
28001int
28002main ()
28003{
28004
28005  FILE *f = fopen ("conftest.val", "w");
28006  if (! f)
28007    return 1;
28008  if (((long int) (sizeof (int *))) < 0)
28009    {
28010      long int i = longval ();
28011      if (i != ((long int) (sizeof (int *))))
28012	return 1;
28013      fprintf (f, "%ld", i);
28014    }
28015  else
28016    {
28017      unsigned long int i = ulongval ();
28018      if (i != ((long int) (sizeof (int *))))
28019	return 1;
28020      fprintf (f, "%lu", i);
28021    }
28022  /* Do not output a trailing newline, as this causes \r\n confusion
28023     on some platforms.  */
28024  return ferror (f) || fclose (f) != 0;
28025
28026  ;
28027  return 0;
28028}
28029_ACEOF
28030rm -f conftest$ac_exeext
28031if { (ac_try="$ac_link"
28032case "(($ac_try" in
28033  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28034  *) ac_try_echo=$ac_try;;
28035esac
28036eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28037$as_echo "$ac_try_echo") >&5
28038  (eval "$ac_link") 2>&5
28039  ac_status=$?
28040  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28041  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28042  { (case "(($ac_try" in
28043  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28044  *) ac_try_echo=$ac_try;;
28045esac
28046eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28047$as_echo "$ac_try_echo") >&5
28048  (eval "$ac_try") 2>&5
28049  ac_status=$?
28050  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28051  (exit $ac_status); }; }; then
28052  ac_cv_sizeof_int_p=`cat conftest.val`
28053else
28054  $as_echo "$as_me: program exited with status $ac_status" >&5
28055$as_echo "$as_me: failed program was:" >&5
28056sed 's/^/| /' conftest.$ac_ext >&5
28057
28058( exit $ac_status )
28059if test "$ac_cv_type_int_p" = yes; then
28060     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
28061$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28062{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int *)
28063See \`config.log' for more details." >&5
28064$as_echo "$as_me: error: cannot compute sizeof (int *)
28065See \`config.log' for more details." >&2;}
28066   { (exit 77); exit 77; }; }; }
28067   else
28068     ac_cv_sizeof_int_p=0
28069   fi
28070fi
28071rm -rf conftest.dSYM
28072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28073fi
28074rm -f conftest.val
28075fi
28076{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int_p" >&5
28077$as_echo "$ac_cv_sizeof_int_p" >&6; }
28078
28079
28080
28081cat >>confdefs.h <<_ACEOF
28082#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28083_ACEOF
28084
28085
28086
28087if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28088  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28089  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28090fi
28091
28092if test "x$SIZEOF_INT_P" = x; then
28093    # The test failed, lets stick to the assumed value.
28094    { $as_echo "$as_me:$LINENO: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&5
28095$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28096else
28097    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28098
28099    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28100        { { $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
28101$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;}
28102   { (exit 1); exit 1; }; }
28103    fi
28104fi
28105
28106{ $as_echo "$as_me:$LINENO: checking for target address size" >&5
28107$as_echo_n "checking for target address size... " >&6; }
28108{ $as_echo "$as_me:$LINENO: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28109$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28110
28111
28112###############################################################################
28113#
28114# Is the target little of big endian?
28115#
28116
28117 { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
28118$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28119if test "${ac_cv_c_bigendian+set}" = set; then
28120  $as_echo_n "(cached) " >&6
28121else
28122  ac_cv_c_bigendian=unknown
28123    # See if we're dealing with a universal compiler.
28124    cat >conftest.$ac_ext <<_ACEOF
28125/* confdefs.h.  */
28126_ACEOF
28127cat confdefs.h >>conftest.$ac_ext
28128cat >>conftest.$ac_ext <<_ACEOF
28129/* end confdefs.h.  */
28130#ifndef __APPLE_CC__
28131	       not a universal capable compiler
28132	     #endif
28133	     typedef int dummy;
28134
28135_ACEOF
28136rm -f conftest.$ac_objext
28137if { (ac_try="$ac_compile"
28138case "(($ac_try" in
28139  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28140  *) ac_try_echo=$ac_try;;
28141esac
28142eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28143$as_echo "$ac_try_echo") >&5
28144  (eval "$ac_compile") 2>conftest.er1
28145  ac_status=$?
28146  grep -v '^ *+' conftest.er1 >conftest.err
28147  rm -f conftest.er1
28148  cat conftest.err >&5
28149  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28150  (exit $ac_status); } && {
28151	 test -z "$ac_cxx_werror_flag" ||
28152	 test ! -s conftest.err
28153       } && test -s conftest.$ac_objext; then
28154
28155	# Check for potential -arch flags.  It is not universal unless
28156	# there are some -arch flags.  Note that *ppc* also matches
28157	# ppc64.  This check is also rather less than ideal.
28158	case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
28159	  *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
28160	esac
28161else
28162  $as_echo "$as_me: failed program was:" >&5
28163sed 's/^/| /' conftest.$ac_ext >&5
28164
28165
28166fi
28167
28168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28169    if test $ac_cv_c_bigendian = unknown; then
28170      # See if sys/param.h defines the BYTE_ORDER macro.
28171      cat >conftest.$ac_ext <<_ACEOF
28172/* confdefs.h.  */
28173_ACEOF
28174cat confdefs.h >>conftest.$ac_ext
28175cat >>conftest.$ac_ext <<_ACEOF
28176/* end confdefs.h.  */
28177#include <sys/types.h>
28178	     #include <sys/param.h>
28179
28180int
28181main ()
28182{
28183#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28184		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28185		     && LITTLE_ENDIAN)
28186	      bogus endian macros
28187	     #endif
28188
28189  ;
28190  return 0;
28191}
28192_ACEOF
28193rm -f conftest.$ac_objext
28194if { (ac_try="$ac_compile"
28195case "(($ac_try" in
28196  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28197  *) ac_try_echo=$ac_try;;
28198esac
28199eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28200$as_echo "$ac_try_echo") >&5
28201  (eval "$ac_compile") 2>conftest.er1
28202  ac_status=$?
28203  grep -v '^ *+' conftest.er1 >conftest.err
28204  rm -f conftest.er1
28205  cat conftest.err >&5
28206  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28207  (exit $ac_status); } && {
28208	 test -z "$ac_cxx_werror_flag" ||
28209	 test ! -s conftest.err
28210       } && test -s conftest.$ac_objext; then
28211  # It does; now see whether it defined to BIG_ENDIAN or not.
28212	 cat >conftest.$ac_ext <<_ACEOF
28213/* confdefs.h.  */
28214_ACEOF
28215cat confdefs.h >>conftest.$ac_ext
28216cat >>conftest.$ac_ext <<_ACEOF
28217/* end confdefs.h.  */
28218#include <sys/types.h>
28219		#include <sys/param.h>
28220
28221int
28222main ()
28223{
28224#if BYTE_ORDER != BIG_ENDIAN
28225		 not big endian
28226		#endif
28227
28228  ;
28229  return 0;
28230}
28231_ACEOF
28232rm -f conftest.$ac_objext
28233if { (ac_try="$ac_compile"
28234case "(($ac_try" in
28235  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28236  *) ac_try_echo=$ac_try;;
28237esac
28238eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28239$as_echo "$ac_try_echo") >&5
28240  (eval "$ac_compile") 2>conftest.er1
28241  ac_status=$?
28242  grep -v '^ *+' conftest.er1 >conftest.err
28243  rm -f conftest.er1
28244  cat conftest.err >&5
28245  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28246  (exit $ac_status); } && {
28247	 test -z "$ac_cxx_werror_flag" ||
28248	 test ! -s conftest.err
28249       } && test -s conftest.$ac_objext; then
28250  ac_cv_c_bigendian=yes
28251else
28252  $as_echo "$as_me: failed program was:" >&5
28253sed 's/^/| /' conftest.$ac_ext >&5
28254
28255	ac_cv_c_bigendian=no
28256fi
28257
28258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28259else
28260  $as_echo "$as_me: failed program was:" >&5
28261sed 's/^/| /' conftest.$ac_ext >&5
28262
28263
28264fi
28265
28266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28267    fi
28268    if test $ac_cv_c_bigendian = unknown; then
28269      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28270      cat >conftest.$ac_ext <<_ACEOF
28271/* confdefs.h.  */
28272_ACEOF
28273cat confdefs.h >>conftest.$ac_ext
28274cat >>conftest.$ac_ext <<_ACEOF
28275/* end confdefs.h.  */
28276#include <limits.h>
28277
28278int
28279main ()
28280{
28281#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28282	      bogus endian macros
28283	     #endif
28284
28285  ;
28286  return 0;
28287}
28288_ACEOF
28289rm -f conftest.$ac_objext
28290if { (ac_try="$ac_compile"
28291case "(($ac_try" in
28292  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28293  *) ac_try_echo=$ac_try;;
28294esac
28295eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28296$as_echo "$ac_try_echo") >&5
28297  (eval "$ac_compile") 2>conftest.er1
28298  ac_status=$?
28299  grep -v '^ *+' conftest.er1 >conftest.err
28300  rm -f conftest.er1
28301  cat conftest.err >&5
28302  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28303  (exit $ac_status); } && {
28304	 test -z "$ac_cxx_werror_flag" ||
28305	 test ! -s conftest.err
28306       } && test -s conftest.$ac_objext; then
28307  # It does; now see whether it defined to _BIG_ENDIAN or not.
28308	 cat >conftest.$ac_ext <<_ACEOF
28309/* confdefs.h.  */
28310_ACEOF
28311cat confdefs.h >>conftest.$ac_ext
28312cat >>conftest.$ac_ext <<_ACEOF
28313/* end confdefs.h.  */
28314#include <limits.h>
28315
28316int
28317main ()
28318{
28319#ifndef _BIG_ENDIAN
28320		 not big endian
28321		#endif
28322
28323  ;
28324  return 0;
28325}
28326_ACEOF
28327rm -f conftest.$ac_objext
28328if { (ac_try="$ac_compile"
28329case "(($ac_try" in
28330  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28331  *) ac_try_echo=$ac_try;;
28332esac
28333eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28334$as_echo "$ac_try_echo") >&5
28335  (eval "$ac_compile") 2>conftest.er1
28336  ac_status=$?
28337  grep -v '^ *+' conftest.er1 >conftest.err
28338  rm -f conftest.er1
28339  cat conftest.err >&5
28340  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28341  (exit $ac_status); } && {
28342	 test -z "$ac_cxx_werror_flag" ||
28343	 test ! -s conftest.err
28344       } && test -s conftest.$ac_objext; then
28345  ac_cv_c_bigendian=yes
28346else
28347  $as_echo "$as_me: failed program was:" >&5
28348sed 's/^/| /' conftest.$ac_ext >&5
28349
28350	ac_cv_c_bigendian=no
28351fi
28352
28353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28354else
28355  $as_echo "$as_me: failed program was:" >&5
28356sed 's/^/| /' conftest.$ac_ext >&5
28357
28358
28359fi
28360
28361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28362    fi
28363    if test $ac_cv_c_bigendian = unknown; then
28364      # Compile a test program.
28365      if test "$cross_compiling" = yes; then
28366  # Try to guess by grepping values from an object file.
28367	 cat >conftest.$ac_ext <<_ACEOF
28368/* confdefs.h.  */
28369_ACEOF
28370cat confdefs.h >>conftest.$ac_ext
28371cat >>conftest.$ac_ext <<_ACEOF
28372/* end confdefs.h.  */
28373short int ascii_mm[] =
28374		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28375		short int ascii_ii[] =
28376		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28377		int use_ascii (int i) {
28378		  return ascii_mm[i] + ascii_ii[i];
28379		}
28380		short int ebcdic_ii[] =
28381		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28382		short int ebcdic_mm[] =
28383		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28384		int use_ebcdic (int i) {
28385		  return ebcdic_mm[i] + ebcdic_ii[i];
28386		}
28387		extern int foo;
28388
28389int
28390main ()
28391{
28392return use_ascii (foo) == use_ebcdic (foo);
28393  ;
28394  return 0;
28395}
28396_ACEOF
28397rm -f conftest.$ac_objext
28398if { (ac_try="$ac_compile"
28399case "(($ac_try" in
28400  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28401  *) ac_try_echo=$ac_try;;
28402esac
28403eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28404$as_echo "$ac_try_echo") >&5
28405  (eval "$ac_compile") 2>conftest.er1
28406  ac_status=$?
28407  grep -v '^ *+' conftest.er1 >conftest.err
28408  rm -f conftest.er1
28409  cat conftest.err >&5
28410  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28411  (exit $ac_status); } && {
28412	 test -z "$ac_cxx_werror_flag" ||
28413	 test ! -s conftest.err
28414       } && test -s conftest.$ac_objext; then
28415  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28416	      ac_cv_c_bigendian=yes
28417	    fi
28418	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28419	      if test "$ac_cv_c_bigendian" = unknown; then
28420		ac_cv_c_bigendian=no
28421	      else
28422		# finding both strings is unlikely to happen, but who knows?
28423		ac_cv_c_bigendian=unknown
28424	      fi
28425	    fi
28426else
28427  $as_echo "$as_me: failed program was:" >&5
28428sed 's/^/| /' conftest.$ac_ext >&5
28429
28430
28431fi
28432
28433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28434else
28435  cat >conftest.$ac_ext <<_ACEOF
28436/* confdefs.h.  */
28437_ACEOF
28438cat confdefs.h >>conftest.$ac_ext
28439cat >>conftest.$ac_ext <<_ACEOF
28440/* end confdefs.h.  */
28441$ac_includes_default
28442int
28443main ()
28444{
28445
28446	     /* Are we little or big endian?  From Harbison&Steele.  */
28447	     union
28448	     {
28449	       long int l;
28450	       char c[sizeof (long int)];
28451	     } u;
28452	     u.l = 1;
28453	     return u.c[sizeof (long int) - 1] == 1;
28454
28455  ;
28456  return 0;
28457}
28458_ACEOF
28459rm -f conftest$ac_exeext
28460if { (ac_try="$ac_link"
28461case "(($ac_try" in
28462  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28463  *) ac_try_echo=$ac_try;;
28464esac
28465eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28466$as_echo "$ac_try_echo") >&5
28467  (eval "$ac_link") 2>&5
28468  ac_status=$?
28469  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28470  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28471  { (case "(($ac_try" in
28472  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28473  *) ac_try_echo=$ac_try;;
28474esac
28475eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28476$as_echo "$ac_try_echo") >&5
28477  (eval "$ac_try") 2>&5
28478  ac_status=$?
28479  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28480  (exit $ac_status); }; }; then
28481  ac_cv_c_bigendian=no
28482else
28483  $as_echo "$as_me: program exited with status $ac_status" >&5
28484$as_echo "$as_me: failed program was:" >&5
28485sed 's/^/| /' conftest.$ac_ext >&5
28486
28487( exit $ac_status )
28488ac_cv_c_bigendian=yes
28489fi
28490rm -rf conftest.dSYM
28491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28492fi
28493
28494
28495    fi
28496fi
28497{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
28498$as_echo "$ac_cv_c_bigendian" >&6; }
28499 case $ac_cv_c_bigendian in #(
28500   yes)
28501     ENDIAN="big";; #(
28502   no)
28503     ENDIAN="little" ;; #(
28504   universal)
28505     ENDIAN="universal_endianness"
28506     ;; #(
28507   *)
28508     ENDIAN="unknown" ;;
28509 esac
28510
28511
28512if test "x$ENDIAN" = xuniversal_endianness; then
28513    { { $as_echo "$as_me:$LINENO: error: Building with both big and little endianness is not supported" >&5
28514$as_echo "$as_me: error: Building with both big and little endianness is not supported" >&2;}
28515   { (exit 1); exit 1; }; }
28516fi
28517if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28518    { { $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
28519$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;}
28520   { (exit 1); exit 1; }; }
28521fi
28522
28523
28524# Configure flags for the tools
28525
28526
28527###############################################################################
28528#
28529# How to compile shared libraries.
28530#
28531
28532if test "x$GCC" = xyes; then
28533    COMPILER_NAME=gcc
28534    PICFLAG="-fPIC"
28535    LIBRARY_PREFIX=lib
28536    SHARED_LIBRARY='lib$1.so'
28537    STATIC_LIBRARY='lib$1.a'
28538    SHARED_LIBRARY_FLAGS="-shared"
28539    SHARED_LIBRARY_SUFFIX='.so'
28540    STATIC_LIBRARY_SUFFIX='.a'
28541    OBJ_SUFFIX='.o'
28542    EXE_SUFFIX=''
28543    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28544    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28545    C_FLAG_REORDER=''
28546    CXX_FLAG_REORDER=''
28547    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28548    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28549    LD="$CC"
28550    LDEXE="$CC"
28551    LDCXX="$CXX"
28552    LDEXECXX="$CXX"
28553    POST_STRIP_CMD="$STRIP -g"
28554
28555    # Linking is different on MacOSX
28556    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28557        # Might change in the future to clang.
28558        COMPILER_NAME=gcc
28559        SHARED_LIBRARY='lib$1.dylib'
28560        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28561        SHARED_LIBRARY_SUFFIX='.dylib'
28562        EXE_SUFFIX=''
28563        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28564        SET_SHARED_LIBRARY_MAPFILE=''
28565        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28566        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28567        POST_STRIP_CMD="$STRIP -S"
28568    fi
28569else
28570    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28571        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28572        COMPILER_NAME=ossc
28573        PICFLAG="-KPIC"
28574        LIBRARY_PREFIX=lib
28575        SHARED_LIBRARY='lib$1.so'
28576        STATIC_LIBRARY='lib$1.a'
28577        SHARED_LIBRARY_FLAGS="-G"
28578        SHARED_LIBRARY_SUFFIX='.so'
28579        STATIC_LIBRARY_SUFFIX='.a'
28580        OBJ_SUFFIX='.o'
28581        EXE_SUFFIX=''
28582        SET_SHARED_LIBRARY_NAME=''
28583        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28584	C_FLAG_REORDER='-xF'
28585	CXX_FLAG_REORDER='-xF'
28586        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28587        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28588        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28589        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28590        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28591        POST_STRIP_CMD="$STRIP -x"
28592        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28593    fi
28594    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28595        # If it is not gcc, then assume it is the MS Visual Studio compiler
28596        COMPILER_NAME=cl
28597        PICFLAG=""
28598        LIBRARY_PREFIX=
28599        SHARED_LIBRARY='$1.dll'
28600        STATIC_LIBRARY='$1.lib'
28601        SHARED_LIBRARY_FLAGS="-LD"
28602        SHARED_LIBRARY_SUFFIX='.dll'
28603        STATIC_LIBRARY_SUFFIX='.lib'
28604        OBJ_SUFFIX='.obj'
28605        EXE_SUFFIX='.exe'
28606        SET_SHARED_LIBRARY_NAME=''
28607        SET_SHARED_LIBRARY_MAPFILE=''
28608        SET_SHARED_LIBRARY_ORIGIN=''
28609        SET_EXECUTABLE_ORIGIN=''
28610    fi
28611fi
28612
28613
28614
28615
28616
28617
28618
28619
28620
28621
28622
28623
28624
28625
28626
28627
28628
28629
28630# The (cross) compiler is now configured, we can now test capabilities
28631# of the target platform.
28632
28633
28634
28635###############################################################################
28636#
28637# Setup the opt flags for different compilers
28638# and different operating systems.
28639#
28640
28641#
28642# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28643#
28644if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28645    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28646    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28647    CFLAGS="$CFLAGS -mstackrealign"
28648    { $as_echo "$as_me:$LINENO: checking if 32-bit compiler supports -mstackrealign" >&5
28649$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28650    cat >conftest.$ac_ext <<_ACEOF
28651/* confdefs.h.  */
28652_ACEOF
28653cat confdefs.h >>conftest.$ac_ext
28654cat >>conftest.$ac_ext <<_ACEOF
28655/* end confdefs.h.  */
28656int main() { return 0; }
28657_ACEOF
28658rm -f conftest.$ac_objext conftest$ac_exeext
28659if { (ac_try="$ac_link"
28660case "(($ac_try" in
28661  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28662  *) ac_try_echo=$ac_try;;
28663esac
28664eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28665$as_echo "$ac_try_echo") >&5
28666  (eval "$ac_link") 2>conftest.er1
28667  ac_status=$?
28668  grep -v '^ *+' conftest.er1 >conftest.err
28669  rm -f conftest.er1
28670  cat conftest.err >&5
28671  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28672  (exit $ac_status); } && {
28673	 test -z "$ac_cxx_werror_flag" ||
28674	 test ! -s conftest.err
28675       } && test -s conftest$ac_exeext && {
28676	 test "$cross_compiling" = yes ||
28677	 $as_test_x conftest$ac_exeext
28678       }; then
28679
28680		        { $as_echo "$as_me:$LINENO: result: yes" >&5
28681$as_echo "yes" >&6; }
28682
28683else
28684  $as_echo "$as_me: failed program was:" >&5
28685sed 's/^/| /' conftest.$ac_ext >&5
28686
28687
28688		        { $as_echo "$as_me:$LINENO: result: no" >&5
28689$as_echo "no" >&6; }
28690	                { { $as_echo "$as_me:$LINENO: error: The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." >&5
28691$as_echo "$as_me: error: The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." >&2;}
28692   { (exit 1); exit 1; }; }
28693
28694fi
28695
28696rm -rf conftest.dSYM
28697rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28698      conftest$ac_exeext conftest.$ac_ext
28699fi
28700
28701C_FLAG_DEPS="-MMD -MF"
28702CXX_FLAG_DEPS="-MMD -MF"
28703
28704case $COMPILER_TYPE in
28705  CC )
28706    D_FLAG="-g"
28707    case $COMPILER_NAME in
28708      gcc )
28709      	case $OPENJDK_TARGET_OS in
28710	  macosx )
28711	    # On MacOSX we optimize for size, something
28712	    # we should do for all platforms?
28713	    C_O_FLAG_HI="-Os"
28714	    C_O_FLAG_NORM="-Os"
28715	    C_O_FLAG_NONE=""
28716	    ;;
28717	  *)
28718	    C_O_FLAG_HI="-O3"
28719	    C_O_FLAG_NORM="-O2"
28720	    C_O_FLAG_NONE="-O0"
28721	    CFLAGS_DEBUG_SYMBOLS="-g"
28722	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28723	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28724	       CFLAGS_DEBUG_SYMBOLS="-g1"
28725	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28726	    fi
28727	    ;;
28728	esac
28729        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28730        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28731        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28732        ;;
28733      ossc )
28734        #
28735        # Forte has different names for this with their C++ compiler...
28736        #
28737        C_FLAG_DEPS="-xMMD -xMF"
28738        CXX_FLAG_DEPS="-xMMD -xMF"
28739
28740        # Extra options used with HIGHEST
28741        #
28742        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28743        #          done with care, there are some assumptions below that need to
28744        #          be understood about the use of pointers, and IEEE behavior.
28745        #
28746        # Use non-standard floating point mode (not IEEE 754)
28747        CC_HIGHEST="$CC_HIGHEST -fns"
28748        # Do some simplification of floating point arithmetic (not IEEE 754)
28749        CC_HIGHEST="$CC_HIGHEST -fsimple"
28750        # Use single precision floating point with 'float'
28751        CC_HIGHEST="$CC_HIGHEST -fsingle"
28752        # Assume memory references via basic pointer types do not alias
28753        #   (Source with excessing pointer casting and data access with mixed
28754        #    pointer types are not recommended)
28755        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28756        # Use intrinsic or inline versions for math/std functions
28757        #   (If you expect perfect errno behavior, do not use this)
28758        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28759        # Loop data dependency optimizations (need -xO3 or higher)
28760        CC_HIGHEST="$CC_HIGHEST -xdepend"
28761        # Pointer parameters to functions do not overlap
28762        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28763        #    If you pass in multiple pointers to the same data, do not use this)
28764        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28765        # Inline some library routines
28766        #   (If you expect perfect errno behavior, do not use this)
28767        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28768        # Use optimized math routines
28769        #   (If you expect perfect errno behavior, do not use this)
28770        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28771        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28772
28773        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28774          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28775          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28776        fi
28777
28778        case $OPENJDK_TARGET_CPU_ARCH in
28779          x86)
28780            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28781            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28782            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28783            C_O_FLAG_NONE="-xregs=no%frameptr"
28784            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28785            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28786            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28787            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28788            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28789               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28790               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28791            fi
28792            ;;
28793          sparc)
28794            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28795            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28796            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28797            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28798            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28799            C_O_FLAG_NONE=""
28800            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28801            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28802            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28803            CXX_O_FLAG_NONE=""
28804            ;;
28805        esac
28806
28807    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28808    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28809    esac
28810    ;;
28811  CL )
28812    D_FLAG=
28813    C_O_FLAG_HIGHEST="-O2"
28814    C_O_FLAG_HI="-O1"
28815    C_O_FLAG_NORM="-O1"
28816    C_O_FLAG_NONE="-Od"
28817    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28818    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28819    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28820    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28821    ;;
28822esac
28823
28824if test -z "$C_O_FLAG_HIGHEST"; then
28825   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28826fi
28827
28828if test -z "$CXX_O_FLAG_HIGHEST"; then
28829   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28830fi
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28846   { $as_echo "$as_me:$LINENO: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28847$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28848fi
28849
28850if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28851   { $as_echo "$as_me:$LINENO: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28852$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28853fi
28854
28855if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28856   { $as_echo "$as_me:$LINENO: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28857$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28858fi
28859
28860
28861# Check whether --with-extra-cflags was given.
28862if test "${with_extra_cflags+set}" = set; then
28863  withval=$with_extra_cflags;
28864fi
28865
28866
28867
28868# Check whether --with-extra-cxxflags was given.
28869if test "${with_extra_cxxflags+set}" = set; then
28870  withval=$with_extra_cxxflags;
28871fi
28872
28873
28874
28875# Check whether --with-extra-ldflags was given.
28876if test "${with_extra_ldflags+set}" = set; then
28877  withval=$with_extra_ldflags;
28878fi
28879
28880
28881CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28882CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28883LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28884
28885# Hotspot needs these set in their legacy form
28886LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28887LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28888LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28889
28890
28891
28892
28893
28894###############################################################################
28895#
28896# Now setup the CFLAGS and LDFLAGS for the JDK build.
28897# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28898#
28899case $COMPILER_NAME in
28900      gcc )
28901      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28902                          -pipe \
28903                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28904	  case $OPENJDK_TARGET_CPU_ARCH in
28905	  arm )
28906            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28907	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28908	  ;;
28909	  ppc )
28910            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28911	  ;;
28912	  * )
28913	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28914	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28915          ;;
28916	  esac
28917          ;;
28918      ossc )
28919          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28920          case $OPENJDK_TARGET_CPU_ARCH in
28921          x86 )
28922            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28923       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28924          ;;
28925          esac
28926
28927      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28928      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28929
28930          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28931          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28932          ;;
28933      cl )
28934          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28935               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28936	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28937	       -DWIN32 -DIAL"
28938          case $OPENJDK_TARGET_CPU in
28939              x86 )
28940                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28941                  ;;
28942              x86_64 )
28943                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28944                  ;;
28945          esac
28946          ;;
28947esac
28948
28949###############################################################################
28950
28951CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28952
28953# The package path is used only on macosx?
28954PACKAGE_PATH=/opt/local
28955
28956
28957if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28958    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28959    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28960    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28961    #   Note: -Dmacro         is the same as    #define macro 1
28962    #         -Dmacro=	    is the same as    #define macro
28963    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28964        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28965    else
28966        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28967    fi
28968else
28969    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28970fi
28971if test "x$OPENJDK_TARGET_OS" = xlinux; then
28972    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28973fi
28974if test "x$OPENJDK_TARGET_OS" = xwindows; then
28975    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28976fi
28977if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28978    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28979fi
28980if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28981    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28982fi
28983if test "x$OPENJDK_TARGET_OS" = xbsd; then
28984    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28985fi
28986if test "x$DEBUG_LEVEL" = xrelease; then
28987    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28988    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28989        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28990    fi
28991else
28992    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28993fi
28994
28995CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28996CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28997
28998CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28999        -I${JDK_OUTPUTDIR}/include \
29000        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29001        -I${JDK_TOPDIR}/src/share/javavm/export \
29002        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29003        -I${JDK_TOPDIR}/src/share/native/common \
29004        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29005
29006# The shared libraries are compiled using the picflag.
29007CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29008CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29009
29010# Executable flags
29011CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29012CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29013
29014# Now this is odd. The JDK native libraries have to link against libjvm.so
29015# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29016# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29017# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29018# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29019# libraries will link to whatever is in memory. Yuck.
29020#
29021# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29022if test "x$COMPILER_NAME" = xcl; then
29023    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29024    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29025        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29026    fi
29027    # TODO: make -debug optional "--disable-full-debug-symbols"
29028    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29029    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29030    LDFLAGS_JDKLIB_SUFFIX=""
29031    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29032        LDFLAGS_STACK_SIZE=1048576
29033    else
29034        LDFLAGS_STACK_SIZE=327680
29035    fi
29036    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29037else
29038    if test "x$COMPILER_NAME" = xgcc; then
29039        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29040        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29041        if test -n "$HAS_GNU_HASH"; then
29042            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29043        fi
29044        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29045          # And since we now know that the linker is gnu, then add -z defs, to forbid
29046          # undefined symbols in object files.
29047          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29048          if test "x$DEBUG_LEVEL" = "xrelease"; then
29049              # When building release libraries, tell the linker optimize them.
29050              # Should this be supplied to the OSS linker as well?
29051              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29052          fi
29053        fi
29054    fi
29055    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29056                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server \
29057                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client \
29058                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29059
29060    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29061    if test "x$COMPILER_NAME" = xossc; then
29062        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29063    fi
29064
29065    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29066    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29067        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29068    fi
29069fi
29070
29071# Adjust flags according to debug level.
29072case $DEBUG_LEVEL in
29073      fastdebug )
29074              CFLAGS="$CFLAGS $D_FLAG"
29075              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29076              ;;
29077      slowdebug )
29078              CFLAGS="$CFLAGS $D_FLAG"
29079	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29080	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29081	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29082	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29083              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29084              ;;
29085esac
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101# Setup debug symbols (need objcopy from the toolchain for that)
29102
29103#
29104# ENABLE_DEBUG_SYMBOLS
29105# This must be done after the toolchain is setup, since we're looking at objcopy.
29106#
29107ENABLE_DEBUG_SYMBOLS=default
29108
29109# default on macosx is no...
29110if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29111   ENABLE_DEBUG_SYMBOLS=no
29112fi
29113
29114# Check whether --enable-debug-symbols was given.
29115if test "${enable_debug_symbols+set}" = set; then
29116  enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
29117fi
29118
29119
29120{ $as_echo "$as_me:$LINENO: checking if we should generate debug symbols" >&5
29121$as_echo_n "checking if we should generate debug symbols... " >&6; }
29122
29123if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
29124   # explicit enabling of enable-debug-symbols and can't find objcopy
29125   #   this is an error
29126   { { $as_echo "$as_me:$LINENO: error: Unable to find objcopy, cannot enable debug-symbols" >&5
29127$as_echo "$as_me: error: Unable to find objcopy, cannot enable debug-symbols" >&2;}
29128   { (exit 1); exit 1; }; }
29129fi
29130
29131if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
29132  # Default is on if objcopy is found, otherwise off
29133  if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29134     ENABLE_DEBUG_SYMBOLS=yes
29135  else
29136     ENABLE_DEBUG_SYMBOLS=no
29137  fi
29138fi
29139
29140{ $as_echo "$as_me:$LINENO: result: $ENABLE_DEBUG_SYMBOLS" >&5
29141$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29142
29143#
29144# ZIP_DEBUGINFO_FILES
29145#
29146ZIP_DEBUGINFO_FILES=yes
29147
29148# Check whether --enable-zip-debug-info was given.
29149if test "${enable_zip_debug_info+set}" = set; then
29150  enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
29151fi
29152
29153
29154{ $as_echo "$as_me:$LINENO: checking if we should zip debug-info files" >&5
29155$as_echo_n "checking if we should zip debug-info files... " >&6; }
29156{ $as_echo "$as_me:$LINENO: result: $ZIP_DEBUGINFO_FILES" >&5
29157$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
29158
29159# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
29160#   use that...
29161if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
29162   ZIP_DEBUGINFO_FILES=1
29163else
29164   ZIP_DEBUGINFO_FILES=0
29165fi
29166
29167
29168
29169
29170
29171
29172
29173###############################################################################
29174#
29175# Check dependencies for external and internal libraries.
29176#
29177###############################################################################
29178
29179
29180
29181###############################################################################
29182#
29183# OS specific settings that we never will need to probe.
29184#
29185if test "x$OPENJDK_TARGET_OS" = xlinux; then
29186    { $as_echo "$as_me:$LINENO: checking what is not needed on Linux?" >&5
29187$as_echo_n "checking what is not needed on Linux?... " >&6; }
29188    PULSE_NOT_NEEDED=yes
29189    { $as_echo "$as_me:$LINENO: result: pulse" >&5
29190$as_echo "pulse" >&6; }
29191fi
29192
29193if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29194    { $as_echo "$as_me:$LINENO: checking what is not needed on Solaris?" >&5
29195$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29196    ALSA_NOT_NEEDED=yes
29197    PULSE_NOT_NEEDED=yes
29198    { $as_echo "$as_me:$LINENO: result: alsa pulse" >&5
29199$as_echo "alsa pulse" >&6; }
29200fi
29201
29202if test "x$OPENJDK_TARGET_OS" = xwindows; then
29203    { $as_echo "$as_me:$LINENO: checking what is not needed on Windows?" >&5
29204$as_echo_n "checking what is not needed on Windows?... " >&6; }
29205    CUPS_NOT_NEEDED=yes
29206    ALSA_NOT_NEEDED=yes
29207    PULSE_NOT_NEEDED=yes
29208    X11_NOT_NEEDED=yes
29209    { $as_echo "$as_me:$LINENO: result: alsa cups pulse x11" >&5
29210$as_echo "alsa cups pulse x11" >&6; }
29211fi
29212
29213if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29214    { $as_echo "$as_me:$LINENO: checking what is not needed on MacOSX?" >&5
29215$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29216    ALSA_NOT_NEEDED=yes
29217    PULSE_NOT_NEEDED=yes
29218    X11_NOT_NEEDED=yes
29219    FREETYPE2_NOT_NEEDED=yes
29220    # If the java runtime framework is disabled, then we need X11.
29221    # This will be adjusted below.
29222    { $as_echo "$as_me:$LINENO: result: alsa pulse x11" >&5
29223$as_echo "alsa pulse x11" >&6; }
29224fi
29225
29226if test "x$OPENJDK_TARGET_OS" = xbsd; then
29227    { $as_echo "$as_me:$LINENO: checking what is not needed on bsd?" >&5
29228$as_echo_n "checking what is not needed on bsd?... " >&6; }
29229    ALSA_NOT_NEEDED=yes
29230    { $as_echo "$as_me:$LINENO: result: alsa" >&5
29231$as_echo "alsa" >&6; }
29232fi
29233
29234if test "x$OPENJDK" = "xfalse"; then
29235    FREETYPE2_NOT_NEEDED=yes
29236fi
29237
29238if test "x$SUPPORT_HEADFUL" = xno; then
29239    X11_NOT_NEEDED=yes
29240fi
29241
29242###############################################################################
29243#
29244# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29245# that uses this API.
29246#
29247# Check whether --enable-macosx-runtime-support was given.
29248if test "${enable_macosx_runtime_support+set}" = set; then
29249  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29250else
29251  MACOSX_RUNTIME_SUPPORT="no"
29252fi
29253
29254
29255USE_MACOSX_RUNTIME_SUPPORT=no
29256{ $as_echo "$as_me:$LINENO: checking for explicit Java runtime support in the OS" >&5
29257$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29258if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29259    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29260        MACOSX_RUNTIME_SUPPORT=yes
29261        USE_MACOSX_RUNTIME_SUPPORT=yes
29262        { $as_echo "$as_me:$LINENO: result: yes, does not need alsa freetype2 pulse and X11" >&5
29263$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29264    else
29265        { $as_echo "$as_me:$LINENO: result: yes, but explicitly disabled." >&5
29266$as_echo "yes, but explicitly disabled." >&6; }
29267    fi
29268else
29269    { $as_echo "$as_me:$LINENO: result: no" >&5
29270$as_echo "no" >&6; }
29271fi
29272
29273if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29274    { $as_echo "$as_me:$LINENO: checking what is not needed on an X11 build on MacOSX?" >&5
29275$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29276    X11_NOT_NEEDED=
29277    FREETYPE2_NOT_NEEDED=
29278    { $as_echo "$as_me:$LINENO: result: alsa pulse" >&5
29279$as_echo "alsa pulse" >&6; }
29280fi
29281
29282
29283
29284
29285###############################################################################
29286#
29287# Check for X Windows
29288#
29289
29290# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29291# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29292# --x-libraries for the sysroot, if that seems to be correct.
29293if test "x$SYS_ROOT" != "x/"; then
29294  if test "x$x_includes" = xNONE; then
29295    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29296      x_includes="$SYS_ROOT/usr/X11R6/include"
29297    fi
29298  fi
29299  if test "x$x_libraries" = xNONE; then
29300    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29301      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29302    fi
29303  fi
29304fi
29305
29306# Now let autoconf do it's magic
29307{ $as_echo "$as_me:$LINENO: checking for X" >&5
29308$as_echo_n "checking for X... " >&6; }
29309
29310
29311# Check whether --with-x was given.
29312if test "${with_x+set}" = set; then
29313  withval=$with_x;
29314fi
29315
29316# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29317if test "x$with_x" = xno; then
29318  # The user explicitly disabled X.
29319  have_x=disabled
29320else
29321  case $x_includes,$x_libraries in #(
29322    *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5
29323$as_echo "$as_me: error: cannot use X directory names containing '" >&2;}
29324   { (exit 1); exit 1; }; };; #(
29325    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
29326  $as_echo_n "(cached) " >&6
29327else
29328  # One or both of the vars are not set, and there is no cached value.
29329ac_x_includes=no ac_x_libraries=no
29330rm -f -r conftest.dir
29331if mkdir conftest.dir; then
29332  cd conftest.dir
29333  cat >Imakefile <<'_ACEOF'
29334incroot:
29335	@echo incroot='${INCROOT}'
29336usrlibdir:
29337	@echo usrlibdir='${USRLIBDIR}'
29338libdir:
29339	@echo libdir='${LIBDIR}'
29340_ACEOF
29341  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29342    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
29343    for ac_var in incroot usrlibdir libdir; do
29344      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29345    done
29346    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29347    for ac_extension in a so sl dylib la dll; do
29348      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29349	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29350	ac_im_usrlibdir=$ac_im_libdir; break
29351      fi
29352    done
29353    # Screen out bogus values from the imake configuration.  They are
29354    # bogus both because they are the default anyway, and because
29355    # using them would break gcc on systems where it needs fixed includes.
29356    case $ac_im_incroot in
29357	/usr/include) ac_x_includes= ;;
29358	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29359    esac
29360    case $ac_im_usrlibdir in
29361	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29362	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29363    esac
29364  fi
29365  cd ..
29366  rm -f -r conftest.dir
29367fi
29368
29369# Standard set of common directories for X headers.
29370# Check X11 before X11Rn because it is often a symlink to the current release.
29371ac_x_header_dirs='
29372/usr/X11/include
29373/usr/X11R6/include
29374/usr/X11R5/include
29375/usr/X11R4/include
29376
29377/usr/include/X11
29378/usr/include/X11R6
29379/usr/include/X11R5
29380/usr/include/X11R4
29381
29382/usr/local/X11/include
29383/usr/local/X11R6/include
29384/usr/local/X11R5/include
29385/usr/local/X11R4/include
29386
29387/usr/local/include/X11
29388/usr/local/include/X11R6
29389/usr/local/include/X11R5
29390/usr/local/include/X11R4
29391
29392/usr/X386/include
29393/usr/x386/include
29394/usr/XFree86/include/X11
29395
29396/usr/include
29397/usr/local/include
29398/usr/unsupported/include
29399/usr/athena/include
29400/usr/local/x11r5/include
29401/usr/lpp/Xamples/include
29402
29403/usr/openwin/include
29404/usr/openwin/share/include'
29405
29406if test "$ac_x_includes" = no; then
29407  # Guess where to find include files, by looking for Xlib.h.
29408  # First, try using that file with no special directory specified.
29409  cat >conftest.$ac_ext <<_ACEOF
29410/* confdefs.h.  */
29411_ACEOF
29412cat confdefs.h >>conftest.$ac_ext
29413cat >>conftest.$ac_ext <<_ACEOF
29414/* end confdefs.h.  */
29415#include <X11/Xlib.h>
29416_ACEOF
29417if { (ac_try="$ac_cpp conftest.$ac_ext"
29418case "(($ac_try" in
29419  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29420  *) ac_try_echo=$ac_try;;
29421esac
29422eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29423$as_echo "$ac_try_echo") >&5
29424  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29425  ac_status=$?
29426  grep -v '^ *+' conftest.er1 >conftest.err
29427  rm -f conftest.er1
29428  cat conftest.err >&5
29429  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29430  (exit $ac_status); } >/dev/null && {
29431	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
29432	 test ! -s conftest.err
29433       }; then
29434  # We can compile using X headers with no special include directory.
29435ac_x_includes=
29436else
29437  $as_echo "$as_me: failed program was:" >&5
29438sed 's/^/| /' conftest.$ac_ext >&5
29439
29440  for ac_dir in $ac_x_header_dirs; do
29441  if test -r "$ac_dir/X11/Xlib.h"; then
29442    ac_x_includes=$ac_dir
29443    break
29444  fi
29445done
29446fi
29447
29448rm -f conftest.err conftest.$ac_ext
29449fi # $ac_x_includes = no
29450
29451if test "$ac_x_libraries" = no; then
29452  # Check for the libraries.
29453  # See if we find them without any special options.
29454  # Don't add to $LIBS permanently.
29455  ac_save_LIBS=$LIBS
29456  LIBS="-lX11 $LIBS"
29457  cat >conftest.$ac_ext <<_ACEOF
29458/* confdefs.h.  */
29459_ACEOF
29460cat confdefs.h >>conftest.$ac_ext
29461cat >>conftest.$ac_ext <<_ACEOF
29462/* end confdefs.h.  */
29463#include <X11/Xlib.h>
29464int
29465main ()
29466{
29467XrmInitialize ()
29468  ;
29469  return 0;
29470}
29471_ACEOF
29472rm -f conftest.$ac_objext conftest$ac_exeext
29473if { (ac_try="$ac_link"
29474case "(($ac_try" in
29475  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29476  *) ac_try_echo=$ac_try;;
29477esac
29478eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29479$as_echo "$ac_try_echo") >&5
29480  (eval "$ac_link") 2>conftest.er1
29481  ac_status=$?
29482  grep -v '^ *+' conftest.er1 >conftest.err
29483  rm -f conftest.er1
29484  cat conftest.err >&5
29485  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29486  (exit $ac_status); } && {
29487	 test -z "$ac_cxx_werror_flag" ||
29488	 test ! -s conftest.err
29489       } && test -s conftest$ac_exeext && {
29490	 test "$cross_compiling" = yes ||
29491	 $as_test_x conftest$ac_exeext
29492       }; then
29493  LIBS=$ac_save_LIBS
29494# We can link X programs with no special library path.
29495ac_x_libraries=
29496else
29497  $as_echo "$as_me: failed program was:" >&5
29498sed 's/^/| /' conftest.$ac_ext >&5
29499
29500	LIBS=$ac_save_LIBS
29501for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29502do
29503  # Don't even attempt the hair of trying to link an X program!
29504  for ac_extension in a so sl dylib la dll; do
29505    if test -r "$ac_dir/libX11.$ac_extension"; then
29506      ac_x_libraries=$ac_dir
29507      break 2
29508    fi
29509  done
29510done
29511fi
29512
29513rm -rf conftest.dSYM
29514rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29515      conftest$ac_exeext conftest.$ac_ext
29516fi # $ac_x_libraries = no
29517
29518case $ac_x_includes,$ac_x_libraries in #(
29519  no,* | *,no | *\'*)
29520    # Didn't find X, or a directory has "'" in its name.
29521    ac_cv_have_x="have_x=no";; #(
29522  *)
29523    # Record where we found X for the cache.
29524    ac_cv_have_x="have_x=yes\
29525	ac_x_includes='$ac_x_includes'\
29526	ac_x_libraries='$ac_x_libraries'"
29527esac
29528fi
29529;; #(
29530    *) have_x=yes;;
29531  esac
29532  eval "$ac_cv_have_x"
29533fi # $with_x != no
29534
29535if test "$have_x" != yes; then
29536  { $as_echo "$as_me:$LINENO: result: $have_x" >&5
29537$as_echo "$have_x" >&6; }
29538  no_x=yes
29539else
29540  # If each of the values was on the command line, it overrides each guess.
29541  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29542  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29543  # Update the cache value to reflect the command line values.
29544  ac_cv_have_x="have_x=yes\
29545	ac_x_includes='$x_includes'\
29546	ac_x_libraries='$x_libraries'"
29547  { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
29548$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29549fi
29550
29551if test "$no_x" = yes; then
29552  # Not all programs may use this symbol, but it does not hurt to define it.
29553
29554cat >>confdefs.h <<\_ACEOF
29555#define X_DISPLAY_MISSING 1
29556_ACEOF
29557
29558  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29559else
29560  if test -n "$x_includes"; then
29561    X_CFLAGS="$X_CFLAGS -I$x_includes"
29562  fi
29563
29564  # It would also be nice to do this for all -L options, not just this one.
29565  if test -n "$x_libraries"; then
29566    X_LIBS="$X_LIBS -L$x_libraries"
29567    # For Solaris; some versions of Sun CC require a space after -R and
29568    # others require no space.  Words are not sufficient . . . .
29569    { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
29570$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29571    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29572    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29573    ac_cxx_werror_flag=yes
29574    cat >conftest.$ac_ext <<_ACEOF
29575/* confdefs.h.  */
29576_ACEOF
29577cat confdefs.h >>conftest.$ac_ext
29578cat >>conftest.$ac_ext <<_ACEOF
29579/* end confdefs.h.  */
29580
29581int
29582main ()
29583{
29584
29585  ;
29586  return 0;
29587}
29588_ACEOF
29589rm -f conftest.$ac_objext conftest$ac_exeext
29590if { (ac_try="$ac_link"
29591case "(($ac_try" in
29592  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29593  *) ac_try_echo=$ac_try;;
29594esac
29595eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29596$as_echo "$ac_try_echo") >&5
29597  (eval "$ac_link") 2>conftest.er1
29598  ac_status=$?
29599  grep -v '^ *+' conftest.er1 >conftest.err
29600  rm -f conftest.er1
29601  cat conftest.err >&5
29602  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29603  (exit $ac_status); } && {
29604	 test -z "$ac_cxx_werror_flag" ||
29605	 test ! -s conftest.err
29606       } && test -s conftest$ac_exeext && {
29607	 test "$cross_compiling" = yes ||
29608	 $as_test_x conftest$ac_exeext
29609       }; then
29610  { $as_echo "$as_me:$LINENO: result: no" >&5
29611$as_echo "no" >&6; }
29612       X_LIBS="$X_LIBS -R$x_libraries"
29613else
29614  $as_echo "$as_me: failed program was:" >&5
29615sed 's/^/| /' conftest.$ac_ext >&5
29616
29617	LIBS="$ac_xsave_LIBS -R $x_libraries"
29618       cat >conftest.$ac_ext <<_ACEOF
29619/* confdefs.h.  */
29620_ACEOF
29621cat confdefs.h >>conftest.$ac_ext
29622cat >>conftest.$ac_ext <<_ACEOF
29623/* end confdefs.h.  */
29624
29625int
29626main ()
29627{
29628
29629  ;
29630  return 0;
29631}
29632_ACEOF
29633rm -f conftest.$ac_objext conftest$ac_exeext
29634if { (ac_try="$ac_link"
29635case "(($ac_try" in
29636  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29637  *) ac_try_echo=$ac_try;;
29638esac
29639eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29640$as_echo "$ac_try_echo") >&5
29641  (eval "$ac_link") 2>conftest.er1
29642  ac_status=$?
29643  grep -v '^ *+' conftest.er1 >conftest.err
29644  rm -f conftest.er1
29645  cat conftest.err >&5
29646  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29647  (exit $ac_status); } && {
29648	 test -z "$ac_cxx_werror_flag" ||
29649	 test ! -s conftest.err
29650       } && test -s conftest$ac_exeext && {
29651	 test "$cross_compiling" = yes ||
29652	 $as_test_x conftest$ac_exeext
29653       }; then
29654  { $as_echo "$as_me:$LINENO: result: yes" >&5
29655$as_echo "yes" >&6; }
29656	  X_LIBS="$X_LIBS -R $x_libraries"
29657else
29658  $as_echo "$as_me: failed program was:" >&5
29659sed 's/^/| /' conftest.$ac_ext >&5
29660
29661	{ $as_echo "$as_me:$LINENO: result: neither works" >&5
29662$as_echo "neither works" >&6; }
29663fi
29664
29665rm -rf conftest.dSYM
29666rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29667      conftest$ac_exeext conftest.$ac_ext
29668fi
29669
29670rm -rf conftest.dSYM
29671rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29672      conftest$ac_exeext conftest.$ac_ext
29673    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29674    LIBS=$ac_xsave_LIBS
29675  fi
29676
29677  # Check for system-dependent libraries X programs must link with.
29678  # Do this before checking for the system-independent R6 libraries
29679  # (-lICE), since we may need -lsocket or whatever for X linking.
29680
29681  if test "$ISC" = yes; then
29682    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29683  else
29684    # Martyn Johnson says this is needed for Ultrix, if the X
29685    # libraries were built with DECnet support.  And Karl Berry says
29686    # the Alpha needs dnet_stub (dnet does not exist).
29687    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29688    cat >conftest.$ac_ext <<_ACEOF
29689/* confdefs.h.  */
29690_ACEOF
29691cat confdefs.h >>conftest.$ac_ext
29692cat >>conftest.$ac_ext <<_ACEOF
29693/* end confdefs.h.  */
29694
29695/* Override any GCC internal prototype to avoid an error.
29696   Use char because int might match the return type of a GCC
29697   builtin and then its argument prototype would still apply.  */
29698#ifdef __cplusplus
29699extern "C"
29700#endif
29701char XOpenDisplay ();
29702int
29703main ()
29704{
29705return XOpenDisplay ();
29706  ;
29707  return 0;
29708}
29709_ACEOF
29710rm -f conftest.$ac_objext conftest$ac_exeext
29711if { (ac_try="$ac_link"
29712case "(($ac_try" in
29713  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29714  *) ac_try_echo=$ac_try;;
29715esac
29716eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29717$as_echo "$ac_try_echo") >&5
29718  (eval "$ac_link") 2>conftest.er1
29719  ac_status=$?
29720  grep -v '^ *+' conftest.er1 >conftest.err
29721  rm -f conftest.er1
29722  cat conftest.err >&5
29723  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29724  (exit $ac_status); } && {
29725	 test -z "$ac_cxx_werror_flag" ||
29726	 test ! -s conftest.err
29727       } && test -s conftest$ac_exeext && {
29728	 test "$cross_compiling" = yes ||
29729	 $as_test_x conftest$ac_exeext
29730       }; then
29731  :
29732else
29733  $as_echo "$as_me: failed program was:" >&5
29734sed 's/^/| /' conftest.$ac_ext >&5
29735
29736	{ $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
29737$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29738if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
29739  $as_echo_n "(cached) " >&6
29740else
29741  ac_check_lib_save_LIBS=$LIBS
29742LIBS="-ldnet  $LIBS"
29743cat >conftest.$ac_ext <<_ACEOF
29744/* confdefs.h.  */
29745_ACEOF
29746cat confdefs.h >>conftest.$ac_ext
29747cat >>conftest.$ac_ext <<_ACEOF
29748/* end confdefs.h.  */
29749
29750/* Override any GCC internal prototype to avoid an error.
29751   Use char because int might match the return type of a GCC
29752   builtin and then its argument prototype would still apply.  */
29753#ifdef __cplusplus
29754extern "C"
29755#endif
29756char dnet_ntoa ();
29757int
29758main ()
29759{
29760return dnet_ntoa ();
29761  ;
29762  return 0;
29763}
29764_ACEOF
29765rm -f conftest.$ac_objext conftest$ac_exeext
29766if { (ac_try="$ac_link"
29767case "(($ac_try" in
29768  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29769  *) ac_try_echo=$ac_try;;
29770esac
29771eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29772$as_echo "$ac_try_echo") >&5
29773  (eval "$ac_link") 2>conftest.er1
29774  ac_status=$?
29775  grep -v '^ *+' conftest.er1 >conftest.err
29776  rm -f conftest.er1
29777  cat conftest.err >&5
29778  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29779  (exit $ac_status); } && {
29780	 test -z "$ac_cxx_werror_flag" ||
29781	 test ! -s conftest.err
29782       } && test -s conftest$ac_exeext && {
29783	 test "$cross_compiling" = yes ||
29784	 $as_test_x conftest$ac_exeext
29785       }; then
29786  ac_cv_lib_dnet_dnet_ntoa=yes
29787else
29788  $as_echo "$as_me: failed program was:" >&5
29789sed 's/^/| /' conftest.$ac_ext >&5
29790
29791	ac_cv_lib_dnet_dnet_ntoa=no
29792fi
29793
29794rm -rf conftest.dSYM
29795rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29796      conftest$ac_exeext conftest.$ac_ext
29797LIBS=$ac_check_lib_save_LIBS
29798fi
29799{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29800$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29801if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then
29802  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29803fi
29804
29805    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
29806      { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
29807$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
29808if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
29809  $as_echo_n "(cached) " >&6
29810else
29811  ac_check_lib_save_LIBS=$LIBS
29812LIBS="-ldnet_stub  $LIBS"
29813cat >conftest.$ac_ext <<_ACEOF
29814/* confdefs.h.  */
29815_ACEOF
29816cat confdefs.h >>conftest.$ac_ext
29817cat >>conftest.$ac_ext <<_ACEOF
29818/* end confdefs.h.  */
29819
29820/* Override any GCC internal prototype to avoid an error.
29821   Use char because int might match the return type of a GCC
29822   builtin and then its argument prototype would still apply.  */
29823#ifdef __cplusplus
29824extern "C"
29825#endif
29826char dnet_ntoa ();
29827int
29828main ()
29829{
29830return dnet_ntoa ();
29831  ;
29832  return 0;
29833}
29834_ACEOF
29835rm -f conftest.$ac_objext conftest$ac_exeext
29836if { (ac_try="$ac_link"
29837case "(($ac_try" in
29838  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29839  *) ac_try_echo=$ac_try;;
29840esac
29841eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29842$as_echo "$ac_try_echo") >&5
29843  (eval "$ac_link") 2>conftest.er1
29844  ac_status=$?
29845  grep -v '^ *+' conftest.er1 >conftest.err
29846  rm -f conftest.er1
29847  cat conftest.err >&5
29848  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29849  (exit $ac_status); } && {
29850	 test -z "$ac_cxx_werror_flag" ||
29851	 test ! -s conftest.err
29852       } && test -s conftest$ac_exeext && {
29853	 test "$cross_compiling" = yes ||
29854	 $as_test_x conftest$ac_exeext
29855       }; then
29856  ac_cv_lib_dnet_stub_dnet_ntoa=yes
29857else
29858  $as_echo "$as_me: failed program was:" >&5
29859sed 's/^/| /' conftest.$ac_ext >&5
29860
29861	ac_cv_lib_dnet_stub_dnet_ntoa=no
29862fi
29863
29864rm -rf conftest.dSYM
29865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29866      conftest$ac_exeext conftest.$ac_ext
29867LIBS=$ac_check_lib_save_LIBS
29868fi
29869{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
29870$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
29871if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then
29872  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
29873fi
29874
29875    fi
29876fi
29877
29878rm -rf conftest.dSYM
29879rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29880      conftest$ac_exeext conftest.$ac_ext
29881    LIBS="$ac_xsave_LIBS"
29882
29883    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
29884    # to get the SysV transport functions.
29885    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
29886    # needs -lnsl.
29887    # The nsl library prevents programs from opening the X display
29888    # on Irix 5.2, according to T.E. Dickey.
29889    # The functions gethostbyname, getservbyname, and inet_addr are
29890    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
29891    { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5
29892$as_echo_n "checking for gethostbyname... " >&6; }
29893if test "${ac_cv_func_gethostbyname+set}" = set; then
29894  $as_echo_n "(cached) " >&6
29895else
29896  cat >conftest.$ac_ext <<_ACEOF
29897/* confdefs.h.  */
29898_ACEOF
29899cat confdefs.h >>conftest.$ac_ext
29900cat >>conftest.$ac_ext <<_ACEOF
29901/* end confdefs.h.  */
29902/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
29903   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
29904#define gethostbyname innocuous_gethostbyname
29905
29906/* System header to define __stub macros and hopefully few prototypes,
29907    which can conflict with char gethostbyname (); below.
29908    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
29909    <limits.h> exists even on freestanding compilers.  */
29910
29911#ifdef __STDC__
29912# include <limits.h>
29913#else
29914# include <assert.h>
29915#endif
29916
29917#undef gethostbyname
29918
29919/* Override any GCC internal prototype to avoid an error.
29920   Use char because int might match the return type of a GCC
29921   builtin and then its argument prototype would still apply.  */
29922#ifdef __cplusplus
29923extern "C"
29924#endif
29925char gethostbyname ();
29926/* The GNU C library defines this for functions which it implements
29927    to always fail with ENOSYS.  Some functions are actually named
29928    something starting with __ and the normal name is an alias.  */
29929#if defined __stub_gethostbyname || defined __stub___gethostbyname
29930choke me
29931#endif
29932
29933int
29934main ()
29935{
29936return gethostbyname ();
29937  ;
29938  return 0;
29939}
29940_ACEOF
29941rm -f conftest.$ac_objext conftest$ac_exeext
29942if { (ac_try="$ac_link"
29943case "(($ac_try" in
29944  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29945  *) ac_try_echo=$ac_try;;
29946esac
29947eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29948$as_echo "$ac_try_echo") >&5
29949  (eval "$ac_link") 2>conftest.er1
29950  ac_status=$?
29951  grep -v '^ *+' conftest.er1 >conftest.err
29952  rm -f conftest.er1
29953  cat conftest.err >&5
29954  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29955  (exit $ac_status); } && {
29956	 test -z "$ac_cxx_werror_flag" ||
29957	 test ! -s conftest.err
29958       } && test -s conftest$ac_exeext && {
29959	 test "$cross_compiling" = yes ||
29960	 $as_test_x conftest$ac_exeext
29961       }; then
29962  ac_cv_func_gethostbyname=yes
29963else
29964  $as_echo "$as_me: failed program was:" >&5
29965sed 's/^/| /' conftest.$ac_ext >&5
29966
29967	ac_cv_func_gethostbyname=no
29968fi
29969
29970rm -rf conftest.dSYM
29971rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29972      conftest$ac_exeext conftest.$ac_ext
29973fi
29974{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
29975$as_echo "$ac_cv_func_gethostbyname" >&6; }
29976
29977    if test $ac_cv_func_gethostbyname = no; then
29978      { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
29979$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
29980if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
29981  $as_echo_n "(cached) " >&6
29982else
29983  ac_check_lib_save_LIBS=$LIBS
29984LIBS="-lnsl  $LIBS"
29985cat >conftest.$ac_ext <<_ACEOF
29986/* confdefs.h.  */
29987_ACEOF
29988cat confdefs.h >>conftest.$ac_ext
29989cat >>conftest.$ac_ext <<_ACEOF
29990/* end confdefs.h.  */
29991
29992/* Override any GCC internal prototype to avoid an error.
29993   Use char because int might match the return type of a GCC
29994   builtin and then its argument prototype would still apply.  */
29995#ifdef __cplusplus
29996extern "C"
29997#endif
29998char gethostbyname ();
29999int
30000main ()
30001{
30002return gethostbyname ();
30003  ;
30004  return 0;
30005}
30006_ACEOF
30007rm -f conftest.$ac_objext conftest$ac_exeext
30008if { (ac_try="$ac_link"
30009case "(($ac_try" in
30010  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30011  *) ac_try_echo=$ac_try;;
30012esac
30013eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30014$as_echo "$ac_try_echo") >&5
30015  (eval "$ac_link") 2>conftest.er1
30016  ac_status=$?
30017  grep -v '^ *+' conftest.er1 >conftest.err
30018  rm -f conftest.er1
30019  cat conftest.err >&5
30020  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30021  (exit $ac_status); } && {
30022	 test -z "$ac_cxx_werror_flag" ||
30023	 test ! -s conftest.err
30024       } && test -s conftest$ac_exeext && {
30025	 test "$cross_compiling" = yes ||
30026	 $as_test_x conftest$ac_exeext
30027       }; then
30028  ac_cv_lib_nsl_gethostbyname=yes
30029else
30030  $as_echo "$as_me: failed program was:" >&5
30031sed 's/^/| /' conftest.$ac_ext >&5
30032
30033	ac_cv_lib_nsl_gethostbyname=no
30034fi
30035
30036rm -rf conftest.dSYM
30037rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30038      conftest$ac_exeext conftest.$ac_ext
30039LIBS=$ac_check_lib_save_LIBS
30040fi
30041{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
30042$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30043if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
30044  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30045fi
30046
30047      if test $ac_cv_lib_nsl_gethostbyname = no; then
30048	{ $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
30049$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30050if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
30051  $as_echo_n "(cached) " >&6
30052else
30053  ac_check_lib_save_LIBS=$LIBS
30054LIBS="-lbsd  $LIBS"
30055cat >conftest.$ac_ext <<_ACEOF
30056/* confdefs.h.  */
30057_ACEOF
30058cat confdefs.h >>conftest.$ac_ext
30059cat >>conftest.$ac_ext <<_ACEOF
30060/* end confdefs.h.  */
30061
30062/* Override any GCC internal prototype to avoid an error.
30063   Use char because int might match the return type of a GCC
30064   builtin and then its argument prototype would still apply.  */
30065#ifdef __cplusplus
30066extern "C"
30067#endif
30068char gethostbyname ();
30069int
30070main ()
30071{
30072return gethostbyname ();
30073  ;
30074  return 0;
30075}
30076_ACEOF
30077rm -f conftest.$ac_objext conftest$ac_exeext
30078if { (ac_try="$ac_link"
30079case "(($ac_try" in
30080  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30081  *) ac_try_echo=$ac_try;;
30082esac
30083eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30084$as_echo "$ac_try_echo") >&5
30085  (eval "$ac_link") 2>conftest.er1
30086  ac_status=$?
30087  grep -v '^ *+' conftest.er1 >conftest.err
30088  rm -f conftest.er1
30089  cat conftest.err >&5
30090  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30091  (exit $ac_status); } && {
30092	 test -z "$ac_cxx_werror_flag" ||
30093	 test ! -s conftest.err
30094       } && test -s conftest$ac_exeext && {
30095	 test "$cross_compiling" = yes ||
30096	 $as_test_x conftest$ac_exeext
30097       }; then
30098  ac_cv_lib_bsd_gethostbyname=yes
30099else
30100  $as_echo "$as_me: failed program was:" >&5
30101sed 's/^/| /' conftest.$ac_ext >&5
30102
30103	ac_cv_lib_bsd_gethostbyname=no
30104fi
30105
30106rm -rf conftest.dSYM
30107rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30108      conftest$ac_exeext conftest.$ac_ext
30109LIBS=$ac_check_lib_save_LIBS
30110fi
30111{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
30112$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30113if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then
30114  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30115fi
30116
30117      fi
30118    fi
30119
30120    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30121    # socket/setsockopt and other routines are undefined under SCO ODT
30122    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30123    # on later versions), says Simon Leinen: it contains gethostby*
30124    # variants that don't use the name server (or something).  -lsocket
30125    # must be given before -lnsl if both are needed.  We assume that
30126    # if connect needs -lnsl, so does gethostbyname.
30127    { $as_echo "$as_me:$LINENO: checking for connect" >&5
30128$as_echo_n "checking for connect... " >&6; }
30129if test "${ac_cv_func_connect+set}" = set; then
30130  $as_echo_n "(cached) " >&6
30131else
30132  cat >conftest.$ac_ext <<_ACEOF
30133/* confdefs.h.  */
30134_ACEOF
30135cat confdefs.h >>conftest.$ac_ext
30136cat >>conftest.$ac_ext <<_ACEOF
30137/* end confdefs.h.  */
30138/* Define connect to an innocuous variant, in case <limits.h> declares connect.
30139   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
30140#define connect innocuous_connect
30141
30142/* System header to define __stub macros and hopefully few prototypes,
30143    which can conflict with char connect (); below.
30144    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30145    <limits.h> exists even on freestanding compilers.  */
30146
30147#ifdef __STDC__
30148# include <limits.h>
30149#else
30150# include <assert.h>
30151#endif
30152
30153#undef connect
30154
30155/* Override any GCC internal prototype to avoid an error.
30156   Use char because int might match the return type of a GCC
30157   builtin and then its argument prototype would still apply.  */
30158#ifdef __cplusplus
30159extern "C"
30160#endif
30161char connect ();
30162/* The GNU C library defines this for functions which it implements
30163    to always fail with ENOSYS.  Some functions are actually named
30164    something starting with __ and the normal name is an alias.  */
30165#if defined __stub_connect || defined __stub___connect
30166choke me
30167#endif
30168
30169int
30170main ()
30171{
30172return connect ();
30173  ;
30174  return 0;
30175}
30176_ACEOF
30177rm -f conftest.$ac_objext conftest$ac_exeext
30178if { (ac_try="$ac_link"
30179case "(($ac_try" in
30180  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30181  *) ac_try_echo=$ac_try;;
30182esac
30183eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30184$as_echo "$ac_try_echo") >&5
30185  (eval "$ac_link") 2>conftest.er1
30186  ac_status=$?
30187  grep -v '^ *+' conftest.er1 >conftest.err
30188  rm -f conftest.er1
30189  cat conftest.err >&5
30190  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30191  (exit $ac_status); } && {
30192	 test -z "$ac_cxx_werror_flag" ||
30193	 test ! -s conftest.err
30194       } && test -s conftest$ac_exeext && {
30195	 test "$cross_compiling" = yes ||
30196	 $as_test_x conftest$ac_exeext
30197       }; then
30198  ac_cv_func_connect=yes
30199else
30200  $as_echo "$as_me: failed program was:" >&5
30201sed 's/^/| /' conftest.$ac_ext >&5
30202
30203	ac_cv_func_connect=no
30204fi
30205
30206rm -rf conftest.dSYM
30207rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30208      conftest$ac_exeext conftest.$ac_ext
30209fi
30210{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
30211$as_echo "$ac_cv_func_connect" >&6; }
30212
30213    if test $ac_cv_func_connect = no; then
30214      { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
30215$as_echo_n "checking for connect in -lsocket... " >&6; }
30216if test "${ac_cv_lib_socket_connect+set}" = set; then
30217  $as_echo_n "(cached) " >&6
30218else
30219  ac_check_lib_save_LIBS=$LIBS
30220LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30221cat >conftest.$ac_ext <<_ACEOF
30222/* confdefs.h.  */
30223_ACEOF
30224cat confdefs.h >>conftest.$ac_ext
30225cat >>conftest.$ac_ext <<_ACEOF
30226/* end confdefs.h.  */
30227
30228/* Override any GCC internal prototype to avoid an error.
30229   Use char because int might match the return type of a GCC
30230   builtin and then its argument prototype would still apply.  */
30231#ifdef __cplusplus
30232extern "C"
30233#endif
30234char connect ();
30235int
30236main ()
30237{
30238return connect ();
30239  ;
30240  return 0;
30241}
30242_ACEOF
30243rm -f conftest.$ac_objext conftest$ac_exeext
30244if { (ac_try="$ac_link"
30245case "(($ac_try" in
30246  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30247  *) ac_try_echo=$ac_try;;
30248esac
30249eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30250$as_echo "$ac_try_echo") >&5
30251  (eval "$ac_link") 2>conftest.er1
30252  ac_status=$?
30253  grep -v '^ *+' conftest.er1 >conftest.err
30254  rm -f conftest.er1
30255  cat conftest.err >&5
30256  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30257  (exit $ac_status); } && {
30258	 test -z "$ac_cxx_werror_flag" ||
30259	 test ! -s conftest.err
30260       } && test -s conftest$ac_exeext && {
30261	 test "$cross_compiling" = yes ||
30262	 $as_test_x conftest$ac_exeext
30263       }; then
30264  ac_cv_lib_socket_connect=yes
30265else
30266  $as_echo "$as_me: failed program was:" >&5
30267sed 's/^/| /' conftest.$ac_ext >&5
30268
30269	ac_cv_lib_socket_connect=no
30270fi
30271
30272rm -rf conftest.dSYM
30273rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30274      conftest$ac_exeext conftest.$ac_ext
30275LIBS=$ac_check_lib_save_LIBS
30276fi
30277{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
30278$as_echo "$ac_cv_lib_socket_connect" >&6; }
30279if test "x$ac_cv_lib_socket_connect" = x""yes; then
30280  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30281fi
30282
30283    fi
30284
30285    # Guillermo Gomez says -lposix is necessary on A/UX.
30286    { $as_echo "$as_me:$LINENO: checking for remove" >&5
30287$as_echo_n "checking for remove... " >&6; }
30288if test "${ac_cv_func_remove+set}" = set; then
30289  $as_echo_n "(cached) " >&6
30290else
30291  cat >conftest.$ac_ext <<_ACEOF
30292/* confdefs.h.  */
30293_ACEOF
30294cat confdefs.h >>conftest.$ac_ext
30295cat >>conftest.$ac_ext <<_ACEOF
30296/* end confdefs.h.  */
30297/* Define remove to an innocuous variant, in case <limits.h> declares remove.
30298   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
30299#define remove innocuous_remove
30300
30301/* System header to define __stub macros and hopefully few prototypes,
30302    which can conflict with char remove (); below.
30303    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30304    <limits.h> exists even on freestanding compilers.  */
30305
30306#ifdef __STDC__
30307# include <limits.h>
30308#else
30309# include <assert.h>
30310#endif
30311
30312#undef remove
30313
30314/* Override any GCC internal prototype to avoid an error.
30315   Use char because int might match the return type of a GCC
30316   builtin and then its argument prototype would still apply.  */
30317#ifdef __cplusplus
30318extern "C"
30319#endif
30320char remove ();
30321/* The GNU C library defines this for functions which it implements
30322    to always fail with ENOSYS.  Some functions are actually named
30323    something starting with __ and the normal name is an alias.  */
30324#if defined __stub_remove || defined __stub___remove
30325choke me
30326#endif
30327
30328int
30329main ()
30330{
30331return remove ();
30332  ;
30333  return 0;
30334}
30335_ACEOF
30336rm -f conftest.$ac_objext conftest$ac_exeext
30337if { (ac_try="$ac_link"
30338case "(($ac_try" in
30339  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30340  *) ac_try_echo=$ac_try;;
30341esac
30342eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30343$as_echo "$ac_try_echo") >&5
30344  (eval "$ac_link") 2>conftest.er1
30345  ac_status=$?
30346  grep -v '^ *+' conftest.er1 >conftest.err
30347  rm -f conftest.er1
30348  cat conftest.err >&5
30349  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30350  (exit $ac_status); } && {
30351	 test -z "$ac_cxx_werror_flag" ||
30352	 test ! -s conftest.err
30353       } && test -s conftest$ac_exeext && {
30354	 test "$cross_compiling" = yes ||
30355	 $as_test_x conftest$ac_exeext
30356       }; then
30357  ac_cv_func_remove=yes
30358else
30359  $as_echo "$as_me: failed program was:" >&5
30360sed 's/^/| /' conftest.$ac_ext >&5
30361
30362	ac_cv_func_remove=no
30363fi
30364
30365rm -rf conftest.dSYM
30366rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30367      conftest$ac_exeext conftest.$ac_ext
30368fi
30369{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
30370$as_echo "$ac_cv_func_remove" >&6; }
30371
30372    if test $ac_cv_func_remove = no; then
30373      { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5
30374$as_echo_n "checking for remove in -lposix... " >&6; }
30375if test "${ac_cv_lib_posix_remove+set}" = set; then
30376  $as_echo_n "(cached) " >&6
30377else
30378  ac_check_lib_save_LIBS=$LIBS
30379LIBS="-lposix  $LIBS"
30380cat >conftest.$ac_ext <<_ACEOF
30381/* confdefs.h.  */
30382_ACEOF
30383cat confdefs.h >>conftest.$ac_ext
30384cat >>conftest.$ac_ext <<_ACEOF
30385/* end confdefs.h.  */
30386
30387/* Override any GCC internal prototype to avoid an error.
30388   Use char because int might match the return type of a GCC
30389   builtin and then its argument prototype would still apply.  */
30390#ifdef __cplusplus
30391extern "C"
30392#endif
30393char remove ();
30394int
30395main ()
30396{
30397return remove ();
30398  ;
30399  return 0;
30400}
30401_ACEOF
30402rm -f conftest.$ac_objext conftest$ac_exeext
30403if { (ac_try="$ac_link"
30404case "(($ac_try" in
30405  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30406  *) ac_try_echo=$ac_try;;
30407esac
30408eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30409$as_echo "$ac_try_echo") >&5
30410  (eval "$ac_link") 2>conftest.er1
30411  ac_status=$?
30412  grep -v '^ *+' conftest.er1 >conftest.err
30413  rm -f conftest.er1
30414  cat conftest.err >&5
30415  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30416  (exit $ac_status); } && {
30417	 test -z "$ac_cxx_werror_flag" ||
30418	 test ! -s conftest.err
30419       } && test -s conftest$ac_exeext && {
30420	 test "$cross_compiling" = yes ||
30421	 $as_test_x conftest$ac_exeext
30422       }; then
30423  ac_cv_lib_posix_remove=yes
30424else
30425  $as_echo "$as_me: failed program was:" >&5
30426sed 's/^/| /' conftest.$ac_ext >&5
30427
30428	ac_cv_lib_posix_remove=no
30429fi
30430
30431rm -rf conftest.dSYM
30432rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30433      conftest$ac_exeext conftest.$ac_ext
30434LIBS=$ac_check_lib_save_LIBS
30435fi
30436{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
30437$as_echo "$ac_cv_lib_posix_remove" >&6; }
30438if test "x$ac_cv_lib_posix_remove" = x""yes; then
30439  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30440fi
30441
30442    fi
30443
30444    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30445    { $as_echo "$as_me:$LINENO: checking for shmat" >&5
30446$as_echo_n "checking for shmat... " >&6; }
30447if test "${ac_cv_func_shmat+set}" = set; then
30448  $as_echo_n "(cached) " >&6
30449else
30450  cat >conftest.$ac_ext <<_ACEOF
30451/* confdefs.h.  */
30452_ACEOF
30453cat confdefs.h >>conftest.$ac_ext
30454cat >>conftest.$ac_ext <<_ACEOF
30455/* end confdefs.h.  */
30456/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
30457   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
30458#define shmat innocuous_shmat
30459
30460/* System header to define __stub macros and hopefully few prototypes,
30461    which can conflict with char shmat (); below.
30462    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30463    <limits.h> exists even on freestanding compilers.  */
30464
30465#ifdef __STDC__
30466# include <limits.h>
30467#else
30468# include <assert.h>
30469#endif
30470
30471#undef shmat
30472
30473/* Override any GCC internal prototype to avoid an error.
30474   Use char because int might match the return type of a GCC
30475   builtin and then its argument prototype would still apply.  */
30476#ifdef __cplusplus
30477extern "C"
30478#endif
30479char shmat ();
30480/* The GNU C library defines this for functions which it implements
30481    to always fail with ENOSYS.  Some functions are actually named
30482    something starting with __ and the normal name is an alias.  */
30483#if defined __stub_shmat || defined __stub___shmat
30484choke me
30485#endif
30486
30487int
30488main ()
30489{
30490return shmat ();
30491  ;
30492  return 0;
30493}
30494_ACEOF
30495rm -f conftest.$ac_objext conftest$ac_exeext
30496if { (ac_try="$ac_link"
30497case "(($ac_try" in
30498  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30499  *) ac_try_echo=$ac_try;;
30500esac
30501eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30502$as_echo "$ac_try_echo") >&5
30503  (eval "$ac_link") 2>conftest.er1
30504  ac_status=$?
30505  grep -v '^ *+' conftest.er1 >conftest.err
30506  rm -f conftest.er1
30507  cat conftest.err >&5
30508  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30509  (exit $ac_status); } && {
30510	 test -z "$ac_cxx_werror_flag" ||
30511	 test ! -s conftest.err
30512       } && test -s conftest$ac_exeext && {
30513	 test "$cross_compiling" = yes ||
30514	 $as_test_x conftest$ac_exeext
30515       }; then
30516  ac_cv_func_shmat=yes
30517else
30518  $as_echo "$as_me: failed program was:" >&5
30519sed 's/^/| /' conftest.$ac_ext >&5
30520
30521	ac_cv_func_shmat=no
30522fi
30523
30524rm -rf conftest.dSYM
30525rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30526      conftest$ac_exeext conftest.$ac_ext
30527fi
30528{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
30529$as_echo "$ac_cv_func_shmat" >&6; }
30530
30531    if test $ac_cv_func_shmat = no; then
30532      { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
30533$as_echo_n "checking for shmat in -lipc... " >&6; }
30534if test "${ac_cv_lib_ipc_shmat+set}" = set; then
30535  $as_echo_n "(cached) " >&6
30536else
30537  ac_check_lib_save_LIBS=$LIBS
30538LIBS="-lipc  $LIBS"
30539cat >conftest.$ac_ext <<_ACEOF
30540/* confdefs.h.  */
30541_ACEOF
30542cat confdefs.h >>conftest.$ac_ext
30543cat >>conftest.$ac_ext <<_ACEOF
30544/* end confdefs.h.  */
30545
30546/* Override any GCC internal prototype to avoid an error.
30547   Use char because int might match the return type of a GCC
30548   builtin and then its argument prototype would still apply.  */
30549#ifdef __cplusplus
30550extern "C"
30551#endif
30552char shmat ();
30553int
30554main ()
30555{
30556return shmat ();
30557  ;
30558  return 0;
30559}
30560_ACEOF
30561rm -f conftest.$ac_objext conftest$ac_exeext
30562if { (ac_try="$ac_link"
30563case "(($ac_try" in
30564  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30565  *) ac_try_echo=$ac_try;;
30566esac
30567eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30568$as_echo "$ac_try_echo") >&5
30569  (eval "$ac_link") 2>conftest.er1
30570  ac_status=$?
30571  grep -v '^ *+' conftest.er1 >conftest.err
30572  rm -f conftest.er1
30573  cat conftest.err >&5
30574  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30575  (exit $ac_status); } && {
30576	 test -z "$ac_cxx_werror_flag" ||
30577	 test ! -s conftest.err
30578       } && test -s conftest$ac_exeext && {
30579	 test "$cross_compiling" = yes ||
30580	 $as_test_x conftest$ac_exeext
30581       }; then
30582  ac_cv_lib_ipc_shmat=yes
30583else
30584  $as_echo "$as_me: failed program was:" >&5
30585sed 's/^/| /' conftest.$ac_ext >&5
30586
30587	ac_cv_lib_ipc_shmat=no
30588fi
30589
30590rm -rf conftest.dSYM
30591rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30592      conftest$ac_exeext conftest.$ac_ext
30593LIBS=$ac_check_lib_save_LIBS
30594fi
30595{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
30596$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30597if test "x$ac_cv_lib_ipc_shmat" = x""yes; then
30598  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30599fi
30600
30601    fi
30602  fi
30603
30604  # Check for libraries that X11R6 Xt/Xaw programs need.
30605  ac_save_LDFLAGS=$LDFLAGS
30606  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30607  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30608  # check for ICE first), but we must link in the order -lSM -lICE or
30609  # we get undefined symbols.  So assume we have SM if we have ICE.
30610  # These have to be linked with before -lX11, unlike the other
30611  # libraries we check for below, so use a different variable.
30612  # John Interrante, Karl Berry
30613  { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
30614$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30615if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
30616  $as_echo_n "(cached) " >&6
30617else
30618  ac_check_lib_save_LIBS=$LIBS
30619LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30620cat >conftest.$ac_ext <<_ACEOF
30621/* confdefs.h.  */
30622_ACEOF
30623cat confdefs.h >>conftest.$ac_ext
30624cat >>conftest.$ac_ext <<_ACEOF
30625/* end confdefs.h.  */
30626
30627/* Override any GCC internal prototype to avoid an error.
30628   Use char because int might match the return type of a GCC
30629   builtin and then its argument prototype would still apply.  */
30630#ifdef __cplusplus
30631extern "C"
30632#endif
30633char IceConnectionNumber ();
30634int
30635main ()
30636{
30637return IceConnectionNumber ();
30638  ;
30639  return 0;
30640}
30641_ACEOF
30642rm -f conftest.$ac_objext conftest$ac_exeext
30643if { (ac_try="$ac_link"
30644case "(($ac_try" in
30645  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30646  *) ac_try_echo=$ac_try;;
30647esac
30648eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30649$as_echo "$ac_try_echo") >&5
30650  (eval "$ac_link") 2>conftest.er1
30651  ac_status=$?
30652  grep -v '^ *+' conftest.er1 >conftest.err
30653  rm -f conftest.er1
30654  cat conftest.err >&5
30655  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30656  (exit $ac_status); } && {
30657	 test -z "$ac_cxx_werror_flag" ||
30658	 test ! -s conftest.err
30659       } && test -s conftest$ac_exeext && {
30660	 test "$cross_compiling" = yes ||
30661	 $as_test_x conftest$ac_exeext
30662       }; then
30663  ac_cv_lib_ICE_IceConnectionNumber=yes
30664else
30665  $as_echo "$as_me: failed program was:" >&5
30666sed 's/^/| /' conftest.$ac_ext >&5
30667
30668	ac_cv_lib_ICE_IceConnectionNumber=no
30669fi
30670
30671rm -rf conftest.dSYM
30672rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30673      conftest$ac_exeext conftest.$ac_ext
30674LIBS=$ac_check_lib_save_LIBS
30675fi
30676{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30677$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30678if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then
30679  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30680fi
30681
30682  LDFLAGS=$ac_save_LDFLAGS
30683
30684fi
30685
30686
30687if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30688
30689    # Print a helpful message on how to acquire the necessary build dependency.
30690    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30691    MISSING_DEPENDENCY=x11
30692    PKGHANDLER_COMMAND=
30693
30694    case $PKGHANDLER in
30695	apt-get)
30696                apt_help     $MISSING_DEPENDENCY ;;
30697    yum)
30698                yum_help     $MISSING_DEPENDENCY ;;
30699	port)
30700                port_help    $MISSING_DEPENDENCY ;;
30701	pkgutil)
30702                pkgutil_help $MISSING_DEPENDENCY ;;
30703	pkgadd)
30704                pkgadd_help  $MISSING_DEPENDENCY ;;
30705    * )
30706      break ;;
30707    esac
30708
30709    if test "x$PKGHANDLER_COMMAND" != x; then
30710        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30711    fi
30712
30713    { { $as_echo "$as_me:$LINENO: error: Could not find X11 libraries. $HELP_MSG" >&5
30714$as_echo "$as_me: error: Could not find X11 libraries. $HELP_MSG" >&2;}
30715   { (exit 1); exit 1; }; }
30716fi
30717
30718# Some of the old makefiles require a setting of OPENWIN_HOME
30719# Since the X11R6 directory has disappeared on later Linuxes,
30720# we need to probe for it.
30721if test "x$OPENJDK_TARGET_OS" = xlinux; then
30722    if test -d "$SYS_ROOT/usr/X11R6"; then
30723        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30724    fi
30725    if test -d "$SYS_ROOT/usr/include/X11"; then
30726        OPENWIN_HOME="$SYS_ROOT/usr"
30727    fi
30728fi
30729if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30730    OPENWIN_HOME="/usr/openwin"
30731fi
30732
30733
30734
30735#
30736# Weird Sol10 something check...TODO change to try compile
30737#
30738if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30739  if test "`uname -r`" = "5.10"; then
30740     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30741     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30742     fi
30743  fi
30744fi
30745
30746ac_ext=c
30747ac_cpp='$CPP $CPPFLAGS'
30748ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30749ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30750ac_compiler_gnu=$ac_cv_c_compiler_gnu
30751
30752OLD_CFLAGS="$CFLAGS"
30753CFLAGS="$CFLAGS $X_CFLAGS"
30754
30755# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30756
30757
30758
30759for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30760do
30761as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30762{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
30763$as_echo_n "checking for $ac_header... " >&6; }
30764if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
30765  $as_echo_n "(cached) " >&6
30766else
30767  cat >conftest.$ac_ext <<_ACEOF
30768/* confdefs.h.  */
30769_ACEOF
30770cat confdefs.h >>conftest.$ac_ext
30771cat >>conftest.$ac_ext <<_ACEOF
30772/* end confdefs.h.  */
30773 # include <X11/Xlib.h>
30774                   # include <X11/Xutil.h>
30775
30776
30777#include <$ac_header>
30778_ACEOF
30779rm -f conftest.$ac_objext
30780if { (ac_try="$ac_compile"
30781case "(($ac_try" in
30782  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30783  *) ac_try_echo=$ac_try;;
30784esac
30785eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30786$as_echo "$ac_try_echo") >&5
30787  (eval "$ac_compile") 2>conftest.er1
30788  ac_status=$?
30789  grep -v '^ *+' conftest.er1 >conftest.err
30790  rm -f conftest.er1
30791  cat conftest.err >&5
30792  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30793  (exit $ac_status); } && {
30794	 test -z "$ac_c_werror_flag" ||
30795	 test ! -s conftest.err
30796       } && test -s conftest.$ac_objext; then
30797  eval "$as_ac_Header=yes"
30798else
30799  $as_echo "$as_me: failed program was:" >&5
30800sed 's/^/| /' conftest.$ac_ext >&5
30801
30802	eval "$as_ac_Header=no"
30803fi
30804
30805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30806fi
30807ac_res=`eval 'as_val=${'$as_ac_Header'}
30808		 $as_echo "$as_val"'`
30809	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
30810$as_echo "$ac_res" >&6; }
30811as_val=`eval 'as_val=${'$as_ac_Header'}
30812		 $as_echo "$as_val"'`
30813   if test "x$as_val" = x""yes; then
30814  cat >>confdefs.h <<_ACEOF
30815#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30816_ACEOF
30817 X11_A_OK=yes
30818else
30819  X11_A_OK=no
30820fi
30821
30822done
30823
30824
30825CFLAGS="$OLD_CFLAGS"
30826ac_ext=cpp
30827ac_cpp='$CXXCPP $CPPFLAGS'
30828ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30829ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30830ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30831
30832
30833if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30834
30835    # Print a helpful message on how to acquire the necessary build dependency.
30836    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30837    MISSING_DEPENDENCY=x11
30838    PKGHANDLER_COMMAND=
30839
30840    case $PKGHANDLER in
30841	apt-get)
30842                apt_help     $MISSING_DEPENDENCY ;;
30843    yum)
30844                yum_help     $MISSING_DEPENDENCY ;;
30845	port)
30846                port_help    $MISSING_DEPENDENCY ;;
30847	pkgutil)
30848                pkgutil_help $MISSING_DEPENDENCY ;;
30849	pkgadd)
30850                pkgadd_help  $MISSING_DEPENDENCY ;;
30851    * )
30852      break ;;
30853    esac
30854
30855    if test "x$PKGHANDLER_COMMAND" != x; then
30856        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30857    fi
30858
30859    { { $as_echo "$as_me:$LINENO: error: Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" >&5
30860$as_echo "$as_me: error: Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" >&2;}
30861   { (exit 1); exit 1; }; }
30862fi
30863
30864
30865
30866
30867
30868
30869###############################################################################
30870#
30871# The common unix printing system cups is used to print from java.
30872#
30873
30874# Check whether --with-cups was given.
30875if test "${with_cups+set}" = set; then
30876  withval=$with_cups;
30877fi
30878
30879
30880# Check whether --with-cups-include was given.
30881if test "${with_cups_include+set}" = set; then
30882  withval=$with_cups_include;
30883fi
30884
30885
30886if test "x$CUPS_NOT_NEEDED" = xyes; then
30887	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30888		{ $as_echo "$as_me:$LINENO: WARNING: cups not used, so --with-cups is ignored" >&5
30889$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30890	fi
30891	CUPS_CFLAGS=
30892else
30893	CUPS_FOUND=no
30894
30895	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30896	    { { $as_echo "$as_me:$LINENO: error: It is not possible to disable the use of cups. Remove the --without-cups option." >&5
30897$as_echo "$as_me: error: It is not possible to disable the use of cups. Remove the --without-cups option." >&2;}
30898   { (exit 1); exit 1; }; }
30899	fi
30900
30901	if test "x${with_cups}" != x; then
30902	    CUPS_CFLAGS="-I${with_cups}/include"
30903	    CUPS_FOUND=yes
30904	fi
30905	if test "x${with_cups_include}" != x; then
30906	    CUPS_CFLAGS="-I${with_cups_include}"
30907	    CUPS_FOUND=yes
30908	fi
30909	if test "x$CUPS_FOUND" = xno; then
30910
30911
30912    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30913        # Source the builddeps file again, to make sure it uses the latest variables!
30914        . $builddepsfile
30915        # Look for a target and build machine specific resource!
30916        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30917        if test "x$resource" = x; then
30918            # Ok, lets instead look for a target specific resource
30919            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30920        fi
30921        if test "x$resource" = x; then
30922            # Ok, lets instead look for a build specific resource
30923            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30924        fi
30925        if test "x$resource" = x; then
30926            # Ok, lets instead look for a generic resource
30927            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30928            resource=${builddep_cups}
30929        fi
30930        if test "x$resource" != x; then
30931            { $as_echo "$as_me:$LINENO: Using builddeps $resource for cups" >&5
30932$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30933	    # If the resource in the builddeps.conf file is an existing directory,
30934	    # for example /java/linux/cups
30935	    if test -d ${resource}; then
30936	       depdir=${resource}
30937	    else
30938
30939# cups is for example mymodule
30940# $resource is for example libs/general/libmymod_1_2_3.zip
30941# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30942# $with_builddeps_dir is for example /localhome/builddeps
30943# depdir is the name of the variable into which we store the depdir, eg MYMOD
30944# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30945# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30946    filename=`basename $resource`
30947    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30948    filebase=${filename%%.*}
30949    extension=${filename#*.}
30950    installdir=$with_builddeps_dir/$filebase
30951    if test ! -f $installdir/$filename.unpacked; then
30952        { $as_echo "$as_me:$LINENO: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30953$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30954        if test ! -d $installdir; then
30955            mkdir -p $installdir
30956        fi
30957        if test ! -d $installdir; then
30958            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
30959$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
30960   { (exit 1); exit 1; }; }
30961        fi
30962        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30963        touch $tmpfile
30964        if test ! -f $tmpfile; then
30965            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
30966$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
30967   { (exit 1); exit 1; }; }
30968        fi
30969
30970    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30971    # $tmpfile is the local file name for the downloaded file.
30972    VALID_TOOL=no
30973    if test "x$BDEPS_FTP" = xwget; then
30974       VALID_TOOL=yes
30975       wget -O $tmpfile $with_builddeps_server/$resource
30976    fi
30977    if test "x$BDEPS_FTP" = xlftp; then
30978       VALID_TOOL=yes
30979       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30980    fi
30981    if test "x$BDEPS_FTP" = xftp; then
30982        VALID_TOOL=yes
30983        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30984        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30985        FTPUSERPWD=${FTPSERVER%%@*}
30986        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30987            FTPUSER=${userpwd%%:*}
30988            FTPPWD=${userpwd#*@}
30989            FTPSERVER=${FTPSERVER#*@}
30990        else
30991            FTPUSER=ftp
30992            FTPPWD=ftp
30993        fi
30994        # the "pass" command does not work on some
30995        # ftp clients (read ftp.exe) but if it works,
30996        # passive mode is better!
30997        (\
30998            echo "user $FTPUSER $FTPPWD"        ;\
30999            echo "pass"                         ;\
31000            echo "bin"                          ;\
31001            echo "get $FTPPATH $tmpfile"              ;\
31002        ) | ftp -in $FTPSERVER
31003    fi
31004    if test "x$VALID_TOOL" != xyes; then
31005       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
31006$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
31007   { (exit 1); exit 1; }; }
31008    fi
31009
31010        mv $tmpfile $installdir/$filename
31011        if test ! -s $installdir/$filename; then
31012            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
31013$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
31014   { (exit 1); exit 1; }; }
31015        fi
31016        case "$extension" in
31017            zip)  echo "Unzipping $installdir/$filename..."
31018               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31019            ;;
31020            tar.gz) echo "Untaring $installdir/$filename..."
31021               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31022            ;;
31023            tgz) echo "Untaring $installdir/$filename..."
31024               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31025            ;;
31026            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
31027$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
31028   { (exit 1); exit 1; }; }
31029            ;;
31030        esac
31031    fi
31032    if test -f $installdir/$filename.unpacked; then
31033        depdir=$installdir
31034    fi
31035
31036	    fi
31037            # Source the builddeps file again, because in the previous command, the depdir
31038            # was updated to point at the current build dependency install directory.
31039            . $builddepsfile
31040            # Now extract variables from the builddeps.conf files.
31041            theroot=${builddep_cups_ROOT}
31042            thecflags=${builddep_cups_CFLAGS}
31043            thelibs=${builddep_cups_LIBS}
31044            if test "x$depdir" = x; then
31045                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency cups" >&5
31046$as_echo "$as_me: error: Could not download build dependency cups" >&2;}
31047   { (exit 1); exit 1; }; }
31048            fi
31049            CUPS=$depdir
31050            if test "x$theroot" != x; then
31051               CUPS="$theroot"
31052            fi
31053            if test "x$thecflags" != x; then
31054               CUPS_CFLAGS="$thecflags"
31055            fi
31056            if test "x$thelibs" != x; then
31057               CUPS_LIBS="$thelibs"
31058            fi
31059            CUPS_FOUND=yes
31060
31061        fi
31062
31063    fi
31064
31065	fi
31066	if test "x$CUPS_FOUND" = xno; then
31067	    # Are the cups headers installed in the default /usr/include location?
31068
31069
31070for ac_header in cups/cups.h cups/ppd.h
31071do
31072as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31073if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
31074  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
31075$as_echo_n "checking for $ac_header... " >&6; }
31076if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
31077  $as_echo_n "(cached) " >&6
31078fi
31079ac_res=`eval 'as_val=${'$as_ac_Header'}
31080		 $as_echo "$as_val"'`
31081	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
31082$as_echo "$ac_res" >&6; }
31083else
31084  # Is the header compilable?
31085{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
31086$as_echo_n "checking $ac_header usability... " >&6; }
31087cat >conftest.$ac_ext <<_ACEOF
31088/* confdefs.h.  */
31089_ACEOF
31090cat confdefs.h >>conftest.$ac_ext
31091cat >>conftest.$ac_ext <<_ACEOF
31092/* end confdefs.h.  */
31093$ac_includes_default
31094#include <$ac_header>
31095_ACEOF
31096rm -f conftest.$ac_objext
31097if { (ac_try="$ac_compile"
31098case "(($ac_try" in
31099  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31100  *) ac_try_echo=$ac_try;;
31101esac
31102eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31103$as_echo "$ac_try_echo") >&5
31104  (eval "$ac_compile") 2>conftest.er1
31105  ac_status=$?
31106  grep -v '^ *+' conftest.er1 >conftest.err
31107  rm -f conftest.er1
31108  cat conftest.err >&5
31109  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31110  (exit $ac_status); } && {
31111	 test -z "$ac_cxx_werror_flag" ||
31112	 test ! -s conftest.err
31113       } && test -s conftest.$ac_objext; then
31114  ac_header_compiler=yes
31115else
31116  $as_echo "$as_me: failed program was:" >&5
31117sed 's/^/| /' conftest.$ac_ext >&5
31118
31119	ac_header_compiler=no
31120fi
31121
31122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31123{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
31124$as_echo "$ac_header_compiler" >&6; }
31125
31126# Is the header present?
31127{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
31128$as_echo_n "checking $ac_header presence... " >&6; }
31129cat >conftest.$ac_ext <<_ACEOF
31130/* confdefs.h.  */
31131_ACEOF
31132cat confdefs.h >>conftest.$ac_ext
31133cat >>conftest.$ac_ext <<_ACEOF
31134/* end confdefs.h.  */
31135#include <$ac_header>
31136_ACEOF
31137if { (ac_try="$ac_cpp conftest.$ac_ext"
31138case "(($ac_try" in
31139  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31140  *) ac_try_echo=$ac_try;;
31141esac
31142eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31143$as_echo "$ac_try_echo") >&5
31144  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
31145  ac_status=$?
31146  grep -v '^ *+' conftest.er1 >conftest.err
31147  rm -f conftest.er1
31148  cat conftest.err >&5
31149  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31150  (exit $ac_status); } >/dev/null && {
31151	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
31152	 test ! -s conftest.err
31153       }; then
31154  ac_header_preproc=yes
31155else
31156  $as_echo "$as_me: failed program was:" >&5
31157sed 's/^/| /' conftest.$ac_ext >&5
31158
31159  ac_header_preproc=no
31160fi
31161
31162rm -f conftest.err conftest.$ac_ext
31163{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
31164$as_echo "$ac_header_preproc" >&6; }
31165
31166# So?  What about this header?
31167case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
31168  yes:no: )
31169    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
31170$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
31171    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
31172$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
31173    ac_header_preproc=yes
31174    ;;
31175  no:yes:* )
31176    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
31177$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
31178    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
31179$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
31180    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
31181$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
31182    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
31183$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
31184    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
31185$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
31186    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
31187$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
31188    ( cat <<\_ASBOX
31189## ----------------------------------------- ##
31190## Report this to build-dev@openjdk.java.net ##
31191## ----------------------------------------- ##
31192_ASBOX
31193     ) | sed "s/^/$as_me: WARNING:     /" >&2
31194    ;;
31195esac
31196{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
31197$as_echo_n "checking for $ac_header... " >&6; }
31198if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
31199  $as_echo_n "(cached) " >&6
31200else
31201  eval "$as_ac_Header=\$ac_header_preproc"
31202fi
31203ac_res=`eval 'as_val=${'$as_ac_Header'}
31204		 $as_echo "$as_val"'`
31205	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
31206$as_echo "$ac_res" >&6; }
31207
31208fi
31209as_val=`eval 'as_val=${'$as_ac_Header'}
31210		 $as_echo "$as_val"'`
31211   if test "x$as_val" = x""yes; then
31212  cat >>confdefs.h <<_ACEOF
31213#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31214_ACEOF
31215 CUPS_FOUND=yes
31216	                      CUPS_CFLAGS=
31217	                      DEFAULT_CUPS=yes
31218fi
31219
31220done
31221
31222	fi
31223	if test "x$CUPS_FOUND" = xno; then
31224	    # Getting nervous now? Lets poke around for standard Solaris third-party
31225	    # package installation locations.
31226	    { $as_echo "$as_me:$LINENO: checking for cups headers" >&5
31227$as_echo_n "checking for cups headers... " >&6; }
31228	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31229	       # An SFW package seems to be installed!
31230	       CUPS_FOUND=yes
31231	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31232	    elif test -s /opt/csw/include/cups/cups.h; then
31233	       # A CSW package seems to be installed!
31234	       CUPS_FOUND=yes
31235	       CUPS_CFLAGS="-I/opt/csw/include"
31236	    fi
31237	    { $as_echo "$as_me:$LINENO: result: $CUPS_FOUND" >&5
31238$as_echo "$CUPS_FOUND" >&6; }
31239	fi
31240	if test "x$CUPS_FOUND" = xno; then
31241
31242    # Print a helpful message on how to acquire the necessary build dependency.
31243    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31244    MISSING_DEPENDENCY=cups
31245    PKGHANDLER_COMMAND=
31246
31247    case $PKGHANDLER in
31248	apt-get)
31249                apt_help     $MISSING_DEPENDENCY ;;
31250    yum)
31251                yum_help     $MISSING_DEPENDENCY ;;
31252	port)
31253                port_help    $MISSING_DEPENDENCY ;;
31254	pkgutil)
31255                pkgutil_help $MISSING_DEPENDENCY ;;
31256	pkgadd)
31257                pkgadd_help  $MISSING_DEPENDENCY ;;
31258    * )
31259      break ;;
31260    esac
31261
31262    if test "x$PKGHANDLER_COMMAND" != x; then
31263        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31264    fi
31265
31266	    { { $as_echo "$as_me:$LINENO: error: Could not find cups! $HELP_MSG " >&5
31267$as_echo "$as_me: error: Could not find cups! $HELP_MSG " >&2;}
31268   { (exit 1); exit 1; }; }
31269	fi
31270fi
31271
31272
31273
31274
31275
31276
31277###############################################################################
31278#
31279# The ubiquitous freetype2 library is used to render fonts.
31280#
31281
31282# Check whether --with-freetype was given.
31283if test "${with_freetype+set}" = set; then
31284  withval=$with_freetype;
31285fi
31286
31287
31288# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31289USING_SYSTEM_FT_LIB=false
31290
31291if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31292	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31293		{ $as_echo "$as_me:$LINENO: WARNING: freetype not used, so --with-freetype is ignored" >&5
31294$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31295	fi
31296	FREETYPE2_CFLAGS=
31297	FREETYPE2_LIBS=
31298        FREETYPE2_LIB_PATH=
31299else
31300	FREETYPE2_FOUND=no
31301
31302	if test "x$with_freetype" != x; then
31303
31304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31305
31306  # Input might be given as Windows format, start by converting to
31307  # unix format.
31308  path="$with_freetype"
31309  new_path=`$CYGPATH -u "$path"`
31310
31311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31314  # "foo.exe" is OK but "foo" is an error.
31315  #
31316  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31317  # It is also a way to make sure we got the proper file name for the real test later on.
31318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31319  if test "x$test_shortpath" = x; then
31320    { $as_echo "$as_me:$LINENO: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31321$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31322    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of with_freetype" >&5
31323$as_echo "$as_me: error: Cannot locate the the path of with_freetype" >&2;}
31324   { (exit 1); exit 1; }; }
31325  fi
31326
31327  # Call helper function which possibly converts this using DOS-style short mode.
31328  # If so, the updated path is stored in $new_path.
31329
31330  input_path="$new_path"
31331  # Check if we need to convert this using DOS-style short mode. If the path
31332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31333  # take no chances and rewrite it.
31334  # Note: m4 eats our [], so we need to use [ and ] instead.
31335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31336  if test "x$has_forbidden_chars" != x; then
31337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31341      # Going to short mode and back again did indeed matter. Since short mode is
31342      # case insensitive, let's make it lowercase to improve readability.
31343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31344      # Now convert it back to Unix-stile (cygpath)
31345      input_path=`$CYGPATH -u "$shortmode_path"`
31346      new_path="$input_path"
31347    fi
31348  fi
31349
31350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31351  if test "x$test_cygdrive_prefix" = x; then
31352    # As a simple fix, exclude /usr/bin since it's not a real path.
31353    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31355      # a path prefixed by /cygdrive for fixpath to work.
31356      new_path="$CYGWIN_ROOT_PATH$input_path"
31357    fi
31358  fi
31359
31360
31361  if test "x$path" != "x$new_path"; then
31362    with_freetype="$new_path"
31363    { $as_echo "$as_me:$LINENO: Rewriting with_freetype to \"$new_path\"" >&5
31364$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31365  fi
31366
31367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31368
31369  path="$with_freetype"
31370  has_colon=`$ECHO $path | $GREP ^.:`
31371  new_path="$path"
31372  if test "x$has_colon" = x; then
31373    # Not in mixed or Windows style, start by that.
31374    new_path=`cmd //c echo $path`
31375  fi
31376
31377
31378  input_path="$new_path"
31379  # Check if we need to convert this using DOS-style short mode. If the path
31380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31381  # take no chances and rewrite it.
31382  # Note: m4 eats our [], so we need to use [ and ] instead.
31383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31384  if test "x$has_forbidden_chars" != x; then
31385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31387  fi
31388
31389
31390  windows_path="$new_path"
31391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31392    unix_path=`$CYGPATH -u "$windows_path"`
31393    new_path="$unix_path"
31394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31396    new_path="$unix_path"
31397  fi
31398
31399  if test "x$path" != "x$new_path"; then
31400    with_freetype="$new_path"
31401    { $as_echo "$as_me:$LINENO: Rewriting with_freetype to \"$new_path\"" >&5
31402$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31403  fi
31404
31405  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31406  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31407
31408  else
31409    # We're on a posix platform. Hooray! :)
31410    path="$with_freetype"
31411
31412    if test ! -f "$path" && test ! -d "$path"; then
31413      { { $as_echo "$as_me:$LINENO: error: The path of with_freetype, which resolves as \"$path\", is not found." >&5
31414$as_echo "$as_me: error: The path of with_freetype, which resolves as \"$path\", is not found." >&2;}
31415   { (exit 1); exit 1; }; }
31416    fi
31417
31418    has_space=`$ECHO "$path" | $GREP " "`
31419    if test "x$has_space" != x; then
31420      { $as_echo "$as_me:$LINENO: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31421$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31422      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
31423$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
31424   { (exit 1); exit 1; }; }
31425    fi
31426  fi
31427
31428	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31429            FREETYPE2_LIB_PATH="$with_freetype/lib"
31430            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31431                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31432                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31433            fi
31434            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31435                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31436            fi
31437	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31438            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31439                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31440            fi
31441 	    FREETYPE2_FOUND=yes
31442   	    if test "x$FREETYPE2_FOUND" = xyes; then
31443	        # Verify that the directories exist
31444                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31445		   { { $as_echo "$as_me:$LINENO: error: Could not find the expected directories $with_freetype/lib and $with_freetype/include" >&5
31446$as_echo "$as_me: error: Could not find the expected directories $with_freetype/lib and $with_freetype/include" >&2;}
31447   { (exit 1); exit 1; }; }
31448		fi
31449	        # List the contents of the lib.
31450		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31451                if test "x$FREETYPELIB" = x; then
31452		   { { $as_echo "$as_me:$LINENO: error: Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" >&5
31453$as_echo "$as_me: error: Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" >&2;}
31454   { (exit 1); exit 1; }; }
31455		fi
31456	        # Check one h-file
31457                if ! test -s "$with_freetype/include/ft2build.h"; then
31458		   { { $as_echo "$as_me:$LINENO: error: Could not find $with_freetype/include/ft2build.h" >&5
31459$as_echo "$as_me: error: Could not find $with_freetype/include/ft2build.h" >&2;}
31460   { (exit 1); exit 1; }; }
31461		fi
31462            fi
31463        fi
31464	if test "x$FREETYPE2_FOUND" = xno; then
31465
31466
31467    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31468        # Source the builddeps file again, to make sure it uses the latest variables!
31469        . $builddepsfile
31470        # Look for a target and build machine specific resource!
31471        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31472        if test "x$resource" = x; then
31473            # Ok, lets instead look for a target specific resource
31474            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31475        fi
31476        if test "x$resource" = x; then
31477            # Ok, lets instead look for a build specific resource
31478            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31479        fi
31480        if test "x$resource" = x; then
31481            # Ok, lets instead look for a generic resource
31482            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31483            resource=${builddep_freetype2}
31484        fi
31485        if test "x$resource" != x; then
31486            { $as_echo "$as_me:$LINENO: Using builddeps $resource for freetype2" >&5
31487$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31488	    # If the resource in the builddeps.conf file is an existing directory,
31489	    # for example /java/linux/cups
31490	    if test -d ${resource}; then
31491	       depdir=${resource}
31492	    else
31493
31494# freetype2 is for example mymodule
31495# $resource is for example libs/general/libmymod_1_2_3.zip
31496# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31497# $with_builddeps_dir is for example /localhome/builddeps
31498# depdir is the name of the variable into which we store the depdir, eg MYMOD
31499# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31500# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31501    filename=`basename $resource`
31502    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31503    filebase=${filename%%.*}
31504    extension=${filename#*.}
31505    installdir=$with_builddeps_dir/$filebase
31506    if test ! -f $installdir/$filename.unpacked; then
31507        { $as_echo "$as_me:$LINENO: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31508$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31509        if test ! -d $installdir; then
31510            mkdir -p $installdir
31511        fi
31512        if test ! -d $installdir; then
31513            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
31514$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
31515   { (exit 1); exit 1; }; }
31516        fi
31517        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31518        touch $tmpfile
31519        if test ! -f $tmpfile; then
31520            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
31521$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
31522   { (exit 1); exit 1; }; }
31523        fi
31524
31525    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31526    # $tmpfile is the local file name for the downloaded file.
31527    VALID_TOOL=no
31528    if test "x$BDEPS_FTP" = xwget; then
31529       VALID_TOOL=yes
31530       wget -O $tmpfile $with_builddeps_server/$resource
31531    fi
31532    if test "x$BDEPS_FTP" = xlftp; then
31533       VALID_TOOL=yes
31534       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31535    fi
31536    if test "x$BDEPS_FTP" = xftp; then
31537        VALID_TOOL=yes
31538        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31539        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31540        FTPUSERPWD=${FTPSERVER%%@*}
31541        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31542            FTPUSER=${userpwd%%:*}
31543            FTPPWD=${userpwd#*@}
31544            FTPSERVER=${FTPSERVER#*@}
31545        else
31546            FTPUSER=ftp
31547            FTPPWD=ftp
31548        fi
31549        # the "pass" command does not work on some
31550        # ftp clients (read ftp.exe) but if it works,
31551        # passive mode is better!
31552        (\
31553            echo "user $FTPUSER $FTPPWD"        ;\
31554            echo "pass"                         ;\
31555            echo "bin"                          ;\
31556            echo "get $FTPPATH $tmpfile"              ;\
31557        ) | ftp -in $FTPSERVER
31558    fi
31559    if test "x$VALID_TOOL" != xyes; then
31560       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
31561$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
31562   { (exit 1); exit 1; }; }
31563    fi
31564
31565        mv $tmpfile $installdir/$filename
31566        if test ! -s $installdir/$filename; then
31567            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
31568$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
31569   { (exit 1); exit 1; }; }
31570        fi
31571        case "$extension" in
31572            zip)  echo "Unzipping $installdir/$filename..."
31573               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31574            ;;
31575            tar.gz) echo "Untaring $installdir/$filename..."
31576               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31577            ;;
31578            tgz) echo "Untaring $installdir/$filename..."
31579               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31580            ;;
31581            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
31582$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
31583   { (exit 1); exit 1; }; }
31584            ;;
31585        esac
31586    fi
31587    if test -f $installdir/$filename.unpacked; then
31588        depdir=$installdir
31589    fi
31590
31591	    fi
31592            # Source the builddeps file again, because in the previous command, the depdir
31593            # was updated to point at the current build dependency install directory.
31594            . $builddepsfile
31595            # Now extract variables from the builddeps.conf files.
31596            theroot=${builddep_freetype2_ROOT}
31597            thecflags=${builddep_freetype2_CFLAGS}
31598            thelibs=${builddep_freetype2_LIBS}
31599            if test "x$depdir" = x; then
31600                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency freetype2" >&5
31601$as_echo "$as_me: error: Could not download build dependency freetype2" >&2;}
31602   { (exit 1); exit 1; }; }
31603            fi
31604            FREETYPE2=$depdir
31605            if test "x$theroot" != x; then
31606               FREETYPE2="$theroot"
31607            fi
31608            if test "x$thecflags" != x; then
31609               FREETYPE2_CFLAGS="$thecflags"
31610            fi
31611            if test "x$thelibs" != x; then
31612               FREETYPE2_LIBS="$thelibs"
31613            fi
31614            FREETYPE2_FOUND=yes
31615            else FREETYPE2_FOUND=no
31616
31617        fi
31618        else FREETYPE2_FOUND=no
31619
31620    fi
31621
31622            USING_SYSTEM_FT_LIB=true
31623	fi
31624	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31625            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31626
31627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31628
31629  # Input might be given as Windows format, start by converting to
31630  # unix format.
31631  path="$FREETYPELOCATION"
31632  new_path=`$CYGPATH -u "$path"`
31633
31634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31637  # "foo.exe" is OK but "foo" is an error.
31638  #
31639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31640  # It is also a way to make sure we got the proper file name for the real test later on.
31641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31642  if test "x$test_shortpath" = x; then
31643    { $as_echo "$as_me:$LINENO: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31644$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31645    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FREETYPELOCATION" >&5
31646$as_echo "$as_me: error: Cannot locate the the path of FREETYPELOCATION" >&2;}
31647   { (exit 1); exit 1; }; }
31648  fi
31649
31650  # Call helper function which possibly converts this using DOS-style short mode.
31651  # If so, the updated path is stored in $new_path.
31652
31653  input_path="$new_path"
31654  # Check if we need to convert this using DOS-style short mode. If the path
31655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31656  # take no chances and rewrite it.
31657  # Note: m4 eats our [], so we need to use [ and ] instead.
31658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31659  if test "x$has_forbidden_chars" != x; then
31660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31664      # Going to short mode and back again did indeed matter. Since short mode is
31665      # case insensitive, let's make it lowercase to improve readability.
31666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31667      # Now convert it back to Unix-stile (cygpath)
31668      input_path=`$CYGPATH -u "$shortmode_path"`
31669      new_path="$input_path"
31670    fi
31671  fi
31672
31673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31674  if test "x$test_cygdrive_prefix" = x; then
31675    # As a simple fix, exclude /usr/bin since it's not a real path.
31676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31678      # a path prefixed by /cygdrive for fixpath to work.
31679      new_path="$CYGWIN_ROOT_PATH$input_path"
31680    fi
31681  fi
31682
31683
31684  if test "x$path" != "x$new_path"; then
31685    FREETYPELOCATION="$new_path"
31686    { $as_echo "$as_me:$LINENO: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31687$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31688  fi
31689
31690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31691
31692  path="$FREETYPELOCATION"
31693  has_colon=`$ECHO $path | $GREP ^.:`
31694  new_path="$path"
31695  if test "x$has_colon" = x; then
31696    # Not in mixed or Windows style, start by that.
31697    new_path=`cmd //c echo $path`
31698  fi
31699
31700
31701  input_path="$new_path"
31702  # Check if we need to convert this using DOS-style short mode. If the path
31703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31704  # take no chances and rewrite it.
31705  # Note: m4 eats our [], so we need to use [ and ] instead.
31706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31707  if test "x$has_forbidden_chars" != x; then
31708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31710  fi
31711
31712
31713  windows_path="$new_path"
31714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31715    unix_path=`$CYGPATH -u "$windows_path"`
31716    new_path="$unix_path"
31717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31719    new_path="$unix_path"
31720  fi
31721
31722  if test "x$path" != "x$new_path"; then
31723    FREETYPELOCATION="$new_path"
31724    { $as_echo "$as_me:$LINENO: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31725$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31726  fi
31727
31728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31730
31731  else
31732    # We're on a posix platform. Hooray! :)
31733    path="$FREETYPELOCATION"
31734
31735    if test ! -f "$path" && test ! -d "$path"; then
31736      { { $as_echo "$as_me:$LINENO: error: The path of FREETYPELOCATION, which resolves as \"$path\", is not found." >&5
31737$as_echo "$as_me: error: The path of FREETYPELOCATION, which resolves as \"$path\", is not found." >&2;}
31738   { (exit 1); exit 1; }; }
31739    fi
31740
31741    has_space=`$ECHO "$path" | $GREP " "`
31742    if test "x$has_space" != x; then
31743      { $as_echo "$as_me:$LINENO: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31744$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31745      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
31746$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
31747   { (exit 1); exit 1; }; }
31748    fi
31749  fi
31750
31751	    { $as_echo "$as_me:$LINENO: checking for freetype in some standard windows locations" >&5
31752$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31753	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31754	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31755	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31756 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31757                if ! test -s "$FREETYPE2_LIBS"; then
31758		   { { $as_echo "$as_me:$LINENO: error: Could not find $FREETYPE2_LIBS" >&5
31759$as_echo "$as_me: error: Could not find $FREETYPE2_LIBS" >&2;}
31760   { (exit 1); exit 1; }; }
31761		fi
31762                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31763		   { { $as_echo "$as_me:$LINENO: error: Could not find $FREETYPE2_LIB_PATH/freetype.dll" >&5
31764$as_echo "$as_me: error: Could not find $FREETYPE2_LIB_PATH/freetype.dll" >&2;}
31765   { (exit 1); exit 1; }; }
31766		fi
31767                USING_SYSTEM_FT_LIB=true
31768                FREETYPE2_FOUND=yes
31769	    fi
31770	    { $as_echo "$as_me:$LINENO: result: $FREETYPE2_FOUND" >&5
31771$as_echo "$FREETYPE2_FOUND" >&6; }
31772        fi
31773	if test "x$FREETYPE2_FOUND" = xno; then
31774
31775pkg_failed=no
31776{ $as_echo "$as_me:$LINENO: checking for FREETYPE2" >&5
31777$as_echo_n "checking for FREETYPE2... " >&6; }
31778
31779if test -n "$FREETYPE2_CFLAGS"; then
31780    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31781 elif test -n "$PKG_CONFIG"; then
31782    if test -n "$PKG_CONFIG" && \
31783    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5
31784  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31785  ac_status=$?
31786  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31787  (exit $ac_status); }; then
31788  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31789else
31790  pkg_failed=yes
31791fi
31792 else
31793    pkg_failed=untried
31794fi
31795if test -n "$FREETYPE2_LIBS"; then
31796    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31797 elif test -n "$PKG_CONFIG"; then
31798    if test -n "$PKG_CONFIG" && \
31799    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5
31800  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31801  ac_status=$?
31802  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31803  (exit $ac_status); }; then
31804  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31805else
31806  pkg_failed=yes
31807fi
31808 else
31809    pkg_failed=untried
31810fi
31811
31812
31813
31814if test $pkg_failed = yes; then
31815
31816if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31817        _pkg_short_errors_supported=yes
31818else
31819        _pkg_short_errors_supported=no
31820fi
31821        if test $_pkg_short_errors_supported = yes; then
31822	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31823        else
31824	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31825        fi
31826	# Put the nasty error message in config.log where it belongs
31827	echo "$FREETYPE2_PKG_ERRORS" >&5
31828
31829	{ $as_echo "$as_me:$LINENO: result: no" >&5
31830$as_echo "no" >&6; }
31831                FREETYPE2_FOUND=no
31832elif test $pkg_failed = untried; then
31833	FREETYPE2_FOUND=no
31834else
31835	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31836	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31837        { $as_echo "$as_me:$LINENO: result: yes" >&5
31838$as_echo "yes" >&6; }
31839	FREETYPE2_FOUND=yes
31840fi
31841            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31842            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31843            USING_SYSTEM_FT_LIB=true
31844            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31845            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31846              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31847            fi
31848	fi
31849	if test "x$FREETYPE2_FOUND" = xno; then
31850	    { $as_echo "$as_me:$LINENO: checking for freetype in some standard locations" >&5
31851$as_echo_n "checking for freetype in some standard locations... " >&6; }
31852
31853	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
31854	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
31855	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
31856	    fi
31857	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
31858	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
31859	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31860	    fi
31861
31862	    PREV_CXXCFLAGS="$CXXFLAGS"
31863	    PREV_LDFLAGS="$LDFLAGS"
31864	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31865	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31866	    cat >conftest.$ac_ext <<_ACEOF
31867/* confdefs.h.  */
31868_ACEOF
31869cat confdefs.h >>conftest.$ac_ext
31870cat >>conftest.$ac_ext <<_ACEOF
31871/* end confdefs.h.  */
31872#include<ft2build.h>
31873	                    #include FT_FREETYPE_H
31874	                   int main() { return 0; }
31875
31876_ACEOF
31877rm -f conftest.$ac_objext conftest$ac_exeext
31878if { (ac_try="$ac_link"
31879case "(($ac_try" in
31880  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31881  *) ac_try_echo=$ac_try;;
31882esac
31883eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31884$as_echo "$ac_try_echo") >&5
31885  (eval "$ac_link") 2>conftest.er1
31886  ac_status=$?
31887  grep -v '^ *+' conftest.er1 >conftest.err
31888  rm -f conftest.er1
31889  cat conftest.err >&5
31890  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31891  (exit $ac_status); } && {
31892	 test -z "$ac_cxx_werror_flag" ||
31893	 test ! -s conftest.err
31894       } && test -s conftest$ac_exeext && {
31895	 test "$cross_compiling" = yes ||
31896	 $as_test_x conftest$ac_exeext
31897       }; then
31898
31899	                      # Yes, the default cflags and libs did the trick.
31900	                      FREETYPE2_FOUND=yes
31901	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31902	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31903
31904else
31905  $as_echo "$as_me: failed program was:" >&5
31906sed 's/^/| /' conftest.$ac_ext >&5
31907
31908
31909	                      FREETYPE2_FOUND=no
31910
31911fi
31912
31913rm -rf conftest.dSYM
31914rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
31915      conftest$ac_exeext conftest.$ac_ext
31916            CXXCFLAGS="$PREV_CXXFLAGS"
31917	    LDFLAGS="$PREV_LDFLAGS"
31918	    { $as_echo "$as_me:$LINENO: result: $FREETYPE2_FOUND" >&5
31919$as_echo "$FREETYPE2_FOUND" >&6; }
31920            USING_SYSTEM_FT_LIB=true
31921	fi
31922	if test "x$FREETYPE2_FOUND" = xno; then
31923
31924    # Print a helpful message on how to acquire the necessary build dependency.
31925    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31926    MISSING_DEPENDENCY=freetype2
31927    PKGHANDLER_COMMAND=
31928
31929    case $PKGHANDLER in
31930	apt-get)
31931                apt_help     $MISSING_DEPENDENCY ;;
31932    yum)
31933                yum_help     $MISSING_DEPENDENCY ;;
31934	port)
31935                port_help    $MISSING_DEPENDENCY ;;
31936	pkgutil)
31937                pkgutil_help $MISSING_DEPENDENCY ;;
31938	pkgadd)
31939                pkgadd_help  $MISSING_DEPENDENCY ;;
31940    * )
31941      break ;;
31942    esac
31943
31944    if test "x$PKGHANDLER_COMMAND" != x; then
31945        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31946    fi
31947
31948		{ { $as_echo "$as_me:$LINENO: error: Could not find freetype2! $HELP_MSG " >&5
31949$as_echo "$as_me: error: Could not find freetype2! $HELP_MSG " >&2;}
31950   { (exit 1); exit 1; }; }
31951	fi
31952
31953        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31954            # AC_CHECK_LIB does not support use of cl.exe
31955            PREV_LDFLAGS="$LDFLAGS"
31956            LDFLAGS="$FREETYPE2_LIBS"
31957            { $as_echo "$as_me:$LINENO: checking for FT_Init_FreeType in -lfreetype" >&5
31958$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31959if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then
31960  $as_echo_n "(cached) " >&6
31961else
31962  ac_check_lib_save_LIBS=$LIBS
31963LIBS="-lfreetype  $LIBS"
31964cat >conftest.$ac_ext <<_ACEOF
31965/* confdefs.h.  */
31966_ACEOF
31967cat confdefs.h >>conftest.$ac_ext
31968cat >>conftest.$ac_ext <<_ACEOF
31969/* end confdefs.h.  */
31970
31971/* Override any GCC internal prototype to avoid an error.
31972   Use char because int might match the return type of a GCC
31973   builtin and then its argument prototype would still apply.  */
31974#ifdef __cplusplus
31975extern "C"
31976#endif
31977char FT_Init_FreeType ();
31978int
31979main ()
31980{
31981return FT_Init_FreeType ();
31982  ;
31983  return 0;
31984}
31985_ACEOF
31986rm -f conftest.$ac_objext conftest$ac_exeext
31987if { (ac_try="$ac_link"
31988case "(($ac_try" in
31989  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31990  *) ac_try_echo=$ac_try;;
31991esac
31992eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31993$as_echo "$ac_try_echo") >&5
31994  (eval "$ac_link") 2>conftest.er1
31995  ac_status=$?
31996  grep -v '^ *+' conftest.er1 >conftest.err
31997  rm -f conftest.er1
31998  cat conftest.err >&5
31999  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32000  (exit $ac_status); } && {
32001	 test -z "$ac_cxx_werror_flag" ||
32002	 test ! -s conftest.err
32003       } && test -s conftest$ac_exeext && {
32004	 test "$cross_compiling" = yes ||
32005	 $as_test_x conftest$ac_exeext
32006       }; then
32007  ac_cv_lib_freetype_FT_Init_FreeType=yes
32008else
32009  $as_echo "$as_me: failed program was:" >&5
32010sed 's/^/| /' conftest.$ac_ext >&5
32011
32012	ac_cv_lib_freetype_FT_Init_FreeType=no
32013fi
32014
32015rm -rf conftest.dSYM
32016rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32017      conftest$ac_exeext conftest.$ac_ext
32018LIBS=$ac_check_lib_save_LIBS
32019fi
32020{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
32021$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
32022if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then
32023  FREETYPE2_FOUND=true
32024else
32025  { { $as_echo "$as_me:$LINENO: error: Could not find freetype2! $HELP_MSG " >&5
32026$as_echo "$as_me: error: Could not find freetype2! $HELP_MSG " >&2;}
32027   { (exit 1); exit 1; }; }
32028fi
32029
32030            LDFLAGS="$PREV_LDFLAGS"
32031        fi
32032fi
32033
32034
32035
32036
32037
32038
32039
32040
32041
32042###############################################################################
32043#
32044# Check for alsa headers and libraries. Used on Linux/GNU systems.
32045#
32046
32047# Check whether --with-alsa was given.
32048if test "${with_alsa+set}" = set; then
32049  withval=$with_alsa;
32050fi
32051
32052
32053# Check whether --with-alsa-include was given.
32054if test "${with_alsa_include+set}" = set; then
32055  withval=$with_alsa_include;
32056fi
32057
32058
32059# Check whether --with-alsa-lib was given.
32060if test "${with_alsa_lib+set}" = set; then
32061  withval=$with_alsa_lib;
32062fi
32063
32064
32065if test "x$ALSA_NOT_NEEDED" = xyes; then
32066	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
32067		{ $as_echo "$as_me:$LINENO: WARNING: alsa not used, so --with-alsa is ignored" >&5
32068$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
32069	fi
32070	ALSA_CFLAGS=
32071	ALSA_LIBS=
32072else
32073	ALSA_FOUND=no
32074
32075	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
32076	    { { $as_echo "$as_me:$LINENO: error: It is not possible to disable the use of alsa. Remove the --without-alsa option." >&5
32077$as_echo "$as_me: error: It is not possible to disable the use of alsa. Remove the --without-alsa option." >&2;}
32078   { (exit 1); exit 1; }; }
32079	fi
32080
32081	if test "x${with_alsa}" != x; then
32082	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
32083	    ALSA_CFLAGS="-I${with_alsa}/include"
32084	    ALSA_FOUND=yes
32085	fi
32086	if test "x${with_alsa_include}" != x; then
32087	    ALSA_CFLAGS="-I${with_alsa_include}"
32088	    ALSA_FOUND=yes
32089	fi
32090	if test "x${with_alsa_lib}" != x; then
32091	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
32092	    ALSA_FOUND=yes
32093	fi
32094	if test "x$ALSA_FOUND" = xno; then
32095
32096
32097    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
32098        # Source the builddeps file again, to make sure it uses the latest variables!
32099        . $builddepsfile
32100        # Look for a target and build machine specific resource!
32101        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
32102        if test "x$resource" = x; then
32103            # Ok, lets instead look for a target specific resource
32104            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
32105        fi
32106        if test "x$resource" = x; then
32107            # Ok, lets instead look for a build specific resource
32108            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
32109        fi
32110        if test "x$resource" = x; then
32111            # Ok, lets instead look for a generic resource
32112            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
32113            resource=${builddep_alsa}
32114        fi
32115        if test "x$resource" != x; then
32116            { $as_echo "$as_me:$LINENO: Using builddeps $resource for alsa" >&5
32117$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
32118	    # If the resource in the builddeps.conf file is an existing directory,
32119	    # for example /java/linux/cups
32120	    if test -d ${resource}; then
32121	       depdir=${resource}
32122	    else
32123
32124# alsa is for example mymodule
32125# $resource is for example libs/general/libmymod_1_2_3.zip
32126# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
32127# $with_builddeps_dir is for example /localhome/builddeps
32128# depdir is the name of the variable into which we store the depdir, eg MYMOD
32129# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
32130# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
32131    filename=`basename $resource`
32132    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
32133    filebase=${filename%%.*}
32134    extension=${filename#*.}
32135    installdir=$with_builddeps_dir/$filebase
32136    if test ! -f $installdir/$filename.unpacked; then
32137        { $as_echo "$as_me:$LINENO: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
32138$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
32139        if test ! -d $installdir; then
32140            mkdir -p $installdir
32141        fi
32142        if test ! -d $installdir; then
32143            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
32144$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
32145   { (exit 1); exit 1; }; }
32146        fi
32147        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
32148        touch $tmpfile
32149        if test ! -f $tmpfile; then
32150            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
32151$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
32152   { (exit 1); exit 1; }; }
32153        fi
32154
32155    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
32156    # $tmpfile is the local file name for the downloaded file.
32157    VALID_TOOL=no
32158    if test "x$BDEPS_FTP" = xwget; then
32159       VALID_TOOL=yes
32160       wget -O $tmpfile $with_builddeps_server/$resource
32161    fi
32162    if test "x$BDEPS_FTP" = xlftp; then
32163       VALID_TOOL=yes
32164       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
32165    fi
32166    if test "x$BDEPS_FTP" = xftp; then
32167        VALID_TOOL=yes
32168        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
32169        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
32170        FTPUSERPWD=${FTPSERVER%%@*}
32171        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
32172            FTPUSER=${userpwd%%:*}
32173            FTPPWD=${userpwd#*@}
32174            FTPSERVER=${FTPSERVER#*@}
32175        else
32176            FTPUSER=ftp
32177            FTPPWD=ftp
32178        fi
32179        # the "pass" command does not work on some
32180        # ftp clients (read ftp.exe) but if it works,
32181        # passive mode is better!
32182        (\
32183            echo "user $FTPUSER $FTPPWD"        ;\
32184            echo "pass"                         ;\
32185            echo "bin"                          ;\
32186            echo "get $FTPPATH $tmpfile"              ;\
32187        ) | ftp -in $FTPSERVER
32188    fi
32189    if test "x$VALID_TOOL" != xyes; then
32190       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
32191$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
32192   { (exit 1); exit 1; }; }
32193    fi
32194
32195        mv $tmpfile $installdir/$filename
32196        if test ! -s $installdir/$filename; then
32197            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
32198$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
32199   { (exit 1); exit 1; }; }
32200        fi
32201        case "$extension" in
32202            zip)  echo "Unzipping $installdir/$filename..."
32203               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32204            ;;
32205            tar.gz) echo "Untaring $installdir/$filename..."
32206               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32207            ;;
32208            tgz) echo "Untaring $installdir/$filename..."
32209               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32210            ;;
32211            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
32212$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
32213   { (exit 1); exit 1; }; }
32214            ;;
32215        esac
32216    fi
32217    if test -f $installdir/$filename.unpacked; then
32218        depdir=$installdir
32219    fi
32220
32221	    fi
32222            # Source the builddeps file again, because in the previous command, the depdir
32223            # was updated to point at the current build dependency install directory.
32224            . $builddepsfile
32225            # Now extract variables from the builddeps.conf files.
32226            theroot=${builddep_alsa_ROOT}
32227            thecflags=${builddep_alsa_CFLAGS}
32228            thelibs=${builddep_alsa_LIBS}
32229            if test "x$depdir" = x; then
32230                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency alsa" >&5
32231$as_echo "$as_me: error: Could not download build dependency alsa" >&2;}
32232   { (exit 1); exit 1; }; }
32233            fi
32234            ALSA=$depdir
32235            if test "x$theroot" != x; then
32236               ALSA="$theroot"
32237            fi
32238            if test "x$thecflags" != x; then
32239               ALSA_CFLAGS="$thecflags"
32240            fi
32241            if test "x$thelibs" != x; then
32242               ALSA_LIBS="$thelibs"
32243            fi
32244            ALSA_FOUND=yes
32245            else ALSA_FOUND=no
32246
32247        fi
32248        else ALSA_FOUND=no
32249
32250    fi
32251
32252	fi
32253	if test "x$ALSA_FOUND" = xno; then
32254
32255pkg_failed=no
32256{ $as_echo "$as_me:$LINENO: checking for ALSA" >&5
32257$as_echo_n "checking for ALSA... " >&6; }
32258
32259if test -n "$ALSA_CFLAGS"; then
32260    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32261 elif test -n "$PKG_CONFIG"; then
32262    if test -n "$PKG_CONFIG" && \
32263    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&5
32264  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32265  ac_status=$?
32266  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32267  (exit $ac_status); }; then
32268  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32269else
32270  pkg_failed=yes
32271fi
32272 else
32273    pkg_failed=untried
32274fi
32275if test -n "$ALSA_LIBS"; then
32276    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32277 elif test -n "$PKG_CONFIG"; then
32278    if test -n "$PKG_CONFIG" && \
32279    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&5
32280  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32281  ac_status=$?
32282  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32283  (exit $ac_status); }; then
32284  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32285else
32286  pkg_failed=yes
32287fi
32288 else
32289    pkg_failed=untried
32290fi
32291
32292
32293
32294if test $pkg_failed = yes; then
32295
32296if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32297        _pkg_short_errors_supported=yes
32298else
32299        _pkg_short_errors_supported=no
32300fi
32301        if test $_pkg_short_errors_supported = yes; then
32302	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32303        else
32304	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32305        fi
32306	# Put the nasty error message in config.log where it belongs
32307	echo "$ALSA_PKG_ERRORS" >&5
32308
32309	{ $as_echo "$as_me:$LINENO: result: no" >&5
32310$as_echo "no" >&6; }
32311                ALSA_FOUND=no
32312elif test $pkg_failed = untried; then
32313	ALSA_FOUND=no
32314else
32315	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32316	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32317        { $as_echo "$as_me:$LINENO: result: yes" >&5
32318$as_echo "yes" >&6; }
32319	ALSA_FOUND=yes
32320fi
32321	fi
32322	if test "x$ALSA_FOUND" = xno; then
32323
32324for ac_header in alsa/asoundlib.h
32325do
32326as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
32327if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
32328  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
32329$as_echo_n "checking for $ac_header... " >&6; }
32330if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
32331  $as_echo_n "(cached) " >&6
32332fi
32333ac_res=`eval 'as_val=${'$as_ac_Header'}
32334		 $as_echo "$as_val"'`
32335	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
32336$as_echo "$ac_res" >&6; }
32337else
32338  # Is the header compilable?
32339{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
32340$as_echo_n "checking $ac_header usability... " >&6; }
32341cat >conftest.$ac_ext <<_ACEOF
32342/* confdefs.h.  */
32343_ACEOF
32344cat confdefs.h >>conftest.$ac_ext
32345cat >>conftest.$ac_ext <<_ACEOF
32346/* end confdefs.h.  */
32347$ac_includes_default
32348#include <$ac_header>
32349_ACEOF
32350rm -f conftest.$ac_objext
32351if { (ac_try="$ac_compile"
32352case "(($ac_try" in
32353  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32354  *) ac_try_echo=$ac_try;;
32355esac
32356eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32357$as_echo "$ac_try_echo") >&5
32358  (eval "$ac_compile") 2>conftest.er1
32359  ac_status=$?
32360  grep -v '^ *+' conftest.er1 >conftest.err
32361  rm -f conftest.er1
32362  cat conftest.err >&5
32363  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32364  (exit $ac_status); } && {
32365	 test -z "$ac_cxx_werror_flag" ||
32366	 test ! -s conftest.err
32367       } && test -s conftest.$ac_objext; then
32368  ac_header_compiler=yes
32369else
32370  $as_echo "$as_me: failed program was:" >&5
32371sed 's/^/| /' conftest.$ac_ext >&5
32372
32373	ac_header_compiler=no
32374fi
32375
32376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32377{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
32378$as_echo "$ac_header_compiler" >&6; }
32379
32380# Is the header present?
32381{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
32382$as_echo_n "checking $ac_header presence... " >&6; }
32383cat >conftest.$ac_ext <<_ACEOF
32384/* confdefs.h.  */
32385_ACEOF
32386cat confdefs.h >>conftest.$ac_ext
32387cat >>conftest.$ac_ext <<_ACEOF
32388/* end confdefs.h.  */
32389#include <$ac_header>
32390_ACEOF
32391if { (ac_try="$ac_cpp conftest.$ac_ext"
32392case "(($ac_try" in
32393  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32394  *) ac_try_echo=$ac_try;;
32395esac
32396eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32397$as_echo "$ac_try_echo") >&5
32398  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
32399  ac_status=$?
32400  grep -v '^ *+' conftest.er1 >conftest.err
32401  rm -f conftest.er1
32402  cat conftest.err >&5
32403  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32404  (exit $ac_status); } >/dev/null && {
32405	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
32406	 test ! -s conftest.err
32407       }; then
32408  ac_header_preproc=yes
32409else
32410  $as_echo "$as_me: failed program was:" >&5
32411sed 's/^/| /' conftest.$ac_ext >&5
32412
32413  ac_header_preproc=no
32414fi
32415
32416rm -f conftest.err conftest.$ac_ext
32417{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
32418$as_echo "$ac_header_preproc" >&6; }
32419
32420# So?  What about this header?
32421case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
32422  yes:no: )
32423    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
32424$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
32425    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
32426$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
32427    ac_header_preproc=yes
32428    ;;
32429  no:yes:* )
32430    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
32431$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
32432    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
32433$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
32434    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
32435$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
32436    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
32437$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
32438    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
32439$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
32440    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
32441$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
32442    ( cat <<\_ASBOX
32443## ----------------------------------------- ##
32444## Report this to build-dev@openjdk.java.net ##
32445## ----------------------------------------- ##
32446_ASBOX
32447     ) | sed "s/^/$as_me: WARNING:     /" >&2
32448    ;;
32449esac
32450{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
32451$as_echo_n "checking for $ac_header... " >&6; }
32452if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
32453  $as_echo_n "(cached) " >&6
32454else
32455  eval "$as_ac_Header=\$ac_header_preproc"
32456fi
32457ac_res=`eval 'as_val=${'$as_ac_Header'}
32458		 $as_echo "$as_val"'`
32459	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
32460$as_echo "$ac_res" >&6; }
32461
32462fi
32463as_val=`eval 'as_val=${'$as_ac_Header'}
32464		 $as_echo "$as_val"'`
32465   if test "x$as_val" = x""yes; then
32466  cat >>confdefs.h <<_ACEOF
32467#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
32468_ACEOF
32469 ALSA_FOUND=yes
32470	                      ALSA_CFLAGS=-Iignoreme
32471	                      ALSA_LIBS=-lasound
32472	                      DEFAULT_ALSA=yes
32473else
32474  ALSA_FOUND=no
32475fi
32476
32477done
32478
32479	fi
32480	if test "x$ALSA_FOUND" = xno; then
32481
32482    # Print a helpful message on how to acquire the necessary build dependency.
32483    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32484    MISSING_DEPENDENCY=alsa
32485    PKGHANDLER_COMMAND=
32486
32487    case $PKGHANDLER in
32488	apt-get)
32489                apt_help     $MISSING_DEPENDENCY ;;
32490    yum)
32491                yum_help     $MISSING_DEPENDENCY ;;
32492	port)
32493                port_help    $MISSING_DEPENDENCY ;;
32494	pkgutil)
32495                pkgutil_help $MISSING_DEPENDENCY ;;
32496	pkgadd)
32497                pkgadd_help  $MISSING_DEPENDENCY ;;
32498    * )
32499      break ;;
32500    esac
32501
32502    if test "x$PKGHANDLER_COMMAND" != x; then
32503        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32504    fi
32505
32506	    { { $as_echo "$as_me:$LINENO: error: Could not find alsa! $HELP_MSG " >&5
32507$as_echo "$as_me: error: Could not find alsa! $HELP_MSG " >&2;}
32508   { (exit 1); exit 1; }; }
32509	fi
32510fi
32511
32512
32513
32514
32515
32516
32517
32518###############################################################################
32519#
32520# Check for the jpeg library
32521#
32522
32523USE_EXTERNAL_LIBJPEG=true
32524
32525{ $as_echo "$as_me:$LINENO: checking for main in -ljpeg" >&5
32526$as_echo_n "checking for main in -ljpeg... " >&6; }
32527if test "${ac_cv_lib_jpeg_main+set}" = set; then
32528  $as_echo_n "(cached) " >&6
32529else
32530  ac_check_lib_save_LIBS=$LIBS
32531LIBS="-ljpeg  $LIBS"
32532cat >conftest.$ac_ext <<_ACEOF
32533/* confdefs.h.  */
32534_ACEOF
32535cat confdefs.h >>conftest.$ac_ext
32536cat >>conftest.$ac_ext <<_ACEOF
32537/* end confdefs.h.  */
32538
32539
32540int
32541main ()
32542{
32543return main ();
32544  ;
32545  return 0;
32546}
32547_ACEOF
32548rm -f conftest.$ac_objext conftest$ac_exeext
32549if { (ac_try="$ac_link"
32550case "(($ac_try" in
32551  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32552  *) ac_try_echo=$ac_try;;
32553esac
32554eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32555$as_echo "$ac_try_echo") >&5
32556  (eval "$ac_link") 2>conftest.er1
32557  ac_status=$?
32558  grep -v '^ *+' conftest.er1 >conftest.err
32559  rm -f conftest.er1
32560  cat conftest.err >&5
32561  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32562  (exit $ac_status); } && {
32563	 test -z "$ac_cxx_werror_flag" ||
32564	 test ! -s conftest.err
32565       } && test -s conftest$ac_exeext && {
32566	 test "$cross_compiling" = yes ||
32567	 $as_test_x conftest$ac_exeext
32568       }; then
32569  ac_cv_lib_jpeg_main=yes
32570else
32571  $as_echo "$as_me: failed program was:" >&5
32572sed 's/^/| /' conftest.$ac_ext >&5
32573
32574	ac_cv_lib_jpeg_main=no
32575fi
32576
32577rm -rf conftest.dSYM
32578rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32579      conftest$ac_exeext conftest.$ac_ext
32580LIBS=$ac_check_lib_save_LIBS
32581fi
32582{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_main" >&5
32583$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32584if test "x$ac_cv_lib_jpeg_main" = x""yes; then
32585  cat >>confdefs.h <<_ACEOF
32586#define HAVE_LIBJPEG 1
32587_ACEOF
32588
32589  LIBS="-ljpeg $LIBS"
32590
32591else
32592   USE_EXTERNAL_LIBJPEG=false
32593               { $as_echo "$as_me:$LINENO: Will use jpeg decoder bundled with the OpenJDK source" >&5
32594$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32595
32596fi
32597
32598
32599
32600###############################################################################
32601#
32602# Check for the gif library
32603#
32604
32605USE_EXTERNAL_LIBJPEG=true
32606
32607{ $as_echo "$as_me:$LINENO: checking for main in -lgif" >&5
32608$as_echo_n "checking for main in -lgif... " >&6; }
32609if test "${ac_cv_lib_gif_main+set}" = set; then
32610  $as_echo_n "(cached) " >&6
32611else
32612  ac_check_lib_save_LIBS=$LIBS
32613LIBS="-lgif  $LIBS"
32614cat >conftest.$ac_ext <<_ACEOF
32615/* confdefs.h.  */
32616_ACEOF
32617cat confdefs.h >>conftest.$ac_ext
32618cat >>conftest.$ac_ext <<_ACEOF
32619/* end confdefs.h.  */
32620
32621
32622int
32623main ()
32624{
32625return main ();
32626  ;
32627  return 0;
32628}
32629_ACEOF
32630rm -f conftest.$ac_objext conftest$ac_exeext
32631if { (ac_try="$ac_link"
32632case "(($ac_try" in
32633  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32634  *) ac_try_echo=$ac_try;;
32635esac
32636eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32637$as_echo "$ac_try_echo") >&5
32638  (eval "$ac_link") 2>conftest.er1
32639  ac_status=$?
32640  grep -v '^ *+' conftest.er1 >conftest.err
32641  rm -f conftest.er1
32642  cat conftest.err >&5
32643  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32644  (exit $ac_status); } && {
32645	 test -z "$ac_cxx_werror_flag" ||
32646	 test ! -s conftest.err
32647       } && test -s conftest$ac_exeext && {
32648	 test "$cross_compiling" = yes ||
32649	 $as_test_x conftest$ac_exeext
32650       }; then
32651  ac_cv_lib_gif_main=yes
32652else
32653  $as_echo "$as_me: failed program was:" >&5
32654sed 's/^/| /' conftest.$ac_ext >&5
32655
32656	ac_cv_lib_gif_main=no
32657fi
32658
32659rm -rf conftest.dSYM
32660rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32661      conftest$ac_exeext conftest.$ac_ext
32662LIBS=$ac_check_lib_save_LIBS
32663fi
32664{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gif_main" >&5
32665$as_echo "$ac_cv_lib_gif_main" >&6; }
32666if test "x$ac_cv_lib_gif_main" = x""yes; then
32667  cat >>confdefs.h <<_ACEOF
32668#define HAVE_LIBGIF 1
32669_ACEOF
32670
32671  LIBS="-lgif $LIBS"
32672
32673else
32674   USE_EXTERNAL_LIBGIF=false
32675               { $as_echo "$as_me:$LINENO: Will use gif decoder bundled with the OpenJDK source" >&5
32676$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
32677
32678fi
32679
32680
32681
32682###############################################################################
32683#
32684# Check for the zlib library
32685#
32686
32687
32688# Check whether --with-zlib was given.
32689if test "${with_zlib+set}" = set; then
32690  withval=$with_zlib;
32691fi
32692
32693
32694{ $as_echo "$as_me:$LINENO: checking for compress in -lz" >&5
32695$as_echo_n "checking for compress in -lz... " >&6; }
32696if test "${ac_cv_lib_z_compress+set}" = set; then
32697  $as_echo_n "(cached) " >&6
32698else
32699  ac_check_lib_save_LIBS=$LIBS
32700LIBS="-lz  $LIBS"
32701cat >conftest.$ac_ext <<_ACEOF
32702/* confdefs.h.  */
32703_ACEOF
32704cat confdefs.h >>conftest.$ac_ext
32705cat >>conftest.$ac_ext <<_ACEOF
32706/* end confdefs.h.  */
32707
32708/* Override any GCC internal prototype to avoid an error.
32709   Use char because int might match the return type of a GCC
32710   builtin and then its argument prototype would still apply.  */
32711#ifdef __cplusplus
32712extern "C"
32713#endif
32714char compress ();
32715int
32716main ()
32717{
32718return compress ();
32719  ;
32720  return 0;
32721}
32722_ACEOF
32723rm -f conftest.$ac_objext conftest$ac_exeext
32724if { (ac_try="$ac_link"
32725case "(($ac_try" in
32726  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32727  *) ac_try_echo=$ac_try;;
32728esac
32729eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32730$as_echo "$ac_try_echo") >&5
32731  (eval "$ac_link") 2>conftest.er1
32732  ac_status=$?
32733  grep -v '^ *+' conftest.er1 >conftest.err
32734  rm -f conftest.er1
32735  cat conftest.err >&5
32736  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32737  (exit $ac_status); } && {
32738	 test -z "$ac_cxx_werror_flag" ||
32739	 test ! -s conftest.err
32740       } && test -s conftest$ac_exeext && {
32741	 test "$cross_compiling" = yes ||
32742	 $as_test_x conftest$ac_exeext
32743       }; then
32744  ac_cv_lib_z_compress=yes
32745else
32746  $as_echo "$as_me: failed program was:" >&5
32747sed 's/^/| /' conftest.$ac_ext >&5
32748
32749	ac_cv_lib_z_compress=no
32750fi
32751
32752rm -rf conftest.dSYM
32753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32754      conftest$ac_exeext conftest.$ac_ext
32755LIBS=$ac_check_lib_save_LIBS
32756fi
32757{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5
32758$as_echo "$ac_cv_lib_z_compress" >&6; }
32759if test "x$ac_cv_lib_z_compress" = x""yes; then
32760   ZLIB_FOUND=yes
32761else
32762   ZLIB_FOUND=no
32763fi
32764
32765
32766{ $as_echo "$as_me:$LINENO: checking for which zlib to use" >&5
32767$as_echo_n "checking for which zlib to use... " >&6; }
32768
32769DEFAULT_ZLIB=bundled
32770if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32771#
32772# On macosx default is system...on others default is
32773#
32774    DEFAULT_ZLIB=system
32775fi
32776
32777if test "x${ZLIB_FOUND}" != "xyes"; then
32778#
32779# If we don't find any system...set default to bundled
32780#
32781    DEFAULT_ZLIB=bundled
32782fi
32783
32784#
32785# If user didn't specify, use DEFAULT_ZLIB
32786#
32787if test "x${with_zlib}" = "x"; then
32788    with_zlib=${DEFAULT_ZLIB}
32789fi
32790
32791if test "x${with_zlib}" = "xbundled"; then
32792    USE_EXTERNAL_LIBZ=false
32793    { $as_echo "$as_me:$LINENO: result: bundled" >&5
32794$as_echo "bundled" >&6; }
32795elif test "x${with_zlib}" = "xsystem"; then
32796    if test "x${ZLIB_FOUND}" = "xyes"; then
32797        USE_EXTERNAL_LIBZ=true
32798        { $as_echo "$as_me:$LINENO: result: system" >&5
32799$as_echo "system" >&6; }
32800    else
32801        { $as_echo "$as_me:$LINENO: result: system not found" >&5
32802$as_echo "system not found" >&6; }
32803        { { $as_echo "$as_me:$LINENO: error: --with-zlib=system specified, but no zlib found!" >&5
32804$as_echo "$as_me: error: --with-zlib=system specified, but no zlib found!" >&2;}
32805   { (exit 1); exit 1; }; }
32806    fi
32807else
32808    { { $as_echo "$as_me:$LINENO: error: Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" >&5
32809$as_echo "$as_me: error: Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" >&2;}
32810   { (exit 1); exit 1; }; }
32811fi
32812
32813
32814
32815###############################################################################
32816LIBZIP_CAN_USE_MMAP=true
32817
32818
32819
32820###############################################################################
32821#
32822# Check if altzone exists in time.h
32823#
32824
32825cat >conftest.$ac_ext <<_ACEOF
32826/* confdefs.h.  */
32827_ACEOF
32828cat confdefs.h >>conftest.$ac_ext
32829cat >>conftest.$ac_ext <<_ACEOF
32830/* end confdefs.h.  */
32831#include <time.h>
32832int
32833main ()
32834{
32835return (int)altzone;
32836  ;
32837  return 0;
32838}
32839_ACEOF
32840rm -f conftest.$ac_objext conftest$ac_exeext
32841if { (ac_try="$ac_link"
32842case "(($ac_try" in
32843  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32844  *) ac_try_echo=$ac_try;;
32845esac
32846eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32847$as_echo "$ac_try_echo") >&5
32848  (eval "$ac_link") 2>conftest.er1
32849  ac_status=$?
32850  grep -v '^ *+' conftest.er1 >conftest.err
32851  rm -f conftest.er1
32852  cat conftest.err >&5
32853  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32854  (exit $ac_status); } && {
32855	 test -z "$ac_cxx_werror_flag" ||
32856	 test ! -s conftest.err
32857       } && test -s conftest$ac_exeext && {
32858	 test "$cross_compiling" = yes ||
32859	 $as_test_x conftest$ac_exeext
32860       }; then
32861  has_altzone=yes
32862else
32863  $as_echo "$as_me: failed program was:" >&5
32864sed 's/^/| /' conftest.$ac_ext >&5
32865
32866	has_altzone=no
32867fi
32868
32869rm -rf conftest.dSYM
32870rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32871      conftest$ac_exeext conftest.$ac_ext
32872if test "x$has_altzone" = xyes; then
32873
32874cat >>confdefs.h <<\_ACEOF
32875#define HAVE_ALTZONE 1
32876_ACEOF
32877
32878fi
32879
32880###############################################################################
32881#
32882# Check the maths library
32883#
32884
32885
32886{ $as_echo "$as_me:$LINENO: checking for cos in -lm" >&5
32887$as_echo_n "checking for cos in -lm... " >&6; }
32888if test "${ac_cv_lib_m_cos+set}" = set; then
32889  $as_echo_n "(cached) " >&6
32890else
32891  ac_check_lib_save_LIBS=$LIBS
32892LIBS="-lm  $LIBS"
32893cat >conftest.$ac_ext <<_ACEOF
32894/* confdefs.h.  */
32895_ACEOF
32896cat confdefs.h >>conftest.$ac_ext
32897cat >>conftest.$ac_ext <<_ACEOF
32898/* end confdefs.h.  */
32899
32900/* Override any GCC internal prototype to avoid an error.
32901   Use char because int might match the return type of a GCC
32902   builtin and then its argument prototype would still apply.  */
32903#ifdef __cplusplus
32904extern "C"
32905#endif
32906char cos ();
32907int
32908main ()
32909{
32910return cos ();
32911  ;
32912  return 0;
32913}
32914_ACEOF
32915rm -f conftest.$ac_objext conftest$ac_exeext
32916if { (ac_try="$ac_link"
32917case "(($ac_try" in
32918  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32919  *) ac_try_echo=$ac_try;;
32920esac
32921eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32922$as_echo "$ac_try_echo") >&5
32923  (eval "$ac_link") 2>conftest.er1
32924  ac_status=$?
32925  grep -v '^ *+' conftest.er1 >conftest.err
32926  rm -f conftest.er1
32927  cat conftest.err >&5
32928  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32929  (exit $ac_status); } && {
32930	 test -z "$ac_cxx_werror_flag" ||
32931	 test ! -s conftest.err
32932       } && test -s conftest$ac_exeext && {
32933	 test "$cross_compiling" = yes ||
32934	 $as_test_x conftest$ac_exeext
32935       }; then
32936  ac_cv_lib_m_cos=yes
32937else
32938  $as_echo "$as_me: failed program was:" >&5
32939sed 's/^/| /' conftest.$ac_ext >&5
32940
32941	ac_cv_lib_m_cos=no
32942fi
32943
32944rm -rf conftest.dSYM
32945rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32946      conftest$ac_exeext conftest.$ac_ext
32947LIBS=$ac_check_lib_save_LIBS
32948fi
32949{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5
32950$as_echo "$ac_cv_lib_m_cos" >&6; }
32951if test "x$ac_cv_lib_m_cos" = x""yes; then
32952  cat >>confdefs.h <<_ACEOF
32953#define HAVE_LIBM 1
32954_ACEOF
32955
32956  LIBS="-lm $LIBS"
32957
32958else
32959
32960                  { $as_echo "$as_me:$LINENO: Maths library was not found" >&5
32961$as_echo "$as_me: Maths library was not found" >&6;}
32962
32963fi
32964
32965
32966
32967###############################################################################
32968#
32969# Check for libdl.so
32970
32971save_LIBS="$LIBS"
32972LIBS=""
32973
32974{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
32975$as_echo_n "checking for dlopen in -ldl... " >&6; }
32976if test "${ac_cv_lib_dl_dlopen+set}" = set; then
32977  $as_echo_n "(cached) " >&6
32978else
32979  ac_check_lib_save_LIBS=$LIBS
32980LIBS="-ldl  $LIBS"
32981cat >conftest.$ac_ext <<_ACEOF
32982/* confdefs.h.  */
32983_ACEOF
32984cat confdefs.h >>conftest.$ac_ext
32985cat >>conftest.$ac_ext <<_ACEOF
32986/* end confdefs.h.  */
32987
32988/* Override any GCC internal prototype to avoid an error.
32989   Use char because int might match the return type of a GCC
32990   builtin and then its argument prototype would still apply.  */
32991#ifdef __cplusplus
32992extern "C"
32993#endif
32994char dlopen ();
32995int
32996main ()
32997{
32998return dlopen ();
32999  ;
33000  return 0;
33001}
33002_ACEOF
33003rm -f conftest.$ac_objext conftest$ac_exeext
33004if { (ac_try="$ac_link"
33005case "(($ac_try" in
33006  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33007  *) ac_try_echo=$ac_try;;
33008esac
33009eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
33010$as_echo "$ac_try_echo") >&5
33011  (eval "$ac_link") 2>conftest.er1
33012  ac_status=$?
33013  grep -v '^ *+' conftest.er1 >conftest.err
33014  rm -f conftest.er1
33015  cat conftest.err >&5
33016  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33017  (exit $ac_status); } && {
33018	 test -z "$ac_cxx_werror_flag" ||
33019	 test ! -s conftest.err
33020       } && test -s conftest$ac_exeext && {
33021	 test "$cross_compiling" = yes ||
33022	 $as_test_x conftest$ac_exeext
33023       }; then
33024  ac_cv_lib_dl_dlopen=yes
33025else
33026  $as_echo "$as_me: failed program was:" >&5
33027sed 's/^/| /' conftest.$ac_ext >&5
33028
33029	ac_cv_lib_dl_dlopen=no
33030fi
33031
33032rm -rf conftest.dSYM
33033rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
33034      conftest$ac_exeext conftest.$ac_ext
33035LIBS=$ac_check_lib_save_LIBS
33036fi
33037{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
33038$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
33039if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
33040  cat >>confdefs.h <<_ACEOF
33041#define HAVE_LIBDL 1
33042_ACEOF
33043
33044  LIBS="-ldl $LIBS"
33045
33046fi
33047
33048LIBDL="$LIBS"
33049
33050LIBS="$save_LIBS"
33051
33052
33053
33054###############################################################################
33055#
33056# statically link libstdc++ before C++ ABI is stablized on Linux unless
33057# dynamic build is configured on command line.
33058#
33059
33060# Check whether --with-stdc++lib was given.
33061if test "${with_stdc++lib+set}" = set; then
33062  withval=$with_stdc++lib;
33063    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
33064        && test "x$with_stdc__lib" != xdefault; then
33065      { { $as_echo "$as_me:$LINENO: error: Bad parameter value --with-stdc++lib=$with_stdc__lib!" >&5
33066$as_echo "$as_me: error: Bad parameter value --with-stdc++lib=$with_stdc__lib!" >&2;}
33067   { (exit 1); exit 1; }; }
33068    fi
33069
33070else
33071  with_stdc__lib=default
33072
33073fi
33074
33075
33076if test "x$OPENJDK_TARGET_OS" = xlinux; then
33077    # Test if -lstdc++ works.
33078    { $as_echo "$as_me:$LINENO: checking if dynamic link of stdc++ is possible" >&5
33079$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
33080    ac_ext=cpp
33081ac_cpp='$CXXCPP $CPPFLAGS'
33082ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33083ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33084ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33085
33086    OLD_CXXFLAGS="$CXXFLAGS"
33087    CXXFLAGS="$CXXFLAGS -lstdc++"
33088    cat >conftest.$ac_ext <<_ACEOF
33089/* confdefs.h.  */
33090_ACEOF
33091cat confdefs.h >>conftest.$ac_ext
33092cat >>conftest.$ac_ext <<_ACEOF
33093/* end confdefs.h.  */
33094
33095int
33096main ()
33097{
33098return 0;
33099  ;
33100  return 0;
33101}
33102_ACEOF
33103rm -f conftest.$ac_objext conftest$ac_exeext
33104if { (ac_try="$ac_link"
33105case "(($ac_try" in
33106  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33107  *) ac_try_echo=$ac_try;;
33108esac
33109eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
33110$as_echo "$ac_try_echo") >&5
33111  (eval "$ac_link") 2>conftest.er1
33112  ac_status=$?
33113  grep -v '^ *+' conftest.er1 >conftest.err
33114  rm -f conftest.er1
33115  cat conftest.err >&5
33116  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33117  (exit $ac_status); } && {
33118	 test -z "$ac_cxx_werror_flag" ||
33119	 test ! -s conftest.err
33120       } && test -s conftest$ac_exeext && {
33121	 test "$cross_compiling" = yes ||
33122	 $as_test_x conftest$ac_exeext
33123       }; then
33124  has_dynamic_libstdcxx=yes
33125else
33126  $as_echo "$as_me: failed program was:" >&5
33127sed 's/^/| /' conftest.$ac_ext >&5
33128
33129	has_dynamic_libstdcxx=no
33130fi
33131
33132rm -rf conftest.dSYM
33133rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
33134      conftest$ac_exeext conftest.$ac_ext
33135    CXXFLAGS="$OLD_CXXFLAGS"
33136    ac_ext=cpp
33137ac_cpp='$CXXCPP $CPPFLAGS'
33138ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33139ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33140ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33141
33142    { $as_echo "$as_me:$LINENO: result: $has_dynamic_libstdcxx" >&5
33143$as_echo "$has_dynamic_libstdcxx" >&6; }
33144
33145    # Test if stdc++ can be linked statically.
33146    { $as_echo "$as_me:$LINENO: checking if static link of stdc++ is possible" >&5
33147$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
33148    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
33149    ac_ext=cpp
33150ac_cpp='$CXXCPP $CPPFLAGS'
33151ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33152ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33153ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33154
33155    OLD_LIBS="$LIBS"
33156    OLD_CXX="$CXX"
33157    LIBS="$STATIC_STDCXX_FLAGS"
33158    CXX="$CC"
33159    cat >conftest.$ac_ext <<_ACEOF
33160/* confdefs.h.  */
33161_ACEOF
33162cat confdefs.h >>conftest.$ac_ext
33163cat >>conftest.$ac_ext <<_ACEOF
33164/* end confdefs.h.  */
33165
33166int
33167main ()
33168{
33169return 0;
33170  ;
33171  return 0;
33172}
33173_ACEOF
33174rm -f conftest.$ac_objext conftest$ac_exeext
33175if { (ac_try="$ac_link"
33176case "(($ac_try" in
33177  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33178  *) ac_try_echo=$ac_try;;
33179esac
33180eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
33181$as_echo "$ac_try_echo") >&5
33182  (eval "$ac_link") 2>conftest.er1
33183  ac_status=$?
33184  grep -v '^ *+' conftest.er1 >conftest.err
33185  rm -f conftest.er1
33186  cat conftest.err >&5
33187  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33188  (exit $ac_status); } && {
33189	 test -z "$ac_cxx_werror_flag" ||
33190	 test ! -s conftest.err
33191       } && test -s conftest$ac_exeext && {
33192	 test "$cross_compiling" = yes ||
33193	 $as_test_x conftest$ac_exeext
33194       }; then
33195  has_static_libstdcxx=yes
33196else
33197  $as_echo "$as_me: failed program was:" >&5
33198sed 's/^/| /' conftest.$ac_ext >&5
33199
33200	has_static_libstdcxx=no
33201fi
33202
33203rm -rf conftest.dSYM
33204rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
33205      conftest$ac_exeext conftest.$ac_ext
33206    LIBS="$OLD_LIBS"
33207    CXX="$OLD_CXX"
33208    ac_ext=cpp
33209ac_cpp='$CXXCPP $CPPFLAGS'
33210ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33211ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33212ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33213
33214    { $as_echo "$as_me:$LINENO: result: $has_static_libstdcxx" >&5
33215$as_echo "$has_static_libstdcxx" >&6; }
33216
33217    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
33218        { { $as_echo "$as_me:$LINENO: error: Cannot link to stdc++, neither dynamically nor statically!" >&5
33219$as_echo "$as_me: error: Cannot link to stdc++, neither dynamically nor statically!" >&2;}
33220   { (exit 1); exit 1; }; }
33221    fi
33222
33223    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
33224        { { $as_echo "$as_me:$LINENO: error: Static linking of libstdc++ was not possible!" >&5
33225$as_echo "$as_me: error: Static linking of libstdc++ was not possible!" >&2;}
33226   { (exit 1); exit 1; }; }
33227    fi
33228
33229    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
33230        { { $as_echo "$as_me:$LINENO: error: Dynamic linking of libstdc++ was not possible!" >&5
33231$as_echo "$as_me: error: Dynamic linking of libstdc++ was not possible!" >&2;}
33232   { (exit 1); exit 1; }; }
33233    fi
33234
33235    { $as_echo "$as_me:$LINENO: checking how to link with libstdc++" >&5
33236$as_echo_n "checking how to link with libstdc++... " >&6; }
33237    # If dynamic was requested, it's available since it would fail above otherwise.
33238    # If dynamic wasn't requested, go with static unless it isn't available.
33239    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
33240        LIBCXX="$LIBCXX -lstdc++"
33241        LDCXX="$CXX"
33242        STATIC_CXX_SETTING="STATIC_CXX=false"
33243        { $as_echo "$as_me:$LINENO: result: dynamic" >&5
33244$as_echo "dynamic" >&6; }
33245    else
33246        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
33247        LDCXX="$CC"
33248        STATIC_CXX_SETTING="STATIC_CXX=true"
33249        { $as_echo "$as_me:$LINENO: result: static" >&5
33250$as_echo "static" >&6; }
33251    fi
33252fi
33253
33254
33255# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
33256if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
33257    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
33258fi
33259
33260# TODO better (platform agnostic) test
33261if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
33262    LIBCXX="-lstdc++"
33263fi
33264
33265
33266
33267
33268
33269# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
33270
33271# When using cygwin or msys, we need a wrapper binary that renames
33272# /cygdrive/c/ arguments into c:/ arguments and peeks into
33273# @files and rewrites these too! This wrapper binary is
33274# called fixpath.
33275FIXPATH=
33276if test "x$OPENJDK_BUILD_OS" = xwindows; then
33277    { $as_echo "$as_me:$LINENO: checking if fixpath can be created" >&5
33278$as_echo_n "checking if fixpath can be created... " >&6; }
33279    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
33280    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
33281    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
33282      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
33283      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
33284      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
33285      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
33286    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
33287      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
33288      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
33289
33290      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
33291      # @ was chosen as separator to minimize risk of other tools messing around with it
33292      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
33293      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
33294
33295      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
33296    fi
33297    rm -f $OUTPUT_ROOT/fixpath*
33298    cd $OUTPUT_ROOT
33299    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
33300    cd $CURDIR
33301
33302    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
33303        { $as_echo "$as_me:$LINENO: result: no" >&5
33304$as_echo "no" >&6; }
33305        cat $OUTPUT_ROOT/fixpath1.log
33306        { { $as_echo "$as_me:$LINENO: error: Could not create $OUTPUT_ROOT/fixpath.exe" >&5
33307$as_echo "$as_me: error: Could not create $OUTPUT_ROOT/fixpath.exe" >&2;}
33308   { (exit 1); exit 1; }; }
33309    fi
33310    { $as_echo "$as_me:$LINENO: result: yes" >&5
33311$as_echo "yes" >&6; }
33312    { $as_echo "$as_me:$LINENO: checking if fixpath.exe works" >&5
33313$as_echo_n "checking if fixpath.exe works... " >&6; }
33314    cd $OUTPUT_ROOT
33315    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
33316    cd $CURDIR
33317    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
33318        { $as_echo "$as_me:$LINENO: result: no" >&5
33319$as_echo "no" >&6; }
33320        cat $OUTPUT_ROOT/fixpath2.log
33321        { { $as_echo "$as_me:$LINENO: error: fixpath did not work!" >&5
33322$as_echo "$as_me: error: fixpath did not work!" >&2;}
33323   { (exit 1); exit 1; }; }
33324    fi
33325    { $as_echo "$as_me:$LINENO: result: yes" >&5
33326$as_echo "yes" >&6; }
33327    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
33328fi
33329
33330
33331
33332
33333###############################################################################
33334#
33335# We need to do some final tweaking, when everything else is done.
33336#
33337###############################################################################
33338
33339
33340HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
33341
33342
33343# The name of the Service Agent jar.
33344SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
33345if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
33346    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
33347fi
33348
33349
33350
33351
33352###############################################################################
33353#
33354# Configure parts of the build that only affect the build performance,
33355# not the result.
33356#
33357###############################################################################
33358
33359
33360# How many cores do we have on this build system?
33361
33362# Check whether --with-num-cores was given.
33363if test "${with_num_cores+set}" = set; then
33364  withval=$with_num_cores;
33365fi
33366
33367if test "x$with_num_cores" = x; then
33368    # The number of cores were not specified, try to probe them.
33369
33370    { $as_echo "$as_me:$LINENO: checking for number of cores" >&5
33371$as_echo_n "checking for number of cores... " >&6; }
33372    NUM_CORES=1
33373    FOUND_CORES=no
33374
33375    if test -f /proc/cpuinfo; then
33376        # Looks like a Linux (or cygwin) system
33377        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
33378        FOUND_CORES=yes
33379    elif test -x /usr/sbin/psrinfo; then
33380        # Looks like a Solaris system
33381        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
33382        FOUND_CORES=yes
33383    elif test -x /usr/sbin/system_profiler; then
33384        # Looks like a MacOSX system
33385        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
33386        FOUND_CORES=yes
33387    elif test -n "$NUMBER_OF_PROCESSORS"; then
33388        # On windows, look in the env
33389        NUM_CORES=$NUMBER_OF_PROCESSORS
33390        FOUND_CORES=yes
33391    fi
33392
33393    # For c/c++ code we run twice as many concurrent build
33394    # jobs than we have cores, otherwise we will stall on io.
33395    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
33396
33397    if test "x$FOUND_CORES" = xyes; then
33398        { $as_echo "$as_me:$LINENO: result: $NUM_CORES" >&5
33399$as_echo "$NUM_CORES" >&6; }
33400    else
33401        { $as_echo "$as_me:$LINENO: result: could not detect number of cores, defaulting to 1" >&5
33402$as_echo "could not detect number of cores, defaulting to 1" >&6; }
33403        { $as_echo "$as_me:$LINENO: WARNING: This will disable all parallelism from build!" >&5
33404$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
33405    fi
33406
33407
33408else
33409    NUM_CORES=$with_num_cores
33410    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
33411fi
33412
33413
33414
33415
33416# How much memory do we have on this build system?
33417
33418# Check whether --with-memory-size was given.
33419if test "${with_memory_size+set}" = set; then
33420  withval=$with_memory_size;
33421fi
33422
33423if test "x$with_memory_size" = x; then
33424    # The memory size was not specified, try to probe it.
33425
33426    { $as_echo "$as_me:$LINENO: checking for memory size" >&5
33427$as_echo_n "checking for memory size... " >&6; }
33428    # Default to 1024 MB
33429    MEMORY_SIZE=1024
33430    FOUND_MEM=no
33431
33432    if test -f /proc/meminfo; then
33433        # Looks like a Linux (or cygwin) system
33434        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33435        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33436        FOUND_MEM=yes
33437    elif test -x /usr/sbin/prtconf; then
33438        # Looks like a Solaris system
33439        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33440        FOUND_MEM=yes
33441    elif test -x /usr/sbin/system_profiler; then
33442        # Looks like a MacOSX system
33443        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33444        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33445        FOUND_MEM=yes
33446    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33447        # Windows, but without cygwin
33448        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33449        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33450        FOUND_MEM=yes
33451    fi
33452
33453    if test "x$FOUND_MEM" = xyes; then
33454        { $as_echo "$as_me:$LINENO: result: $MEMORY_SIZE MB" >&5
33455$as_echo "$MEMORY_SIZE MB" >&6; }
33456    else
33457        { $as_echo "$as_me:$LINENO: result: could not detect memory size, defaulting to 1024 MB" >&5
33458$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33459        { $as_echo "$as_me:$LINENO: WARNING: This might seriously impact build performance!" >&5
33460$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33461    fi
33462
33463else
33464    MEMORY_SIZE=$with_memory_size
33465fi
33466
33467
33468
33469# Setup smart javac (after cores and memory have been setup)
33470
33471
33472# Check whether --with-sjavac-server-java was given.
33473if test "${with_sjavac_server_java+set}" = set; then
33474  withval=$with_sjavac_server_java;
33475fi
33476
33477
33478if test "x$with_sjavac_server_java" != x; then
33479    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33480    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33481    if test "x$FOUND_VERSION" = x; then
33482        { { $as_echo "$as_me:$LINENO: error: Could not execute server java: $SJAVAC_SERVER_JAVA" >&5
33483$as_echo "$as_me: error: Could not execute server java: $SJAVAC_SERVER_JAVA" >&2;}
33484   { (exit 1); exit 1; }; }
33485    fi
33486else
33487    SJAVAC_SERVER_JAVA=""
33488    # Hotspot specific options.
33489
33490    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
33491    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
33492    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
33493    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
33494    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33495        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33496    fi
33497
33498    # JRockit specific options.
33499
33500    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
33501    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
33502    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
33503    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
33504    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33505        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33506    fi
33507
33508    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33509fi
33510
33511
33512
33513# Check whether --with-sjavac-server-cores was given.
33514if test "${with_sjavac_server_cores+set}" = set; then
33515  withval=$with_sjavac_server_cores;
33516fi
33517
33518if test "x$with_sjavac_server_cores" != x; then
33519    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
33520else
33521    if test "$NUM_CORES" -gt 16; then
33522        # We set this arbitrary limit because we want to limit the heap
33523        # size of the javac server.
33524        # In the future we will make the javac compilers in the server
33525        # share more and more state, thus enabling us to use more and
33526        # more concurrent threads in the server.
33527        SJAVAC_SERVER_CORES="16"
33528    else
33529        SJAVAC_SERVER_CORES="$NUM_CORES"
33530    fi
33531
33532    if test "$MEMORY_SIZE" -gt "17000"; then
33533        MAX_HEAP_MEM=10000
33534
33535    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33536    # If so, then append -d64 to SJAVAC_SERVER_JAVA
33537    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
33538    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -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 -d64"
33541    fi
33542
33543
33544    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33545    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
33546    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
33547    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
33548    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33549        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33550    fi
33551
33552    elif test "$MEMORY_SIZE" -gt "10000"; then
33553        MAX_HEAP_MEM=6000
33554
33555    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33556    # If so, then append -d64 to SJAVAC_SERVER_JAVA
33557    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
33558    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
33559    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33560        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33561    fi
33562
33563
33564    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33565    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
33566    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
33567    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
33568    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33569        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33570    fi
33571
33572    elif test "$MEMORY_SIZE" -gt "5000"; then
33573        MAX_HEAP_MEM=3000
33574
33575    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33576    # If so, then append -d64 to SJAVAC_SERVER_JAVA
33577    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
33578    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
33579    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33580        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33581    fi
33582
33583
33584    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33585    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
33586    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
33587    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
33588    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33589        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33590    fi
33591
33592    elif test "$MEMORY_SIZE" -gt "3800"; then
33593        MAX_HEAP_MEM=2500
33594
33595    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33596    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
33597    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
33598    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
33599    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33600        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33601    fi
33602
33603    elif test "$MEMORY_SIZE" -gt "1900"; then
33604        MAX_HEAP_MEM=1200
33605
33606    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33607    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
33608    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
33609    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
33610    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33611        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
33612    fi
33613
33614    elif test "$MEMORY_SIZE" -gt "1000"; then
33615        MAX_HEAP_MEM=900
33616
33617    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33618    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
33619    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
33620    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
33621    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33622        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33623    fi
33624
33625    else
33626        MAX_HEAP_MEM=512
33627
33628    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33629    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
33630    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
33631    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
33632    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33633        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33634    fi
33635
33636    fi
33637
33638
33639    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33640    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
33641    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
33642    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
33643    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33644        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
33645    fi
33646
33647
33648    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33649    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
33650    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
33651    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
33652    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33653        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
33654    fi
33655
33656
33657    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33658    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
33659    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
33660    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
33661    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33662        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
33663    fi
33664
33665
33666    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
33667    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
33668        { $as_echo "$as_me:$LINENO: checking if number of server cores must be reduced" >&5
33669$as_echo_n "checking if number of server cores must be reduced... " >&6; }
33670        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
33671        { $as_echo "$as_me:$LINENO: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
33672$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
33673    fi
33674fi
33675
33676
33677{ $as_echo "$as_me:$LINENO: checking whether to use sjavac" >&5
33678$as_echo_n "checking whether to use sjavac... " >&6; }
33679# Check whether --enable-sjavac was given.
33680if test "${enable_sjavac+set}" = set; then
33681  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33682else
33683  ENABLE_SJAVAC='no'
33684fi
33685
33686{ $as_echo "$as_me:$LINENO: result: $ENABLE_SJAVAC" >&5
33687$as_echo "$ENABLE_SJAVAC" >&6; }
33688
33689
33690if test "x$ENABLE_SJAVAC" = xyes; then
33691    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33692else
33693    SJAVAC_SERVER_DIR=
33694fi
33695
33696
33697
33698
33699# Can the C/C++ compiler use precompiled headers?
33700
33701
33702###############################################################################
33703#
33704# Can the C/C++ compiler use precompiled headers?
33705#
33706# Check whether --enable-precompiled-headers was given.
33707if test "${enable_precompiled_headers+set}" = set; then
33708  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33709else
33710  ENABLE_PRECOMPH=yes
33711fi
33712
33713
33714USE_PRECOMPILED_HEADER=1
33715if test "x$ENABLE_PRECOMPH" = xno; then
33716    USE_PRECOMPILED_HEADER=0
33717fi
33718
33719if test "x$ENABLE_PRECOMPH" = xyes; then
33720    # Check that the compiler actually supports precomp headers.
33721    if test "x$GCC" = xyes; then
33722         { $as_echo "$as_me:$LINENO: checking that precompiled headers work" >&5
33723$as_echo_n "checking that precompiled headers work... " >&6; }
33724         echo "int alfa();" > conftest.h
33725         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33726         if test ! -f conftest.hpp.gch; then
33727             USE_PRECOMPILED_HEADER=0
33728             { $as_echo "$as_me:$LINENO: result: no" >&5
33729$as_echo "no" >&6; }
33730         else
33731             { $as_echo "$as_me:$LINENO: result: yes" >&5
33732$as_echo "yes" >&6; }
33733         fi
33734         rm -f conftest.h conftest.hpp.gch
33735    fi
33736fi
33737
33738
33739
33740
33741# Setup use of ccache, if available
33742
33743    # Check whether --enable-ccache was given.
33744if test "${enable_ccache+set}" = set; then
33745  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33746else
33747  ENABLE_CCACHE=yes
33748fi
33749
33750    if test "x$ENABLE_CCACHE" = xyes; then
33751        # Extract the first word of "ccache", so it can be a program name with args.
33752set dummy ccache; ac_word=$2
33753{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
33754$as_echo_n "checking for $ac_word... " >&6; }
33755if test "${ac_cv_path_CCACHE+set}" = set; then
33756  $as_echo_n "(cached) " >&6
33757else
33758  case $CCACHE in
33759  [\\/]* | ?:[\\/]*)
33760  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33761  ;;
33762  *)
33763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33764for as_dir in $PATH
33765do
33766  IFS=$as_save_IFS
33767  test -z "$as_dir" && as_dir=.
33768  for ac_exec_ext in '' $ac_executable_extensions; do
33769  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33770    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33771    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
33772    break 2
33773  fi
33774done
33775done
33776IFS=$as_save_IFS
33777
33778  ;;
33779esac
33780fi
33781CCACHE=$ac_cv_path_CCACHE
33782if test -n "$CCACHE"; then
33783  { $as_echo "$as_me:$LINENO: result: $CCACHE" >&5
33784$as_echo "$CCACHE" >&6; }
33785else
33786  { $as_echo "$as_me:$LINENO: result: no" >&5
33787$as_echo "no" >&6; }
33788fi
33789
33790
33791    else
33792        { $as_echo "$as_me:$LINENO: checking for ccache" >&5
33793$as_echo_n "checking for ccache... " >&6; }
33794        { $as_echo "$as_me:$LINENO: result: explicitly disabled" >&5
33795$as_echo "explicitly disabled" >&6; }
33796        CCACHE=
33797    fi
33798
33799
33800
33801# Check whether --with-ccache-dir was given.
33802if test "${with_ccache_dir+set}" = set; then
33803  withval=$with_ccache_dir;
33804fi
33805
33806
33807    if test "x$with_ccache_dir" != x; then
33808        # When using a non home ccache directory, assume the use is to share ccache files
33809        # with other users. Thus change the umask.
33810        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33811    fi
33812    CCACHE_FOUND=""
33813    if test "x$CCACHE" != x; then
33814
33815    if test "x$CCACHE" != x; then
33816        CCACHE_FOUND="true"
33817        # Only use ccache if it is 3.1.4 or later, which supports
33818        # precompiled headers.
33819        { $as_echo "$as_me:$LINENO: checking if ccache supports precompiled headers" >&5
33820$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33821        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33822        if test "x$HAS_GOOD_CCACHE" = x; then
33823            { $as_echo "$as_me:$LINENO: result: no, disabling ccache" >&5
33824$as_echo "no, disabling ccache" >&6; }
33825            CCACHE=
33826        else
33827            { $as_echo "$as_me:$LINENO: result: yes" >&5
33828$as_echo "yes" >&6; }
33829            { $as_echo "$as_me:$LINENO: checking if C-compiler supports ccache precompiled headers" >&5
33830$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33831            PUSHED_FLAGS="$CXXFLAGS"
33832            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33833            cat >conftest.$ac_ext <<_ACEOF
33834/* confdefs.h.  */
33835_ACEOF
33836cat confdefs.h >>conftest.$ac_ext
33837cat >>conftest.$ac_ext <<_ACEOF
33838/* end confdefs.h.  */
33839
33840int
33841main ()
33842{
33843
33844  ;
33845  return 0;
33846}
33847_ACEOF
33848rm -f conftest.$ac_objext
33849if { (ac_try="$ac_compile"
33850case "(($ac_try" in
33851  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33852  *) ac_try_echo=$ac_try;;
33853esac
33854eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
33855$as_echo "$ac_try_echo") >&5
33856  (eval "$ac_compile") 2>conftest.er1
33857  ac_status=$?
33858  grep -v '^ *+' conftest.er1 >conftest.err
33859  rm -f conftest.er1
33860  cat conftest.err >&5
33861  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33862  (exit $ac_status); } && {
33863	 test -z "$ac_cxx_werror_flag" ||
33864	 test ! -s conftest.err
33865       } && test -s conftest.$ac_objext; then
33866  CC_KNOWS_CCACHE_TRICK=yes
33867else
33868  $as_echo "$as_me: failed program was:" >&5
33869sed 's/^/| /' conftest.$ac_ext >&5
33870
33871	CC_KNOWS_CCACHE_TRICK=no
33872fi
33873
33874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33875            CXXFLAGS="$PUSHED_FLAGS"
33876            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33877                { $as_echo "$as_me:$LINENO: result: yes" >&5
33878$as_echo "yes" >&6; }
33879            else
33880                { $as_echo "$as_me:$LINENO: result: no, disabling ccaching of precompiled headers" >&5
33881$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33882                CCACHE=
33883            fi
33884        fi
33885    fi
33886
33887    if test "x$CCACHE" != x; then
33888        CCACHE_SLOPPINESS=time_macros
33889        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33890        CCACHE_FLAGS=-fpch-preprocess
33891
33892        if test "x$SET_CCACHE_DIR" != x; then
33893            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33894	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33895        fi
33896    fi
33897
33898    fi
33899
33900
33901###############################################################################
33902#
33903# And now the finish...
33904#
33905###############################################################################
33906
33907# Check for some common pitfalls
33908
33909
33910{ $as_echo "$as_me:$LINENO: checking if build directory is on local disk" >&5
33911$as_echo_n "checking if build directory is on local disk... " >&6; }
33912
33913	# df -l lists only local disks; if the given directory is not found then
33914	# a non-zero exit code is given
33915  if test "x$DF" = x; then
33916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33917      # msys does not have df; use Windows "net use" instead.
33918      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33919      if test "x$IS_NETWORK_DISK" = x; then
33920        OUTPUT_DIR_IS_LOCAL="yes"
33921      else
33922        OUTPUT_DIR_IS_LOCAL="no"
33923      fi
33924    else
33925      # No df here, say it's local
33926      OUTPUT_DIR_IS_LOCAL="yes"
33927    fi
33928  else
33929    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33930      OUTPUT_DIR_IS_LOCAL="yes"
33931    else
33932      OUTPUT_DIR_IS_LOCAL="no"
33933    fi
33934  fi
33935
33936{ $as_echo "$as_me:$LINENO: result: $OUTPUT_DIR_IS_LOCAL" >&5
33937$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33938
33939# Check if the user has any old-style ALT_ variables set.
33940FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33941
33942# Before generating output files, test if they exist. If they do, this is a reconfigure.
33943# Since we can't properly handle the dependencies for this, warn the user about the situation
33944if test -e $OUTPUT_ROOT/spec.gmk; then
33945  IS_RECONFIGURE=yes
33946else
33947  IS_RECONFIGURE=no
33948fi
33949
33950if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33951  HIDE_PERFORMANCE_HINTS=yes
33952else
33953  HIDE_PERFORMANCE_HINTS=no
33954  # Hide it the next time around...
33955  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33956fi
33957
33958
33959
33960# At the end, call the custom hook. (Dummy macro if no custom sources available)
33961
33962
33963# We're messing a bit with internal autoconf variables to put the config.status
33964# in the output directory instead of the current directory.
33965CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33966# Create the actual output files. Now the main work of configure is done.
33967cat >confcache <<\_ACEOF
33968# This file is a shell script that caches the results of configure
33969# tests run on this system so they can be shared between configure
33970# scripts and configure runs, see configure's option --config-cache.
33971# It is not useful on other systems.  If it contains results you don't
33972# want to keep, you may remove or edit it.
33973#
33974# config.status only pays attention to the cache file if you give it
33975# the --recheck option to rerun configure.
33976#
33977# `ac_cv_env_foo' variables (set or unset) will be overridden when
33978# loading this file, other *unset* `ac_cv_foo' will be assigned the
33979# following values.
33980
33981_ACEOF
33982
33983# The following way of writing the cache mishandles newlines in values,
33984# but we know of no workaround that is simple, portable, and efficient.
33985# So, we kill variables containing newlines.
33986# Ultrix sh set writes to stderr and can't be redirected directly,
33987# and sets the high bit in the cache file unless we assign to the vars.
33988(
33989  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33990    eval ac_val=\$$ac_var
33991    case $ac_val in #(
33992    *${as_nl}*)
33993      case $ac_var in #(
33994      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
33995$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33996      esac
33997      case $ac_var in #(
33998      _ | IFS | as_nl) ;; #(
33999      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
34000      *) $as_unset $ac_var ;;
34001      esac ;;
34002    esac
34003  done
34004
34005  (set) 2>&1 |
34006    case $as_nl`(ac_space=' '; set) 2>&1` in #(
34007    *${as_nl}ac_space=\ *)
34008      # `set' does not quote correctly, so add quotes (double-quote
34009      # substitution turns \\\\ into \\, and sed turns \\ into \).
34010      sed -n \
34011	"s/'/'\\\\''/g;
34012	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
34013      ;; #(
34014    *)
34015      # `set' quotes correctly as required by POSIX, so do not add quotes.
34016      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
34017      ;;
34018    esac |
34019    sort
34020) |
34021  sed '
34022     /^ac_cv_env_/b end
34023     t clear
34024     :clear
34025     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
34026     t end
34027     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
34028     :end' >>confcache
34029if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
34030  if test -w "$cache_file"; then
34031    test "x$cache_file" != "x/dev/null" &&
34032      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
34033$as_echo "$as_me: updating cache $cache_file" >&6;}
34034    cat confcache >$cache_file
34035  else
34036    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
34037$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
34038  fi
34039fi
34040rm -f confcache
34041
34042test "x$prefix" = xNONE && prefix=$ac_default_prefix
34043# Let make expand exec_prefix.
34044test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
34045
34046DEFS=-DHAVE_CONFIG_H
34047
34048ac_libobjs=
34049ac_ltlibobjs=
34050for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
34051  # 1. Remove the extension, and $U if already installed.
34052  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
34053  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
34054  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
34055  #    will be set to the directory where LIBOBJS objects are built.
34056  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
34057  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
34058done
34059LIBOBJS=$ac_libobjs
34060
34061LTLIBOBJS=$ac_ltlibobjs
34062
34063
34064
34065: ${CONFIG_STATUS=./config.status}
34066ac_write_fail=0
34067ac_clean_files_save=$ac_clean_files
34068ac_clean_files="$ac_clean_files $CONFIG_STATUS"
34069{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
34070$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
34071cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34072#! $SHELL
34073# Generated by $as_me.
34074# Run this file to recreate the current configuration.
34075# Compiler output produced by configure, useful for debugging
34076# configure, is in config.log if it exists.
34077
34078debug=false
34079ac_cs_recheck=false
34080ac_cs_silent=false
34081SHELL=\${CONFIG_SHELL-$SHELL}
34082_ACEOF
34083
34084cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34085## --------------------- ##
34086## M4sh Initialization.  ##
34087## --------------------- ##
34088
34089# Be more Bourne compatible
34090DUALCASE=1; export DUALCASE # for MKS sh
34091if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
34092  emulate sh
34093  NULLCMD=:
34094  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
34095  # is contrary to our usage.  Disable this feature.
34096  alias -g '${1+"$@"}'='"$@"'
34097  setopt NO_GLOB_SUBST
34098else
34099  case `(set -o) 2>/dev/null` in
34100  *posix*) set -o posix ;;
34101esac
34102
34103fi
34104
34105
34106
34107
34108# PATH needs CR
34109# Avoid depending upon Character Ranges.
34110as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34111as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34112as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34113as_cr_digits='0123456789'
34114as_cr_alnum=$as_cr_Letters$as_cr_digits
34115
34116as_nl='
34117'
34118export as_nl
34119# Printing a long string crashes Solaris 7 /usr/bin/printf.
34120as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
34121as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
34122as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
34123if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
34124  as_echo='printf %s\n'
34125  as_echo_n='printf %s'
34126else
34127  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
34128    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
34129    as_echo_n='/usr/ucb/echo -n'
34130  else
34131    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
34132    as_echo_n_body='eval
34133      arg=$1;
34134      case $arg in
34135      *"$as_nl"*)
34136	expr "X$arg" : "X\\(.*\\)$as_nl";
34137	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
34138      esac;
34139      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
34140    '
34141    export as_echo_n_body
34142    as_echo_n='sh -c $as_echo_n_body as_echo'
34143  fi
34144  export as_echo_body
34145  as_echo='sh -c $as_echo_body as_echo'
34146fi
34147
34148# The user is always right.
34149if test "${PATH_SEPARATOR+set}" != set; then
34150  PATH_SEPARATOR=:
34151  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
34152    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
34153      PATH_SEPARATOR=';'
34154  }
34155fi
34156
34157# Support unset when possible.
34158if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
34159  as_unset=unset
34160else
34161  as_unset=false
34162fi
34163
34164
34165# IFS
34166# We need space, tab and new line, in precisely that order.  Quoting is
34167# there to prevent editors from complaining about space-tab.
34168# (If _AS_PATH_WALK were called with IFS unset, it would disable word
34169# splitting by setting IFS to empty value.)
34170IFS=" ""	$as_nl"
34171
34172# Find who we are.  Look in the path if we contain no directory separator.
34173case $0 in
34174  *[\\/]* ) as_myself=$0 ;;
34175  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34176for as_dir in $PATH
34177do
34178  IFS=$as_save_IFS
34179  test -z "$as_dir" && as_dir=.
34180  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
34181done
34182IFS=$as_save_IFS
34183
34184     ;;
34185esac
34186# We did not find ourselves, most probably we were run as `sh COMMAND'
34187# in which case we are not to be found in the path.
34188if test "x$as_myself" = x; then
34189  as_myself=$0
34190fi
34191if test ! -f "$as_myself"; then
34192  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
34193  { (exit 1); exit 1; }
34194fi
34195
34196# Work around bugs in pre-3.0 UWIN ksh.
34197for as_var in ENV MAIL MAILPATH
34198do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
34199done
34200PS1='$ '
34201PS2='> '
34202PS4='+ '
34203
34204# NLS nuisances.
34205LC_ALL=C
34206export LC_ALL
34207LANGUAGE=C
34208export LANGUAGE
34209
34210# Required to use basename.
34211if expr a : '\(a\)' >/dev/null 2>&1 &&
34212   test "X`expr 00001 : '.*\(...\)'`" = X001; then
34213  as_expr=expr
34214else
34215  as_expr=false
34216fi
34217
34218if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
34219  as_basename=basename
34220else
34221  as_basename=false
34222fi
34223
34224
34225# Name of the executable.
34226as_me=`$as_basename -- "$0" ||
34227$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34228	 X"$0" : 'X\(//\)$' \| \
34229	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
34230$as_echo X/"$0" |
34231    sed '/^.*\/\([^/][^/]*\)\/*$/{
34232	    s//\1/
34233	    q
34234	  }
34235	  /^X\/\(\/\/\)$/{
34236	    s//\1/
34237	    q
34238	  }
34239	  /^X\/\(\/\).*/{
34240	    s//\1/
34241	    q
34242	  }
34243	  s/.*/./; q'`
34244
34245# CDPATH.
34246$as_unset CDPATH
34247
34248
34249
34250  as_lineno_1=$LINENO
34251  as_lineno_2=$LINENO
34252  test "x$as_lineno_1" != "x$as_lineno_2" &&
34253  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
34254
34255  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
34256  # uniformly replaced by the line number.  The first 'sed' inserts a
34257  # line-number line after each line using $LINENO; the second 'sed'
34258  # does the real work.  The second script uses 'N' to pair each
34259  # line-number line with the line containing $LINENO, and appends
34260  # trailing '-' during substitution so that $LINENO is not a special
34261  # case at line end.
34262  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
34263  # scripts with optimization help from Paolo Bonzini.  Blame Lee
34264  # E. McMahon (1931-1989) for sed's syntax.  :-)
34265  sed -n '
34266    p
34267    /[$]LINENO/=
34268  ' <$as_myself |
34269    sed '
34270      s/[$]LINENO.*/&-/
34271      t lineno
34272      b
34273      :lineno
34274      N
34275      :loop
34276      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
34277      t loop
34278      s/-\n.*//
34279    ' >$as_me.lineno &&
34280  chmod +x "$as_me.lineno" ||
34281    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
34282   { (exit 1); exit 1; }; }
34283
34284  # Don't try to exec as it changes $[0], causing all sort of problems
34285  # (the dirname of $[0] is not the place where we might find the
34286  # original and so on.  Autoconf is especially sensitive to this).
34287  . "./$as_me.lineno"
34288  # Exit status is that of the last command.
34289  exit
34290}
34291
34292
34293if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
34294  as_dirname=dirname
34295else
34296  as_dirname=false
34297fi
34298
34299ECHO_C= ECHO_N= ECHO_T=
34300case `echo -n x` in
34301-n*)
34302  case `echo 'x\c'` in
34303  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
34304  *)   ECHO_C='\c';;
34305  esac;;
34306*)
34307  ECHO_N='-n';;
34308esac
34309if expr a : '\(a\)' >/dev/null 2>&1 &&
34310   test "X`expr 00001 : '.*\(...\)'`" = X001; then
34311  as_expr=expr
34312else
34313  as_expr=false
34314fi
34315
34316rm -f conf$$ conf$$.exe conf$$.file
34317if test -d conf$$.dir; then
34318  rm -f conf$$.dir/conf$$.file
34319else
34320  rm -f conf$$.dir
34321  mkdir conf$$.dir 2>/dev/null
34322fi
34323if (echo >conf$$.file) 2>/dev/null; then
34324  if ln -s conf$$.file conf$$ 2>/dev/null; then
34325    as_ln_s='ln -s'
34326    # ... but there are two gotchas:
34327    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34328    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34329    # In both cases, we have to default to `cp -p'.
34330    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34331      as_ln_s='cp -p'
34332  elif ln conf$$.file conf$$ 2>/dev/null; then
34333    as_ln_s=ln
34334  else
34335    as_ln_s='cp -p'
34336  fi
34337else
34338  as_ln_s='cp -p'
34339fi
34340rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34341rmdir conf$$.dir 2>/dev/null
34342
34343if mkdir -p . 2>/dev/null; then
34344  as_mkdir_p=:
34345else
34346  test -d ./-p && rmdir ./-p
34347  as_mkdir_p=false
34348fi
34349
34350if test -x / >/dev/null 2>&1; then
34351  as_test_x='test -x'
34352else
34353  if ls -dL / >/dev/null 2>&1; then
34354    as_ls_L_option=L
34355  else
34356    as_ls_L_option=
34357  fi
34358  as_test_x='
34359    eval sh -c '\''
34360      if test -d "$1"; then
34361	test -d "$1/.";
34362      else
34363	case $1 in
34364	-*)set "./$1";;
34365	esac;
34366	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
34367	???[sx]*):;;*)false;;esac;fi
34368    '\'' sh
34369  '
34370fi
34371as_executable_p=$as_test_x
34372
34373# Sed expression to map a string onto a valid CPP name.
34374as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34375
34376# Sed expression to map a string onto a valid variable name.
34377as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34378
34379
34380exec 6>&1
34381
34382# Save the log message, to keep $[0] and so on meaningful, and to
34383# report actual input values of CONFIG_FILES etc. instead of their
34384# values after options handling.
34385ac_log="
34386This file was extended by OpenJDK $as_me jdk8, which was
34387generated by GNU Autoconf 2.63.  Invocation command line was
34388
34389  CONFIG_FILES    = $CONFIG_FILES
34390  CONFIG_HEADERS  = $CONFIG_HEADERS
34391  CONFIG_LINKS    = $CONFIG_LINKS
34392  CONFIG_COMMANDS = $CONFIG_COMMANDS
34393  $ $0 $@
34394
34395on `(hostname || uname -n) 2>/dev/null | sed 1q`
34396"
34397
34398_ACEOF
34399
34400case $ac_config_files in *"
34401"*) set x $ac_config_files; shift; ac_config_files=$*;;
34402esac
34403
34404case $ac_config_headers in *"
34405"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34406esac
34407
34408
34409cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34410# Files that config.status was made for.
34411config_files="$ac_config_files"
34412config_headers="$ac_config_headers"
34413
34414_ACEOF
34415
34416cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34417ac_cs_usage="\
34418\`$as_me' instantiates files from templates according to the
34419current configuration.
34420
34421Usage: $0 [OPTION]... [FILE]...
34422
34423  -h, --help       print this help, then exit
34424  -V, --version    print version number and configuration settings, then exit
34425  -q, --quiet, --silent
34426                   do not print progress messages
34427  -d, --debug      don't remove temporary files
34428      --recheck    update $as_me by reconfiguring in the same conditions
34429      --file=FILE[:TEMPLATE]
34430                   instantiate the configuration file FILE
34431      --header=FILE[:TEMPLATE]
34432                   instantiate the configuration header FILE
34433
34434Configuration files:
34435$config_files
34436
34437Configuration headers:
34438$config_headers
34439
34440Report bugs to <bug-autoconf@gnu.org>."
34441
34442_ACEOF
34443cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34444ac_cs_version="\\
34445OpenJDK config.status jdk8
34446configured by $0, generated by GNU Autoconf 2.63,
34447  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
34448
34449Copyright (C) 2008 Free Software Foundation, Inc.
34450This config.status script is free software; the Free Software Foundation
34451gives unlimited permission to copy, distribute and modify it."
34452
34453ac_pwd='$ac_pwd'
34454srcdir='$srcdir'
34455AWK='$AWK'
34456test -n "\$AWK" || AWK=awk
34457_ACEOF
34458
34459cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34460# The default lists apply if the user does not specify any file.
34461ac_need_defaults=:
34462while test $# != 0
34463do
34464  case $1 in
34465  --*=*)
34466    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34467    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34468    ac_shift=:
34469    ;;
34470  *)
34471    ac_option=$1
34472    ac_optarg=$2
34473    ac_shift=shift
34474    ;;
34475  esac
34476
34477  case $ac_option in
34478  # Handling of the options.
34479  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34480    ac_cs_recheck=: ;;
34481  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34482    $as_echo "$ac_cs_version"; exit ;;
34483  --debug | --debu | --deb | --de | --d | -d )
34484    debug=: ;;
34485  --file | --fil | --fi | --f )
34486    $ac_shift
34487    case $ac_optarg in
34488    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34489    esac
34490    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
34491    ac_need_defaults=false;;
34492  --header | --heade | --head | --hea )
34493    $ac_shift
34494    case $ac_optarg in
34495    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34496    esac
34497    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
34498    ac_need_defaults=false;;
34499  --he | --h)
34500    # Conflict between --help and --header
34501    { $as_echo "$as_me: error: ambiguous option: $1
34502Try \`$0 --help' for more information." >&2
34503   { (exit 1); exit 1; }; };;
34504  --help | --hel | -h )
34505    $as_echo "$ac_cs_usage"; exit ;;
34506  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34507  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34508    ac_cs_silent=: ;;
34509
34510  # This is an error.
34511  -*) { $as_echo "$as_me: error: unrecognized option: $1
34512Try \`$0 --help' for more information." >&2
34513   { (exit 1); exit 1; }; } ;;
34514
34515  *) ac_config_targets="$ac_config_targets $1"
34516     ac_need_defaults=false ;;
34517
34518  esac
34519  shift
34520done
34521
34522ac_configure_extra_args=
34523
34524if $ac_cs_silent; then
34525  exec 6>/dev/null
34526  ac_configure_extra_args="$ac_configure_extra_args --silent"
34527fi
34528
34529_ACEOF
34530cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34531if \$ac_cs_recheck; then
34532  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34533  shift
34534  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34535  CONFIG_SHELL='$SHELL'
34536  export CONFIG_SHELL
34537  exec "\$@"
34538fi
34539
34540_ACEOF
34541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34542exec 5>>config.log
34543{
34544  echo
34545  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34546## Running $as_me. ##
34547_ASBOX
34548  $as_echo "$ac_log"
34549} >&5
34550
34551_ACEOF
34552cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34553_ACEOF
34554
34555cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34556
34557# Handling of arguments.
34558for ac_config_target in $ac_config_targets
34559do
34560  case $ac_config_target in
34561    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34562    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34563    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34564    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34565    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34566    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34567    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34568
34569  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
34570$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
34571   { (exit 1); exit 1; }; };;
34572  esac
34573done
34574
34575
34576# If the user did not use the arguments to specify the items to instantiate,
34577# then the envvar interface is used.  Set only those that are not.
34578# We use the long form for the default assignment because of an extremely
34579# bizarre bug on SunOS 4.1.3.
34580if $ac_need_defaults; then
34581  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34582  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34583fi
34584
34585# Have a temporary directory for convenience.  Make it in the build tree
34586# simply because there is no reason against having it here, and in addition,
34587# creating and moving files from /tmp can sometimes cause problems.
34588# Hook for its removal unless debugging.
34589# Note that there is a small window in which the directory will not be cleaned:
34590# after its creation but before its name has been assigned to `$tmp'.
34591$debug ||
34592{
34593  tmp=
34594  trap 'exit_status=$?
34595  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34596' 0
34597  trap '{ (exit 1); exit 1; }' 1 2 13 15
34598}
34599# Create a (secure) tmp directory for tmp files.
34600
34601{
34602  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34603  test -n "$tmp" && test -d "$tmp"
34604}  ||
34605{
34606  tmp=./conf$$-$RANDOM
34607  (umask 077 && mkdir "$tmp")
34608} ||
34609{
34610   $as_echo "$as_me: cannot create a temporary directory in ." >&2
34611   { (exit 1); exit 1; }
34612}
34613
34614# Set up the scripts for CONFIG_FILES section.
34615# No need to generate them if there are no CONFIG_FILES.
34616# This happens for instance with `./config.status config.h'.
34617if test -n "$CONFIG_FILES"; then
34618
34619
34620ac_cr='
34621'
34622ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34623if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34624  ac_cs_awk_cr='\\r'
34625else
34626  ac_cs_awk_cr=$ac_cr
34627fi
34628
34629echo 'BEGIN {' >"$tmp/subs1.awk" &&
34630_ACEOF
34631
34632
34633{
34634  echo "cat >conf$$subs.awk <<_ACEOF" &&
34635  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34636  echo "_ACEOF"
34637} >conf$$subs.sh ||
34638  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
34639$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
34640   { (exit 1); exit 1; }; }
34641ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
34642ac_delim='%!_!# '
34643for ac_last_try in false false false false false :; do
34644  . ./conf$$subs.sh ||
34645    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
34646$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
34647   { (exit 1); exit 1; }; }
34648
34649  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34650  if test $ac_delim_n = $ac_delim_num; then
34651    break
34652  elif $ac_last_try; then
34653    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
34654$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
34655   { (exit 1); exit 1; }; }
34656  else
34657    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34658  fi
34659done
34660rm -f conf$$subs.sh
34661
34662cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34663cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34664_ACEOF
34665sed -n '
34666h
34667s/^/S["/; s/!.*/"]=/
34668p
34669g
34670s/^[^!]*!//
34671:repl
34672t repl
34673s/'"$ac_delim"'$//
34674t delim
34675:nl
34676h
34677s/\(.\{148\}\).*/\1/
34678t more1
34679s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34680p
34681n
34682b repl
34683:more1
34684s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34685p
34686g
34687s/.\{148\}//
34688t nl
34689:delim
34690h
34691s/\(.\{148\}\).*/\1/
34692t more2
34693s/["\\]/\\&/g; s/^/"/; s/$/"/
34694p
34695b
34696:more2
34697s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34698p
34699g
34700s/.\{148\}//
34701t delim
34702' <conf$$subs.awk | sed '
34703/^[^""]/{
34704  N
34705  s/\n//
34706}
34707' >>$CONFIG_STATUS || ac_write_fail=1
34708rm -f conf$$subs.awk
34709cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34710_ACAWK
34711cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34712  for (key in S) S_is_set[key] = 1
34713  FS = ""
34714
34715}
34716{
34717  line = $ 0
34718  nfields = split(line, field, "@")
34719  substed = 0
34720  len = length(field[1])
34721  for (i = 2; i < nfields; i++) {
34722    key = field[i]
34723    keylen = length(key)
34724    if (S_is_set[key]) {
34725      value = S[key]
34726      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34727      len += length(value) + length(field[++i])
34728      substed = 1
34729    } else
34730      len += 1 + keylen
34731  }
34732
34733  print line
34734}
34735
34736_ACAWK
34737_ACEOF
34738cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34739if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34740  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34741else
34742  cat
34743fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34744  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
34745$as_echo "$as_me: error: could not setup config files machinery" >&2;}
34746   { (exit 1); exit 1; }; }
34747_ACEOF
34748
34749# VPATH may cause trouble with some makes, so we remove $(srcdir),
34750# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
34751# trailing colons and then remove the whole line if VPATH becomes empty
34752# (actually we leave an empty line to preserve line numbers).
34753if test "x$srcdir" = x.; then
34754  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
34755s/:*\$(srcdir):*/:/
34756s/:*\${srcdir}:*/:/
34757s/:*@srcdir@:*/:/
34758s/^\([^=]*=[	 ]*\):*/\1/
34759s/:*$//
34760s/^[^=]*=[	 ]*$//
34761}'
34762fi
34763
34764cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34765fi # test -n "$CONFIG_FILES"
34766
34767# Set up the scripts for CONFIG_HEADERS section.
34768# No need to generate them if there are no CONFIG_HEADERS.
34769# This happens for instance with `./config.status Makefile'.
34770if test -n "$CONFIG_HEADERS"; then
34771cat >"$tmp/defines.awk" <<\_ACAWK ||
34772BEGIN {
34773_ACEOF
34774
34775# Transform confdefs.h into an awk script `defines.awk', embedded as
34776# here-document in config.status, that substitutes the proper values into
34777# config.h.in to produce config.h.
34778
34779# Create a delimiter string that does not exist in confdefs.h, to ease
34780# handling of long lines.
34781ac_delim='%!_!# '
34782for ac_last_try in false false :; do
34783  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34784  if test -z "$ac_t"; then
34785    break
34786  elif $ac_last_try; then
34787    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
34788$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
34789   { (exit 1); exit 1; }; }
34790  else
34791    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34792  fi
34793done
34794
34795# For the awk script, D is an array of macro values keyed by name,
34796# likewise P contains macro parameters if any.  Preserve backslash
34797# newline sequences.
34798
34799ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34800sed -n '
34801s/.\{148\}/&'"$ac_delim"'/g
34802t rset
34803:rset
34804s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34805t def
34806d
34807:def
34808s/\\$//
34809t bsnl
34810s/["\\]/\\&/g
34811s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34812D["\1"]=" \3"/p
34813s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34814d
34815:bsnl
34816s/["\\]/\\&/g
34817s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34818D["\1"]=" \3\\\\\\n"\\/p
34819t cont
34820s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34821t cont
34822d
34823:cont
34824n
34825s/.\{148\}/&'"$ac_delim"'/g
34826t clear
34827:clear
34828s/\\$//
34829t bsnlc
34830s/["\\]/\\&/g; s/^/"/; s/$/"/p
34831d
34832:bsnlc
34833s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34834b cont
34835' <confdefs.h | sed '
34836s/'"$ac_delim"'/"\\\
34837"/g' >>$CONFIG_STATUS || ac_write_fail=1
34838
34839cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34840  for (key in D) D_is_set[key] = 1
34841  FS = ""
34842}
34843/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34844  line = \$ 0
34845  split(line, arg, " ")
34846  if (arg[1] == "#") {
34847    defundef = arg[2]
34848    mac1 = arg[3]
34849  } else {
34850    defundef = substr(arg[1], 2)
34851    mac1 = arg[2]
34852  }
34853  split(mac1, mac2, "(") #)
34854  macro = mac2[1]
34855  prefix = substr(line, 1, index(line, defundef) - 1)
34856  if (D_is_set[macro]) {
34857    # Preserve the white space surrounding the "#".
34858    print prefix "define", macro P[macro] D[macro]
34859    next
34860  } else {
34861    # Replace #undef with comments.  This is necessary, for example,
34862    # in the case of _POSIX_SOURCE, which is predefined and required
34863    # on some systems where configure will not decide to define it.
34864    if (defundef == "undef") {
34865      print "/*", prefix defundef, macro, "*/"
34866      next
34867    }
34868  }
34869}
34870{ print }
34871_ACAWK
34872_ACEOF
34873cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34874  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
34875$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
34876   { (exit 1); exit 1; }; }
34877fi # test -n "$CONFIG_HEADERS"
34878
34879
34880eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34881shift
34882for ac_tag
34883do
34884  case $ac_tag in
34885  :[FHLC]) ac_mode=$ac_tag; continue;;
34886  esac
34887  case $ac_mode$ac_tag in
34888  :[FHL]*:*);;
34889  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
34890$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
34891   { (exit 1); exit 1; }; };;
34892  :[FH]-) ac_tag=-:-;;
34893  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34894  esac
34895  ac_save_IFS=$IFS
34896  IFS=:
34897  set x $ac_tag
34898  IFS=$ac_save_IFS
34899  shift
34900  ac_file=$1
34901  shift
34902
34903  case $ac_mode in
34904  :L) ac_source=$1;;
34905  :[FH])
34906    ac_file_inputs=
34907    for ac_f
34908    do
34909      case $ac_f in
34910      -) ac_f="$tmp/stdin";;
34911      *) # Look for the file first in the build tree, then in the source tree
34912	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34913	 # because $ac_f cannot contain `:'.
34914	 test -f "$ac_f" ||
34915	   case $ac_f in
34916	   [\\/$]*) false;;
34917	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34918	   esac ||
34919	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
34920$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
34921   { (exit 1); exit 1; }; };;
34922      esac
34923      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34924      ac_file_inputs="$ac_file_inputs '$ac_f'"
34925    done
34926
34927    # Let's still pretend it is `configure' which instantiates (i.e., don't
34928    # use $as_me), people would be surprised to read:
34929    #    /* config.h.  Generated by config.status.  */
34930    configure_input='Generated from '`
34931	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34932	`' by configure.'
34933    if test x"$ac_file" != x-; then
34934      configure_input="$ac_file.  $configure_input"
34935      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
34936$as_echo "$as_me: creating $ac_file" >&6;}
34937    fi
34938    # Neutralize special characters interpreted by sed in replacement strings.
34939    case $configure_input in #(
34940    *\&* | *\|* | *\\* )
34941       ac_sed_conf_input=`$as_echo "$configure_input" |
34942       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34943    *) ac_sed_conf_input=$configure_input;;
34944    esac
34945
34946    case $ac_tag in
34947    *:-:* | *:-) cat >"$tmp/stdin" \
34948      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
34949$as_echo "$as_me: error: could not create $ac_file" >&2;}
34950   { (exit 1); exit 1; }; } ;;
34951    esac
34952    ;;
34953  esac
34954
34955  ac_dir=`$as_dirname -- "$ac_file" ||
34956$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34957	 X"$ac_file" : 'X\(//\)[^/]' \| \
34958	 X"$ac_file" : 'X\(//\)$' \| \
34959	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34960$as_echo X"$ac_file" |
34961    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34962	    s//\1/
34963	    q
34964	  }
34965	  /^X\(\/\/\)[^/].*/{
34966	    s//\1/
34967	    q
34968	  }
34969	  /^X\(\/\/\)$/{
34970	    s//\1/
34971	    q
34972	  }
34973	  /^X\(\/\).*/{
34974	    s//\1/
34975	    q
34976	  }
34977	  s/.*/./; q'`
34978  { as_dir="$ac_dir"
34979  case $as_dir in #(
34980  -*) as_dir=./$as_dir;;
34981  esac
34982  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
34983    as_dirs=
34984    while :; do
34985      case $as_dir in #(
34986      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34987      *) as_qdir=$as_dir;;
34988      esac
34989      as_dirs="'$as_qdir' $as_dirs"
34990      as_dir=`$as_dirname -- "$as_dir" ||
34991$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34992	 X"$as_dir" : 'X\(//\)[^/]' \| \
34993	 X"$as_dir" : 'X\(//\)$' \| \
34994	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34995$as_echo X"$as_dir" |
34996    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34997	    s//\1/
34998	    q
34999	  }
35000	  /^X\(\/\/\)[^/].*/{
35001	    s//\1/
35002	    q
35003	  }
35004	  /^X\(\/\/\)$/{
35005	    s//\1/
35006	    q
35007	  }
35008	  /^X\(\/\).*/{
35009	    s//\1/
35010	    q
35011	  }
35012	  s/.*/./; q'`
35013      test -d "$as_dir" && break
35014    done
35015    test -z "$as_dirs" || eval "mkdir $as_dirs"
35016  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
35017$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
35018   { (exit 1); exit 1; }; }; }
35019  ac_builddir=.
35020
35021case "$ac_dir" in
35022.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
35023*)
35024  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
35025  # A ".." for each directory in $ac_dir_suffix.
35026  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
35027  case $ac_top_builddir_sub in
35028  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
35029  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
35030  esac ;;
35031esac
35032ac_abs_top_builddir=$ac_pwd
35033ac_abs_builddir=$ac_pwd$ac_dir_suffix
35034# for backward compatibility:
35035ac_top_builddir=$ac_top_build_prefix
35036
35037case $srcdir in
35038  .)  # We are building in place.
35039    ac_srcdir=.
35040    ac_top_srcdir=$ac_top_builddir_sub
35041    ac_abs_top_srcdir=$ac_pwd ;;
35042  [\\/]* | ?:[\\/]* )  # Absolute name.
35043    ac_srcdir=$srcdir$ac_dir_suffix;
35044    ac_top_srcdir=$srcdir
35045    ac_abs_top_srcdir=$srcdir ;;
35046  *) # Relative name.
35047    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
35048    ac_top_srcdir=$ac_top_build_prefix$srcdir
35049    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
35050esac
35051ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
35052
35053
35054  case $ac_mode in
35055  :F)
35056  #
35057  # CONFIG_FILE
35058  #
35059
35060_ACEOF
35061
35062cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35063# If the template does not know about datarootdir, expand it.
35064# FIXME: This hack should be removed a few years after 2.60.
35065ac_datarootdir_hack=; ac_datarootdir_seen=
35066
35067ac_sed_dataroot='
35068/datarootdir/ {
35069  p
35070  q
35071}
35072/@datadir@/p
35073/@docdir@/p
35074/@infodir@/p
35075/@localedir@/p
35076/@mandir@/p
35077'
35078case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
35079*datarootdir*) ac_datarootdir_seen=yes;;
35080*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
35081  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
35082$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
35083_ACEOF
35084cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35085  ac_datarootdir_hack='
35086  s&@datadir@&$datadir&g
35087  s&@docdir@&$docdir&g
35088  s&@infodir@&$infodir&g
35089  s&@localedir@&$localedir&g
35090  s&@mandir@&$mandir&g
35091    s&\\\${datarootdir}&$datarootdir&g' ;;
35092esac
35093_ACEOF
35094
35095# Neutralize VPATH when `$srcdir' = `.'.
35096# Shell code in configure.ac might set extrasub.
35097# FIXME: do we really want to maintain this feature?
35098cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35099ac_sed_extra="$ac_vpsub
35100$extrasub
35101_ACEOF
35102cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35103:t
35104/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
35105s|@configure_input@|$ac_sed_conf_input|;t t
35106s&@top_builddir@&$ac_top_builddir_sub&;t t
35107s&@top_build_prefix@&$ac_top_build_prefix&;t t
35108s&@srcdir@&$ac_srcdir&;t t
35109s&@abs_srcdir@&$ac_abs_srcdir&;t t
35110s&@top_srcdir@&$ac_top_srcdir&;t t
35111s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
35112s&@builddir@&$ac_builddir&;t t
35113s&@abs_builddir@&$ac_abs_builddir&;t t
35114s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
35115$ac_datarootdir_hack
35116"
35117eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
35118  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
35119$as_echo "$as_me: error: could not create $ac_file" >&2;}
35120   { (exit 1); exit 1; }; }
35121
35122test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
35123  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
35124  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
35125  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35126which seems to be undefined.  Please make sure it is defined." >&5
35127$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35128which seems to be undefined.  Please make sure it is defined." >&2;}
35129
35130  rm -f "$tmp/stdin"
35131  case $ac_file in
35132  -) cat "$tmp/out" && rm -f "$tmp/out";;
35133  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
35134  esac \
35135  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
35136$as_echo "$as_me: error: could not create $ac_file" >&2;}
35137   { (exit 1); exit 1; }; }
35138 ;;
35139  :H)
35140  #
35141  # CONFIG_HEADER
35142  #
35143  if test x"$ac_file" != x-; then
35144    {
35145      $as_echo "/* $configure_input  */" \
35146      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
35147    } >"$tmp/config.h" \
35148      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
35149$as_echo "$as_me: error: could not create $ac_file" >&2;}
35150   { (exit 1); exit 1; }; }
35151    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
35152      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
35153$as_echo "$as_me: $ac_file is unchanged" >&6;}
35154    else
35155      rm -f "$ac_file"
35156      mv "$tmp/config.h" "$ac_file" \
35157	|| { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
35158$as_echo "$as_me: error: could not create $ac_file" >&2;}
35159   { (exit 1); exit 1; }; }
35160    fi
35161  else
35162    $as_echo "/* $configure_input  */" \
35163      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
35164      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
35165$as_echo "$as_me: error: could not create -" >&2;}
35166   { (exit 1); exit 1; }; }
35167  fi
35168 ;;
35169
35170
35171  esac
35172
35173done # for ac_tag
35174
35175
35176{ (exit 0); exit 0; }
35177_ACEOF
35178chmod +x $CONFIG_STATUS
35179ac_clean_files=$ac_clean_files_save
35180
35181test $ac_write_fail = 0 ||
35182  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
35183$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
35184   { (exit 1); exit 1; }; }
35185
35186
35187# configure is writing to config.log, and then calls config.status.
35188# config.status does its own redirection, appending to config.log.
35189# Unfortunately, on DOS this fails, as config.log is still kept open
35190# by configure, so config.status won't be able to write to it; its
35191# output is simply discarded.  So we exec the FD to /dev/null,
35192# effectively closing config.log, so it can be properly (re)opened and
35193# appended to by config.status.  When coming back to configure, we
35194# need to make the FD available again.
35195if test "$no_create" != yes; then
35196  ac_cs_success=:
35197  ac_config_status_args=
35198  test "$silent" = yes &&
35199    ac_config_status_args="$ac_config_status_args --quiet"
35200  exec 5>/dev/null
35201  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
35202  exec 5>>config.log
35203  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
35204  # would make configure fail if this is the last instruction.
35205  $ac_cs_success || { (exit 1); exit 1; }
35206fi
35207if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
35208  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
35209$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
35210fi
35211
35212
35213# Make the compare script executable
35214$CHMOD +x $OUTPUT_ROOT/compare.sh
35215
35216# Finally output some useful information to the user
35217
35218# Finally output some useful information to the user
35219
35220if test "x$CCACHE_FOUND" != x; then
35221	if  test "x$HAS_GOOD_CCACHE" = x; then
35222		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
35223		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
35224	else
35225		CCACHE_STATUS="installed and in use"
35226	fi
35227else
35228	if test "x$GCC" = xyes; then
35229		CCACHE_STATUS="not installed (consider installing)"
35230		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
35231	else
35232		CCACHE_STATUS="not available for your system"
35233	fi
35234fi
35235
35236printf "\n"
35237printf "====================================================\n"
35238printf "A new configuration has been successfully created in\n"
35239printf "$OUTPUT_ROOT\n"
35240if test "x$CONFIGURE_COMMAND_LINE" != x; then
35241	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
35242else
35243	printf "using default settings.\n"
35244fi
35245
35246printf "\n"
35247printf "Configuration summary:\n"
35248printf "* Debug level:    $DEBUG_LEVEL\n"
35249printf "* JDK variant:    $JDK_VARIANT\n"
35250printf "* JVM variants:   $with_jvm_variants\n"
35251printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
35252
35253printf "\n"
35254printf "Tools summary:\n"
35255if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
35256  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
35257fi
35258printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
35259printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
35260printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
35261
35262printf "\n"
35263printf "Build performance summary:\n"
35264printf "* Cores to use:   $NUM_CORES\n"
35265printf "* Memory limit:   $MEMORY_SIZE MB\n"
35266printf "* ccache status:  $CCACHE_STATUS\n"
35267printf "\n"
35268
35269if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
35270	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
35271	printf "$CCACHE_HELP_MSG\n"
35272
35273    # Print a helpful message on how to acquire the necessary build dependency.
35274    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
35275    MISSING_DEPENDENCY=ccache
35276    PKGHANDLER_COMMAND=
35277
35278    case $PKGHANDLER in
35279	apt-get)
35280                apt_help     $MISSING_DEPENDENCY ;;
35281    yum)
35282                yum_help     $MISSING_DEPENDENCY ;;
35283	port)
35284                port_help    $MISSING_DEPENDENCY ;;
35285	pkgutil)
35286                pkgutil_help $MISSING_DEPENDENCY ;;
35287	pkgadd)
35288                pkgadd_help  $MISSING_DEPENDENCY ;;
35289    * )
35290      break ;;
35291    esac
35292
35293    if test "x$PKGHANDLER_COMMAND" != x; then
35294        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35295    fi
35296
35297	printf "$HELP_MSG\n"
35298	printf "\n"
35299fi
35300
35301if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
35302	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
35303	printf "will result in longer build times.\n"
35304	printf "\n"
35305fi
35306
35307if test "x$FOUND_ALT_VARIABLES" != "x"; then
35308	printf "WARNING: You have old-style ALT_ environment variables set.\n"
35309	printf "These are not respected, and will be ignored. It is recommended\n"
35310	printf "that you clean your environment. The following variables are set:\n"
35311	printf "$FOUND_ALT_VARIABLES\n"
35312	printf "\n"
35313fi
35314
35315if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
35316	printf "WARNING: Your build output directory is not on a local disk.\n"
35317	printf "This will severely degrade build performance!\n"
35318	printf "It is recommended that you create an output directory on a local disk,\n"
35319	printf "and run the configure script again from that directory.\n"
35320	printf "\n"
35321fi
35322
35323if test "x$IS_RECONFIGURE" = "xyes"; then
35324	printf "WARNING: The result of this configuration has overridden an older\n"
35325	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
35326	printf "proper build. Failure to do so might result in strange build problems.\n"
35327	printf "\n"
35328fi
35329
35330