generated-configure.sh revision 514:ecf751a69f6a
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=1353361797
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    # Only call fixup if objcopy was found.
26317    if test -n "$OBJCOPY"; then
26318
26319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26320
26321  # First separate the path from the arguments. This will split at the first
26322  # space.
26323  complete="$OBJCOPY"
26324  path="${complete%% *}"
26325  tmp="$complete EOL"
26326  arguments="${tmp#* }"
26327
26328  # Input might be given as Windows format, start by converting to
26329  # unix format.
26330  new_path=`$CYGPATH -u "$path"`
26331
26332  # Now try to locate executable using which
26333  new_path=`$WHICH "$new_path" 2> /dev/null`
26334  # bat and cmd files are not always considered executable in cygwin causing which
26335  # to not find them
26336  if test "x$new_path" = x \
26337           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26338           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26339    new_path=`$CYGPATH -u "$path"`
26340  fi
26341  if test "x$new_path" = x; then
26342    # Oops. Which didn't find the executable.
26343    # The splitting of arguments from the executable at a space might have been incorrect,
26344    # since paths with space are more likely in Windows. Give it another try with the whole
26345    # argument.
26346    path="$complete"
26347    arguments="EOL"
26348    new_path=`$CYGPATH -u "$path"`
26349    new_path=`$WHICH "$new_path" 2> /dev/null`
26350    # bat and cmd files are not always considered executable in cygwin causing which
26351    # to not find them
26352    if test "x$new_path" = x \
26353             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26354             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26355      new_path=`$CYGPATH -u "$path"`
26356    fi
26357    if test "x$new_path" = x; then
26358      # It's still not found. Now this is an unrecoverable error.
26359      { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26360$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26361      has_space=`$ECHO "$complete" | $GREP " "`
26362      if test "x$has_space" != x; then
26363        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26365      fi
26366      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26367$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26368   { (exit 1); exit 1; }; }
26369    fi
26370  fi
26371
26372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26375  # "foo.exe" is OK but "foo" is an error.
26376  #
26377  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26378  # It is also a way to make sure we got the proper file name for the real test later on.
26379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26380  if test "x$test_shortpath" = x; then
26381    # Short path failed, file does not exist as specified.
26382    # Try adding .exe or .cmd
26383    if test -f "${new_path}.exe"; then
26384       input_to_shortpath="${new_path}.exe"
26385    elif test -f "${new_path}.cmd"; then
26386       input_to_shortpath="${new_path}.cmd"
26387    else
26388      { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26389$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26390      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26391$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26392      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26393$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26394   { (exit 1); exit 1; }; }
26395    fi
26396  else
26397    input_to_shortpath="$new_path"
26398  fi
26399
26400  # Call helper function which possibly converts this using DOS-style short mode.
26401  # If so, the updated path is stored in $new_path.
26402  new_path="$input_to_shortpath"
26403
26404  input_path="$input_to_shortpath"
26405  # Check if we need to convert this using DOS-style short mode. If the path
26406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26407  # take no chances and rewrite it.
26408  # Note: m4 eats our [], so we need to use [ and ] instead.
26409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26410  if test "x$has_forbidden_chars" != x; then
26411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26415      # Going to short mode and back again did indeed matter. Since short mode is
26416      # case insensitive, let's make it lowercase to improve readability.
26417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26418      # Now convert it back to Unix-stile (cygpath)
26419      input_path=`$CYGPATH -u "$shortmode_path"`
26420      new_path="$input_path"
26421    fi
26422  fi
26423
26424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26425  if test "x$test_cygdrive_prefix" = x; then
26426    # As a simple fix, exclude /usr/bin since it's not a real path.
26427    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26429      # a path prefixed by /cygdrive for fixpath to work.
26430      new_path="$CYGWIN_ROOT_PATH$input_path"
26431    fi
26432  fi
26433
26434  # remove trailing .exe if any
26435  new_path="${new_path/%.exe/}"
26436
26437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26438
26439  # First separate the path from the arguments. This will split at the first
26440  # space.
26441  complete="$OBJCOPY"
26442  path="${complete%% *}"
26443  tmp="$complete EOL"
26444  arguments="${tmp#* }"
26445
26446  # Input might be given as Windows format, start by converting to
26447  # unix format.
26448  new_path="$path"
26449
26450  windows_path="$new_path"
26451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26452    unix_path=`$CYGPATH -u "$windows_path"`
26453    new_path="$unix_path"
26454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26456    new_path="$unix_path"
26457  fi
26458
26459
26460  # Now try to locate executable using which
26461  new_path=`$WHICH "$new_path" 2> /dev/null`
26462
26463  if test "x$new_path" = x; then
26464    # Oops. Which didn't find the executable.
26465    # The splitting of arguments from the executable at a space might have been incorrect,
26466    # since paths with space are more likely in Windows. Give it another try with the whole
26467    # argument.
26468    path="$complete"
26469    arguments="EOL"
26470    new_path="$path"
26471
26472  windows_path="$new_path"
26473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26474    unix_path=`$CYGPATH -u "$windows_path"`
26475    new_path="$unix_path"
26476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26478    new_path="$unix_path"
26479  fi
26480
26481
26482    new_path=`$WHICH "$new_path" 2> /dev/null`
26483
26484    if test "x$new_path" = x; then
26485      # It's still not found. Now this is an unrecoverable error.
26486      { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26487$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26488      has_space=`$ECHO "$complete" | $GREP " "`
26489      if test "x$has_space" != x; then
26490        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26492      fi
26493      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26494$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26495   { (exit 1); exit 1; }; }
26496    fi
26497  fi
26498
26499  # Now new_path has a complete unix path to the binary
26500  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26501    # Keep paths in /bin as-is, but remove trailing .exe if any
26502    new_path="${new_path/%.exe/}"
26503    # Do not save /bin paths to all_fixpath_prefixes!
26504  else
26505    # Not in mixed or Windows style, start by that.
26506    new_path=`cmd //c echo $new_path`
26507
26508  input_path="$new_path"
26509  # Check if we need to convert this using DOS-style short mode. If the path
26510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26511  # take no chances and rewrite it.
26512  # Note: m4 eats our [], so we need to use [ and ] instead.
26513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26514  if test "x$has_forbidden_chars" != x; then
26515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26517  fi
26518
26519    # Output is in $new_path
26520
26521  windows_path="$new_path"
26522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26523    unix_path=`$CYGPATH -u "$windows_path"`
26524    new_path="$unix_path"
26525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26527    new_path="$unix_path"
26528  fi
26529
26530    # remove trailing .exe if any
26531    new_path="${new_path/%.exe/}"
26532
26533    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26534    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26535  fi
26536
26537  else
26538    # We're on a posix platform. Hooray! :)
26539    # First separate the path from the arguments. This will split at the first
26540    # space.
26541    complete="$OBJCOPY"
26542    path="${complete%% *}"
26543    tmp="$complete EOL"
26544    arguments="${tmp#* }"
26545
26546    new_path=`$WHICH $path 2> /dev/null`
26547    if test "x$new_path" = x; then
26548      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26549      if test "x$is_absolute_path" != x; then
26550        { $as_echo "$as_me:$LINENO: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5
26551$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;}
26552        new_path="$path"
26553      else
26554        { $as_echo "$as_me:$LINENO: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26555$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26556        has_space=`$ECHO "$complete" | $GREP " "`
26557        if test "x$has_space" != x; then
26558          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
26559$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26560        fi
26561        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJCOPY" >&5
26562$as_echo "$as_me: error: Cannot locate the the path of OBJCOPY" >&2;}
26563   { (exit 1); exit 1; }; }
26564      fi
26565    fi
26566  fi
26567
26568  # Now join together the path and the arguments once again
26569  if test "x$arguments" != xEOL; then
26570      new_complete="$new_path ${arguments% *}"
26571  else
26572      new_complete="$new_path"
26573  fi
26574
26575  if test "x$complete" != "x$new_complete"; then
26576    OBJCOPY="$new_complete"
26577    { $as_echo "$as_me:$LINENO: Rewriting OBJCOPY to \"$new_complete\"" >&5
26578$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26579  fi
26580
26581    fi
26582fi
26583
26584if test -n "$ac_tool_prefix"; then
26585  for ac_prog in gobjdump objdump
26586  do
26587    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26588set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26589{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26590$as_echo_n "checking for $ac_word... " >&6; }
26591if test "${ac_cv_prog_OBJDUMP+set}" = set; then
26592  $as_echo_n "(cached) " >&6
26593else
26594  if test -n "$OBJDUMP"; then
26595  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26596else
26597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26598for as_dir in $PATH
26599do
26600  IFS=$as_save_IFS
26601  test -z "$as_dir" && as_dir=.
26602  for ac_exec_ext in '' $ac_executable_extensions; do
26603  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26604    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26605    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26606    break 2
26607  fi
26608done
26609done
26610IFS=$as_save_IFS
26611
26612fi
26613fi
26614OBJDUMP=$ac_cv_prog_OBJDUMP
26615if test -n "$OBJDUMP"; then
26616  { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5
26617$as_echo "$OBJDUMP" >&6; }
26618else
26619  { $as_echo "$as_me:$LINENO: result: no" >&5
26620$as_echo "no" >&6; }
26621fi
26622
26623
26624    test -n "$OBJDUMP" && break
26625  done
26626fi
26627if test -z "$OBJDUMP"; then
26628  ac_ct_OBJDUMP=$OBJDUMP
26629  for ac_prog in gobjdump objdump
26630do
26631  # Extract the first word of "$ac_prog", so it can be a program name with args.
26632set dummy $ac_prog; ac_word=$2
26633{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26634$as_echo_n "checking for $ac_word... " >&6; }
26635if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
26636  $as_echo_n "(cached) " >&6
26637else
26638  if test -n "$ac_ct_OBJDUMP"; then
26639  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26640else
26641as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26642for as_dir in $PATH
26643do
26644  IFS=$as_save_IFS
26645  test -z "$as_dir" && as_dir=.
26646  for ac_exec_ext in '' $ac_executable_extensions; do
26647  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26648    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26649    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26650    break 2
26651  fi
26652done
26653done
26654IFS=$as_save_IFS
26655
26656fi
26657fi
26658ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26659if test -n "$ac_ct_OBJDUMP"; then
26660  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
26661$as_echo "$ac_ct_OBJDUMP" >&6; }
26662else
26663  { $as_echo "$as_me:$LINENO: result: no" >&5
26664$as_echo "no" >&6; }
26665fi
26666
26667
26668  test -n "$ac_ct_OBJDUMP" && break
26669done
26670
26671  if test "x$ac_ct_OBJDUMP" = x; then
26672    OBJDUMP=""
26673  else
26674    case $cross_compiling:$ac_tool_warned in
26675yes:)
26676{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
26677$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26678ac_tool_warned=yes ;;
26679esac
26680    OBJDUMP=$ac_ct_OBJDUMP
26681  fi
26682fi
26683
26684if test "x$OBJDUMP" != x; then
26685  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26686
26687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26688
26689  # First separate the path from the arguments. This will split at the first
26690  # space.
26691  complete="$OBJDUMP"
26692  path="${complete%% *}"
26693  tmp="$complete EOL"
26694  arguments="${tmp#* }"
26695
26696  # Input might be given as Windows format, start by converting to
26697  # unix format.
26698  new_path=`$CYGPATH -u "$path"`
26699
26700  # Now try to locate executable using which
26701  new_path=`$WHICH "$new_path" 2> /dev/null`
26702  # bat and cmd files are not always considered executable in cygwin causing which
26703  # to not find them
26704  if test "x$new_path" = x \
26705           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26706           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26707    new_path=`$CYGPATH -u "$path"`
26708  fi
26709  if test "x$new_path" = x; then
26710    # Oops. Which didn't find the executable.
26711    # The splitting of arguments from the executable at a space might have been incorrect,
26712    # since paths with space are more likely in Windows. Give it another try with the whole
26713    # argument.
26714    path="$complete"
26715    arguments="EOL"
26716    new_path=`$CYGPATH -u "$path"`
26717    new_path=`$WHICH "$new_path" 2> /dev/null`
26718    # bat and cmd files are not always considered executable in cygwin causing which
26719    # to not find them
26720    if test "x$new_path" = x \
26721             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26722             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26723      new_path=`$CYGPATH -u "$path"`
26724    fi
26725    if test "x$new_path" = x; then
26726      # It's still not found. Now this is an unrecoverable error.
26727      { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26728$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26729      has_space=`$ECHO "$complete" | $GREP " "`
26730      if test "x$has_space" != x; then
26731        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26732$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26733      fi
26734      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26735$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26736   { (exit 1); exit 1; }; }
26737    fi
26738  fi
26739
26740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26743  # "foo.exe" is OK but "foo" is an error.
26744  #
26745  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26746  # It is also a way to make sure we got the proper file name for the real test later on.
26747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26748  if test "x$test_shortpath" = x; then
26749    # Short path failed, file does not exist as specified.
26750    # Try adding .exe or .cmd
26751    if test -f "${new_path}.exe"; then
26752       input_to_shortpath="${new_path}.exe"
26753    elif test -f "${new_path}.cmd"; then
26754       input_to_shortpath="${new_path}.cmd"
26755    else
26756      { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26757$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26758      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26759$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26760      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26761$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26762   { (exit 1); exit 1; }; }
26763    fi
26764  else
26765    input_to_shortpath="$new_path"
26766  fi
26767
26768  # Call helper function which possibly converts this using DOS-style short mode.
26769  # If so, the updated path is stored in $new_path.
26770  new_path="$input_to_shortpath"
26771
26772  input_path="$input_to_shortpath"
26773  # Check if we need to convert this using DOS-style short mode. If the path
26774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26775  # take no chances and rewrite it.
26776  # Note: m4 eats our [], so we need to use [ and ] instead.
26777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26778  if test "x$has_forbidden_chars" != x; then
26779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26783      # Going to short mode and back again did indeed matter. Since short mode is
26784      # case insensitive, let's make it lowercase to improve readability.
26785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26786      # Now convert it back to Unix-stile (cygpath)
26787      input_path=`$CYGPATH -u "$shortmode_path"`
26788      new_path="$input_path"
26789    fi
26790  fi
26791
26792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26793  if test "x$test_cygdrive_prefix" = x; then
26794    # As a simple fix, exclude /usr/bin since it's not a real path.
26795    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26797      # a path prefixed by /cygdrive for fixpath to work.
26798      new_path="$CYGWIN_ROOT_PATH$input_path"
26799    fi
26800  fi
26801
26802  # remove trailing .exe if any
26803  new_path="${new_path/%.exe/}"
26804
26805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26806
26807  # First separate the path from the arguments. This will split at the first
26808  # space.
26809  complete="$OBJDUMP"
26810  path="${complete%% *}"
26811  tmp="$complete EOL"
26812  arguments="${tmp#* }"
26813
26814  # Input might be given as Windows format, start by converting to
26815  # unix format.
26816  new_path="$path"
26817
26818  windows_path="$new_path"
26819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26820    unix_path=`$CYGPATH -u "$windows_path"`
26821    new_path="$unix_path"
26822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26824    new_path="$unix_path"
26825  fi
26826
26827
26828  # Now try to locate executable using which
26829  new_path=`$WHICH "$new_path" 2> /dev/null`
26830
26831  if test "x$new_path" = x; then
26832    # Oops. Which didn't find the executable.
26833    # The splitting of arguments from the executable at a space might have been incorrect,
26834    # since paths with space are more likely in Windows. Give it another try with the whole
26835    # argument.
26836    path="$complete"
26837    arguments="EOL"
26838    new_path="$path"
26839
26840  windows_path="$new_path"
26841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26842    unix_path=`$CYGPATH -u "$windows_path"`
26843    new_path="$unix_path"
26844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26846    new_path="$unix_path"
26847  fi
26848
26849
26850    new_path=`$WHICH "$new_path" 2> /dev/null`
26851
26852    if test "x$new_path" = x; then
26853      # It's still not found. Now this is an unrecoverable error.
26854      { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26855$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26856      has_space=`$ECHO "$complete" | $GREP " "`
26857      if test "x$has_space" != x; then
26858        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26860      fi
26861      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26862$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26863   { (exit 1); exit 1; }; }
26864    fi
26865  fi
26866
26867  # Now new_path has a complete unix path to the binary
26868  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26869    # Keep paths in /bin as-is, but remove trailing .exe if any
26870    new_path="${new_path/%.exe/}"
26871    # Do not save /bin paths to all_fixpath_prefixes!
26872  else
26873    # Not in mixed or Windows style, start by that.
26874    new_path=`cmd //c echo $new_path`
26875
26876  input_path="$new_path"
26877  # Check if we need to convert this using DOS-style short mode. If the path
26878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26879  # take no chances and rewrite it.
26880  # Note: m4 eats our [], so we need to use [ and ] instead.
26881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26882  if test "x$has_forbidden_chars" != x; then
26883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26885  fi
26886
26887    # Output is in $new_path
26888
26889  windows_path="$new_path"
26890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26891    unix_path=`$CYGPATH -u "$windows_path"`
26892    new_path="$unix_path"
26893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26895    new_path="$unix_path"
26896  fi
26897
26898    # remove trailing .exe if any
26899    new_path="${new_path/%.exe/}"
26900
26901    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26902    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26903  fi
26904
26905  else
26906    # We're on a posix platform. Hooray! :)
26907    # First separate the path from the arguments. This will split at the first
26908    # space.
26909    complete="$OBJDUMP"
26910    path="${complete%% *}"
26911    tmp="$complete EOL"
26912    arguments="${tmp#* }"
26913
26914    new_path=`$WHICH $path 2> /dev/null`
26915    if test "x$new_path" = x; then
26916      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26917      if test "x$is_absolute_path" != x; then
26918        { $as_echo "$as_me:$LINENO: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5
26919$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;}
26920        new_path="$path"
26921      else
26922        { $as_echo "$as_me:$LINENO: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26923$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26924        has_space=`$ECHO "$complete" | $GREP " "`
26925        if test "x$has_space" != x; then
26926          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
26927$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26928        fi
26929        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of OBJDUMP" >&5
26930$as_echo "$as_me: error: Cannot locate the the path of OBJDUMP" >&2;}
26931   { (exit 1); exit 1; }; }
26932      fi
26933    fi
26934  fi
26935
26936  # Now join together the path and the arguments once again
26937  if test "x$arguments" != xEOL; then
26938      new_complete="$new_path ${arguments% *}"
26939  else
26940      new_complete="$new_path"
26941  fi
26942
26943  if test "x$complete" != "x$new_complete"; then
26944    OBJDUMP="$new_complete"
26945    { $as_echo "$as_me:$LINENO: Rewriting OBJDUMP to \"$new_complete\"" >&5
26946$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26947  fi
26948
26949fi
26950
26951if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26952   # Extract the first word of "lipo", so it can be a program name with args.
26953set dummy lipo; ac_word=$2
26954{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26955$as_echo_n "checking for $ac_word... " >&6; }
26956if test "${ac_cv_path_LIPO+set}" = set; then
26957  $as_echo_n "(cached) " >&6
26958else
26959  case $LIPO in
26960  [\\/]* | ?:[\\/]*)
26961  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26962  ;;
26963  *)
26964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26965for as_dir in $PATH
26966do
26967  IFS=$as_save_IFS
26968  test -z "$as_dir" && as_dir=.
26969  for ac_exec_ext in '' $ac_executable_extensions; do
26970  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26971    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26972    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26973    break 2
26974  fi
26975done
26976done
26977IFS=$as_save_IFS
26978
26979  ;;
26980esac
26981fi
26982LIPO=$ac_cv_path_LIPO
26983if test -n "$LIPO"; then
26984  { $as_echo "$as_me:$LINENO: result: $LIPO" >&5
26985$as_echo "$LIPO" >&6; }
26986else
26987  { $as_echo "$as_me:$LINENO: result: no" >&5
26988$as_echo "no" >&6; }
26989fi
26990
26991
26992
26993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26994
26995  # First separate the path from the arguments. This will split at the first
26996  # space.
26997  complete="$LIPO"
26998  path="${complete%% *}"
26999  tmp="$complete EOL"
27000  arguments="${tmp#* }"
27001
27002  # Input might be given as Windows format, start by converting to
27003  # unix format.
27004  new_path=`$CYGPATH -u "$path"`
27005
27006  # Now try to locate executable using which
27007  new_path=`$WHICH "$new_path" 2> /dev/null`
27008  # bat and cmd files are not always considered executable in cygwin causing which
27009  # to not find them
27010  if test "x$new_path" = x \
27011           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27012           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27013    new_path=`$CYGPATH -u "$path"`
27014  fi
27015  if test "x$new_path" = x; then
27016    # Oops. Which didn't find the executable.
27017    # The splitting of arguments from the executable at a space might have been incorrect,
27018    # since paths with space are more likely in Windows. Give it another try with the whole
27019    # argument.
27020    path="$complete"
27021    arguments="EOL"
27022    new_path=`$CYGPATH -u "$path"`
27023    new_path=`$WHICH "$new_path" 2> /dev/null`
27024    # bat and cmd files are not always considered executable in cygwin causing which
27025    # to not find them
27026    if test "x$new_path" = x \
27027             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27028             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27029      new_path=`$CYGPATH -u "$path"`
27030    fi
27031    if test "x$new_path" = x; then
27032      # It's still not found. Now this is an unrecoverable error.
27033      { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27034$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27035      has_space=`$ECHO "$complete" | $GREP " "`
27036      if test "x$has_space" != x; then
27037        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27038$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27039      fi
27040      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
27041$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
27042   { (exit 1); exit 1; }; }
27043    fi
27044  fi
27045
27046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27049  # "foo.exe" is OK but "foo" is an error.
27050  #
27051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27052  # It is also a way to make sure we got the proper file name for the real test later on.
27053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27054  if test "x$test_shortpath" = x; then
27055    # Short path failed, file does not exist as specified.
27056    # Try adding .exe or .cmd
27057    if test -f "${new_path}.exe"; then
27058       input_to_shortpath="${new_path}.exe"
27059    elif test -f "${new_path}.cmd"; then
27060       input_to_shortpath="${new_path}.cmd"
27061    else
27062      { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27063$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27064      { $as_echo "$as_me:$LINENO: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27065$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27066      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
27067$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
27068   { (exit 1); exit 1; }; }
27069    fi
27070  else
27071    input_to_shortpath="$new_path"
27072  fi
27073
27074  # Call helper function which possibly converts this using DOS-style short mode.
27075  # If so, the updated path is stored in $new_path.
27076  new_path="$input_to_shortpath"
27077
27078  input_path="$input_to_shortpath"
27079  # Check if we need to convert this using DOS-style short mode. If the path
27080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27081  # take no chances and rewrite it.
27082  # Note: m4 eats our [], so we need to use [ and ] instead.
27083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27084  if test "x$has_forbidden_chars" != x; then
27085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27089      # Going to short mode and back again did indeed matter. Since short mode is
27090      # case insensitive, let's make it lowercase to improve readability.
27091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27092      # Now convert it back to Unix-stile (cygpath)
27093      input_path=`$CYGPATH -u "$shortmode_path"`
27094      new_path="$input_path"
27095    fi
27096  fi
27097
27098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27099  if test "x$test_cygdrive_prefix" = x; then
27100    # As a simple fix, exclude /usr/bin since it's not a real path.
27101    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27103      # a path prefixed by /cygdrive for fixpath to work.
27104      new_path="$CYGWIN_ROOT_PATH$input_path"
27105    fi
27106  fi
27107
27108  # remove trailing .exe if any
27109  new_path="${new_path/%.exe/}"
27110
27111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27112
27113  # First separate the path from the arguments. This will split at the first
27114  # space.
27115  complete="$LIPO"
27116  path="${complete%% *}"
27117  tmp="$complete EOL"
27118  arguments="${tmp#* }"
27119
27120  # Input might be given as Windows format, start by converting to
27121  # unix format.
27122  new_path="$path"
27123
27124  windows_path="$new_path"
27125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27126    unix_path=`$CYGPATH -u "$windows_path"`
27127    new_path="$unix_path"
27128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27130    new_path="$unix_path"
27131  fi
27132
27133
27134  # Now try to locate executable using which
27135  new_path=`$WHICH "$new_path" 2> /dev/null`
27136
27137  if test "x$new_path" = x; then
27138    # Oops. Which didn't find the executable.
27139    # The splitting of arguments from the executable at a space might have been incorrect,
27140    # since paths with space are more likely in Windows. Give it another try with the whole
27141    # argument.
27142    path="$complete"
27143    arguments="EOL"
27144    new_path="$path"
27145
27146  windows_path="$new_path"
27147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27148    unix_path=`$CYGPATH -u "$windows_path"`
27149    new_path="$unix_path"
27150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27152    new_path="$unix_path"
27153  fi
27154
27155
27156    new_path=`$WHICH "$new_path" 2> /dev/null`
27157
27158    if test "x$new_path" = x; then
27159      # It's still not found. Now this is an unrecoverable error.
27160      { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27161$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27162      has_space=`$ECHO "$complete" | $GREP " "`
27163      if test "x$has_space" != x; then
27164        { $as_echo "$as_me:$LINENO: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27165$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27166      fi
27167      { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
27168$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
27169   { (exit 1); exit 1; }; }
27170    fi
27171  fi
27172
27173  # Now new_path has a complete unix path to the binary
27174  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27175    # Keep paths in /bin as-is, but remove trailing .exe if any
27176    new_path="${new_path/%.exe/}"
27177    # Do not save /bin paths to all_fixpath_prefixes!
27178  else
27179    # Not in mixed or Windows style, start by that.
27180    new_path=`cmd //c echo $new_path`
27181
27182  input_path="$new_path"
27183  # Check if we need to convert this using DOS-style short mode. If the path
27184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27185  # take no chances and rewrite it.
27186  # Note: m4 eats our [], so we need to use [ and ] instead.
27187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27188  if test "x$has_forbidden_chars" != x; then
27189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27191  fi
27192
27193    # Output is in $new_path
27194
27195  windows_path="$new_path"
27196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27197    unix_path=`$CYGPATH -u "$windows_path"`
27198    new_path="$unix_path"
27199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27201    new_path="$unix_path"
27202  fi
27203
27204    # remove trailing .exe if any
27205    new_path="${new_path/%.exe/}"
27206
27207    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27208    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27209  fi
27210
27211  else
27212    # We're on a posix platform. Hooray! :)
27213    # First separate the path from the arguments. This will split at the first
27214    # space.
27215    complete="$LIPO"
27216    path="${complete%% *}"
27217    tmp="$complete EOL"
27218    arguments="${tmp#* }"
27219
27220    new_path=`$WHICH $path 2> /dev/null`
27221    if test "x$new_path" = x; then
27222      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27223      if test "x$is_absolute_path" != x; then
27224        { $as_echo "$as_me:$LINENO: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5
27225$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;}
27226        new_path="$path"
27227      else
27228        { $as_echo "$as_me:$LINENO: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27229$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27230        has_space=`$ECHO "$complete" | $GREP " "`
27231        if test "x$has_space" != x; then
27232          { $as_echo "$as_me:$LINENO: This might be caused by spaces in the path, which is not allowed." >&5
27233$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27234        fi
27235        { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of LIPO" >&5
27236$as_echo "$as_me: error: Cannot locate the the path of LIPO" >&2;}
27237   { (exit 1); exit 1; }; }
27238      fi
27239    fi
27240  fi
27241
27242  # Now join together the path and the arguments once again
27243  if test "x$arguments" != xEOL; then
27244      new_complete="$new_path ${arguments% *}"
27245  else
27246      new_complete="$new_path"
27247  fi
27248
27249  if test "x$complete" != "x$new_complete"; then
27250    LIPO="$new_complete"
27251    { $as_echo "$as_me:$LINENO: Rewriting LIPO to \"$new_complete\"" >&5
27252$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27253  fi
27254
27255fi
27256
27257# Restore old path without tools dir
27258PATH="$OLD_PATH"
27259
27260
27261# FIXME: Currently we must test this after paths but before flags. Fix!
27262
27263# And we can test some aspects on the target using configure macros.
27264
27265
27266{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
27267$as_echo_n "checking for ANSI C header files... " >&6; }
27268if test "${ac_cv_header_stdc+set}" = set; then
27269  $as_echo_n "(cached) " >&6
27270else
27271  cat >conftest.$ac_ext <<_ACEOF
27272/* confdefs.h.  */
27273_ACEOF
27274cat confdefs.h >>conftest.$ac_ext
27275cat >>conftest.$ac_ext <<_ACEOF
27276/* end confdefs.h.  */
27277#include <stdlib.h>
27278#include <stdarg.h>
27279#include <string.h>
27280#include <float.h>
27281
27282int
27283main ()
27284{
27285
27286  ;
27287  return 0;
27288}
27289_ACEOF
27290rm -f conftest.$ac_objext
27291if { (ac_try="$ac_compile"
27292case "(($ac_try" in
27293  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27294  *) ac_try_echo=$ac_try;;
27295esac
27296eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27297$as_echo "$ac_try_echo") >&5
27298  (eval "$ac_compile") 2>conftest.er1
27299  ac_status=$?
27300  grep -v '^ *+' conftest.er1 >conftest.err
27301  rm -f conftest.er1
27302  cat conftest.err >&5
27303  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27304  (exit $ac_status); } && {
27305	 test -z "$ac_cxx_werror_flag" ||
27306	 test ! -s conftest.err
27307       } && test -s conftest.$ac_objext; then
27308  ac_cv_header_stdc=yes
27309else
27310  $as_echo "$as_me: failed program was:" >&5
27311sed 's/^/| /' conftest.$ac_ext >&5
27312
27313	ac_cv_header_stdc=no
27314fi
27315
27316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27317
27318if test $ac_cv_header_stdc = yes; then
27319  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27320  cat >conftest.$ac_ext <<_ACEOF
27321/* confdefs.h.  */
27322_ACEOF
27323cat confdefs.h >>conftest.$ac_ext
27324cat >>conftest.$ac_ext <<_ACEOF
27325/* end confdefs.h.  */
27326#include <string.h>
27327
27328_ACEOF
27329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27330  $EGREP "memchr" >/dev/null 2>&1; then
27331  :
27332else
27333  ac_cv_header_stdc=no
27334fi
27335rm -f conftest*
27336
27337fi
27338
27339if test $ac_cv_header_stdc = yes; then
27340  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27341  cat >conftest.$ac_ext <<_ACEOF
27342/* confdefs.h.  */
27343_ACEOF
27344cat confdefs.h >>conftest.$ac_ext
27345cat >>conftest.$ac_ext <<_ACEOF
27346/* end confdefs.h.  */
27347#include <stdlib.h>
27348
27349_ACEOF
27350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27351  $EGREP "free" >/dev/null 2>&1; then
27352  :
27353else
27354  ac_cv_header_stdc=no
27355fi
27356rm -f conftest*
27357
27358fi
27359
27360if test $ac_cv_header_stdc = yes; then
27361  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27362  if test "$cross_compiling" = yes; then
27363  :
27364else
27365  cat >conftest.$ac_ext <<_ACEOF
27366/* confdefs.h.  */
27367_ACEOF
27368cat confdefs.h >>conftest.$ac_ext
27369cat >>conftest.$ac_ext <<_ACEOF
27370/* end confdefs.h.  */
27371#include <ctype.h>
27372#include <stdlib.h>
27373#if ((' ' & 0x0FF) == 0x020)
27374# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27375# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27376#else
27377# define ISLOWER(c) \
27378		   (('a' <= (c) && (c) <= 'i') \
27379		     || ('j' <= (c) && (c) <= 'r') \
27380		     || ('s' <= (c) && (c) <= 'z'))
27381# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27382#endif
27383
27384#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27385int
27386main ()
27387{
27388  int i;
27389  for (i = 0; i < 256; i++)
27390    if (XOR (islower (i), ISLOWER (i))
27391	|| toupper (i) != TOUPPER (i))
27392      return 2;
27393  return 0;
27394}
27395_ACEOF
27396rm -f conftest$ac_exeext
27397if { (ac_try="$ac_link"
27398case "(($ac_try" in
27399  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27400  *) ac_try_echo=$ac_try;;
27401esac
27402eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27403$as_echo "$ac_try_echo") >&5
27404  (eval "$ac_link") 2>&5
27405  ac_status=$?
27406  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27407  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27408  { (case "(($ac_try" in
27409  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27410  *) ac_try_echo=$ac_try;;
27411esac
27412eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27413$as_echo "$ac_try_echo") >&5
27414  (eval "$ac_try") 2>&5
27415  ac_status=$?
27416  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27417  (exit $ac_status); }; }; then
27418  :
27419else
27420  $as_echo "$as_me: program exited with status $ac_status" >&5
27421$as_echo "$as_me: failed program was:" >&5
27422sed 's/^/| /' conftest.$ac_ext >&5
27423
27424( exit $ac_status )
27425ac_cv_header_stdc=no
27426fi
27427rm -rf conftest.dSYM
27428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27429fi
27430
27431
27432fi
27433fi
27434{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
27435$as_echo "$ac_cv_header_stdc" >&6; }
27436if test $ac_cv_header_stdc = yes; then
27437
27438cat >>confdefs.h <<\_ACEOF
27439#define STDC_HEADERS 1
27440_ACEOF
27441
27442fi
27443
27444# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27455		  inttypes.h stdint.h unistd.h
27456do
27457as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27458{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
27459$as_echo_n "checking for $ac_header... " >&6; }
27460if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27461  $as_echo_n "(cached) " >&6
27462else
27463  cat >conftest.$ac_ext <<_ACEOF
27464/* confdefs.h.  */
27465_ACEOF
27466cat confdefs.h >>conftest.$ac_ext
27467cat >>conftest.$ac_ext <<_ACEOF
27468/* end confdefs.h.  */
27469$ac_includes_default
27470
27471#include <$ac_header>
27472_ACEOF
27473rm -f conftest.$ac_objext
27474if { (ac_try="$ac_compile"
27475case "(($ac_try" in
27476  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27477  *) ac_try_echo=$ac_try;;
27478esac
27479eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27480$as_echo "$ac_try_echo") >&5
27481  (eval "$ac_compile") 2>conftest.er1
27482  ac_status=$?
27483  grep -v '^ *+' conftest.er1 >conftest.err
27484  rm -f conftest.er1
27485  cat conftest.err >&5
27486  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27487  (exit $ac_status); } && {
27488	 test -z "$ac_cxx_werror_flag" ||
27489	 test ! -s conftest.err
27490       } && test -s conftest.$ac_objext; then
27491  eval "$as_ac_Header=yes"
27492else
27493  $as_echo "$as_me: failed program was:" >&5
27494sed 's/^/| /' conftest.$ac_ext >&5
27495
27496	eval "$as_ac_Header=no"
27497fi
27498
27499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27500fi
27501ac_res=`eval 'as_val=${'$as_ac_Header'}
27502		 $as_echo "$as_val"'`
27503	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
27504$as_echo "$ac_res" >&6; }
27505as_val=`eval 'as_val=${'$as_ac_Header'}
27506		 $as_echo "$as_val"'`
27507   if test "x$as_val" = x""yes; then
27508  cat >>confdefs.h <<_ACEOF
27509#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27510_ACEOF
27511
27512fi
27513
27514done
27515
27516
27517
27518###############################################################################
27519#
27520# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27521# (The JVM can use 32 or 64 bit Java pointers but that decision
27522# is made at runtime.)
27523#
27524if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27525  # Always specify -m flags on Solaris
27526
27527  # keep track of c/cxx flags that we added outselves...
27528  #   to prevent emitting warning...
27529  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27530  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27531  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27532
27533  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27534  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27535  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27536
27537  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27538  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27539  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27540
27541elif test "x$COMPILE_TYPE" = xreduced; then
27542  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27543    # Specify -m if running reduced on other Posix platforms
27544
27545  # keep track of c/cxx flags that we added outselves...
27546  #   to prevent emitting warning...
27547  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27548  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27549  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27550
27551  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27552  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27553  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27554
27555  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27556  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27557  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27558
27559  fi
27560fi
27561
27562# Make compilation sanity check
27563
27564for ac_header in stdio.h
27565do
27566as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27567if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27568  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
27569$as_echo_n "checking for $ac_header... " >&6; }
27570if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27571  $as_echo_n "(cached) " >&6
27572fi
27573ac_res=`eval 'as_val=${'$as_ac_Header'}
27574		 $as_echo "$as_val"'`
27575	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
27576$as_echo "$ac_res" >&6; }
27577else
27578  # Is the header compilable?
27579{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
27580$as_echo_n "checking $ac_header usability... " >&6; }
27581cat >conftest.$ac_ext <<_ACEOF
27582/* confdefs.h.  */
27583_ACEOF
27584cat confdefs.h >>conftest.$ac_ext
27585cat >>conftest.$ac_ext <<_ACEOF
27586/* end confdefs.h.  */
27587$ac_includes_default
27588#include <$ac_header>
27589_ACEOF
27590rm -f conftest.$ac_objext
27591if { (ac_try="$ac_compile"
27592case "(($ac_try" in
27593  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27594  *) ac_try_echo=$ac_try;;
27595esac
27596eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27597$as_echo "$ac_try_echo") >&5
27598  (eval "$ac_compile") 2>conftest.er1
27599  ac_status=$?
27600  grep -v '^ *+' conftest.er1 >conftest.err
27601  rm -f conftest.er1
27602  cat conftest.err >&5
27603  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27604  (exit $ac_status); } && {
27605	 test -z "$ac_cxx_werror_flag" ||
27606	 test ! -s conftest.err
27607       } && test -s conftest.$ac_objext; then
27608  ac_header_compiler=yes
27609else
27610  $as_echo "$as_me: failed program was:" >&5
27611sed 's/^/| /' conftest.$ac_ext >&5
27612
27613	ac_header_compiler=no
27614fi
27615
27616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27617{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27618$as_echo "$ac_header_compiler" >&6; }
27619
27620# Is the header present?
27621{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
27622$as_echo_n "checking $ac_header presence... " >&6; }
27623cat >conftest.$ac_ext <<_ACEOF
27624/* confdefs.h.  */
27625_ACEOF
27626cat confdefs.h >>conftest.$ac_ext
27627cat >>conftest.$ac_ext <<_ACEOF
27628/* end confdefs.h.  */
27629#include <$ac_header>
27630_ACEOF
27631if { (ac_try="$ac_cpp conftest.$ac_ext"
27632case "(($ac_try" in
27633  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27634  *) ac_try_echo=$ac_try;;
27635esac
27636eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27637$as_echo "$ac_try_echo") >&5
27638  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
27639  ac_status=$?
27640  grep -v '^ *+' conftest.er1 >conftest.err
27641  rm -f conftest.er1
27642  cat conftest.err >&5
27643  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27644  (exit $ac_status); } >/dev/null && {
27645	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
27646	 test ! -s conftest.err
27647       }; then
27648  ac_header_preproc=yes
27649else
27650  $as_echo "$as_me: failed program was:" >&5
27651sed 's/^/| /' conftest.$ac_ext >&5
27652
27653  ac_header_preproc=no
27654fi
27655
27656rm -f conftest.err conftest.$ac_ext
27657{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27658$as_echo "$ac_header_preproc" >&6; }
27659
27660# So?  What about this header?
27661case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
27662  yes:no: )
27663    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27664$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27665    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27666$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27667    ac_header_preproc=yes
27668    ;;
27669  no:yes:* )
27670    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27671$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27672    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27673$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27674    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27675$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27676    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27677$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27678    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27679$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27680    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27681$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27682    ( cat <<\_ASBOX
27683## ----------------------------------------- ##
27684## Report this to build-dev@openjdk.java.net ##
27685## ----------------------------------------- ##
27686_ASBOX
27687     ) | sed "s/^/$as_me: WARNING:     /" >&2
27688    ;;
27689esac
27690{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
27691$as_echo_n "checking for $ac_header... " >&6; }
27692if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27693  $as_echo_n "(cached) " >&6
27694else
27695  eval "$as_ac_Header=\$ac_header_preproc"
27696fi
27697ac_res=`eval 'as_val=${'$as_ac_Header'}
27698		 $as_echo "$as_val"'`
27699	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
27700$as_echo "$ac_res" >&6; }
27701
27702fi
27703as_val=`eval 'as_val=${'$as_ac_Header'}
27704		 $as_echo "$as_val"'`
27705   if test "x$as_val" = x""yes; then
27706  cat >>confdefs.h <<_ACEOF
27707#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27708_ACEOF
27709
27710else
27711
27712  { $as_echo "$as_me:$LINENO: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27713$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27714  if test "x$COMPILE_TYPE" = xreduced; then
27715    { $as_echo "$as_me:$LINENO: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27716$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27717  elif test "x$COMPILE_TYPE" = xcross; then
27718    { $as_echo "$as_me:$LINENO: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27719$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27720  fi
27721  { { $as_echo "$as_me:$LINENO: error: Cannot continue." >&5
27722$as_echo "$as_me: error: Cannot continue." >&2;}
27723   { (exit 1); exit 1; }; }
27724
27725fi
27726
27727done
27728
27729
27730# The cast to long int works around a bug in the HP C Compiler
27731# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27732# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27733# This bug is HP SR number 8606223364.
27734{ $as_echo "$as_me:$LINENO: checking size of int *" >&5
27735$as_echo_n "checking size of int *... " >&6; }
27736if test "${ac_cv_sizeof_int_p+set}" = set; then
27737  $as_echo_n "(cached) " >&6
27738else
27739  if test "$cross_compiling" = yes; then
27740  # Depending upon the size, compute the lo and hi bounds.
27741cat >conftest.$ac_ext <<_ACEOF
27742/* confdefs.h.  */
27743_ACEOF
27744cat confdefs.h >>conftest.$ac_ext
27745cat >>conftest.$ac_ext <<_ACEOF
27746/* end confdefs.h.  */
27747$ac_includes_default
27748int
27749main ()
27750{
27751static int test_array [1 - 2 * !(((long int) (sizeof (int *))) >= 0)];
27752test_array [0] = 0
27753
27754  ;
27755  return 0;
27756}
27757_ACEOF
27758rm -f conftest.$ac_objext
27759if { (ac_try="$ac_compile"
27760case "(($ac_try" in
27761  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27762  *) ac_try_echo=$ac_try;;
27763esac
27764eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27765$as_echo "$ac_try_echo") >&5
27766  (eval "$ac_compile") 2>conftest.er1
27767  ac_status=$?
27768  grep -v '^ *+' conftest.er1 >conftest.err
27769  rm -f conftest.er1
27770  cat conftest.err >&5
27771  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27772  (exit $ac_status); } && {
27773	 test -z "$ac_cxx_werror_flag" ||
27774	 test ! -s conftest.err
27775       } && test -s conftest.$ac_objext; then
27776  ac_lo=0 ac_mid=0
27777  while :; do
27778    cat >conftest.$ac_ext <<_ACEOF
27779/* confdefs.h.  */
27780_ACEOF
27781cat confdefs.h >>conftest.$ac_ext
27782cat >>conftest.$ac_ext <<_ACEOF
27783/* end confdefs.h.  */
27784$ac_includes_default
27785int
27786main ()
27787{
27788static int test_array [1 - 2 * !(((long int) (sizeof (int *))) <= $ac_mid)];
27789test_array [0] = 0
27790
27791  ;
27792  return 0;
27793}
27794_ACEOF
27795rm -f conftest.$ac_objext
27796if { (ac_try="$ac_compile"
27797case "(($ac_try" in
27798  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27799  *) ac_try_echo=$ac_try;;
27800esac
27801eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27802$as_echo "$ac_try_echo") >&5
27803  (eval "$ac_compile") 2>conftest.er1
27804  ac_status=$?
27805  grep -v '^ *+' conftest.er1 >conftest.err
27806  rm -f conftest.er1
27807  cat conftest.err >&5
27808  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27809  (exit $ac_status); } && {
27810	 test -z "$ac_cxx_werror_flag" ||
27811	 test ! -s conftest.err
27812       } && test -s conftest.$ac_objext; then
27813  ac_hi=$ac_mid; break
27814else
27815  $as_echo "$as_me: failed program was:" >&5
27816sed 's/^/| /' conftest.$ac_ext >&5
27817
27818	ac_lo=`expr $ac_mid + 1`
27819			if test $ac_lo -le $ac_mid; then
27820			  ac_lo= ac_hi=
27821			  break
27822			fi
27823			ac_mid=`expr 2 '*' $ac_mid + 1`
27824fi
27825
27826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27827  done
27828else
27829  $as_echo "$as_me: failed program was:" >&5
27830sed 's/^/| /' conftest.$ac_ext >&5
27831
27832	cat >conftest.$ac_ext <<_ACEOF
27833/* confdefs.h.  */
27834_ACEOF
27835cat confdefs.h >>conftest.$ac_ext
27836cat >>conftest.$ac_ext <<_ACEOF
27837/* end confdefs.h.  */
27838$ac_includes_default
27839int
27840main ()
27841{
27842static int test_array [1 - 2 * !(((long int) (sizeof (int *))) < 0)];
27843test_array [0] = 0
27844
27845  ;
27846  return 0;
27847}
27848_ACEOF
27849rm -f conftest.$ac_objext
27850if { (ac_try="$ac_compile"
27851case "(($ac_try" in
27852  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27853  *) ac_try_echo=$ac_try;;
27854esac
27855eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27856$as_echo "$ac_try_echo") >&5
27857  (eval "$ac_compile") 2>conftest.er1
27858  ac_status=$?
27859  grep -v '^ *+' conftest.er1 >conftest.err
27860  rm -f conftest.er1
27861  cat conftest.err >&5
27862  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27863  (exit $ac_status); } && {
27864	 test -z "$ac_cxx_werror_flag" ||
27865	 test ! -s conftest.err
27866       } && test -s conftest.$ac_objext; then
27867  ac_hi=-1 ac_mid=-1
27868  while :; do
27869    cat >conftest.$ac_ext <<_ACEOF
27870/* confdefs.h.  */
27871_ACEOF
27872cat confdefs.h >>conftest.$ac_ext
27873cat >>conftest.$ac_ext <<_ACEOF
27874/* end confdefs.h.  */
27875$ac_includes_default
27876int
27877main ()
27878{
27879static int test_array [1 - 2 * !(((long int) (sizeof (int *))) >= $ac_mid)];
27880test_array [0] = 0
27881
27882  ;
27883  return 0;
27884}
27885_ACEOF
27886rm -f conftest.$ac_objext
27887if { (ac_try="$ac_compile"
27888case "(($ac_try" in
27889  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27890  *) ac_try_echo=$ac_try;;
27891esac
27892eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27893$as_echo "$ac_try_echo") >&5
27894  (eval "$ac_compile") 2>conftest.er1
27895  ac_status=$?
27896  grep -v '^ *+' conftest.er1 >conftest.err
27897  rm -f conftest.er1
27898  cat conftest.err >&5
27899  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27900  (exit $ac_status); } && {
27901	 test -z "$ac_cxx_werror_flag" ||
27902	 test ! -s conftest.err
27903       } && test -s conftest.$ac_objext; then
27904  ac_lo=$ac_mid; break
27905else
27906  $as_echo "$as_me: failed program was:" >&5
27907sed 's/^/| /' conftest.$ac_ext >&5
27908
27909	ac_hi=`expr '(' $ac_mid ')' - 1`
27910			if test $ac_mid -le $ac_hi; then
27911			  ac_lo= ac_hi=
27912			  break
27913			fi
27914			ac_mid=`expr 2 '*' $ac_mid`
27915fi
27916
27917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27918  done
27919else
27920  $as_echo "$as_me: failed program was:" >&5
27921sed 's/^/| /' conftest.$ac_ext >&5
27922
27923	ac_lo= ac_hi=
27924fi
27925
27926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27927fi
27928
27929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27930# Binary search between lo and hi bounds.
27931while test "x$ac_lo" != "x$ac_hi"; do
27932  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
27933  cat >conftest.$ac_ext <<_ACEOF
27934/* confdefs.h.  */
27935_ACEOF
27936cat confdefs.h >>conftest.$ac_ext
27937cat >>conftest.$ac_ext <<_ACEOF
27938/* end confdefs.h.  */
27939$ac_includes_default
27940int
27941main ()
27942{
27943static int test_array [1 - 2 * !(((long int) (sizeof (int *))) <= $ac_mid)];
27944test_array [0] = 0
27945
27946  ;
27947  return 0;
27948}
27949_ACEOF
27950rm -f conftest.$ac_objext
27951if { (ac_try="$ac_compile"
27952case "(($ac_try" in
27953  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27954  *) ac_try_echo=$ac_try;;
27955esac
27956eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27957$as_echo "$ac_try_echo") >&5
27958  (eval "$ac_compile") 2>conftest.er1
27959  ac_status=$?
27960  grep -v '^ *+' conftest.er1 >conftest.err
27961  rm -f conftest.er1
27962  cat conftest.err >&5
27963  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27964  (exit $ac_status); } && {
27965	 test -z "$ac_cxx_werror_flag" ||
27966	 test ! -s conftest.err
27967       } && test -s conftest.$ac_objext; then
27968  ac_hi=$ac_mid
27969else
27970  $as_echo "$as_me: failed program was:" >&5
27971sed 's/^/| /' conftest.$ac_ext >&5
27972
27973	ac_lo=`expr '(' $ac_mid ')' + 1`
27974fi
27975
27976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27977done
27978case $ac_lo in
27979?*) ac_cv_sizeof_int_p=$ac_lo;;
27980'') if test "$ac_cv_type_int_p" = yes; then
27981     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27983{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int *)
27984See \`config.log' for more details." >&5
27985$as_echo "$as_me: error: cannot compute sizeof (int *)
27986See \`config.log' for more details." >&2;}
27987   { (exit 77); exit 77; }; }; }
27988   else
27989     ac_cv_sizeof_int_p=0
27990   fi ;;
27991esac
27992else
27993  cat >conftest.$ac_ext <<_ACEOF
27994/* confdefs.h.  */
27995_ACEOF
27996cat confdefs.h >>conftest.$ac_ext
27997cat >>conftest.$ac_ext <<_ACEOF
27998/* end confdefs.h.  */
27999$ac_includes_default
28000static long int longval () { return (long int) (sizeof (int *)); }
28001static unsigned long int ulongval () { return (long int) (sizeof (int *)); }
28002#include <stdio.h>
28003#include <stdlib.h>
28004int
28005main ()
28006{
28007
28008  FILE *f = fopen ("conftest.val", "w");
28009  if (! f)
28010    return 1;
28011  if (((long int) (sizeof (int *))) < 0)
28012    {
28013      long int i = longval ();
28014      if (i != ((long int) (sizeof (int *))))
28015	return 1;
28016      fprintf (f, "%ld", i);
28017    }
28018  else
28019    {
28020      unsigned long int i = ulongval ();
28021      if (i != ((long int) (sizeof (int *))))
28022	return 1;
28023      fprintf (f, "%lu", i);
28024    }
28025  /* Do not output a trailing newline, as this causes \r\n confusion
28026     on some platforms.  */
28027  return ferror (f) || fclose (f) != 0;
28028
28029  ;
28030  return 0;
28031}
28032_ACEOF
28033rm -f conftest$ac_exeext
28034if { (ac_try="$ac_link"
28035case "(($ac_try" in
28036  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28037  *) ac_try_echo=$ac_try;;
28038esac
28039eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28040$as_echo "$ac_try_echo") >&5
28041  (eval "$ac_link") 2>&5
28042  ac_status=$?
28043  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28044  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28045  { (case "(($ac_try" in
28046  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28047  *) ac_try_echo=$ac_try;;
28048esac
28049eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28050$as_echo "$ac_try_echo") >&5
28051  (eval "$ac_try") 2>&5
28052  ac_status=$?
28053  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28054  (exit $ac_status); }; }; then
28055  ac_cv_sizeof_int_p=`cat conftest.val`
28056else
28057  $as_echo "$as_me: program exited with status $ac_status" >&5
28058$as_echo "$as_me: failed program was:" >&5
28059sed 's/^/| /' conftest.$ac_ext >&5
28060
28061( exit $ac_status )
28062if test "$ac_cv_type_int_p" = yes; then
28063     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
28064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28065{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int *)
28066See \`config.log' for more details." >&5
28067$as_echo "$as_me: error: cannot compute sizeof (int *)
28068See \`config.log' for more details." >&2;}
28069   { (exit 77); exit 77; }; }; }
28070   else
28071     ac_cv_sizeof_int_p=0
28072   fi
28073fi
28074rm -rf conftest.dSYM
28075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28076fi
28077rm -f conftest.val
28078fi
28079{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int_p" >&5
28080$as_echo "$ac_cv_sizeof_int_p" >&6; }
28081
28082
28083
28084cat >>confdefs.h <<_ACEOF
28085#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28086_ACEOF
28087
28088
28089
28090if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28091  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28092  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28093fi
28094
28095if test "x$SIZEOF_INT_P" = x; then
28096    # The test failed, lets stick to the assumed value.
28097    { $as_echo "$as_me:$LINENO: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&5
28098$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28099else
28100    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28101
28102    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28103        { { $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
28104$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;}
28105   { (exit 1); exit 1; }; }
28106    fi
28107fi
28108
28109{ $as_echo "$as_me:$LINENO: checking for target address size" >&5
28110$as_echo_n "checking for target address size... " >&6; }
28111{ $as_echo "$as_me:$LINENO: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28112$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28113
28114
28115###############################################################################
28116#
28117# Is the target little of big endian?
28118#
28119
28120 { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
28121$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28122if test "${ac_cv_c_bigendian+set}" = set; then
28123  $as_echo_n "(cached) " >&6
28124else
28125  ac_cv_c_bigendian=unknown
28126    # See if we're dealing with a universal compiler.
28127    cat >conftest.$ac_ext <<_ACEOF
28128/* confdefs.h.  */
28129_ACEOF
28130cat confdefs.h >>conftest.$ac_ext
28131cat >>conftest.$ac_ext <<_ACEOF
28132/* end confdefs.h.  */
28133#ifndef __APPLE_CC__
28134	       not a universal capable compiler
28135	     #endif
28136	     typedef int dummy;
28137
28138_ACEOF
28139rm -f conftest.$ac_objext
28140if { (ac_try="$ac_compile"
28141case "(($ac_try" in
28142  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28143  *) ac_try_echo=$ac_try;;
28144esac
28145eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28146$as_echo "$ac_try_echo") >&5
28147  (eval "$ac_compile") 2>conftest.er1
28148  ac_status=$?
28149  grep -v '^ *+' conftest.er1 >conftest.err
28150  rm -f conftest.er1
28151  cat conftest.err >&5
28152  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28153  (exit $ac_status); } && {
28154	 test -z "$ac_cxx_werror_flag" ||
28155	 test ! -s conftest.err
28156       } && test -s conftest.$ac_objext; then
28157
28158	# Check for potential -arch flags.  It is not universal unless
28159	# there are some -arch flags.  Note that *ppc* also matches
28160	# ppc64.  This check is also rather less than ideal.
28161	case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
28162	  *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
28163	esac
28164else
28165  $as_echo "$as_me: failed program was:" >&5
28166sed 's/^/| /' conftest.$ac_ext >&5
28167
28168
28169fi
28170
28171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28172    if test $ac_cv_c_bigendian = unknown; then
28173      # See if sys/param.h defines the BYTE_ORDER macro.
28174      cat >conftest.$ac_ext <<_ACEOF
28175/* confdefs.h.  */
28176_ACEOF
28177cat confdefs.h >>conftest.$ac_ext
28178cat >>conftest.$ac_ext <<_ACEOF
28179/* end confdefs.h.  */
28180#include <sys/types.h>
28181	     #include <sys/param.h>
28182
28183int
28184main ()
28185{
28186#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28187		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28188		     && LITTLE_ENDIAN)
28189	      bogus endian macros
28190	     #endif
28191
28192  ;
28193  return 0;
28194}
28195_ACEOF
28196rm -f conftest.$ac_objext
28197if { (ac_try="$ac_compile"
28198case "(($ac_try" in
28199  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28200  *) ac_try_echo=$ac_try;;
28201esac
28202eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28203$as_echo "$ac_try_echo") >&5
28204  (eval "$ac_compile") 2>conftest.er1
28205  ac_status=$?
28206  grep -v '^ *+' conftest.er1 >conftest.err
28207  rm -f conftest.er1
28208  cat conftest.err >&5
28209  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28210  (exit $ac_status); } && {
28211	 test -z "$ac_cxx_werror_flag" ||
28212	 test ! -s conftest.err
28213       } && test -s conftest.$ac_objext; then
28214  # It does; now see whether it defined to BIG_ENDIAN or not.
28215	 cat >conftest.$ac_ext <<_ACEOF
28216/* confdefs.h.  */
28217_ACEOF
28218cat confdefs.h >>conftest.$ac_ext
28219cat >>conftest.$ac_ext <<_ACEOF
28220/* end confdefs.h.  */
28221#include <sys/types.h>
28222		#include <sys/param.h>
28223
28224int
28225main ()
28226{
28227#if BYTE_ORDER != BIG_ENDIAN
28228		 not big endian
28229		#endif
28230
28231  ;
28232  return 0;
28233}
28234_ACEOF
28235rm -f conftest.$ac_objext
28236if { (ac_try="$ac_compile"
28237case "(($ac_try" in
28238  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28239  *) ac_try_echo=$ac_try;;
28240esac
28241eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28242$as_echo "$ac_try_echo") >&5
28243  (eval "$ac_compile") 2>conftest.er1
28244  ac_status=$?
28245  grep -v '^ *+' conftest.er1 >conftest.err
28246  rm -f conftest.er1
28247  cat conftest.err >&5
28248  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28249  (exit $ac_status); } && {
28250	 test -z "$ac_cxx_werror_flag" ||
28251	 test ! -s conftest.err
28252       } && test -s conftest.$ac_objext; then
28253  ac_cv_c_bigendian=yes
28254else
28255  $as_echo "$as_me: failed program was:" >&5
28256sed 's/^/| /' conftest.$ac_ext >&5
28257
28258	ac_cv_c_bigendian=no
28259fi
28260
28261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28262else
28263  $as_echo "$as_me: failed program was:" >&5
28264sed 's/^/| /' conftest.$ac_ext >&5
28265
28266
28267fi
28268
28269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28270    fi
28271    if test $ac_cv_c_bigendian = unknown; then
28272      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28273      cat >conftest.$ac_ext <<_ACEOF
28274/* confdefs.h.  */
28275_ACEOF
28276cat confdefs.h >>conftest.$ac_ext
28277cat >>conftest.$ac_ext <<_ACEOF
28278/* end confdefs.h.  */
28279#include <limits.h>
28280
28281int
28282main ()
28283{
28284#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28285	      bogus endian macros
28286	     #endif
28287
28288  ;
28289  return 0;
28290}
28291_ACEOF
28292rm -f conftest.$ac_objext
28293if { (ac_try="$ac_compile"
28294case "(($ac_try" in
28295  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28296  *) ac_try_echo=$ac_try;;
28297esac
28298eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28299$as_echo "$ac_try_echo") >&5
28300  (eval "$ac_compile") 2>conftest.er1
28301  ac_status=$?
28302  grep -v '^ *+' conftest.er1 >conftest.err
28303  rm -f conftest.er1
28304  cat conftest.err >&5
28305  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28306  (exit $ac_status); } && {
28307	 test -z "$ac_cxx_werror_flag" ||
28308	 test ! -s conftest.err
28309       } && test -s conftest.$ac_objext; then
28310  # It does; now see whether it defined to _BIG_ENDIAN or not.
28311	 cat >conftest.$ac_ext <<_ACEOF
28312/* confdefs.h.  */
28313_ACEOF
28314cat confdefs.h >>conftest.$ac_ext
28315cat >>conftest.$ac_ext <<_ACEOF
28316/* end confdefs.h.  */
28317#include <limits.h>
28318
28319int
28320main ()
28321{
28322#ifndef _BIG_ENDIAN
28323		 not big endian
28324		#endif
28325
28326  ;
28327  return 0;
28328}
28329_ACEOF
28330rm -f conftest.$ac_objext
28331if { (ac_try="$ac_compile"
28332case "(($ac_try" in
28333  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28334  *) ac_try_echo=$ac_try;;
28335esac
28336eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28337$as_echo "$ac_try_echo") >&5
28338  (eval "$ac_compile") 2>conftest.er1
28339  ac_status=$?
28340  grep -v '^ *+' conftest.er1 >conftest.err
28341  rm -f conftest.er1
28342  cat conftest.err >&5
28343  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28344  (exit $ac_status); } && {
28345	 test -z "$ac_cxx_werror_flag" ||
28346	 test ! -s conftest.err
28347       } && test -s conftest.$ac_objext; then
28348  ac_cv_c_bigendian=yes
28349else
28350  $as_echo "$as_me: failed program was:" >&5
28351sed 's/^/| /' conftest.$ac_ext >&5
28352
28353	ac_cv_c_bigendian=no
28354fi
28355
28356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28357else
28358  $as_echo "$as_me: failed program was:" >&5
28359sed 's/^/| /' conftest.$ac_ext >&5
28360
28361
28362fi
28363
28364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28365    fi
28366    if test $ac_cv_c_bigendian = unknown; then
28367      # Compile a test program.
28368      if test "$cross_compiling" = yes; then
28369  # Try to guess by grepping values from an object file.
28370	 cat >conftest.$ac_ext <<_ACEOF
28371/* confdefs.h.  */
28372_ACEOF
28373cat confdefs.h >>conftest.$ac_ext
28374cat >>conftest.$ac_ext <<_ACEOF
28375/* end confdefs.h.  */
28376short int ascii_mm[] =
28377		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28378		short int ascii_ii[] =
28379		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28380		int use_ascii (int i) {
28381		  return ascii_mm[i] + ascii_ii[i];
28382		}
28383		short int ebcdic_ii[] =
28384		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28385		short int ebcdic_mm[] =
28386		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28387		int use_ebcdic (int i) {
28388		  return ebcdic_mm[i] + ebcdic_ii[i];
28389		}
28390		extern int foo;
28391
28392int
28393main ()
28394{
28395return use_ascii (foo) == use_ebcdic (foo);
28396  ;
28397  return 0;
28398}
28399_ACEOF
28400rm -f conftest.$ac_objext
28401if { (ac_try="$ac_compile"
28402case "(($ac_try" in
28403  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28404  *) ac_try_echo=$ac_try;;
28405esac
28406eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28407$as_echo "$ac_try_echo") >&5
28408  (eval "$ac_compile") 2>conftest.er1
28409  ac_status=$?
28410  grep -v '^ *+' conftest.er1 >conftest.err
28411  rm -f conftest.er1
28412  cat conftest.err >&5
28413  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28414  (exit $ac_status); } && {
28415	 test -z "$ac_cxx_werror_flag" ||
28416	 test ! -s conftest.err
28417       } && test -s conftest.$ac_objext; then
28418  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28419	      ac_cv_c_bigendian=yes
28420	    fi
28421	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28422	      if test "$ac_cv_c_bigendian" = unknown; then
28423		ac_cv_c_bigendian=no
28424	      else
28425		# finding both strings is unlikely to happen, but who knows?
28426		ac_cv_c_bigendian=unknown
28427	      fi
28428	    fi
28429else
28430  $as_echo "$as_me: failed program was:" >&5
28431sed 's/^/| /' conftest.$ac_ext >&5
28432
28433
28434fi
28435
28436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28437else
28438  cat >conftest.$ac_ext <<_ACEOF
28439/* confdefs.h.  */
28440_ACEOF
28441cat confdefs.h >>conftest.$ac_ext
28442cat >>conftest.$ac_ext <<_ACEOF
28443/* end confdefs.h.  */
28444$ac_includes_default
28445int
28446main ()
28447{
28448
28449	     /* Are we little or big endian?  From Harbison&Steele.  */
28450	     union
28451	     {
28452	       long int l;
28453	       char c[sizeof (long int)];
28454	     } u;
28455	     u.l = 1;
28456	     return u.c[sizeof (long int) - 1] == 1;
28457
28458  ;
28459  return 0;
28460}
28461_ACEOF
28462rm -f conftest$ac_exeext
28463if { (ac_try="$ac_link"
28464case "(($ac_try" in
28465  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28466  *) ac_try_echo=$ac_try;;
28467esac
28468eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28469$as_echo "$ac_try_echo") >&5
28470  (eval "$ac_link") 2>&5
28471  ac_status=$?
28472  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28473  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28474  { (case "(($ac_try" in
28475  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28476  *) ac_try_echo=$ac_try;;
28477esac
28478eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28479$as_echo "$ac_try_echo") >&5
28480  (eval "$ac_try") 2>&5
28481  ac_status=$?
28482  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28483  (exit $ac_status); }; }; then
28484  ac_cv_c_bigendian=no
28485else
28486  $as_echo "$as_me: program exited with status $ac_status" >&5
28487$as_echo "$as_me: failed program was:" >&5
28488sed 's/^/| /' conftest.$ac_ext >&5
28489
28490( exit $ac_status )
28491ac_cv_c_bigendian=yes
28492fi
28493rm -rf conftest.dSYM
28494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28495fi
28496
28497
28498    fi
28499fi
28500{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
28501$as_echo "$ac_cv_c_bigendian" >&6; }
28502 case $ac_cv_c_bigendian in #(
28503   yes)
28504     ENDIAN="big";; #(
28505   no)
28506     ENDIAN="little" ;; #(
28507   universal)
28508     ENDIAN="universal_endianness"
28509     ;; #(
28510   *)
28511     ENDIAN="unknown" ;;
28512 esac
28513
28514
28515if test "x$ENDIAN" = xuniversal_endianness; then
28516    { { $as_echo "$as_me:$LINENO: error: Building with both big and little endianness is not supported" >&5
28517$as_echo "$as_me: error: Building with both big and little endianness is not supported" >&2;}
28518   { (exit 1); exit 1; }; }
28519fi
28520if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28521    { { $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
28522$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;}
28523   { (exit 1); exit 1; }; }
28524fi
28525
28526
28527# Configure flags for the tools
28528
28529
28530###############################################################################
28531#
28532# How to compile shared libraries.
28533#
28534
28535if test "x$GCC" = xyes; then
28536    COMPILER_NAME=gcc
28537    PICFLAG="-fPIC"
28538    LIBRARY_PREFIX=lib
28539    SHARED_LIBRARY='lib$1.so'
28540    STATIC_LIBRARY='lib$1.a'
28541    SHARED_LIBRARY_FLAGS="-shared"
28542    SHARED_LIBRARY_SUFFIX='.so'
28543    STATIC_LIBRARY_SUFFIX='.a'
28544    OBJ_SUFFIX='.o'
28545    EXE_SUFFIX=''
28546    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28547    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28548    C_FLAG_REORDER=''
28549    CXX_FLAG_REORDER=''
28550    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28551    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28552    LD="$CC"
28553    LDEXE="$CC"
28554    LDCXX="$CXX"
28555    LDEXECXX="$CXX"
28556    POST_STRIP_CMD="$STRIP -g"
28557
28558    # Linking is different on MacOSX
28559    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28560        # Might change in the future to clang.
28561        COMPILER_NAME=gcc
28562        SHARED_LIBRARY='lib$1.dylib'
28563        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28564        SHARED_LIBRARY_SUFFIX='.dylib'
28565        EXE_SUFFIX=''
28566        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28567        SET_SHARED_LIBRARY_MAPFILE=''
28568        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28569        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28570        POST_STRIP_CMD="$STRIP -S"
28571    fi
28572else
28573    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28574        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28575        COMPILER_NAME=ossc
28576        PICFLAG="-KPIC"
28577        LIBRARY_PREFIX=lib
28578        SHARED_LIBRARY='lib$1.so'
28579        STATIC_LIBRARY='lib$1.a'
28580        SHARED_LIBRARY_FLAGS="-G"
28581        SHARED_LIBRARY_SUFFIX='.so'
28582        STATIC_LIBRARY_SUFFIX='.a'
28583        OBJ_SUFFIX='.o'
28584        EXE_SUFFIX=''
28585        SET_SHARED_LIBRARY_NAME=''
28586        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28587	C_FLAG_REORDER='-xF'
28588	CXX_FLAG_REORDER='-xF'
28589        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28590        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28591        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28592        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28593        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28594        POST_STRIP_CMD="$STRIP -x"
28595        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28596    fi
28597    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28598        # If it is not gcc, then assume it is the MS Visual Studio compiler
28599        COMPILER_NAME=cl
28600        PICFLAG=""
28601        LIBRARY_PREFIX=
28602        SHARED_LIBRARY='$1.dll'
28603        STATIC_LIBRARY='$1.lib'
28604        SHARED_LIBRARY_FLAGS="-LD"
28605        SHARED_LIBRARY_SUFFIX='.dll'
28606        STATIC_LIBRARY_SUFFIX='.lib'
28607        OBJ_SUFFIX='.obj'
28608        EXE_SUFFIX='.exe'
28609        SET_SHARED_LIBRARY_NAME=''
28610        SET_SHARED_LIBRARY_MAPFILE=''
28611        SET_SHARED_LIBRARY_ORIGIN=''
28612        SET_EXECUTABLE_ORIGIN=''
28613    fi
28614fi
28615
28616
28617
28618
28619
28620
28621
28622
28623
28624
28625
28626
28627
28628
28629
28630
28631
28632
28633# The (cross) compiler is now configured, we can now test capabilities
28634# of the target platform.
28635
28636
28637
28638###############################################################################
28639#
28640# Setup the opt flags for different compilers
28641# and different operating systems.
28642#
28643
28644#
28645# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28646#
28647if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28648    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28649    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28650    CFLAGS="$CFLAGS -mstackrealign"
28651    { $as_echo "$as_me:$LINENO: checking if 32-bit compiler supports -mstackrealign" >&5
28652$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28653    cat >conftest.$ac_ext <<_ACEOF
28654/* confdefs.h.  */
28655_ACEOF
28656cat confdefs.h >>conftest.$ac_ext
28657cat >>conftest.$ac_ext <<_ACEOF
28658/* end confdefs.h.  */
28659int main() { return 0; }
28660_ACEOF
28661rm -f conftest.$ac_objext conftest$ac_exeext
28662if { (ac_try="$ac_link"
28663case "(($ac_try" in
28664  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28665  *) ac_try_echo=$ac_try;;
28666esac
28667eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28668$as_echo "$ac_try_echo") >&5
28669  (eval "$ac_link") 2>conftest.er1
28670  ac_status=$?
28671  grep -v '^ *+' conftest.er1 >conftest.err
28672  rm -f conftest.er1
28673  cat conftest.err >&5
28674  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28675  (exit $ac_status); } && {
28676	 test -z "$ac_cxx_werror_flag" ||
28677	 test ! -s conftest.err
28678       } && test -s conftest$ac_exeext && {
28679	 test "$cross_compiling" = yes ||
28680	 $as_test_x conftest$ac_exeext
28681       }; then
28682
28683		        { $as_echo "$as_me:$LINENO: result: yes" >&5
28684$as_echo "yes" >&6; }
28685
28686else
28687  $as_echo "$as_me: failed program was:" >&5
28688sed 's/^/| /' conftest.$ac_ext >&5
28689
28690
28691		        { $as_echo "$as_me:$LINENO: result: no" >&5
28692$as_echo "no" >&6; }
28693	                { { $as_echo "$as_me:$LINENO: error: The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." >&5
28694$as_echo "$as_me: error: The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." >&2;}
28695   { (exit 1); exit 1; }; }
28696
28697fi
28698
28699rm -rf conftest.dSYM
28700rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28701      conftest$ac_exeext conftest.$ac_ext
28702fi
28703
28704C_FLAG_DEPS="-MMD -MF"
28705CXX_FLAG_DEPS="-MMD -MF"
28706
28707case $COMPILER_TYPE in
28708  CC )
28709    D_FLAG="-g"
28710    case $COMPILER_NAME in
28711      gcc )
28712      	case $OPENJDK_TARGET_OS in
28713	  macosx )
28714	    # On MacOSX we optimize for size, something
28715	    # we should do for all platforms?
28716	    C_O_FLAG_HI="-Os"
28717	    C_O_FLAG_NORM="-Os"
28718	    C_O_FLAG_NONE=""
28719	    ;;
28720	  *)
28721	    C_O_FLAG_HI="-O3"
28722	    C_O_FLAG_NORM="-O2"
28723	    C_O_FLAG_NONE="-O0"
28724	    CFLAGS_DEBUG_SYMBOLS="-g"
28725	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28726	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28727	       CFLAGS_DEBUG_SYMBOLS="-g1"
28728	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28729	    fi
28730	    ;;
28731	esac
28732        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28733        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28734        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28735        ;;
28736      ossc )
28737        #
28738        # Forte has different names for this with their C++ compiler...
28739        #
28740        C_FLAG_DEPS="-xMMD -xMF"
28741        CXX_FLAG_DEPS="-xMMD -xMF"
28742
28743        # Extra options used with HIGHEST
28744        #
28745        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28746        #          done with care, there are some assumptions below that need to
28747        #          be understood about the use of pointers, and IEEE behavior.
28748        #
28749        # Use non-standard floating point mode (not IEEE 754)
28750        CC_HIGHEST="$CC_HIGHEST -fns"
28751        # Do some simplification of floating point arithmetic (not IEEE 754)
28752        CC_HIGHEST="$CC_HIGHEST -fsimple"
28753        # Use single precision floating point with 'float'
28754        CC_HIGHEST="$CC_HIGHEST -fsingle"
28755        # Assume memory references via basic pointer types do not alias
28756        #   (Source with excessing pointer casting and data access with mixed
28757        #    pointer types are not recommended)
28758        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28759        # Use intrinsic or inline versions for math/std functions
28760        #   (If you expect perfect errno behavior, do not use this)
28761        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28762        # Loop data dependency optimizations (need -xO3 or higher)
28763        CC_HIGHEST="$CC_HIGHEST -xdepend"
28764        # Pointer parameters to functions do not overlap
28765        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28766        #    If you pass in multiple pointers to the same data, do not use this)
28767        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28768        # Inline some library routines
28769        #   (If you expect perfect errno behavior, do not use this)
28770        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28771        # Use optimized math routines
28772        #   (If you expect perfect errno behavior, do not use this)
28773        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28774        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28775
28776        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28777          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28778          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28779        fi
28780
28781        case $OPENJDK_TARGET_CPU_ARCH in
28782          x86)
28783            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28784            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28785            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28786            C_O_FLAG_NONE="-xregs=no%frameptr"
28787            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28788            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28789            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28790            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28791            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28792               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28793               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28794            fi
28795            ;;
28796          sparc)
28797            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28798            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28799            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28800            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28801            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28802            C_O_FLAG_NONE=""
28803            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28804            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28805            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28806            CXX_O_FLAG_NONE=""
28807            ;;
28808        esac
28809
28810    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28811    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28812    esac
28813    ;;
28814  CL )
28815    D_FLAG=
28816    C_O_FLAG_HIGHEST="-O2"
28817    C_O_FLAG_HI="-O1"
28818    C_O_FLAG_NORM="-O1"
28819    C_O_FLAG_NONE="-Od"
28820    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28821    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28822    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28823    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28824    ;;
28825esac
28826
28827if test -z "$C_O_FLAG_HIGHEST"; then
28828   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28829fi
28830
28831if test -z "$CXX_O_FLAG_HIGHEST"; then
28832   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28833fi
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28849   { $as_echo "$as_me:$LINENO: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28850$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28851fi
28852
28853if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28854   { $as_echo "$as_me:$LINENO: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28855$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28856fi
28857
28858if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28859   { $as_echo "$as_me:$LINENO: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28860$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28861fi
28862
28863
28864# Check whether --with-extra-cflags was given.
28865if test "${with_extra_cflags+set}" = set; then
28866  withval=$with_extra_cflags;
28867fi
28868
28869
28870
28871# Check whether --with-extra-cxxflags was given.
28872if test "${with_extra_cxxflags+set}" = set; then
28873  withval=$with_extra_cxxflags;
28874fi
28875
28876
28877
28878# Check whether --with-extra-ldflags was given.
28879if test "${with_extra_ldflags+set}" = set; then
28880  withval=$with_extra_ldflags;
28881fi
28882
28883
28884CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28885CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28886LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28887
28888# Hotspot needs these set in their legacy form
28889LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28890LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28891LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28892
28893
28894
28895
28896
28897###############################################################################
28898#
28899# Now setup the CFLAGS and LDFLAGS for the JDK build.
28900# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28901#
28902case $COMPILER_NAME in
28903      gcc )
28904      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28905                          -pipe \
28906                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28907	  case $OPENJDK_TARGET_CPU_ARCH in
28908	  arm )
28909            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28910	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28911	  ;;
28912	  ppc )
28913            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28914	  ;;
28915	  * )
28916	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28917	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28918          ;;
28919	  esac
28920          ;;
28921      ossc )
28922          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28923          case $OPENJDK_TARGET_CPU_ARCH in
28924          x86 )
28925            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28926       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28927          ;;
28928          esac
28929
28930      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28931      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28932
28933          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28934          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28935          ;;
28936      cl )
28937          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28938               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28939	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28940	       -DWIN32 -DIAL"
28941          case $OPENJDK_TARGET_CPU in
28942              x86 )
28943                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28944                  ;;
28945              x86_64 )
28946                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28947                  ;;
28948          esac
28949          ;;
28950esac
28951
28952###############################################################################
28953
28954CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28955
28956# The package path is used only on macosx?
28957PACKAGE_PATH=/opt/local
28958
28959
28960if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28961    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28962    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28963    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28964    #   Note: -Dmacro         is the same as    #define macro 1
28965    #         -Dmacro=	    is the same as    #define macro
28966    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28967        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28968    else
28969        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28970    fi
28971else
28972    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28973fi
28974if test "x$OPENJDK_TARGET_OS" = xlinux; then
28975    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28976fi
28977if test "x$OPENJDK_TARGET_OS" = xwindows; then
28978    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28979fi
28980if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28981    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28982fi
28983if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28984    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28985fi
28986if test "x$OPENJDK_TARGET_OS" = xbsd; then
28987    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28988fi
28989if test "x$DEBUG_LEVEL" = xrelease; then
28990    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28991    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28992        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28993    fi
28994else
28995    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28996fi
28997
28998CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28999CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29000
29001CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29002        -I${JDK_OUTPUTDIR}/include \
29003        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29004        -I${JDK_TOPDIR}/src/share/javavm/export \
29005        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29006        -I${JDK_TOPDIR}/src/share/native/common \
29007        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29008
29009# The shared libraries are compiled using the picflag.
29010CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29011CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29012
29013# Executable flags
29014CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29015CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29016
29017# Now this is odd. The JDK native libraries have to link against libjvm.so
29018# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29019# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29020# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29021# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29022# libraries will link to whatever is in memory. Yuck.
29023#
29024# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29025if test "x$COMPILER_NAME" = xcl; then
29026    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29027    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29028        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29029    fi
29030    # TODO: make -debug optional "--disable-full-debug-symbols"
29031    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29032    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29033    LDFLAGS_JDKLIB_SUFFIX=""
29034    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29035        LDFLAGS_STACK_SIZE=1048576
29036    else
29037        LDFLAGS_STACK_SIZE=327680
29038    fi
29039    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29040else
29041    if test "x$COMPILER_NAME" = xgcc; then
29042        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29043        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29044        if test -n "$HAS_GNU_HASH"; then
29045            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29046        fi
29047        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29048          # And since we now know that the linker is gnu, then add -z defs, to forbid
29049          # undefined symbols in object files.
29050          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29051          if test "x$DEBUG_LEVEL" = "xrelease"; then
29052              # When building release libraries, tell the linker optimize them.
29053              # Should this be supplied to the OSS linker as well?
29054              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29055          fi
29056        fi
29057    fi
29058    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29059                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server \
29060                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client \
29061                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29062
29063    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29064    if test "x$COMPILER_NAME" = xossc; then
29065        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29066    fi
29067
29068    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29069    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29070        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29071    fi
29072fi
29073
29074# Adjust flags according to debug level.
29075case $DEBUG_LEVEL in
29076      fastdebug )
29077              CFLAGS="$CFLAGS $D_FLAG"
29078              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29079              ;;
29080      slowdebug )
29081              CFLAGS="$CFLAGS $D_FLAG"
29082	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29083	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29084	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29085	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29086              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29087              ;;
29088esac
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104# Setup debug symbols (need objcopy from the toolchain for that)
29105
29106#
29107# ENABLE_DEBUG_SYMBOLS
29108# This must be done after the toolchain is setup, since we're looking at objcopy.
29109#
29110ENABLE_DEBUG_SYMBOLS=default
29111
29112# default on macosx is no...
29113if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29114   ENABLE_DEBUG_SYMBOLS=no
29115fi
29116
29117# Check whether --enable-debug-symbols was given.
29118if test "${enable_debug_symbols+set}" = set; then
29119  enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
29120fi
29121
29122
29123{ $as_echo "$as_me:$LINENO: checking if we should generate debug symbols" >&5
29124$as_echo_n "checking if we should generate debug symbols... " >&6; }
29125
29126if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
29127   # explicit enabling of enable-debug-symbols and can't find objcopy
29128   #   this is an error
29129   { { $as_echo "$as_me:$LINENO: error: Unable to find objcopy, cannot enable debug-symbols" >&5
29130$as_echo "$as_me: error: Unable to find objcopy, cannot enable debug-symbols" >&2;}
29131   { (exit 1); exit 1; }; }
29132fi
29133
29134if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
29135  # Default is on if objcopy is found, otherwise off
29136  if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29137     ENABLE_DEBUG_SYMBOLS=yes
29138  else
29139     ENABLE_DEBUG_SYMBOLS=no
29140  fi
29141fi
29142
29143{ $as_echo "$as_me:$LINENO: result: $ENABLE_DEBUG_SYMBOLS" >&5
29144$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29145
29146#
29147# ZIP_DEBUGINFO_FILES
29148#
29149ZIP_DEBUGINFO_FILES=yes
29150
29151# Check whether --enable-zip-debug-info was given.
29152if test "${enable_zip_debug_info+set}" = set; then
29153  enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
29154fi
29155
29156
29157{ $as_echo "$as_me:$LINENO: checking if we should zip debug-info files" >&5
29158$as_echo_n "checking if we should zip debug-info files... " >&6; }
29159{ $as_echo "$as_me:$LINENO: result: $ZIP_DEBUGINFO_FILES" >&5
29160$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
29161
29162# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
29163#   use that...
29164if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
29165   ZIP_DEBUGINFO_FILES=1
29166else
29167   ZIP_DEBUGINFO_FILES=0
29168fi
29169
29170
29171
29172
29173
29174
29175
29176###############################################################################
29177#
29178# Check dependencies for external and internal libraries.
29179#
29180###############################################################################
29181
29182
29183
29184###############################################################################
29185#
29186# OS specific settings that we never will need to probe.
29187#
29188if test "x$OPENJDK_TARGET_OS" = xlinux; then
29189    { $as_echo "$as_me:$LINENO: checking what is not needed on Linux?" >&5
29190$as_echo_n "checking what is not needed on Linux?... " >&6; }
29191    PULSE_NOT_NEEDED=yes
29192    { $as_echo "$as_me:$LINENO: result: pulse" >&5
29193$as_echo "pulse" >&6; }
29194fi
29195
29196if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29197    { $as_echo "$as_me:$LINENO: checking what is not needed on Solaris?" >&5
29198$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29199    ALSA_NOT_NEEDED=yes
29200    PULSE_NOT_NEEDED=yes
29201    { $as_echo "$as_me:$LINENO: result: alsa pulse" >&5
29202$as_echo "alsa pulse" >&6; }
29203fi
29204
29205if test "x$OPENJDK_TARGET_OS" = xwindows; then
29206    { $as_echo "$as_me:$LINENO: checking what is not needed on Windows?" >&5
29207$as_echo_n "checking what is not needed on Windows?... " >&6; }
29208    CUPS_NOT_NEEDED=yes
29209    ALSA_NOT_NEEDED=yes
29210    PULSE_NOT_NEEDED=yes
29211    X11_NOT_NEEDED=yes
29212    { $as_echo "$as_me:$LINENO: result: alsa cups pulse x11" >&5
29213$as_echo "alsa cups pulse x11" >&6; }
29214fi
29215
29216if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29217    { $as_echo "$as_me:$LINENO: checking what is not needed on MacOSX?" >&5
29218$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29219    ALSA_NOT_NEEDED=yes
29220    PULSE_NOT_NEEDED=yes
29221    X11_NOT_NEEDED=yes
29222    FREETYPE2_NOT_NEEDED=yes
29223    # If the java runtime framework is disabled, then we need X11.
29224    # This will be adjusted below.
29225    { $as_echo "$as_me:$LINENO: result: alsa pulse x11" >&5
29226$as_echo "alsa pulse x11" >&6; }
29227fi
29228
29229if test "x$OPENJDK_TARGET_OS" = xbsd; then
29230    { $as_echo "$as_me:$LINENO: checking what is not needed on bsd?" >&5
29231$as_echo_n "checking what is not needed on bsd?... " >&6; }
29232    ALSA_NOT_NEEDED=yes
29233    { $as_echo "$as_me:$LINENO: result: alsa" >&5
29234$as_echo "alsa" >&6; }
29235fi
29236
29237if test "x$OPENJDK" = "xfalse"; then
29238    FREETYPE2_NOT_NEEDED=yes
29239fi
29240
29241if test "x$SUPPORT_HEADFUL" = xno; then
29242    X11_NOT_NEEDED=yes
29243fi
29244
29245###############################################################################
29246#
29247# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29248# that uses this API.
29249#
29250# Check whether --enable-macosx-runtime-support was given.
29251if test "${enable_macosx_runtime_support+set}" = set; then
29252  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29253else
29254  MACOSX_RUNTIME_SUPPORT="no"
29255fi
29256
29257
29258USE_MACOSX_RUNTIME_SUPPORT=no
29259{ $as_echo "$as_me:$LINENO: checking for explicit Java runtime support in the OS" >&5
29260$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29261if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29262    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29263        MACOSX_RUNTIME_SUPPORT=yes
29264        USE_MACOSX_RUNTIME_SUPPORT=yes
29265        { $as_echo "$as_me:$LINENO: result: yes, does not need alsa freetype2 pulse and X11" >&5
29266$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29267    else
29268        { $as_echo "$as_me:$LINENO: result: yes, but explicitly disabled." >&5
29269$as_echo "yes, but explicitly disabled." >&6; }
29270    fi
29271else
29272    { $as_echo "$as_me:$LINENO: result: no" >&5
29273$as_echo "no" >&6; }
29274fi
29275
29276if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29277    { $as_echo "$as_me:$LINENO: checking what is not needed on an X11 build on MacOSX?" >&5
29278$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29279    X11_NOT_NEEDED=
29280    FREETYPE2_NOT_NEEDED=
29281    { $as_echo "$as_me:$LINENO: result: alsa pulse" >&5
29282$as_echo "alsa pulse" >&6; }
29283fi
29284
29285
29286
29287
29288###############################################################################
29289#
29290# Check for X Windows
29291#
29292
29293# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29294# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29295# --x-libraries for the sysroot, if that seems to be correct.
29296if test "x$SYS_ROOT" != "x/"; then
29297  if test "x$x_includes" = xNONE; then
29298    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29299      x_includes="$SYS_ROOT/usr/X11R6/include"
29300    fi
29301  fi
29302  if test "x$x_libraries" = xNONE; then
29303    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29304      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29305    fi
29306  fi
29307fi
29308
29309# Now let autoconf do it's magic
29310{ $as_echo "$as_me:$LINENO: checking for X" >&5
29311$as_echo_n "checking for X... " >&6; }
29312
29313
29314# Check whether --with-x was given.
29315if test "${with_x+set}" = set; then
29316  withval=$with_x;
29317fi
29318
29319# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29320if test "x$with_x" = xno; then
29321  # The user explicitly disabled X.
29322  have_x=disabled
29323else
29324  case $x_includes,$x_libraries in #(
29325    *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5
29326$as_echo "$as_me: error: cannot use X directory names containing '" >&2;}
29327   { (exit 1); exit 1; }; };; #(
29328    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
29329  $as_echo_n "(cached) " >&6
29330else
29331  # One or both of the vars are not set, and there is no cached value.
29332ac_x_includes=no ac_x_libraries=no
29333rm -f -r conftest.dir
29334if mkdir conftest.dir; then
29335  cd conftest.dir
29336  cat >Imakefile <<'_ACEOF'
29337incroot:
29338	@echo incroot='${INCROOT}'
29339usrlibdir:
29340	@echo usrlibdir='${USRLIBDIR}'
29341libdir:
29342	@echo libdir='${LIBDIR}'
29343_ACEOF
29344  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29345    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
29346    for ac_var in incroot usrlibdir libdir; do
29347      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29348    done
29349    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29350    for ac_extension in a so sl dylib la dll; do
29351      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29352	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29353	ac_im_usrlibdir=$ac_im_libdir; break
29354      fi
29355    done
29356    # Screen out bogus values from the imake configuration.  They are
29357    # bogus both because they are the default anyway, and because
29358    # using them would break gcc on systems where it needs fixed includes.
29359    case $ac_im_incroot in
29360	/usr/include) ac_x_includes= ;;
29361	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29362    esac
29363    case $ac_im_usrlibdir in
29364	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29365	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29366    esac
29367  fi
29368  cd ..
29369  rm -f -r conftest.dir
29370fi
29371
29372# Standard set of common directories for X headers.
29373# Check X11 before X11Rn because it is often a symlink to the current release.
29374ac_x_header_dirs='
29375/usr/X11/include
29376/usr/X11R6/include
29377/usr/X11R5/include
29378/usr/X11R4/include
29379
29380/usr/include/X11
29381/usr/include/X11R6
29382/usr/include/X11R5
29383/usr/include/X11R4
29384
29385/usr/local/X11/include
29386/usr/local/X11R6/include
29387/usr/local/X11R5/include
29388/usr/local/X11R4/include
29389
29390/usr/local/include/X11
29391/usr/local/include/X11R6
29392/usr/local/include/X11R5
29393/usr/local/include/X11R4
29394
29395/usr/X386/include
29396/usr/x386/include
29397/usr/XFree86/include/X11
29398
29399/usr/include
29400/usr/local/include
29401/usr/unsupported/include
29402/usr/athena/include
29403/usr/local/x11r5/include
29404/usr/lpp/Xamples/include
29405
29406/usr/openwin/include
29407/usr/openwin/share/include'
29408
29409if test "$ac_x_includes" = no; then
29410  # Guess where to find include files, by looking for Xlib.h.
29411  # First, try using that file with no special directory specified.
29412  cat >conftest.$ac_ext <<_ACEOF
29413/* confdefs.h.  */
29414_ACEOF
29415cat confdefs.h >>conftest.$ac_ext
29416cat >>conftest.$ac_ext <<_ACEOF
29417/* end confdefs.h.  */
29418#include <X11/Xlib.h>
29419_ACEOF
29420if { (ac_try="$ac_cpp conftest.$ac_ext"
29421case "(($ac_try" in
29422  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29423  *) ac_try_echo=$ac_try;;
29424esac
29425eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29426$as_echo "$ac_try_echo") >&5
29427  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29428  ac_status=$?
29429  grep -v '^ *+' conftest.er1 >conftest.err
29430  rm -f conftest.er1
29431  cat conftest.err >&5
29432  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29433  (exit $ac_status); } >/dev/null && {
29434	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
29435	 test ! -s conftest.err
29436       }; then
29437  # We can compile using X headers with no special include directory.
29438ac_x_includes=
29439else
29440  $as_echo "$as_me: failed program was:" >&5
29441sed 's/^/| /' conftest.$ac_ext >&5
29442
29443  for ac_dir in $ac_x_header_dirs; do
29444  if test -r "$ac_dir/X11/Xlib.h"; then
29445    ac_x_includes=$ac_dir
29446    break
29447  fi
29448done
29449fi
29450
29451rm -f conftest.err conftest.$ac_ext
29452fi # $ac_x_includes = no
29453
29454if test "$ac_x_libraries" = no; then
29455  # Check for the libraries.
29456  # See if we find them without any special options.
29457  # Don't add to $LIBS permanently.
29458  ac_save_LIBS=$LIBS
29459  LIBS="-lX11 $LIBS"
29460  cat >conftest.$ac_ext <<_ACEOF
29461/* confdefs.h.  */
29462_ACEOF
29463cat confdefs.h >>conftest.$ac_ext
29464cat >>conftest.$ac_ext <<_ACEOF
29465/* end confdefs.h.  */
29466#include <X11/Xlib.h>
29467int
29468main ()
29469{
29470XrmInitialize ()
29471  ;
29472  return 0;
29473}
29474_ACEOF
29475rm -f conftest.$ac_objext conftest$ac_exeext
29476if { (ac_try="$ac_link"
29477case "(($ac_try" in
29478  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29479  *) ac_try_echo=$ac_try;;
29480esac
29481eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29482$as_echo "$ac_try_echo") >&5
29483  (eval "$ac_link") 2>conftest.er1
29484  ac_status=$?
29485  grep -v '^ *+' conftest.er1 >conftest.err
29486  rm -f conftest.er1
29487  cat conftest.err >&5
29488  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29489  (exit $ac_status); } && {
29490	 test -z "$ac_cxx_werror_flag" ||
29491	 test ! -s conftest.err
29492       } && test -s conftest$ac_exeext && {
29493	 test "$cross_compiling" = yes ||
29494	 $as_test_x conftest$ac_exeext
29495       }; then
29496  LIBS=$ac_save_LIBS
29497# We can link X programs with no special library path.
29498ac_x_libraries=
29499else
29500  $as_echo "$as_me: failed program was:" >&5
29501sed 's/^/| /' conftest.$ac_ext >&5
29502
29503	LIBS=$ac_save_LIBS
29504for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29505do
29506  # Don't even attempt the hair of trying to link an X program!
29507  for ac_extension in a so sl dylib la dll; do
29508    if test -r "$ac_dir/libX11.$ac_extension"; then
29509      ac_x_libraries=$ac_dir
29510      break 2
29511    fi
29512  done
29513done
29514fi
29515
29516rm -rf conftest.dSYM
29517rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29518      conftest$ac_exeext conftest.$ac_ext
29519fi # $ac_x_libraries = no
29520
29521case $ac_x_includes,$ac_x_libraries in #(
29522  no,* | *,no | *\'*)
29523    # Didn't find X, or a directory has "'" in its name.
29524    ac_cv_have_x="have_x=no";; #(
29525  *)
29526    # Record where we found X for the cache.
29527    ac_cv_have_x="have_x=yes\
29528	ac_x_includes='$ac_x_includes'\
29529	ac_x_libraries='$ac_x_libraries'"
29530esac
29531fi
29532;; #(
29533    *) have_x=yes;;
29534  esac
29535  eval "$ac_cv_have_x"
29536fi # $with_x != no
29537
29538if test "$have_x" != yes; then
29539  { $as_echo "$as_me:$LINENO: result: $have_x" >&5
29540$as_echo "$have_x" >&6; }
29541  no_x=yes
29542else
29543  # If each of the values was on the command line, it overrides each guess.
29544  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29545  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29546  # Update the cache value to reflect the command line values.
29547  ac_cv_have_x="have_x=yes\
29548	ac_x_includes='$x_includes'\
29549	ac_x_libraries='$x_libraries'"
29550  { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
29551$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29552fi
29553
29554if test "$no_x" = yes; then
29555  # Not all programs may use this symbol, but it does not hurt to define it.
29556
29557cat >>confdefs.h <<\_ACEOF
29558#define X_DISPLAY_MISSING 1
29559_ACEOF
29560
29561  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29562else
29563  if test -n "$x_includes"; then
29564    X_CFLAGS="$X_CFLAGS -I$x_includes"
29565  fi
29566
29567  # It would also be nice to do this for all -L options, not just this one.
29568  if test -n "$x_libraries"; then
29569    X_LIBS="$X_LIBS -L$x_libraries"
29570    # For Solaris; some versions of Sun CC require a space after -R and
29571    # others require no space.  Words are not sufficient . . . .
29572    { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
29573$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29574    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29575    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29576    ac_cxx_werror_flag=yes
29577    cat >conftest.$ac_ext <<_ACEOF
29578/* confdefs.h.  */
29579_ACEOF
29580cat confdefs.h >>conftest.$ac_ext
29581cat >>conftest.$ac_ext <<_ACEOF
29582/* end confdefs.h.  */
29583
29584int
29585main ()
29586{
29587
29588  ;
29589  return 0;
29590}
29591_ACEOF
29592rm -f conftest.$ac_objext conftest$ac_exeext
29593if { (ac_try="$ac_link"
29594case "(($ac_try" in
29595  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29596  *) ac_try_echo=$ac_try;;
29597esac
29598eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29599$as_echo "$ac_try_echo") >&5
29600  (eval "$ac_link") 2>conftest.er1
29601  ac_status=$?
29602  grep -v '^ *+' conftest.er1 >conftest.err
29603  rm -f conftest.er1
29604  cat conftest.err >&5
29605  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29606  (exit $ac_status); } && {
29607	 test -z "$ac_cxx_werror_flag" ||
29608	 test ! -s conftest.err
29609       } && test -s conftest$ac_exeext && {
29610	 test "$cross_compiling" = yes ||
29611	 $as_test_x conftest$ac_exeext
29612       }; then
29613  { $as_echo "$as_me:$LINENO: result: no" >&5
29614$as_echo "no" >&6; }
29615       X_LIBS="$X_LIBS -R$x_libraries"
29616else
29617  $as_echo "$as_me: failed program was:" >&5
29618sed 's/^/| /' conftest.$ac_ext >&5
29619
29620	LIBS="$ac_xsave_LIBS -R $x_libraries"
29621       cat >conftest.$ac_ext <<_ACEOF
29622/* confdefs.h.  */
29623_ACEOF
29624cat confdefs.h >>conftest.$ac_ext
29625cat >>conftest.$ac_ext <<_ACEOF
29626/* end confdefs.h.  */
29627
29628int
29629main ()
29630{
29631
29632  ;
29633  return 0;
29634}
29635_ACEOF
29636rm -f conftest.$ac_objext conftest$ac_exeext
29637if { (ac_try="$ac_link"
29638case "(($ac_try" in
29639  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29640  *) ac_try_echo=$ac_try;;
29641esac
29642eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29643$as_echo "$ac_try_echo") >&5
29644  (eval "$ac_link") 2>conftest.er1
29645  ac_status=$?
29646  grep -v '^ *+' conftest.er1 >conftest.err
29647  rm -f conftest.er1
29648  cat conftest.err >&5
29649  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29650  (exit $ac_status); } && {
29651	 test -z "$ac_cxx_werror_flag" ||
29652	 test ! -s conftest.err
29653       } && test -s conftest$ac_exeext && {
29654	 test "$cross_compiling" = yes ||
29655	 $as_test_x conftest$ac_exeext
29656       }; then
29657  { $as_echo "$as_me:$LINENO: result: yes" >&5
29658$as_echo "yes" >&6; }
29659	  X_LIBS="$X_LIBS -R $x_libraries"
29660else
29661  $as_echo "$as_me: failed program was:" >&5
29662sed 's/^/| /' conftest.$ac_ext >&5
29663
29664	{ $as_echo "$as_me:$LINENO: result: neither works" >&5
29665$as_echo "neither works" >&6; }
29666fi
29667
29668rm -rf conftest.dSYM
29669rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29670      conftest$ac_exeext conftest.$ac_ext
29671fi
29672
29673rm -rf conftest.dSYM
29674rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29675      conftest$ac_exeext conftest.$ac_ext
29676    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29677    LIBS=$ac_xsave_LIBS
29678  fi
29679
29680  # Check for system-dependent libraries X programs must link with.
29681  # Do this before checking for the system-independent R6 libraries
29682  # (-lICE), since we may need -lsocket or whatever for X linking.
29683
29684  if test "$ISC" = yes; then
29685    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29686  else
29687    # Martyn Johnson says this is needed for Ultrix, if the X
29688    # libraries were built with DECnet support.  And Karl Berry says
29689    # the Alpha needs dnet_stub (dnet does not exist).
29690    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29691    cat >conftest.$ac_ext <<_ACEOF
29692/* confdefs.h.  */
29693_ACEOF
29694cat confdefs.h >>conftest.$ac_ext
29695cat >>conftest.$ac_ext <<_ACEOF
29696/* end confdefs.h.  */
29697
29698/* Override any GCC internal prototype to avoid an error.
29699   Use char because int might match the return type of a GCC
29700   builtin and then its argument prototype would still apply.  */
29701#ifdef __cplusplus
29702extern "C"
29703#endif
29704char XOpenDisplay ();
29705int
29706main ()
29707{
29708return XOpenDisplay ();
29709  ;
29710  return 0;
29711}
29712_ACEOF
29713rm -f conftest.$ac_objext conftest$ac_exeext
29714if { (ac_try="$ac_link"
29715case "(($ac_try" in
29716  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29717  *) ac_try_echo=$ac_try;;
29718esac
29719eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29720$as_echo "$ac_try_echo") >&5
29721  (eval "$ac_link") 2>conftest.er1
29722  ac_status=$?
29723  grep -v '^ *+' conftest.er1 >conftest.err
29724  rm -f conftest.er1
29725  cat conftest.err >&5
29726  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29727  (exit $ac_status); } && {
29728	 test -z "$ac_cxx_werror_flag" ||
29729	 test ! -s conftest.err
29730       } && test -s conftest$ac_exeext && {
29731	 test "$cross_compiling" = yes ||
29732	 $as_test_x conftest$ac_exeext
29733       }; then
29734  :
29735else
29736  $as_echo "$as_me: failed program was:" >&5
29737sed 's/^/| /' conftest.$ac_ext >&5
29738
29739	{ $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
29740$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29741if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
29742  $as_echo_n "(cached) " >&6
29743else
29744  ac_check_lib_save_LIBS=$LIBS
29745LIBS="-ldnet  $LIBS"
29746cat >conftest.$ac_ext <<_ACEOF
29747/* confdefs.h.  */
29748_ACEOF
29749cat confdefs.h >>conftest.$ac_ext
29750cat >>conftest.$ac_ext <<_ACEOF
29751/* end confdefs.h.  */
29752
29753/* Override any GCC internal prototype to avoid an error.
29754   Use char because int might match the return type of a GCC
29755   builtin and then its argument prototype would still apply.  */
29756#ifdef __cplusplus
29757extern "C"
29758#endif
29759char dnet_ntoa ();
29760int
29761main ()
29762{
29763return dnet_ntoa ();
29764  ;
29765  return 0;
29766}
29767_ACEOF
29768rm -f conftest.$ac_objext conftest$ac_exeext
29769if { (ac_try="$ac_link"
29770case "(($ac_try" in
29771  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29772  *) ac_try_echo=$ac_try;;
29773esac
29774eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29775$as_echo "$ac_try_echo") >&5
29776  (eval "$ac_link") 2>conftest.er1
29777  ac_status=$?
29778  grep -v '^ *+' conftest.er1 >conftest.err
29779  rm -f conftest.er1
29780  cat conftest.err >&5
29781  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29782  (exit $ac_status); } && {
29783	 test -z "$ac_cxx_werror_flag" ||
29784	 test ! -s conftest.err
29785       } && test -s conftest$ac_exeext && {
29786	 test "$cross_compiling" = yes ||
29787	 $as_test_x conftest$ac_exeext
29788       }; then
29789  ac_cv_lib_dnet_dnet_ntoa=yes
29790else
29791  $as_echo "$as_me: failed program was:" >&5
29792sed 's/^/| /' conftest.$ac_ext >&5
29793
29794	ac_cv_lib_dnet_dnet_ntoa=no
29795fi
29796
29797rm -rf conftest.dSYM
29798rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29799      conftest$ac_exeext conftest.$ac_ext
29800LIBS=$ac_check_lib_save_LIBS
29801fi
29802{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29803$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29804if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then
29805  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29806fi
29807
29808    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
29809      { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
29810$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
29811if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
29812  $as_echo_n "(cached) " >&6
29813else
29814  ac_check_lib_save_LIBS=$LIBS
29815LIBS="-ldnet_stub  $LIBS"
29816cat >conftest.$ac_ext <<_ACEOF
29817/* confdefs.h.  */
29818_ACEOF
29819cat confdefs.h >>conftest.$ac_ext
29820cat >>conftest.$ac_ext <<_ACEOF
29821/* end confdefs.h.  */
29822
29823/* Override any GCC internal prototype to avoid an error.
29824   Use char because int might match the return type of a GCC
29825   builtin and then its argument prototype would still apply.  */
29826#ifdef __cplusplus
29827extern "C"
29828#endif
29829char dnet_ntoa ();
29830int
29831main ()
29832{
29833return dnet_ntoa ();
29834  ;
29835  return 0;
29836}
29837_ACEOF
29838rm -f conftest.$ac_objext conftest$ac_exeext
29839if { (ac_try="$ac_link"
29840case "(($ac_try" in
29841  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29842  *) ac_try_echo=$ac_try;;
29843esac
29844eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29845$as_echo "$ac_try_echo") >&5
29846  (eval "$ac_link") 2>conftest.er1
29847  ac_status=$?
29848  grep -v '^ *+' conftest.er1 >conftest.err
29849  rm -f conftest.er1
29850  cat conftest.err >&5
29851  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29852  (exit $ac_status); } && {
29853	 test -z "$ac_cxx_werror_flag" ||
29854	 test ! -s conftest.err
29855       } && test -s conftest$ac_exeext && {
29856	 test "$cross_compiling" = yes ||
29857	 $as_test_x conftest$ac_exeext
29858       }; then
29859  ac_cv_lib_dnet_stub_dnet_ntoa=yes
29860else
29861  $as_echo "$as_me: failed program was:" >&5
29862sed 's/^/| /' conftest.$ac_ext >&5
29863
29864	ac_cv_lib_dnet_stub_dnet_ntoa=no
29865fi
29866
29867rm -rf conftest.dSYM
29868rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29869      conftest$ac_exeext conftest.$ac_ext
29870LIBS=$ac_check_lib_save_LIBS
29871fi
29872{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
29873$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
29874if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then
29875  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
29876fi
29877
29878    fi
29879fi
29880
29881rm -rf conftest.dSYM
29882rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29883      conftest$ac_exeext conftest.$ac_ext
29884    LIBS="$ac_xsave_LIBS"
29885
29886    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
29887    # to get the SysV transport functions.
29888    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
29889    # needs -lnsl.
29890    # The nsl library prevents programs from opening the X display
29891    # on Irix 5.2, according to T.E. Dickey.
29892    # The functions gethostbyname, getservbyname, and inet_addr are
29893    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
29894    { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5
29895$as_echo_n "checking for gethostbyname... " >&6; }
29896if test "${ac_cv_func_gethostbyname+set}" = set; then
29897  $as_echo_n "(cached) " >&6
29898else
29899  cat >conftest.$ac_ext <<_ACEOF
29900/* confdefs.h.  */
29901_ACEOF
29902cat confdefs.h >>conftest.$ac_ext
29903cat >>conftest.$ac_ext <<_ACEOF
29904/* end confdefs.h.  */
29905/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
29906   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
29907#define gethostbyname innocuous_gethostbyname
29908
29909/* System header to define __stub macros and hopefully few prototypes,
29910    which can conflict with char gethostbyname (); below.
29911    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
29912    <limits.h> exists even on freestanding compilers.  */
29913
29914#ifdef __STDC__
29915# include <limits.h>
29916#else
29917# include <assert.h>
29918#endif
29919
29920#undef gethostbyname
29921
29922/* Override any GCC internal prototype to avoid an error.
29923   Use char because int might match the return type of a GCC
29924   builtin and then its argument prototype would still apply.  */
29925#ifdef __cplusplus
29926extern "C"
29927#endif
29928char gethostbyname ();
29929/* The GNU C library defines this for functions which it implements
29930    to always fail with ENOSYS.  Some functions are actually named
29931    something starting with __ and the normal name is an alias.  */
29932#if defined __stub_gethostbyname || defined __stub___gethostbyname
29933choke me
29934#endif
29935
29936int
29937main ()
29938{
29939return gethostbyname ();
29940  ;
29941  return 0;
29942}
29943_ACEOF
29944rm -f conftest.$ac_objext conftest$ac_exeext
29945if { (ac_try="$ac_link"
29946case "(($ac_try" in
29947  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29948  *) ac_try_echo=$ac_try;;
29949esac
29950eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29951$as_echo "$ac_try_echo") >&5
29952  (eval "$ac_link") 2>conftest.er1
29953  ac_status=$?
29954  grep -v '^ *+' conftest.er1 >conftest.err
29955  rm -f conftest.er1
29956  cat conftest.err >&5
29957  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29958  (exit $ac_status); } && {
29959	 test -z "$ac_cxx_werror_flag" ||
29960	 test ! -s conftest.err
29961       } && test -s conftest$ac_exeext && {
29962	 test "$cross_compiling" = yes ||
29963	 $as_test_x conftest$ac_exeext
29964       }; then
29965  ac_cv_func_gethostbyname=yes
29966else
29967  $as_echo "$as_me: failed program was:" >&5
29968sed 's/^/| /' conftest.$ac_ext >&5
29969
29970	ac_cv_func_gethostbyname=no
29971fi
29972
29973rm -rf conftest.dSYM
29974rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29975      conftest$ac_exeext conftest.$ac_ext
29976fi
29977{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
29978$as_echo "$ac_cv_func_gethostbyname" >&6; }
29979
29980    if test $ac_cv_func_gethostbyname = no; then
29981      { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
29982$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
29983if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
29984  $as_echo_n "(cached) " >&6
29985else
29986  ac_check_lib_save_LIBS=$LIBS
29987LIBS="-lnsl  $LIBS"
29988cat >conftest.$ac_ext <<_ACEOF
29989/* confdefs.h.  */
29990_ACEOF
29991cat confdefs.h >>conftest.$ac_ext
29992cat >>conftest.$ac_ext <<_ACEOF
29993/* end confdefs.h.  */
29994
29995/* Override any GCC internal prototype to avoid an error.
29996   Use char because int might match the return type of a GCC
29997   builtin and then its argument prototype would still apply.  */
29998#ifdef __cplusplus
29999extern "C"
30000#endif
30001char gethostbyname ();
30002int
30003main ()
30004{
30005return gethostbyname ();
30006  ;
30007  return 0;
30008}
30009_ACEOF
30010rm -f conftest.$ac_objext conftest$ac_exeext
30011if { (ac_try="$ac_link"
30012case "(($ac_try" in
30013  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30014  *) ac_try_echo=$ac_try;;
30015esac
30016eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30017$as_echo "$ac_try_echo") >&5
30018  (eval "$ac_link") 2>conftest.er1
30019  ac_status=$?
30020  grep -v '^ *+' conftest.er1 >conftest.err
30021  rm -f conftest.er1
30022  cat conftest.err >&5
30023  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30024  (exit $ac_status); } && {
30025	 test -z "$ac_cxx_werror_flag" ||
30026	 test ! -s conftest.err
30027       } && test -s conftest$ac_exeext && {
30028	 test "$cross_compiling" = yes ||
30029	 $as_test_x conftest$ac_exeext
30030       }; then
30031  ac_cv_lib_nsl_gethostbyname=yes
30032else
30033  $as_echo "$as_me: failed program was:" >&5
30034sed 's/^/| /' conftest.$ac_ext >&5
30035
30036	ac_cv_lib_nsl_gethostbyname=no
30037fi
30038
30039rm -rf conftest.dSYM
30040rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30041      conftest$ac_exeext conftest.$ac_ext
30042LIBS=$ac_check_lib_save_LIBS
30043fi
30044{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
30045$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30046if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
30047  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30048fi
30049
30050      if test $ac_cv_lib_nsl_gethostbyname = no; then
30051	{ $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
30052$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30053if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
30054  $as_echo_n "(cached) " >&6
30055else
30056  ac_check_lib_save_LIBS=$LIBS
30057LIBS="-lbsd  $LIBS"
30058cat >conftest.$ac_ext <<_ACEOF
30059/* confdefs.h.  */
30060_ACEOF
30061cat confdefs.h >>conftest.$ac_ext
30062cat >>conftest.$ac_ext <<_ACEOF
30063/* end confdefs.h.  */
30064
30065/* Override any GCC internal prototype to avoid an error.
30066   Use char because int might match the return type of a GCC
30067   builtin and then its argument prototype would still apply.  */
30068#ifdef __cplusplus
30069extern "C"
30070#endif
30071char gethostbyname ();
30072int
30073main ()
30074{
30075return gethostbyname ();
30076  ;
30077  return 0;
30078}
30079_ACEOF
30080rm -f conftest.$ac_objext conftest$ac_exeext
30081if { (ac_try="$ac_link"
30082case "(($ac_try" in
30083  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30084  *) ac_try_echo=$ac_try;;
30085esac
30086eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30087$as_echo "$ac_try_echo") >&5
30088  (eval "$ac_link") 2>conftest.er1
30089  ac_status=$?
30090  grep -v '^ *+' conftest.er1 >conftest.err
30091  rm -f conftest.er1
30092  cat conftest.err >&5
30093  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30094  (exit $ac_status); } && {
30095	 test -z "$ac_cxx_werror_flag" ||
30096	 test ! -s conftest.err
30097       } && test -s conftest$ac_exeext && {
30098	 test "$cross_compiling" = yes ||
30099	 $as_test_x conftest$ac_exeext
30100       }; then
30101  ac_cv_lib_bsd_gethostbyname=yes
30102else
30103  $as_echo "$as_me: failed program was:" >&5
30104sed 's/^/| /' conftest.$ac_ext >&5
30105
30106	ac_cv_lib_bsd_gethostbyname=no
30107fi
30108
30109rm -rf conftest.dSYM
30110rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30111      conftest$ac_exeext conftest.$ac_ext
30112LIBS=$ac_check_lib_save_LIBS
30113fi
30114{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
30115$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30116if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then
30117  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30118fi
30119
30120      fi
30121    fi
30122
30123    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30124    # socket/setsockopt and other routines are undefined under SCO ODT
30125    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30126    # on later versions), says Simon Leinen: it contains gethostby*
30127    # variants that don't use the name server (or something).  -lsocket
30128    # must be given before -lnsl if both are needed.  We assume that
30129    # if connect needs -lnsl, so does gethostbyname.
30130    { $as_echo "$as_me:$LINENO: checking for connect" >&5
30131$as_echo_n "checking for connect... " >&6; }
30132if test "${ac_cv_func_connect+set}" = set; then
30133  $as_echo_n "(cached) " >&6
30134else
30135  cat >conftest.$ac_ext <<_ACEOF
30136/* confdefs.h.  */
30137_ACEOF
30138cat confdefs.h >>conftest.$ac_ext
30139cat >>conftest.$ac_ext <<_ACEOF
30140/* end confdefs.h.  */
30141/* Define connect to an innocuous variant, in case <limits.h> declares connect.
30142   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
30143#define connect innocuous_connect
30144
30145/* System header to define __stub macros and hopefully few prototypes,
30146    which can conflict with char connect (); below.
30147    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30148    <limits.h> exists even on freestanding compilers.  */
30149
30150#ifdef __STDC__
30151# include <limits.h>
30152#else
30153# include <assert.h>
30154#endif
30155
30156#undef connect
30157
30158/* Override any GCC internal prototype to avoid an error.
30159   Use char because int might match the return type of a GCC
30160   builtin and then its argument prototype would still apply.  */
30161#ifdef __cplusplus
30162extern "C"
30163#endif
30164char connect ();
30165/* The GNU C library defines this for functions which it implements
30166    to always fail with ENOSYS.  Some functions are actually named
30167    something starting with __ and the normal name is an alias.  */
30168#if defined __stub_connect || defined __stub___connect
30169choke me
30170#endif
30171
30172int
30173main ()
30174{
30175return connect ();
30176  ;
30177  return 0;
30178}
30179_ACEOF
30180rm -f conftest.$ac_objext conftest$ac_exeext
30181if { (ac_try="$ac_link"
30182case "(($ac_try" in
30183  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30184  *) ac_try_echo=$ac_try;;
30185esac
30186eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30187$as_echo "$ac_try_echo") >&5
30188  (eval "$ac_link") 2>conftest.er1
30189  ac_status=$?
30190  grep -v '^ *+' conftest.er1 >conftest.err
30191  rm -f conftest.er1
30192  cat conftest.err >&5
30193  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30194  (exit $ac_status); } && {
30195	 test -z "$ac_cxx_werror_flag" ||
30196	 test ! -s conftest.err
30197       } && test -s conftest$ac_exeext && {
30198	 test "$cross_compiling" = yes ||
30199	 $as_test_x conftest$ac_exeext
30200       }; then
30201  ac_cv_func_connect=yes
30202else
30203  $as_echo "$as_me: failed program was:" >&5
30204sed 's/^/| /' conftest.$ac_ext >&5
30205
30206	ac_cv_func_connect=no
30207fi
30208
30209rm -rf conftest.dSYM
30210rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30211      conftest$ac_exeext conftest.$ac_ext
30212fi
30213{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
30214$as_echo "$ac_cv_func_connect" >&6; }
30215
30216    if test $ac_cv_func_connect = no; then
30217      { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
30218$as_echo_n "checking for connect in -lsocket... " >&6; }
30219if test "${ac_cv_lib_socket_connect+set}" = set; then
30220  $as_echo_n "(cached) " >&6
30221else
30222  ac_check_lib_save_LIBS=$LIBS
30223LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30224cat >conftest.$ac_ext <<_ACEOF
30225/* confdefs.h.  */
30226_ACEOF
30227cat confdefs.h >>conftest.$ac_ext
30228cat >>conftest.$ac_ext <<_ACEOF
30229/* end confdefs.h.  */
30230
30231/* Override any GCC internal prototype to avoid an error.
30232   Use char because int might match the return type of a GCC
30233   builtin and then its argument prototype would still apply.  */
30234#ifdef __cplusplus
30235extern "C"
30236#endif
30237char connect ();
30238int
30239main ()
30240{
30241return connect ();
30242  ;
30243  return 0;
30244}
30245_ACEOF
30246rm -f conftest.$ac_objext conftest$ac_exeext
30247if { (ac_try="$ac_link"
30248case "(($ac_try" in
30249  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30250  *) ac_try_echo=$ac_try;;
30251esac
30252eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30253$as_echo "$ac_try_echo") >&5
30254  (eval "$ac_link") 2>conftest.er1
30255  ac_status=$?
30256  grep -v '^ *+' conftest.er1 >conftest.err
30257  rm -f conftest.er1
30258  cat conftest.err >&5
30259  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30260  (exit $ac_status); } && {
30261	 test -z "$ac_cxx_werror_flag" ||
30262	 test ! -s conftest.err
30263       } && test -s conftest$ac_exeext && {
30264	 test "$cross_compiling" = yes ||
30265	 $as_test_x conftest$ac_exeext
30266       }; then
30267  ac_cv_lib_socket_connect=yes
30268else
30269  $as_echo "$as_me: failed program was:" >&5
30270sed 's/^/| /' conftest.$ac_ext >&5
30271
30272	ac_cv_lib_socket_connect=no
30273fi
30274
30275rm -rf conftest.dSYM
30276rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30277      conftest$ac_exeext conftest.$ac_ext
30278LIBS=$ac_check_lib_save_LIBS
30279fi
30280{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
30281$as_echo "$ac_cv_lib_socket_connect" >&6; }
30282if test "x$ac_cv_lib_socket_connect" = x""yes; then
30283  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30284fi
30285
30286    fi
30287
30288    # Guillermo Gomez says -lposix is necessary on A/UX.
30289    { $as_echo "$as_me:$LINENO: checking for remove" >&5
30290$as_echo_n "checking for remove... " >&6; }
30291if test "${ac_cv_func_remove+set}" = set; then
30292  $as_echo_n "(cached) " >&6
30293else
30294  cat >conftest.$ac_ext <<_ACEOF
30295/* confdefs.h.  */
30296_ACEOF
30297cat confdefs.h >>conftest.$ac_ext
30298cat >>conftest.$ac_ext <<_ACEOF
30299/* end confdefs.h.  */
30300/* Define remove to an innocuous variant, in case <limits.h> declares remove.
30301   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
30302#define remove innocuous_remove
30303
30304/* System header to define __stub macros and hopefully few prototypes,
30305    which can conflict with char remove (); below.
30306    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30307    <limits.h> exists even on freestanding compilers.  */
30308
30309#ifdef __STDC__
30310# include <limits.h>
30311#else
30312# include <assert.h>
30313#endif
30314
30315#undef remove
30316
30317/* Override any GCC internal prototype to avoid an error.
30318   Use char because int might match the return type of a GCC
30319   builtin and then its argument prototype would still apply.  */
30320#ifdef __cplusplus
30321extern "C"
30322#endif
30323char remove ();
30324/* The GNU C library defines this for functions which it implements
30325    to always fail with ENOSYS.  Some functions are actually named
30326    something starting with __ and the normal name is an alias.  */
30327#if defined __stub_remove || defined __stub___remove
30328choke me
30329#endif
30330
30331int
30332main ()
30333{
30334return remove ();
30335  ;
30336  return 0;
30337}
30338_ACEOF
30339rm -f conftest.$ac_objext conftest$ac_exeext
30340if { (ac_try="$ac_link"
30341case "(($ac_try" in
30342  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30343  *) ac_try_echo=$ac_try;;
30344esac
30345eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30346$as_echo "$ac_try_echo") >&5
30347  (eval "$ac_link") 2>conftest.er1
30348  ac_status=$?
30349  grep -v '^ *+' conftest.er1 >conftest.err
30350  rm -f conftest.er1
30351  cat conftest.err >&5
30352  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30353  (exit $ac_status); } && {
30354	 test -z "$ac_cxx_werror_flag" ||
30355	 test ! -s conftest.err
30356       } && test -s conftest$ac_exeext && {
30357	 test "$cross_compiling" = yes ||
30358	 $as_test_x conftest$ac_exeext
30359       }; then
30360  ac_cv_func_remove=yes
30361else
30362  $as_echo "$as_me: failed program was:" >&5
30363sed 's/^/| /' conftest.$ac_ext >&5
30364
30365	ac_cv_func_remove=no
30366fi
30367
30368rm -rf conftest.dSYM
30369rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30370      conftest$ac_exeext conftest.$ac_ext
30371fi
30372{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
30373$as_echo "$ac_cv_func_remove" >&6; }
30374
30375    if test $ac_cv_func_remove = no; then
30376      { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5
30377$as_echo_n "checking for remove in -lposix... " >&6; }
30378if test "${ac_cv_lib_posix_remove+set}" = set; then
30379  $as_echo_n "(cached) " >&6
30380else
30381  ac_check_lib_save_LIBS=$LIBS
30382LIBS="-lposix  $LIBS"
30383cat >conftest.$ac_ext <<_ACEOF
30384/* confdefs.h.  */
30385_ACEOF
30386cat confdefs.h >>conftest.$ac_ext
30387cat >>conftest.$ac_ext <<_ACEOF
30388/* end confdefs.h.  */
30389
30390/* Override any GCC internal prototype to avoid an error.
30391   Use char because int might match the return type of a GCC
30392   builtin and then its argument prototype would still apply.  */
30393#ifdef __cplusplus
30394extern "C"
30395#endif
30396char remove ();
30397int
30398main ()
30399{
30400return remove ();
30401  ;
30402  return 0;
30403}
30404_ACEOF
30405rm -f conftest.$ac_objext conftest$ac_exeext
30406if { (ac_try="$ac_link"
30407case "(($ac_try" in
30408  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30409  *) ac_try_echo=$ac_try;;
30410esac
30411eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30412$as_echo "$ac_try_echo") >&5
30413  (eval "$ac_link") 2>conftest.er1
30414  ac_status=$?
30415  grep -v '^ *+' conftest.er1 >conftest.err
30416  rm -f conftest.er1
30417  cat conftest.err >&5
30418  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30419  (exit $ac_status); } && {
30420	 test -z "$ac_cxx_werror_flag" ||
30421	 test ! -s conftest.err
30422       } && test -s conftest$ac_exeext && {
30423	 test "$cross_compiling" = yes ||
30424	 $as_test_x conftest$ac_exeext
30425       }; then
30426  ac_cv_lib_posix_remove=yes
30427else
30428  $as_echo "$as_me: failed program was:" >&5
30429sed 's/^/| /' conftest.$ac_ext >&5
30430
30431	ac_cv_lib_posix_remove=no
30432fi
30433
30434rm -rf conftest.dSYM
30435rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30436      conftest$ac_exeext conftest.$ac_ext
30437LIBS=$ac_check_lib_save_LIBS
30438fi
30439{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
30440$as_echo "$ac_cv_lib_posix_remove" >&6; }
30441if test "x$ac_cv_lib_posix_remove" = x""yes; then
30442  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30443fi
30444
30445    fi
30446
30447    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30448    { $as_echo "$as_me:$LINENO: checking for shmat" >&5
30449$as_echo_n "checking for shmat... " >&6; }
30450if test "${ac_cv_func_shmat+set}" = set; then
30451  $as_echo_n "(cached) " >&6
30452else
30453  cat >conftest.$ac_ext <<_ACEOF
30454/* confdefs.h.  */
30455_ACEOF
30456cat confdefs.h >>conftest.$ac_ext
30457cat >>conftest.$ac_ext <<_ACEOF
30458/* end confdefs.h.  */
30459/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
30460   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
30461#define shmat innocuous_shmat
30462
30463/* System header to define __stub macros and hopefully few prototypes,
30464    which can conflict with char shmat (); below.
30465    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30466    <limits.h> exists even on freestanding compilers.  */
30467
30468#ifdef __STDC__
30469# include <limits.h>
30470#else
30471# include <assert.h>
30472#endif
30473
30474#undef shmat
30475
30476/* Override any GCC internal prototype to avoid an error.
30477   Use char because int might match the return type of a GCC
30478   builtin and then its argument prototype would still apply.  */
30479#ifdef __cplusplus
30480extern "C"
30481#endif
30482char shmat ();
30483/* The GNU C library defines this for functions which it implements
30484    to always fail with ENOSYS.  Some functions are actually named
30485    something starting with __ and the normal name is an alias.  */
30486#if defined __stub_shmat || defined __stub___shmat
30487choke me
30488#endif
30489
30490int
30491main ()
30492{
30493return shmat ();
30494  ;
30495  return 0;
30496}
30497_ACEOF
30498rm -f conftest.$ac_objext conftest$ac_exeext
30499if { (ac_try="$ac_link"
30500case "(($ac_try" in
30501  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30502  *) ac_try_echo=$ac_try;;
30503esac
30504eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30505$as_echo "$ac_try_echo") >&5
30506  (eval "$ac_link") 2>conftest.er1
30507  ac_status=$?
30508  grep -v '^ *+' conftest.er1 >conftest.err
30509  rm -f conftest.er1
30510  cat conftest.err >&5
30511  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30512  (exit $ac_status); } && {
30513	 test -z "$ac_cxx_werror_flag" ||
30514	 test ! -s conftest.err
30515       } && test -s conftest$ac_exeext && {
30516	 test "$cross_compiling" = yes ||
30517	 $as_test_x conftest$ac_exeext
30518       }; then
30519  ac_cv_func_shmat=yes
30520else
30521  $as_echo "$as_me: failed program was:" >&5
30522sed 's/^/| /' conftest.$ac_ext >&5
30523
30524	ac_cv_func_shmat=no
30525fi
30526
30527rm -rf conftest.dSYM
30528rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30529      conftest$ac_exeext conftest.$ac_ext
30530fi
30531{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
30532$as_echo "$ac_cv_func_shmat" >&6; }
30533
30534    if test $ac_cv_func_shmat = no; then
30535      { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
30536$as_echo_n "checking for shmat in -lipc... " >&6; }
30537if test "${ac_cv_lib_ipc_shmat+set}" = set; then
30538  $as_echo_n "(cached) " >&6
30539else
30540  ac_check_lib_save_LIBS=$LIBS
30541LIBS="-lipc  $LIBS"
30542cat >conftest.$ac_ext <<_ACEOF
30543/* confdefs.h.  */
30544_ACEOF
30545cat confdefs.h >>conftest.$ac_ext
30546cat >>conftest.$ac_ext <<_ACEOF
30547/* end confdefs.h.  */
30548
30549/* Override any GCC internal prototype to avoid an error.
30550   Use char because int might match the return type of a GCC
30551   builtin and then its argument prototype would still apply.  */
30552#ifdef __cplusplus
30553extern "C"
30554#endif
30555char shmat ();
30556int
30557main ()
30558{
30559return shmat ();
30560  ;
30561  return 0;
30562}
30563_ACEOF
30564rm -f conftest.$ac_objext conftest$ac_exeext
30565if { (ac_try="$ac_link"
30566case "(($ac_try" in
30567  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30568  *) ac_try_echo=$ac_try;;
30569esac
30570eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30571$as_echo "$ac_try_echo") >&5
30572  (eval "$ac_link") 2>conftest.er1
30573  ac_status=$?
30574  grep -v '^ *+' conftest.er1 >conftest.err
30575  rm -f conftest.er1
30576  cat conftest.err >&5
30577  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30578  (exit $ac_status); } && {
30579	 test -z "$ac_cxx_werror_flag" ||
30580	 test ! -s conftest.err
30581       } && test -s conftest$ac_exeext && {
30582	 test "$cross_compiling" = yes ||
30583	 $as_test_x conftest$ac_exeext
30584       }; then
30585  ac_cv_lib_ipc_shmat=yes
30586else
30587  $as_echo "$as_me: failed program was:" >&5
30588sed 's/^/| /' conftest.$ac_ext >&5
30589
30590	ac_cv_lib_ipc_shmat=no
30591fi
30592
30593rm -rf conftest.dSYM
30594rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30595      conftest$ac_exeext conftest.$ac_ext
30596LIBS=$ac_check_lib_save_LIBS
30597fi
30598{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
30599$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30600if test "x$ac_cv_lib_ipc_shmat" = x""yes; then
30601  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30602fi
30603
30604    fi
30605  fi
30606
30607  # Check for libraries that X11R6 Xt/Xaw programs need.
30608  ac_save_LDFLAGS=$LDFLAGS
30609  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30610  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30611  # check for ICE first), but we must link in the order -lSM -lICE or
30612  # we get undefined symbols.  So assume we have SM if we have ICE.
30613  # These have to be linked with before -lX11, unlike the other
30614  # libraries we check for below, so use a different variable.
30615  # John Interrante, Karl Berry
30616  { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
30617$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30618if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
30619  $as_echo_n "(cached) " >&6
30620else
30621  ac_check_lib_save_LIBS=$LIBS
30622LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30623cat >conftest.$ac_ext <<_ACEOF
30624/* confdefs.h.  */
30625_ACEOF
30626cat confdefs.h >>conftest.$ac_ext
30627cat >>conftest.$ac_ext <<_ACEOF
30628/* end confdefs.h.  */
30629
30630/* Override any GCC internal prototype to avoid an error.
30631   Use char because int might match the return type of a GCC
30632   builtin and then its argument prototype would still apply.  */
30633#ifdef __cplusplus
30634extern "C"
30635#endif
30636char IceConnectionNumber ();
30637int
30638main ()
30639{
30640return IceConnectionNumber ();
30641  ;
30642  return 0;
30643}
30644_ACEOF
30645rm -f conftest.$ac_objext conftest$ac_exeext
30646if { (ac_try="$ac_link"
30647case "(($ac_try" in
30648  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30649  *) ac_try_echo=$ac_try;;
30650esac
30651eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30652$as_echo "$ac_try_echo") >&5
30653  (eval "$ac_link") 2>conftest.er1
30654  ac_status=$?
30655  grep -v '^ *+' conftest.er1 >conftest.err
30656  rm -f conftest.er1
30657  cat conftest.err >&5
30658  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30659  (exit $ac_status); } && {
30660	 test -z "$ac_cxx_werror_flag" ||
30661	 test ! -s conftest.err
30662       } && test -s conftest$ac_exeext && {
30663	 test "$cross_compiling" = yes ||
30664	 $as_test_x conftest$ac_exeext
30665       }; then
30666  ac_cv_lib_ICE_IceConnectionNumber=yes
30667else
30668  $as_echo "$as_me: failed program was:" >&5
30669sed 's/^/| /' conftest.$ac_ext >&5
30670
30671	ac_cv_lib_ICE_IceConnectionNumber=no
30672fi
30673
30674rm -rf conftest.dSYM
30675rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30676      conftest$ac_exeext conftest.$ac_ext
30677LIBS=$ac_check_lib_save_LIBS
30678fi
30679{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30680$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30681if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then
30682  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30683fi
30684
30685  LDFLAGS=$ac_save_LDFLAGS
30686
30687fi
30688
30689
30690if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30691
30692    # Print a helpful message on how to acquire the necessary build dependency.
30693    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30694    MISSING_DEPENDENCY=x11
30695    PKGHANDLER_COMMAND=
30696
30697    case $PKGHANDLER in
30698	apt-get)
30699                apt_help     $MISSING_DEPENDENCY ;;
30700    yum)
30701                yum_help     $MISSING_DEPENDENCY ;;
30702	port)
30703                port_help    $MISSING_DEPENDENCY ;;
30704	pkgutil)
30705                pkgutil_help $MISSING_DEPENDENCY ;;
30706	pkgadd)
30707                pkgadd_help  $MISSING_DEPENDENCY ;;
30708    * )
30709      break ;;
30710    esac
30711
30712    if test "x$PKGHANDLER_COMMAND" != x; then
30713        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30714    fi
30715
30716    { { $as_echo "$as_me:$LINENO: error: Could not find X11 libraries. $HELP_MSG" >&5
30717$as_echo "$as_me: error: Could not find X11 libraries. $HELP_MSG" >&2;}
30718   { (exit 1); exit 1; }; }
30719fi
30720
30721# Some of the old makefiles require a setting of OPENWIN_HOME
30722# Since the X11R6 directory has disappeared on later Linuxes,
30723# we need to probe for it.
30724if test "x$OPENJDK_TARGET_OS" = xlinux; then
30725    if test -d "$SYS_ROOT/usr/X11R6"; then
30726        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30727    fi
30728    if test -d "$SYS_ROOT/usr/include/X11"; then
30729        OPENWIN_HOME="$SYS_ROOT/usr"
30730    fi
30731fi
30732if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30733    OPENWIN_HOME="/usr/openwin"
30734fi
30735
30736
30737
30738#
30739# Weird Sol10 something check...TODO change to try compile
30740#
30741if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30742  if test "`uname -r`" = "5.10"; then
30743     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30744     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30745     fi
30746  fi
30747fi
30748
30749ac_ext=c
30750ac_cpp='$CPP $CPPFLAGS'
30751ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30752ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30753ac_compiler_gnu=$ac_cv_c_compiler_gnu
30754
30755OLD_CFLAGS="$CFLAGS"
30756CFLAGS="$CFLAGS $X_CFLAGS"
30757
30758# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30759
30760
30761
30762for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30763do
30764as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30765{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
30766$as_echo_n "checking for $ac_header... " >&6; }
30767if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
30768  $as_echo_n "(cached) " >&6
30769else
30770  cat >conftest.$ac_ext <<_ACEOF
30771/* confdefs.h.  */
30772_ACEOF
30773cat confdefs.h >>conftest.$ac_ext
30774cat >>conftest.$ac_ext <<_ACEOF
30775/* end confdefs.h.  */
30776 # include <X11/Xlib.h>
30777                   # include <X11/Xutil.h>
30778
30779
30780#include <$ac_header>
30781_ACEOF
30782rm -f conftest.$ac_objext
30783if { (ac_try="$ac_compile"
30784case "(($ac_try" in
30785  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30786  *) ac_try_echo=$ac_try;;
30787esac
30788eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30789$as_echo "$ac_try_echo") >&5
30790  (eval "$ac_compile") 2>conftest.er1
30791  ac_status=$?
30792  grep -v '^ *+' conftest.er1 >conftest.err
30793  rm -f conftest.er1
30794  cat conftest.err >&5
30795  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30796  (exit $ac_status); } && {
30797	 test -z "$ac_c_werror_flag" ||
30798	 test ! -s conftest.err
30799       } && test -s conftest.$ac_objext; then
30800  eval "$as_ac_Header=yes"
30801else
30802  $as_echo "$as_me: failed program was:" >&5
30803sed 's/^/| /' conftest.$ac_ext >&5
30804
30805	eval "$as_ac_Header=no"
30806fi
30807
30808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30809fi
30810ac_res=`eval 'as_val=${'$as_ac_Header'}
30811		 $as_echo "$as_val"'`
30812	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
30813$as_echo "$ac_res" >&6; }
30814as_val=`eval 'as_val=${'$as_ac_Header'}
30815		 $as_echo "$as_val"'`
30816   if test "x$as_val" = x""yes; then
30817  cat >>confdefs.h <<_ACEOF
30818#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30819_ACEOF
30820 X11_A_OK=yes
30821else
30822  X11_A_OK=no
30823fi
30824
30825done
30826
30827
30828CFLAGS="$OLD_CFLAGS"
30829ac_ext=cpp
30830ac_cpp='$CXXCPP $CPPFLAGS'
30831ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30832ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30833ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30834
30835
30836if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30837
30838    # Print a helpful message on how to acquire the necessary build dependency.
30839    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30840    MISSING_DEPENDENCY=x11
30841    PKGHANDLER_COMMAND=
30842
30843    case $PKGHANDLER in
30844	apt-get)
30845                apt_help     $MISSING_DEPENDENCY ;;
30846    yum)
30847                yum_help     $MISSING_DEPENDENCY ;;
30848	port)
30849                port_help    $MISSING_DEPENDENCY ;;
30850	pkgutil)
30851                pkgutil_help $MISSING_DEPENDENCY ;;
30852	pkgadd)
30853                pkgadd_help  $MISSING_DEPENDENCY ;;
30854    * )
30855      break ;;
30856    esac
30857
30858    if test "x$PKGHANDLER_COMMAND" != x; then
30859        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30860    fi
30861
30862    { { $as_echo "$as_me:$LINENO: error: Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" >&5
30863$as_echo "$as_me: error: Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" >&2;}
30864   { (exit 1); exit 1; }; }
30865fi
30866
30867
30868
30869
30870
30871
30872###############################################################################
30873#
30874# The common unix printing system cups is used to print from java.
30875#
30876
30877# Check whether --with-cups was given.
30878if test "${with_cups+set}" = set; then
30879  withval=$with_cups;
30880fi
30881
30882
30883# Check whether --with-cups-include was given.
30884if test "${with_cups_include+set}" = set; then
30885  withval=$with_cups_include;
30886fi
30887
30888
30889if test "x$CUPS_NOT_NEEDED" = xyes; then
30890	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30891		{ $as_echo "$as_me:$LINENO: WARNING: cups not used, so --with-cups is ignored" >&5
30892$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30893	fi
30894	CUPS_CFLAGS=
30895else
30896	CUPS_FOUND=no
30897
30898	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30899	    { { $as_echo "$as_me:$LINENO: error: It is not possible to disable the use of cups. Remove the --without-cups option." >&5
30900$as_echo "$as_me: error: It is not possible to disable the use of cups. Remove the --without-cups option." >&2;}
30901   { (exit 1); exit 1; }; }
30902	fi
30903
30904	if test "x${with_cups}" != x; then
30905	    CUPS_CFLAGS="-I${with_cups}/include"
30906	    CUPS_FOUND=yes
30907	fi
30908	if test "x${with_cups_include}" != x; then
30909	    CUPS_CFLAGS="-I${with_cups_include}"
30910	    CUPS_FOUND=yes
30911	fi
30912	if test "x$CUPS_FOUND" = xno; then
30913
30914
30915    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30916        # Source the builddeps file again, to make sure it uses the latest variables!
30917        . $builddepsfile
30918        # Look for a target and build machine specific resource!
30919        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30920        if test "x$resource" = x; then
30921            # Ok, lets instead look for a target specific resource
30922            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30923        fi
30924        if test "x$resource" = x; then
30925            # Ok, lets instead look for a build specific resource
30926            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30927        fi
30928        if test "x$resource" = x; then
30929            # Ok, lets instead look for a generic resource
30930            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30931            resource=${builddep_cups}
30932        fi
30933        if test "x$resource" != x; then
30934            { $as_echo "$as_me:$LINENO: Using builddeps $resource for cups" >&5
30935$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30936	    # If the resource in the builddeps.conf file is an existing directory,
30937	    # for example /java/linux/cups
30938	    if test -d ${resource}; then
30939	       depdir=${resource}
30940	    else
30941
30942# cups is for example mymodule
30943# $resource is for example libs/general/libmymod_1_2_3.zip
30944# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30945# $with_builddeps_dir is for example /localhome/builddeps
30946# depdir is the name of the variable into which we store the depdir, eg MYMOD
30947# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30948# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30949    filename=`basename $resource`
30950    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30951    filebase=${filename%%.*}
30952    extension=${filename#*.}
30953    installdir=$with_builddeps_dir/$filebase
30954    if test ! -f $installdir/$filename.unpacked; then
30955        { $as_echo "$as_me:$LINENO: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30956$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30957        if test ! -d $installdir; then
30958            mkdir -p $installdir
30959        fi
30960        if test ! -d $installdir; then
30961            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
30962$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
30963   { (exit 1); exit 1; }; }
30964        fi
30965        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30966        touch $tmpfile
30967        if test ! -f $tmpfile; then
30968            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
30969$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
30970   { (exit 1); exit 1; }; }
30971        fi
30972
30973    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30974    # $tmpfile is the local file name for the downloaded file.
30975    VALID_TOOL=no
30976    if test "x$BDEPS_FTP" = xwget; then
30977       VALID_TOOL=yes
30978       wget -O $tmpfile $with_builddeps_server/$resource
30979    fi
30980    if test "x$BDEPS_FTP" = xlftp; then
30981       VALID_TOOL=yes
30982       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30983    fi
30984    if test "x$BDEPS_FTP" = xftp; then
30985        VALID_TOOL=yes
30986        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30987        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30988        FTPUSERPWD=${FTPSERVER%%@*}
30989        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30990            FTPUSER=${userpwd%%:*}
30991            FTPPWD=${userpwd#*@}
30992            FTPSERVER=${FTPSERVER#*@}
30993        else
30994            FTPUSER=ftp
30995            FTPPWD=ftp
30996        fi
30997        # the "pass" command does not work on some
30998        # ftp clients (read ftp.exe) but if it works,
30999        # passive mode is better!
31000        (\
31001            echo "user $FTPUSER $FTPPWD"        ;\
31002            echo "pass"                         ;\
31003            echo "bin"                          ;\
31004            echo "get $FTPPATH $tmpfile"              ;\
31005        ) | ftp -in $FTPSERVER
31006    fi
31007    if test "x$VALID_TOOL" != xyes; then
31008       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
31009$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
31010   { (exit 1); exit 1; }; }
31011    fi
31012
31013        mv $tmpfile $installdir/$filename
31014        if test ! -s $installdir/$filename; then
31015            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
31016$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
31017   { (exit 1); exit 1; }; }
31018        fi
31019        case "$extension" in
31020            zip)  echo "Unzipping $installdir/$filename..."
31021               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31022            ;;
31023            tar.gz) echo "Untaring $installdir/$filename..."
31024               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31025            ;;
31026            tgz) echo "Untaring $installdir/$filename..."
31027               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31028            ;;
31029            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
31030$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
31031   { (exit 1); exit 1; }; }
31032            ;;
31033        esac
31034    fi
31035    if test -f $installdir/$filename.unpacked; then
31036        depdir=$installdir
31037    fi
31038
31039	    fi
31040            # Source the builddeps file again, because in the previous command, the depdir
31041            # was updated to point at the current build dependency install directory.
31042            . $builddepsfile
31043            # Now extract variables from the builddeps.conf files.
31044            theroot=${builddep_cups_ROOT}
31045            thecflags=${builddep_cups_CFLAGS}
31046            thelibs=${builddep_cups_LIBS}
31047            if test "x$depdir" = x; then
31048                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency cups" >&5
31049$as_echo "$as_me: error: Could not download build dependency cups" >&2;}
31050   { (exit 1); exit 1; }; }
31051            fi
31052            CUPS=$depdir
31053            if test "x$theroot" != x; then
31054               CUPS="$theroot"
31055            fi
31056            if test "x$thecflags" != x; then
31057               CUPS_CFLAGS="$thecflags"
31058            fi
31059            if test "x$thelibs" != x; then
31060               CUPS_LIBS="$thelibs"
31061            fi
31062            CUPS_FOUND=yes
31063
31064        fi
31065
31066    fi
31067
31068	fi
31069	if test "x$CUPS_FOUND" = xno; then
31070	    # Are the cups headers installed in the default /usr/include location?
31071
31072
31073for ac_header in cups/cups.h cups/ppd.h
31074do
31075as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31076if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
31077  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
31078$as_echo_n "checking for $ac_header... " >&6; }
31079if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
31080  $as_echo_n "(cached) " >&6
31081fi
31082ac_res=`eval 'as_val=${'$as_ac_Header'}
31083		 $as_echo "$as_val"'`
31084	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
31085$as_echo "$ac_res" >&6; }
31086else
31087  # Is the header compilable?
31088{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
31089$as_echo_n "checking $ac_header usability... " >&6; }
31090cat >conftest.$ac_ext <<_ACEOF
31091/* confdefs.h.  */
31092_ACEOF
31093cat confdefs.h >>conftest.$ac_ext
31094cat >>conftest.$ac_ext <<_ACEOF
31095/* end confdefs.h.  */
31096$ac_includes_default
31097#include <$ac_header>
31098_ACEOF
31099rm -f conftest.$ac_objext
31100if { (ac_try="$ac_compile"
31101case "(($ac_try" in
31102  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31103  *) ac_try_echo=$ac_try;;
31104esac
31105eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31106$as_echo "$ac_try_echo") >&5
31107  (eval "$ac_compile") 2>conftest.er1
31108  ac_status=$?
31109  grep -v '^ *+' conftest.er1 >conftest.err
31110  rm -f conftest.er1
31111  cat conftest.err >&5
31112  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31113  (exit $ac_status); } && {
31114	 test -z "$ac_cxx_werror_flag" ||
31115	 test ! -s conftest.err
31116       } && test -s conftest.$ac_objext; then
31117  ac_header_compiler=yes
31118else
31119  $as_echo "$as_me: failed program was:" >&5
31120sed 's/^/| /' conftest.$ac_ext >&5
31121
31122	ac_header_compiler=no
31123fi
31124
31125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31126{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
31127$as_echo "$ac_header_compiler" >&6; }
31128
31129# Is the header present?
31130{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
31131$as_echo_n "checking $ac_header presence... " >&6; }
31132cat >conftest.$ac_ext <<_ACEOF
31133/* confdefs.h.  */
31134_ACEOF
31135cat confdefs.h >>conftest.$ac_ext
31136cat >>conftest.$ac_ext <<_ACEOF
31137/* end confdefs.h.  */
31138#include <$ac_header>
31139_ACEOF
31140if { (ac_try="$ac_cpp conftest.$ac_ext"
31141case "(($ac_try" in
31142  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31143  *) ac_try_echo=$ac_try;;
31144esac
31145eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31146$as_echo "$ac_try_echo") >&5
31147  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
31148  ac_status=$?
31149  grep -v '^ *+' conftest.er1 >conftest.err
31150  rm -f conftest.er1
31151  cat conftest.err >&5
31152  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31153  (exit $ac_status); } >/dev/null && {
31154	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
31155	 test ! -s conftest.err
31156       }; then
31157  ac_header_preproc=yes
31158else
31159  $as_echo "$as_me: failed program was:" >&5
31160sed 's/^/| /' conftest.$ac_ext >&5
31161
31162  ac_header_preproc=no
31163fi
31164
31165rm -f conftest.err conftest.$ac_ext
31166{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
31167$as_echo "$ac_header_preproc" >&6; }
31168
31169# So?  What about this header?
31170case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
31171  yes:no: )
31172    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
31173$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
31174    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
31175$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
31176    ac_header_preproc=yes
31177    ;;
31178  no:yes:* )
31179    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
31180$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
31181    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
31182$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
31183    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
31184$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
31185    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
31186$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
31187    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
31188$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
31189    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
31190$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
31191    ( cat <<\_ASBOX
31192## ----------------------------------------- ##
31193## Report this to build-dev@openjdk.java.net ##
31194## ----------------------------------------- ##
31195_ASBOX
31196     ) | sed "s/^/$as_me: WARNING:     /" >&2
31197    ;;
31198esac
31199{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
31200$as_echo_n "checking for $ac_header... " >&6; }
31201if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
31202  $as_echo_n "(cached) " >&6
31203else
31204  eval "$as_ac_Header=\$ac_header_preproc"
31205fi
31206ac_res=`eval 'as_val=${'$as_ac_Header'}
31207		 $as_echo "$as_val"'`
31208	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
31209$as_echo "$ac_res" >&6; }
31210
31211fi
31212as_val=`eval 'as_val=${'$as_ac_Header'}
31213		 $as_echo "$as_val"'`
31214   if test "x$as_val" = x""yes; then
31215  cat >>confdefs.h <<_ACEOF
31216#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31217_ACEOF
31218 CUPS_FOUND=yes
31219	                      CUPS_CFLAGS=
31220	                      DEFAULT_CUPS=yes
31221fi
31222
31223done
31224
31225	fi
31226	if test "x$CUPS_FOUND" = xno; then
31227	    # Getting nervous now? Lets poke around for standard Solaris third-party
31228	    # package installation locations.
31229	    { $as_echo "$as_me:$LINENO: checking for cups headers" >&5
31230$as_echo_n "checking for cups headers... " >&6; }
31231	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31232	       # An SFW package seems to be installed!
31233	       CUPS_FOUND=yes
31234	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31235	    elif test -s /opt/csw/include/cups/cups.h; then
31236	       # A CSW package seems to be installed!
31237	       CUPS_FOUND=yes
31238	       CUPS_CFLAGS="-I/opt/csw/include"
31239	    fi
31240	    { $as_echo "$as_me:$LINENO: result: $CUPS_FOUND" >&5
31241$as_echo "$CUPS_FOUND" >&6; }
31242	fi
31243	if test "x$CUPS_FOUND" = xno; then
31244
31245    # Print a helpful message on how to acquire the necessary build dependency.
31246    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31247    MISSING_DEPENDENCY=cups
31248    PKGHANDLER_COMMAND=
31249
31250    case $PKGHANDLER in
31251	apt-get)
31252                apt_help     $MISSING_DEPENDENCY ;;
31253    yum)
31254                yum_help     $MISSING_DEPENDENCY ;;
31255	port)
31256                port_help    $MISSING_DEPENDENCY ;;
31257	pkgutil)
31258                pkgutil_help $MISSING_DEPENDENCY ;;
31259	pkgadd)
31260                pkgadd_help  $MISSING_DEPENDENCY ;;
31261    * )
31262      break ;;
31263    esac
31264
31265    if test "x$PKGHANDLER_COMMAND" != x; then
31266        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31267    fi
31268
31269	    { { $as_echo "$as_me:$LINENO: error: Could not find cups! $HELP_MSG " >&5
31270$as_echo "$as_me: error: Could not find cups! $HELP_MSG " >&2;}
31271   { (exit 1); exit 1; }; }
31272	fi
31273fi
31274
31275
31276
31277
31278
31279
31280###############################################################################
31281#
31282# The ubiquitous freetype2 library is used to render fonts.
31283#
31284
31285# Check whether --with-freetype was given.
31286if test "${with_freetype+set}" = set; then
31287  withval=$with_freetype;
31288fi
31289
31290
31291# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31292USING_SYSTEM_FT_LIB=false
31293
31294if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31295	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31296		{ $as_echo "$as_me:$LINENO: WARNING: freetype not used, so --with-freetype is ignored" >&5
31297$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31298	fi
31299	FREETYPE2_CFLAGS=
31300	FREETYPE2_LIBS=
31301        FREETYPE2_LIB_PATH=
31302else
31303	FREETYPE2_FOUND=no
31304
31305	if test "x$with_freetype" != x; then
31306
31307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31308
31309  # Input might be given as Windows format, start by converting to
31310  # unix format.
31311  path="$with_freetype"
31312  new_path=`$CYGPATH -u "$path"`
31313
31314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31317  # "foo.exe" is OK but "foo" is an error.
31318  #
31319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31320  # It is also a way to make sure we got the proper file name for the real test later on.
31321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31322  if test "x$test_shortpath" = x; then
31323    { $as_echo "$as_me:$LINENO: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31324$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31325    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of with_freetype" >&5
31326$as_echo "$as_me: error: Cannot locate the the path of with_freetype" >&2;}
31327   { (exit 1); exit 1; }; }
31328  fi
31329
31330  # Call helper function which possibly converts this using DOS-style short mode.
31331  # If so, the updated path is stored in $new_path.
31332
31333  input_path="$new_path"
31334  # Check if we need to convert this using DOS-style short mode. If the path
31335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31336  # take no chances and rewrite it.
31337  # Note: m4 eats our [], so we need to use [ and ] instead.
31338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31339  if test "x$has_forbidden_chars" != x; then
31340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31344      # Going to short mode and back again did indeed matter. Since short mode is
31345      # case insensitive, let's make it lowercase to improve readability.
31346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31347      # Now convert it back to Unix-stile (cygpath)
31348      input_path=`$CYGPATH -u "$shortmode_path"`
31349      new_path="$input_path"
31350    fi
31351  fi
31352
31353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31354  if test "x$test_cygdrive_prefix" = x; then
31355    # As a simple fix, exclude /usr/bin since it's not a real path.
31356    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31358      # a path prefixed by /cygdrive for fixpath to work.
31359      new_path="$CYGWIN_ROOT_PATH$input_path"
31360    fi
31361  fi
31362
31363
31364  if test "x$path" != "x$new_path"; then
31365    with_freetype="$new_path"
31366    { $as_echo "$as_me:$LINENO: Rewriting with_freetype to \"$new_path\"" >&5
31367$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31368  fi
31369
31370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31371
31372  path="$with_freetype"
31373  has_colon=`$ECHO $path | $GREP ^.:`
31374  new_path="$path"
31375  if test "x$has_colon" = x; then
31376    # Not in mixed or Windows style, start by that.
31377    new_path=`cmd //c echo $path`
31378  fi
31379
31380
31381  input_path="$new_path"
31382  # Check if we need to convert this using DOS-style short mode. If the path
31383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31384  # take no chances and rewrite it.
31385  # Note: m4 eats our [], so we need to use [ and ] instead.
31386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31387  if test "x$has_forbidden_chars" != x; then
31388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31390  fi
31391
31392
31393  windows_path="$new_path"
31394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31395    unix_path=`$CYGPATH -u "$windows_path"`
31396    new_path="$unix_path"
31397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31399    new_path="$unix_path"
31400  fi
31401
31402  if test "x$path" != "x$new_path"; then
31403    with_freetype="$new_path"
31404    { $as_echo "$as_me:$LINENO: Rewriting with_freetype to \"$new_path\"" >&5
31405$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31406  fi
31407
31408  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31409  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31410
31411  else
31412    # We're on a posix platform. Hooray! :)
31413    path="$with_freetype"
31414
31415    if test ! -f "$path" && test ! -d "$path"; then
31416      { { $as_echo "$as_me:$LINENO: error: The path of with_freetype, which resolves as \"$path\", is not found." >&5
31417$as_echo "$as_me: error: The path of with_freetype, which resolves as \"$path\", is not found." >&2;}
31418   { (exit 1); exit 1; }; }
31419    fi
31420
31421    has_space=`$ECHO "$path" | $GREP " "`
31422    if test "x$has_space" != x; then
31423      { $as_echo "$as_me:$LINENO: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31424$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31425      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
31426$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
31427   { (exit 1); exit 1; }; }
31428    fi
31429  fi
31430
31431	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31432            FREETYPE2_LIB_PATH="$with_freetype/lib"
31433            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31434                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31435                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31436            fi
31437            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31438                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31439            fi
31440	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31441            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31442                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31443            fi
31444 	    FREETYPE2_FOUND=yes
31445   	    if test "x$FREETYPE2_FOUND" = xyes; then
31446	        # Verify that the directories exist
31447                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31448		   { { $as_echo "$as_me:$LINENO: error: Could not find the expected directories $with_freetype/lib and $with_freetype/include" >&5
31449$as_echo "$as_me: error: Could not find the expected directories $with_freetype/lib and $with_freetype/include" >&2;}
31450   { (exit 1); exit 1; }; }
31451		fi
31452	        # List the contents of the lib.
31453		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31454                if test "x$FREETYPELIB" = x; then
31455		   { { $as_echo "$as_me:$LINENO: error: Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" >&5
31456$as_echo "$as_me: error: Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" >&2;}
31457   { (exit 1); exit 1; }; }
31458		fi
31459	        # Check one h-file
31460                if ! test -s "$with_freetype/include/ft2build.h"; then
31461		   { { $as_echo "$as_me:$LINENO: error: Could not find $with_freetype/include/ft2build.h" >&5
31462$as_echo "$as_me: error: Could not find $with_freetype/include/ft2build.h" >&2;}
31463   { (exit 1); exit 1; }; }
31464		fi
31465            fi
31466        fi
31467	if test "x$FREETYPE2_FOUND" = xno; then
31468
31469
31470    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31471        # Source the builddeps file again, to make sure it uses the latest variables!
31472        . $builddepsfile
31473        # Look for a target and build machine specific resource!
31474        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31475        if test "x$resource" = x; then
31476            # Ok, lets instead look for a target specific resource
31477            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31478        fi
31479        if test "x$resource" = x; then
31480            # Ok, lets instead look for a build specific resource
31481            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31482        fi
31483        if test "x$resource" = x; then
31484            # Ok, lets instead look for a generic resource
31485            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31486            resource=${builddep_freetype2}
31487        fi
31488        if test "x$resource" != x; then
31489            { $as_echo "$as_me:$LINENO: Using builddeps $resource for freetype2" >&5
31490$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31491	    # If the resource in the builddeps.conf file is an existing directory,
31492	    # for example /java/linux/cups
31493	    if test -d ${resource}; then
31494	       depdir=${resource}
31495	    else
31496
31497# freetype2 is for example mymodule
31498# $resource is for example libs/general/libmymod_1_2_3.zip
31499# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31500# $with_builddeps_dir is for example /localhome/builddeps
31501# depdir is the name of the variable into which we store the depdir, eg MYMOD
31502# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31503# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31504    filename=`basename $resource`
31505    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31506    filebase=${filename%%.*}
31507    extension=${filename#*.}
31508    installdir=$with_builddeps_dir/$filebase
31509    if test ! -f $installdir/$filename.unpacked; then
31510        { $as_echo "$as_me:$LINENO: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31511$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31512        if test ! -d $installdir; then
31513            mkdir -p $installdir
31514        fi
31515        if test ! -d $installdir; then
31516            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
31517$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
31518   { (exit 1); exit 1; }; }
31519        fi
31520        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31521        touch $tmpfile
31522        if test ! -f $tmpfile; then
31523            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
31524$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
31525   { (exit 1); exit 1; }; }
31526        fi
31527
31528    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31529    # $tmpfile is the local file name for the downloaded file.
31530    VALID_TOOL=no
31531    if test "x$BDEPS_FTP" = xwget; then
31532       VALID_TOOL=yes
31533       wget -O $tmpfile $with_builddeps_server/$resource
31534    fi
31535    if test "x$BDEPS_FTP" = xlftp; then
31536       VALID_TOOL=yes
31537       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31538    fi
31539    if test "x$BDEPS_FTP" = xftp; then
31540        VALID_TOOL=yes
31541        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31542        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31543        FTPUSERPWD=${FTPSERVER%%@*}
31544        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31545            FTPUSER=${userpwd%%:*}
31546            FTPPWD=${userpwd#*@}
31547            FTPSERVER=${FTPSERVER#*@}
31548        else
31549            FTPUSER=ftp
31550            FTPPWD=ftp
31551        fi
31552        # the "pass" command does not work on some
31553        # ftp clients (read ftp.exe) but if it works,
31554        # passive mode is better!
31555        (\
31556            echo "user $FTPUSER $FTPPWD"        ;\
31557            echo "pass"                         ;\
31558            echo "bin"                          ;\
31559            echo "get $FTPPATH $tmpfile"              ;\
31560        ) | ftp -in $FTPSERVER
31561    fi
31562    if test "x$VALID_TOOL" != xyes; then
31563       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
31564$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
31565   { (exit 1); exit 1; }; }
31566    fi
31567
31568        mv $tmpfile $installdir/$filename
31569        if test ! -s $installdir/$filename; then
31570            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
31571$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
31572   { (exit 1); exit 1; }; }
31573        fi
31574        case "$extension" in
31575            zip)  echo "Unzipping $installdir/$filename..."
31576               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31577            ;;
31578            tar.gz) echo "Untaring $installdir/$filename..."
31579               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31580            ;;
31581            tgz) echo "Untaring $installdir/$filename..."
31582               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31583            ;;
31584            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
31585$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
31586   { (exit 1); exit 1; }; }
31587            ;;
31588        esac
31589    fi
31590    if test -f $installdir/$filename.unpacked; then
31591        depdir=$installdir
31592    fi
31593
31594	    fi
31595            # Source the builddeps file again, because in the previous command, the depdir
31596            # was updated to point at the current build dependency install directory.
31597            . $builddepsfile
31598            # Now extract variables from the builddeps.conf files.
31599            theroot=${builddep_freetype2_ROOT}
31600            thecflags=${builddep_freetype2_CFLAGS}
31601            thelibs=${builddep_freetype2_LIBS}
31602            if test "x$depdir" = x; then
31603                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency freetype2" >&5
31604$as_echo "$as_me: error: Could not download build dependency freetype2" >&2;}
31605   { (exit 1); exit 1; }; }
31606            fi
31607            FREETYPE2=$depdir
31608            if test "x$theroot" != x; then
31609               FREETYPE2="$theroot"
31610            fi
31611            if test "x$thecflags" != x; then
31612               FREETYPE2_CFLAGS="$thecflags"
31613            fi
31614            if test "x$thelibs" != x; then
31615               FREETYPE2_LIBS="$thelibs"
31616            fi
31617            FREETYPE2_FOUND=yes
31618            else FREETYPE2_FOUND=no
31619
31620        fi
31621        else FREETYPE2_FOUND=no
31622
31623    fi
31624
31625            USING_SYSTEM_FT_LIB=true
31626	fi
31627	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31628            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31629
31630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31631
31632  # Input might be given as Windows format, start by converting to
31633  # unix format.
31634  path="$FREETYPELOCATION"
31635  new_path=`$CYGPATH -u "$path"`
31636
31637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31640  # "foo.exe" is OK but "foo" is an error.
31641  #
31642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31643  # It is also a way to make sure we got the proper file name for the real test later on.
31644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31645  if test "x$test_shortpath" = x; then
31646    { $as_echo "$as_me:$LINENO: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31647$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31648    { { $as_echo "$as_me:$LINENO: error: Cannot locate the the path of FREETYPELOCATION" >&5
31649$as_echo "$as_me: error: Cannot locate the the path of FREETYPELOCATION" >&2;}
31650   { (exit 1); exit 1; }; }
31651  fi
31652
31653  # Call helper function which possibly converts this using DOS-style short mode.
31654  # If so, the updated path is stored in $new_path.
31655
31656  input_path="$new_path"
31657  # Check if we need to convert this using DOS-style short mode. If the path
31658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31659  # take no chances and rewrite it.
31660  # Note: m4 eats our [], so we need to use [ and ] instead.
31661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31662  if test "x$has_forbidden_chars" != x; then
31663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31667      # Going to short mode and back again did indeed matter. Since short mode is
31668      # case insensitive, let's make it lowercase to improve readability.
31669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31670      # Now convert it back to Unix-stile (cygpath)
31671      input_path=`$CYGPATH -u "$shortmode_path"`
31672      new_path="$input_path"
31673    fi
31674  fi
31675
31676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31677  if test "x$test_cygdrive_prefix" = x; then
31678    # As a simple fix, exclude /usr/bin since it's not a real path.
31679    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31681      # a path prefixed by /cygdrive for fixpath to work.
31682      new_path="$CYGWIN_ROOT_PATH$input_path"
31683    fi
31684  fi
31685
31686
31687  if test "x$path" != "x$new_path"; then
31688    FREETYPELOCATION="$new_path"
31689    { $as_echo "$as_me:$LINENO: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31690$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31691  fi
31692
31693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31694
31695  path="$FREETYPELOCATION"
31696  has_colon=`$ECHO $path | $GREP ^.:`
31697  new_path="$path"
31698  if test "x$has_colon" = x; then
31699    # Not in mixed or Windows style, start by that.
31700    new_path=`cmd //c echo $path`
31701  fi
31702
31703
31704  input_path="$new_path"
31705  # Check if we need to convert this using DOS-style short mode. If the path
31706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31707  # take no chances and rewrite it.
31708  # Note: m4 eats our [], so we need to use [ and ] instead.
31709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31710  if test "x$has_forbidden_chars" != x; then
31711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31712    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31713  fi
31714
31715
31716  windows_path="$new_path"
31717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31718    unix_path=`$CYGPATH -u "$windows_path"`
31719    new_path="$unix_path"
31720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31722    new_path="$unix_path"
31723  fi
31724
31725  if test "x$path" != "x$new_path"; then
31726    FREETYPELOCATION="$new_path"
31727    { $as_echo "$as_me:$LINENO: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31728$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31729  fi
31730
31731  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31732  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31733
31734  else
31735    # We're on a posix platform. Hooray! :)
31736    path="$FREETYPELOCATION"
31737
31738    if test ! -f "$path" && test ! -d "$path"; then
31739      { { $as_echo "$as_me:$LINENO: error: The path of FREETYPELOCATION, which resolves as \"$path\", is not found." >&5
31740$as_echo "$as_me: error: The path of FREETYPELOCATION, which resolves as \"$path\", is not found." >&2;}
31741   { (exit 1); exit 1; }; }
31742    fi
31743
31744    has_space=`$ECHO "$path" | $GREP " "`
31745    if test "x$has_space" != x; then
31746      { $as_echo "$as_me:$LINENO: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31747$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31748      { { $as_echo "$as_me:$LINENO: error: Spaces are not allowed in this path." >&5
31749$as_echo "$as_me: error: Spaces are not allowed in this path." >&2;}
31750   { (exit 1); exit 1; }; }
31751    fi
31752  fi
31753
31754	    { $as_echo "$as_me:$LINENO: checking for freetype in some standard windows locations" >&5
31755$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31756	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31757	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31758	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31759 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31760                if ! test -s "$FREETYPE2_LIBS"; then
31761		   { { $as_echo "$as_me:$LINENO: error: Could not find $FREETYPE2_LIBS" >&5
31762$as_echo "$as_me: error: Could not find $FREETYPE2_LIBS" >&2;}
31763   { (exit 1); exit 1; }; }
31764		fi
31765                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31766		   { { $as_echo "$as_me:$LINENO: error: Could not find $FREETYPE2_LIB_PATH/freetype.dll" >&5
31767$as_echo "$as_me: error: Could not find $FREETYPE2_LIB_PATH/freetype.dll" >&2;}
31768   { (exit 1); exit 1; }; }
31769		fi
31770                USING_SYSTEM_FT_LIB=true
31771                FREETYPE2_FOUND=yes
31772	    fi
31773	    { $as_echo "$as_me:$LINENO: result: $FREETYPE2_FOUND" >&5
31774$as_echo "$FREETYPE2_FOUND" >&6; }
31775        fi
31776	if test "x$FREETYPE2_FOUND" = xno; then
31777
31778pkg_failed=no
31779{ $as_echo "$as_me:$LINENO: checking for FREETYPE2" >&5
31780$as_echo_n "checking for FREETYPE2... " >&6; }
31781
31782if test -n "$FREETYPE2_CFLAGS"; then
31783    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31784 elif test -n "$PKG_CONFIG"; then
31785    if test -n "$PKG_CONFIG" && \
31786    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5
31787  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31788  ac_status=$?
31789  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31790  (exit $ac_status); }; then
31791  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31792else
31793  pkg_failed=yes
31794fi
31795 else
31796    pkg_failed=untried
31797fi
31798if test -n "$FREETYPE2_LIBS"; then
31799    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31800 elif test -n "$PKG_CONFIG"; then
31801    if test -n "$PKG_CONFIG" && \
31802    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"freetype2\"") >&5
31803  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31804  ac_status=$?
31805  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31806  (exit $ac_status); }; then
31807  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31808else
31809  pkg_failed=yes
31810fi
31811 else
31812    pkg_failed=untried
31813fi
31814
31815
31816
31817if test $pkg_failed = yes; then
31818
31819if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31820        _pkg_short_errors_supported=yes
31821else
31822        _pkg_short_errors_supported=no
31823fi
31824        if test $_pkg_short_errors_supported = yes; then
31825	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31826        else
31827	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31828        fi
31829	# Put the nasty error message in config.log where it belongs
31830	echo "$FREETYPE2_PKG_ERRORS" >&5
31831
31832	{ $as_echo "$as_me:$LINENO: result: no" >&5
31833$as_echo "no" >&6; }
31834                FREETYPE2_FOUND=no
31835elif test $pkg_failed = untried; then
31836	FREETYPE2_FOUND=no
31837else
31838	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31839	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31840        { $as_echo "$as_me:$LINENO: result: yes" >&5
31841$as_echo "yes" >&6; }
31842	FREETYPE2_FOUND=yes
31843fi
31844            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31845            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31846            USING_SYSTEM_FT_LIB=true
31847            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31848            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31849              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31850            fi
31851	fi
31852	if test "x$FREETYPE2_FOUND" = xno; then
31853	    { $as_echo "$as_me:$LINENO: checking for freetype in some standard locations" >&5
31854$as_echo_n "checking for freetype in some standard locations... " >&6; }
31855
31856	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
31857	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
31858	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
31859	    fi
31860	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
31861	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
31862	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31863	    fi
31864
31865	    PREV_CXXCFLAGS="$CXXFLAGS"
31866	    PREV_LDFLAGS="$LDFLAGS"
31867	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31868	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31869	    cat >conftest.$ac_ext <<_ACEOF
31870/* confdefs.h.  */
31871_ACEOF
31872cat confdefs.h >>conftest.$ac_ext
31873cat >>conftest.$ac_ext <<_ACEOF
31874/* end confdefs.h.  */
31875#include<ft2build.h>
31876	                    #include FT_FREETYPE_H
31877	                   int main() { return 0; }
31878
31879_ACEOF
31880rm -f conftest.$ac_objext conftest$ac_exeext
31881if { (ac_try="$ac_link"
31882case "(($ac_try" in
31883  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31884  *) ac_try_echo=$ac_try;;
31885esac
31886eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31887$as_echo "$ac_try_echo") >&5
31888  (eval "$ac_link") 2>conftest.er1
31889  ac_status=$?
31890  grep -v '^ *+' conftest.er1 >conftest.err
31891  rm -f conftest.er1
31892  cat conftest.err >&5
31893  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31894  (exit $ac_status); } && {
31895	 test -z "$ac_cxx_werror_flag" ||
31896	 test ! -s conftest.err
31897       } && test -s conftest$ac_exeext && {
31898	 test "$cross_compiling" = yes ||
31899	 $as_test_x conftest$ac_exeext
31900       }; then
31901
31902	                      # Yes, the default cflags and libs did the trick.
31903	                      FREETYPE2_FOUND=yes
31904	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31905	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31906
31907else
31908  $as_echo "$as_me: failed program was:" >&5
31909sed 's/^/| /' conftest.$ac_ext >&5
31910
31911
31912	                      FREETYPE2_FOUND=no
31913
31914fi
31915
31916rm -rf conftest.dSYM
31917rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
31918      conftest$ac_exeext conftest.$ac_ext
31919            CXXCFLAGS="$PREV_CXXFLAGS"
31920	    LDFLAGS="$PREV_LDFLAGS"
31921	    { $as_echo "$as_me:$LINENO: result: $FREETYPE2_FOUND" >&5
31922$as_echo "$FREETYPE2_FOUND" >&6; }
31923            USING_SYSTEM_FT_LIB=true
31924	fi
31925	if test "x$FREETYPE2_FOUND" = xno; then
31926
31927    # Print a helpful message on how to acquire the necessary build dependency.
31928    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31929    MISSING_DEPENDENCY=freetype2
31930    PKGHANDLER_COMMAND=
31931
31932    case $PKGHANDLER in
31933	apt-get)
31934                apt_help     $MISSING_DEPENDENCY ;;
31935    yum)
31936                yum_help     $MISSING_DEPENDENCY ;;
31937	port)
31938                port_help    $MISSING_DEPENDENCY ;;
31939	pkgutil)
31940                pkgutil_help $MISSING_DEPENDENCY ;;
31941	pkgadd)
31942                pkgadd_help  $MISSING_DEPENDENCY ;;
31943    * )
31944      break ;;
31945    esac
31946
31947    if test "x$PKGHANDLER_COMMAND" != x; then
31948        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31949    fi
31950
31951		{ { $as_echo "$as_me:$LINENO: error: Could not find freetype2! $HELP_MSG " >&5
31952$as_echo "$as_me: error: Could not find freetype2! $HELP_MSG " >&2;}
31953   { (exit 1); exit 1; }; }
31954	fi
31955
31956        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31957            # AC_CHECK_LIB does not support use of cl.exe
31958            PREV_LDFLAGS="$LDFLAGS"
31959            LDFLAGS="$FREETYPE2_LIBS"
31960            { $as_echo "$as_me:$LINENO: checking for FT_Init_FreeType in -lfreetype" >&5
31961$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31962if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then
31963  $as_echo_n "(cached) " >&6
31964else
31965  ac_check_lib_save_LIBS=$LIBS
31966LIBS="-lfreetype  $LIBS"
31967cat >conftest.$ac_ext <<_ACEOF
31968/* confdefs.h.  */
31969_ACEOF
31970cat confdefs.h >>conftest.$ac_ext
31971cat >>conftest.$ac_ext <<_ACEOF
31972/* end confdefs.h.  */
31973
31974/* Override any GCC internal prototype to avoid an error.
31975   Use char because int might match the return type of a GCC
31976   builtin and then its argument prototype would still apply.  */
31977#ifdef __cplusplus
31978extern "C"
31979#endif
31980char FT_Init_FreeType ();
31981int
31982main ()
31983{
31984return FT_Init_FreeType ();
31985  ;
31986  return 0;
31987}
31988_ACEOF
31989rm -f conftest.$ac_objext conftest$ac_exeext
31990if { (ac_try="$ac_link"
31991case "(($ac_try" in
31992  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31993  *) ac_try_echo=$ac_try;;
31994esac
31995eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
31996$as_echo "$ac_try_echo") >&5
31997  (eval "$ac_link") 2>conftest.er1
31998  ac_status=$?
31999  grep -v '^ *+' conftest.er1 >conftest.err
32000  rm -f conftest.er1
32001  cat conftest.err >&5
32002  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32003  (exit $ac_status); } && {
32004	 test -z "$ac_cxx_werror_flag" ||
32005	 test ! -s conftest.err
32006       } && test -s conftest$ac_exeext && {
32007	 test "$cross_compiling" = yes ||
32008	 $as_test_x conftest$ac_exeext
32009       }; then
32010  ac_cv_lib_freetype_FT_Init_FreeType=yes
32011else
32012  $as_echo "$as_me: failed program was:" >&5
32013sed 's/^/| /' conftest.$ac_ext >&5
32014
32015	ac_cv_lib_freetype_FT_Init_FreeType=no
32016fi
32017
32018rm -rf conftest.dSYM
32019rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32020      conftest$ac_exeext conftest.$ac_ext
32021LIBS=$ac_check_lib_save_LIBS
32022fi
32023{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
32024$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
32025if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then
32026  FREETYPE2_FOUND=true
32027else
32028  { { $as_echo "$as_me:$LINENO: error: Could not find freetype2! $HELP_MSG " >&5
32029$as_echo "$as_me: error: Could not find freetype2! $HELP_MSG " >&2;}
32030   { (exit 1); exit 1; }; }
32031fi
32032
32033            LDFLAGS="$PREV_LDFLAGS"
32034        fi
32035fi
32036
32037
32038
32039
32040
32041
32042
32043
32044
32045###############################################################################
32046#
32047# Check for alsa headers and libraries. Used on Linux/GNU systems.
32048#
32049
32050# Check whether --with-alsa was given.
32051if test "${with_alsa+set}" = set; then
32052  withval=$with_alsa;
32053fi
32054
32055
32056# Check whether --with-alsa-include was given.
32057if test "${with_alsa_include+set}" = set; then
32058  withval=$with_alsa_include;
32059fi
32060
32061
32062# Check whether --with-alsa-lib was given.
32063if test "${with_alsa_lib+set}" = set; then
32064  withval=$with_alsa_lib;
32065fi
32066
32067
32068if test "x$ALSA_NOT_NEEDED" = xyes; then
32069	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
32070		{ $as_echo "$as_me:$LINENO: WARNING: alsa not used, so --with-alsa is ignored" >&5
32071$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
32072	fi
32073	ALSA_CFLAGS=
32074	ALSA_LIBS=
32075else
32076	ALSA_FOUND=no
32077
32078	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
32079	    { { $as_echo "$as_me:$LINENO: error: It is not possible to disable the use of alsa. Remove the --without-alsa option." >&5
32080$as_echo "$as_me: error: It is not possible to disable the use of alsa. Remove the --without-alsa option." >&2;}
32081   { (exit 1); exit 1; }; }
32082	fi
32083
32084	if test "x${with_alsa}" != x; then
32085	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
32086	    ALSA_CFLAGS="-I${with_alsa}/include"
32087	    ALSA_FOUND=yes
32088	fi
32089	if test "x${with_alsa_include}" != x; then
32090	    ALSA_CFLAGS="-I${with_alsa_include}"
32091	    ALSA_FOUND=yes
32092	fi
32093	if test "x${with_alsa_lib}" != x; then
32094	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
32095	    ALSA_FOUND=yes
32096	fi
32097	if test "x$ALSA_FOUND" = xno; then
32098
32099
32100    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
32101        # Source the builddeps file again, to make sure it uses the latest variables!
32102        . $builddepsfile
32103        # Look for a target and build machine specific resource!
32104        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
32105        if test "x$resource" = x; then
32106            # Ok, lets instead look for a target specific resource
32107            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
32108        fi
32109        if test "x$resource" = x; then
32110            # Ok, lets instead look for a build specific resource
32111            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
32112        fi
32113        if test "x$resource" = x; then
32114            # Ok, lets instead look for a generic resource
32115            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
32116            resource=${builddep_alsa}
32117        fi
32118        if test "x$resource" != x; then
32119            { $as_echo "$as_me:$LINENO: Using builddeps $resource for alsa" >&5
32120$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
32121	    # If the resource in the builddeps.conf file is an existing directory,
32122	    # for example /java/linux/cups
32123	    if test -d ${resource}; then
32124	       depdir=${resource}
32125	    else
32126
32127# alsa is for example mymodule
32128# $resource is for example libs/general/libmymod_1_2_3.zip
32129# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
32130# $with_builddeps_dir is for example /localhome/builddeps
32131# depdir is the name of the variable into which we store the depdir, eg MYMOD
32132# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
32133# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
32134    filename=`basename $resource`
32135    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
32136    filebase=${filename%%.*}
32137    extension=${filename#*.}
32138    installdir=$with_builddeps_dir/$filebase
32139    if test ! -f $installdir/$filename.unpacked; then
32140        { $as_echo "$as_me:$LINENO: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
32141$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
32142        if test ! -d $installdir; then
32143            mkdir -p $installdir
32144        fi
32145        if test ! -d $installdir; then
32146            { { $as_echo "$as_me:$LINENO: error: Could not create directory $installdir" >&5
32147$as_echo "$as_me: error: Could not create directory $installdir" >&2;}
32148   { (exit 1); exit 1; }; }
32149        fi
32150        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
32151        touch $tmpfile
32152        if test ! -f $tmpfile; then
32153            { { $as_echo "$as_me:$LINENO: error: Could not create files in directory $installdir" >&5
32154$as_echo "$as_me: error: Could not create files in directory $installdir" >&2;}
32155   { (exit 1); exit 1; }; }
32156        fi
32157
32158    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
32159    # $tmpfile is the local file name for the downloaded file.
32160    VALID_TOOL=no
32161    if test "x$BDEPS_FTP" = xwget; then
32162       VALID_TOOL=yes
32163       wget -O $tmpfile $with_builddeps_server/$resource
32164    fi
32165    if test "x$BDEPS_FTP" = xlftp; then
32166       VALID_TOOL=yes
32167       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
32168    fi
32169    if test "x$BDEPS_FTP" = xftp; then
32170        VALID_TOOL=yes
32171        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
32172        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
32173        FTPUSERPWD=${FTPSERVER%%@*}
32174        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
32175            FTPUSER=${userpwd%%:*}
32176            FTPPWD=${userpwd#*@}
32177            FTPSERVER=${FTPSERVER#*@}
32178        else
32179            FTPUSER=ftp
32180            FTPPWD=ftp
32181        fi
32182        # the "pass" command does not work on some
32183        # ftp clients (read ftp.exe) but if it works,
32184        # passive mode is better!
32185        (\
32186            echo "user $FTPUSER $FTPPWD"        ;\
32187            echo "pass"                         ;\
32188            echo "bin"                          ;\
32189            echo "get $FTPPATH $tmpfile"              ;\
32190        ) | ftp -in $FTPSERVER
32191    fi
32192    if test "x$VALID_TOOL" != xyes; then
32193       { { $as_echo "$as_me:$LINENO: error: I do not know how to use the tool: $BDEPS_FTP" >&5
32194$as_echo "$as_me: error: I do not know how to use the tool: $BDEPS_FTP" >&2;}
32195   { (exit 1); exit 1; }; }
32196    fi
32197
32198        mv $tmpfile $installdir/$filename
32199        if test ! -s $installdir/$filename; then
32200            { { $as_echo "$as_me:$LINENO: error: Could not download $with_builddeps_server/$resource" >&5
32201$as_echo "$as_me: error: Could not download $with_builddeps_server/$resource" >&2;}
32202   { (exit 1); exit 1; }; }
32203        fi
32204        case "$extension" in
32205            zip)  echo "Unzipping $installdir/$filename..."
32206               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32207            ;;
32208            tar.gz) echo "Untaring $installdir/$filename..."
32209               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32210            ;;
32211            tgz) echo "Untaring $installdir/$filename..."
32212               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32213            ;;
32214            *) { { $as_echo "$as_me:$LINENO: error: Cannot handle build depency archive with extension $extension" >&5
32215$as_echo "$as_me: error: Cannot handle build depency archive with extension $extension" >&2;}
32216   { (exit 1); exit 1; }; }
32217            ;;
32218        esac
32219    fi
32220    if test -f $installdir/$filename.unpacked; then
32221        depdir=$installdir
32222    fi
32223
32224	    fi
32225            # Source the builddeps file again, because in the previous command, the depdir
32226            # was updated to point at the current build dependency install directory.
32227            . $builddepsfile
32228            # Now extract variables from the builddeps.conf files.
32229            theroot=${builddep_alsa_ROOT}
32230            thecflags=${builddep_alsa_CFLAGS}
32231            thelibs=${builddep_alsa_LIBS}
32232            if test "x$depdir" = x; then
32233                { { $as_echo "$as_me:$LINENO: error: Could not download build dependency alsa" >&5
32234$as_echo "$as_me: error: Could not download build dependency alsa" >&2;}
32235   { (exit 1); exit 1; }; }
32236            fi
32237            ALSA=$depdir
32238            if test "x$theroot" != x; then
32239               ALSA="$theroot"
32240            fi
32241            if test "x$thecflags" != x; then
32242               ALSA_CFLAGS="$thecflags"
32243            fi
32244            if test "x$thelibs" != x; then
32245               ALSA_LIBS="$thelibs"
32246            fi
32247            ALSA_FOUND=yes
32248            else ALSA_FOUND=no
32249
32250        fi
32251        else ALSA_FOUND=no
32252
32253    fi
32254
32255	fi
32256	if test "x$ALSA_FOUND" = xno; then
32257
32258pkg_failed=no
32259{ $as_echo "$as_me:$LINENO: checking for ALSA" >&5
32260$as_echo_n "checking for ALSA... " >&6; }
32261
32262if test -n "$ALSA_CFLAGS"; then
32263    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32264 elif test -n "$PKG_CONFIG"; then
32265    if test -n "$PKG_CONFIG" && \
32266    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&5
32267  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32268  ac_status=$?
32269  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32270  (exit $ac_status); }; then
32271  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32272else
32273  pkg_failed=yes
32274fi
32275 else
32276    pkg_failed=untried
32277fi
32278if test -n "$ALSA_LIBS"; then
32279    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32280 elif test -n "$PKG_CONFIG"; then
32281    if test -n "$PKG_CONFIG" && \
32282    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&5
32283  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32284  ac_status=$?
32285  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32286  (exit $ac_status); }; then
32287  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32288else
32289  pkg_failed=yes
32290fi
32291 else
32292    pkg_failed=untried
32293fi
32294
32295
32296
32297if test $pkg_failed = yes; then
32298
32299if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32300        _pkg_short_errors_supported=yes
32301else
32302        _pkg_short_errors_supported=no
32303fi
32304        if test $_pkg_short_errors_supported = yes; then
32305	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32306        else
32307	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32308        fi
32309	# Put the nasty error message in config.log where it belongs
32310	echo "$ALSA_PKG_ERRORS" >&5
32311
32312	{ $as_echo "$as_me:$LINENO: result: no" >&5
32313$as_echo "no" >&6; }
32314                ALSA_FOUND=no
32315elif test $pkg_failed = untried; then
32316	ALSA_FOUND=no
32317else
32318	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32319	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32320        { $as_echo "$as_me:$LINENO: result: yes" >&5
32321$as_echo "yes" >&6; }
32322	ALSA_FOUND=yes
32323fi
32324	fi
32325	if test "x$ALSA_FOUND" = xno; then
32326
32327for ac_header in alsa/asoundlib.h
32328do
32329as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
32330if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
32331  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
32332$as_echo_n "checking for $ac_header... " >&6; }
32333if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
32334  $as_echo_n "(cached) " >&6
32335fi
32336ac_res=`eval 'as_val=${'$as_ac_Header'}
32337		 $as_echo "$as_val"'`
32338	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
32339$as_echo "$ac_res" >&6; }
32340else
32341  # Is the header compilable?
32342{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
32343$as_echo_n "checking $ac_header usability... " >&6; }
32344cat >conftest.$ac_ext <<_ACEOF
32345/* confdefs.h.  */
32346_ACEOF
32347cat confdefs.h >>conftest.$ac_ext
32348cat >>conftest.$ac_ext <<_ACEOF
32349/* end confdefs.h.  */
32350$ac_includes_default
32351#include <$ac_header>
32352_ACEOF
32353rm -f conftest.$ac_objext
32354if { (ac_try="$ac_compile"
32355case "(($ac_try" in
32356  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32357  *) ac_try_echo=$ac_try;;
32358esac
32359eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32360$as_echo "$ac_try_echo") >&5
32361  (eval "$ac_compile") 2>conftest.er1
32362  ac_status=$?
32363  grep -v '^ *+' conftest.er1 >conftest.err
32364  rm -f conftest.er1
32365  cat conftest.err >&5
32366  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32367  (exit $ac_status); } && {
32368	 test -z "$ac_cxx_werror_flag" ||
32369	 test ! -s conftest.err
32370       } && test -s conftest.$ac_objext; then
32371  ac_header_compiler=yes
32372else
32373  $as_echo "$as_me: failed program was:" >&5
32374sed 's/^/| /' conftest.$ac_ext >&5
32375
32376	ac_header_compiler=no
32377fi
32378
32379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32380{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
32381$as_echo "$ac_header_compiler" >&6; }
32382
32383# Is the header present?
32384{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
32385$as_echo_n "checking $ac_header presence... " >&6; }
32386cat >conftest.$ac_ext <<_ACEOF
32387/* confdefs.h.  */
32388_ACEOF
32389cat confdefs.h >>conftest.$ac_ext
32390cat >>conftest.$ac_ext <<_ACEOF
32391/* end confdefs.h.  */
32392#include <$ac_header>
32393_ACEOF
32394if { (ac_try="$ac_cpp conftest.$ac_ext"
32395case "(($ac_try" in
32396  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32397  *) ac_try_echo=$ac_try;;
32398esac
32399eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32400$as_echo "$ac_try_echo") >&5
32401  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
32402  ac_status=$?
32403  grep -v '^ *+' conftest.er1 >conftest.err
32404  rm -f conftest.er1
32405  cat conftest.err >&5
32406  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32407  (exit $ac_status); } >/dev/null && {
32408	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
32409	 test ! -s conftest.err
32410       }; then
32411  ac_header_preproc=yes
32412else
32413  $as_echo "$as_me: failed program was:" >&5
32414sed 's/^/| /' conftest.$ac_ext >&5
32415
32416  ac_header_preproc=no
32417fi
32418
32419rm -f conftest.err conftest.$ac_ext
32420{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
32421$as_echo "$ac_header_preproc" >&6; }
32422
32423# So?  What about this header?
32424case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
32425  yes:no: )
32426    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
32427$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
32428    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
32429$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
32430    ac_header_preproc=yes
32431    ;;
32432  no:yes:* )
32433    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
32434$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
32435    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
32436$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
32437    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
32438$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
32439    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
32440$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
32441    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
32442$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
32443    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
32444$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
32445    ( cat <<\_ASBOX
32446## ----------------------------------------- ##
32447## Report this to build-dev@openjdk.java.net ##
32448## ----------------------------------------- ##
32449_ASBOX
32450     ) | sed "s/^/$as_me: WARNING:     /" >&2
32451    ;;
32452esac
32453{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
32454$as_echo_n "checking for $ac_header... " >&6; }
32455if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
32456  $as_echo_n "(cached) " >&6
32457else
32458  eval "$as_ac_Header=\$ac_header_preproc"
32459fi
32460ac_res=`eval 'as_val=${'$as_ac_Header'}
32461		 $as_echo "$as_val"'`
32462	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
32463$as_echo "$ac_res" >&6; }
32464
32465fi
32466as_val=`eval 'as_val=${'$as_ac_Header'}
32467		 $as_echo "$as_val"'`
32468   if test "x$as_val" = x""yes; then
32469  cat >>confdefs.h <<_ACEOF
32470#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
32471_ACEOF
32472 ALSA_FOUND=yes
32473	                      ALSA_CFLAGS=-Iignoreme
32474	                      ALSA_LIBS=-lasound
32475	                      DEFAULT_ALSA=yes
32476else
32477  ALSA_FOUND=no
32478fi
32479
32480done
32481
32482	fi
32483	if test "x$ALSA_FOUND" = xno; then
32484
32485    # Print a helpful message on how to acquire the necessary build dependency.
32486    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32487    MISSING_DEPENDENCY=alsa
32488    PKGHANDLER_COMMAND=
32489
32490    case $PKGHANDLER in
32491	apt-get)
32492                apt_help     $MISSING_DEPENDENCY ;;
32493    yum)
32494                yum_help     $MISSING_DEPENDENCY ;;
32495	port)
32496                port_help    $MISSING_DEPENDENCY ;;
32497	pkgutil)
32498                pkgutil_help $MISSING_DEPENDENCY ;;
32499	pkgadd)
32500                pkgadd_help  $MISSING_DEPENDENCY ;;
32501    * )
32502      break ;;
32503    esac
32504
32505    if test "x$PKGHANDLER_COMMAND" != x; then
32506        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32507    fi
32508
32509	    { { $as_echo "$as_me:$LINENO: error: Could not find alsa! $HELP_MSG " >&5
32510$as_echo "$as_me: error: Could not find alsa! $HELP_MSG " >&2;}
32511   { (exit 1); exit 1; }; }
32512	fi
32513fi
32514
32515
32516
32517
32518
32519
32520
32521###############################################################################
32522#
32523# Check for the jpeg library
32524#
32525
32526USE_EXTERNAL_LIBJPEG=true
32527
32528{ $as_echo "$as_me:$LINENO: checking for main in -ljpeg" >&5
32529$as_echo_n "checking for main in -ljpeg... " >&6; }
32530if test "${ac_cv_lib_jpeg_main+set}" = set; then
32531  $as_echo_n "(cached) " >&6
32532else
32533  ac_check_lib_save_LIBS=$LIBS
32534LIBS="-ljpeg  $LIBS"
32535cat >conftest.$ac_ext <<_ACEOF
32536/* confdefs.h.  */
32537_ACEOF
32538cat confdefs.h >>conftest.$ac_ext
32539cat >>conftest.$ac_ext <<_ACEOF
32540/* end confdefs.h.  */
32541
32542
32543int
32544main ()
32545{
32546return main ();
32547  ;
32548  return 0;
32549}
32550_ACEOF
32551rm -f conftest.$ac_objext conftest$ac_exeext
32552if { (ac_try="$ac_link"
32553case "(($ac_try" in
32554  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32555  *) ac_try_echo=$ac_try;;
32556esac
32557eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32558$as_echo "$ac_try_echo") >&5
32559  (eval "$ac_link") 2>conftest.er1
32560  ac_status=$?
32561  grep -v '^ *+' conftest.er1 >conftest.err
32562  rm -f conftest.er1
32563  cat conftest.err >&5
32564  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32565  (exit $ac_status); } && {
32566	 test -z "$ac_cxx_werror_flag" ||
32567	 test ! -s conftest.err
32568       } && test -s conftest$ac_exeext && {
32569	 test "$cross_compiling" = yes ||
32570	 $as_test_x conftest$ac_exeext
32571       }; then
32572  ac_cv_lib_jpeg_main=yes
32573else
32574  $as_echo "$as_me: failed program was:" >&5
32575sed 's/^/| /' conftest.$ac_ext >&5
32576
32577	ac_cv_lib_jpeg_main=no
32578fi
32579
32580rm -rf conftest.dSYM
32581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32582      conftest$ac_exeext conftest.$ac_ext
32583LIBS=$ac_check_lib_save_LIBS
32584fi
32585{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_main" >&5
32586$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32587if test "x$ac_cv_lib_jpeg_main" = x""yes; then
32588  cat >>confdefs.h <<_ACEOF
32589#define HAVE_LIBJPEG 1
32590_ACEOF
32591
32592  LIBS="-ljpeg $LIBS"
32593
32594else
32595   USE_EXTERNAL_LIBJPEG=false
32596               { $as_echo "$as_me:$LINENO: Will use jpeg decoder bundled with the OpenJDK source" >&5
32597$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32598
32599fi
32600
32601
32602
32603###############################################################################
32604#
32605# Check for the gif library
32606#
32607
32608USE_EXTERNAL_LIBJPEG=true
32609
32610{ $as_echo "$as_me:$LINENO: checking for main in -lgif" >&5
32611$as_echo_n "checking for main in -lgif... " >&6; }
32612if test "${ac_cv_lib_gif_main+set}" = set; then
32613  $as_echo_n "(cached) " >&6
32614else
32615  ac_check_lib_save_LIBS=$LIBS
32616LIBS="-lgif  $LIBS"
32617cat >conftest.$ac_ext <<_ACEOF
32618/* confdefs.h.  */
32619_ACEOF
32620cat confdefs.h >>conftest.$ac_ext
32621cat >>conftest.$ac_ext <<_ACEOF
32622/* end confdefs.h.  */
32623
32624
32625int
32626main ()
32627{
32628return main ();
32629  ;
32630  return 0;
32631}
32632_ACEOF
32633rm -f conftest.$ac_objext conftest$ac_exeext
32634if { (ac_try="$ac_link"
32635case "(($ac_try" in
32636  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32637  *) ac_try_echo=$ac_try;;
32638esac
32639eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32640$as_echo "$ac_try_echo") >&5
32641  (eval "$ac_link") 2>conftest.er1
32642  ac_status=$?
32643  grep -v '^ *+' conftest.er1 >conftest.err
32644  rm -f conftest.er1
32645  cat conftest.err >&5
32646  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32647  (exit $ac_status); } && {
32648	 test -z "$ac_cxx_werror_flag" ||
32649	 test ! -s conftest.err
32650       } && test -s conftest$ac_exeext && {
32651	 test "$cross_compiling" = yes ||
32652	 $as_test_x conftest$ac_exeext
32653       }; then
32654  ac_cv_lib_gif_main=yes
32655else
32656  $as_echo "$as_me: failed program was:" >&5
32657sed 's/^/| /' conftest.$ac_ext >&5
32658
32659	ac_cv_lib_gif_main=no
32660fi
32661
32662rm -rf conftest.dSYM
32663rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32664      conftest$ac_exeext conftest.$ac_ext
32665LIBS=$ac_check_lib_save_LIBS
32666fi
32667{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gif_main" >&5
32668$as_echo "$ac_cv_lib_gif_main" >&6; }
32669if test "x$ac_cv_lib_gif_main" = x""yes; then
32670  cat >>confdefs.h <<_ACEOF
32671#define HAVE_LIBGIF 1
32672_ACEOF
32673
32674  LIBS="-lgif $LIBS"
32675
32676else
32677   USE_EXTERNAL_LIBGIF=false
32678               { $as_echo "$as_me:$LINENO: Will use gif decoder bundled with the OpenJDK source" >&5
32679$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
32680
32681fi
32682
32683
32684
32685###############################################################################
32686#
32687# Check for the zlib library
32688#
32689
32690
32691# Check whether --with-zlib was given.
32692if test "${with_zlib+set}" = set; then
32693  withval=$with_zlib;
32694fi
32695
32696
32697{ $as_echo "$as_me:$LINENO: checking for compress in -lz" >&5
32698$as_echo_n "checking for compress in -lz... " >&6; }
32699if test "${ac_cv_lib_z_compress+set}" = set; then
32700  $as_echo_n "(cached) " >&6
32701else
32702  ac_check_lib_save_LIBS=$LIBS
32703LIBS="-lz  $LIBS"
32704cat >conftest.$ac_ext <<_ACEOF
32705/* confdefs.h.  */
32706_ACEOF
32707cat confdefs.h >>conftest.$ac_ext
32708cat >>conftest.$ac_ext <<_ACEOF
32709/* end confdefs.h.  */
32710
32711/* Override any GCC internal prototype to avoid an error.
32712   Use char because int might match the return type of a GCC
32713   builtin and then its argument prototype would still apply.  */
32714#ifdef __cplusplus
32715extern "C"
32716#endif
32717char compress ();
32718int
32719main ()
32720{
32721return compress ();
32722  ;
32723  return 0;
32724}
32725_ACEOF
32726rm -f conftest.$ac_objext conftest$ac_exeext
32727if { (ac_try="$ac_link"
32728case "(($ac_try" in
32729  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32730  *) ac_try_echo=$ac_try;;
32731esac
32732eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32733$as_echo "$ac_try_echo") >&5
32734  (eval "$ac_link") 2>conftest.er1
32735  ac_status=$?
32736  grep -v '^ *+' conftest.er1 >conftest.err
32737  rm -f conftest.er1
32738  cat conftest.err >&5
32739  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32740  (exit $ac_status); } && {
32741	 test -z "$ac_cxx_werror_flag" ||
32742	 test ! -s conftest.err
32743       } && test -s conftest$ac_exeext && {
32744	 test "$cross_compiling" = yes ||
32745	 $as_test_x conftest$ac_exeext
32746       }; then
32747  ac_cv_lib_z_compress=yes
32748else
32749  $as_echo "$as_me: failed program was:" >&5
32750sed 's/^/| /' conftest.$ac_ext >&5
32751
32752	ac_cv_lib_z_compress=no
32753fi
32754
32755rm -rf conftest.dSYM
32756rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32757      conftest$ac_exeext conftest.$ac_ext
32758LIBS=$ac_check_lib_save_LIBS
32759fi
32760{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5
32761$as_echo "$ac_cv_lib_z_compress" >&6; }
32762if test "x$ac_cv_lib_z_compress" = x""yes; then
32763   ZLIB_FOUND=yes
32764else
32765   ZLIB_FOUND=no
32766fi
32767
32768
32769{ $as_echo "$as_me:$LINENO: checking for which zlib to use" >&5
32770$as_echo_n "checking for which zlib to use... " >&6; }
32771
32772DEFAULT_ZLIB=bundled
32773if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32774#
32775# On macosx default is system...on others default is
32776#
32777    DEFAULT_ZLIB=system
32778fi
32779
32780if test "x${ZLIB_FOUND}" != "xyes"; then
32781#
32782# If we don't find any system...set default to bundled
32783#
32784    DEFAULT_ZLIB=bundled
32785fi
32786
32787#
32788# If user didn't specify, use DEFAULT_ZLIB
32789#
32790if test "x${with_zlib}" = "x"; then
32791    with_zlib=${DEFAULT_ZLIB}
32792fi
32793
32794if test "x${with_zlib}" = "xbundled"; then
32795    USE_EXTERNAL_LIBZ=false
32796    { $as_echo "$as_me:$LINENO: result: bundled" >&5
32797$as_echo "bundled" >&6; }
32798elif test "x${with_zlib}" = "xsystem"; then
32799    if test "x${ZLIB_FOUND}" = "xyes"; then
32800        USE_EXTERNAL_LIBZ=true
32801        { $as_echo "$as_me:$LINENO: result: system" >&5
32802$as_echo "system" >&6; }
32803    else
32804        { $as_echo "$as_me:$LINENO: result: system not found" >&5
32805$as_echo "system not found" >&6; }
32806        { { $as_echo "$as_me:$LINENO: error: --with-zlib=system specified, but no zlib found!" >&5
32807$as_echo "$as_me: error: --with-zlib=system specified, but no zlib found!" >&2;}
32808   { (exit 1); exit 1; }; }
32809    fi
32810else
32811    { { $as_echo "$as_me:$LINENO: error: Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" >&5
32812$as_echo "$as_me: error: Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" >&2;}
32813   { (exit 1); exit 1; }; }
32814fi
32815
32816
32817
32818###############################################################################
32819LIBZIP_CAN_USE_MMAP=true
32820
32821
32822
32823###############################################################################
32824#
32825# Check if altzone exists in time.h
32826#
32827
32828cat >conftest.$ac_ext <<_ACEOF
32829/* confdefs.h.  */
32830_ACEOF
32831cat confdefs.h >>conftest.$ac_ext
32832cat >>conftest.$ac_ext <<_ACEOF
32833/* end confdefs.h.  */
32834#include <time.h>
32835int
32836main ()
32837{
32838return (int)altzone;
32839  ;
32840  return 0;
32841}
32842_ACEOF
32843rm -f conftest.$ac_objext conftest$ac_exeext
32844if { (ac_try="$ac_link"
32845case "(($ac_try" in
32846  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32847  *) ac_try_echo=$ac_try;;
32848esac
32849eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32850$as_echo "$ac_try_echo") >&5
32851  (eval "$ac_link") 2>conftest.er1
32852  ac_status=$?
32853  grep -v '^ *+' conftest.er1 >conftest.err
32854  rm -f conftest.er1
32855  cat conftest.err >&5
32856  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32857  (exit $ac_status); } && {
32858	 test -z "$ac_cxx_werror_flag" ||
32859	 test ! -s conftest.err
32860       } && test -s conftest$ac_exeext && {
32861	 test "$cross_compiling" = yes ||
32862	 $as_test_x conftest$ac_exeext
32863       }; then
32864  has_altzone=yes
32865else
32866  $as_echo "$as_me: failed program was:" >&5
32867sed 's/^/| /' conftest.$ac_ext >&5
32868
32869	has_altzone=no
32870fi
32871
32872rm -rf conftest.dSYM
32873rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32874      conftest$ac_exeext conftest.$ac_ext
32875if test "x$has_altzone" = xyes; then
32876
32877cat >>confdefs.h <<\_ACEOF
32878#define HAVE_ALTZONE 1
32879_ACEOF
32880
32881fi
32882
32883###############################################################################
32884#
32885# Check the maths library
32886#
32887
32888
32889{ $as_echo "$as_me:$LINENO: checking for cos in -lm" >&5
32890$as_echo_n "checking for cos in -lm... " >&6; }
32891if test "${ac_cv_lib_m_cos+set}" = set; then
32892  $as_echo_n "(cached) " >&6
32893else
32894  ac_check_lib_save_LIBS=$LIBS
32895LIBS="-lm  $LIBS"
32896cat >conftest.$ac_ext <<_ACEOF
32897/* confdefs.h.  */
32898_ACEOF
32899cat confdefs.h >>conftest.$ac_ext
32900cat >>conftest.$ac_ext <<_ACEOF
32901/* end confdefs.h.  */
32902
32903/* Override any GCC internal prototype to avoid an error.
32904   Use char because int might match the return type of a GCC
32905   builtin and then its argument prototype would still apply.  */
32906#ifdef __cplusplus
32907extern "C"
32908#endif
32909char cos ();
32910int
32911main ()
32912{
32913return cos ();
32914  ;
32915  return 0;
32916}
32917_ACEOF
32918rm -f conftest.$ac_objext conftest$ac_exeext
32919if { (ac_try="$ac_link"
32920case "(($ac_try" in
32921  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32922  *) ac_try_echo=$ac_try;;
32923esac
32924eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
32925$as_echo "$ac_try_echo") >&5
32926  (eval "$ac_link") 2>conftest.er1
32927  ac_status=$?
32928  grep -v '^ *+' conftest.er1 >conftest.err
32929  rm -f conftest.er1
32930  cat conftest.err >&5
32931  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32932  (exit $ac_status); } && {
32933	 test -z "$ac_cxx_werror_flag" ||
32934	 test ! -s conftest.err
32935       } && test -s conftest$ac_exeext && {
32936	 test "$cross_compiling" = yes ||
32937	 $as_test_x conftest$ac_exeext
32938       }; then
32939  ac_cv_lib_m_cos=yes
32940else
32941  $as_echo "$as_me: failed program was:" >&5
32942sed 's/^/| /' conftest.$ac_ext >&5
32943
32944	ac_cv_lib_m_cos=no
32945fi
32946
32947rm -rf conftest.dSYM
32948rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
32949      conftest$ac_exeext conftest.$ac_ext
32950LIBS=$ac_check_lib_save_LIBS
32951fi
32952{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5
32953$as_echo "$ac_cv_lib_m_cos" >&6; }
32954if test "x$ac_cv_lib_m_cos" = x""yes; then
32955  cat >>confdefs.h <<_ACEOF
32956#define HAVE_LIBM 1
32957_ACEOF
32958
32959  LIBS="-lm $LIBS"
32960
32961else
32962
32963                  { $as_echo "$as_me:$LINENO: Maths library was not found" >&5
32964$as_echo "$as_me: Maths library was not found" >&6;}
32965
32966fi
32967
32968
32969
32970###############################################################################
32971#
32972# Check for libdl.so
32973
32974save_LIBS="$LIBS"
32975LIBS=""
32976
32977{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
32978$as_echo_n "checking for dlopen in -ldl... " >&6; }
32979if test "${ac_cv_lib_dl_dlopen+set}" = set; then
32980  $as_echo_n "(cached) " >&6
32981else
32982  ac_check_lib_save_LIBS=$LIBS
32983LIBS="-ldl  $LIBS"
32984cat >conftest.$ac_ext <<_ACEOF
32985/* confdefs.h.  */
32986_ACEOF
32987cat confdefs.h >>conftest.$ac_ext
32988cat >>conftest.$ac_ext <<_ACEOF
32989/* end confdefs.h.  */
32990
32991/* Override any GCC internal prototype to avoid an error.
32992   Use char because int might match the return type of a GCC
32993   builtin and then its argument prototype would still apply.  */
32994#ifdef __cplusplus
32995extern "C"
32996#endif
32997char dlopen ();
32998int
32999main ()
33000{
33001return dlopen ();
33002  ;
33003  return 0;
33004}
33005_ACEOF
33006rm -f conftest.$ac_objext conftest$ac_exeext
33007if { (ac_try="$ac_link"
33008case "(($ac_try" in
33009  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33010  *) ac_try_echo=$ac_try;;
33011esac
33012eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
33013$as_echo "$ac_try_echo") >&5
33014  (eval "$ac_link") 2>conftest.er1
33015  ac_status=$?
33016  grep -v '^ *+' conftest.er1 >conftest.err
33017  rm -f conftest.er1
33018  cat conftest.err >&5
33019  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33020  (exit $ac_status); } && {
33021	 test -z "$ac_cxx_werror_flag" ||
33022	 test ! -s conftest.err
33023       } && test -s conftest$ac_exeext && {
33024	 test "$cross_compiling" = yes ||
33025	 $as_test_x conftest$ac_exeext
33026       }; then
33027  ac_cv_lib_dl_dlopen=yes
33028else
33029  $as_echo "$as_me: failed program was:" >&5
33030sed 's/^/| /' conftest.$ac_ext >&5
33031
33032	ac_cv_lib_dl_dlopen=no
33033fi
33034
33035rm -rf conftest.dSYM
33036rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
33037      conftest$ac_exeext conftest.$ac_ext
33038LIBS=$ac_check_lib_save_LIBS
33039fi
33040{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
33041$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
33042if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
33043  cat >>confdefs.h <<_ACEOF
33044#define HAVE_LIBDL 1
33045_ACEOF
33046
33047  LIBS="-ldl $LIBS"
33048
33049fi
33050
33051LIBDL="$LIBS"
33052
33053LIBS="$save_LIBS"
33054
33055
33056
33057###############################################################################
33058#
33059# statically link libstdc++ before C++ ABI is stablized on Linux unless
33060# dynamic build is configured on command line.
33061#
33062
33063# Check whether --with-stdc++lib was given.
33064if test "${with_stdc++lib+set}" = set; then
33065  withval=$with_stdc++lib;
33066    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
33067        && test "x$with_stdc__lib" != xdefault; then
33068      { { $as_echo "$as_me:$LINENO: error: Bad parameter value --with-stdc++lib=$with_stdc__lib!" >&5
33069$as_echo "$as_me: error: Bad parameter value --with-stdc++lib=$with_stdc__lib!" >&2;}
33070   { (exit 1); exit 1; }; }
33071    fi
33072
33073else
33074  with_stdc__lib=default
33075
33076fi
33077
33078
33079if test "x$OPENJDK_TARGET_OS" = xlinux; then
33080    # Test if -lstdc++ works.
33081    { $as_echo "$as_me:$LINENO: checking if dynamic link of stdc++ is possible" >&5
33082$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
33083    ac_ext=cpp
33084ac_cpp='$CXXCPP $CPPFLAGS'
33085ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33086ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33087ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33088
33089    OLD_CXXFLAGS="$CXXFLAGS"
33090    CXXFLAGS="$CXXFLAGS -lstdc++"
33091    cat >conftest.$ac_ext <<_ACEOF
33092/* confdefs.h.  */
33093_ACEOF
33094cat confdefs.h >>conftest.$ac_ext
33095cat >>conftest.$ac_ext <<_ACEOF
33096/* end confdefs.h.  */
33097
33098int
33099main ()
33100{
33101return 0;
33102  ;
33103  return 0;
33104}
33105_ACEOF
33106rm -f conftest.$ac_objext conftest$ac_exeext
33107if { (ac_try="$ac_link"
33108case "(($ac_try" in
33109  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33110  *) ac_try_echo=$ac_try;;
33111esac
33112eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
33113$as_echo "$ac_try_echo") >&5
33114  (eval "$ac_link") 2>conftest.er1
33115  ac_status=$?
33116  grep -v '^ *+' conftest.er1 >conftest.err
33117  rm -f conftest.er1
33118  cat conftest.err >&5
33119  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33120  (exit $ac_status); } && {
33121	 test -z "$ac_cxx_werror_flag" ||
33122	 test ! -s conftest.err
33123       } && test -s conftest$ac_exeext && {
33124	 test "$cross_compiling" = yes ||
33125	 $as_test_x conftest$ac_exeext
33126       }; then
33127  has_dynamic_libstdcxx=yes
33128else
33129  $as_echo "$as_me: failed program was:" >&5
33130sed 's/^/| /' conftest.$ac_ext >&5
33131
33132	has_dynamic_libstdcxx=no
33133fi
33134
33135rm -rf conftest.dSYM
33136rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
33137      conftest$ac_exeext conftest.$ac_ext
33138    CXXFLAGS="$OLD_CXXFLAGS"
33139    ac_ext=cpp
33140ac_cpp='$CXXCPP $CPPFLAGS'
33141ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33142ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33143ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33144
33145    { $as_echo "$as_me:$LINENO: result: $has_dynamic_libstdcxx" >&5
33146$as_echo "$has_dynamic_libstdcxx" >&6; }
33147
33148    # Test if stdc++ can be linked statically.
33149    { $as_echo "$as_me:$LINENO: checking if static link of stdc++ is possible" >&5
33150$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
33151    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
33152    ac_ext=cpp
33153ac_cpp='$CXXCPP $CPPFLAGS'
33154ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33155ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33156ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33157
33158    OLD_LIBS="$LIBS"
33159    OLD_CXX="$CXX"
33160    LIBS="$STATIC_STDCXX_FLAGS"
33161    CXX="$CC"
33162    cat >conftest.$ac_ext <<_ACEOF
33163/* confdefs.h.  */
33164_ACEOF
33165cat confdefs.h >>conftest.$ac_ext
33166cat >>conftest.$ac_ext <<_ACEOF
33167/* end confdefs.h.  */
33168
33169int
33170main ()
33171{
33172return 0;
33173  ;
33174  return 0;
33175}
33176_ACEOF
33177rm -f conftest.$ac_objext conftest$ac_exeext
33178if { (ac_try="$ac_link"
33179case "(($ac_try" in
33180  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33181  *) ac_try_echo=$ac_try;;
33182esac
33183eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
33184$as_echo "$ac_try_echo") >&5
33185  (eval "$ac_link") 2>conftest.er1
33186  ac_status=$?
33187  grep -v '^ *+' conftest.er1 >conftest.err
33188  rm -f conftest.er1
33189  cat conftest.err >&5
33190  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33191  (exit $ac_status); } && {
33192	 test -z "$ac_cxx_werror_flag" ||
33193	 test ! -s conftest.err
33194       } && test -s conftest$ac_exeext && {
33195	 test "$cross_compiling" = yes ||
33196	 $as_test_x conftest$ac_exeext
33197       }; then
33198  has_static_libstdcxx=yes
33199else
33200  $as_echo "$as_me: failed program was:" >&5
33201sed 's/^/| /' conftest.$ac_ext >&5
33202
33203	has_static_libstdcxx=no
33204fi
33205
33206rm -rf conftest.dSYM
33207rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
33208      conftest$ac_exeext conftest.$ac_ext
33209    LIBS="$OLD_LIBS"
33210    CXX="$OLD_CXX"
33211    ac_ext=cpp
33212ac_cpp='$CXXCPP $CPPFLAGS'
33213ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33214ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33215ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33216
33217    { $as_echo "$as_me:$LINENO: result: $has_static_libstdcxx" >&5
33218$as_echo "$has_static_libstdcxx" >&6; }
33219
33220    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
33221        { { $as_echo "$as_me:$LINENO: error: Cannot link to stdc++, neither dynamically nor statically!" >&5
33222$as_echo "$as_me: error: Cannot link to stdc++, neither dynamically nor statically!" >&2;}
33223   { (exit 1); exit 1; }; }
33224    fi
33225
33226    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
33227        { { $as_echo "$as_me:$LINENO: error: Static linking of libstdc++ was not possible!" >&5
33228$as_echo "$as_me: error: Static linking of libstdc++ was not possible!" >&2;}
33229   { (exit 1); exit 1; }; }
33230    fi
33231
33232    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
33233        { { $as_echo "$as_me:$LINENO: error: Dynamic linking of libstdc++ was not possible!" >&5
33234$as_echo "$as_me: error: Dynamic linking of libstdc++ was not possible!" >&2;}
33235   { (exit 1); exit 1; }; }
33236    fi
33237
33238    { $as_echo "$as_me:$LINENO: checking how to link with libstdc++" >&5
33239$as_echo_n "checking how to link with libstdc++... " >&6; }
33240    # If dynamic was requested, it's available since it would fail above otherwise.
33241    # If dynamic wasn't requested, go with static unless it isn't available.
33242    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
33243        LIBCXX="$LIBCXX -lstdc++"
33244        LDCXX="$CXX"
33245        STATIC_CXX_SETTING="STATIC_CXX=false"
33246        { $as_echo "$as_me:$LINENO: result: dynamic" >&5
33247$as_echo "dynamic" >&6; }
33248    else
33249        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
33250        LDCXX="$CC"
33251        STATIC_CXX_SETTING="STATIC_CXX=true"
33252        { $as_echo "$as_me:$LINENO: result: static" >&5
33253$as_echo "static" >&6; }
33254    fi
33255fi
33256
33257
33258# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
33259if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
33260    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
33261fi
33262
33263# TODO better (platform agnostic) test
33264if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
33265    LIBCXX="-lstdc++"
33266fi
33267
33268
33269
33270
33271
33272# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
33273
33274# When using cygwin or msys, we need a wrapper binary that renames
33275# /cygdrive/c/ arguments into c:/ arguments and peeks into
33276# @files and rewrites these too! This wrapper binary is
33277# called fixpath.
33278FIXPATH=
33279if test "x$OPENJDK_BUILD_OS" = xwindows; then
33280    { $as_echo "$as_me:$LINENO: checking if fixpath can be created" >&5
33281$as_echo_n "checking if fixpath can be created... " >&6; }
33282    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
33283    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
33284    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
33285      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
33286      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
33287      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
33288      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
33289    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
33290      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
33291      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
33292
33293      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
33294      # @ was chosen as separator to minimize risk of other tools messing around with it
33295      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
33296      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
33297
33298      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
33299    fi
33300    rm -f $OUTPUT_ROOT/fixpath*
33301    cd $OUTPUT_ROOT
33302    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
33303    cd $CURDIR
33304
33305    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
33306        { $as_echo "$as_me:$LINENO: result: no" >&5
33307$as_echo "no" >&6; }
33308        cat $OUTPUT_ROOT/fixpath1.log
33309        { { $as_echo "$as_me:$LINENO: error: Could not create $OUTPUT_ROOT/fixpath.exe" >&5
33310$as_echo "$as_me: error: Could not create $OUTPUT_ROOT/fixpath.exe" >&2;}
33311   { (exit 1); exit 1; }; }
33312    fi
33313    { $as_echo "$as_me:$LINENO: result: yes" >&5
33314$as_echo "yes" >&6; }
33315    { $as_echo "$as_me:$LINENO: checking if fixpath.exe works" >&5
33316$as_echo_n "checking if fixpath.exe works... " >&6; }
33317    cd $OUTPUT_ROOT
33318    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
33319    cd $CURDIR
33320    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
33321        { $as_echo "$as_me:$LINENO: result: no" >&5
33322$as_echo "no" >&6; }
33323        cat $OUTPUT_ROOT/fixpath2.log
33324        { { $as_echo "$as_me:$LINENO: error: fixpath did not work!" >&5
33325$as_echo "$as_me: error: fixpath did not work!" >&2;}
33326   { (exit 1); exit 1; }; }
33327    fi
33328    { $as_echo "$as_me:$LINENO: result: yes" >&5
33329$as_echo "yes" >&6; }
33330    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
33331fi
33332
33333
33334
33335
33336###############################################################################
33337#
33338# We need to do some final tweaking, when everything else is done.
33339#
33340###############################################################################
33341
33342
33343HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
33344
33345
33346# The name of the Service Agent jar.
33347SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
33348if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
33349    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
33350fi
33351
33352
33353
33354
33355###############################################################################
33356#
33357# Configure parts of the build that only affect the build performance,
33358# not the result.
33359#
33360###############################################################################
33361
33362
33363# How many cores do we have on this build system?
33364
33365# Check whether --with-num-cores was given.
33366if test "${with_num_cores+set}" = set; then
33367  withval=$with_num_cores;
33368fi
33369
33370if test "x$with_num_cores" = x; then
33371    # The number of cores were not specified, try to probe them.
33372
33373    { $as_echo "$as_me:$LINENO: checking for number of cores" >&5
33374$as_echo_n "checking for number of cores... " >&6; }
33375    NUM_CORES=1
33376    FOUND_CORES=no
33377
33378    if test -f /proc/cpuinfo; then
33379        # Looks like a Linux (or cygwin) system
33380        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
33381        FOUND_CORES=yes
33382    elif test -x /usr/sbin/psrinfo; then
33383        # Looks like a Solaris system
33384        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
33385        FOUND_CORES=yes
33386    elif test -x /usr/sbin/system_profiler; then
33387        # Looks like a MacOSX system
33388        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
33389        FOUND_CORES=yes
33390    elif test -n "$NUMBER_OF_PROCESSORS"; then
33391        # On windows, look in the env
33392        NUM_CORES=$NUMBER_OF_PROCESSORS
33393        FOUND_CORES=yes
33394    fi
33395
33396    # For c/c++ code we run twice as many concurrent build
33397    # jobs than we have cores, otherwise we will stall on io.
33398    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
33399
33400    if test "x$FOUND_CORES" = xyes; then
33401        { $as_echo "$as_me:$LINENO: result: $NUM_CORES" >&5
33402$as_echo "$NUM_CORES" >&6; }
33403    else
33404        { $as_echo "$as_me:$LINENO: result: could not detect number of cores, defaulting to 1" >&5
33405$as_echo "could not detect number of cores, defaulting to 1" >&6; }
33406        { $as_echo "$as_me:$LINENO: WARNING: This will disable all parallelism from build!" >&5
33407$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
33408    fi
33409
33410
33411else
33412    NUM_CORES=$with_num_cores
33413    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
33414fi
33415
33416
33417
33418
33419# How much memory do we have on this build system?
33420
33421# Check whether --with-memory-size was given.
33422if test "${with_memory_size+set}" = set; then
33423  withval=$with_memory_size;
33424fi
33425
33426if test "x$with_memory_size" = x; then
33427    # The memory size was not specified, try to probe it.
33428
33429    { $as_echo "$as_me:$LINENO: checking for memory size" >&5
33430$as_echo_n "checking for memory size... " >&6; }
33431    # Default to 1024 MB
33432    MEMORY_SIZE=1024
33433    FOUND_MEM=no
33434
33435    if test -f /proc/meminfo; then
33436        # Looks like a Linux (or cygwin) system
33437        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33438        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33439        FOUND_MEM=yes
33440    elif test -x /usr/sbin/prtconf; then
33441        # Looks like a Solaris system
33442        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33443        FOUND_MEM=yes
33444    elif test -x /usr/sbin/system_profiler; then
33445        # Looks like a MacOSX system
33446        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33447        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33448        FOUND_MEM=yes
33449    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33450        # Windows, but without cygwin
33451        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33452        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33453        FOUND_MEM=yes
33454    fi
33455
33456    if test "x$FOUND_MEM" = xyes; then
33457        { $as_echo "$as_me:$LINENO: result: $MEMORY_SIZE MB" >&5
33458$as_echo "$MEMORY_SIZE MB" >&6; }
33459    else
33460        { $as_echo "$as_me:$LINENO: result: could not detect memory size, defaulting to 1024 MB" >&5
33461$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33462        { $as_echo "$as_me:$LINENO: WARNING: This might seriously impact build performance!" >&5
33463$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33464    fi
33465
33466else
33467    MEMORY_SIZE=$with_memory_size
33468fi
33469
33470
33471
33472# Setup smart javac (after cores and memory have been setup)
33473
33474
33475# Check whether --with-sjavac-server-java was given.
33476if test "${with_sjavac_server_java+set}" = set; then
33477  withval=$with_sjavac_server_java;
33478fi
33479
33480
33481if test "x$with_sjavac_server_java" != x; then
33482    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33483    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33484    if test "x$FOUND_VERSION" = x; then
33485        { { $as_echo "$as_me:$LINENO: error: Could not execute server java: $SJAVAC_SERVER_JAVA" >&5
33486$as_echo "$as_me: error: Could not execute server java: $SJAVAC_SERVER_JAVA" >&2;}
33487   { (exit 1); exit 1; }; }
33488    fi
33489else
33490    SJAVAC_SERVER_JAVA=""
33491    # Hotspot specific options.
33492
33493    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
33494    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
33495    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
33496    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
33497    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33498        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33499    fi
33500
33501    # JRockit specific options.
33502
33503    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
33504    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
33505    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
33506    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
33507    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33508        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33509    fi
33510
33511    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33512fi
33513
33514
33515
33516# Check whether --with-sjavac-server-cores was given.
33517if test "${with_sjavac_server_cores+set}" = set; then
33518  withval=$with_sjavac_server_cores;
33519fi
33520
33521if test "x$with_sjavac_server_cores" != x; then
33522    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
33523else
33524    if test "$NUM_CORES" -gt 16; then
33525        # We set this arbitrary limit because we want to limit the heap
33526        # size of the javac server.
33527        # In the future we will make the javac compilers in the server
33528        # share more and more state, thus enabling us to use more and
33529        # more concurrent threads in the server.
33530        SJAVAC_SERVER_CORES="16"
33531    else
33532        SJAVAC_SERVER_CORES="$NUM_CORES"
33533    fi
33534
33535    if test "$MEMORY_SIZE" -gt "17000"; then
33536        MAX_HEAP_MEM=10000
33537
33538    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33539    # If so, then append -d64 to SJAVAC_SERVER_JAVA
33540    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
33541    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
33542    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33543        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33544    fi
33545
33546
33547    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33548    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
33549    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
33550    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
33551    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33552        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33553    fi
33554
33555    elif test "$MEMORY_SIZE" -gt "10000"; then
33556        MAX_HEAP_MEM=6000
33557
33558    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33559    # If so, then append -d64 to SJAVAC_SERVER_JAVA
33560    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
33561    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
33562    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33563        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33564    fi
33565
33566
33567    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33568    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
33569    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
33570    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
33571    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33572        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33573    fi
33574
33575    elif test "$MEMORY_SIZE" -gt "5000"; then
33576        MAX_HEAP_MEM=3000
33577
33578    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33579    # If so, then append -d64 to SJAVAC_SERVER_JAVA
33580    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
33581    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
33582    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33583        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33584    fi
33585
33586
33587    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33588    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
33589    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
33590    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
33591    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33592        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33593    fi
33594
33595    elif test "$MEMORY_SIZE" -gt "3800"; then
33596        MAX_HEAP_MEM=2500
33597
33598    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33599    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
33600    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
33601    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
33602    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33603        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33604    fi
33605
33606    elif test "$MEMORY_SIZE" -gt "1900"; then
33607        MAX_HEAP_MEM=1200
33608
33609    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33610    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
33611    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
33612    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
33613    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33614        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
33615    fi
33616
33617    elif test "$MEMORY_SIZE" -gt "1000"; then
33618        MAX_HEAP_MEM=900
33619
33620    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33621    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
33622    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
33623    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
33624    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33625        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33626    fi
33627
33628    else
33629        MAX_HEAP_MEM=512
33630
33631    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33632    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
33633    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
33634    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
33635    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33636        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33637    fi
33638
33639    fi
33640
33641
33642    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33643    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
33644    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
33645    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
33646    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33647        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
33648    fi
33649
33650
33651    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33652    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
33653    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
33654    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
33655    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33656        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
33657    fi
33658
33659
33660    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
33661    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
33662    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
33663    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
33664    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33665        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
33666    fi
33667
33668
33669    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
33670    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
33671        { $as_echo "$as_me:$LINENO: checking if number of server cores must be reduced" >&5
33672$as_echo_n "checking if number of server cores must be reduced... " >&6; }
33673        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
33674        { $as_echo "$as_me:$LINENO: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
33675$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
33676    fi
33677fi
33678
33679
33680{ $as_echo "$as_me:$LINENO: checking whether to use sjavac" >&5
33681$as_echo_n "checking whether to use sjavac... " >&6; }
33682# Check whether --enable-sjavac was given.
33683if test "${enable_sjavac+set}" = set; then
33684  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33685else
33686  ENABLE_SJAVAC='no'
33687fi
33688
33689{ $as_echo "$as_me:$LINENO: result: $ENABLE_SJAVAC" >&5
33690$as_echo "$ENABLE_SJAVAC" >&6; }
33691
33692
33693if test "x$ENABLE_SJAVAC" = xyes; then
33694    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33695else
33696    SJAVAC_SERVER_DIR=
33697fi
33698
33699
33700
33701
33702# Can the C/C++ compiler use precompiled headers?
33703
33704
33705###############################################################################
33706#
33707# Can the C/C++ compiler use precompiled headers?
33708#
33709# Check whether --enable-precompiled-headers was given.
33710if test "${enable_precompiled_headers+set}" = set; then
33711  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33712else
33713  ENABLE_PRECOMPH=yes
33714fi
33715
33716
33717USE_PRECOMPILED_HEADER=1
33718if test "x$ENABLE_PRECOMPH" = xno; then
33719    USE_PRECOMPILED_HEADER=0
33720fi
33721
33722if test "x$ENABLE_PRECOMPH" = xyes; then
33723    # Check that the compiler actually supports precomp headers.
33724    if test "x$GCC" = xyes; then
33725         { $as_echo "$as_me:$LINENO: checking that precompiled headers work" >&5
33726$as_echo_n "checking that precompiled headers work... " >&6; }
33727         echo "int alfa();" > conftest.h
33728         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33729         if test ! -f conftest.hpp.gch; then
33730             USE_PRECOMPILED_HEADER=0
33731             { $as_echo "$as_me:$LINENO: result: no" >&5
33732$as_echo "no" >&6; }
33733         else
33734             { $as_echo "$as_me:$LINENO: result: yes" >&5
33735$as_echo "yes" >&6; }
33736         fi
33737         rm -f conftest.h conftest.hpp.gch
33738    fi
33739fi
33740
33741
33742
33743
33744# Setup use of ccache, if available
33745
33746    # Check whether --enable-ccache was given.
33747if test "${enable_ccache+set}" = set; then
33748  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33749else
33750  ENABLE_CCACHE=yes
33751fi
33752
33753    if test "x$ENABLE_CCACHE" = xyes; then
33754        # Extract the first word of "ccache", so it can be a program name with args.
33755set dummy ccache; ac_word=$2
33756{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
33757$as_echo_n "checking for $ac_word... " >&6; }
33758if test "${ac_cv_path_CCACHE+set}" = set; then
33759  $as_echo_n "(cached) " >&6
33760else
33761  case $CCACHE in
33762  [\\/]* | ?:[\\/]*)
33763  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33764  ;;
33765  *)
33766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33767for as_dir in $PATH
33768do
33769  IFS=$as_save_IFS
33770  test -z "$as_dir" && as_dir=.
33771  for ac_exec_ext in '' $ac_executable_extensions; do
33772  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33773    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33774    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
33775    break 2
33776  fi
33777done
33778done
33779IFS=$as_save_IFS
33780
33781  ;;
33782esac
33783fi
33784CCACHE=$ac_cv_path_CCACHE
33785if test -n "$CCACHE"; then
33786  { $as_echo "$as_me:$LINENO: result: $CCACHE" >&5
33787$as_echo "$CCACHE" >&6; }
33788else
33789  { $as_echo "$as_me:$LINENO: result: no" >&5
33790$as_echo "no" >&6; }
33791fi
33792
33793
33794    else
33795        { $as_echo "$as_me:$LINENO: checking for ccache" >&5
33796$as_echo_n "checking for ccache... " >&6; }
33797        { $as_echo "$as_me:$LINENO: result: explicitly disabled" >&5
33798$as_echo "explicitly disabled" >&6; }
33799        CCACHE=
33800    fi
33801
33802
33803
33804# Check whether --with-ccache-dir was given.
33805if test "${with_ccache_dir+set}" = set; then
33806  withval=$with_ccache_dir;
33807fi
33808
33809
33810    if test "x$with_ccache_dir" != x; then
33811        # When using a non home ccache directory, assume the use is to share ccache files
33812        # with other users. Thus change the umask.
33813        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33814    fi
33815    CCACHE_FOUND=""
33816    if test "x$CCACHE" != x; then
33817
33818    if test "x$CCACHE" != x; then
33819        CCACHE_FOUND="true"
33820        # Only use ccache if it is 3.1.4 or later, which supports
33821        # precompiled headers.
33822        { $as_echo "$as_me:$LINENO: checking if ccache supports precompiled headers" >&5
33823$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33824        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33825        if test "x$HAS_GOOD_CCACHE" = x; then
33826            { $as_echo "$as_me:$LINENO: result: no, disabling ccache" >&5
33827$as_echo "no, disabling ccache" >&6; }
33828            CCACHE=
33829        else
33830            { $as_echo "$as_me:$LINENO: result: yes" >&5
33831$as_echo "yes" >&6; }
33832            { $as_echo "$as_me:$LINENO: checking if C-compiler supports ccache precompiled headers" >&5
33833$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33834            PUSHED_FLAGS="$CXXFLAGS"
33835            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33836            cat >conftest.$ac_ext <<_ACEOF
33837/* confdefs.h.  */
33838_ACEOF
33839cat confdefs.h >>conftest.$ac_ext
33840cat >>conftest.$ac_ext <<_ACEOF
33841/* end confdefs.h.  */
33842
33843int
33844main ()
33845{
33846
33847  ;
33848  return 0;
33849}
33850_ACEOF
33851rm -f conftest.$ac_objext
33852if { (ac_try="$ac_compile"
33853case "(($ac_try" in
33854  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33855  *) ac_try_echo=$ac_try;;
33856esac
33857eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
33858$as_echo "$ac_try_echo") >&5
33859  (eval "$ac_compile") 2>conftest.er1
33860  ac_status=$?
33861  grep -v '^ *+' conftest.er1 >conftest.err
33862  rm -f conftest.er1
33863  cat conftest.err >&5
33864  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33865  (exit $ac_status); } && {
33866	 test -z "$ac_cxx_werror_flag" ||
33867	 test ! -s conftest.err
33868       } && test -s conftest.$ac_objext; then
33869  CC_KNOWS_CCACHE_TRICK=yes
33870else
33871  $as_echo "$as_me: failed program was:" >&5
33872sed 's/^/| /' conftest.$ac_ext >&5
33873
33874	CC_KNOWS_CCACHE_TRICK=no
33875fi
33876
33877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33878            CXXFLAGS="$PUSHED_FLAGS"
33879            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33880                { $as_echo "$as_me:$LINENO: result: yes" >&5
33881$as_echo "yes" >&6; }
33882            else
33883                { $as_echo "$as_me:$LINENO: result: no, disabling ccaching of precompiled headers" >&5
33884$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33885                CCACHE=
33886            fi
33887        fi
33888    fi
33889
33890    if test "x$CCACHE" != x; then
33891        CCACHE_SLOPPINESS=time_macros
33892        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33893        CCACHE_FLAGS=-fpch-preprocess
33894
33895        if test "x$SET_CCACHE_DIR" != x; then
33896            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33897	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33898        fi
33899    fi
33900
33901    fi
33902
33903
33904###############################################################################
33905#
33906# And now the finish...
33907#
33908###############################################################################
33909
33910# Check for some common pitfalls
33911
33912
33913{ $as_echo "$as_me:$LINENO: checking if build directory is on local disk" >&5
33914$as_echo_n "checking if build directory is on local disk... " >&6; }
33915
33916	# df -l lists only local disks; if the given directory is not found then
33917	# a non-zero exit code is given
33918  if test "x$DF" = x; then
33919    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33920      # msys does not have df; use Windows "net use" instead.
33921      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33922      if test "x$IS_NETWORK_DISK" = x; then
33923        OUTPUT_DIR_IS_LOCAL="yes"
33924      else
33925        OUTPUT_DIR_IS_LOCAL="no"
33926      fi
33927    else
33928      # No df here, say it's local
33929      OUTPUT_DIR_IS_LOCAL="yes"
33930    fi
33931  else
33932    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33933      OUTPUT_DIR_IS_LOCAL="yes"
33934    else
33935      OUTPUT_DIR_IS_LOCAL="no"
33936    fi
33937  fi
33938
33939{ $as_echo "$as_me:$LINENO: result: $OUTPUT_DIR_IS_LOCAL" >&5
33940$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33941
33942# Check if the user has any old-style ALT_ variables set.
33943FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33944
33945# Before generating output files, test if they exist. If they do, this is a reconfigure.
33946# Since we can't properly handle the dependencies for this, warn the user about the situation
33947if test -e $OUTPUT_ROOT/spec.gmk; then
33948  IS_RECONFIGURE=yes
33949else
33950  IS_RECONFIGURE=no
33951fi
33952
33953if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33954  HIDE_PERFORMANCE_HINTS=yes
33955else
33956  HIDE_PERFORMANCE_HINTS=no
33957  # Hide it the next time around...
33958  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33959fi
33960
33961
33962
33963# At the end, call the custom hook. (Dummy macro if no custom sources available)
33964
33965
33966# We're messing a bit with internal autoconf variables to put the config.status
33967# in the output directory instead of the current directory.
33968CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33969# Create the actual output files. Now the main work of configure is done.
33970cat >confcache <<\_ACEOF
33971# This file is a shell script that caches the results of configure
33972# tests run on this system so they can be shared between configure
33973# scripts and configure runs, see configure's option --config-cache.
33974# It is not useful on other systems.  If it contains results you don't
33975# want to keep, you may remove or edit it.
33976#
33977# config.status only pays attention to the cache file if you give it
33978# the --recheck option to rerun configure.
33979#
33980# `ac_cv_env_foo' variables (set or unset) will be overridden when
33981# loading this file, other *unset* `ac_cv_foo' will be assigned the
33982# following values.
33983
33984_ACEOF
33985
33986# The following way of writing the cache mishandles newlines in values,
33987# but we know of no workaround that is simple, portable, and efficient.
33988# So, we kill variables containing newlines.
33989# Ultrix sh set writes to stderr and can't be redirected directly,
33990# and sets the high bit in the cache file unless we assign to the vars.
33991(
33992  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33993    eval ac_val=\$$ac_var
33994    case $ac_val in #(
33995    *${as_nl}*)
33996      case $ac_var in #(
33997      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
33998$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33999      esac
34000      case $ac_var in #(
34001      _ | IFS | as_nl) ;; #(
34002      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
34003      *) $as_unset $ac_var ;;
34004      esac ;;
34005    esac
34006  done
34007
34008  (set) 2>&1 |
34009    case $as_nl`(ac_space=' '; set) 2>&1` in #(
34010    *${as_nl}ac_space=\ *)
34011      # `set' does not quote correctly, so add quotes (double-quote
34012      # substitution turns \\\\ into \\, and sed turns \\ into \).
34013      sed -n \
34014	"s/'/'\\\\''/g;
34015	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
34016      ;; #(
34017    *)
34018      # `set' quotes correctly as required by POSIX, so do not add quotes.
34019      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
34020      ;;
34021    esac |
34022    sort
34023) |
34024  sed '
34025     /^ac_cv_env_/b end
34026     t clear
34027     :clear
34028     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
34029     t end
34030     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
34031     :end' >>confcache
34032if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
34033  if test -w "$cache_file"; then
34034    test "x$cache_file" != "x/dev/null" &&
34035      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
34036$as_echo "$as_me: updating cache $cache_file" >&6;}
34037    cat confcache >$cache_file
34038  else
34039    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
34040$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
34041  fi
34042fi
34043rm -f confcache
34044
34045test "x$prefix" = xNONE && prefix=$ac_default_prefix
34046# Let make expand exec_prefix.
34047test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
34048
34049DEFS=-DHAVE_CONFIG_H
34050
34051ac_libobjs=
34052ac_ltlibobjs=
34053for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
34054  # 1. Remove the extension, and $U if already installed.
34055  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
34056  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
34057  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
34058  #    will be set to the directory where LIBOBJS objects are built.
34059  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
34060  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
34061done
34062LIBOBJS=$ac_libobjs
34063
34064LTLIBOBJS=$ac_ltlibobjs
34065
34066
34067
34068: ${CONFIG_STATUS=./config.status}
34069ac_write_fail=0
34070ac_clean_files_save=$ac_clean_files
34071ac_clean_files="$ac_clean_files $CONFIG_STATUS"
34072{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
34073$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
34074cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34075#! $SHELL
34076# Generated by $as_me.
34077# Run this file to recreate the current configuration.
34078# Compiler output produced by configure, useful for debugging
34079# configure, is in config.log if it exists.
34080
34081debug=false
34082ac_cs_recheck=false
34083ac_cs_silent=false
34084SHELL=\${CONFIG_SHELL-$SHELL}
34085_ACEOF
34086
34087cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34088## --------------------- ##
34089## M4sh Initialization.  ##
34090## --------------------- ##
34091
34092# Be more Bourne compatible
34093DUALCASE=1; export DUALCASE # for MKS sh
34094if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
34095  emulate sh
34096  NULLCMD=:
34097  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
34098  # is contrary to our usage.  Disable this feature.
34099  alias -g '${1+"$@"}'='"$@"'
34100  setopt NO_GLOB_SUBST
34101else
34102  case `(set -o) 2>/dev/null` in
34103  *posix*) set -o posix ;;
34104esac
34105
34106fi
34107
34108
34109
34110
34111# PATH needs CR
34112# Avoid depending upon Character Ranges.
34113as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34114as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34115as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34116as_cr_digits='0123456789'
34117as_cr_alnum=$as_cr_Letters$as_cr_digits
34118
34119as_nl='
34120'
34121export as_nl
34122# Printing a long string crashes Solaris 7 /usr/bin/printf.
34123as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
34124as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
34125as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
34126if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
34127  as_echo='printf %s\n'
34128  as_echo_n='printf %s'
34129else
34130  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
34131    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
34132    as_echo_n='/usr/ucb/echo -n'
34133  else
34134    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
34135    as_echo_n_body='eval
34136      arg=$1;
34137      case $arg in
34138      *"$as_nl"*)
34139	expr "X$arg" : "X\\(.*\\)$as_nl";
34140	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
34141      esac;
34142      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
34143    '
34144    export as_echo_n_body
34145    as_echo_n='sh -c $as_echo_n_body as_echo'
34146  fi
34147  export as_echo_body
34148  as_echo='sh -c $as_echo_body as_echo'
34149fi
34150
34151# The user is always right.
34152if test "${PATH_SEPARATOR+set}" != set; then
34153  PATH_SEPARATOR=:
34154  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
34155    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
34156      PATH_SEPARATOR=';'
34157  }
34158fi
34159
34160# Support unset when possible.
34161if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
34162  as_unset=unset
34163else
34164  as_unset=false
34165fi
34166
34167
34168# IFS
34169# We need space, tab and new line, in precisely that order.  Quoting is
34170# there to prevent editors from complaining about space-tab.
34171# (If _AS_PATH_WALK were called with IFS unset, it would disable word
34172# splitting by setting IFS to empty value.)
34173IFS=" ""	$as_nl"
34174
34175# Find who we are.  Look in the path if we contain no directory separator.
34176case $0 in
34177  *[\\/]* ) as_myself=$0 ;;
34178  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34179for as_dir in $PATH
34180do
34181  IFS=$as_save_IFS
34182  test -z "$as_dir" && as_dir=.
34183  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
34184done
34185IFS=$as_save_IFS
34186
34187     ;;
34188esac
34189# We did not find ourselves, most probably we were run as `sh COMMAND'
34190# in which case we are not to be found in the path.
34191if test "x$as_myself" = x; then
34192  as_myself=$0
34193fi
34194if test ! -f "$as_myself"; then
34195  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
34196  { (exit 1); exit 1; }
34197fi
34198
34199# Work around bugs in pre-3.0 UWIN ksh.
34200for as_var in ENV MAIL MAILPATH
34201do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
34202done
34203PS1='$ '
34204PS2='> '
34205PS4='+ '
34206
34207# NLS nuisances.
34208LC_ALL=C
34209export LC_ALL
34210LANGUAGE=C
34211export LANGUAGE
34212
34213# Required to use basename.
34214if expr a : '\(a\)' >/dev/null 2>&1 &&
34215   test "X`expr 00001 : '.*\(...\)'`" = X001; then
34216  as_expr=expr
34217else
34218  as_expr=false
34219fi
34220
34221if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
34222  as_basename=basename
34223else
34224  as_basename=false
34225fi
34226
34227
34228# Name of the executable.
34229as_me=`$as_basename -- "$0" ||
34230$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34231	 X"$0" : 'X\(//\)$' \| \
34232	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
34233$as_echo X/"$0" |
34234    sed '/^.*\/\([^/][^/]*\)\/*$/{
34235	    s//\1/
34236	    q
34237	  }
34238	  /^X\/\(\/\/\)$/{
34239	    s//\1/
34240	    q
34241	  }
34242	  /^X\/\(\/\).*/{
34243	    s//\1/
34244	    q
34245	  }
34246	  s/.*/./; q'`
34247
34248# CDPATH.
34249$as_unset CDPATH
34250
34251
34252
34253  as_lineno_1=$LINENO
34254  as_lineno_2=$LINENO
34255  test "x$as_lineno_1" != "x$as_lineno_2" &&
34256  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
34257
34258  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
34259  # uniformly replaced by the line number.  The first 'sed' inserts a
34260  # line-number line after each line using $LINENO; the second 'sed'
34261  # does the real work.  The second script uses 'N' to pair each
34262  # line-number line with the line containing $LINENO, and appends
34263  # trailing '-' during substitution so that $LINENO is not a special
34264  # case at line end.
34265  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
34266  # scripts with optimization help from Paolo Bonzini.  Blame Lee
34267  # E. McMahon (1931-1989) for sed's syntax.  :-)
34268  sed -n '
34269    p
34270    /[$]LINENO/=
34271  ' <$as_myself |
34272    sed '
34273      s/[$]LINENO.*/&-/
34274      t lineno
34275      b
34276      :lineno
34277      N
34278      :loop
34279      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
34280      t loop
34281      s/-\n.*//
34282    ' >$as_me.lineno &&
34283  chmod +x "$as_me.lineno" ||
34284    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
34285   { (exit 1); exit 1; }; }
34286
34287  # Don't try to exec as it changes $[0], causing all sort of problems
34288  # (the dirname of $[0] is not the place where we might find the
34289  # original and so on.  Autoconf is especially sensitive to this).
34290  . "./$as_me.lineno"
34291  # Exit status is that of the last command.
34292  exit
34293}
34294
34295
34296if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
34297  as_dirname=dirname
34298else
34299  as_dirname=false
34300fi
34301
34302ECHO_C= ECHO_N= ECHO_T=
34303case `echo -n x` in
34304-n*)
34305  case `echo 'x\c'` in
34306  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
34307  *)   ECHO_C='\c';;
34308  esac;;
34309*)
34310  ECHO_N='-n';;
34311esac
34312if expr a : '\(a\)' >/dev/null 2>&1 &&
34313   test "X`expr 00001 : '.*\(...\)'`" = X001; then
34314  as_expr=expr
34315else
34316  as_expr=false
34317fi
34318
34319rm -f conf$$ conf$$.exe conf$$.file
34320if test -d conf$$.dir; then
34321  rm -f conf$$.dir/conf$$.file
34322else
34323  rm -f conf$$.dir
34324  mkdir conf$$.dir 2>/dev/null
34325fi
34326if (echo >conf$$.file) 2>/dev/null; then
34327  if ln -s conf$$.file conf$$ 2>/dev/null; then
34328    as_ln_s='ln -s'
34329    # ... but there are two gotchas:
34330    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34331    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34332    # In both cases, we have to default to `cp -p'.
34333    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34334      as_ln_s='cp -p'
34335  elif ln conf$$.file conf$$ 2>/dev/null; then
34336    as_ln_s=ln
34337  else
34338    as_ln_s='cp -p'
34339  fi
34340else
34341  as_ln_s='cp -p'
34342fi
34343rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34344rmdir conf$$.dir 2>/dev/null
34345
34346if mkdir -p . 2>/dev/null; then
34347  as_mkdir_p=:
34348else
34349  test -d ./-p && rmdir ./-p
34350  as_mkdir_p=false
34351fi
34352
34353if test -x / >/dev/null 2>&1; then
34354  as_test_x='test -x'
34355else
34356  if ls -dL / >/dev/null 2>&1; then
34357    as_ls_L_option=L
34358  else
34359    as_ls_L_option=
34360  fi
34361  as_test_x='
34362    eval sh -c '\''
34363      if test -d "$1"; then
34364	test -d "$1/.";
34365      else
34366	case $1 in
34367	-*)set "./$1";;
34368	esac;
34369	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
34370	???[sx]*):;;*)false;;esac;fi
34371    '\'' sh
34372  '
34373fi
34374as_executable_p=$as_test_x
34375
34376# Sed expression to map a string onto a valid CPP name.
34377as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34378
34379# Sed expression to map a string onto a valid variable name.
34380as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34381
34382
34383exec 6>&1
34384
34385# Save the log message, to keep $[0] and so on meaningful, and to
34386# report actual input values of CONFIG_FILES etc. instead of their
34387# values after options handling.
34388ac_log="
34389This file was extended by OpenJDK $as_me jdk8, which was
34390generated by GNU Autoconf 2.63.  Invocation command line was
34391
34392  CONFIG_FILES    = $CONFIG_FILES
34393  CONFIG_HEADERS  = $CONFIG_HEADERS
34394  CONFIG_LINKS    = $CONFIG_LINKS
34395  CONFIG_COMMANDS = $CONFIG_COMMANDS
34396  $ $0 $@
34397
34398on `(hostname || uname -n) 2>/dev/null | sed 1q`
34399"
34400
34401_ACEOF
34402
34403case $ac_config_files in *"
34404"*) set x $ac_config_files; shift; ac_config_files=$*;;
34405esac
34406
34407case $ac_config_headers in *"
34408"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34409esac
34410
34411
34412cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34413# Files that config.status was made for.
34414config_files="$ac_config_files"
34415config_headers="$ac_config_headers"
34416
34417_ACEOF
34418
34419cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34420ac_cs_usage="\
34421\`$as_me' instantiates files from templates according to the
34422current configuration.
34423
34424Usage: $0 [OPTION]... [FILE]...
34425
34426  -h, --help       print this help, then exit
34427  -V, --version    print version number and configuration settings, then exit
34428  -q, --quiet, --silent
34429                   do not print progress messages
34430  -d, --debug      don't remove temporary files
34431      --recheck    update $as_me by reconfiguring in the same conditions
34432      --file=FILE[:TEMPLATE]
34433                   instantiate the configuration file FILE
34434      --header=FILE[:TEMPLATE]
34435                   instantiate the configuration header FILE
34436
34437Configuration files:
34438$config_files
34439
34440Configuration headers:
34441$config_headers
34442
34443Report bugs to <bug-autoconf@gnu.org>."
34444
34445_ACEOF
34446cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34447ac_cs_version="\\
34448OpenJDK config.status jdk8
34449configured by $0, generated by GNU Autoconf 2.63,
34450  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
34451
34452Copyright (C) 2008 Free Software Foundation, Inc.
34453This config.status script is free software; the Free Software Foundation
34454gives unlimited permission to copy, distribute and modify it."
34455
34456ac_pwd='$ac_pwd'
34457srcdir='$srcdir'
34458AWK='$AWK'
34459test -n "\$AWK" || AWK=awk
34460_ACEOF
34461
34462cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34463# The default lists apply if the user does not specify any file.
34464ac_need_defaults=:
34465while test $# != 0
34466do
34467  case $1 in
34468  --*=*)
34469    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34470    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34471    ac_shift=:
34472    ;;
34473  *)
34474    ac_option=$1
34475    ac_optarg=$2
34476    ac_shift=shift
34477    ;;
34478  esac
34479
34480  case $ac_option in
34481  # Handling of the options.
34482  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34483    ac_cs_recheck=: ;;
34484  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34485    $as_echo "$ac_cs_version"; exit ;;
34486  --debug | --debu | --deb | --de | --d | -d )
34487    debug=: ;;
34488  --file | --fil | --fi | --f )
34489    $ac_shift
34490    case $ac_optarg in
34491    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34492    esac
34493    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
34494    ac_need_defaults=false;;
34495  --header | --heade | --head | --hea )
34496    $ac_shift
34497    case $ac_optarg in
34498    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34499    esac
34500    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
34501    ac_need_defaults=false;;
34502  --he | --h)
34503    # Conflict between --help and --header
34504    { $as_echo "$as_me: error: ambiguous option: $1
34505Try \`$0 --help' for more information." >&2
34506   { (exit 1); exit 1; }; };;
34507  --help | --hel | -h )
34508    $as_echo "$ac_cs_usage"; exit ;;
34509  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34510  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34511    ac_cs_silent=: ;;
34512
34513  # This is an error.
34514  -*) { $as_echo "$as_me: error: unrecognized option: $1
34515Try \`$0 --help' for more information." >&2
34516   { (exit 1); exit 1; }; } ;;
34517
34518  *) ac_config_targets="$ac_config_targets $1"
34519     ac_need_defaults=false ;;
34520
34521  esac
34522  shift
34523done
34524
34525ac_configure_extra_args=
34526
34527if $ac_cs_silent; then
34528  exec 6>/dev/null
34529  ac_configure_extra_args="$ac_configure_extra_args --silent"
34530fi
34531
34532_ACEOF
34533cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34534if \$ac_cs_recheck; then
34535  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34536  shift
34537  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34538  CONFIG_SHELL='$SHELL'
34539  export CONFIG_SHELL
34540  exec "\$@"
34541fi
34542
34543_ACEOF
34544cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34545exec 5>>config.log
34546{
34547  echo
34548  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34549## Running $as_me. ##
34550_ASBOX
34551  $as_echo "$ac_log"
34552} >&5
34553
34554_ACEOF
34555cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34556_ACEOF
34557
34558cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34559
34560# Handling of arguments.
34561for ac_config_target in $ac_config_targets
34562do
34563  case $ac_config_target in
34564    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34565    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34566    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34567    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34568    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34569    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34570    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34571
34572  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
34573$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
34574   { (exit 1); exit 1; }; };;
34575  esac
34576done
34577
34578
34579# If the user did not use the arguments to specify the items to instantiate,
34580# then the envvar interface is used.  Set only those that are not.
34581# We use the long form for the default assignment because of an extremely
34582# bizarre bug on SunOS 4.1.3.
34583if $ac_need_defaults; then
34584  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34585  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34586fi
34587
34588# Have a temporary directory for convenience.  Make it in the build tree
34589# simply because there is no reason against having it here, and in addition,
34590# creating and moving files from /tmp can sometimes cause problems.
34591# Hook for its removal unless debugging.
34592# Note that there is a small window in which the directory will not be cleaned:
34593# after its creation but before its name has been assigned to `$tmp'.
34594$debug ||
34595{
34596  tmp=
34597  trap 'exit_status=$?
34598  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34599' 0
34600  trap '{ (exit 1); exit 1; }' 1 2 13 15
34601}
34602# Create a (secure) tmp directory for tmp files.
34603
34604{
34605  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34606  test -n "$tmp" && test -d "$tmp"
34607}  ||
34608{
34609  tmp=./conf$$-$RANDOM
34610  (umask 077 && mkdir "$tmp")
34611} ||
34612{
34613   $as_echo "$as_me: cannot create a temporary directory in ." >&2
34614   { (exit 1); exit 1; }
34615}
34616
34617# Set up the scripts for CONFIG_FILES section.
34618# No need to generate them if there are no CONFIG_FILES.
34619# This happens for instance with `./config.status config.h'.
34620if test -n "$CONFIG_FILES"; then
34621
34622
34623ac_cr='
34624'
34625ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34626if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34627  ac_cs_awk_cr='\\r'
34628else
34629  ac_cs_awk_cr=$ac_cr
34630fi
34631
34632echo 'BEGIN {' >"$tmp/subs1.awk" &&
34633_ACEOF
34634
34635
34636{
34637  echo "cat >conf$$subs.awk <<_ACEOF" &&
34638  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34639  echo "_ACEOF"
34640} >conf$$subs.sh ||
34641  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
34642$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
34643   { (exit 1); exit 1; }; }
34644ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
34645ac_delim='%!_!# '
34646for ac_last_try in false false false false false :; do
34647  . ./conf$$subs.sh ||
34648    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
34649$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
34650   { (exit 1); exit 1; }; }
34651
34652  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34653  if test $ac_delim_n = $ac_delim_num; then
34654    break
34655  elif $ac_last_try; then
34656    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
34657$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
34658   { (exit 1); exit 1; }; }
34659  else
34660    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34661  fi
34662done
34663rm -f conf$$subs.sh
34664
34665cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34666cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34667_ACEOF
34668sed -n '
34669h
34670s/^/S["/; s/!.*/"]=/
34671p
34672g
34673s/^[^!]*!//
34674:repl
34675t repl
34676s/'"$ac_delim"'$//
34677t delim
34678:nl
34679h
34680s/\(.\{148\}\).*/\1/
34681t more1
34682s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34683p
34684n
34685b repl
34686:more1
34687s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34688p
34689g
34690s/.\{148\}//
34691t nl
34692:delim
34693h
34694s/\(.\{148\}\).*/\1/
34695t more2
34696s/["\\]/\\&/g; s/^/"/; s/$/"/
34697p
34698b
34699:more2
34700s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34701p
34702g
34703s/.\{148\}//
34704t delim
34705' <conf$$subs.awk | sed '
34706/^[^""]/{
34707  N
34708  s/\n//
34709}
34710' >>$CONFIG_STATUS || ac_write_fail=1
34711rm -f conf$$subs.awk
34712cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34713_ACAWK
34714cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34715  for (key in S) S_is_set[key] = 1
34716  FS = ""
34717
34718}
34719{
34720  line = $ 0
34721  nfields = split(line, field, "@")
34722  substed = 0
34723  len = length(field[1])
34724  for (i = 2; i < nfields; i++) {
34725    key = field[i]
34726    keylen = length(key)
34727    if (S_is_set[key]) {
34728      value = S[key]
34729      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34730      len += length(value) + length(field[++i])
34731      substed = 1
34732    } else
34733      len += 1 + keylen
34734  }
34735
34736  print line
34737}
34738
34739_ACAWK
34740_ACEOF
34741cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34742if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34743  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34744else
34745  cat
34746fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34747  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
34748$as_echo "$as_me: error: could not setup config files machinery" >&2;}
34749   { (exit 1); exit 1; }; }
34750_ACEOF
34751
34752# VPATH may cause trouble with some makes, so we remove $(srcdir),
34753# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
34754# trailing colons and then remove the whole line if VPATH becomes empty
34755# (actually we leave an empty line to preserve line numbers).
34756if test "x$srcdir" = x.; then
34757  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
34758s/:*\$(srcdir):*/:/
34759s/:*\${srcdir}:*/:/
34760s/:*@srcdir@:*/:/
34761s/^\([^=]*=[	 ]*\):*/\1/
34762s/:*$//
34763s/^[^=]*=[	 ]*$//
34764}'
34765fi
34766
34767cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34768fi # test -n "$CONFIG_FILES"
34769
34770# Set up the scripts for CONFIG_HEADERS section.
34771# No need to generate them if there are no CONFIG_HEADERS.
34772# This happens for instance with `./config.status Makefile'.
34773if test -n "$CONFIG_HEADERS"; then
34774cat >"$tmp/defines.awk" <<\_ACAWK ||
34775BEGIN {
34776_ACEOF
34777
34778# Transform confdefs.h into an awk script `defines.awk', embedded as
34779# here-document in config.status, that substitutes the proper values into
34780# config.h.in to produce config.h.
34781
34782# Create a delimiter string that does not exist in confdefs.h, to ease
34783# handling of long lines.
34784ac_delim='%!_!# '
34785for ac_last_try in false false :; do
34786  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34787  if test -z "$ac_t"; then
34788    break
34789  elif $ac_last_try; then
34790    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
34791$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
34792   { (exit 1); exit 1; }; }
34793  else
34794    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34795  fi
34796done
34797
34798# For the awk script, D is an array of macro values keyed by name,
34799# likewise P contains macro parameters if any.  Preserve backslash
34800# newline sequences.
34801
34802ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34803sed -n '
34804s/.\{148\}/&'"$ac_delim"'/g
34805t rset
34806:rset
34807s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34808t def
34809d
34810:def
34811s/\\$//
34812t bsnl
34813s/["\\]/\\&/g
34814s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34815D["\1"]=" \3"/p
34816s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34817d
34818:bsnl
34819s/["\\]/\\&/g
34820s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34821D["\1"]=" \3\\\\\\n"\\/p
34822t cont
34823s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34824t cont
34825d
34826:cont
34827n
34828s/.\{148\}/&'"$ac_delim"'/g
34829t clear
34830:clear
34831s/\\$//
34832t bsnlc
34833s/["\\]/\\&/g; s/^/"/; s/$/"/p
34834d
34835:bsnlc
34836s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34837b cont
34838' <confdefs.h | sed '
34839s/'"$ac_delim"'/"\\\
34840"/g' >>$CONFIG_STATUS || ac_write_fail=1
34841
34842cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34843  for (key in D) D_is_set[key] = 1
34844  FS = ""
34845}
34846/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34847  line = \$ 0
34848  split(line, arg, " ")
34849  if (arg[1] == "#") {
34850    defundef = arg[2]
34851    mac1 = arg[3]
34852  } else {
34853    defundef = substr(arg[1], 2)
34854    mac1 = arg[2]
34855  }
34856  split(mac1, mac2, "(") #)
34857  macro = mac2[1]
34858  prefix = substr(line, 1, index(line, defundef) - 1)
34859  if (D_is_set[macro]) {
34860    # Preserve the white space surrounding the "#".
34861    print prefix "define", macro P[macro] D[macro]
34862    next
34863  } else {
34864    # Replace #undef with comments.  This is necessary, for example,
34865    # in the case of _POSIX_SOURCE, which is predefined and required
34866    # on some systems where configure will not decide to define it.
34867    if (defundef == "undef") {
34868      print "/*", prefix defundef, macro, "*/"
34869      next
34870    }
34871  }
34872}
34873{ print }
34874_ACAWK
34875_ACEOF
34876cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34877  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
34878$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
34879   { (exit 1); exit 1; }; }
34880fi # test -n "$CONFIG_HEADERS"
34881
34882
34883eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34884shift
34885for ac_tag
34886do
34887  case $ac_tag in
34888  :[FHLC]) ac_mode=$ac_tag; continue;;
34889  esac
34890  case $ac_mode$ac_tag in
34891  :[FHL]*:*);;
34892  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
34893$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
34894   { (exit 1); exit 1; }; };;
34895  :[FH]-) ac_tag=-:-;;
34896  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34897  esac
34898  ac_save_IFS=$IFS
34899  IFS=:
34900  set x $ac_tag
34901  IFS=$ac_save_IFS
34902  shift
34903  ac_file=$1
34904  shift
34905
34906  case $ac_mode in
34907  :L) ac_source=$1;;
34908  :[FH])
34909    ac_file_inputs=
34910    for ac_f
34911    do
34912      case $ac_f in
34913      -) ac_f="$tmp/stdin";;
34914      *) # Look for the file first in the build tree, then in the source tree
34915	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34916	 # because $ac_f cannot contain `:'.
34917	 test -f "$ac_f" ||
34918	   case $ac_f in
34919	   [\\/$]*) false;;
34920	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34921	   esac ||
34922	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
34923$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
34924   { (exit 1); exit 1; }; };;
34925      esac
34926      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34927      ac_file_inputs="$ac_file_inputs '$ac_f'"
34928    done
34929
34930    # Let's still pretend it is `configure' which instantiates (i.e., don't
34931    # use $as_me), people would be surprised to read:
34932    #    /* config.h.  Generated by config.status.  */
34933    configure_input='Generated from '`
34934	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34935	`' by configure.'
34936    if test x"$ac_file" != x-; then
34937      configure_input="$ac_file.  $configure_input"
34938      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
34939$as_echo "$as_me: creating $ac_file" >&6;}
34940    fi
34941    # Neutralize special characters interpreted by sed in replacement strings.
34942    case $configure_input in #(
34943    *\&* | *\|* | *\\* )
34944       ac_sed_conf_input=`$as_echo "$configure_input" |
34945       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34946    *) ac_sed_conf_input=$configure_input;;
34947    esac
34948
34949    case $ac_tag in
34950    *:-:* | *:-) cat >"$tmp/stdin" \
34951      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
34952$as_echo "$as_me: error: could not create $ac_file" >&2;}
34953   { (exit 1); exit 1; }; } ;;
34954    esac
34955    ;;
34956  esac
34957
34958  ac_dir=`$as_dirname -- "$ac_file" ||
34959$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34960	 X"$ac_file" : 'X\(//\)[^/]' \| \
34961	 X"$ac_file" : 'X\(//\)$' \| \
34962	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34963$as_echo X"$ac_file" |
34964    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34965	    s//\1/
34966	    q
34967	  }
34968	  /^X\(\/\/\)[^/].*/{
34969	    s//\1/
34970	    q
34971	  }
34972	  /^X\(\/\/\)$/{
34973	    s//\1/
34974	    q
34975	  }
34976	  /^X\(\/\).*/{
34977	    s//\1/
34978	    q
34979	  }
34980	  s/.*/./; q'`
34981  { as_dir="$ac_dir"
34982  case $as_dir in #(
34983  -*) as_dir=./$as_dir;;
34984  esac
34985  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
34986    as_dirs=
34987    while :; do
34988      case $as_dir in #(
34989      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34990      *) as_qdir=$as_dir;;
34991      esac
34992      as_dirs="'$as_qdir' $as_dirs"
34993      as_dir=`$as_dirname -- "$as_dir" ||
34994$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34995	 X"$as_dir" : 'X\(//\)[^/]' \| \
34996	 X"$as_dir" : 'X\(//\)$' \| \
34997	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34998$as_echo X"$as_dir" |
34999    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35000	    s//\1/
35001	    q
35002	  }
35003	  /^X\(\/\/\)[^/].*/{
35004	    s//\1/
35005	    q
35006	  }
35007	  /^X\(\/\/\)$/{
35008	    s//\1/
35009	    q
35010	  }
35011	  /^X\(\/\).*/{
35012	    s//\1/
35013	    q
35014	  }
35015	  s/.*/./; q'`
35016      test -d "$as_dir" && break
35017    done
35018    test -z "$as_dirs" || eval "mkdir $as_dirs"
35019  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
35020$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
35021   { (exit 1); exit 1; }; }; }
35022  ac_builddir=.
35023
35024case "$ac_dir" in
35025.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
35026*)
35027  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
35028  # A ".." for each directory in $ac_dir_suffix.
35029  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
35030  case $ac_top_builddir_sub in
35031  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
35032  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
35033  esac ;;
35034esac
35035ac_abs_top_builddir=$ac_pwd
35036ac_abs_builddir=$ac_pwd$ac_dir_suffix
35037# for backward compatibility:
35038ac_top_builddir=$ac_top_build_prefix
35039
35040case $srcdir in
35041  .)  # We are building in place.
35042    ac_srcdir=.
35043    ac_top_srcdir=$ac_top_builddir_sub
35044    ac_abs_top_srcdir=$ac_pwd ;;
35045  [\\/]* | ?:[\\/]* )  # Absolute name.
35046    ac_srcdir=$srcdir$ac_dir_suffix;
35047    ac_top_srcdir=$srcdir
35048    ac_abs_top_srcdir=$srcdir ;;
35049  *) # Relative name.
35050    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
35051    ac_top_srcdir=$ac_top_build_prefix$srcdir
35052    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
35053esac
35054ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
35055
35056
35057  case $ac_mode in
35058  :F)
35059  #
35060  # CONFIG_FILE
35061  #
35062
35063_ACEOF
35064
35065cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35066# If the template does not know about datarootdir, expand it.
35067# FIXME: This hack should be removed a few years after 2.60.
35068ac_datarootdir_hack=; ac_datarootdir_seen=
35069
35070ac_sed_dataroot='
35071/datarootdir/ {
35072  p
35073  q
35074}
35075/@datadir@/p
35076/@docdir@/p
35077/@infodir@/p
35078/@localedir@/p
35079/@mandir@/p
35080'
35081case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
35082*datarootdir*) ac_datarootdir_seen=yes;;
35083*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
35084  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
35085$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
35086_ACEOF
35087cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35088  ac_datarootdir_hack='
35089  s&@datadir@&$datadir&g
35090  s&@docdir@&$docdir&g
35091  s&@infodir@&$infodir&g
35092  s&@localedir@&$localedir&g
35093  s&@mandir@&$mandir&g
35094    s&\\\${datarootdir}&$datarootdir&g' ;;
35095esac
35096_ACEOF
35097
35098# Neutralize VPATH when `$srcdir' = `.'.
35099# Shell code in configure.ac might set extrasub.
35100# FIXME: do we really want to maintain this feature?
35101cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35102ac_sed_extra="$ac_vpsub
35103$extrasub
35104_ACEOF
35105cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35106:t
35107/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
35108s|@configure_input@|$ac_sed_conf_input|;t t
35109s&@top_builddir@&$ac_top_builddir_sub&;t t
35110s&@top_build_prefix@&$ac_top_build_prefix&;t t
35111s&@srcdir@&$ac_srcdir&;t t
35112s&@abs_srcdir@&$ac_abs_srcdir&;t t
35113s&@top_srcdir@&$ac_top_srcdir&;t t
35114s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
35115s&@builddir@&$ac_builddir&;t t
35116s&@abs_builddir@&$ac_abs_builddir&;t t
35117s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
35118$ac_datarootdir_hack
35119"
35120eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
35121  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
35122$as_echo "$as_me: error: could not create $ac_file" >&2;}
35123   { (exit 1); exit 1; }; }
35124
35125test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
35126  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
35127  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
35128  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35129which seems to be undefined.  Please make sure it is defined." >&5
35130$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35131which seems to be undefined.  Please make sure it is defined." >&2;}
35132
35133  rm -f "$tmp/stdin"
35134  case $ac_file in
35135  -) cat "$tmp/out" && rm -f "$tmp/out";;
35136  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
35137  esac \
35138  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
35139$as_echo "$as_me: error: could not create $ac_file" >&2;}
35140   { (exit 1); exit 1; }; }
35141 ;;
35142  :H)
35143  #
35144  # CONFIG_HEADER
35145  #
35146  if test x"$ac_file" != x-; then
35147    {
35148      $as_echo "/* $configure_input  */" \
35149      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
35150    } >"$tmp/config.h" \
35151      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
35152$as_echo "$as_me: error: could not create $ac_file" >&2;}
35153   { (exit 1); exit 1; }; }
35154    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
35155      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
35156$as_echo "$as_me: $ac_file is unchanged" >&6;}
35157    else
35158      rm -f "$ac_file"
35159      mv "$tmp/config.h" "$ac_file" \
35160	|| { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
35161$as_echo "$as_me: error: could not create $ac_file" >&2;}
35162   { (exit 1); exit 1; }; }
35163    fi
35164  else
35165    $as_echo "/* $configure_input  */" \
35166      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
35167      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
35168$as_echo "$as_me: error: could not create -" >&2;}
35169   { (exit 1); exit 1; }; }
35170  fi
35171 ;;
35172
35173
35174  esac
35175
35176done # for ac_tag
35177
35178
35179{ (exit 0); exit 0; }
35180_ACEOF
35181chmod +x $CONFIG_STATUS
35182ac_clean_files=$ac_clean_files_save
35183
35184test $ac_write_fail = 0 ||
35185  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
35186$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
35187   { (exit 1); exit 1; }; }
35188
35189
35190# configure is writing to config.log, and then calls config.status.
35191# config.status does its own redirection, appending to config.log.
35192# Unfortunately, on DOS this fails, as config.log is still kept open
35193# by configure, so config.status won't be able to write to it; its
35194# output is simply discarded.  So we exec the FD to /dev/null,
35195# effectively closing config.log, so it can be properly (re)opened and
35196# appended to by config.status.  When coming back to configure, we
35197# need to make the FD available again.
35198if test "$no_create" != yes; then
35199  ac_cs_success=:
35200  ac_config_status_args=
35201  test "$silent" = yes &&
35202    ac_config_status_args="$ac_config_status_args --quiet"
35203  exec 5>/dev/null
35204  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
35205  exec 5>>config.log
35206  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
35207  # would make configure fail if this is the last instruction.
35208  $ac_cs_success || { (exit 1); exit 1; }
35209fi
35210if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
35211  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
35212$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
35213fi
35214
35215
35216# Make the compare script executable
35217$CHMOD +x $OUTPUT_ROOT/compare.sh
35218
35219# Finally output some useful information to the user
35220
35221# Finally output some useful information to the user
35222
35223if test "x$CCACHE_FOUND" != x; then
35224	if  test "x$HAS_GOOD_CCACHE" = x; then
35225		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
35226		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
35227	else
35228		CCACHE_STATUS="installed and in use"
35229	fi
35230else
35231	if test "x$GCC" = xyes; then
35232		CCACHE_STATUS="not installed (consider installing)"
35233		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
35234	else
35235		CCACHE_STATUS="not available for your system"
35236	fi
35237fi
35238
35239printf "\n"
35240printf "====================================================\n"
35241printf "A new configuration has been successfully created in\n"
35242printf "$OUTPUT_ROOT\n"
35243if test "x$CONFIGURE_COMMAND_LINE" != x; then
35244	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
35245else
35246	printf "using default settings.\n"
35247fi
35248
35249printf "\n"
35250printf "Configuration summary:\n"
35251printf "* Debug level:    $DEBUG_LEVEL\n"
35252printf "* JDK variant:    $JDK_VARIANT\n"
35253printf "* JVM variants:   $with_jvm_variants\n"
35254printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
35255
35256printf "\n"
35257printf "Tools summary:\n"
35258if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
35259  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
35260fi
35261printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
35262printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
35263printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
35264
35265printf "\n"
35266printf "Build performance summary:\n"
35267printf "* Cores to use:   $NUM_CORES\n"
35268printf "* Memory limit:   $MEMORY_SIZE MB\n"
35269printf "* ccache status:  $CCACHE_STATUS\n"
35270printf "\n"
35271
35272if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
35273	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
35274	printf "$CCACHE_HELP_MSG\n"
35275
35276    # Print a helpful message on how to acquire the necessary build dependency.
35277    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
35278    MISSING_DEPENDENCY=ccache
35279    PKGHANDLER_COMMAND=
35280
35281    case $PKGHANDLER in
35282	apt-get)
35283                apt_help     $MISSING_DEPENDENCY ;;
35284    yum)
35285                yum_help     $MISSING_DEPENDENCY ;;
35286	port)
35287                port_help    $MISSING_DEPENDENCY ;;
35288	pkgutil)
35289                pkgutil_help $MISSING_DEPENDENCY ;;
35290	pkgadd)
35291                pkgadd_help  $MISSING_DEPENDENCY ;;
35292    * )
35293      break ;;
35294    esac
35295
35296    if test "x$PKGHANDLER_COMMAND" != x; then
35297        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35298    fi
35299
35300	printf "$HELP_MSG\n"
35301	printf "\n"
35302fi
35303
35304if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
35305	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
35306	printf "will result in longer build times.\n"
35307	printf "\n"
35308fi
35309
35310if test "x$FOUND_ALT_VARIABLES" != "x"; then
35311	printf "WARNING: You have old-style ALT_ environment variables set.\n"
35312	printf "These are not respected, and will be ignored. It is recommended\n"
35313	printf "that you clean your environment. The following variables are set:\n"
35314	printf "$FOUND_ALT_VARIABLES\n"
35315	printf "\n"
35316fi
35317
35318if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
35319	printf "WARNING: Your build output directory is not on a local disk.\n"
35320	printf "This will severely degrade build performance!\n"
35321	printf "It is recommended that you create an output directory on a local disk,\n"
35322	printf "and run the configure script again from that directory.\n"
35323	printf "\n"
35324fi
35325
35326if test "x$IS_RECONFIGURE" = "xyes"; then
35327	printf "WARNING: The result of this configuration has overridden an older\n"
35328	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
35329	printf "proper build. Failure to do so might result in strange build problems.\n"
35330	printf "\n"
35331fi
35332
35333