generated-configure.sh revision 476:2ba6f4da4bf3
155714Skris#! /bin/sh
255714Skris# Guess values for system-dependent variables and create Makefiles.
355714Skris# Generated by GNU Autoconf 2.67 for openjdk jdk8.
455714Skris#
555714Skris# Report bugs to <build-dev@openjdk.java.net>.
655714Skris#
755714Skris#
8280297Sjkim# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
955714Skris# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
1055714Skris# Foundation, Inc.
1155714Skris#
1255714Skris#
1355714Skris# This configure script is free software; the Free Software Foundation
1455714Skris# gives unlimited permission to copy, distribute and modify it.
15280297Sjkim## -------------------- ##
1655714Skris## M4sh Initialization. ##
1755714Skris## -------------------- ##
1855714Skris
1955714Skris# Be more Bourne compatible
2055714SkrisDUALCASE=1; export DUALCASE # for MKS sh
2155714Skrisif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22280297Sjkim  emulate sh
2355714Skris  NULLCMD=:
2455714Skris  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
2555714Skris  # is contrary to our usage.  Disable this feature.
2655714Skris  alias -g '${1+"$@"}'='"$@"'
2755714Skris  setopt NO_GLOB_SUBST
2855714Skriselse
2955714Skris  case `(set -o) 2>/dev/null` in #(
3055714Skris  *posix*) :
3155714Skris    set -o posix ;; #(
3255714Skris  *) :
3355714Skris     ;;
3455714Skrisesac
3555714Skrisfi
3655714Skris
37280297Sjkim
3855714Skrisas_nl='
3955714Skris'
40280297Sjkimexport as_nl
4155714Skris# Printing a long string crashes Solaris 7 /usr/bin/printf.
4255714Skrisas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4355714Skrisas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
4455714Skrisas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
4555714Skris# Prefer a ksh shell builtin over an external printf program on Solaris,
4655714Skris# but without wasting forks for bash or zsh.
4755714Skrisif test -z "$BASH_VERSION$ZSH_VERSION" \
4855714Skris    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
4955714Skris  as_echo='print -r --'
5055714Skris  as_echo_n='print -rn --'
5155714Skriselif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52280297Sjkim  as_echo='printf %s\n'
5355714Skris  as_echo_n='printf %s'
5455714Skriselse
5555714Skris  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
5655714Skris    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
5755714Skris    as_echo_n='/usr/ucb/echo -n'
5855714Skris  else
5955714Skris    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60298998Sjkim    as_echo_n_body='eval
6155714Skris      arg=$1;
6255714Skris      case $arg in #(
6355714Skris      *"$as_nl"*)
64291719Sjkim	expr "X$arg" : "X\\(.*\\)$as_nl";
6555714Skris	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66280297Sjkim      esac;
6755714Skris      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68280297Sjkim    '
69280297Sjkim    export as_echo_n_body
70280297Sjkim    as_echo_n='sh -c $as_echo_n_body as_echo'
71280297Sjkim  fi
72280297Sjkim  export as_echo_body
7355714Skris  as_echo='sh -c $as_echo_body as_echo'
74280297Sjkimfi
7555714Skris
7655714Skris# The user is always right.
77280297Sjkimif test "${PATH_SEPARATOR+set}" != set; then
78280297Sjkim  PATH_SEPARATOR=:
7955714Skris  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
8055714Skris    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
8155714Skris      PATH_SEPARATOR=';'
8255714Skris  }
8355714Skrisfi
8455714Skris
8555714Skris
8655714Skris# IFS
8755714Skris# We need space, tab and new line, in precisely that order.  Quoting is
8855714Skris# there to prevent editors from complaining about space-tab.
89280297Sjkim# (If _AS_PATH_WALK were called with IFS unset, it would disable word
9055714Skris# splitting by setting IFS to empty value.)
9155714SkrisIFS=" ""	$as_nl"
92280297Sjkim
93280297Sjkim# Find who we are.  Look in the path if we contain no directory separator.
9455714Skriscase $0 in #((
9555714Skris  *[\\/]* ) as_myself=$0 ;;
9655714Skris  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9755714Skrisfor as_dir in $PATH
9855714Skrisdo
9955714Skris  IFS=$as_save_IFS
100280297Sjkim  test -z "$as_dir" && as_dir=.
101280297Sjkim    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102280297Sjkim  done
103280297SjkimIFS=$as_save_IFS
104280297Sjkim
105280297Sjkim     ;;
106291719Sjkimesac
10755714Skris# We did not find ourselves, most probably we were run as `sh COMMAND'
108280297Sjkim# in which case we are not to be found in the path.
109280297Sjkimif test "x$as_myself" = x; then
110280297Sjkim  as_myself=$0
111280297Sjkimfi
112280297Sjkimif test ! -f "$as_myself"; then
113280297Sjkim  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114280297Sjkim  exit 1
115280297Sjkimfi
116280297Sjkim
117280297Sjkim# Unset variables that we do not need and which cause bugs (e.g. in
118280297Sjkim# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119280297Sjkim# suppresses any "Segmentation fault" message there.  '((' could
120280297Sjkim# trigger a bug in pdksh 5.2.14.
121280297Sjkimfor as_var in BASH_ENV ENV MAIL MAILPATH
122280297Sjkimdo eval test x\${$as_var+set} = xset \
123280297Sjkim  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124280297Sjkimdone
125280297SjkimPS1='$ '
12655714SkrisPS2='> '
127291719SjkimPS4='+ '
128291719Sjkim
129291719Sjkim# NLS nuisances.
130291719SjkimLC_ALL=C
131291719Sjkimexport LC_ALL
132291719SjkimLANGUAGE=C
133291719Sjkimexport LANGUAGE
134291719Sjkim
135291719Sjkim# CDPATH.
136291719Sjkim(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137291719Sjkim
138291719Sjkimif test "x$CONFIG_SHELL" = x; then
139291719Sjkim  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140291719Sjkim  emulate sh
141291719Sjkim  NULLCMD=:
142291719Sjkim  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143291719Sjkim  # is contrary to our usage.  Disable this feature.
14455714Skris  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145280297Sjkim  setopt NO_GLOB_SUBST
146280297Sjkimelse
147280297Sjkim  case \`(set -o) 2>/dev/null\` in #(
148280297Sjkim  *posix*) :
149280297Sjkim    set -o posix ;; #(
15055714Skris  *) :
15155714Skris     ;;
152280297Sjkimesac
153280297Sjkimfi
154280297Sjkim"
155298998Sjkim  as_required="as_fn_return () { (exit \$1); }
15655714Skrisas_fn_success () { as_fn_return 0; }
157280297Sjkimas_fn_failure () { as_fn_return 1; }
158284283Sjkimas_fn_ret_success () { return 0; }
159280297Sjkimas_fn_ret_failure () { return 1; }
160280297Sjkim
161298998Sjkimexitcode=0
162280297Sjkimas_fn_success || { exitcode=1; echo as_fn_success failed.; }
163280297Sjkimas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164280297Sjkimas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165280297Sjkimas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166280297Sjkimif ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167280297Sjkim
168280297Sjkimelse
169280297Sjkim  exitcode=1; echo positional parameters were not saved.
170280297Sjkimfi
171280297Sjkimtest x\$exitcode = x0 || exit 1"
172280297Sjkim  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173280297Sjkim  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174280297Sjkim  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175280297Sjkim  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176280297Sjkimtest \$(( 1 + 1 )) = 2 || exit 1"
177280297Sjkim  if (eval "$as_required") 2>/dev/null; then :
178298998Sjkim  as_have_required=yes
179280297Sjkimelse
180280297Sjkim  as_have_required=no
181280297Sjkimfi
182280297Sjkim  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183280297Sjkim
184280297Sjkimelse
185280297Sjkim  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186280297Sjkimas_found=false
187298998Sjkimfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188298998Sjkimdo
189298998Sjkim  IFS=$as_save_IFS
190298998Sjkim  test -z "$as_dir" && as_dir=.
191298998Sjkim  as_found=:
192280297Sjkim  case $as_dir in #(
193280297Sjkim	 /*)
194280297Sjkim	   for as_base in sh bash ksh sh5; do
195280297Sjkim	     # Try only shells that exist, to save several forks.
196280297Sjkim	     as_shell=$as_dir/$as_base
19755714Skris	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
19855714Skris		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199280297Sjkim  CONFIG_SHELL=$as_shell as_have_required=yes
200280297Sjkim		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
20155714Skris  break 2
202280297Sjkimfi
203280297Sjkimfi
204280297Sjkim	   done;;
205280297Sjkim       esac
206280297Sjkim  as_found=false
207280297Sjkimdone
208280297Sjkim$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209280297Sjkim	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
21055714Skris  CONFIG_SHELL=$SHELL as_have_required=yes
21159191Skrisfi; }
212280297SjkimIFS=$as_save_IFS
213280297Sjkim
214280297Sjkim
21555714Skris      if test "x$CONFIG_SHELL" != x; then :
216280297Sjkim  # We cannot yet assume a decent shell, so we have to provide a
217280297Sjkim	# neutralization value for shells without unset; and this also
218280297Sjkim	# works around shells that cannot unset nonexistent variables.
219280297Sjkim	BASH_ENV=/dev/null
220280297Sjkim	ENV=/dev/null
221280297Sjkim	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222280297Sjkim	export CONFIG_SHELL
223280297Sjkim	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224280297Sjkimfi
225280297Sjkim
226280297Sjkim    if test x$as_have_required = xno; then :
227280297Sjkim  $as_echo "$0: This script requires a shell more modern than all"
22855714Skris  $as_echo "$0: the shells that I found on your system."
229280297Sjkim  if test x${ZSH_VERSION+set} = xset ; then
230280297Sjkim    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231280297Sjkim    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232280297Sjkim  else
233280297Sjkim    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234280297Sjkim$0: build-dev@openjdk.java.net about your system, including
235280297Sjkim$0: any error possibly output before this message. Then
236280297Sjkim$0: install a modern shell, or manually run the script
23755714Skris$0: under such a shell if you do have one."
238280297Sjkim  fi
239280297Sjkim  exit 1
240280297Sjkimfi
24155714Skrisfi
24255714Skrisfi
243280297SjkimSHELL=${CONFIG_SHELL-/bin/sh}
244291719Sjkimexport SHELL
245280297Sjkim# Unset more variables known to interfere with behavior of common tools.
246291719SjkimCLICOLOR_FORCE= GREP_OPTIONS=
247280297Sjkimunset CLICOLOR_FORCE GREP_OPTIONS
248280297Sjkim
249280297Sjkim## --------------------- ##
25055714Skris## M4sh Shell Functions. ##
251280297Sjkim## --------------------- ##
252280297Sjkim# as_fn_unset VAR
25355714Skris# ---------------
25455714Skris# Portably unset VAR.
255291719Sjkimas_fn_unset ()
256291719Sjkim{
257291719Sjkim  { eval $1=; unset $1;}
258291719Sjkim}
259291719Sjkimas_unset=as_fn_unset
260291719Sjkim
261291719Sjkim# as_fn_set_status STATUS
262291719Sjkim# -----------------------
263291719Sjkim# Set $? to STATUS, without forking.
264291719Sjkimas_fn_set_status ()
265291719Sjkim{
266291719Sjkim  return $1
267291719Sjkim} # as_fn_set_status
268291719Sjkim
269291719Sjkim# as_fn_exit STATUS
27055714Skris# -----------------
27155714Skris# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272280297Sjkimas_fn_exit ()
273280297Sjkim{
274291719Sjkim  set +e
275280297Sjkim  as_fn_set_status $1
27655714Skris  exit $1
277280297Sjkim} # as_fn_exit
278280297Sjkim
27955714Skris# as_fn_mkdir_p
280291719Sjkim# -------------
281291719Sjkim# Create "$as_dir" as a directory, including parents if necessary.
282291719Sjkimas_fn_mkdir_p ()
283291719Sjkim{
284291719Sjkim
285291719Sjkim  case $as_dir in #(
286291719Sjkim  -*) as_dir=./$as_dir;;
287291719Sjkim  esac
288280297Sjkim  test -d "$as_dir" || eval $as_mkdir_p || {
289280297Sjkim    as_dirs=
290280297Sjkim    while :; do
29155714Skris      case $as_dir in #(
292280297Sjkim      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293280297Sjkim      *) as_qdir=$as_dir;;
294280297Sjkim      esac
295291719Sjkim      as_dirs="'$as_qdir' $as_dirs"
296280297Sjkim      as_dir=`$as_dirname -- "$as_dir" ||
297280297Sjkim$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298280297Sjkim	 X"$as_dir" : 'X\(//\)[^/]' \| \
29955714Skris	 X"$as_dir" : 'X\(//\)$' \| \
300280297Sjkim	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301280297Sjkim$as_echo X"$as_dir" |
302291719Sjkim    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303291719Sjkim	    s//\1/
304291719Sjkim	    q
305291719Sjkim	  }
306280297Sjkim	  /^X\(\/\/\)[^/].*/{
307100928Snectar	    s//\1/
308291719Sjkim	    q
309291719Sjkim	  }
310291719Sjkim	  /^X\(\/\/\)$/{
311280297Sjkim	    s//\1/
31255714Skris	    q
313291719Sjkim	  }
314291719Sjkim	  /^X\(\/\).*/{
315291719Sjkim	    s//\1/
316280297Sjkim	    q
31755714Skris	  }
318291719Sjkim	  s/.*/./; q'`
319291719Sjkim      test -d "$as_dir" && break
320291719Sjkim    done
321291719Sjkim    test -z "$as_dirs" || eval "mkdir $as_dirs"
322291719Sjkim  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323291719Sjkim
324291719Sjkim
325291719Sjkim} # as_fn_mkdir_p
326291719Sjkim# as_fn_append VAR VALUE
327291719Sjkim# ----------------------
328291719Sjkim# Append the text in VALUE to the end of the definition contained in VAR. Take
329291719Sjkim# advantage of any shell optimizations that allow amortized linear growth over
330291719Sjkim# repeated appends, instead of the typical quadratic growth present in naive
331280297Sjkim# implementations.
33255714Skrisif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333291719Sjkim  eval 'as_fn_append ()
334291719Sjkim  {
335291719Sjkim    eval $1+=\$2
336291719Sjkim  }'
337291719Sjkimelse
338291719Sjkim  as_fn_append ()
339280297Sjkim  {
340291719Sjkim    eval $1=\$$1\$2
341291719Sjkim  }
342291719Sjkimfi # as_fn_append
343291719Sjkim
34455714Skris# as_fn_arith ARG...
345291719Sjkim# ------------------
346291719Sjkim# Perform arithmetic evaluation on the ARGs, and store the result in the
347291719Sjkim# global $as_val. Take advantage of shells that can avoid forks. The arguments
348291719Sjkim# must be portable across $(()) and expr.
349291719Sjkimif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350291719Sjkim  eval 'as_fn_arith ()
351291719Sjkim  {
352291719Sjkim    as_val=$(( $* ))
353291719Sjkim  }'
354291719Sjkimelse
355291719Sjkim  as_fn_arith ()
356291719Sjkim  {
357280297Sjkim    as_val=`expr "$@" || test $? -eq 1`
358280297Sjkim  }
359291719Sjkimfi # as_fn_arith
360291719Sjkim
361291719Sjkim
362291719Sjkim# as_fn_error STATUS ERROR [LINENO LOG_FD]
363291719Sjkim# ----------------------------------------
364280297Sjkim# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365280297Sjkim# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366291719Sjkim# script with STATUS, using 1 if that was 0.
367291719Sjkimas_fn_error ()
368291719Sjkim{
369291719Sjkim  as_status=$1; test $as_status -eq 0 && as_status=1
370280297Sjkim  if test "$4"; then
371280297Sjkim    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372280297Sjkim    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373280297Sjkim  fi
374280297Sjkim  $as_echo "$as_me: error: $2" >&2
37559191Skris  as_fn_exit $as_status
376280297Sjkim} # as_fn_error
377280297Sjkim
378280297Sjkimif expr a : '\(a\)' >/dev/null 2>&1 &&
37955714Skris   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380280297Sjkim  as_expr=expr
381280297Sjkimelse
382280297Sjkim  as_expr=false
383280297Sjkimfi
384280297Sjkim
38555714Skrisif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386280297Sjkim  as_basename=basename
387280297Sjkimelse
388280297Sjkim  as_basename=false
389280297Sjkimfi
390280297Sjkim
391280297Sjkimif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
39255714Skris  as_dirname=dirname
393280297Sjkimelse
394280297Sjkim  as_dirname=false
39555714Skrisfi
396280297Sjkim
397280297Sjkimas_me=`$as_basename -- "$0" ||
398280297Sjkim$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399280297Sjkim	 X"$0" : 'X\(//\)$' \| \
400280297Sjkim	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401280297Sjkim$as_echo X/"$0" |
402280297Sjkim    sed '/^.*\/\([^/][^/]*\)\/*$/{
403280297Sjkim	    s//\1/
404280297Sjkim	    q
405280297Sjkim	  }
406280297Sjkim	  /^X\/\(\/\/\)$/{
407280297Sjkim	    s//\1/
408280297Sjkim	    q
409280297Sjkim	  }
410280297Sjkim	  /^X\/\(\/\).*/{
411280297Sjkim	    s//\1/
412280297Sjkim	    q
41355714Skris	  }
41455714Skris	  s/.*/./; q'`
415280297Sjkim
416280297Sjkim# Avoid depending upon Character Ranges.
41755714Skrisas_cr_letters='abcdefghijklmnopqrstuvwxyz'
418280297Sjkimas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419280297Sjkimas_cr_Letters=$as_cr_letters$as_cr_LETTERS
420280297Sjkimas_cr_digits='0123456789'
421280297Sjkimas_cr_alnum=$as_cr_Letters$as_cr_digits
422280297Sjkim
423280297Sjkim
424280297Sjkim  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425280297Sjkim  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426280297Sjkim  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427280297Sjkim  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428280297Sjkim  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
42955714Skris  sed -n '
43055714Skris    p
43155714Skris    /[$]LINENO/=
432280297Sjkim  ' <$as_myself |
433280297Sjkim    sed '
43455714Skris      s/[$]LINENO.*/&-/
435280297Sjkim      t lineno
436280297Sjkim      b
437280297Sjkim      :lineno
438280297Sjkim      N
439280297Sjkim      :loop
440280297Sjkim      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441280297Sjkim      t loop
442280297Sjkim      s/-\n.*//
44355714Skris    ' >$as_me.lineno &&
444280297Sjkim  chmod +x "$as_me.lineno" ||
445280297Sjkim    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446280297Sjkim
447280297Sjkim  # Don't try to exec as it changes $[0], causing all sort of problems
448280297Sjkim  # (the dirname of $[0] is not the place where we might find the
449280297Sjkim  # original and so on.  Autoconf is especially sensitive to this).
450280297Sjkim  . "./$as_me.lineno"
451280297Sjkim  # Exit status is that of the last command.
452280297Sjkim  exit
453280297Sjkim}
454280297Sjkim
455280297SjkimECHO_C= ECHO_N= ECHO_T=
456280297Sjkimcase `echo -n x` in #(((((
457280297Sjkim-n*)
458280297Sjkim  case `echo 'xy\c'` in
459280297Sjkim  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
46055714Skris  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='openjdk'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='openjdk jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL=''
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_CORES
603SJAVAC_SERVER_JAVA
604MEMORY_SIZE
605CONCURRENT_BUILD_JOBS
606NUM_CORES
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609LIBCXX
610LIBDL
611LIBM
612LIBZIP_CAN_USE_MMAP
613USE_EXTERNAL_LIBZ
614USE_EXTERNAL_LIBGIF
615USE_EXTERNAL_LIBJPEG
616ALSA_LIBS
617ALSA_CFLAGS
618FREETYPE2_LIB_PATH
619USING_SYSTEM_FT_LIB
620FREETYPE2_LIBS
621FREETYPE2_CFLAGS
622CUPS_LIBS
623CUPS_CFLAGS
624OPENWIN_HOME
625X_EXTRA_LIBS
626X_LIBS
627X_PRE_LIBS
628X_CFLAGS
629XMKMF
630CXXFLAGS_DEBUG_SYMBOLS
631CFLAGS_DEBUG_SYMBOLS
632ZIP_DEBUGINFO_FILES
633ENABLE_DEBUG_SYMBOLS
634UNCYGDRIVE
635LDFLAGS_CXX_JDK
636LDFLAGS_JDKEXE_SUFFIX
637LDFLAGS_JDKLIB_SUFFIX
638LDFLAGS_JDKEXE
639LDFLAGS_JDKLIB
640CXXFLAGS_JDKEXE
641CXXFLAGS_JDKLIB
642CFLAGS_JDKEXE
643CFLAGS_JDKLIB
644PACKAGE_PATH
645LEGACY_EXTRA_LDFLAGS
646LEGACY_EXTRA_CXXFLAGS
647LEGACY_EXTRA_CFLAGS
648CXX_FLAG_DEPS
649C_FLAG_DEPS
650CXX_O_FLAG_NONE
651CXX_O_FLAG_NORM
652CXX_O_FLAG_HI
653CXX_O_FLAG_HIGHEST
654C_O_FLAG_NONE
655C_O_FLAG_NORM
656C_O_FLAG_HI
657C_O_FLAG_HIGHEST
658POST_MCS_CMD
659POST_STRIP_CMD
660SET_EXECUTABLE_ORIGIN
661SET_SHARED_LIBRARY_ORIGIN
662CXX_FLAG_REORDER
663C_FLAG_REORDER
664SET_SHARED_LIBRARY_MAPFILE
665SET_SHARED_LIBRARY_NAME
666SHARED_LIBRARY_FLAGS
667EXE_SUFFIX
668STATIC_LIBRARY_SUFFIX
669SHARED_LIBRARY_SUFFIX
670LIBRARY_PREFIX
671STATIC_LIBRARY
672SHARED_LIBRARY
673OBJ_SUFFIX
674LIPO
675OBJCOPY
676MCS
677STRIP
678NM
679AS
680CXXCPP
681CPP
682COMPILER_TYPE
683RC_FLAGS
684DUMPBIN
685WINAR
686RC
687MT
688WINLD
689ARFLAGS
690AR
691LDEXECXX
692LDCXX
693LDEXE
694LD
695ac_ct_OBJC
696OBJCFLAGS
697OBJC
698ac_ct_CXX
699CXXFLAGS
700CXX
701OBJEXT
702EXEEXT
703ac_ct_CC
704CPPFLAGS
705LDFLAGS
706CFLAGS
707CC
708BUILD_LD
709BUILD_CXX
710BUILD_CC
711MSVCR100DLL
712CHECK_FOR_VCINSTALLDIR
713SETUPDEVENV
714CYGWIN_LINK
715AR_OUT_OPTION
716LD_OUT_OPTION
717EXE_OUT_OPTION
718CC_OUT_OPTION
719BUILD_OUTPUT
720OVERRIDE_SRC_ROOT
721ADD_SRC_ROOT
722JDK_TOPDIR
723HOTSPOT_TOPDIR
724JAXWS_TOPDIR
725JAXP_TOPDIR
726CORBA_TOPDIR
727LANGTOOLS_TOPDIR
728BOOT_JDK_JVMARGS
729JAVAC_FLAGS
730BOOT_JDK_SOURCETARGET
731BOOT_JDK
732BOOT_TOOLSJAR
733BOOT_RTJAR
734JAVA_CHECK
735JAVAC_CHECK
736OUTPUT_ROOT
737CONF_NAME
738SPEC
739COOKED_BUILD_NUMBER
740FULL_VERSION
741RELEASE
742JDK_VERSION
743RUNTIME_NAME
744COPYRIGHT_YEAR
745COMPANY_NAME
746JDK_RC_PLATFORM_NAME
747PRODUCT_SUFFIX
748PRODUCT_NAME
749LAUNCHER_NAME
750MILESTONE
751JDK_BUILD_NUMBER
752JDK_UPDATE_VERSION
753JDK_MICRO_VERSION
754JDK_MINOR_VERSION
755JDK_MAJOR_VERSION
756ENABLE_JFR
757COMPRESS_JARS
758CACERTS_FILE
759TEST_IN_BUILD
760DISABLE_NIMBUS
761BUILD_HEADLESS
762SUPPORT_HEADFUL
763SUPPORT_HEADLESS
764JIGSAW
765SET_OPENJDK
766BUILD_VARIANT_RELEASE
767DEBUG_CLASSFILES
768FASTDEBUG
769VARIANT
770DEBUG_LEVEL
771MACOSX_UNIVERSAL
772JVM_VARIANT_ZEROSHARK
773JVM_VARIANT_ZERO
774JVM_VARIANT_KERNEL
775JVM_VARIANT_CLIENT
776JVM_VARIANT_SERVER
777JVM_VARIANTS
778JDK_VARIANT
779BDEPS_FTP
780BDEPS_UNZIP
781OS_VERSION_MICRO
782OS_VERSION_MINOR
783OS_VERSION_MAJOR
784PKG_CONFIG
785HG
786OBJDUMP
787READELF
788OTOOL
789LDD
790THEPWDCMD
791FIND_DELETE
792RM
793MAKE
794CHECK_TOOLSDIR_MAKE
795CHECK_TOOLSDIR_GMAKE
796CHECK_MAKE
797CHECK_GMAKE
798NAWK
799SED
800FGREP
801EGREP
802GREP
803AWK
804ZIP
805XARGS
806WC
807UNZIP
808UNIQ
809TR
810TOUCH
811TEE
812TAR
813TAIL
814SORT
815SH
816PRINTF
817MV
818MKDIR
819LS
820LN
821HEAD
822FIND
823FILE
824EXPR
825ECHO
826DIFF
827DF
828DATE
829CUT
830CPIO
831CP
832CMP
833CHMOD
834CAT
835BASENAME
836PKGHANDLER
837BUILD_LOG_WRAPPER
838BUILD_LOG_PREVIOUS
839BUILD_LOG
840SYS_ROOT
841PATH_SEP
842CYGPATH
843SRC_ROOT
844READLINK
845DEFINE_CROSS_COMPILE_ARCH
846LP64
847OPENJDK_TARGET_OS_API_DIR
848OPENJDK_TARGET_CPU_JLI_CFLAGS
849OPENJDK_TARGET_CPU_OSARCH
850OPENJDK_TARGET_CPU_ISADIR
851OPENJDK_TARGET_CPU_LIBDIR
852OPENJDK_TARGET_CPU_LEGACY_LIB
853OPENJDK_TARGET_CPU_LEGACY
854REQUIRED_OS_VERSION
855REQUIRED_OS_NAME
856COMPILE_TYPE
857OPENJDK_BUILD_CPU_ENDIAN
858OPENJDK_BUILD_CPU_BITS
859OPENJDK_BUILD_CPU_ARCH
860OPENJDK_BUILD_CPU
861OPENJDK_BUILD_OS_API
862OPENJDK_BUILD_OS
863OPENJDK_TARGET_CPU_ENDIAN
864OPENJDK_TARGET_CPU_BITS
865OPENJDK_TARGET_CPU_ARCH
866OPENJDK_TARGET_CPU
867OPENJDK_TARGET_OS_API
868OPENJDK_TARGET_OS
869OPENJDK_BUILD_AUTOCONF_NAME
870OPENJDK_TARGET_AUTOCONF_NAME
871target_os
872target_vendor
873target_cpu
874target
875host_os
876host_vendor
877host_cpu
878host
879build_os
880build_vendor
881build_cpu
882build
883DATE_WHEN_CONFIGURED
884CONFIGURE_COMMAND_LINE
885CUSTOM_MAKE_DIR
886target_alias
887host_alias
888build_alias
889LIBS
890ECHO_T
891ECHO_N
892ECHO_C
893DEFS
894mandir
895localedir
896libdir
897psdir
898pdfdir
899dvidir
900htmldir
901infodir
902docdir
903oldincludedir
904includedir
905localstatedir
906sharedstatedir
907sysconfdir
908datadir
909datarootdir
910libexecdir
911sbindir
912bindir
913program_transform_name
914prefix
915exec_prefix
916PACKAGE_URL
917PACKAGE_BUGREPORT
918PACKAGE_STRING
919PACKAGE_VERSION
920PACKAGE_TARNAME
921PACKAGE_NAME
922PATH_SEPARATOR
923SHELL'
924ac_subst_files=''
925ac_user_opts='
926enable_option_checking
927with_custom_make_dir
928with_target_bits
929with_sys_root
930with_tools_dir
931with_devkit
932with_builddeps_conf
933with_builddeps_server
934with_builddeps_dir
935with_builddeps_group
936enable_list_builddeps
937with_jdk_variant
938with_jvm_variants
939enable_debug
940with_debug_level
941enable_openjdk_only
942enable_jigsaw
943enable_headful
944enable_nimbus
945enable_hotspot_test_in_build
946with_cacerts_file
947enable_jfr
948with_conf_name
949with_boot_jdk
950with_boot_jdk_jvmargs
951with_add_source_root
952with_override_source_root
953with_adds_and_overrides
954with_override_langtools
955with_override_corba
956with_override_jaxp
957with_override_jaxws
958with_override_hotspot
959with_override_jdk
960with_msvcr100dll
961with_extra_cflags
962with_extra_cxxflags
963with_extra_ldflags
964enable_debug_symbols
965enable_zip_debug_info
966enable_macosx_runtime_support
967with_x
968with_cups
969with_cups_include
970with_cups_lib
971with_freetype
972with_alsa
973with_alsa_include
974with_alsa_lib
975with_zlib
976enable_static_link_stdc__
977with_num_cores
978with_memory_size
979with_sjavac_server_java
980with_sjavac_server_cores
981enable_sjavac
982enable_precompiled_headers
983enable_ccache
984with_ccache_dir
985'
986      ac_precious_vars='build_alias
987host_alias
988target_alias
989PKG_CONFIG
990CC
991CFLAGS
992LDFLAGS
993LIBS
994CPPFLAGS
995CXX
996CXXFLAGS
997CCC
998OBJC
999OBJCFLAGS
1000CPP
1001CXXCPP
1002XMKMF
1003FREETYPE2_CFLAGS
1004FREETYPE2_LIBS
1005ALSA_CFLAGS
1006ALSA_LIBS'
1007
1008
1009# Initialize some variables set by options.
1010ac_init_help=
1011ac_init_version=false
1012ac_unrecognized_opts=
1013ac_unrecognized_sep=
1014# The variables have the same names as the options, with
1015# dashes changed to underlines.
1016cache_file=/dev/null
1017exec_prefix=NONE
1018no_create=
1019no_recursion=
1020prefix=NONE
1021program_prefix=NONE
1022program_suffix=NONE
1023program_transform_name=s,x,x,
1024silent=
1025site=
1026srcdir=
1027verbose=
1028x_includes=NONE
1029x_libraries=NONE
1030
1031# Installation directory options.
1032# These are left unexpanded so users can "make install exec_prefix=/foo"
1033# and all the variables that are supposed to be based on exec_prefix
1034# by default will actually change.
1035# Use braces instead of parens because sh, perl, etc. also accept them.
1036# (The list follows the same order as the GNU Coding Standards.)
1037bindir='${exec_prefix}/bin'
1038sbindir='${exec_prefix}/sbin'
1039libexecdir='${exec_prefix}/libexec'
1040datarootdir='${prefix}/share'
1041datadir='${datarootdir}'
1042sysconfdir='${prefix}/etc'
1043sharedstatedir='${prefix}/com'
1044localstatedir='${prefix}/var'
1045includedir='${prefix}/include'
1046oldincludedir='/usr/include'
1047docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1048infodir='${datarootdir}/info'
1049htmldir='${docdir}'
1050dvidir='${docdir}'
1051pdfdir='${docdir}'
1052psdir='${docdir}'
1053libdir='${exec_prefix}/lib'
1054localedir='${datarootdir}/locale'
1055mandir='${datarootdir}/man'
1056
1057ac_prev=
1058ac_dashdash=
1059for ac_option
1060do
1061  # If the previous option needs an argument, assign it.
1062  if test -n "$ac_prev"; then
1063    eval $ac_prev=\$ac_option
1064    ac_prev=
1065    continue
1066  fi
1067
1068  case $ac_option in
1069  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1070  *=)   ac_optarg= ;;
1071  *)    ac_optarg=yes ;;
1072  esac
1073
1074  # Accept the important Cygnus configure options, so we can diagnose typos.
1075
1076  case $ac_dashdash$ac_option in
1077  --)
1078    ac_dashdash=yes ;;
1079
1080  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1081    ac_prev=bindir ;;
1082  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1083    bindir=$ac_optarg ;;
1084
1085  -build | --build | --buil | --bui | --bu)
1086    ac_prev=build_alias ;;
1087  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1088    build_alias=$ac_optarg ;;
1089
1090  -cache-file | --cache-file | --cache-fil | --cache-fi \
1091  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1092    ac_prev=cache_file ;;
1093  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1094  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1095    cache_file=$ac_optarg ;;
1096
1097  --config-cache | -C)
1098    cache_file=config.cache ;;
1099
1100  -datadir | --datadir | --datadi | --datad)
1101    ac_prev=datadir ;;
1102  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1103    datadir=$ac_optarg ;;
1104
1105  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1106  | --dataroo | --dataro | --datar)
1107    ac_prev=datarootdir ;;
1108  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1109  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1110    datarootdir=$ac_optarg ;;
1111
1112  -disable-* | --disable-*)
1113    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1114    # Reject names that are not valid shell variable names.
1115    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1116      as_fn_error $? "invalid feature name: $ac_useropt"
1117    ac_useropt_orig=$ac_useropt
1118    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1119    case $ac_user_opts in
1120      *"
1121"enable_$ac_useropt"
1122"*) ;;
1123      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1124	 ac_unrecognized_sep=', ';;
1125    esac
1126    eval enable_$ac_useropt=no ;;
1127
1128  -docdir | --docdir | --docdi | --doc | --do)
1129    ac_prev=docdir ;;
1130  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1131    docdir=$ac_optarg ;;
1132
1133  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1134    ac_prev=dvidir ;;
1135  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1136    dvidir=$ac_optarg ;;
1137
1138  -enable-* | --enable-*)
1139    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1140    # Reject names that are not valid shell variable names.
1141    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1142      as_fn_error $? "invalid feature name: $ac_useropt"
1143    ac_useropt_orig=$ac_useropt
1144    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1145    case $ac_user_opts in
1146      *"
1147"enable_$ac_useropt"
1148"*) ;;
1149      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1150	 ac_unrecognized_sep=', ';;
1151    esac
1152    eval enable_$ac_useropt=\$ac_optarg ;;
1153
1154  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1155  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1156  | --exec | --exe | --ex)
1157    ac_prev=exec_prefix ;;
1158  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1159  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1160  | --exec=* | --exe=* | --ex=*)
1161    exec_prefix=$ac_optarg ;;
1162
1163  -gas | --gas | --ga | --g)
1164    # Obsolete; use --with-gas.
1165    with_gas=yes ;;
1166
1167  -help | --help | --hel | --he | -h)
1168    ac_init_help=long ;;
1169  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1170    ac_init_help=recursive ;;
1171  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1172    ac_init_help=short ;;
1173
1174  -host | --host | --hos | --ho)
1175    ac_prev=host_alias ;;
1176  -host=* | --host=* | --hos=* | --ho=*)
1177    host_alias=$ac_optarg ;;
1178
1179  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1180    ac_prev=htmldir ;;
1181  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1182  | --ht=*)
1183    htmldir=$ac_optarg ;;
1184
1185  -includedir | --includedir | --includedi | --included | --include \
1186  | --includ | --inclu | --incl | --inc)
1187    ac_prev=includedir ;;
1188  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1189  | --includ=* | --inclu=* | --incl=* | --inc=*)
1190    includedir=$ac_optarg ;;
1191
1192  -infodir | --infodir | --infodi | --infod | --info | --inf)
1193    ac_prev=infodir ;;
1194  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1195    infodir=$ac_optarg ;;
1196
1197  -libdir | --libdir | --libdi | --libd)
1198    ac_prev=libdir ;;
1199  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1200    libdir=$ac_optarg ;;
1201
1202  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1203  | --libexe | --libex | --libe)
1204    ac_prev=libexecdir ;;
1205  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1206  | --libexe=* | --libex=* | --libe=*)
1207    libexecdir=$ac_optarg ;;
1208
1209  -localedir | --localedir | --localedi | --localed | --locale)
1210    ac_prev=localedir ;;
1211  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1212    localedir=$ac_optarg ;;
1213
1214  -localstatedir | --localstatedir | --localstatedi | --localstated \
1215  | --localstate | --localstat | --localsta | --localst | --locals)
1216    ac_prev=localstatedir ;;
1217  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1218  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1219    localstatedir=$ac_optarg ;;
1220
1221  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1222    ac_prev=mandir ;;
1223  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1224    mandir=$ac_optarg ;;
1225
1226  -nfp | --nfp | --nf)
1227    # Obsolete; use --without-fp.
1228    with_fp=no ;;
1229
1230  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1231  | --no-cr | --no-c | -n)
1232    no_create=yes ;;
1233
1234  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1235  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1236    no_recursion=yes ;;
1237
1238  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1239  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1240  | --oldin | --oldi | --old | --ol | --o)
1241    ac_prev=oldincludedir ;;
1242  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1243  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1244  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1245    oldincludedir=$ac_optarg ;;
1246
1247  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1248    ac_prev=prefix ;;
1249  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1250    prefix=$ac_optarg ;;
1251
1252  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1253  | --program-pre | --program-pr | --program-p)
1254    ac_prev=program_prefix ;;
1255  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1256  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1257    program_prefix=$ac_optarg ;;
1258
1259  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1260  | --program-suf | --program-su | --program-s)
1261    ac_prev=program_suffix ;;
1262  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1263  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1264    program_suffix=$ac_optarg ;;
1265
1266  -program-transform-name | --program-transform-name \
1267  | --program-transform-nam | --program-transform-na \
1268  | --program-transform-n | --program-transform- \
1269  | --program-transform | --program-transfor \
1270  | --program-transfo | --program-transf \
1271  | --program-trans | --program-tran \
1272  | --progr-tra | --program-tr | --program-t)
1273    ac_prev=program_transform_name ;;
1274  -program-transform-name=* | --program-transform-name=* \
1275  | --program-transform-nam=* | --program-transform-na=* \
1276  | --program-transform-n=* | --program-transform-=* \
1277  | --program-transform=* | --program-transfor=* \
1278  | --program-transfo=* | --program-transf=* \
1279  | --program-trans=* | --program-tran=* \
1280  | --progr-tra=* | --program-tr=* | --program-t=*)
1281    program_transform_name=$ac_optarg ;;
1282
1283  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1284    ac_prev=pdfdir ;;
1285  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1286    pdfdir=$ac_optarg ;;
1287
1288  -psdir | --psdir | --psdi | --psd | --ps)
1289    ac_prev=psdir ;;
1290  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1291    psdir=$ac_optarg ;;
1292
1293  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1294  | -silent | --silent | --silen | --sile | --sil)
1295    silent=yes ;;
1296
1297  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1298    ac_prev=sbindir ;;
1299  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1300  | --sbi=* | --sb=*)
1301    sbindir=$ac_optarg ;;
1302
1303  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1304  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1305  | --sharedst | --shareds | --shared | --share | --shar \
1306  | --sha | --sh)
1307    ac_prev=sharedstatedir ;;
1308  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1309  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1310  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1311  | --sha=* | --sh=*)
1312    sharedstatedir=$ac_optarg ;;
1313
1314  -site | --site | --sit)
1315    ac_prev=site ;;
1316  -site=* | --site=* | --sit=*)
1317    site=$ac_optarg ;;
1318
1319  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1320    ac_prev=srcdir ;;
1321  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1322    srcdir=$ac_optarg ;;
1323
1324  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1325  | --syscon | --sysco | --sysc | --sys | --sy)
1326    ac_prev=sysconfdir ;;
1327  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1328  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1329    sysconfdir=$ac_optarg ;;
1330
1331  -target | --target | --targe | --targ | --tar | --ta | --t)
1332    ac_prev=target_alias ;;
1333  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1334    target_alias=$ac_optarg ;;
1335
1336  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1337    verbose=yes ;;
1338
1339  -version | --version | --versio | --versi | --vers | -V)
1340    ac_init_version=: ;;
1341
1342  -with-* | --with-*)
1343    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1344    # Reject names that are not valid shell variable names.
1345    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1346      as_fn_error $? "invalid package name: $ac_useropt"
1347    ac_useropt_orig=$ac_useropt
1348    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1349    case $ac_user_opts in
1350      *"
1351"with_$ac_useropt"
1352"*) ;;
1353      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1354	 ac_unrecognized_sep=', ';;
1355    esac
1356    eval with_$ac_useropt=\$ac_optarg ;;
1357
1358  -without-* | --without-*)
1359    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1360    # Reject names that are not valid shell variable names.
1361    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1362      as_fn_error $? "invalid package name: $ac_useropt"
1363    ac_useropt_orig=$ac_useropt
1364    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1365    case $ac_user_opts in
1366      *"
1367"with_$ac_useropt"
1368"*) ;;
1369      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1370	 ac_unrecognized_sep=', ';;
1371    esac
1372    eval with_$ac_useropt=no ;;
1373
1374  --x)
1375    # Obsolete; use --with-x.
1376    with_x=yes ;;
1377
1378  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1379  | --x-incl | --x-inc | --x-in | --x-i)
1380    ac_prev=x_includes ;;
1381  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1382  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1383    x_includes=$ac_optarg ;;
1384
1385  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1386  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1387    ac_prev=x_libraries ;;
1388  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1389  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1390    x_libraries=$ac_optarg ;;
1391
1392  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1393Try \`$0 --help' for more information"
1394    ;;
1395
1396  *=*)
1397    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1398    # Reject names that are not valid shell variable names.
1399    case $ac_envvar in #(
1400      '' | [0-9]* | *[!_$as_cr_alnum]* )
1401      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1402    esac
1403    eval $ac_envvar=\$ac_optarg
1404    export $ac_envvar ;;
1405
1406  *)
1407    # FIXME: should be removed in autoconf 3.0.
1408    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1409    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1410      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1411    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1412    ;;
1413
1414  esac
1415done
1416
1417if test -n "$ac_prev"; then
1418  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1419  as_fn_error $? "missing argument to $ac_option"
1420fi
1421
1422if test -n "$ac_unrecognized_opts"; then
1423  case $enable_option_checking in
1424    no) ;;
1425    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1426    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1427  esac
1428fi
1429
1430# Check all directory arguments for consistency.
1431for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1432		datadir sysconfdir sharedstatedir localstatedir includedir \
1433		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1434		libdir localedir mandir
1435do
1436  eval ac_val=\$$ac_var
1437  # Remove trailing slashes.
1438  case $ac_val in
1439    */ )
1440      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1441      eval $ac_var=\$ac_val;;
1442  esac
1443  # Be sure to have absolute directory names.
1444  case $ac_val in
1445    [\\/$]* | ?:[\\/]* )  continue;;
1446    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1447  esac
1448  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1449done
1450
1451# There might be people who depend on the old broken behavior: `$host'
1452# used to hold the argument of --host etc.
1453# FIXME: To remove some day.
1454build=$build_alias
1455host=$host_alias
1456target=$target_alias
1457
1458# FIXME: To remove some day.
1459if test "x$host_alias" != x; then
1460  if test "x$build_alias" = x; then
1461    cross_compiling=maybe
1462    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1463    If a cross compiler is detected then cross compile mode will be used" >&2
1464  elif test "x$build_alias" != "x$host_alias"; then
1465    cross_compiling=yes
1466  fi
1467fi
1468
1469ac_tool_prefix=
1470test -n "$host_alias" && ac_tool_prefix=$host_alias-
1471
1472test "$silent" = yes && exec 6>/dev/null
1473
1474
1475ac_pwd=`pwd` && test -n "$ac_pwd" &&
1476ac_ls_di=`ls -di .` &&
1477ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1478  as_fn_error $? "working directory cannot be determined"
1479test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1480  as_fn_error $? "pwd does not report name of working directory"
1481
1482
1483# Find the source files, if location was not specified.
1484if test -z "$srcdir"; then
1485  ac_srcdir_defaulted=yes
1486  # Try the directory containing this script, then the parent directory.
1487  ac_confdir=`$as_dirname -- "$as_myself" ||
1488$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1489	 X"$as_myself" : 'X\(//\)[^/]' \| \
1490	 X"$as_myself" : 'X\(//\)$' \| \
1491	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1492$as_echo X"$as_myself" |
1493    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1494	    s//\1/
1495	    q
1496	  }
1497	  /^X\(\/\/\)[^/].*/{
1498	    s//\1/
1499	    q
1500	  }
1501	  /^X\(\/\/\)$/{
1502	    s//\1/
1503	    q
1504	  }
1505	  /^X\(\/\).*/{
1506	    s//\1/
1507	    q
1508	  }
1509	  s/.*/./; q'`
1510  srcdir=$ac_confdir
1511  if test ! -r "$srcdir/$ac_unique_file"; then
1512    srcdir=..
1513  fi
1514else
1515  ac_srcdir_defaulted=no
1516fi
1517if test ! -r "$srcdir/$ac_unique_file"; then
1518  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1519  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1520fi
1521ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1522ac_abs_confdir=`(
1523	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1524	pwd)`
1525# When building in place, set srcdir=.
1526if test "$ac_abs_confdir" = "$ac_pwd"; then
1527  srcdir=.
1528fi
1529# Remove unnecessary trailing slashes from srcdir.
1530# Double slashes in file names in object file debugging info
1531# mess up M-x gdb in Emacs.
1532case $srcdir in
1533*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1534esac
1535for ac_var in $ac_precious_vars; do
1536  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1537  eval ac_env_${ac_var}_value=\$${ac_var}
1538  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1539  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1540done
1541
1542#
1543# Report the --help message.
1544#
1545if test "$ac_init_help" = "long"; then
1546  # Omit some internal or obsolete options to make the list less imposing.
1547  # This message is too long to be a string in the A/UX 3.1 sh.
1548  cat <<_ACEOF
1549\`configure' configures openjdk jdk8 to adapt to many kinds of systems.
1550
1551Usage: $0 [OPTION]... [VAR=VALUE]...
1552
1553To assign environment variables (e.g., CC, CFLAGS...), specify them as
1554VAR=VALUE.  See below for descriptions of some of the useful variables.
1555
1556Defaults for the options are specified in brackets.
1557
1558Configuration:
1559  -h, --help              display this help and exit
1560      --help=short        display options specific to this package
1561      --help=recursive    display the short help of all the included packages
1562  -V, --version           display version information and exit
1563  -q, --quiet, --silent   do not print \`checking ...' messages
1564      --cache-file=FILE   cache test results in FILE [disabled]
1565  -C, --config-cache      alias for \`--cache-file=config.cache'
1566  -n, --no-create         do not create output files
1567      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1568
1569Installation directories:
1570  --prefix=PREFIX         install architecture-independent files in PREFIX
1571                          [$ac_default_prefix]
1572  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1573                          [PREFIX]
1574
1575By default, \`make install' will install all the files in
1576\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1577an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1578for instance \`--prefix=\$HOME'.
1579
1580For better control, use the options below.
1581
1582Fine tuning of the installation directories:
1583  --bindir=DIR            user executables [EPREFIX/bin]
1584  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1585  --libexecdir=DIR        program executables [EPREFIX/libexec]
1586  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1587  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1588  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1589  --libdir=DIR            object code libraries [EPREFIX/lib]
1590  --includedir=DIR        C header files [PREFIX/include]
1591  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1592  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1593  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1594  --infodir=DIR           info documentation [DATAROOTDIR/info]
1595  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1596  --mandir=DIR            man documentation [DATAROOTDIR/man]
1597  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1598  --htmldir=DIR           html documentation [DOCDIR]
1599  --dvidir=DIR            dvi documentation [DOCDIR]
1600  --pdfdir=DIR            pdf documentation [DOCDIR]
1601  --psdir=DIR             ps documentation [DOCDIR]
1602_ACEOF
1603
1604  cat <<\_ACEOF
1605
1606X features:
1607  --x-includes=DIR    X include files are in DIR
1608  --x-libraries=DIR   X library files are in DIR
1609
1610System types:
1611  --build=BUILD     configure for building on BUILD [guessed]
1612  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1613  --target=TARGET   configure for building compilers for TARGET [HOST]
1614_ACEOF
1615fi
1616
1617if test -n "$ac_init_help"; then
1618  case $ac_init_help in
1619     short | recursive ) echo "Configuration of openjdk jdk8:";;
1620   esac
1621  cat <<\_ACEOF
1622
1623Optional Features:
1624  --disable-option-checking  ignore unrecognized --enable/--with options
1625  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1626  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1627  --enable-list-builddeps list all build dependencies known to the configure
1628                          script
1629  --enable-debug          set the debug level to fastdebug (shorthand for
1630                          --with-debug-level=fastdebug) [disabled]
1631  --enable-openjdk-only   build OpenJDK regardless of the presence of closed
1632                          repositories [disabled]
1633  --enable-jigsaw         build Jigsaw images (not yet available) [disabled]
1634  --disable-headful       build headful support (graphical UI support)
1635                          [enabled]
1636  --disable-nimbus        disable Nimbus L&F [enabled]
1637  --enable-hotspot-test-in-build
1638                          enable running of Queens test after Hotspot build
1639                          (not yet available) [disabled]
1640  --enable-jfr            enable jfr (default is no)
1641	ENABLE_JFR="${enableval}"
1642  --disable-debug-symbols disable generation of debug symbols ([enabled])
1643  --disable-zip-debug-info
1644                          don't zip debug-info files ([enabled@:@)
1645  --disable-macosx-runtime-support
1646                          disable the use of MacOSX Java runtime support
1647                          framework [enabled]
1648  --disable-static-link-stdc++
1649                          disable static linking of the C++ runtime on Linux
1650                          [enabled]
1651  --enable-sjavac         use sjavac to do fast incremental compiles
1652                          [disabled]
1653  --disable-precompiled-headers
1654                          use precompiled headers when compiling C++ [enabled]
1655  --disable-ccache        use ccache to speed up recompilations [enabled]
1656
1657Optional Packages:
1658  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1659  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1660  --with-custom-make-dir  directory containing custom build/make files
1661  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1662                          support it), e.g. --with-target-bits=32 [guessed]
1663  --with-sys-root         pass this sys-root to the compilers and linker
1664                          (useful if the sys-root encoded in the cross
1665                          compiler tools is incorrect)
1666  --with-tools-dir        search this directory for (cross-compiling)
1667                          compilers and tools
1668  --with-devkit           use this directory as base for tools-dir and
1669                          sys-root (for cross-compiling)
1670  --with-builddeps-conf   use this configuration file for the builddeps
1671  --with-builddeps-server download and use build dependencies from this server
1672                          url, e.g.
1673                          --with-builddeps-server=ftp://example.com/dir
1674  --with-builddeps-dir    store downloaded build dependencies here
1675                          [d/localhome/builddeps]
1676  --with-builddeps-group  chgrp the downloaded build dependencies to this
1677                          group
1678  --with-jdk-variant      JDK variant to build (normal) [normal]
1679  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1680                          client, kernel, zero, zeroshark) [server]
1681  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1682                          [release]
1683  --with-cacerts-file     specify alternative cacerts file
1684  --with-conf-name        use this as the name of the configuration,
1685                          overriding the generated default
1686  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1687  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1688                          invocations of the Boot JDK, overriding the default
1689                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1690                          -enableassertions"
1691  --with-add-source-root  for each and every source directory, look in this
1692                          additional source root for the same directory; if it
1693                          exists and have files in it, include it in the build
1694  --with-override-source-root
1695                          for each and every source directory, look in this
1696                          override source root for the same directory; if it
1697                          exists, use that directory instead and ignore the
1698                          directory in the original source root
1699  --with-adds-and-overrides
1700                          use the subdirs 'adds' and 'overrides' in the
1701                          specified directory as add-source-root and
1702                          override-source-root
1703  --with-override-langtools
1704                          use this langtools dir for the build
1705  --with-override-corba   use this corba dir for the build
1706  --with-override-jaxp    use this jaxp dir for the build
1707  --with-override-jaxws   use this jaxws dir for the build
1708  --with-override-hotspot use this hotspot dir for the build
1709  --with-override-jdk     use this jdk dir for the build
1710  --with-msvcr100dll      copy this msvcr100.dll into the built JDK
1711  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1712  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1713  --with-extra-ldflags    extra flags to be used when linking jdk
1714  --with-x                use the X Window System
1715  --with-cups             specify prefix directory for the cups package
1716                          (expecting the libraries under PATH/lib and the
1717                          headers under PATH/include)
1718  --with-cups-include     specify directory for the cups include files
1719  --with-cups-lib         specify directory for the cups library
1720  --with-freetype         specify prefix directory for the freetype2 package
1721                          (expecting the libraries under PATH/lib and the
1722                          headers under PATH/include)
1723  --with-alsa             specify prefix directory for the alsa package
1724                          (expecting the libraries under PATH/lib and the
1725                          headers under PATH/include)
1726  --with-alsa-include     specify directory for the alsa include files
1727  --with-alsa-lib         specify directory for the alsa library
1728  --with-zlib             use zlib from build system or OpenJDK source
1729                          (system, bundled) [bundled]
1730  --with-num-cores        number of cores in the build system, e.g.
1731                          --with-num-cores=8 [probed]
1732  --with-memory-size      memory (in MB) available in the build system, e.g.
1733                          --with-memory-size=1024 [probed]
1734  --with-sjavac-server-java
1735                          use this java binary for running the sjavac
1736                          background server and other long running java tasks
1737                          in the build process, e.g.
1738                          ---with-sjavac-server-java="/opt/jrockit/bin/java
1739                          -server"
1740  --with-sjavac-server-cores
1741                          use at most this number of concurrent threads on the
1742                          sjavac server [probed]
1743  --with-ccache-dir       where to store ccache files [~/.ccache]
1744
1745Some influential environment variables:
1746  PKG_CONFIG  path to pkg-config utility
1747  CC          C compiler command
1748  CFLAGS      C compiler flags
1749  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1750              nonstandard directory <lib dir>
1751  LIBS        libraries to pass to the linker, e.g. -l<library>
1752  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1753              you have headers in a nonstandard directory <include dir>
1754  CXX         C++ compiler command
1755  CXXFLAGS    C++ compiler flags
1756  OBJC        Objective C compiler command
1757  OBJCFLAGS   Objective C compiler flags
1758  CPP         C preprocessor
1759  CXXCPP      C++ preprocessor
1760  XMKMF       Path to xmkmf, Makefile generator for X Window System
1761  FREETYPE2_CFLAGS
1762              C compiler flags for FREETYPE2, overriding pkg-config
1763  FREETYPE2_LIBS
1764              linker flags for FREETYPE2, overriding pkg-config
1765  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1766  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1767
1768Use these variables to override the choices made by `configure' or to help
1769it to find libraries and programs with nonstandard names/locations.
1770
1771Report bugs to <build-dev@openjdk.java.net>.
1772_ACEOF
1773ac_status=$?
1774fi
1775
1776if test "$ac_init_help" = "recursive"; then
1777  # If there are subdirs, report their specific --help.
1778  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1779    test -d "$ac_dir" ||
1780      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1781      continue
1782    ac_builddir=.
1783
1784case "$ac_dir" in
1785.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1786*)
1787  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1788  # A ".." for each directory in $ac_dir_suffix.
1789  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1790  case $ac_top_builddir_sub in
1791  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1792  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1793  esac ;;
1794esac
1795ac_abs_top_builddir=$ac_pwd
1796ac_abs_builddir=$ac_pwd$ac_dir_suffix
1797# for backward compatibility:
1798ac_top_builddir=$ac_top_build_prefix
1799
1800case $srcdir in
1801  .)  # We are building in place.
1802    ac_srcdir=.
1803    ac_top_srcdir=$ac_top_builddir_sub
1804    ac_abs_top_srcdir=$ac_pwd ;;
1805  [\\/]* | ?:[\\/]* )  # Absolute name.
1806    ac_srcdir=$srcdir$ac_dir_suffix;
1807    ac_top_srcdir=$srcdir
1808    ac_abs_top_srcdir=$srcdir ;;
1809  *) # Relative name.
1810    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1811    ac_top_srcdir=$ac_top_build_prefix$srcdir
1812    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1813esac
1814ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1815
1816    cd "$ac_dir" || { ac_status=$?; continue; }
1817    # Check for guested configure.
1818    if test -f "$ac_srcdir/configure.gnu"; then
1819      echo &&
1820      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1821    elif test -f "$ac_srcdir/configure"; then
1822      echo &&
1823      $SHELL "$ac_srcdir/configure" --help=recursive
1824    else
1825      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1826    fi || ac_status=$?
1827    cd "$ac_pwd" || { ac_status=$?; break; }
1828  done
1829fi
1830
1831test -n "$ac_init_help" && exit $ac_status
1832if $ac_init_version; then
1833  cat <<\_ACEOF
1834openjdk configure jdk8
1835generated by GNU Autoconf 2.67
1836
1837Copyright (C) 2010 Free Software Foundation, Inc.
1838This configure script is free software; the Free Software Foundation
1839gives unlimited permission to copy, distribute and modify it.
1840_ACEOF
1841  exit
1842fi
1843
1844## ------------------------ ##
1845## Autoconf initialization. ##
1846## ------------------------ ##
1847
1848# ac_fn_c_try_compile LINENO
1849# --------------------------
1850# Try to compile conftest.$ac_ext, and return whether this succeeded.
1851ac_fn_c_try_compile ()
1852{
1853  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1854  rm -f conftest.$ac_objext
1855  if { { ac_try="$ac_compile"
1856case "(($ac_try" in
1857  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1858  *) ac_try_echo=$ac_try;;
1859esac
1860eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1861$as_echo "$ac_try_echo"; } >&5
1862  (eval "$ac_compile") 2>conftest.err
1863  ac_status=$?
1864  if test -s conftest.err; then
1865    grep -v '^ *+' conftest.err >conftest.er1
1866    cat conftest.er1 >&5
1867    mv -f conftest.er1 conftest.err
1868  fi
1869  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1870  test $ac_status = 0; } && {
1871	 test -z "$ac_c_werror_flag" ||
1872	 test ! -s conftest.err
1873       } && test -s conftest.$ac_objext; then :
1874  ac_retval=0
1875else
1876  $as_echo "$as_me: failed program was:" >&5
1877sed 's/^/| /' conftest.$ac_ext >&5
1878
1879	ac_retval=1
1880fi
1881  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1882  as_fn_set_status $ac_retval
1883
1884} # ac_fn_c_try_compile
1885
1886# ac_fn_cxx_try_compile LINENO
1887# ----------------------------
1888# Try to compile conftest.$ac_ext, and return whether this succeeded.
1889ac_fn_cxx_try_compile ()
1890{
1891  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1892  rm -f conftest.$ac_objext
1893  if { { ac_try="$ac_compile"
1894case "(($ac_try" in
1895  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1896  *) ac_try_echo=$ac_try;;
1897esac
1898eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1899$as_echo "$ac_try_echo"; } >&5
1900  (eval "$ac_compile") 2>conftest.err
1901  ac_status=$?
1902  if test -s conftest.err; then
1903    grep -v '^ *+' conftest.err >conftest.er1
1904    cat conftest.er1 >&5
1905    mv -f conftest.er1 conftest.err
1906  fi
1907  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1908  test $ac_status = 0; } && {
1909	 test -z "$ac_cxx_werror_flag" ||
1910	 test ! -s conftest.err
1911       } && test -s conftest.$ac_objext; then :
1912  ac_retval=0
1913else
1914  $as_echo "$as_me: failed program was:" >&5
1915sed 's/^/| /' conftest.$ac_ext >&5
1916
1917	ac_retval=1
1918fi
1919  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1920  as_fn_set_status $ac_retval
1921
1922} # ac_fn_cxx_try_compile
1923
1924# ac_fn_objc_try_compile LINENO
1925# -----------------------------
1926# Try to compile conftest.$ac_ext, and return whether this succeeded.
1927ac_fn_objc_try_compile ()
1928{
1929  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930  rm -f conftest.$ac_objext
1931  if { { ac_try="$ac_compile"
1932case "(($ac_try" in
1933  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1934  *) ac_try_echo=$ac_try;;
1935esac
1936eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1937$as_echo "$ac_try_echo"; } >&5
1938  (eval "$ac_compile") 2>conftest.err
1939  ac_status=$?
1940  if test -s conftest.err; then
1941    grep -v '^ *+' conftest.err >conftest.er1
1942    cat conftest.er1 >&5
1943    mv -f conftest.er1 conftest.err
1944  fi
1945  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1946  test $ac_status = 0; } && {
1947	 test -z "$ac_objc_werror_flag" ||
1948	 test ! -s conftest.err
1949       } && test -s conftest.$ac_objext; then :
1950  ac_retval=0
1951else
1952  $as_echo "$as_me: failed program was:" >&5
1953sed 's/^/| /' conftest.$ac_ext >&5
1954
1955	ac_retval=1
1956fi
1957  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1958  as_fn_set_status $ac_retval
1959
1960} # ac_fn_objc_try_compile
1961
1962# ac_fn_c_try_cpp LINENO
1963# ----------------------
1964# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1965ac_fn_c_try_cpp ()
1966{
1967  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1968  if { { ac_try="$ac_cpp conftest.$ac_ext"
1969case "(($ac_try" in
1970  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1971  *) ac_try_echo=$ac_try;;
1972esac
1973eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1974$as_echo "$ac_try_echo"; } >&5
1975  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1976  ac_status=$?
1977  if test -s conftest.err; then
1978    grep -v '^ *+' conftest.err >conftest.er1
1979    cat conftest.er1 >&5
1980    mv -f conftest.er1 conftest.err
1981  fi
1982  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1983  test $ac_status = 0; } > conftest.i && {
1984	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1985	 test ! -s conftest.err
1986       }; then :
1987  ac_retval=0
1988else
1989  $as_echo "$as_me: failed program was:" >&5
1990sed 's/^/| /' conftest.$ac_ext >&5
1991
1992    ac_retval=1
1993fi
1994  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1995  as_fn_set_status $ac_retval
1996
1997} # ac_fn_c_try_cpp
1998
1999# ac_fn_cxx_try_cpp LINENO
2000# ------------------------
2001# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2002ac_fn_cxx_try_cpp ()
2003{
2004  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2005  if { { ac_try="$ac_cpp conftest.$ac_ext"
2006case "(($ac_try" in
2007  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2008  *) ac_try_echo=$ac_try;;
2009esac
2010eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2011$as_echo "$ac_try_echo"; } >&5
2012  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2013  ac_status=$?
2014  if test -s conftest.err; then
2015    grep -v '^ *+' conftest.err >conftest.er1
2016    cat conftest.er1 >&5
2017    mv -f conftest.er1 conftest.err
2018  fi
2019  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2020  test $ac_status = 0; } > conftest.i && {
2021	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2022	 test ! -s conftest.err
2023       }; then :
2024  ac_retval=0
2025else
2026  $as_echo "$as_me: failed program was:" >&5
2027sed 's/^/| /' conftest.$ac_ext >&5
2028
2029    ac_retval=1
2030fi
2031  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2032  as_fn_set_status $ac_retval
2033
2034} # ac_fn_cxx_try_cpp
2035
2036# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2037# ---------------------------------------------------------
2038# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2039# the include files in INCLUDES and setting the cache variable VAR
2040# accordingly.
2041ac_fn_cxx_check_header_mongrel ()
2042{
2043  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2044  if eval "test \"\${$3+set}\"" = set; then :
2045  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2046$as_echo_n "checking for $2... " >&6; }
2047if eval "test \"\${$3+set}\"" = set; then :
2048  $as_echo_n "(cached) " >&6
2049fi
2050eval ac_res=\$$3
2051	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2052$as_echo "$ac_res" >&6; }
2053else
2054  # Is the header compilable?
2055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2056$as_echo_n "checking $2 usability... " >&6; }
2057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h.  */
2059$4
2060#include <$2>
2061_ACEOF
2062if ac_fn_cxx_try_compile "$LINENO"; then :
2063  ac_header_compiler=yes
2064else
2065  ac_header_compiler=no
2066fi
2067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2069$as_echo "$ac_header_compiler" >&6; }
2070
2071# Is the header present?
2072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2073$as_echo_n "checking $2 presence... " >&6; }
2074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h.  */
2076#include <$2>
2077_ACEOF
2078if ac_fn_cxx_try_cpp "$LINENO"; then :
2079  ac_header_preproc=yes
2080else
2081  ac_header_preproc=no
2082fi
2083rm -f conftest.err conftest.i conftest.$ac_ext
2084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2085$as_echo "$ac_header_preproc" >&6; }
2086
2087# So?  What about this header?
2088case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2089  yes:no: )
2090    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2091$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2092    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2093$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2094    ;;
2095  no:yes:* )
2096    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2097$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2098    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2099$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2100    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2101$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2102    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2103$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2104    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2105$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2106( $as_echo "## ----------------------------------------- ##
2107## Report this to build-dev@openjdk.java.net ##
2108## ----------------------------------------- ##"
2109     ) | sed "s/^/$as_me: WARNING:     /" >&2
2110    ;;
2111esac
2112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2113$as_echo_n "checking for $2... " >&6; }
2114if eval "test \"\${$3+set}\"" = set; then :
2115  $as_echo_n "(cached) " >&6
2116else
2117  eval "$3=\$ac_header_compiler"
2118fi
2119eval ac_res=\$$3
2120	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2121$as_echo "$ac_res" >&6; }
2122fi
2123  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2124
2125} # ac_fn_cxx_check_header_mongrel
2126
2127# ac_fn_cxx_try_run LINENO
2128# ------------------------
2129# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2130# that executables *can* be run.
2131ac_fn_cxx_try_run ()
2132{
2133  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2134  if { { ac_try="$ac_link"
2135case "(($ac_try" in
2136  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2137  *) ac_try_echo=$ac_try;;
2138esac
2139eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2140$as_echo "$ac_try_echo"; } >&5
2141  (eval "$ac_link") 2>&5
2142  ac_status=$?
2143  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2144  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2145  { { case "(($ac_try" in
2146  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2147  *) ac_try_echo=$ac_try;;
2148esac
2149eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2150$as_echo "$ac_try_echo"; } >&5
2151  (eval "$ac_try") 2>&5
2152  ac_status=$?
2153  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2154  test $ac_status = 0; }; }; then :
2155  ac_retval=0
2156else
2157  $as_echo "$as_me: program exited with status $ac_status" >&5
2158       $as_echo "$as_me: failed program was:" >&5
2159sed 's/^/| /' conftest.$ac_ext >&5
2160
2161       ac_retval=$ac_status
2162fi
2163  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2164  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2165  as_fn_set_status $ac_retval
2166
2167} # ac_fn_cxx_try_run
2168
2169# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2170# ---------------------------------------------------------
2171# Tests whether HEADER exists and can be compiled using the include files in
2172# INCLUDES, setting the cache variable VAR accordingly.
2173ac_fn_cxx_check_header_compile ()
2174{
2175  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2176  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177$as_echo_n "checking for $2... " >&6; }
2178if eval "test \"\${$3+set}\"" = set; then :
2179  $as_echo_n "(cached) " >&6
2180else
2181  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h.  */
2183$4
2184#include <$2>
2185_ACEOF
2186if ac_fn_cxx_try_compile "$LINENO"; then :
2187  eval "$3=yes"
2188else
2189  eval "$3=no"
2190fi
2191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192fi
2193eval ac_res=\$$3
2194	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2195$as_echo "$ac_res" >&6; }
2196  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2197
2198} # ac_fn_cxx_check_header_compile
2199
2200# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2201# ----------------------------------------------
2202# Tries to find the compile-time value of EXPR in a program that includes
2203# INCLUDES, setting VAR accordingly. Returns whether the value could be
2204# computed
2205ac_fn_cxx_compute_int ()
2206{
2207  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2208  if test "$cross_compiling" = yes; then
2209    # Depending upon the size, compute the lo and hi bounds.
2210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2211/* end confdefs.h.  */
2212$4
2213int
2214main ()
2215{
2216static int test_array [1 - 2 * !(($2) >= 0)];
2217test_array [0] = 0
2218
2219  ;
2220  return 0;
2221}
2222_ACEOF
2223if ac_fn_cxx_try_compile "$LINENO"; then :
2224  ac_lo=0 ac_mid=0
2225  while :; do
2226    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h.  */
2228$4
2229int
2230main ()
2231{
2232static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2233test_array [0] = 0
2234
2235  ;
2236  return 0;
2237}
2238_ACEOF
2239if ac_fn_cxx_try_compile "$LINENO"; then :
2240  ac_hi=$ac_mid; break
2241else
2242  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2243			if test $ac_lo -le $ac_mid; then
2244			  ac_lo= ac_hi=
2245			  break
2246			fi
2247			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2248fi
2249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2250  done
2251else
2252  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h.  */
2254$4
2255int
2256main ()
2257{
2258static int test_array [1 - 2 * !(($2) < 0)];
2259test_array [0] = 0
2260
2261  ;
2262  return 0;
2263}
2264_ACEOF
2265if ac_fn_cxx_try_compile "$LINENO"; then :
2266  ac_hi=-1 ac_mid=-1
2267  while :; do
2268    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2269/* end confdefs.h.  */
2270$4
2271int
2272main ()
2273{
2274static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2275test_array [0] = 0
2276
2277  ;
2278  return 0;
2279}
2280_ACEOF
2281if ac_fn_cxx_try_compile "$LINENO"; then :
2282  ac_lo=$ac_mid; break
2283else
2284  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2285			if test $ac_mid -le $ac_hi; then
2286			  ac_lo= ac_hi=
2287			  break
2288			fi
2289			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2290fi
2291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292  done
2293else
2294  ac_lo= ac_hi=
2295fi
2296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2297fi
2298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2299# Binary search between lo and hi bounds.
2300while test "x$ac_lo" != "x$ac_hi"; do
2301  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2302  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h.  */
2304$4
2305int
2306main ()
2307{
2308static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2309test_array [0] = 0
2310
2311  ;
2312  return 0;
2313}
2314_ACEOF
2315if ac_fn_cxx_try_compile "$LINENO"; then :
2316  ac_hi=$ac_mid
2317else
2318  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2319fi
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321done
2322case $ac_lo in #((
2323?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2324'') ac_retval=1 ;;
2325esac
2326  else
2327    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2328/* end confdefs.h.  */
2329$4
2330static long int longval () { return $2; }
2331static unsigned long int ulongval () { return $2; }
2332#include <stdio.h>
2333#include <stdlib.h>
2334int
2335main ()
2336{
2337
2338  FILE *f = fopen ("conftest.val", "w");
2339  if (! f)
2340    return 1;
2341  if (($2) < 0)
2342    {
2343      long int i = longval ();
2344      if (i != ($2))
2345	return 1;
2346      fprintf (f, "%ld", i);
2347    }
2348  else
2349    {
2350      unsigned long int i = ulongval ();
2351      if (i != ($2))
2352	return 1;
2353      fprintf (f, "%lu", i);
2354    }
2355  /* Do not output a trailing newline, as this causes \r\n confusion
2356     on some platforms.  */
2357  return ferror (f) || fclose (f) != 0;
2358
2359  ;
2360  return 0;
2361}
2362_ACEOF
2363if ac_fn_cxx_try_run "$LINENO"; then :
2364  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2365else
2366  ac_retval=1
2367fi
2368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2369  conftest.$ac_objext conftest.beam conftest.$ac_ext
2370rm -f conftest.val
2371
2372  fi
2373  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2374  as_fn_set_status $ac_retval
2375
2376} # ac_fn_cxx_compute_int
2377
2378# ac_fn_cxx_try_link LINENO
2379# -------------------------
2380# Try to link conftest.$ac_ext, and return whether this succeeded.
2381ac_fn_cxx_try_link ()
2382{
2383  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2384  rm -f conftest.$ac_objext conftest$ac_exeext
2385  if { { ac_try="$ac_link"
2386case "(($ac_try" in
2387  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2388  *) ac_try_echo=$ac_try;;
2389esac
2390eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2391$as_echo "$ac_try_echo"; } >&5
2392  (eval "$ac_link") 2>conftest.err
2393  ac_status=$?
2394  if test -s conftest.err; then
2395    grep -v '^ *+' conftest.err >conftest.er1
2396    cat conftest.er1 >&5
2397    mv -f conftest.er1 conftest.err
2398  fi
2399  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2400  test $ac_status = 0; } && {
2401	 test -z "$ac_cxx_werror_flag" ||
2402	 test ! -s conftest.err
2403       } && test -s conftest$ac_exeext && {
2404	 test "$cross_compiling" = yes ||
2405	 $as_test_x conftest$ac_exeext
2406       }; then :
2407  ac_retval=0
2408else
2409  $as_echo "$as_me: failed program was:" >&5
2410sed 's/^/| /' conftest.$ac_ext >&5
2411
2412	ac_retval=1
2413fi
2414  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2415  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2416  # interfere with the next link command; also delete a directory that is
2417  # left behind by Apple's compiler.  We do this before executing the actions.
2418  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2419  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2420  as_fn_set_status $ac_retval
2421
2422} # ac_fn_cxx_try_link
2423
2424# ac_fn_cxx_check_func LINENO FUNC VAR
2425# ------------------------------------
2426# Tests whether FUNC exists, setting the cache variable VAR accordingly
2427ac_fn_cxx_check_func ()
2428{
2429  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2431$as_echo_n "checking for $2... " >&6; }
2432if eval "test \"\${$3+set}\"" = set; then :
2433  $as_echo_n "(cached) " >&6
2434else
2435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2436/* end confdefs.h.  */
2437/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2438   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2439#define $2 innocuous_$2
2440
2441/* System header to define __stub macros and hopefully few prototypes,
2442    which can conflict with char $2 (); below.
2443    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2444    <limits.h> exists even on freestanding compilers.  */
2445
2446#ifdef __STDC__
2447# include <limits.h>
2448#else
2449# include <assert.h>
2450#endif
2451
2452#undef $2
2453
2454/* Override any GCC internal prototype to avoid an error.
2455   Use char because int might match the return type of a GCC
2456   builtin and then its argument prototype would still apply.  */
2457#ifdef __cplusplus
2458extern "C"
2459#endif
2460char $2 ();
2461/* The GNU C library defines this for functions which it implements
2462    to always fail with ENOSYS.  Some functions are actually named
2463    something starting with __ and the normal name is an alias.  */
2464#if defined __stub_$2 || defined __stub___$2
2465choke me
2466#endif
2467
2468int
2469main ()
2470{
2471return $2 ();
2472  ;
2473  return 0;
2474}
2475_ACEOF
2476if ac_fn_cxx_try_link "$LINENO"; then :
2477  eval "$3=yes"
2478else
2479  eval "$3=no"
2480fi
2481rm -f core conftest.err conftest.$ac_objext \
2482    conftest$ac_exeext conftest.$ac_ext
2483fi
2484eval ac_res=\$$3
2485	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2486$as_echo "$ac_res" >&6; }
2487  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2488
2489} # ac_fn_cxx_check_func
2490
2491# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2492# -------------------------------------------------------
2493# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2494# the include files in INCLUDES and setting the cache variable VAR
2495# accordingly.
2496ac_fn_c_check_header_mongrel ()
2497{
2498  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2499  if eval "test \"\${$3+set}\"" = set; then :
2500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2501$as_echo_n "checking for $2... " >&6; }
2502if eval "test \"\${$3+set}\"" = set; then :
2503  $as_echo_n "(cached) " >&6
2504fi
2505eval ac_res=\$$3
2506	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2507$as_echo "$ac_res" >&6; }
2508else
2509  # Is the header compilable?
2510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2511$as_echo_n "checking $2 usability... " >&6; }
2512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2513/* end confdefs.h.  */
2514$4
2515#include <$2>
2516_ACEOF
2517if ac_fn_c_try_compile "$LINENO"; then :
2518  ac_header_compiler=yes
2519else
2520  ac_header_compiler=no
2521fi
2522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2524$as_echo "$ac_header_compiler" >&6; }
2525
2526# Is the header present?
2527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2528$as_echo_n "checking $2 presence... " >&6; }
2529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2530/* end confdefs.h.  */
2531#include <$2>
2532_ACEOF
2533if ac_fn_c_try_cpp "$LINENO"; then :
2534  ac_header_preproc=yes
2535else
2536  ac_header_preproc=no
2537fi
2538rm -f conftest.err conftest.i conftest.$ac_ext
2539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2540$as_echo "$ac_header_preproc" >&6; }
2541
2542# So?  What about this header?
2543case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2544  yes:no: )
2545    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2546$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2547    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2548$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2549    ;;
2550  no:yes:* )
2551    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2552$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2553    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2554$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2555    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2556$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2557    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2558$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2559    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2560$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2561( $as_echo "## ----------------------------------------- ##
2562## Report this to build-dev@openjdk.java.net ##
2563## ----------------------------------------- ##"
2564     ) | sed "s/^/$as_me: WARNING:     /" >&2
2565    ;;
2566esac
2567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2568$as_echo_n "checking for $2... " >&6; }
2569if eval "test \"\${$3+set}\"" = set; then :
2570  $as_echo_n "(cached) " >&6
2571else
2572  eval "$3=\$ac_header_compiler"
2573fi
2574eval ac_res=\$$3
2575	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2576$as_echo "$ac_res" >&6; }
2577fi
2578  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2579
2580} # ac_fn_c_check_header_mongrel
2581cat >config.log <<_ACEOF
2582This file contains any messages produced by compilers while
2583running configure, to aid debugging if configure makes a mistake.
2584
2585It was created by openjdk $as_me jdk8, which was
2586generated by GNU Autoconf 2.67.  Invocation command line was
2587
2588  $ $0 $@
2589
2590_ACEOF
2591exec 5>>config.log
2592{
2593cat <<_ASUNAME
2594## --------- ##
2595## Platform. ##
2596## --------- ##
2597
2598hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2599uname -m = `(uname -m) 2>/dev/null || echo unknown`
2600uname -r = `(uname -r) 2>/dev/null || echo unknown`
2601uname -s = `(uname -s) 2>/dev/null || echo unknown`
2602uname -v = `(uname -v) 2>/dev/null || echo unknown`
2603
2604/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2605/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2606
2607/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2608/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2609/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2610/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2611/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2612/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2613/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2614
2615_ASUNAME
2616
2617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2618for as_dir in $PATH
2619do
2620  IFS=$as_save_IFS
2621  test -z "$as_dir" && as_dir=.
2622    $as_echo "PATH: $as_dir"
2623  done
2624IFS=$as_save_IFS
2625
2626} >&5
2627
2628cat >&5 <<_ACEOF
2629
2630
2631## ----------- ##
2632## Core tests. ##
2633## ----------- ##
2634
2635_ACEOF
2636
2637
2638# Keep a trace of the command line.
2639# Strip out --no-create and --no-recursion so they do not pile up.
2640# Strip out --silent because we don't want to record it for future runs.
2641# Also quote any args containing shell meta-characters.
2642# Make two passes to allow for proper duplicate-argument suppression.
2643ac_configure_args=
2644ac_configure_args0=
2645ac_configure_args1=
2646ac_must_keep_next=false
2647for ac_pass in 1 2
2648do
2649  for ac_arg
2650  do
2651    case $ac_arg in
2652    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2653    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2654    | -silent | --silent | --silen | --sile | --sil)
2655      continue ;;
2656    *\'*)
2657      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2658    esac
2659    case $ac_pass in
2660    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2661    2)
2662      as_fn_append ac_configure_args1 " '$ac_arg'"
2663      if test $ac_must_keep_next = true; then
2664	ac_must_keep_next=false # Got value, back to normal.
2665      else
2666	case $ac_arg in
2667	  *=* | --config-cache | -C | -disable-* | --disable-* \
2668	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2669	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2670	  | -with-* | --with-* | -without-* | --without-* | --x)
2671	    case "$ac_configure_args0 " in
2672	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2673	    esac
2674	    ;;
2675	  -* ) ac_must_keep_next=true ;;
2676	esac
2677      fi
2678      as_fn_append ac_configure_args " '$ac_arg'"
2679      ;;
2680    esac
2681  done
2682done
2683{ ac_configure_args0=; unset ac_configure_args0;}
2684{ ac_configure_args1=; unset ac_configure_args1;}
2685
2686# When interrupted or exit'd, cleanup temporary files, and complete
2687# config.log.  We remove comments because anyway the quotes in there
2688# would cause problems or look ugly.
2689# WARNING: Use '\'' to represent an apostrophe within the trap.
2690# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2691trap 'exit_status=$?
2692  # Save into config.log some information that might help in debugging.
2693  {
2694    echo
2695
2696    $as_echo "## ---------------- ##
2697## Cache variables. ##
2698## ---------------- ##"
2699    echo
2700    # The following way of writing the cache mishandles newlines in values,
2701(
2702  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2703    eval ac_val=\$$ac_var
2704    case $ac_val in #(
2705    *${as_nl}*)
2706      case $ac_var in #(
2707      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2708$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2709      esac
2710      case $ac_var in #(
2711      _ | IFS | as_nl) ;; #(
2712      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2713      *) { eval $ac_var=; unset $ac_var;} ;;
2714      esac ;;
2715    esac
2716  done
2717  (set) 2>&1 |
2718    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2719    *${as_nl}ac_space=\ *)
2720      sed -n \
2721	"s/'\''/'\''\\\\'\'''\''/g;
2722	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2723      ;; #(
2724    *)
2725      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2726      ;;
2727    esac |
2728    sort
2729)
2730    echo
2731
2732    $as_echo "## ----------------- ##
2733## Output variables. ##
2734## ----------------- ##"
2735    echo
2736    for ac_var in $ac_subst_vars
2737    do
2738      eval ac_val=\$$ac_var
2739      case $ac_val in
2740      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2741      esac
2742      $as_echo "$ac_var='\''$ac_val'\''"
2743    done | sort
2744    echo
2745
2746    if test -n "$ac_subst_files"; then
2747      $as_echo "## ------------------- ##
2748## File substitutions. ##
2749## ------------------- ##"
2750      echo
2751      for ac_var in $ac_subst_files
2752      do
2753	eval ac_val=\$$ac_var
2754	case $ac_val in
2755	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2756	esac
2757	$as_echo "$ac_var='\''$ac_val'\''"
2758      done | sort
2759      echo
2760    fi
2761
2762    if test -s confdefs.h; then
2763      $as_echo "## ----------- ##
2764## confdefs.h. ##
2765## ----------- ##"
2766      echo
2767      cat confdefs.h
2768      echo
2769    fi
2770    test "$ac_signal" != 0 &&
2771      $as_echo "$as_me: caught signal $ac_signal"
2772    $as_echo "$as_me: exit $exit_status"
2773  } >&5
2774  rm -f core *.core core.conftest.* &&
2775    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2776    exit $exit_status
2777' 0
2778for ac_signal in 1 2 13 15; do
2779  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2780done
2781ac_signal=0
2782
2783# confdefs.h avoids OS command line length limits that DEFS can exceed.
2784rm -f -r conftest* confdefs.h
2785
2786$as_echo "/* confdefs.h */" > confdefs.h
2787
2788# Predefined preprocessor variables.
2789
2790cat >>confdefs.h <<_ACEOF
2791#define PACKAGE_NAME "$PACKAGE_NAME"
2792_ACEOF
2793
2794cat >>confdefs.h <<_ACEOF
2795#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2796_ACEOF
2797
2798cat >>confdefs.h <<_ACEOF
2799#define PACKAGE_VERSION "$PACKAGE_VERSION"
2800_ACEOF
2801
2802cat >>confdefs.h <<_ACEOF
2803#define PACKAGE_STRING "$PACKAGE_STRING"
2804_ACEOF
2805
2806cat >>confdefs.h <<_ACEOF
2807#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2808_ACEOF
2809
2810cat >>confdefs.h <<_ACEOF
2811#define PACKAGE_URL "$PACKAGE_URL"
2812_ACEOF
2813
2814
2815# Let the site file select an alternate cache file if it wants to.
2816# Prefer an explicitly selected file to automatically selected ones.
2817ac_site_file1=NONE
2818ac_site_file2=NONE
2819if test -n "$CONFIG_SITE"; then
2820  # We do not want a PATH search for config.site.
2821  case $CONFIG_SITE in #((
2822    -*)  ac_site_file1=./$CONFIG_SITE;;
2823    */*) ac_site_file1=$CONFIG_SITE;;
2824    *)   ac_site_file1=./$CONFIG_SITE;;
2825  esac
2826elif test "x$prefix" != xNONE; then
2827  ac_site_file1=$prefix/share/config.site
2828  ac_site_file2=$prefix/etc/config.site
2829else
2830  ac_site_file1=$ac_default_prefix/share/config.site
2831  ac_site_file2=$ac_default_prefix/etc/config.site
2832fi
2833for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2834do
2835  test "x$ac_site_file" = xNONE && continue
2836  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2837    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2838$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2839    sed 's/^/| /' "$ac_site_file" >&5
2840    . "$ac_site_file" \
2841      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2842$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2843as_fn_error $? "failed to load site script $ac_site_file
2844See \`config.log' for more details" "$LINENO" 5 ; }
2845  fi
2846done
2847
2848if test -r "$cache_file"; then
2849  # Some versions of bash will fail to source /dev/null (special files
2850  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2851  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2852    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2853$as_echo "$as_me: loading cache $cache_file" >&6;}
2854    case $cache_file in
2855      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2856      *)                      . "./$cache_file";;
2857    esac
2858  fi
2859else
2860  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2861$as_echo "$as_me: creating cache $cache_file" >&6;}
2862  >$cache_file
2863fi
2864
2865# Check that the precious variables saved in the cache have kept the same
2866# value.
2867ac_cache_corrupted=false
2868for ac_var in $ac_precious_vars; do
2869  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2870  eval ac_new_set=\$ac_env_${ac_var}_set
2871  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2872  eval ac_new_val=\$ac_env_${ac_var}_value
2873  case $ac_old_set,$ac_new_set in
2874    set,)
2875      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2876$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2877      ac_cache_corrupted=: ;;
2878    ,set)
2879      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2880$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2881      ac_cache_corrupted=: ;;
2882    ,);;
2883    *)
2884      if test "x$ac_old_val" != "x$ac_new_val"; then
2885	# differences in whitespace do not lead to failure.
2886	ac_old_val_w=`echo x $ac_old_val`
2887	ac_new_val_w=`echo x $ac_new_val`
2888	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2889	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2890$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2891	  ac_cache_corrupted=:
2892	else
2893	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2894$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2895	  eval $ac_var=\$ac_old_val
2896	fi
2897	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2898$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2899	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2900$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2901      fi;;
2902  esac
2903  # Pass precious variables to config.status.
2904  if test "$ac_new_set" = set; then
2905    case $ac_new_val in
2906    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2907    *) ac_arg=$ac_var=$ac_new_val ;;
2908    esac
2909    case " $ac_configure_args " in
2910      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2911      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2912    esac
2913  fi
2914done
2915if $ac_cache_corrupted; then
2916  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2918  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2919$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2920  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2921fi
2922## -------------------- ##
2923## Main body of script. ##
2924## -------------------- ##
2925
2926ac_ext=c
2927ac_cpp='$CPP $CPPFLAGS'
2928ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2929ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2930ac_compiler_gnu=$ac_cv_c_compiler_gnu
2931
2932
2933
2934# Do not change or remove the following line, it is needed for consistency checks:
2935# DATE_WHEN_GENERATED: 1347963060
2936
2937ac_aux_dir=
2938for ac_dir in build-aux "$srcdir"/build-aux; do
2939  if test -f "$ac_dir/install-sh"; then
2940    ac_aux_dir=$ac_dir
2941    ac_install_sh="$ac_aux_dir/install-sh -c"
2942    break
2943  elif test -f "$ac_dir/install.sh"; then
2944    ac_aux_dir=$ac_dir
2945    ac_install_sh="$ac_aux_dir/install.sh -c"
2946    break
2947  elif test -f "$ac_dir/shtool"; then
2948    ac_aux_dir=$ac_dir
2949    ac_install_sh="$ac_aux_dir/shtool install -c"
2950    break
2951  fi
2952done
2953if test -z "$ac_aux_dir"; then
2954  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2955fi
2956
2957# These three variables are undocumented and unsupported,
2958# and are intended to be withdrawn in a future Autoconf release.
2959# They can cause serious problems if a builder's source tree is in a directory
2960# whose full name contains unusual characters.
2961ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2962ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2963ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2964
2965
2966# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2967#
2968# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2969#
2970# This program is free software; you can redistribute it and/or modify
2971# it under the terms of the GNU General Public License as published by
2972# the Free Software Foundation; either version 2 of the License, or
2973# (at your option) any later version.
2974#
2975# This program is distributed in the hope that it will be useful, but
2976# WITHOUT ANY WARRANTY; without even the implied warranty of
2977# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2978# General Public License for more details.
2979#
2980# You should have received a copy of the GNU General Public License
2981# along with this program; if not, write to the Free Software
2982# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2983#
2984# As a special exception to the GNU General Public License, if you
2985# distribute this file as part of a program that contains a
2986# configuration script generated by Autoconf, you may include it under
2987# the same distribution terms that you use for the rest of that program.
2988
2989# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2990# ----------------------------------
2991# PKG_PROG_PKG_CONFIG
2992
2993# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2994#
2995# Check to see whether a particular set of modules exists.  Similar
2996# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2997#
2998#
2999# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3000# this or PKG_CHECK_MODULES is called, or make sure to call
3001# PKG_CHECK_EXISTS manually
3002# --------------------------------------------------------------
3003
3004
3005
3006# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3007# ---------------------------------------------
3008# _PKG_CONFIG
3009
3010# _PKG_SHORT_ERRORS_SUPPORTED
3011# -----------------------------
3012# _PKG_SHORT_ERRORS_SUPPORTED
3013
3014
3015# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3016# [ACTION-IF-NOT-FOUND])
3017#
3018#
3019# Note that if there is a possibility the first call to
3020# PKG_CHECK_MODULES might not happen, you should be sure to include an
3021# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3022#
3023#
3024# --------------------------------------------------------------
3025# PKG_CHECK_MODULES
3026
3027
3028# Include these first...
3029#
3030# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3031# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3032#
3033# This code is free software; you can redistribute it and/or modify it
3034# under the terms of the GNU General Public License version 2 only, as
3035# published by the Free Software Foundation.  Oracle designates this
3036# particular file as subject to the "Classpath" exception as provided
3037# by Oracle in the LICENSE file that accompanied this code.
3038#
3039# This code is distributed in the hope that it will be useful, but WITHOUT
3040# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3041# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3042# version 2 for more details (a copy is included in the LICENSE file that
3043# accompanied this code).
3044#
3045# You should have received a copy of the GNU General Public License version
3046# 2 along with this work; if not, write to the Free Software Foundation,
3047# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3048#
3049# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3050# or visit www.oracle.com if you need additional information or have any
3051# questions.
3052#
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3067
3068
3069
3070
3071
3072
3073
3074#%%% Simple tools %%%
3075
3076# Check if we have found a usable version of make
3077# $1: the path to a potential make binary (or empty)
3078# $2: the description on how we found this
3079
3080
3081# Goes looking for a usable version of GNU make.
3082
3083
3084
3085
3086# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3087# $1: variable to check
3088# $2: executable name to print in warning (optional)
3089
3090
3091# Does AC_PATH_PROG followed by CHECK_NONEMPTY.
3092# Arguments as AC_PATH_PROG:
3093# $1: variable to set
3094# $2: executable name to look for
3095
3096
3097
3098
3099
3100
3101
3102# Check if build directory is on local disk.
3103# Argument 1: directory to test
3104# Argument 2: what to do if it is on local disk
3105# Argument 3: what to do otherwise (remote disk or failure)
3106
3107
3108
3109
3110#
3111# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3112# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3113#
3114# This code is free software; you can redistribute it and/or modify it
3115# under the terms of the GNU General Public License version 2 only, as
3116# published by the Free Software Foundation.  Oracle designates this
3117# particular file as subject to the "Classpath" exception as provided
3118# by Oracle in the LICENSE file that accompanied this code.
3119#
3120# This code is distributed in the hope that it will be useful, but WITHOUT
3121# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3122# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3123# version 2 for more details (a copy is included in the LICENSE file that
3124# accompanied this code).
3125#
3126# You should have received a copy of the GNU General Public License version
3127# 2 along with this work; if not, write to the Free Software Foundation,
3128# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3129#
3130# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3131# or visit www.oracle.com if you need additional information or have any
3132# questions.
3133#
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145# ... then the rest
3146#
3147# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3148# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3149#
3150# This code is free software; you can redistribute it and/or modify it
3151# under the terms of the GNU General Public License version 2 only, as
3152# published by the Free Software Foundation.  Oracle designates this
3153# particular file as subject to the "Classpath" exception as provided
3154# by Oracle in the LICENSE file that accompanied this code.
3155#
3156# This code is distributed in the hope that it will be useful, but WITHOUT
3157# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3158# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3159# version 2 for more details (a copy is included in the LICENSE file that
3160# accompanied this code).
3161#
3162# You should have received a copy of the GNU General Public License version
3163# 2 along with this work; if not, write to the Free Software Foundation,
3164# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3165#
3166# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3167# or visit www.oracle.com if you need additional information or have any
3168# questions.
3169#
3170
3171# Execute the check given as argument, and verify the result
3172# If the Boot JDK was previously found, do nothing
3173# $1 A command line (typically autoconf macro) to execute
3174
3175
3176# Test: Is bootjdk explicitely set by command line arguments?
3177
3178
3179# Test: Is bootjdk available from builddeps?
3180
3181
3182# Test: Is $JAVA_HOME set?
3183
3184
3185# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3186
3187
3188# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3189
3190
3191# Look for a jdk in the given path. If there are multiple, try to select the newest.
3192# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3193# $1 = Path to directory containing jdk installations.
3194# $2 = String to append to the found JDK directory to get the proper JDK home
3195
3196
3197# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3198# environmental variable as base for where to look.
3199# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3200
3201
3202# Test: Is there a JDK installed in default, well-known locations?
3203
3204
3205# Check that a command-line tool in the Boot JDK is correct
3206# $1 = name of variable to assign
3207# $2 = name of binary
3208
3209
3210###############################################################################
3211#
3212# We need a Boot JDK to bootstrap the build.
3213#
3214
3215
3216
3217
3218
3219#
3220# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3221# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3222#
3223# This code is free software; you can redistribute it and/or modify it
3224# under the terms of the GNU General Public License version 2 only, as
3225# published by the Free Software Foundation.  Oracle designates this
3226# particular file as subject to the "Classpath" exception as provided
3227# by Oracle in the LICENSE file that accompanied this code.
3228#
3229# This code is distributed in the hope that it will be useful, but WITHOUT
3230# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3231# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3232# version 2 for more details (a copy is included in the LICENSE file that
3233# accompanied this code).
3234#
3235# You should have received a copy of the GNU General Public License version
3236# 2 along with this work; if not, write to the Free Software Foundation,
3237# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3238#
3239# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3240# or visit www.oracle.com if you need additional information or have any
3241# questions.
3242#
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261#
3262# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3264#
3265# This code is free software; you can redistribute it and/or modify it
3266# under the terms of the GNU General Public License version 2 only, as
3267# published by the Free Software Foundation.  Oracle designates this
3268# particular file as subject to the "Classpath" exception as provided
3269# by Oracle in the LICENSE file that accompanied this code.
3270#
3271# This code is distributed in the hope that it will be useful, but WITHOUT
3272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3274# version 2 for more details (a copy is included in the LICENSE file that
3275# accompanied this code).
3276#
3277# You should have received a copy of the GNU General Public License version
3278# 2 along with this work; if not, write to the Free Software Foundation,
3279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3280#
3281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3282# or visit www.oracle.com if you need additional information or have any
3283# questions.
3284#
3285
3286
3287
3288
3289
3290apt_help() {
3291    case $1 in
3292    devkit)
3293        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3294    openjdk)
3295        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3296    alsa)
3297        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3298    cups)
3299        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3300    freetype2)
3301        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3302    pulse)
3303        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3304    x11)
3305        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3306    ccache)
3307        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3308    * )
3309       break ;;
3310    esac
3311}
3312
3313yum_help() {
3314    case $1 in
3315    devkit)
3316        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3317    openjdk)
3318        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3319    alsa)
3320        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3321    cups)
3322        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3323    freetype2)
3324        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3325    pulse)
3326        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3327    x11)
3328        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3329    ccache)
3330        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3331    * )
3332       break ;;
3333    esac
3334}
3335
3336port_help() {
3337    PKGHANDLER_COMMAND=""
3338}
3339
3340pkgutil_help() {
3341    PKGHANDLER_COMMAND=""
3342}
3343
3344pkgadd_help() {
3345    PKGHANDLER_COMMAND=""
3346}
3347
3348
3349
3350#
3351# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3352# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3353#
3354# This code is free software; you can redistribute it and/or modify it
3355# under the terms of the GNU General Public License version 2 only, as
3356# published by the Free Software Foundation.  Oracle designates this
3357# particular file as subject to the "Classpath" exception as provided
3358# by Oracle in the LICENSE file that accompanied this code.
3359#
3360# This code is distributed in the hope that it will be useful, but WITHOUT
3361# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3362# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3363# version 2 for more details (a copy is included in the LICENSE file that
3364# accompanied this code).
3365#
3366# You should have received a copy of the GNU General Public License version
3367# 2 along with this work; if not, write to the Free Software Foundation,
3368# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3369#
3370# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3371# or visit www.oracle.com if you need additional information or have any
3372# questions.
3373#
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389# Support for customization of the build process. Some build files
3390# will include counterparts from this location, if they exist. This allows
3391# for a degree of customization of the build targets and the rules/recipes
3392# to create them
3393
3394# Check whether --with-custom-make-dir was given.
3395if test "${with_custom_make_dir+set}" = set; then :
3396  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3397fi
3398
3399
3400
3401#
3402# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3403# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3404#
3405# This code is free software; you can redistribute it and/or modify it
3406# under the terms of the GNU General Public License version 2 only, as
3407# published by the Free Software Foundation.  Oracle designates this
3408# particular file as subject to the "Classpath" exception as provided
3409# by Oracle in the LICENSE file that accompanied this code.
3410#
3411# This code is distributed in the hope that it will be useful, but WITHOUT
3412# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3413# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3414# version 2 for more details (a copy is included in the LICENSE file that
3415# accompanied this code).
3416#
3417# You should have received a copy of the GNU General Public License version
3418# 2 along with this work; if not, write to the Free Software Foundation,
3419# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3420#
3421# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3422# or visit www.oracle.com if you need additional information or have any
3423# questions.
3424#
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440#
3441# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3442# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3443#
3444# This code is free software; you can redistribute it and/or modify it
3445# under the terms of the GNU General Public License version 2 only, as
3446# published by the Free Software Foundation.  Oracle designates this
3447# particular file as subject to the "Classpath" exception as provided
3448# by Oracle in the LICENSE file that accompanied this code.
3449#
3450# This code is distributed in the hope that it will be useful, but WITHOUT
3451# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3452# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3453# version 2 for more details (a copy is included in the LICENSE file that
3454# accompanied this code).
3455#
3456# You should have received a copy of the GNU General Public License version
3457# 2 along with this work; if not, write to the Free Software Foundation,
3458# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3459#
3460# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3461# or visit www.oracle.com if you need additional information or have any
3462# questions.
3463#
3464
3465# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3466# Converts autoconf style CPU name to OpenJDK style, into
3467# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3468
3469
3470# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3471# Converts autoconf style OS name to OpenJDK style, into
3472# VAR_OS and VAR_OS_API.
3473
3474
3475# Expects $host_os $host_cpu $build_os and $build_cpu
3476# and $with_target_bits to have been setup!
3477#
3478# Translate the standard triplet(quadruplet) definition
3479# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3480# OPENJDK_BUILD_OS, etc.
3481
3482
3483# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3484# accordingly. Must be done after setting up build and target system, but before
3485# doing anything else with these values.
3486
3487
3488    # Setup the legacy variables, for controlling the old makefiles.
3489    #
3490
3491
3492
3493
3494#%%% Build and target systems %%%
3495
3496
3497
3498
3499# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3500# Add -mX to various FLAGS variables.
3501
3502
3503
3504
3505
3506
3507#
3508# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3509# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3510#
3511# This code is free software; you can redistribute it and/or modify it
3512# under the terms of the GNU General Public License version 2 only, as
3513# published by the Free Software Foundation.  Oracle designates this
3514# particular file as subject to the "Classpath" exception as provided
3515# by Oracle in the LICENSE file that accompanied this code.
3516#
3517# This code is distributed in the hope that it will be useful, but WITHOUT
3518# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3519# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3520# version 2 for more details (a copy is included in the LICENSE file that
3521# accompanied this code).
3522#
3523# You should have received a copy of the GNU General Public License version
3524# 2 along with this work; if not, write to the Free Software Foundation,
3525# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3526#
3527# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3528# or visit www.oracle.com if you need additional information or have any
3529# questions.
3530#
3531
3532
3533
3534
3535
3536
3537
3538
3539#
3540# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3541# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3542#
3543# This code is free software; you can redistribute it and/or modify it
3544# under the terms of the GNU General Public License version 2 only, as
3545# published by the Free Software Foundation.  Oracle designates this
3546# particular file as subject to the "Classpath" exception as provided
3547# by Oracle in the LICENSE file that accompanied this code.
3548#
3549# This code is distributed in the hope that it will be useful, but WITHOUT
3550# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3551# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3552# version 2 for more details (a copy is included in the LICENSE file that
3553# accompanied this code).
3554#
3555# You should have received a copy of the GNU General Public License version
3556# 2 along with this work; if not, write to the Free Software Foundation,
3557# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3558#
3559# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3560# or visit www.oracle.com if you need additional information or have any
3561# questions.
3562#
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578# This line needs to be here, verbatim, after all includes.
3579# It is replaced with custom functionality when building
3580# custom sources.
3581
3582
3583###############################################################################
3584#
3585# Initialization
3586#
3587###############################################################################
3588
3589# Basic initialization that must happen first of all
3590
3591# Save the original command line. This is passed to us by the wrapper configure script.
3592
3593DATE_WHEN_CONFIGURED=`LANG=C date`
3594
3595
3596
3597# Now we can determine OpenJDK build and target platforms. This is required to
3598# have early on.
3599# Make sure we can run config.sub.
3600$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3601  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3602
3603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3604$as_echo_n "checking build system type... " >&6; }
3605if test "${ac_cv_build+set}" = set; then :
3606  $as_echo_n "(cached) " >&6
3607else
3608  ac_build_alias=$build_alias
3609test "x$ac_build_alias" = x &&
3610  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3611test "x$ac_build_alias" = x &&
3612  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3613ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3614  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3615
3616fi
3617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3618$as_echo "$ac_cv_build" >&6; }
3619case $ac_cv_build in
3620*-*-*) ;;
3621*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
3622esac
3623build=$ac_cv_build
3624ac_save_IFS=$IFS; IFS='-'
3625set x $ac_cv_build
3626shift
3627build_cpu=$1
3628build_vendor=$2
3629shift; shift
3630# Remember, the first character of IFS is used to create $*,
3631# except with old shells:
3632build_os=$*
3633IFS=$ac_save_IFS
3634case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3635
3636
3637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3638$as_echo_n "checking host system type... " >&6; }
3639if test "${ac_cv_host+set}" = set; then :
3640  $as_echo_n "(cached) " >&6
3641else
3642  if test "x$host_alias" = x; then
3643  ac_cv_host=$ac_cv_build
3644else
3645  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3646    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3647fi
3648
3649fi
3650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3651$as_echo "$ac_cv_host" >&6; }
3652case $ac_cv_host in
3653*-*-*) ;;
3654*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
3655esac
3656host=$ac_cv_host
3657ac_save_IFS=$IFS; IFS='-'
3658set x $ac_cv_host
3659shift
3660host_cpu=$1
3661host_vendor=$2
3662shift; shift
3663# Remember, the first character of IFS is used to create $*,
3664# except with old shells:
3665host_os=$*
3666IFS=$ac_save_IFS
3667case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3668
3669
3670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
3671$as_echo_n "checking target system type... " >&6; }
3672if test "${ac_cv_target+set}" = set; then :
3673  $as_echo_n "(cached) " >&6
3674else
3675  if test "x$target_alias" = x; then
3676  ac_cv_target=$ac_cv_host
3677else
3678  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
3679    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3680fi
3681
3682fi
3683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
3684$as_echo "$ac_cv_target" >&6; }
3685case $ac_cv_target in
3686*-*-*) ;;
3687*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
3688esac
3689target=$ac_cv_target
3690ac_save_IFS=$IFS; IFS='-'
3691set x $ac_cv_target
3692shift
3693target_cpu=$1
3694target_vendor=$2
3695shift; shift
3696# Remember, the first character of IFS is used to create $*,
3697# except with old shells:
3698target_os=$*
3699IFS=$ac_save_IFS
3700case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
3701
3702
3703# The aliases save the names the user supplied, while $host etc.
3704# will get canonicalized.
3705test -n "$target_alias" &&
3706  test "$program_prefix$program_suffix$program_transform_name" = \
3707    NONENONEs,x,x, &&
3708  program_prefix=${target_alias}-
3709
3710# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
3711# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
3712# product you're building. The target of this build is called "host". Since this is confusing to most people, we
3713# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
3714# to use the configure naming style.
3715
3716
3717
3718
3719
3720    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
3721    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
3722    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
3723    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
3724    OPENJDK_TARGET_AUTOCONF_NAME="$host"
3725    OPENJDK_BUILD_AUTOCONF_NAME="$build"
3726
3727
3728
3729    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
3730
3731  case "$host_os" in
3732    *linux*)
3733      VAR_OS=linux
3734      VAR_OS_API=posix
3735      ;;
3736    *solaris*)
3737      VAR_OS=solaris
3738      VAR_OS_API=posix
3739      ;;
3740    *darwin*)
3741      VAR_OS=macosx
3742      VAR_OS_API=posix
3743      ;;
3744    *bsd*)
3745      VAR_OS=bsd
3746      VAR_OS_API=posix
3747      ;;
3748    *cygwin*|*windows*)
3749      VAR_OS=windows
3750      VAR_OS_API=winapi
3751      ;;
3752    *)
3753      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
3754      ;;
3755  esac
3756
3757
3758  # First argument is the cpu name from the trip/quad
3759  case "$host_cpu" in
3760    x86_64)
3761      VAR_CPU=x86_64
3762      VAR_CPU_ARCH=x86
3763      VAR_CPU_BITS=64
3764      VAR_CPU_ENDIAN=little
3765      ;;
3766    i?86)
3767      VAR_CPU=x86
3768      VAR_CPU_ARCH=x86
3769      VAR_CPU_BITS=32
3770      VAR_CPU_ENDIAN=little
3771      ;;
3772    arm*)
3773      VAR_CPU=arm
3774      VAR_CPU_ARCH=arm
3775      VAR_CPU_BITS=32
3776      VAR_CPU_ENDIAN=little
3777      ;;
3778    powerpc)
3779      VAR_CPU=ppc
3780      VAR_CPU_ARCH=ppc
3781      VAR_CPU_BITS=32
3782      VAR_CPU_ENDIAN=big
3783       ;;
3784    powerpc64)
3785      VAR_CPU=ppc64
3786      VAR_CPU_ARCH=ppc
3787      VAR_CPU_BITS=64
3788      VAR_CPU_ENDIAN=big
3789       ;;
3790    sparc)
3791      VAR_CPU=sparc
3792      VAR_CPU_ARCH=sparc
3793      VAR_CPU_BITS=32
3794      VAR_CPU_ENDIAN=big
3795       ;;
3796    sparcv9)
3797      VAR_CPU=sparcv9
3798      VAR_CPU_ARCH=sparc
3799      VAR_CPU_BITS=64
3800      VAR_CPU_ENDIAN=big
3801       ;;
3802    *)
3803      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
3804      ;;
3805  esac
3806
3807    # ... and setup our own variables. (Do this explicitely to facilitate searching)
3808    OPENJDK_TARGET_OS="$VAR_OS"
3809    OPENJDK_TARGET_OS_API="$VAR_OS_API"
3810    OPENJDK_TARGET_CPU="$VAR_CPU"
3811    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
3812    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
3813    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
3814
3815
3816
3817
3818
3819
3820
3821    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
3822
3823  case "$build_os" in
3824    *linux*)
3825      VAR_OS=linux
3826      VAR_OS_API=posix
3827      ;;
3828    *solaris*)
3829      VAR_OS=solaris
3830      VAR_OS_API=posix
3831      ;;
3832    *darwin*)
3833      VAR_OS=macosx
3834      VAR_OS_API=posix
3835      ;;
3836    *bsd*)
3837      VAR_OS=bsd
3838      VAR_OS_API=posix
3839      ;;
3840    *cygwin*|*windows*)
3841      VAR_OS=windows
3842      VAR_OS_API=winapi
3843      ;;
3844    *)
3845      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
3846      ;;
3847  esac
3848
3849
3850  # First argument is the cpu name from the trip/quad
3851  case "$build_cpu" in
3852    x86_64)
3853      VAR_CPU=x86_64
3854      VAR_CPU_ARCH=x86
3855      VAR_CPU_BITS=64
3856      VAR_CPU_ENDIAN=little
3857      ;;
3858    i?86)
3859      VAR_CPU=x86
3860      VAR_CPU_ARCH=x86
3861      VAR_CPU_BITS=32
3862      VAR_CPU_ENDIAN=little
3863      ;;
3864    arm*)
3865      VAR_CPU=arm
3866      VAR_CPU_ARCH=arm
3867      VAR_CPU_BITS=32
3868      VAR_CPU_ENDIAN=little
3869      ;;
3870    powerpc)
3871      VAR_CPU=ppc
3872      VAR_CPU_ARCH=ppc
3873      VAR_CPU_BITS=32
3874      VAR_CPU_ENDIAN=big
3875       ;;
3876    powerpc64)
3877      VAR_CPU=ppc64
3878      VAR_CPU_ARCH=ppc
3879      VAR_CPU_BITS=64
3880      VAR_CPU_ENDIAN=big
3881       ;;
3882    sparc)
3883      VAR_CPU=sparc
3884      VAR_CPU_ARCH=sparc
3885      VAR_CPU_BITS=32
3886      VAR_CPU_ENDIAN=big
3887       ;;
3888    sparcv9)
3889      VAR_CPU=sparcv9
3890      VAR_CPU_ARCH=sparc
3891      VAR_CPU_BITS=64
3892      VAR_CPU_ENDIAN=big
3893       ;;
3894    *)
3895      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
3896      ;;
3897  esac
3898
3899    # ..and setup our own variables. (Do this explicitely to facilitate searching)
3900    OPENJDK_BUILD_OS="$VAR_OS"
3901    OPENJDK_BUILD_OS_API="$VAR_OS_API"
3902    OPENJDK_BUILD_CPU="$VAR_CPU"
3903    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
3904    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
3905    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915# Check whether --with-target-bits was given.
3916if test "${with_target_bits+set}" = set; then :
3917  withval=$with_target_bits;
3918fi
3919
3920
3921  # We have three types of compiles:
3922  # native  == normal compilation, target system == build system
3923  # cross   == traditional cross compilation, target system != build system; special toolchain needed
3924  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
3925  #
3926  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
3927    # We're doing a proper cross-compilation
3928    COMPILE_TYPE="cross"
3929  else
3930    COMPILE_TYPE="native"
3931  fi
3932
3933  if test "x$with_target_bits" != x; then
3934    if test "x$COMPILE_TYPE" = "xcross"; then
3935      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
3936    fi
3937
3938    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
3939      # A reduced build is requested
3940      COMPILE_TYPE="reduced"
3941      OPENJDK_TARGET_CPU_BITS=32
3942      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
3943        OPENJDK_TARGET_CPU=x86
3944      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
3945        OPENJDK_TARGET_CPU=sparc
3946      else
3947        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
3948      fi
3949    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3950      as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
3951    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
3952      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
3953$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
3954    else
3955      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
3956    fi
3957  fi
3958
3959
3960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compilation type" >&5
3961$as_echo_n "checking for compilation type... " >&6; }
3962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
3963$as_echo "$COMPILE_TYPE" >&6; }
3964
3965
3966    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
3967       REQUIRED_OS_NAME=SunOS
3968       REQUIRED_OS_VERSION=5.10
3969    fi
3970    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
3971       REQUIRED_OS_NAME=Linux
3972       REQUIRED_OS_VERSION=2.6
3973    fi
3974    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
3975        REQUIRED_OS_NAME=Windows
3976        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
3977            REQUIRED_OS_VERSION=5.2
3978        else
3979            REQUIRED_OS_VERSION=5.1
3980        fi
3981    fi
3982    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
3983        REQUIRED_OS_NAME=Darwin
3984        REQUIRED_OS_VERSION=11.2
3985    fi
3986
3987
3988
3989
3990
3991    # Also store the legacy naming of the cpu.
3992    # Ie i586 and amd64 instead of x86 and x86_64
3993    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
3994    if test "x$OPENJDK_TARGET_CPU" = xx86; then
3995      OPENJDK_TARGET_CPU_LEGACY="i586"
3996    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
3997      # On all platforms except MacOSX replace x86_64 with amd64.
3998      OPENJDK_TARGET_CPU_LEGACY="amd64"
3999    fi
4000
4001
4002    # And the second legacy naming of the cpu.
4003    # Ie i386 and amd64 instead of x86 and x86_64.
4004    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
4005    if test "x$OPENJDK_TARGET_CPU" = xx86; then
4006      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
4007    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
4008      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
4009    fi
4010
4011
4012    # This is the name of the cpu (but using i386 and amd64 instead of
4013    # x86 and x86_64, respectively), preceeded by a /, to be used when
4014    # locating libraries. On macosx, it's empty, though.
4015    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
4016    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
4017        OPENJDK_TARGET_CPU_LIBDIR=""
4018    fi
4019
4020
4021    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
4022    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
4023    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
4024    OPENJDK_TARGET_CPU_ISADIR=""
4025    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
4026      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
4027          OPENJDK_TARGET_CPU_ISADIR="/amd64"
4028      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
4029          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
4030      fi
4031    fi
4032
4033
4034    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
4035    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
4036    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
4037      # On linux only, we replace x86 with i386.
4038      OPENJDK_TARGET_CPU_OSARCH="i386"
4039    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
4040      # On all platforms except macosx, we replace x86_64 with amd64.
4041      OPENJDK_TARGET_CPU_OSARCH="amd64"
4042    fi
4043
4044
4045    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
4046    if test "x$OPENJDK_TARGET_CPU" = xx86; then
4047      OPENJDK_TARGET_CPU_JLI="i386"
4048    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
4049      # On all platforms except macosx, we replace x86_64 with amd64.
4050      OPENJDK_TARGET_CPU_JLI="amd64"
4051    fi
4052    # Now setup the -D flags for building libjli.
4053    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
4054    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
4055      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
4056        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
4057      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
4058        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
4059      fi
4060    fi
4061
4062
4063    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
4064    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
4065        OPENJDK_TARGET_OS_API_DIR="solaris"
4066    fi
4067    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
4068        OPENJDK_TARGET_OS_API_DIR="windows"
4069    fi
4070
4071
4072    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
4073        A_LP64="LP64:="
4074        ADD_LP64="-D_LP64=1"
4075    fi
4076    LP64=$A_LP64
4077
4078
4079    if test "x$COMPILE_TYPE" = "xcross"; then
4080      # FIXME: ... or should this include reduced builds..?
4081      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
4082    else
4083      DEFINE_CROSS_COMPILE_ARCH=""
4084    fi
4085
4086
4087
4088
4089# Continue setting up basic stuff.
4090
4091# Locate the directory of this script.
4092SCRIPT="$0"
4093
4094    if test "x$OPENJDK_BUILD_OS" != xwindows; then
4095        # Follow a chain of symbolic links. Use readlink
4096        # where it exists, else fall back to horribly
4097        # complicated shell code.
4098        # Extract the first word of "readlink", so it can be a program name with args.
4099set dummy readlink; ac_word=$2
4100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4101$as_echo_n "checking for $ac_word... " >&6; }
4102if test "${ac_cv_path_READLINK+set}" = set; then :
4103  $as_echo_n "(cached) " >&6
4104else
4105  case $READLINK in
4106  [\\/]* | ?:[\\/]*)
4107  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
4108  ;;
4109  *)
4110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4111for as_dir in $PATH
4112do
4113  IFS=$as_save_IFS
4114  test -z "$as_dir" && as_dir=.
4115    for ac_exec_ext in '' $ac_executable_extensions; do
4116  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4117    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
4118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4119    break 2
4120  fi
4121done
4122  done
4123IFS=$as_save_IFS
4124
4125  ;;
4126esac
4127fi
4128READLINK=$ac_cv_path_READLINK
4129if test -n "$READLINK"; then
4130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
4131$as_echo "$READLINK" >&6; }
4132else
4133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4134$as_echo "no" >&6; }
4135fi
4136
4137
4138        if test "x$READLINK_TESTED" != yes; then
4139            # On MacOSX there is a readlink tool with a different
4140            # purpose than the GNU readlink tool. Check the found readlink.
4141            ISGNU=`$READLINK --help 2>&1 | grep GNU`
4142            if test "x$ISGNU" = x; then
4143                 # A readlink that we do not know how to use.
4144                 # Are there other non-GNU readlinks out there?
4145                 READLINK_TESTED=yes
4146                 READLINK=
4147            fi
4148        fi
4149
4150        if test "x$READLINK" != x; then
4151            SCRIPT=`$READLINK -f $SCRIPT`
4152        else
4153            STARTDIR=$PWD
4154            COUNTER=0
4155            DIR=`dirname $SCRIPT`
4156            FIL=`basename $SCRIPT`
4157            while test $COUNTER -lt 20; do
4158                ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
4159                if test "x$ISLINK" == x; then
4160                    # This is not a symbolic link! We are done!
4161                    break
4162                fi
4163                # The link might be relative! We have to use cd to travel safely.
4164                cd $DIR
4165                cd `dirname $ISLINK`
4166                DIR=`pwd`
4167                FIL=`basename $ISLINK`
4168                let COUNTER=COUNTER+1
4169            done
4170            cd $STARTDIR
4171            SCRIPT=$DIR/$FIL
4172        fi
4173    fi
4174
4175AUTOCONF_DIR=`dirname $0`
4176
4177# Where is the source? It is located two levels above the configure script.
4178CURDIR="$PWD"
4179cd "$AUTOCONF_DIR/../.."
4180SRC_ROOT="`pwd`"
4181if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
4182    SRC_ROOT_LENGTH=`pwd|wc -m`
4183    if test $SRC_ROOT_LENGTH -gt 100; then
4184        as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
4185    fi
4186fi
4187
4188cd "$CURDIR"
4189
4190
4191    # Fail with message the path to the source root if var SRC_ROOT contains a path with no spaces in it.
4192    # Unless on Windows, where we can rewrite the path.
4193    HAS_SPACE=`echo "$SRC_ROOT" | grep " "`
4194    if test "x$HAS_SPACE" != x; then
4195        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
4196            # First convert it to DOS-style, short mode (no spaces)
4197            SRC_ROOT=`$CYGPATH -s -m -a "$SRC_ROOT"`
4198            # Now it's case insensitive; let's make it lowercase to improve readability
4199            SRC_ROOT=`$ECHO "$SRC_ROOT" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
4200            # Now convert it back to Unix-stile (cygpath)
4201            SRC_ROOT=`$CYGPATH -u "$SRC_ROOT"`
4202        else
4203            as_fn_error $? "You cannot have spaces in the path to the source root! \"$SRC_ROOT\"" "$LINENO" 5
4204        fi
4205    fi
4206
4207
4208    # Fail with message the path to the current directory if var CURDIR contains a path with no spaces in it.
4209    # Unless on Windows, where we can rewrite the path.
4210    HAS_SPACE=`echo "$CURDIR" | grep " "`
4211    if test "x$HAS_SPACE" != x; then
4212        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
4213            # First convert it to DOS-style, short mode (no spaces)
4214            CURDIR=`$CYGPATH -s -m -a "$CURDIR"`
4215            # Now it's case insensitive; let's make it lowercase to improve readability
4216            CURDIR=`$ECHO "$CURDIR" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
4217            # Now convert it back to Unix-stile (cygpath)
4218            CURDIR=`$CYGPATH -u "$CURDIR"`
4219        else
4220            as_fn_error $? "You cannot have spaces in the path to the current directory! \"$CURDIR\"" "$LINENO" 5
4221        fi
4222    fi
4223
4224
4225if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
4226    # Add extra search paths on solaris for utilities like ar and as etc...
4227    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
4228fi
4229
4230# For cygwin we need cygpath first, since it is used everywhere.
4231# Extract the first word of "cygpath", so it can be a program name with args.
4232set dummy cygpath; ac_word=$2
4233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4234$as_echo_n "checking for $ac_word... " >&6; }
4235if test "${ac_cv_path_CYGPATH+set}" = set; then :
4236  $as_echo_n "(cached) " >&6
4237else
4238  case $CYGPATH in
4239  [\\/]* | ?:[\\/]*)
4240  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
4241  ;;
4242  *)
4243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4244for as_dir in $PATH
4245do
4246  IFS=$as_save_IFS
4247  test -z "$as_dir" && as_dir=.
4248    for ac_exec_ext in '' $ac_executable_extensions; do
4249  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4250    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
4251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4252    break 2
4253  fi
4254done
4255  done
4256IFS=$as_save_IFS
4257
4258  ;;
4259esac
4260fi
4261CYGPATH=$ac_cv_path_CYGPATH
4262if test -n "$CYGPATH"; then
4263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
4264$as_echo "$CYGPATH" >&6; }
4265else
4266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4267$as_echo "no" >&6; }
4268fi
4269
4270
4271PATH_SEP=":"
4272if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
4273    if test "x$CYGPATH" = x; then
4274        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
4275    fi
4276    PATH_SEP=";"
4277fi
4278
4279
4280# You can force the sys-root if the sys-root encoded into the cross compiler tools
4281# is not correct.
4282
4283# Check whether --with-sys-root was given.
4284if test "${with_sys_root+set}" = set; then :
4285  withval=$with_sys_root;
4286fi
4287
4288
4289if test "x$with_sys_root" != x; then
4290  SYS_ROOT=$with_sys_root
4291else
4292  SYS_ROOT=/
4293fi
4294
4295
4296
4297# Check whether --with-tools-dir was given.
4298if test "${with_tools_dir+set}" = set; then :
4299  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
4300fi
4301
4302
4303
4304# Check whether --with-devkit was given.
4305if test "${with_devkit+set}" = set; then :
4306  withval=$with_devkit;
4307    if test "x$with_sys_root" != x; then
4308      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
4309    fi
4310    if test "x$with_tools_dir" != x; then
4311      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
4312    fi
4313    TOOLS_DIR=$with_devkit/bin
4314    SYS_ROOT=$with_devkit/$host_alias/libc
4315
4316fi
4317
4318
4319
4320
4321# Setup default logging of stdout and stderr to build.log in the output root.
4322BUILD_LOG='$(OUTPUT_ROOT)/build.log'
4323BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
4324BUILD_LOG_WRAPPER='$(SH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
4325
4326
4327
4328
4329
4330# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
4331
4332    for ac_prog in apt-get yum port pkgutil pkgadd
4333do
4334  # Extract the first word of "$ac_prog", so it can be a program name with args.
4335set dummy $ac_prog; ac_word=$2
4336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4337$as_echo_n "checking for $ac_word... " >&6; }
4338if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
4339  $as_echo_n "(cached) " >&6
4340else
4341  if test -n "$PKGHANDLER"; then
4342  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
4343else
4344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4345for as_dir in $PATH
4346do
4347  IFS=$as_save_IFS
4348  test -z "$as_dir" && as_dir=.
4349    for ac_exec_ext in '' $ac_executable_extensions; do
4350  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4351    ac_cv_prog_PKGHANDLER="$ac_prog"
4352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4353    break 2
4354  fi
4355done
4356  done
4357IFS=$as_save_IFS
4358
4359fi
4360fi
4361PKGHANDLER=$ac_cv_prog_PKGHANDLER
4362if test -n "$PKGHANDLER"; then
4363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
4364$as_echo "$PKGHANDLER" >&6; }
4365else
4366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4367$as_echo "no" >&6; }
4368fi
4369
4370
4371  test -n "$PKGHANDLER" && break
4372done
4373
4374
4375
4376# Setup simple tools, that do not need have cross compilation support.
4377# Without these, we can't properly run the rest of the configure script.
4378
4379# Start with tools that do not need have cross compilation support
4380# and can be expected to be found in the default PATH. These tools are
4381# used by configure. Nor are these tools expected to be found in the
4382# devkit from the builddeps server either, since they are
4383# needed to download the devkit.
4384
4385# First are all the simple required tools.
4386
4387    for ac_prog in basename
4388do
4389  # Extract the first word of "$ac_prog", so it can be a program name with args.
4390set dummy $ac_prog; ac_word=$2
4391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4392$as_echo_n "checking for $ac_word... " >&6; }
4393if test "${ac_cv_path_BASENAME+set}" = set; then :
4394  $as_echo_n "(cached) " >&6
4395else
4396  case $BASENAME in
4397  [\\/]* | ?:[\\/]*)
4398  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4399  ;;
4400  *)
4401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4402for as_dir in $PATH
4403do
4404  IFS=$as_save_IFS
4405  test -z "$as_dir" && as_dir=.
4406    for ac_exec_ext in '' $ac_executable_extensions; do
4407  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4408    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4410    break 2
4411  fi
4412done
4413  done
4414IFS=$as_save_IFS
4415
4416  ;;
4417esac
4418fi
4419BASENAME=$ac_cv_path_BASENAME
4420if test -n "$BASENAME"; then
4421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4422$as_echo "$BASENAME" >&6; }
4423else
4424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4425$as_echo "no" >&6; }
4426fi
4427
4428
4429  test -n "$BASENAME" && break
4430done
4431
4432
4433    if test "x$BASENAME" = x; then
4434        if test "xbasename" = x; then
4435          PROG_NAME=basename
4436        else
4437          PROG_NAME=basename
4438        fi
4439        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4440$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4441        as_fn_error $? "Cannot continue" "$LINENO" 5
4442    fi
4443
4444
4445
4446    for ac_prog in cat
4447do
4448  # Extract the first word of "$ac_prog", so it can be a program name with args.
4449set dummy $ac_prog; ac_word=$2
4450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4451$as_echo_n "checking for $ac_word... " >&6; }
4452if test "${ac_cv_path_CAT+set}" = set; then :
4453  $as_echo_n "(cached) " >&6
4454else
4455  case $CAT in
4456  [\\/]* | ?:[\\/]*)
4457  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4458  ;;
4459  *)
4460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4461for as_dir in $PATH
4462do
4463  IFS=$as_save_IFS
4464  test -z "$as_dir" && as_dir=.
4465    for ac_exec_ext in '' $ac_executable_extensions; do
4466  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4467    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4469    break 2
4470  fi
4471done
4472  done
4473IFS=$as_save_IFS
4474
4475  ;;
4476esac
4477fi
4478CAT=$ac_cv_path_CAT
4479if test -n "$CAT"; then
4480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4481$as_echo "$CAT" >&6; }
4482else
4483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4484$as_echo "no" >&6; }
4485fi
4486
4487
4488  test -n "$CAT" && break
4489done
4490
4491
4492    if test "x$CAT" = x; then
4493        if test "xcat" = x; then
4494          PROG_NAME=cat
4495        else
4496          PROG_NAME=cat
4497        fi
4498        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4499$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4500        as_fn_error $? "Cannot continue" "$LINENO" 5
4501    fi
4502
4503
4504
4505    for ac_prog in chmod
4506do
4507  # Extract the first word of "$ac_prog", so it can be a program name with args.
4508set dummy $ac_prog; ac_word=$2
4509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4510$as_echo_n "checking for $ac_word... " >&6; }
4511if test "${ac_cv_path_CHMOD+set}" = set; then :
4512  $as_echo_n "(cached) " >&6
4513else
4514  case $CHMOD in
4515  [\\/]* | ?:[\\/]*)
4516  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4517  ;;
4518  *)
4519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4520for as_dir in $PATH
4521do
4522  IFS=$as_save_IFS
4523  test -z "$as_dir" && as_dir=.
4524    for ac_exec_ext in '' $ac_executable_extensions; do
4525  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4526    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4528    break 2
4529  fi
4530done
4531  done
4532IFS=$as_save_IFS
4533
4534  ;;
4535esac
4536fi
4537CHMOD=$ac_cv_path_CHMOD
4538if test -n "$CHMOD"; then
4539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4540$as_echo "$CHMOD" >&6; }
4541else
4542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4543$as_echo "no" >&6; }
4544fi
4545
4546
4547  test -n "$CHMOD" && break
4548done
4549
4550
4551    if test "x$CHMOD" = x; then
4552        if test "xchmod" = x; then
4553          PROG_NAME=chmod
4554        else
4555          PROG_NAME=chmod
4556        fi
4557        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4558$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4559        as_fn_error $? "Cannot continue" "$LINENO" 5
4560    fi
4561
4562
4563
4564    for ac_prog in cmp
4565do
4566  # Extract the first word of "$ac_prog", so it can be a program name with args.
4567set dummy $ac_prog; ac_word=$2
4568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4569$as_echo_n "checking for $ac_word... " >&6; }
4570if test "${ac_cv_path_CMP+set}" = set; then :
4571  $as_echo_n "(cached) " >&6
4572else
4573  case $CMP in
4574  [\\/]* | ?:[\\/]*)
4575  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4576  ;;
4577  *)
4578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4579for as_dir in $PATH
4580do
4581  IFS=$as_save_IFS
4582  test -z "$as_dir" && as_dir=.
4583    for ac_exec_ext in '' $ac_executable_extensions; do
4584  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4585    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4587    break 2
4588  fi
4589done
4590  done
4591IFS=$as_save_IFS
4592
4593  ;;
4594esac
4595fi
4596CMP=$ac_cv_path_CMP
4597if test -n "$CMP"; then
4598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4599$as_echo "$CMP" >&6; }
4600else
4601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4602$as_echo "no" >&6; }
4603fi
4604
4605
4606  test -n "$CMP" && break
4607done
4608
4609
4610    if test "x$CMP" = x; then
4611        if test "xcmp" = x; then
4612          PROG_NAME=cmp
4613        else
4614          PROG_NAME=cmp
4615        fi
4616        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4617$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4618        as_fn_error $? "Cannot continue" "$LINENO" 5
4619    fi
4620
4621
4622
4623    for ac_prog in cp
4624do
4625  # Extract the first word of "$ac_prog", so it can be a program name with args.
4626set dummy $ac_prog; ac_word=$2
4627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4628$as_echo_n "checking for $ac_word... " >&6; }
4629if test "${ac_cv_path_CP+set}" = set; then :
4630  $as_echo_n "(cached) " >&6
4631else
4632  case $CP in
4633  [\\/]* | ?:[\\/]*)
4634  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4635  ;;
4636  *)
4637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638for as_dir in $PATH
4639do
4640  IFS=$as_save_IFS
4641  test -z "$as_dir" && as_dir=.
4642    for ac_exec_ext in '' $ac_executable_extensions; do
4643  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4644    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4646    break 2
4647  fi
4648done
4649  done
4650IFS=$as_save_IFS
4651
4652  ;;
4653esac
4654fi
4655CP=$ac_cv_path_CP
4656if test -n "$CP"; then
4657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4658$as_echo "$CP" >&6; }
4659else
4660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4661$as_echo "no" >&6; }
4662fi
4663
4664
4665  test -n "$CP" && break
4666done
4667
4668
4669    if test "x$CP" = x; then
4670        if test "xcp" = x; then
4671          PROG_NAME=cp
4672        else
4673          PROG_NAME=cp
4674        fi
4675        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4676$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4677        as_fn_error $? "Cannot continue" "$LINENO" 5
4678    fi
4679
4680
4681
4682    for ac_prog in cpio
4683do
4684  # Extract the first word of "$ac_prog", so it can be a program name with args.
4685set dummy $ac_prog; ac_word=$2
4686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4687$as_echo_n "checking for $ac_word... " >&6; }
4688if test "${ac_cv_path_CPIO+set}" = set; then :
4689  $as_echo_n "(cached) " >&6
4690else
4691  case $CPIO in
4692  [\\/]* | ?:[\\/]*)
4693  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4694  ;;
4695  *)
4696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697for as_dir in $PATH
4698do
4699  IFS=$as_save_IFS
4700  test -z "$as_dir" && as_dir=.
4701    for ac_exec_ext in '' $ac_executable_extensions; do
4702  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4703    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4705    break 2
4706  fi
4707done
4708  done
4709IFS=$as_save_IFS
4710
4711  ;;
4712esac
4713fi
4714CPIO=$ac_cv_path_CPIO
4715if test -n "$CPIO"; then
4716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4717$as_echo "$CPIO" >&6; }
4718else
4719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4720$as_echo "no" >&6; }
4721fi
4722
4723
4724  test -n "$CPIO" && break
4725done
4726
4727
4728    if test "x$CPIO" = x; then
4729        if test "xcpio" = x; then
4730          PROG_NAME=cpio
4731        else
4732          PROG_NAME=cpio
4733        fi
4734        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4735$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4736        as_fn_error $? "Cannot continue" "$LINENO" 5
4737    fi
4738
4739
4740
4741    for ac_prog in cut
4742do
4743  # Extract the first word of "$ac_prog", so it can be a program name with args.
4744set dummy $ac_prog; ac_word=$2
4745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4746$as_echo_n "checking for $ac_word... " >&6; }
4747if test "${ac_cv_path_CUT+set}" = set; then :
4748  $as_echo_n "(cached) " >&6
4749else
4750  case $CUT in
4751  [\\/]* | ?:[\\/]*)
4752  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4753  ;;
4754  *)
4755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4756for as_dir in $PATH
4757do
4758  IFS=$as_save_IFS
4759  test -z "$as_dir" && as_dir=.
4760    for ac_exec_ext in '' $ac_executable_extensions; do
4761  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4762    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4764    break 2
4765  fi
4766done
4767  done
4768IFS=$as_save_IFS
4769
4770  ;;
4771esac
4772fi
4773CUT=$ac_cv_path_CUT
4774if test -n "$CUT"; then
4775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4776$as_echo "$CUT" >&6; }
4777else
4778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4779$as_echo "no" >&6; }
4780fi
4781
4782
4783  test -n "$CUT" && break
4784done
4785
4786
4787    if test "x$CUT" = x; then
4788        if test "xcut" = x; then
4789          PROG_NAME=cut
4790        else
4791          PROG_NAME=cut
4792        fi
4793        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4794$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4795        as_fn_error $? "Cannot continue" "$LINENO" 5
4796    fi
4797
4798
4799
4800    for ac_prog in date
4801do
4802  # Extract the first word of "$ac_prog", so it can be a program name with args.
4803set dummy $ac_prog; ac_word=$2
4804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4805$as_echo_n "checking for $ac_word... " >&6; }
4806if test "${ac_cv_path_DATE+set}" = set; then :
4807  $as_echo_n "(cached) " >&6
4808else
4809  case $DATE in
4810  [\\/]* | ?:[\\/]*)
4811  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4812  ;;
4813  *)
4814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4815for as_dir in $PATH
4816do
4817  IFS=$as_save_IFS
4818  test -z "$as_dir" && as_dir=.
4819    for ac_exec_ext in '' $ac_executable_extensions; do
4820  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4821    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4823    break 2
4824  fi
4825done
4826  done
4827IFS=$as_save_IFS
4828
4829  ;;
4830esac
4831fi
4832DATE=$ac_cv_path_DATE
4833if test -n "$DATE"; then
4834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4835$as_echo "$DATE" >&6; }
4836else
4837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4838$as_echo "no" >&6; }
4839fi
4840
4841
4842  test -n "$DATE" && break
4843done
4844
4845
4846    if test "x$DATE" = x; then
4847        if test "xdate" = x; then
4848          PROG_NAME=date
4849        else
4850          PROG_NAME=date
4851        fi
4852        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4853$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4854        as_fn_error $? "Cannot continue" "$LINENO" 5
4855    fi
4856
4857
4858
4859    for ac_prog in df
4860do
4861  # Extract the first word of "$ac_prog", so it can be a program name with args.
4862set dummy $ac_prog; ac_word=$2
4863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4864$as_echo_n "checking for $ac_word... " >&6; }
4865if test "${ac_cv_path_DF+set}" = set; then :
4866  $as_echo_n "(cached) " >&6
4867else
4868  case $DF in
4869  [\\/]* | ?:[\\/]*)
4870  ac_cv_path_DF="$DF" # Let the user override the test with a path.
4871  ;;
4872  *)
4873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4874for as_dir in $PATH
4875do
4876  IFS=$as_save_IFS
4877  test -z "$as_dir" && as_dir=.
4878    for ac_exec_ext in '' $ac_executable_extensions; do
4879  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4880    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
4881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4882    break 2
4883  fi
4884done
4885  done
4886IFS=$as_save_IFS
4887
4888  ;;
4889esac
4890fi
4891DF=$ac_cv_path_DF
4892if test -n "$DF"; then
4893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
4894$as_echo "$DF" >&6; }
4895else
4896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4897$as_echo "no" >&6; }
4898fi
4899
4900
4901  test -n "$DF" && break
4902done
4903
4904
4905    if test "x$DF" = x; then
4906        if test "xdf" = x; then
4907          PROG_NAME=df
4908        else
4909          PROG_NAME=df
4910        fi
4911        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4912$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4913        as_fn_error $? "Cannot continue" "$LINENO" 5
4914    fi
4915
4916
4917
4918    for ac_prog in gdiff diff
4919do
4920  # Extract the first word of "$ac_prog", so it can be a program name with args.
4921set dummy $ac_prog; ac_word=$2
4922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4923$as_echo_n "checking for $ac_word... " >&6; }
4924if test "${ac_cv_path_DIFF+set}" = set; then :
4925  $as_echo_n "(cached) " >&6
4926else
4927  case $DIFF in
4928  [\\/]* | ?:[\\/]*)
4929  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4930  ;;
4931  *)
4932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4933for as_dir in $PATH
4934do
4935  IFS=$as_save_IFS
4936  test -z "$as_dir" && as_dir=.
4937    for ac_exec_ext in '' $ac_executable_extensions; do
4938  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4939    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4941    break 2
4942  fi
4943done
4944  done
4945IFS=$as_save_IFS
4946
4947  ;;
4948esac
4949fi
4950DIFF=$ac_cv_path_DIFF
4951if test -n "$DIFF"; then
4952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4953$as_echo "$DIFF" >&6; }
4954else
4955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4956$as_echo "no" >&6; }
4957fi
4958
4959
4960  test -n "$DIFF" && break
4961done
4962
4963
4964    if test "x$DIFF" = x; then
4965        if test "xgdiff diff" = x; then
4966          PROG_NAME=diff
4967        else
4968          PROG_NAME=gdiff diff
4969        fi
4970        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4971$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4972        as_fn_error $? "Cannot continue" "$LINENO" 5
4973    fi
4974
4975
4976
4977    for ac_prog in echo
4978do
4979  # Extract the first word of "$ac_prog", so it can be a program name with args.
4980set dummy $ac_prog; ac_word=$2
4981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4982$as_echo_n "checking for $ac_word... " >&6; }
4983if test "${ac_cv_path_ECHO+set}" = set; then :
4984  $as_echo_n "(cached) " >&6
4985else
4986  case $ECHO in
4987  [\\/]* | ?:[\\/]*)
4988  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4989  ;;
4990  *)
4991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4992for as_dir in $PATH
4993do
4994  IFS=$as_save_IFS
4995  test -z "$as_dir" && as_dir=.
4996    for ac_exec_ext in '' $ac_executable_extensions; do
4997  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4998    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5000    break 2
5001  fi
5002done
5003  done
5004IFS=$as_save_IFS
5005
5006  ;;
5007esac
5008fi
5009ECHO=$ac_cv_path_ECHO
5010if test -n "$ECHO"; then
5011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
5012$as_echo "$ECHO" >&6; }
5013else
5014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5015$as_echo "no" >&6; }
5016fi
5017
5018
5019  test -n "$ECHO" && break
5020done
5021
5022
5023    if test "x$ECHO" = x; then
5024        if test "xecho" = x; then
5025          PROG_NAME=echo
5026        else
5027          PROG_NAME=echo
5028        fi
5029        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5030$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5031        as_fn_error $? "Cannot continue" "$LINENO" 5
5032    fi
5033
5034
5035
5036    for ac_prog in expr
5037do
5038  # Extract the first word of "$ac_prog", so it can be a program name with args.
5039set dummy $ac_prog; ac_word=$2
5040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5041$as_echo_n "checking for $ac_word... " >&6; }
5042if test "${ac_cv_path_EXPR+set}" = set; then :
5043  $as_echo_n "(cached) " >&6
5044else
5045  case $EXPR in
5046  [\\/]* | ?:[\\/]*)
5047  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
5048  ;;
5049  *)
5050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5051for as_dir in $PATH
5052do
5053  IFS=$as_save_IFS
5054  test -z "$as_dir" && as_dir=.
5055    for ac_exec_ext in '' $ac_executable_extensions; do
5056  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5057    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
5058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5059    break 2
5060  fi
5061done
5062  done
5063IFS=$as_save_IFS
5064
5065  ;;
5066esac
5067fi
5068EXPR=$ac_cv_path_EXPR
5069if test -n "$EXPR"; then
5070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
5071$as_echo "$EXPR" >&6; }
5072else
5073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5074$as_echo "no" >&6; }
5075fi
5076
5077
5078  test -n "$EXPR" && break
5079done
5080
5081
5082    if test "x$EXPR" = x; then
5083        if test "xexpr" = x; then
5084          PROG_NAME=expr
5085        else
5086          PROG_NAME=expr
5087        fi
5088        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5089$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5090        as_fn_error $? "Cannot continue" "$LINENO" 5
5091    fi
5092
5093
5094
5095    for ac_prog in file
5096do
5097  # Extract the first word of "$ac_prog", so it can be a program name with args.
5098set dummy $ac_prog; ac_word=$2
5099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5100$as_echo_n "checking for $ac_word... " >&6; }
5101if test "${ac_cv_path_FILE+set}" = set; then :
5102  $as_echo_n "(cached) " >&6
5103else
5104  case $FILE in
5105  [\\/]* | ?:[\\/]*)
5106  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
5107  ;;
5108  *)
5109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5110for as_dir in $PATH
5111do
5112  IFS=$as_save_IFS
5113  test -z "$as_dir" && as_dir=.
5114    for ac_exec_ext in '' $ac_executable_extensions; do
5115  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5116    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
5117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5118    break 2
5119  fi
5120done
5121  done
5122IFS=$as_save_IFS
5123
5124  ;;
5125esac
5126fi
5127FILE=$ac_cv_path_FILE
5128if test -n "$FILE"; then
5129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
5130$as_echo "$FILE" >&6; }
5131else
5132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5133$as_echo "no" >&6; }
5134fi
5135
5136
5137  test -n "$FILE" && break
5138done
5139
5140
5141    if test "x$FILE" = x; then
5142        if test "xfile" = x; then
5143          PROG_NAME=file
5144        else
5145          PROG_NAME=file
5146        fi
5147        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5148$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5149        as_fn_error $? "Cannot continue" "$LINENO" 5
5150    fi
5151
5152
5153
5154    for ac_prog in find
5155do
5156  # Extract the first word of "$ac_prog", so it can be a program name with args.
5157set dummy $ac_prog; ac_word=$2
5158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5159$as_echo_n "checking for $ac_word... " >&6; }
5160if test "${ac_cv_path_FIND+set}" = set; then :
5161  $as_echo_n "(cached) " >&6
5162else
5163  case $FIND in
5164  [\\/]* | ?:[\\/]*)
5165  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
5166  ;;
5167  *)
5168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5169for as_dir in $PATH
5170do
5171  IFS=$as_save_IFS
5172  test -z "$as_dir" && as_dir=.
5173    for ac_exec_ext in '' $ac_executable_extensions; do
5174  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5175    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
5176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5177    break 2
5178  fi
5179done
5180  done
5181IFS=$as_save_IFS
5182
5183  ;;
5184esac
5185fi
5186FIND=$ac_cv_path_FIND
5187if test -n "$FIND"; then
5188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
5189$as_echo "$FIND" >&6; }
5190else
5191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5192$as_echo "no" >&6; }
5193fi
5194
5195
5196  test -n "$FIND" && break
5197done
5198
5199
5200    if test "x$FIND" = x; then
5201        if test "xfind" = x; then
5202          PROG_NAME=find
5203        else
5204          PROG_NAME=find
5205        fi
5206        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5207$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5208        as_fn_error $? "Cannot continue" "$LINENO" 5
5209    fi
5210
5211
5212
5213    for ac_prog in head
5214do
5215  # Extract the first word of "$ac_prog", so it can be a program name with args.
5216set dummy $ac_prog; ac_word=$2
5217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5218$as_echo_n "checking for $ac_word... " >&6; }
5219if test "${ac_cv_path_HEAD+set}" = set; then :
5220  $as_echo_n "(cached) " >&6
5221else
5222  case $HEAD in
5223  [\\/]* | ?:[\\/]*)
5224  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
5225  ;;
5226  *)
5227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5228for as_dir in $PATH
5229do
5230  IFS=$as_save_IFS
5231  test -z "$as_dir" && as_dir=.
5232    for ac_exec_ext in '' $ac_executable_extensions; do
5233  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5234    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
5235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5236    break 2
5237  fi
5238done
5239  done
5240IFS=$as_save_IFS
5241
5242  ;;
5243esac
5244fi
5245HEAD=$ac_cv_path_HEAD
5246if test -n "$HEAD"; then
5247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
5248$as_echo "$HEAD" >&6; }
5249else
5250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5251$as_echo "no" >&6; }
5252fi
5253
5254
5255  test -n "$HEAD" && break
5256done
5257
5258
5259    if test "x$HEAD" = x; then
5260        if test "xhead" = x; then
5261          PROG_NAME=head
5262        else
5263          PROG_NAME=head
5264        fi
5265        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5266$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5267        as_fn_error $? "Cannot continue" "$LINENO" 5
5268    fi
5269
5270
5271
5272    for ac_prog in ln
5273do
5274  # Extract the first word of "$ac_prog", so it can be a program name with args.
5275set dummy $ac_prog; ac_word=$2
5276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5277$as_echo_n "checking for $ac_word... " >&6; }
5278if test "${ac_cv_path_LN+set}" = set; then :
5279  $as_echo_n "(cached) " >&6
5280else
5281  case $LN in
5282  [\\/]* | ?:[\\/]*)
5283  ac_cv_path_LN="$LN" # Let the user override the test with a path.
5284  ;;
5285  *)
5286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5287for as_dir in $PATH
5288do
5289  IFS=$as_save_IFS
5290  test -z "$as_dir" && as_dir=.
5291    for ac_exec_ext in '' $ac_executable_extensions; do
5292  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5293    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
5294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5295    break 2
5296  fi
5297done
5298  done
5299IFS=$as_save_IFS
5300
5301  ;;
5302esac
5303fi
5304LN=$ac_cv_path_LN
5305if test -n "$LN"; then
5306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
5307$as_echo "$LN" >&6; }
5308else
5309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5310$as_echo "no" >&6; }
5311fi
5312
5313
5314  test -n "$LN" && break
5315done
5316
5317
5318    if test "x$LN" = x; then
5319        if test "xln" = x; then
5320          PROG_NAME=ln
5321        else
5322          PROG_NAME=ln
5323        fi
5324        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5325$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5326        as_fn_error $? "Cannot continue" "$LINENO" 5
5327    fi
5328
5329
5330
5331    for ac_prog in ls
5332do
5333  # Extract the first word of "$ac_prog", so it can be a program name with args.
5334set dummy $ac_prog; ac_word=$2
5335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5336$as_echo_n "checking for $ac_word... " >&6; }
5337if test "${ac_cv_path_LS+set}" = set; then :
5338  $as_echo_n "(cached) " >&6
5339else
5340  case $LS in
5341  [\\/]* | ?:[\\/]*)
5342  ac_cv_path_LS="$LS" # Let the user override the test with a path.
5343  ;;
5344  *)
5345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5346for as_dir in $PATH
5347do
5348  IFS=$as_save_IFS
5349  test -z "$as_dir" && as_dir=.
5350    for ac_exec_ext in '' $ac_executable_extensions; do
5351  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5352    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
5353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5354    break 2
5355  fi
5356done
5357  done
5358IFS=$as_save_IFS
5359
5360  ;;
5361esac
5362fi
5363LS=$ac_cv_path_LS
5364if test -n "$LS"; then
5365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
5366$as_echo "$LS" >&6; }
5367else
5368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5369$as_echo "no" >&6; }
5370fi
5371
5372
5373  test -n "$LS" && break
5374done
5375
5376
5377    if test "x$LS" = x; then
5378        if test "xls" = x; then
5379          PROG_NAME=ls
5380        else
5381          PROG_NAME=ls
5382        fi
5383        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5384$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5385        as_fn_error $? "Cannot continue" "$LINENO" 5
5386    fi
5387
5388
5389
5390    for ac_prog in mkdir
5391do
5392  # Extract the first word of "$ac_prog", so it can be a program name with args.
5393set dummy $ac_prog; ac_word=$2
5394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5395$as_echo_n "checking for $ac_word... " >&6; }
5396if test "${ac_cv_path_MKDIR+set}" = set; then :
5397  $as_echo_n "(cached) " >&6
5398else
5399  case $MKDIR in
5400  [\\/]* | ?:[\\/]*)
5401  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5402  ;;
5403  *)
5404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5405for as_dir in $PATH
5406do
5407  IFS=$as_save_IFS
5408  test -z "$as_dir" && as_dir=.
5409    for ac_exec_ext in '' $ac_executable_extensions; do
5410  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5411    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5413    break 2
5414  fi
5415done
5416  done
5417IFS=$as_save_IFS
5418
5419  ;;
5420esac
5421fi
5422MKDIR=$ac_cv_path_MKDIR
5423if test -n "$MKDIR"; then
5424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5425$as_echo "$MKDIR" >&6; }
5426else
5427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5428$as_echo "no" >&6; }
5429fi
5430
5431
5432  test -n "$MKDIR" && break
5433done
5434
5435
5436    if test "x$MKDIR" = x; then
5437        if test "xmkdir" = x; then
5438          PROG_NAME=mkdir
5439        else
5440          PROG_NAME=mkdir
5441        fi
5442        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5443$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5444        as_fn_error $? "Cannot continue" "$LINENO" 5
5445    fi
5446
5447
5448
5449    for ac_prog in mv
5450do
5451  # Extract the first word of "$ac_prog", so it can be a program name with args.
5452set dummy $ac_prog; ac_word=$2
5453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5454$as_echo_n "checking for $ac_word... " >&6; }
5455if test "${ac_cv_path_MV+set}" = set; then :
5456  $as_echo_n "(cached) " >&6
5457else
5458  case $MV in
5459  [\\/]* | ?:[\\/]*)
5460  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5461  ;;
5462  *)
5463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5464for as_dir in $PATH
5465do
5466  IFS=$as_save_IFS
5467  test -z "$as_dir" && as_dir=.
5468    for ac_exec_ext in '' $ac_executable_extensions; do
5469  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5470    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5472    break 2
5473  fi
5474done
5475  done
5476IFS=$as_save_IFS
5477
5478  ;;
5479esac
5480fi
5481MV=$ac_cv_path_MV
5482if test -n "$MV"; then
5483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5484$as_echo "$MV" >&6; }
5485else
5486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5487$as_echo "no" >&6; }
5488fi
5489
5490
5491  test -n "$MV" && break
5492done
5493
5494
5495    if test "x$MV" = x; then
5496        if test "xmv" = x; then
5497          PROG_NAME=mv
5498        else
5499          PROG_NAME=mv
5500        fi
5501        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5502$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5503        as_fn_error $? "Cannot continue" "$LINENO" 5
5504    fi
5505
5506
5507
5508    for ac_prog in printf
5509do
5510  # Extract the first word of "$ac_prog", so it can be a program name with args.
5511set dummy $ac_prog; ac_word=$2
5512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5513$as_echo_n "checking for $ac_word... " >&6; }
5514if test "${ac_cv_path_PRINTF+set}" = set; then :
5515  $as_echo_n "(cached) " >&6
5516else
5517  case $PRINTF in
5518  [\\/]* | ?:[\\/]*)
5519  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5520  ;;
5521  *)
5522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5523for as_dir in $PATH
5524do
5525  IFS=$as_save_IFS
5526  test -z "$as_dir" && as_dir=.
5527    for ac_exec_ext in '' $ac_executable_extensions; do
5528  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5529    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5531    break 2
5532  fi
5533done
5534  done
5535IFS=$as_save_IFS
5536
5537  ;;
5538esac
5539fi
5540PRINTF=$ac_cv_path_PRINTF
5541if test -n "$PRINTF"; then
5542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5543$as_echo "$PRINTF" >&6; }
5544else
5545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5546$as_echo "no" >&6; }
5547fi
5548
5549
5550  test -n "$PRINTF" && break
5551done
5552
5553
5554    if test "x$PRINTF" = x; then
5555        if test "xprintf" = x; then
5556          PROG_NAME=printf
5557        else
5558          PROG_NAME=printf
5559        fi
5560        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5561$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5562        as_fn_error $? "Cannot continue" "$LINENO" 5
5563    fi
5564
5565
5566
5567    for ac_prog in sh
5568do
5569  # Extract the first word of "$ac_prog", so it can be a program name with args.
5570set dummy $ac_prog; ac_word=$2
5571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5572$as_echo_n "checking for $ac_word... " >&6; }
5573if test "${ac_cv_path_SH+set}" = set; then :
5574  $as_echo_n "(cached) " >&6
5575else
5576  case $SH in
5577  [\\/]* | ?:[\\/]*)
5578  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5579  ;;
5580  *)
5581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5582for as_dir in $PATH
5583do
5584  IFS=$as_save_IFS
5585  test -z "$as_dir" && as_dir=.
5586    for ac_exec_ext in '' $ac_executable_extensions; do
5587  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5588    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5590    break 2
5591  fi
5592done
5593  done
5594IFS=$as_save_IFS
5595
5596  ;;
5597esac
5598fi
5599SH=$ac_cv_path_SH
5600if test -n "$SH"; then
5601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5602$as_echo "$SH" >&6; }
5603else
5604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5605$as_echo "no" >&6; }
5606fi
5607
5608
5609  test -n "$SH" && break
5610done
5611
5612
5613    if test "x$SH" = x; then
5614        if test "xsh" = x; then
5615          PROG_NAME=sh
5616        else
5617          PROG_NAME=sh
5618        fi
5619        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5620$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5621        as_fn_error $? "Cannot continue" "$LINENO" 5
5622    fi
5623
5624
5625
5626    for ac_prog in sort
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:${as_lineno-$LINENO}: checking for $ac_word" >&5
5631$as_echo_n "checking for $ac_word... " >&6; }
5632if test "${ac_cv_path_SORT+set}" = set; then :
5633  $as_echo_n "(cached) " >&6
5634else
5635  case $SORT in
5636  [\\/]* | ?:[\\/]*)
5637  ac_cv_path_SORT="$SORT" # 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_SORT="$as_dir/$ac_word$ac_exec_ext"
5648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5649    break 2
5650  fi
5651done
5652  done
5653IFS=$as_save_IFS
5654
5655  ;;
5656esac
5657fi
5658SORT=$ac_cv_path_SORT
5659if test -n "$SORT"; then
5660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5661$as_echo "$SORT" >&6; }
5662else
5663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5664$as_echo "no" >&6; }
5665fi
5666
5667
5668  test -n "$SORT" && break
5669done
5670
5671
5672    if test "x$SORT" = x; then
5673        if test "xsort" = x; then
5674          PROG_NAME=sort
5675        else
5676          PROG_NAME=sort
5677        fi
5678        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5679$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5680        as_fn_error $? "Cannot continue" "$LINENO" 5
5681    fi
5682
5683
5684
5685    for ac_prog in tail
5686do
5687  # Extract the first word of "$ac_prog", so it can be a program name with args.
5688set dummy $ac_prog; ac_word=$2
5689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5690$as_echo_n "checking for $ac_word... " >&6; }
5691if test "${ac_cv_path_TAIL+set}" = set; then :
5692  $as_echo_n "(cached) " >&6
5693else
5694  case $TAIL in
5695  [\\/]* | ?:[\\/]*)
5696  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5697  ;;
5698  *)
5699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5700for as_dir in $PATH
5701do
5702  IFS=$as_save_IFS
5703  test -z "$as_dir" && as_dir=.
5704    for ac_exec_ext in '' $ac_executable_extensions; do
5705  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5706    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5708    break 2
5709  fi
5710done
5711  done
5712IFS=$as_save_IFS
5713
5714  ;;
5715esac
5716fi
5717TAIL=$ac_cv_path_TAIL
5718if test -n "$TAIL"; then
5719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5720$as_echo "$TAIL" >&6; }
5721else
5722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5723$as_echo "no" >&6; }
5724fi
5725
5726
5727  test -n "$TAIL" && break
5728done
5729
5730
5731    if test "x$TAIL" = x; then
5732        if test "xtail" = x; then
5733          PROG_NAME=tail
5734        else
5735          PROG_NAME=tail
5736        fi
5737        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5738$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5739        as_fn_error $? "Cannot continue" "$LINENO" 5
5740    fi
5741
5742
5743
5744    for ac_prog in tar
5745do
5746  # Extract the first word of "$ac_prog", so it can be a program name with args.
5747set dummy $ac_prog; ac_word=$2
5748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5749$as_echo_n "checking for $ac_word... " >&6; }
5750if test "${ac_cv_path_TAR+set}" = set; then :
5751  $as_echo_n "(cached) " >&6
5752else
5753  case $TAR in
5754  [\\/]* | ?:[\\/]*)
5755  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5756  ;;
5757  *)
5758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5759for as_dir in $PATH
5760do
5761  IFS=$as_save_IFS
5762  test -z "$as_dir" && as_dir=.
5763    for ac_exec_ext in '' $ac_executable_extensions; do
5764  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5765    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5767    break 2
5768  fi
5769done
5770  done
5771IFS=$as_save_IFS
5772
5773  ;;
5774esac
5775fi
5776TAR=$ac_cv_path_TAR
5777if test -n "$TAR"; then
5778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5779$as_echo "$TAR" >&6; }
5780else
5781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5782$as_echo "no" >&6; }
5783fi
5784
5785
5786  test -n "$TAR" && break
5787done
5788
5789
5790    if test "x$TAR" = x; then
5791        if test "xtar" = x; then
5792          PROG_NAME=tar
5793        else
5794          PROG_NAME=tar
5795        fi
5796        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5797$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5798        as_fn_error $? "Cannot continue" "$LINENO" 5
5799    fi
5800
5801
5802
5803    for ac_prog in tee
5804do
5805  # Extract the first word of "$ac_prog", so it can be a program name with args.
5806set dummy $ac_prog; ac_word=$2
5807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5808$as_echo_n "checking for $ac_word... " >&6; }
5809if test "${ac_cv_path_TEE+set}" = set; then :
5810  $as_echo_n "(cached) " >&6
5811else
5812  case $TEE in
5813  [\\/]* | ?:[\\/]*)
5814  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5815  ;;
5816  *)
5817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5818for as_dir in $PATH
5819do
5820  IFS=$as_save_IFS
5821  test -z "$as_dir" && as_dir=.
5822    for ac_exec_ext in '' $ac_executable_extensions; do
5823  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5824    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5826    break 2
5827  fi
5828done
5829  done
5830IFS=$as_save_IFS
5831
5832  ;;
5833esac
5834fi
5835TEE=$ac_cv_path_TEE
5836if test -n "$TEE"; then
5837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5838$as_echo "$TEE" >&6; }
5839else
5840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5841$as_echo "no" >&6; }
5842fi
5843
5844
5845  test -n "$TEE" && break
5846done
5847
5848
5849    if test "x$TEE" = x; then
5850        if test "xtee" = x; then
5851          PROG_NAME=tee
5852        else
5853          PROG_NAME=tee
5854        fi
5855        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5856$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5857        as_fn_error $? "Cannot continue" "$LINENO" 5
5858    fi
5859
5860
5861
5862    for ac_prog in touch
5863do
5864  # Extract the first word of "$ac_prog", so it can be a program name with args.
5865set dummy $ac_prog; ac_word=$2
5866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5867$as_echo_n "checking for $ac_word... " >&6; }
5868if test "${ac_cv_path_TOUCH+set}" = set; then :
5869  $as_echo_n "(cached) " >&6
5870else
5871  case $TOUCH in
5872  [\\/]* | ?:[\\/]*)
5873  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5874  ;;
5875  *)
5876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5877for as_dir in $PATH
5878do
5879  IFS=$as_save_IFS
5880  test -z "$as_dir" && as_dir=.
5881    for ac_exec_ext in '' $ac_executable_extensions; do
5882  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5883    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5885    break 2
5886  fi
5887done
5888  done
5889IFS=$as_save_IFS
5890
5891  ;;
5892esac
5893fi
5894TOUCH=$ac_cv_path_TOUCH
5895if test -n "$TOUCH"; then
5896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5897$as_echo "$TOUCH" >&6; }
5898else
5899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5900$as_echo "no" >&6; }
5901fi
5902
5903
5904  test -n "$TOUCH" && break
5905done
5906
5907
5908    if test "x$TOUCH" = x; then
5909        if test "xtouch" = x; then
5910          PROG_NAME=touch
5911        else
5912          PROG_NAME=touch
5913        fi
5914        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5915$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5916        as_fn_error $? "Cannot continue" "$LINENO" 5
5917    fi
5918
5919
5920
5921    for ac_prog in tr
5922do
5923  # Extract the first word of "$ac_prog", so it can be a program name with args.
5924set dummy $ac_prog; ac_word=$2
5925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5926$as_echo_n "checking for $ac_word... " >&6; }
5927if test "${ac_cv_path_TR+set}" = set; then :
5928  $as_echo_n "(cached) " >&6
5929else
5930  case $TR in
5931  [\\/]* | ?:[\\/]*)
5932  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5933  ;;
5934  *)
5935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5936for as_dir in $PATH
5937do
5938  IFS=$as_save_IFS
5939  test -z "$as_dir" && as_dir=.
5940    for ac_exec_ext in '' $ac_executable_extensions; do
5941  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5942    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5944    break 2
5945  fi
5946done
5947  done
5948IFS=$as_save_IFS
5949
5950  ;;
5951esac
5952fi
5953TR=$ac_cv_path_TR
5954if test -n "$TR"; then
5955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5956$as_echo "$TR" >&6; }
5957else
5958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5959$as_echo "no" >&6; }
5960fi
5961
5962
5963  test -n "$TR" && break
5964done
5965
5966
5967    if test "x$TR" = x; then
5968        if test "xtr" = x; then
5969          PROG_NAME=tr
5970        else
5971          PROG_NAME=tr
5972        fi
5973        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5974$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5975        as_fn_error $? "Cannot continue" "$LINENO" 5
5976    fi
5977
5978
5979
5980    for ac_prog in uniq
5981do
5982  # Extract the first word of "$ac_prog", so it can be a program name with args.
5983set dummy $ac_prog; ac_word=$2
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5985$as_echo_n "checking for $ac_word... " >&6; }
5986if test "${ac_cv_path_UNIQ+set}" = set; then :
5987  $as_echo_n "(cached) " >&6
5988else
5989  case $UNIQ in
5990  [\\/]* | ?:[\\/]*)
5991  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5992  ;;
5993  *)
5994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH
5996do
5997  IFS=$as_save_IFS
5998  test -z "$as_dir" && as_dir=.
5999    for ac_exec_ext in '' $ac_executable_extensions; do
6000  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6001    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
6002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6003    break 2
6004  fi
6005done
6006  done
6007IFS=$as_save_IFS
6008
6009  ;;
6010esac
6011fi
6012UNIQ=$ac_cv_path_UNIQ
6013if test -n "$UNIQ"; then
6014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
6015$as_echo "$UNIQ" >&6; }
6016else
6017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6018$as_echo "no" >&6; }
6019fi
6020
6021
6022  test -n "$UNIQ" && break
6023done
6024
6025
6026    if test "x$UNIQ" = x; then
6027        if test "xuniq" = x; then
6028          PROG_NAME=uniq
6029        else
6030          PROG_NAME=uniq
6031        fi
6032        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6033$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6034        as_fn_error $? "Cannot continue" "$LINENO" 5
6035    fi
6036
6037
6038
6039    for ac_prog in unzip
6040do
6041  # Extract the first word of "$ac_prog", so it can be a program name with args.
6042set dummy $ac_prog; ac_word=$2
6043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6044$as_echo_n "checking for $ac_word... " >&6; }
6045if test "${ac_cv_path_UNZIP+set}" = set; then :
6046  $as_echo_n "(cached) " >&6
6047else
6048  case $UNZIP in
6049  [\\/]* | ?:[\\/]*)
6050  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
6051  ;;
6052  *)
6053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6054for as_dir in $PATH
6055do
6056  IFS=$as_save_IFS
6057  test -z "$as_dir" && as_dir=.
6058    for ac_exec_ext in '' $ac_executable_extensions; do
6059  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6060    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
6061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6062    break 2
6063  fi
6064done
6065  done
6066IFS=$as_save_IFS
6067
6068  ;;
6069esac
6070fi
6071UNZIP=$ac_cv_path_UNZIP
6072if test -n "$UNZIP"; then
6073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
6074$as_echo "$UNZIP" >&6; }
6075else
6076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6077$as_echo "no" >&6; }
6078fi
6079
6080
6081  test -n "$UNZIP" && break
6082done
6083
6084
6085    if test "x$UNZIP" = x; then
6086        if test "xunzip" = x; then
6087          PROG_NAME=unzip
6088        else
6089          PROG_NAME=unzip
6090        fi
6091        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6092$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6093        as_fn_error $? "Cannot continue" "$LINENO" 5
6094    fi
6095
6096
6097
6098    for ac_prog in wc
6099do
6100  # Extract the first word of "$ac_prog", so it can be a program name with args.
6101set dummy $ac_prog; ac_word=$2
6102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6103$as_echo_n "checking for $ac_word... " >&6; }
6104if test "${ac_cv_path_WC+set}" = set; then :
6105  $as_echo_n "(cached) " >&6
6106else
6107  case $WC in
6108  [\\/]* | ?:[\\/]*)
6109  ac_cv_path_WC="$WC" # Let the user override the test with a path.
6110  ;;
6111  *)
6112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6113for as_dir in $PATH
6114do
6115  IFS=$as_save_IFS
6116  test -z "$as_dir" && as_dir=.
6117    for ac_exec_ext in '' $ac_executable_extensions; do
6118  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6119    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
6120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6121    break 2
6122  fi
6123done
6124  done
6125IFS=$as_save_IFS
6126
6127  ;;
6128esac
6129fi
6130WC=$ac_cv_path_WC
6131if test -n "$WC"; then
6132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
6133$as_echo "$WC" >&6; }
6134else
6135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6136$as_echo "no" >&6; }
6137fi
6138
6139
6140  test -n "$WC" && break
6141done
6142
6143
6144    if test "x$WC" = x; then
6145        if test "xwc" = x; then
6146          PROG_NAME=wc
6147        else
6148          PROG_NAME=wc
6149        fi
6150        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6151$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6152        as_fn_error $? "Cannot continue" "$LINENO" 5
6153    fi
6154
6155
6156
6157    for ac_prog in xargs
6158do
6159  # Extract the first word of "$ac_prog", so it can be a program name with args.
6160set dummy $ac_prog; ac_word=$2
6161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6162$as_echo_n "checking for $ac_word... " >&6; }
6163if test "${ac_cv_path_XARGS+set}" = set; then :
6164  $as_echo_n "(cached) " >&6
6165else
6166  case $XARGS in
6167  [\\/]* | ?:[\\/]*)
6168  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
6169  ;;
6170  *)
6171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6172for as_dir in $PATH
6173do
6174  IFS=$as_save_IFS
6175  test -z "$as_dir" && as_dir=.
6176    for ac_exec_ext in '' $ac_executable_extensions; do
6177  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6178    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
6179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6180    break 2
6181  fi
6182done
6183  done
6184IFS=$as_save_IFS
6185
6186  ;;
6187esac
6188fi
6189XARGS=$ac_cv_path_XARGS
6190if test -n "$XARGS"; then
6191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
6192$as_echo "$XARGS" >&6; }
6193else
6194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6195$as_echo "no" >&6; }
6196fi
6197
6198
6199  test -n "$XARGS" && break
6200done
6201
6202
6203    if test "x$XARGS" = x; then
6204        if test "xxargs" = x; then
6205          PROG_NAME=xargs
6206        else
6207          PROG_NAME=xargs
6208        fi
6209        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6210$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6211        as_fn_error $? "Cannot continue" "$LINENO" 5
6212    fi
6213
6214
6215
6216    for ac_prog in zip
6217do
6218  # Extract the first word of "$ac_prog", so it can be a program name with args.
6219set dummy $ac_prog; ac_word=$2
6220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6221$as_echo_n "checking for $ac_word... " >&6; }
6222if test "${ac_cv_path_ZIP+set}" = set; then :
6223  $as_echo_n "(cached) " >&6
6224else
6225  case $ZIP in
6226  [\\/]* | ?:[\\/]*)
6227  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
6228  ;;
6229  *)
6230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6231for as_dir in $PATH
6232do
6233  IFS=$as_save_IFS
6234  test -z "$as_dir" && as_dir=.
6235    for ac_exec_ext in '' $ac_executable_extensions; do
6236  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6237    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
6238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6239    break 2
6240  fi
6241done
6242  done
6243IFS=$as_save_IFS
6244
6245  ;;
6246esac
6247fi
6248ZIP=$ac_cv_path_ZIP
6249if test -n "$ZIP"; then
6250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
6251$as_echo "$ZIP" >&6; }
6252else
6253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6254$as_echo "no" >&6; }
6255fi
6256
6257
6258  test -n "$ZIP" && break
6259done
6260
6261
6262    if test "x$ZIP" = x; then
6263        if test "xzip" = x; then
6264          PROG_NAME=zip
6265        else
6266          PROG_NAME=zip
6267        fi
6268        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6269$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6270        as_fn_error $? "Cannot continue" "$LINENO" 5
6271    fi
6272
6273
6274
6275# Then required tools that require some special treatment.
6276for ac_prog in gawk mawk nawk awk
6277do
6278  # Extract the first word of "$ac_prog", so it can be a program name with args.
6279set dummy $ac_prog; ac_word=$2
6280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6281$as_echo_n "checking for $ac_word... " >&6; }
6282if test "${ac_cv_prog_AWK+set}" = set; then :
6283  $as_echo_n "(cached) " >&6
6284else
6285  if test -n "$AWK"; then
6286  ac_cv_prog_AWK="$AWK" # Let the user override the test.
6287else
6288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6289for as_dir in $PATH
6290do
6291  IFS=$as_save_IFS
6292  test -z "$as_dir" && as_dir=.
6293    for ac_exec_ext in '' $ac_executable_extensions; do
6294  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6295    ac_cv_prog_AWK="$ac_prog"
6296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6297    break 2
6298  fi
6299done
6300  done
6301IFS=$as_save_IFS
6302
6303fi
6304fi
6305AWK=$ac_cv_prog_AWK
6306if test -n "$AWK"; then
6307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6308$as_echo "$AWK" >&6; }
6309else
6310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6311$as_echo "no" >&6; }
6312fi
6313
6314
6315  test -n "$AWK" && break
6316done
6317
6318
6319    if test "x$AWK" = x; then
6320        if test "x" = x; then
6321          PROG_NAME=awk
6322        else
6323          PROG_NAME=
6324        fi
6325        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6326$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6327        as_fn_error $? "Cannot continue" "$LINENO" 5
6328    fi
6329
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6331$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6332if test "${ac_cv_path_GREP+set}" = set; then :
6333  $as_echo_n "(cached) " >&6
6334else
6335  if test -z "$GREP"; then
6336  ac_path_GREP_found=false
6337  # Loop through the user's path and test for each of PROGNAME-LIST
6338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6339for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6340do
6341  IFS=$as_save_IFS
6342  test -z "$as_dir" && as_dir=.
6343    for ac_prog in grep ggrep; do
6344    for ac_exec_ext in '' $ac_executable_extensions; do
6345      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6346      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6347# Check for GNU ac_path_GREP and select it if it is found.
6348  # Check for GNU $ac_path_GREP
6349case `"$ac_path_GREP" --version 2>&1` in
6350*GNU*)
6351  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6352*)
6353  ac_count=0
6354  $as_echo_n 0123456789 >"conftest.in"
6355  while :
6356  do
6357    cat "conftest.in" "conftest.in" >"conftest.tmp"
6358    mv "conftest.tmp" "conftest.in"
6359    cp "conftest.in" "conftest.nl"
6360    $as_echo 'GREP' >> "conftest.nl"
6361    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6362    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6363    as_fn_arith $ac_count + 1 && ac_count=$as_val
6364    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6365      # Best one so far, save it but keep looking for a better one
6366      ac_cv_path_GREP="$ac_path_GREP"
6367      ac_path_GREP_max=$ac_count
6368    fi
6369    # 10*(2^10) chars as input seems more than enough
6370    test $ac_count -gt 10 && break
6371  done
6372  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6373esac
6374
6375      $ac_path_GREP_found && break 3
6376    done
6377  done
6378  done
6379IFS=$as_save_IFS
6380  if test -z "$ac_cv_path_GREP"; then
6381    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6382  fi
6383else
6384  ac_cv_path_GREP=$GREP
6385fi
6386
6387fi
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6389$as_echo "$ac_cv_path_GREP" >&6; }
6390 GREP="$ac_cv_path_GREP"
6391
6392
6393
6394    if test "x$GREP" = x; then
6395        if test "x" = x; then
6396          PROG_NAME=grep
6397        else
6398          PROG_NAME=
6399        fi
6400        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6401$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6402        as_fn_error $? "Cannot continue" "$LINENO" 5
6403    fi
6404
6405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6406$as_echo_n "checking for egrep... " >&6; }
6407if test "${ac_cv_path_EGREP+set}" = set; then :
6408  $as_echo_n "(cached) " >&6
6409else
6410  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6411   then ac_cv_path_EGREP="$GREP -E"
6412   else
6413     if test -z "$EGREP"; then
6414  ac_path_EGREP_found=false
6415  # Loop through the user's path and test for each of PROGNAME-LIST
6416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6417for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6418do
6419  IFS=$as_save_IFS
6420  test -z "$as_dir" && as_dir=.
6421    for ac_prog in egrep; do
6422    for ac_exec_ext in '' $ac_executable_extensions; do
6423      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6424      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6425# Check for GNU ac_path_EGREP and select it if it is found.
6426  # Check for GNU $ac_path_EGREP
6427case `"$ac_path_EGREP" --version 2>&1` in
6428*GNU*)
6429  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6430*)
6431  ac_count=0
6432  $as_echo_n 0123456789 >"conftest.in"
6433  while :
6434  do
6435    cat "conftest.in" "conftest.in" >"conftest.tmp"
6436    mv "conftest.tmp" "conftest.in"
6437    cp "conftest.in" "conftest.nl"
6438    $as_echo 'EGREP' >> "conftest.nl"
6439    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6440    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6441    as_fn_arith $ac_count + 1 && ac_count=$as_val
6442    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6443      # Best one so far, save it but keep looking for a better one
6444      ac_cv_path_EGREP="$ac_path_EGREP"
6445      ac_path_EGREP_max=$ac_count
6446    fi
6447    # 10*(2^10) chars as input seems more than enough
6448    test $ac_count -gt 10 && break
6449  done
6450  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6451esac
6452
6453      $ac_path_EGREP_found && break 3
6454    done
6455  done
6456  done
6457IFS=$as_save_IFS
6458  if test -z "$ac_cv_path_EGREP"; then
6459    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6460  fi
6461else
6462  ac_cv_path_EGREP=$EGREP
6463fi
6464
6465   fi
6466fi
6467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6468$as_echo "$ac_cv_path_EGREP" >&6; }
6469 EGREP="$ac_cv_path_EGREP"
6470
6471
6472
6473    if test "x$EGREP" = x; then
6474        if test "x" = x; then
6475          PROG_NAME=egrep
6476        else
6477          PROG_NAME=
6478        fi
6479        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6480$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6481        as_fn_error $? "Cannot continue" "$LINENO" 5
6482    fi
6483
6484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6485$as_echo_n "checking for fgrep... " >&6; }
6486if test "${ac_cv_path_FGREP+set}" = set; then :
6487  $as_echo_n "(cached) " >&6
6488else
6489  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6490   then ac_cv_path_FGREP="$GREP -F"
6491   else
6492     if test -z "$FGREP"; then
6493  ac_path_FGREP_found=false
6494  # Loop through the user's path and test for each of PROGNAME-LIST
6495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6496for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6497do
6498  IFS=$as_save_IFS
6499  test -z "$as_dir" && as_dir=.
6500    for ac_prog in fgrep; do
6501    for ac_exec_ext in '' $ac_executable_extensions; do
6502      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6503      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6504# Check for GNU ac_path_FGREP and select it if it is found.
6505  # Check for GNU $ac_path_FGREP
6506case `"$ac_path_FGREP" --version 2>&1` in
6507*GNU*)
6508  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6509*)
6510  ac_count=0
6511  $as_echo_n 0123456789 >"conftest.in"
6512  while :
6513  do
6514    cat "conftest.in" "conftest.in" >"conftest.tmp"
6515    mv "conftest.tmp" "conftest.in"
6516    cp "conftest.in" "conftest.nl"
6517    $as_echo 'FGREP' >> "conftest.nl"
6518    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6519    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6520    as_fn_arith $ac_count + 1 && ac_count=$as_val
6521    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6522      # Best one so far, save it but keep looking for a better one
6523      ac_cv_path_FGREP="$ac_path_FGREP"
6524      ac_path_FGREP_max=$ac_count
6525    fi
6526    # 10*(2^10) chars as input seems more than enough
6527    test $ac_count -gt 10 && break
6528  done
6529  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6530esac
6531
6532      $ac_path_FGREP_found && break 3
6533    done
6534  done
6535  done
6536IFS=$as_save_IFS
6537  if test -z "$ac_cv_path_FGREP"; then
6538    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6539  fi
6540else
6541  ac_cv_path_FGREP=$FGREP
6542fi
6543
6544   fi
6545fi
6546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6547$as_echo "$ac_cv_path_FGREP" >&6; }
6548 FGREP="$ac_cv_path_FGREP"
6549
6550
6551
6552    if test "x$FGREP" = x; then
6553        if test "x" = x; then
6554          PROG_NAME=fgrep
6555        else
6556          PROG_NAME=
6557        fi
6558        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6559$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6560        as_fn_error $? "Cannot continue" "$LINENO" 5
6561    fi
6562
6563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6564$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6565if test "${ac_cv_path_SED+set}" = set; then :
6566  $as_echo_n "(cached) " >&6
6567else
6568            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6569     for ac_i in 1 2 3 4 5 6 7; do
6570       ac_script="$ac_script$as_nl$ac_script"
6571     done
6572     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6573     { ac_script=; unset ac_script;}
6574     if test -z "$SED"; then
6575  ac_path_SED_found=false
6576  # Loop through the user's path and test for each of PROGNAME-LIST
6577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6578for as_dir in $PATH
6579do
6580  IFS=$as_save_IFS
6581  test -z "$as_dir" && as_dir=.
6582    for ac_prog in sed gsed; do
6583    for ac_exec_ext in '' $ac_executable_extensions; do
6584      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6585      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6586# Check for GNU ac_path_SED and select it if it is found.
6587  # Check for GNU $ac_path_SED
6588case `"$ac_path_SED" --version 2>&1` in
6589*GNU*)
6590  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6591*)
6592  ac_count=0
6593  $as_echo_n 0123456789 >"conftest.in"
6594  while :
6595  do
6596    cat "conftest.in" "conftest.in" >"conftest.tmp"
6597    mv "conftest.tmp" "conftest.in"
6598    cp "conftest.in" "conftest.nl"
6599    $as_echo '' >> "conftest.nl"
6600    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6601    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6602    as_fn_arith $ac_count + 1 && ac_count=$as_val
6603    if test $ac_count -gt ${ac_path_SED_max-0}; then
6604      # Best one so far, save it but keep looking for a better one
6605      ac_cv_path_SED="$ac_path_SED"
6606      ac_path_SED_max=$ac_count
6607    fi
6608    # 10*(2^10) chars as input seems more than enough
6609    test $ac_count -gt 10 && break
6610  done
6611  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6612esac
6613
6614      $ac_path_SED_found && break 3
6615    done
6616  done
6617  done
6618IFS=$as_save_IFS
6619  if test -z "$ac_cv_path_SED"; then
6620    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6621  fi
6622else
6623  ac_cv_path_SED=$SED
6624fi
6625
6626fi
6627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6628$as_echo "$ac_cv_path_SED" >&6; }
6629 SED="$ac_cv_path_SED"
6630  rm -f conftest.sed
6631
6632
6633    if test "x$SED" = x; then
6634        if test "x" = x; then
6635          PROG_NAME=sed
6636        else
6637          PROG_NAME=
6638        fi
6639        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6640$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6641        as_fn_error $? "Cannot continue" "$LINENO" 5
6642    fi
6643
6644
6645for ac_prog in nawk gawk awk
6646do
6647  # Extract the first word of "$ac_prog", so it can be a program name with args.
6648set dummy $ac_prog; ac_word=$2
6649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6650$as_echo_n "checking for $ac_word... " >&6; }
6651if test "${ac_cv_path_NAWK+set}" = set; then :
6652  $as_echo_n "(cached) " >&6
6653else
6654  case $NAWK in
6655  [\\/]* | ?:[\\/]*)
6656  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6657  ;;
6658  *)
6659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6660for as_dir in $PATH
6661do
6662  IFS=$as_save_IFS
6663  test -z "$as_dir" && as_dir=.
6664    for ac_exec_ext in '' $ac_executable_extensions; do
6665  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6666    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6668    break 2
6669  fi
6670done
6671  done
6672IFS=$as_save_IFS
6673
6674  ;;
6675esac
6676fi
6677NAWK=$ac_cv_path_NAWK
6678if test -n "$NAWK"; then
6679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6680$as_echo "$NAWK" >&6; }
6681else
6682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6683$as_echo "no" >&6; }
6684fi
6685
6686
6687  test -n "$NAWK" && break
6688done
6689
6690
6691    if test "x$NAWK" = x; then
6692        if test "x" = x; then
6693          PROG_NAME=nawk
6694        else
6695          PROG_NAME=
6696        fi
6697        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6698$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6699        as_fn_error $? "Cannot continue" "$LINENO" 5
6700    fi
6701
6702
6703
6704  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
6705  if test "x$MAKE" != x; then
6706    # User has supplied a make, test it.
6707    if test ! -f "$MAKE"; then
6708      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
6709    fi
6710
6711  MAKE_CANDIDATE=""$MAKE""
6712  DESCRIPTION="user supplied MAKE="
6713  if test "x$MAKE_CANDIDATE" != x; then
6714    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
6715$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
6716
6717    # Translate "gcc -E" into "`which gcc` -E" ie
6718    # extract the full path to the binary and at the
6719    # same time maintain any arguments passed to it.
6720    # The command MUST exist in the path, or else!
6721    tmp="$MAKE_CANDIDATE"
6722    car="${tmp%% *}"
6723    tmp="$MAKE_CANDIDATE EOL"
6724    cdr="${tmp#* }"
6725    # On windows we want paths without spaces.
6726    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
6727
6728    # Translate long cygdrive or C:\sdfsf path
6729    # into a short mixed mode path that has no
6730    # spaces in it.
6731    tmp="$car"
6732
6733    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
6734        tmp=`$CYGPATH -u "$car"`
6735        tmp=`which "$tmp"`
6736        # If file exists with .exe appended, that's the real filename
6737        # and cygpath needs that to convert to short style path.
6738        if test -f "${tmp}.exe"; then
6739           tmp="${tmp}.exe"
6740        elif test -f "${tmp}.cmd"; then
6741           tmp="${tmp}.cmd"
6742        fi
6743        # Convert to C:/ mixed style path without spaces.
6744         tmp=`$CYGPATH -s -m "$tmp"`
6745    fi
6746    car="$tmp"
6747
6748    else
6749        # "which" is not portable, but is used here
6750        # because we know that the command exists!
6751        car=`which $car`
6752    fi
6753    if test "x$cdr" != xEOL; then
6754        MAKE_CANDIDATE="$car ${cdr% *}"
6755    else
6756        MAKE_CANDIDATE="$car"
6757    fi
6758
6759    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
6760    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
6761    if test "x$IS_GNU_MAKE" = x; then
6762      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
6763$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
6764    else
6765      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
6766      if test "x$IS_MODERN_MAKE" = x; then
6767        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
6768$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;}
6769      else
6770        FOUND_MAKE=$MAKE_CANDIDATE
6771      fi
6772    fi
6773  fi
6774
6775    if test "x$FOUND_MAKE" = x; then
6776      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
6777    fi
6778  else
6779    # Try our hardest to locate a correct version of GNU make
6780    for ac_prog in gmake
6781do
6782  # Extract the first word of "$ac_prog", so it can be a program name with args.
6783set dummy $ac_prog; ac_word=$2
6784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6785$as_echo_n "checking for $ac_word... " >&6; }
6786if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
6787  $as_echo_n "(cached) " >&6
6788else
6789  case $CHECK_GMAKE in
6790  [\\/]* | ?:[\\/]*)
6791  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
6792  ;;
6793  *)
6794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6795for as_dir in $PATH
6796do
6797  IFS=$as_save_IFS
6798  test -z "$as_dir" && as_dir=.
6799    for ac_exec_ext in '' $ac_executable_extensions; do
6800  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6801    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
6802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6803    break 2
6804  fi
6805done
6806  done
6807IFS=$as_save_IFS
6808
6809  ;;
6810esac
6811fi
6812CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
6813if test -n "$CHECK_GMAKE"; then
6814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
6815$as_echo "$CHECK_GMAKE" >&6; }
6816else
6817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6818$as_echo "no" >&6; }
6819fi
6820
6821
6822  test -n "$CHECK_GMAKE" && break
6823done
6824
6825
6826  MAKE_CANDIDATE=""$CHECK_GMAKE""
6827  DESCRIPTION="gmake in PATH"
6828  if test "x$MAKE_CANDIDATE" != x; then
6829    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
6830$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
6831
6832    # Translate "gcc -E" into "`which gcc` -E" ie
6833    # extract the full path to the binary and at the
6834    # same time maintain any arguments passed to it.
6835    # The command MUST exist in the path, or else!
6836    tmp="$MAKE_CANDIDATE"
6837    car="${tmp%% *}"
6838    tmp="$MAKE_CANDIDATE EOL"
6839    cdr="${tmp#* }"
6840    # On windows we want paths without spaces.
6841    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
6842
6843    # Translate long cygdrive or C:\sdfsf path
6844    # into a short mixed mode path that has no
6845    # spaces in it.
6846    tmp="$car"
6847
6848    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
6849        tmp=`$CYGPATH -u "$car"`
6850        tmp=`which "$tmp"`
6851        # If file exists with .exe appended, that's the real filename
6852        # and cygpath needs that to convert to short style path.
6853        if test -f "${tmp}.exe"; then
6854           tmp="${tmp}.exe"
6855        elif test -f "${tmp}.cmd"; then
6856           tmp="${tmp}.cmd"
6857        fi
6858        # Convert to C:/ mixed style path without spaces.
6859         tmp=`$CYGPATH -s -m "$tmp"`
6860    fi
6861    car="$tmp"
6862
6863    else
6864        # "which" is not portable, but is used here
6865        # because we know that the command exists!
6866        car=`which $car`
6867    fi
6868    if test "x$cdr" != xEOL; then
6869        MAKE_CANDIDATE="$car ${cdr% *}"
6870    else
6871        MAKE_CANDIDATE="$car"
6872    fi
6873
6874    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
6875    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
6876    if test "x$IS_GNU_MAKE" = x; then
6877      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
6878$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
6879    else
6880      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
6881      if test "x$IS_MODERN_MAKE" = x; then
6882        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
6883$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;}
6884      else
6885        FOUND_MAKE=$MAKE_CANDIDATE
6886      fi
6887    fi
6888  fi
6889
6890
6891    if test "x$FOUND_MAKE" = x; then
6892      for ac_prog in make
6893do
6894  # Extract the first word of "$ac_prog", so it can be a program name with args.
6895set dummy $ac_prog; ac_word=$2
6896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6897$as_echo_n "checking for $ac_word... " >&6; }
6898if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
6899  $as_echo_n "(cached) " >&6
6900else
6901  case $CHECK_MAKE in
6902  [\\/]* | ?:[\\/]*)
6903  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
6904  ;;
6905  *)
6906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6907for as_dir in $PATH
6908do
6909  IFS=$as_save_IFS
6910  test -z "$as_dir" && as_dir=.
6911    for ac_exec_ext in '' $ac_executable_extensions; do
6912  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6913    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
6914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6915    break 2
6916  fi
6917done
6918  done
6919IFS=$as_save_IFS
6920
6921  ;;
6922esac
6923fi
6924CHECK_MAKE=$ac_cv_path_CHECK_MAKE
6925if test -n "$CHECK_MAKE"; then
6926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
6927$as_echo "$CHECK_MAKE" >&6; }
6928else
6929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6930$as_echo "no" >&6; }
6931fi
6932
6933
6934  test -n "$CHECK_MAKE" && break
6935done
6936
6937
6938  MAKE_CANDIDATE=""$CHECK_MAKE""
6939  DESCRIPTION="make in PATH"
6940  if test "x$MAKE_CANDIDATE" != x; then
6941    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
6942$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
6943
6944    # Translate "gcc -E" into "`which gcc` -E" ie
6945    # extract the full path to the binary and at the
6946    # same time maintain any arguments passed to it.
6947    # The command MUST exist in the path, or else!
6948    tmp="$MAKE_CANDIDATE"
6949    car="${tmp%% *}"
6950    tmp="$MAKE_CANDIDATE EOL"
6951    cdr="${tmp#* }"
6952    # On windows we want paths without spaces.
6953    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
6954
6955    # Translate long cygdrive or C:\sdfsf path
6956    # into a short mixed mode path that has no
6957    # spaces in it.
6958    tmp="$car"
6959
6960    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
6961        tmp=`$CYGPATH -u "$car"`
6962        tmp=`which "$tmp"`
6963        # If file exists with .exe appended, that's the real filename
6964        # and cygpath needs that to convert to short style path.
6965        if test -f "${tmp}.exe"; then
6966           tmp="${tmp}.exe"
6967        elif test -f "${tmp}.cmd"; then
6968           tmp="${tmp}.cmd"
6969        fi
6970        # Convert to C:/ mixed style path without spaces.
6971         tmp=`$CYGPATH -s -m "$tmp"`
6972    fi
6973    car="$tmp"
6974
6975    else
6976        # "which" is not portable, but is used here
6977        # because we know that the command exists!
6978        car=`which $car`
6979    fi
6980    if test "x$cdr" != xEOL; then
6981        MAKE_CANDIDATE="$car ${cdr% *}"
6982    else
6983        MAKE_CANDIDATE="$car"
6984    fi
6985
6986    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
6987    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
6988    if test "x$IS_GNU_MAKE" = x; then
6989      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
6990$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
6991    else
6992      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
6993      if test "x$IS_MODERN_MAKE" = x; then
6994        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
6995$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;}
6996      else
6997        FOUND_MAKE=$MAKE_CANDIDATE
6998      fi
6999    fi
7000  fi
7001
7002    fi
7003
7004    if test "x$FOUND_MAKE" = x; then
7005      if test "x$TOOLS_DIR" != x; then
7006        # We have a tools-dir, check that as well before giving up.
7007        OLD_PATH=$PATH
7008        PATH=$TOOLS_DIR:$PATH
7009        for ac_prog in gmake
7010do
7011  # Extract the first word of "$ac_prog", so it can be a program name with args.
7012set dummy $ac_prog; ac_word=$2
7013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7014$as_echo_n "checking for $ac_word... " >&6; }
7015if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
7016  $as_echo_n "(cached) " >&6
7017else
7018  case $CHECK_TOOLSDIR_GMAKE in
7019  [\\/]* | ?:[\\/]*)
7020  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
7021  ;;
7022  *)
7023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7024for as_dir in $PATH
7025do
7026  IFS=$as_save_IFS
7027  test -z "$as_dir" && as_dir=.
7028    for ac_exec_ext in '' $ac_executable_extensions; do
7029  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7030    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
7031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7032    break 2
7033  fi
7034done
7035  done
7036IFS=$as_save_IFS
7037
7038  ;;
7039esac
7040fi
7041CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
7042if test -n "$CHECK_TOOLSDIR_GMAKE"; then
7043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
7044$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
7045else
7046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7047$as_echo "no" >&6; }
7048fi
7049
7050
7051  test -n "$CHECK_TOOLSDIR_GMAKE" && break
7052done
7053
7054
7055  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
7056  DESCRIPTION="gmake in tools-dir"
7057  if test "x$MAKE_CANDIDATE" != x; then
7058    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7059$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7060
7061    # Translate "gcc -E" into "`which gcc` -E" ie
7062    # extract the full path to the binary and at the
7063    # same time maintain any arguments passed to it.
7064    # The command MUST exist in the path, or else!
7065    tmp="$MAKE_CANDIDATE"
7066    car="${tmp%% *}"
7067    tmp="$MAKE_CANDIDATE EOL"
7068    cdr="${tmp#* }"
7069    # On windows we want paths without spaces.
7070    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7071
7072    # Translate long cygdrive or C:\sdfsf path
7073    # into a short mixed mode path that has no
7074    # spaces in it.
7075    tmp="$car"
7076
7077    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7078        tmp=`$CYGPATH -u "$car"`
7079        tmp=`which "$tmp"`
7080        # If file exists with .exe appended, that's the real filename
7081        # and cygpath needs that to convert to short style path.
7082        if test -f "${tmp}.exe"; then
7083           tmp="${tmp}.exe"
7084        elif test -f "${tmp}.cmd"; then
7085           tmp="${tmp}.cmd"
7086        fi
7087        # Convert to C:/ mixed style path without spaces.
7088         tmp=`$CYGPATH -s -m "$tmp"`
7089    fi
7090    car="$tmp"
7091
7092    else
7093        # "which" is not portable, but is used here
7094        # because we know that the command exists!
7095        car=`which $car`
7096    fi
7097    if test "x$cdr" != xEOL; then
7098        MAKE_CANDIDATE="$car ${cdr% *}"
7099    else
7100        MAKE_CANDIDATE="$car"
7101    fi
7102
7103    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7104    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7105    if test "x$IS_GNU_MAKE" = x; then
7106      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7107$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7108    else
7109      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7110      if test "x$IS_MODERN_MAKE" = x; then
7111        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
7112$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;}
7113      else
7114        FOUND_MAKE=$MAKE_CANDIDATE
7115      fi
7116    fi
7117  fi
7118
7119        if test "x$FOUND_MAKE" = x; then
7120          for ac_prog in make
7121do
7122  # Extract the first word of "$ac_prog", so it can be a program name with args.
7123set dummy $ac_prog; ac_word=$2
7124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7125$as_echo_n "checking for $ac_word... " >&6; }
7126if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
7127  $as_echo_n "(cached) " >&6
7128else
7129  case $CHECK_TOOLSDIR_MAKE in
7130  [\\/]* | ?:[\\/]*)
7131  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
7132  ;;
7133  *)
7134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7135for as_dir in $PATH
7136do
7137  IFS=$as_save_IFS
7138  test -z "$as_dir" && as_dir=.
7139    for ac_exec_ext in '' $ac_executable_extensions; do
7140  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7141    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
7142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7143    break 2
7144  fi
7145done
7146  done
7147IFS=$as_save_IFS
7148
7149  ;;
7150esac
7151fi
7152CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
7153if test -n "$CHECK_TOOLSDIR_MAKE"; then
7154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
7155$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
7156else
7157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7158$as_echo "no" >&6; }
7159fi
7160
7161
7162  test -n "$CHECK_TOOLSDIR_MAKE" && break
7163done
7164
7165
7166  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
7167  DESCRIPTION="make in tools-dir"
7168  if test "x$MAKE_CANDIDATE" != x; then
7169    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7170$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7171
7172    # Translate "gcc -E" into "`which gcc` -E" ie
7173    # extract the full path to the binary and at the
7174    # same time maintain any arguments passed to it.
7175    # The command MUST exist in the path, or else!
7176    tmp="$MAKE_CANDIDATE"
7177    car="${tmp%% *}"
7178    tmp="$MAKE_CANDIDATE EOL"
7179    cdr="${tmp#* }"
7180    # On windows we want paths without spaces.
7181    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7182
7183    # Translate long cygdrive or C:\sdfsf path
7184    # into a short mixed mode path that has no
7185    # spaces in it.
7186    tmp="$car"
7187
7188    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7189        tmp=`$CYGPATH -u "$car"`
7190        tmp=`which "$tmp"`
7191        # If file exists with .exe appended, that's the real filename
7192        # and cygpath needs that to convert to short style path.
7193        if test -f "${tmp}.exe"; then
7194           tmp="${tmp}.exe"
7195        elif test -f "${tmp}.cmd"; then
7196           tmp="${tmp}.cmd"
7197        fi
7198        # Convert to C:/ mixed style path without spaces.
7199         tmp=`$CYGPATH -s -m "$tmp"`
7200    fi
7201    car="$tmp"
7202
7203    else
7204        # "which" is not portable, but is used here
7205        # because we know that the command exists!
7206        car=`which $car`
7207    fi
7208    if test "x$cdr" != xEOL; then
7209        MAKE_CANDIDATE="$car ${cdr% *}"
7210    else
7211        MAKE_CANDIDATE="$car"
7212    fi
7213
7214    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7215    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7216    if test "x$IS_GNU_MAKE" = x; then
7217      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7218$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7219    else
7220      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7221      if test "x$IS_MODERN_MAKE" = x; then
7222        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
7223$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;}
7224      else
7225        FOUND_MAKE=$MAKE_CANDIDATE
7226      fi
7227    fi
7228  fi
7229
7230        fi
7231        PATH=$OLD_PATH
7232      fi
7233    fi
7234
7235    if test "x$FOUND_MAKE" = x; then
7236      as_fn_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." "$LINENO" 5
7237    fi
7238  fi
7239
7240  MAKE=$FOUND_MAKE
7241
7242  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
7243$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
7244
7245
7246
7247    for ac_prog in rm
7248do
7249  # Extract the first word of "$ac_prog", so it can be a program name with args.
7250set dummy $ac_prog; ac_word=$2
7251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7252$as_echo_n "checking for $ac_word... " >&6; }
7253if test "${ac_cv_path_RM+set}" = set; then :
7254  $as_echo_n "(cached) " >&6
7255else
7256  case $RM in
7257  [\\/]* | ?:[\\/]*)
7258  ac_cv_path_RM="$RM" # Let the user override the test with a path.
7259  ;;
7260  *)
7261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7262for as_dir in $PATH
7263do
7264  IFS=$as_save_IFS
7265  test -z "$as_dir" && as_dir=.
7266    for ac_exec_ext in '' $ac_executable_extensions; do
7267  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7268    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
7269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7270    break 2
7271  fi
7272done
7273  done
7274IFS=$as_save_IFS
7275
7276  ;;
7277esac
7278fi
7279RM=$ac_cv_path_RM
7280if test -n "$RM"; then
7281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
7282$as_echo "$RM" >&6; }
7283else
7284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7285$as_echo "no" >&6; }
7286fi
7287
7288
7289  test -n "$RM" && break
7290done
7291
7292
7293    if test "x$RM" = x; then
7294        if test "xrm" = x; then
7295          PROG_NAME=rm
7296        else
7297          PROG_NAME=rm
7298        fi
7299        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
7300$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
7301        as_fn_error $? "Cannot continue" "$LINENO" 5
7302    fi
7303
7304
7305RM="$RM -f"
7306
7307
7308    # Test if find supports -delete
7309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
7310$as_echo_n "checking if find supports -delete... " >&6; }
7311    FIND_DELETE="-delete"
7312
7313    DELETEDIR=`mktemp -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
7314
7315    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
7316
7317    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
7318    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
7319        # No, it does not.
7320        rm $DELETEDIR/TestIfFindSupportsDelete
7321        FIND_DELETE="-exec rm \{\} \+"
7322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7323$as_echo "no" >&6; }
7324    else
7325        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7326$as_echo "yes" >&6; }
7327    fi
7328    rmdir $DELETEDIR
7329
7330
7331
7332# Non-required basic tools
7333
7334# Extract the first word of "pwd", so it can be a program name with args.
7335set dummy pwd; ac_word=$2
7336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7337$as_echo_n "checking for $ac_word... " >&6; }
7338if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
7339  $as_echo_n "(cached) " >&6
7340else
7341  case $THEPWDCMD in
7342  [\\/]* | ?:[\\/]*)
7343  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
7344  ;;
7345  *)
7346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7347for as_dir in $PATH
7348do
7349  IFS=$as_save_IFS
7350  test -z "$as_dir" && as_dir=.
7351    for ac_exec_ext in '' $ac_executable_extensions; do
7352  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7353    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
7354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7355    break 2
7356  fi
7357done
7358  done
7359IFS=$as_save_IFS
7360
7361  ;;
7362esac
7363fi
7364THEPWDCMD=$ac_cv_path_THEPWDCMD
7365if test -n "$THEPWDCMD"; then
7366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
7367$as_echo "$THEPWDCMD" >&6; }
7368else
7369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7370$as_echo "no" >&6; }
7371fi
7372
7373
7374# Extract the first word of "ldd", so it can be a program name with args.
7375set dummy ldd; ac_word=$2
7376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7377$as_echo_n "checking for $ac_word... " >&6; }
7378if test "${ac_cv_path_LDD+set}" = set; then :
7379  $as_echo_n "(cached) " >&6
7380else
7381  case $LDD in
7382  [\\/]* | ?:[\\/]*)
7383  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
7384  ;;
7385  *)
7386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7387for as_dir in $PATH
7388do
7389  IFS=$as_save_IFS
7390  test -z "$as_dir" && as_dir=.
7391    for ac_exec_ext in '' $ac_executable_extensions; do
7392  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7393    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
7394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7395    break 2
7396  fi
7397done
7398  done
7399IFS=$as_save_IFS
7400
7401  ;;
7402esac
7403fi
7404LDD=$ac_cv_path_LDD
7405if test -n "$LDD"; then
7406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
7407$as_echo "$LDD" >&6; }
7408else
7409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7410$as_echo "no" >&6; }
7411fi
7412
7413
7414if test "x$LDD" = "x"; then
7415    # List shared lib dependencies is used for
7416    # debug output and checking for forbidden dependencies.
7417    # We can build without it.
7418    LDD="true"
7419fi
7420# Extract the first word of "otool", so it can be a program name with args.
7421set dummy otool; ac_word=$2
7422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7423$as_echo_n "checking for $ac_word... " >&6; }
7424if test "${ac_cv_path_OTOOL+set}" = set; then :
7425  $as_echo_n "(cached) " >&6
7426else
7427  case $OTOOL in
7428  [\\/]* | ?:[\\/]*)
7429  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
7430  ;;
7431  *)
7432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7433for as_dir in $PATH
7434do
7435  IFS=$as_save_IFS
7436  test -z "$as_dir" && as_dir=.
7437    for ac_exec_ext in '' $ac_executable_extensions; do
7438  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7439    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
7440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7441    break 2
7442  fi
7443done
7444  done
7445IFS=$as_save_IFS
7446
7447  ;;
7448esac
7449fi
7450OTOOL=$ac_cv_path_OTOOL
7451if test -n "$OTOOL"; then
7452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
7453$as_echo "$OTOOL" >&6; }
7454else
7455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7456$as_echo "no" >&6; }
7457fi
7458
7459
7460if test "x$OTOOL" = "x"; then
7461   OTOOL="true"
7462fi
7463for ac_prog in readelf greadelf
7464do
7465  # Extract the first word of "$ac_prog", so it can be a program name with args.
7466set dummy $ac_prog; ac_word=$2
7467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7468$as_echo_n "checking for $ac_word... " >&6; }
7469if test "${ac_cv_path_READELF+set}" = set; then :
7470  $as_echo_n "(cached) " >&6
7471else
7472  case $READELF in
7473  [\\/]* | ?:[\\/]*)
7474  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
7475  ;;
7476  *)
7477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7478for as_dir in $PATH
7479do
7480  IFS=$as_save_IFS
7481  test -z "$as_dir" && as_dir=.
7482    for ac_exec_ext in '' $ac_executable_extensions; do
7483  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7484    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
7485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7486    break 2
7487  fi
7488done
7489  done
7490IFS=$as_save_IFS
7491
7492  ;;
7493esac
7494fi
7495READELF=$ac_cv_path_READELF
7496if test -n "$READELF"; then
7497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
7498$as_echo "$READELF" >&6; }
7499else
7500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7501$as_echo "no" >&6; }
7502fi
7503
7504
7505  test -n "$READELF" && break
7506done
7507
7508for ac_prog in objdump gobjdump
7509do
7510  # Extract the first word of "$ac_prog", so it can be a program name with args.
7511set dummy $ac_prog; ac_word=$2
7512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7513$as_echo_n "checking for $ac_word... " >&6; }
7514if test "${ac_cv_path_OBJDUMP+set}" = set; then :
7515  $as_echo_n "(cached) " >&6
7516else
7517  case $OBJDUMP in
7518  [\\/]* | ?:[\\/]*)
7519  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
7520  ;;
7521  *)
7522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7523for as_dir in $PATH
7524do
7525  IFS=$as_save_IFS
7526  test -z "$as_dir" && as_dir=.
7527    for ac_exec_ext in '' $ac_executable_extensions; do
7528  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7529    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
7530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7531    break 2
7532  fi
7533done
7534  done
7535IFS=$as_save_IFS
7536
7537  ;;
7538esac
7539fi
7540OBJDUMP=$ac_cv_path_OBJDUMP
7541if test -n "$OBJDUMP"; then
7542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7543$as_echo "$OBJDUMP" >&6; }
7544else
7545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7546$as_echo "no" >&6; }
7547fi
7548
7549
7550  test -n "$OBJDUMP" && break
7551done
7552
7553# Extract the first word of "hg", so it can be a program name with args.
7554set dummy hg; ac_word=$2
7555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7556$as_echo_n "checking for $ac_word... " >&6; }
7557if test "${ac_cv_path_HG+set}" = set; then :
7558  $as_echo_n "(cached) " >&6
7559else
7560  case $HG in
7561  [\\/]* | ?:[\\/]*)
7562  ac_cv_path_HG="$HG" # Let the user override the test with a path.
7563  ;;
7564  *)
7565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7566for as_dir in $PATH
7567do
7568  IFS=$as_save_IFS
7569  test -z "$as_dir" && as_dir=.
7570    for ac_exec_ext in '' $ac_executable_extensions; do
7571  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7572    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
7573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7574    break 2
7575  fi
7576done
7577  done
7578IFS=$as_save_IFS
7579
7580  ;;
7581esac
7582fi
7583HG=$ac_cv_path_HG
7584if test -n "$HG"; then
7585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
7586$as_echo "$HG" >&6; }
7587else
7588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7589$as_echo "no" >&6; }
7590fi
7591
7592
7593
7594
7595# Check if pkg-config is available.
7596
7597
7598if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7599	if test -n "$ac_tool_prefix"; then
7600  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7601set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7603$as_echo_n "checking for $ac_word... " >&6; }
7604if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
7605  $as_echo_n "(cached) " >&6
7606else
7607  case $PKG_CONFIG in
7608  [\\/]* | ?:[\\/]*)
7609  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7610  ;;
7611  *)
7612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7613for as_dir in $PATH
7614do
7615  IFS=$as_save_IFS
7616  test -z "$as_dir" && as_dir=.
7617    for ac_exec_ext in '' $ac_executable_extensions; do
7618  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7619    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7621    break 2
7622  fi
7623done
7624  done
7625IFS=$as_save_IFS
7626
7627  ;;
7628esac
7629fi
7630PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7631if test -n "$PKG_CONFIG"; then
7632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7633$as_echo "$PKG_CONFIG" >&6; }
7634else
7635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7636$as_echo "no" >&6; }
7637fi
7638
7639
7640fi
7641if test -z "$ac_cv_path_PKG_CONFIG"; then
7642  ac_pt_PKG_CONFIG=$PKG_CONFIG
7643  # Extract the first word of "pkg-config", so it can be a program name with args.
7644set dummy pkg-config; ac_word=$2
7645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7646$as_echo_n "checking for $ac_word... " >&6; }
7647if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
7648  $as_echo_n "(cached) " >&6
7649else
7650  case $ac_pt_PKG_CONFIG in
7651  [\\/]* | ?:[\\/]*)
7652  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7653  ;;
7654  *)
7655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7656for as_dir in $PATH
7657do
7658  IFS=$as_save_IFS
7659  test -z "$as_dir" && as_dir=.
7660    for ac_exec_ext in '' $ac_executable_extensions; do
7661  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7662    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7664    break 2
7665  fi
7666done
7667  done
7668IFS=$as_save_IFS
7669
7670  ;;
7671esac
7672fi
7673ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7674if test -n "$ac_pt_PKG_CONFIG"; then
7675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7676$as_echo "$ac_pt_PKG_CONFIG" >&6; }
7677else
7678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7679$as_echo "no" >&6; }
7680fi
7681
7682  if test "x$ac_pt_PKG_CONFIG" = x; then
7683    PKG_CONFIG=""
7684  else
7685    case $cross_compiling:$ac_tool_warned in
7686yes:)
7687{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7688$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7689ac_tool_warned=yes ;;
7690esac
7691    PKG_CONFIG=$ac_pt_PKG_CONFIG
7692  fi
7693else
7694  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7695fi
7696
7697fi
7698if test -n "$PKG_CONFIG"; then
7699	_pkg_min_version=0.9.0
7700	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7701$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7702	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7703		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7704$as_echo "yes" >&6; }
7705	else
7706		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7707$as_echo "no" >&6; }
7708		PKG_CONFIG=""
7709	fi
7710
7711fi
7712
7713# After basic tools have been setup, we can check build os specific details.
7714
7715###############################################################################
7716
7717# Note that this is the build platform OS version!
7718
7719OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
7720OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
7721OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
7722OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
7723
7724
7725
7726
7727
7728# Setup builddeps, for automatic downloading of tools we need.
7729# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
7730# boot-jdk setup, but we need to have basic tools setup first.
7731
7732
7733# Check whether --with-builddeps-conf was given.
7734if test "${with_builddeps_conf+set}" = set; then :
7735  withval=$with_builddeps_conf;
7736fi
7737
7738
7739
7740# Check whether --with-builddeps-server was given.
7741if test "${with_builddeps_server+set}" = set; then :
7742  withval=$with_builddeps_server;
7743fi
7744
7745
7746
7747# Check whether --with-builddeps-dir was given.
7748if test "${with_builddeps_dir+set}" = set; then :
7749  withval=$with_builddeps_dir;
7750else
7751  with_builddeps_dir=/localhome/builddeps
7752fi
7753
7754
7755
7756# Check whether --with-builddeps-group was given.
7757if test "${with_builddeps_group+set}" = set; then :
7758  withval=$with_builddeps_group;
7759fi
7760
7761
7762# Check whether --enable-list-builddeps was given.
7763if test "${enable_list_builddeps+set}" = set; then :
7764  enableval=$enable_list_builddeps; LIST_BUILDDEPS="${enableval}"
7765else
7766  LIST_BUILDDEPS='no'
7767fi
7768
7769
7770if test "x$LIST_BUILDDEPS" = xyes; then
7771    echo
7772    echo List of build dependencies known to the configure script,
7773    echo that can be used in builddeps.conf files:
7774    cat $AUTOCONF_DIR/*.ac $AUTOCONF_DIR/*.m4 | grep BDEPS_CHECK_MODULE\( | cut -f 2 -d ',' | tr -d ' ' | sort
7775    echo
7776    exit 1
7777fi
7778
7779
7780
7781    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
7782        if test "x$with_builddeps_conf" != x; then
7783            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
7784$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
7785            builddepsfile=$with_builddeps_conf
7786            if test -s $builddepsfile; then
7787                . $builddepsfile
7788                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
7789$as_echo "loaded!" >&6; }
7790            else
7791               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
7792           fi
7793        else
7794            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
7795$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
7796            builddepsfile=`mktemp`
7797            touch $builddepsfile
7798            # Put all found confs into a single file.
7799            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
7800            # Source the file to acquire the variables
7801            if test -s $builddepsfile; then
7802                . $builddepsfile
7803                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
7804$as_echo "found at least one!" >&6; }
7805            else
7806               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
7807           fi
7808        fi
7809        # Create build and target names that use _ instead of "-" and ".".
7810        # This is necessary to use them in variable names.
7811        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
7812        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
7813        # Extract rewrite information for build and target
7814        eval rewritten_build=\${REWRITE_${build_var}}
7815        if test "x$rewritten_build" = x; then
7816            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
7817            echo Build stays the same $rewritten_build
7818        else
7819            echo Rewriting build for builddeps into $rewritten_build
7820        fi
7821        eval rewritten_target=\${REWRITE_${target_var}}
7822        if test "x$rewritten_target" = x; then
7823            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
7824            echo Target stays the same $rewritten_target
7825        else
7826            echo Rewriting target for builddeps into $rewritten_target
7827        fi
7828        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
7829        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
7830    fi
7831    for ac_prog in 7z unzip
7832do
7833  # Extract the first word of "$ac_prog", so it can be a program name with args.
7834set dummy $ac_prog; ac_word=$2
7835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7836$as_echo_n "checking for $ac_word... " >&6; }
7837if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
7838  $as_echo_n "(cached) " >&6
7839else
7840  if test -n "$BDEPS_UNZIP"; then
7841  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
7842else
7843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7844for as_dir in $PATH
7845do
7846  IFS=$as_save_IFS
7847  test -z "$as_dir" && as_dir=.
7848    for ac_exec_ext in '' $ac_executable_extensions; do
7849  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7850    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
7851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7852    break 2
7853  fi
7854done
7855  done
7856IFS=$as_save_IFS
7857
7858fi
7859fi
7860BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
7861if test -n "$BDEPS_UNZIP"; then
7862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
7863$as_echo "$BDEPS_UNZIP" >&6; }
7864else
7865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7866$as_echo "no" >&6; }
7867fi
7868
7869
7870  test -n "$BDEPS_UNZIP" && break
7871done
7872
7873    if test "x$BDEPS_UNZIP" = x7z; then
7874        BDEPS_UNZIP="7z x"
7875    fi
7876
7877    for ac_prog in wget lftp ftp
7878do
7879  # Extract the first word of "$ac_prog", so it can be a program name with args.
7880set dummy $ac_prog; ac_word=$2
7881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7882$as_echo_n "checking for $ac_word... " >&6; }
7883if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
7884  $as_echo_n "(cached) " >&6
7885else
7886  if test -n "$BDEPS_FTP"; then
7887  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
7888else
7889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7890for as_dir in $PATH
7891do
7892  IFS=$as_save_IFS
7893  test -z "$as_dir" && as_dir=.
7894    for ac_exec_ext in '' $ac_executable_extensions; do
7895  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7896    ac_cv_prog_BDEPS_FTP="$ac_prog"
7897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7898    break 2
7899  fi
7900done
7901  done
7902IFS=$as_save_IFS
7903
7904fi
7905fi
7906BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
7907if test -n "$BDEPS_FTP"; then
7908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
7909$as_echo "$BDEPS_FTP" >&6; }
7910else
7911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7912$as_echo "no" >&6; }
7913fi
7914
7915
7916  test -n "$BDEPS_FTP" && break
7917done
7918
7919
7920
7921###############################################################################
7922#
7923# Determine OpenJDK variants, options and version numbers.
7924#
7925###############################################################################
7926
7927# We need build & target for this.
7928
7929###############################################################################
7930#
7931# Check which variant of the JDK that we want to build.
7932# Currently we have:
7933#    normal:   standard edition
7934# but the custom make system may add other variants
7935#
7936# Effectively the JDK variant gives a name to a specific set of
7937# modules to compile into the JDK. In the future, these modules
7938# might even be Jigsaw modules.
7939#
7940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7941$as_echo_n "checking which variant of the JDK to build... " >&6; }
7942
7943# Check whether --with-jdk-variant was given.
7944if test "${with_jdk_variant+set}" = set; then :
7945  withval=$with_jdk_variant;
7946fi
7947
7948
7949if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7950    JDK_VARIANT="normal"
7951else
7952    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7953fi
7954
7955
7956
7957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7958$as_echo "$JDK_VARIANT" >&6; }
7959
7960
7961
7962###############################################################################
7963#
7964# Check which variants of the JVM that we want to build.
7965# Currently we have:
7966#    server: normal interpreter and a tiered C1/C2 compiler
7967#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7968#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7969#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7970#    zero: no machine code interpreter, no compiler
7971#    zeroshark: zero interpreter and shark/llvm compiler backend
7972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM that should be built" >&5
7973$as_echo_n "checking which variants of the JVM that should be built... " >&6; }
7974
7975# Check whether --with-jvm-variants was given.
7976if test "${with_jvm_variants+set}" = set; then :
7977  withval=$with_jvm_variants;
7978fi
7979
7980
7981if test "x$with_jvm_variants" = x; then
7982     with_jvm_variants="server"
7983fi
7984
7985JVM_VARIANTS=",$with_jvm_variants,"
7986TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7987
7988if test "x$TEST_VARIANTS" != "x,"; then
7989   as_fn_error $? "The available JVM variants are: server, client, kernel, zero, zeroshark" "$LINENO" 5
7990fi
7991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7992$as_echo "$with_jvm_variants" >&6; }
7993
7994JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7995JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7996JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7997JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7998JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7999
8000if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8001    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
8002        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
8003    fi
8004fi
8005if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8006    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
8007        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
8008    fi
8009fi
8010
8011# Replace the commas with AND for use in the build directory name.
8012ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
8013COUNT_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/'`
8014if test "x$COUNT_VARIANTS" != "x,1"; then
8015    BUILDING_MULTIPLE_JVM_VARIANTS=yes
8016else
8017    BUILDING_MULTIPLE_JVM_VARIANTS=no
8018fi
8019
8020
8021
8022
8023
8024
8025
8026
8027if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
8028   MACOSX_UNIVERSAL="true"
8029fi
8030
8031
8032
8033
8034
8035###############################################################################
8036#
8037# Set the debug level
8038#    release: no debug information, all optimizations, no asserts.
8039#    fastdebug: debug information (-g), all optimizations, all asserts
8040#    slowdebug: debug information (-g), no optimizations, all asserts
8041#
8042DEBUG_LEVEL="release"
8043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
8044$as_echo_n "checking which debug level to use... " >&6; }
8045# Check whether --enable-debug was given.
8046if test "${enable_debug+set}" = set; then :
8047  enableval=$enable_debug;
8048        ENABLE_DEBUG="${enableval}"
8049        DEBUG_LEVEL="fastdebug"
8050
8051else
8052  ENABLE_DEBUG="no"
8053fi
8054
8055
8056
8057# Check whether --with-debug-level was given.
8058if test "${with_debug_level+set}" = set; then :
8059  withval=$with_debug_level;
8060        DEBUG_LEVEL="${withval}"
8061        if test "x$ENABLE_DEBUG" = xyes; then
8062			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
8063        fi
8064
8065fi
8066
8067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
8068$as_echo "$DEBUG_LEVEL" >&6; }
8069
8070if test "x$DEBUG_LEVEL" != xrelease && \
8071   test "x$DEBUG_LEVEL" != xfastdebug && \
8072   test "x$DEBUG_LEVEL" != xslowdebug; then
8073   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
8074fi
8075
8076
8077###############################################################################
8078#
8079# Setup legacy vars/targets and new vars to deal with different debug levels.
8080#
8081
8082case $DEBUG_LEVEL in
8083      release )
8084          VARIANT="OPT"
8085          FASTDEBUG="false"
8086          DEBUG_CLASSFILES="false"
8087          BUILD_VARIANT_RELEASE=""
8088          HOTSPOT_DEBUG_LEVEL="product"
8089          HOTSPOT_EXPORT="product"
8090           ;;
8091      fastdebug )
8092          VARIANT="DBG"
8093          FASTDEBUG="true"
8094          DEBUG_CLASSFILES="true"
8095          BUILD_VARIANT_RELEASE="-fastdebug"
8096          HOTSPOT_DEBUG_LEVEL="fastdebug"
8097          HOTSPOT_EXPORT="fastdebug"
8098           ;;
8099      slowdebug )
8100          VARIANT="DBG"
8101          FASTDEBUG="false"
8102          DEBUG_CLASSFILES="true"
8103          BUILD_VARIANT_RELEASE="-debug"
8104          HOTSPOT_DEBUG_LEVEL="jvmg"
8105          HOTSPOT_EXPORT="debug"
8106           ;;
8107esac
8108
8109#####
8110# Generate the legacy makefile targets for hotspot.
8111# The hotspot api for selecting the build artifacts, really, needs to be improved.
8112#
8113HOTSPOT_TARGET=""
8114
8115if test "x$JVM_VARIANT_SERVER" = xtrue; then
8116    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
8117fi
8118
8119if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8120    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
8121fi
8122
8123if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8124    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
8125fi
8126
8127if test "x$JVM_VARIANT_ZERO" = xtrue; then
8128    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8129fi
8130
8131if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8132    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8133fi
8134
8135HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8136
8137# On Macosx universal binaries are produced, but they only contain
8138# 64 bit intel. This invalidates control of which jvms are built
8139# from configure, but only server is valid anyway. Fix this
8140# when hotspot makefiles are rewritten.
8141if test "x$MACOSX_UNIVERSAL" = xtrue; then
8142    HOTSPOT_TARGET=universal_product
8143fi
8144
8145#####
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155###############################################################################
8156#
8157# Should we build only OpenJDK even if closed sources are present?
8158#
8159# Check whether --enable-openjdk-only was given.
8160if test "${enable_openjdk_only+set}" = set; then :
8161  enableval=$enable_openjdk_only;
8162fi
8163
8164
8165if test "x$enable_openjdk_only" = "xyes"; then
8166    OPENJDK=true
8167elif test "x$enable_openjdk_only" = "xno"; then
8168    OPENJDK=false
8169elif test -d "$SRC_ROOT/jdk/src/closed"; then
8170    OPENJDK=false
8171else
8172    OPENJDK=true
8173fi
8174
8175if test "x$OPENJDK" = "xtrue"; then
8176    SET_OPENJDK=OPENJDK=true
8177fi
8178
8179
8180
8181###############################################################################
8182#
8183# JIGSAW or not.  The JIGSAW variable is used during the intermediate
8184# stage when we are building both the old style JDK and the new style modularized JDK.
8185# When the modularized JDK is finalized, this option will go away.
8186#
8187# Check whether --enable-jigsaw was given.
8188if test "${enable_jigsaw+set}" = set; then :
8189  enableval=$enable_jigsaw;
8190fi
8191
8192
8193if test "x$enable_jigsaw" = "xyes"; then
8194    JIGSAW=true
8195else
8196    JIGSAW=false
8197fi
8198
8199
8200###############################################################################
8201#
8202# Should we build a JDK/JVM with headful support (ie a graphical ui)?
8203# We always build headless support.
8204#
8205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
8206$as_echo_n "checking headful support... " >&6; }
8207# Check whether --enable-headful was given.
8208if test "${enable_headful+set}" = set; then :
8209  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
8210else
8211  SUPPORT_HEADFUL=yes
8212fi
8213
8214
8215SUPPORT_HEADLESS=yes
8216BUILD_HEADLESS="BUILD_HEADLESS:=true"
8217
8218if test "x$SUPPORT_HEADFUL" = xyes; then
8219    # We are building both headful and headless.
8220    headful_msg="inlude support for both headful and headless"
8221fi
8222
8223if test "x$SUPPORT_HEADFUL" = xno; then
8224    # Thus we are building headless only.
8225    BUILD_HEADLESS="BUILD_HEADLESS:=true"
8226    headful_msg="headless only"
8227fi
8228
8229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
8230$as_echo "$headful_msg" >&6; }
8231
8232
8233
8234
8235
8236###############################################################################
8237#
8238# Should we compile nimbus swing L&F? We can probably remove this option
8239# since nimbus is officially part of javax now.
8240#
8241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build nimbus L&F" >&5
8242$as_echo_n "checking whether to build nimbus L&F... " >&6; }
8243# Check whether --enable-nimbus was given.
8244if test "${enable_nimbus+set}" = set; then :
8245  enableval=$enable_nimbus; ENABLE_NIMBUS="${enableval}"
8246else
8247  ENABLE_NIMBUS='yes'
8248fi
8249
8250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_NIMBUS" >&5
8251$as_echo "$ENABLE_NIMBUS" >&6; }
8252DISABLE_NIMBUS=
8253if test "x$ENABLE_NIMBUS" = xno; then
8254    DISABLE_NIMBUS=true
8255fi
8256
8257
8258# Control wether Hotspot runs Queens test after build.
8259# Check whether --enable-hotspot-test-in-build was given.
8260if test "${enable_hotspot_test_in_build+set}" = set; then :
8261  enableval=$enable_hotspot_test_in_build;
8262else
8263  enable_hotspot_test_in_build=no
8264fi
8265
8266if test "x$enable_hotspot_test_in_build" = "xyes"; then
8267    TEST_IN_BUILD=true
8268else
8269    TEST_IN_BUILD=false
8270fi
8271
8272
8273###############################################################################
8274#
8275# Choose cacerts source file
8276#
8277
8278# Check whether --with-cacerts-file was given.
8279if test "${with_cacerts_file+set}" = set; then :
8280  withval=$with_cacerts_file;
8281fi
8282
8283if test "x$with_cacerts_file" != x; then
8284    CACERTS_FILE=$with_cacerts_file
8285else
8286    if test "x$OPENJDK" = "xtrue"; then
8287        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
8288    else
8289        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
8290    fi
8291fi
8292
8293
8294###############################################################################
8295#
8296# Compress jars
8297#
8298COMPRESS_JARS=false
8299
8300
8301
8302###############################################################################
8303#
8304# Should we compile JFR
8305#   default no, except for on closed-jdk
8306#
8307ENABLE_JFR=no
8308
8309# Is the JFR source present
8310
8311#
8312# For closed default is yes
8313#
8314if test "x${OPENJDK}" != "xtrue"; then
8315   ENABLE_JFR=yes
8316fi
8317
8318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build jfr" >&5
8319$as_echo_n "checking whether to build jfr... " >&6; }
8320# Check whether --enable-jfr was given.
8321if test "${enable_jfr+set}" = set; then :
8322  enableval=$enable_jfr;
8323fi
8324
8325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ENABLE_JFR}" >&5
8326$as_echo "${ENABLE_JFR}" >&6; }
8327
8328if test "x$ENABLE_JFR" = "xyes"; then
8329    ENABLE_JFR=true
8330elif test "x$ENABLE_JFR" = "xno"; then
8331    ENABLE_JFR=false
8332else
8333   as_fn_error $? "Invalid argument to --enable-jfr" "$LINENO" 5
8334fi
8335
8336
8337
8338
8339# Source the version numbers
8340. $AUTOCONF_DIR/version.numbers
8341if test "x$OPENJDK" = "xfalse"; then
8342    . $AUTOCONF_DIR/closed.version.numbers
8343fi
8344# Now set the JDK version, milestone, build number etc.
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357COPYRIGHT_YEAR=`date +'%Y'`
8358
8359
8360RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
8361
8362
8363if test "x$JDK_UPDATE_VERSION" != x; then
8364    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
8365else
8366    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
8367fi
8368
8369
8370if test "x$MILESTONE" != x; then
8371    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
8372else
8373    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
8374fi
8375
8376
8377if test "x$JDK_BUILD_NUMBER" != x; then
8378    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
8379else
8380    JDK_BUILD_NUMBER=b00
8381    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
8382    # Avoid [:alnum:] since it depends on the locale.
8383    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
8384    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
8385    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
8386fi
8387
8388COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
8389
8390
8391
8392# To properly create a configuration name, we need to have the OpenJDK target
8393# and options (variants and debug level) parsed.
8394
8395
8396
8397# Check whether --with-conf-name was given.
8398if test "${with_conf_name+set}" = set; then :
8399  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8400fi
8401
8402
8403# Test from where we are running configure, in or outside of src root.
8404if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
8405    # We are running configure from the src root.
8406    # Create a default ./build/target-variant-debuglevel output root.
8407    if test "x${CONF_NAME}" = x; then
8408        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8409    fi
8410    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8411    mkdir -p "$OUTPUT_ROOT"
8412    if test ! -d "$OUTPUT_ROOT"; then
8413        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8414    fi
8415else
8416    # We are running configure from outside of the src dir.
8417    # Then use the current directory as output dir!
8418    # If configuration is situated in normal build directory, just use the build
8419    # directory name as configuration name, otherwise use the complete path.
8420    if test "x${CONF_NAME}" = x; then
8421        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8422    fi
8423    OUTPUT_ROOT="$CURDIR"
8424fi
8425
8426
8427    # Fail with message the path to the output root if var OUTPUT_ROOT contains a path with no spaces in it.
8428    # Unless on Windows, where we can rewrite the path.
8429    HAS_SPACE=`echo "$OUTPUT_ROOT" | grep " "`
8430    if test "x$HAS_SPACE" != x; then
8431        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8432            # First convert it to DOS-style, short mode (no spaces)
8433            OUTPUT_ROOT=`$CYGPATH -s -m -a "$OUTPUT_ROOT"`
8434            # Now it's case insensitive; let's make it lowercase to improve readability
8435            OUTPUT_ROOT=`$ECHO "$OUTPUT_ROOT" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
8436            # Now convert it back to Unix-stile (cygpath)
8437            OUTPUT_ROOT=`$CYGPATH -u "$OUTPUT_ROOT"`
8438        else
8439            as_fn_error $? "You cannot have spaces in the path to the output root! \"$OUTPUT_ROOT\"" "$LINENO" 5
8440        fi
8441    fi
8442
8443
8444SPEC=$OUTPUT_ROOT/spec.gmk
8445
8446CONF_NAME=$CONF_NAME
8447
8448OUTPUT_ROOT=$OUTPUT_ROOT
8449
8450
8451# Most of the probed defines are put into config.h
8452ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8453
8454# The spec.gmk file contains all variables for the make system.
8455ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8456
8457# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8458ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8459
8460# The bootcycle-spec.gmk file contains support for boot cycle builds.
8461ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8462
8463# The compare.sh is used to compare the build output to other builds.
8464ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8465
8466# Spec.sh is currently used by compare-objects.sh
8467ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8468
8469# The generated Makefile knows where the spec.gmk is and where the source is.
8470# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8471# which will look for generated configurations
8472ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8473
8474
8475# Save the arguments given to us
8476echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8477
8478
8479###############################################################################
8480#
8481# Setup BootJDK, used to bootstrap the build.
8482#
8483###############################################################################
8484
8485
8486BOOT_JDK_FOUND=no
8487
8488# Check whether --with-boot-jdk was given.
8489if test "${with_boot_jdk+set}" = set; then :
8490  withval=$with_boot_jdk;
8491fi
8492
8493
8494# We look for the Boot JDK through various means, going from more certain to
8495# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
8496# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
8497# must check if this is indeed valid; otherwise we'll continue looking.
8498
8499# Test: Is bootjdk explicitely set by command line arguments?
8500
8501  if test "x$BOOT_JDK_FOUND" = xno; then
8502    # Now execute the test
8503
8504if test "x$with_boot_jdk" != x; then
8505    BOOT_JDK=$with_boot_jdk
8506    BOOT_JDK_FOUND=maybe
8507    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
8508$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
8509fi
8510
8511
8512    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
8513    if test "x$BOOT_JDK_FOUND" = xmaybe; then
8514      # Do we have a bin/java?
8515      if test ! -x "$BOOT_JDK/bin/java"; then
8516        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
8517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
8518        BOOT_JDK_FOUND=no
8519      else
8520        # Do we have a bin/javac?
8521        if test ! -x "$BOOT_JDK/bin/javac"; then
8522          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
8523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
8524          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
8525$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
8526          BOOT_JDK_FOUND=no
8527        else
8528          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
8529          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
8530            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
8531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
8532            BOOT_JDK_FOUND=no
8533          else
8534            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
8535            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
8536
8537            # Extra M4 quote needed to protect [] in grep expression.
8538            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
8539            if test "x$FOUND_VERSION_78" = x; then
8540              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
8541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
8542              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
8543$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
8544              BOOT_JDK_FOUND=no
8545            else
8546              # We're done! :-)
8547              BOOT_JDK_FOUND=yes
8548
8549    # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
8550    # Unless on Windows, where we can rewrite the path.
8551    HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
8552    if test "x$HAS_SPACE" != x; then
8553        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8554            # First convert it to DOS-style, short mode (no spaces)
8555            BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
8556            # Now it's case insensitive; let's make it lowercase to improve readability
8557            BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
8558            # Now convert it back to Unix-stile (cygpath)
8559            BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
8560        else
8561            as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
8562        fi
8563    fi
8564
8565              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
8566$as_echo_n "checking for Boot JDK... " >&6; }
8567              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
8568$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
8569            fi # end check jdk version
8570          fi # end check rt.jar
8571        fi # end check javac
8572      fi # end check java
8573    fi # end check boot jdk found
8574  fi
8575
8576if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
8577  # Having specified an argument which is incorrect will produce an instant failure;
8578  # we should not go on looking
8579  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
8580fi
8581
8582# Test: Is bootjdk available from builddeps?
8583
8584  if test "x$BOOT_JDK_FOUND" = xno; then
8585    # Now execute the test
8586
8587
8588
8589    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
8590        # Source the builddeps file again, to make sure it uses the latest variables!
8591        . $builddepsfile
8592        # Look for a target and build machine specific resource!
8593        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
8594        if test "x$resource" = x; then
8595            # Ok, lets instead look for a target specific resource
8596            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
8597        fi
8598        if test "x$resource" = x; then
8599            # Ok, lets instead look for a build specific resource
8600            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
8601        fi
8602        if test "x$resource" = x; then
8603            # Ok, lets instead look for a generic resource
8604            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
8605            resource=${builddep_bootjdk}
8606        fi
8607        if test "x$resource" != x; then
8608            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
8609$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
8610	    # If the resource in the builddeps.conf file is an existing directory,
8611	    # for example /java/linux/cups
8612	    if test -d ${resource}; then
8613	       depdir=${resource}
8614	    else
8615
8616# bootjdk is for example mymodule
8617# $resource is for example libs/general/libmymod_1_2_3.zip
8618# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
8619# $with_builddeps_dir is for example /localhome/builddeps
8620# depdir is the name of the variable into which we store the depdir, eg MYMOD
8621# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
8622# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
8623    filename=`basename $resource`
8624    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
8625    filebase=${filename%%.*}
8626    extension=${filename#*.}
8627    installdir=$with_builddeps_dir/$filebase
8628    if test ! -f $installdir/$filename.unpacked; then
8629        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
8630$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
8631        if test ! -d $installdir; then
8632            mkdir -p $installdir
8633        fi
8634        if test ! -d $installdir; then
8635            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
8636        fi
8637        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
8638        touch $tmpfile
8639        if test ! -f $tmpfile; then
8640            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
8641        fi
8642
8643    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
8644    # $tmpfile is the local file name for the downloaded file.
8645    VALID_TOOL=no
8646    if test "x$BDEPS_FTP" = xwget; then
8647       VALID_TOOL=yes
8648       wget -O $tmpfile $with_builddeps_server/$resource
8649    fi
8650    if test "x$BDEPS_FTP" = xlftp; then
8651       VALID_TOOL=yes
8652       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
8653    fi
8654    if test "x$BDEPS_FTP" = xftp; then
8655        VALID_TOOL=yes
8656        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
8657        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
8658        FTPUSERPWD=${FTPSERVER%%@*}
8659        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
8660            FTPUSER=${userpwd%%:*}
8661            FTPPWD=${userpwd#*@}
8662            FTPSERVER=${FTPSERVER#*@}
8663        else
8664            FTPUSER=ftp
8665            FTPPWD=ftp
8666        fi
8667        # the "pass" command does not work on some
8668        # ftp clients (read ftp.exe) but if it works,
8669        # passive mode is better!
8670        (\
8671            echo "user $FTPUSER $FTPPWD"        ;\
8672            echo "pass"                         ;\
8673            echo "bin"                          ;\
8674            echo "get $FTPPATH $tmpfile"              ;\
8675        ) | ftp -in $FTPSERVER
8676    fi
8677    if test "x$VALID_TOOL" != xyes; then
8678       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
8679    fi
8680
8681        mv $tmpfile $installdir/$filename
8682        if test ! -s $installdir/$filename; then
8683            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
8684        fi
8685        case "$extension" in
8686            zip)  echo "Unzipping $installdir/$filename..."
8687               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
8688            ;;
8689            tar.gz) echo "Untaring $installdir/$filename..."
8690               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
8691            ;;
8692            tgz) echo "Untaring $installdir/$filename..."
8693               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
8694            ;;
8695            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
8696            ;;
8697        esac
8698    fi
8699    if test -f $installdir/$filename.unpacked; then
8700        depdir=$installdir
8701    fi
8702
8703	    fi
8704            # Source the builddeps file again, because in the previous command, the depdir
8705            # was updated to point at the current build dependency install directory.
8706            . $builddepsfile
8707            # Now extract variables from the builddeps.conf files.
8708            theroot=${builddep_bootjdk_ROOT}
8709            thecflags=${builddep_bootjdk_CFLAGS}
8710            thelibs=${builddep_bootjdk_LIBS}
8711            if test "x$depdir" = x; then
8712                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
8713            fi
8714            BOOT_JDK=$depdir
8715            if test "x$theroot" != x; then
8716               BOOT_JDK="$theroot"
8717            fi
8718            if test "x$thecflags" != x; then
8719               BOOT_JDK_CFLAGS="$thecflags"
8720            fi
8721            if test "x$thelibs" != x; then
8722               BOOT_JDK_LIBS="$thelibs"
8723            fi
8724            BOOT_JDK_FOUND=maybe
8725            else BOOT_JDK_FOUND=no
8726
8727        fi
8728        else BOOT_JDK_FOUND=no
8729
8730    fi
8731
8732
8733
8734    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
8735    if test "x$BOOT_JDK_FOUND" = xmaybe; then
8736      # Do we have a bin/java?
8737      if test ! -x "$BOOT_JDK/bin/java"; then
8738        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
8739$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
8740        BOOT_JDK_FOUND=no
8741      else
8742        # Do we have a bin/javac?
8743        if test ! -x "$BOOT_JDK/bin/javac"; then
8744          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
8745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
8746          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
8747$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
8748          BOOT_JDK_FOUND=no
8749        else
8750          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
8751          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
8752            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
8753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
8754            BOOT_JDK_FOUND=no
8755          else
8756            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
8757            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
8758
8759            # Extra M4 quote needed to protect [] in grep expression.
8760            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
8761            if test "x$FOUND_VERSION_78" = x; then
8762              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
8763$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
8764              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
8765$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
8766              BOOT_JDK_FOUND=no
8767            else
8768              # We're done! :-)
8769              BOOT_JDK_FOUND=yes
8770
8771    # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
8772    # Unless on Windows, where we can rewrite the path.
8773    HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
8774    if test "x$HAS_SPACE" != x; then
8775        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8776            # First convert it to DOS-style, short mode (no spaces)
8777            BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
8778            # Now it's case insensitive; let's make it lowercase to improve readability
8779            BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
8780            # Now convert it back to Unix-stile (cygpath)
8781            BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
8782        else
8783            as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
8784        fi
8785    fi
8786
8787              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
8788$as_echo_n "checking for Boot JDK... " >&6; }
8789              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
8790$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
8791            fi # end check jdk version
8792          fi # end check rt.jar
8793        fi # end check javac
8794      fi # end check java
8795    fi # end check boot jdk found
8796  fi
8797
8798
8799# Test: Is $JAVA_HOME set?
8800
8801  if test "x$BOOT_JDK_FOUND" = xno; then
8802    # Now execute the test
8803
8804    if test "x$JAVA_HOME" != x; then
8805        if test "x$OPENJDK_TARGET_OS" = xwindows; then
8806          # On Windows, JAVA_HOME is likely in DOS-style
8807          JAVA_HOME_PROCESSED="`$CYGPATH -u "$JAVA_HOME"`"
8808        else
8809          JAVA_HOME_PROCESSED="$JAVA_HOME"
8810        fi
8811        if test ! -d "$JAVA_HOME_PROCESSED"; then
8812            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
8813$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
8814        else
8815          # Aha, the user has set a JAVA_HOME
8816          # let us use that as the Boot JDK.
8817          BOOT_JDK="$JAVA_HOME_PROCESSED"
8818          BOOT_JDK_FOUND=maybe
8819          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
8820$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
8821        fi
8822    fi
8823
8824
8825    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
8826    if test "x$BOOT_JDK_FOUND" = xmaybe; then
8827      # Do we have a bin/java?
8828      if test ! -x "$BOOT_JDK/bin/java"; then
8829        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
8830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
8831        BOOT_JDK_FOUND=no
8832      else
8833        # Do we have a bin/javac?
8834        if test ! -x "$BOOT_JDK/bin/javac"; then
8835          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
8836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
8837          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
8838$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
8839          BOOT_JDK_FOUND=no
8840        else
8841          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
8842          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
8843            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
8844$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
8845            BOOT_JDK_FOUND=no
8846          else
8847            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
8848            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
8849
8850            # Extra M4 quote needed to protect [] in grep expression.
8851            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
8852            if test "x$FOUND_VERSION_78" = x; then
8853              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
8854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
8855              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
8856$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
8857              BOOT_JDK_FOUND=no
8858            else
8859              # We're done! :-)
8860              BOOT_JDK_FOUND=yes
8861
8862    # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
8863    # Unless on Windows, where we can rewrite the path.
8864    HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
8865    if test "x$HAS_SPACE" != x; then
8866        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8867            # First convert it to DOS-style, short mode (no spaces)
8868            BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
8869            # Now it's case insensitive; let's make it lowercase to improve readability
8870            BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
8871            # Now convert it back to Unix-stile (cygpath)
8872            BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
8873        else
8874            as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
8875        fi
8876    fi
8877
8878              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
8879$as_echo_n "checking for Boot JDK... " >&6; }
8880              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
8881$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
8882            fi # end check jdk version
8883          fi # end check rt.jar
8884        fi # end check javac
8885      fi # end check java
8886    fi # end check boot jdk found
8887  fi
8888
8889
8890# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
8891
8892  if test "x$BOOT_JDK_FOUND" = xno; then
8893    # Now execute the test
8894
8895    if test -x /usr/libexec/java_home; then
8896        BOOT_JDK=`/usr/libexec/java_home`
8897        BOOT_JDK_FOUND=maybe
8898        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
8899$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
8900    fi
8901
8902
8903    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
8904    if test "x$BOOT_JDK_FOUND" = xmaybe; then
8905      # Do we have a bin/java?
8906      if test ! -x "$BOOT_JDK/bin/java"; then
8907        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
8908$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
8909        BOOT_JDK_FOUND=no
8910      else
8911        # Do we have a bin/javac?
8912        if test ! -x "$BOOT_JDK/bin/javac"; then
8913          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
8914$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
8915          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
8916$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
8917          BOOT_JDK_FOUND=no
8918        else
8919          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
8920          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
8921            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
8922$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
8923            BOOT_JDK_FOUND=no
8924          else
8925            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
8926            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
8927
8928            # Extra M4 quote needed to protect [] in grep expression.
8929            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
8930            if test "x$FOUND_VERSION_78" = x; then
8931              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
8932$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
8933              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
8934$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
8935              BOOT_JDK_FOUND=no
8936            else
8937              # We're done! :-)
8938              BOOT_JDK_FOUND=yes
8939
8940    # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
8941    # Unless on Windows, where we can rewrite the path.
8942    HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
8943    if test "x$HAS_SPACE" != x; then
8944        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8945            # First convert it to DOS-style, short mode (no spaces)
8946            BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
8947            # Now it's case insensitive; let's make it lowercase to improve readability
8948            BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
8949            # Now convert it back to Unix-stile (cygpath)
8950            BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
8951        else
8952            as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
8953        fi
8954    fi
8955
8956              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
8957$as_echo_n "checking for Boot JDK... " >&6; }
8958              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
8959$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
8960            fi # end check jdk version
8961          fi # end check rt.jar
8962        fi # end check javac
8963      fi # end check java
8964    fi # end check boot jdk found
8965  fi
8966
8967
8968# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
8969
8970  if test "x$BOOT_JDK_FOUND" = xno; then
8971    # Now execute the test
8972
8973    # Extract the first word of "javac", so it can be a program name with args.
8974set dummy javac; ac_word=$2
8975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8976$as_echo_n "checking for $ac_word... " >&6; }
8977if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
8978  $as_echo_n "(cached) " >&6
8979else
8980  case $JAVAC_CHECK in
8981  [\\/]* | ?:[\\/]*)
8982  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
8983  ;;
8984  *)
8985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8986for as_dir in $PATH
8987do
8988  IFS=$as_save_IFS
8989  test -z "$as_dir" && as_dir=.
8990    for ac_exec_ext in '' $ac_executable_extensions; do
8991  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8992    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
8993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8994    break 2
8995  fi
8996done
8997  done
8998IFS=$as_save_IFS
8999
9000  ;;
9001esac
9002fi
9003JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
9004if test -n "$JAVAC_CHECK"; then
9005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
9006$as_echo "$JAVAC_CHECK" >&6; }
9007else
9008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9009$as_echo "no" >&6; }
9010fi
9011
9012
9013    # Extract the first word of "java", so it can be a program name with args.
9014set dummy java; ac_word=$2
9015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9016$as_echo_n "checking for $ac_word... " >&6; }
9017if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
9018  $as_echo_n "(cached) " >&6
9019else
9020  case $JAVA_CHECK in
9021  [\\/]* | ?:[\\/]*)
9022  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
9023  ;;
9024  *)
9025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9026for as_dir in $PATH
9027do
9028  IFS=$as_save_IFS
9029  test -z "$as_dir" && as_dir=.
9030    for ac_exec_ext in '' $ac_executable_extensions; do
9031  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9032    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
9033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9034    break 2
9035  fi
9036done
9037  done
9038IFS=$as_save_IFS
9039
9040  ;;
9041esac
9042fi
9043JAVA_CHECK=$ac_cv_path_JAVA_CHECK
9044if test -n "$JAVA_CHECK"; then
9045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
9046$as_echo "$JAVA_CHECK" >&6; }
9047else
9048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9049$as_echo "no" >&6; }
9050fi
9051
9052
9053    BINARY="$JAVAC_CHECK"
9054    if test "x$JAVAC_CHECK" = x; then
9055        BINARY="$JAVA_CHECK"
9056    fi
9057    if test "x$BINARY" != x; then
9058        # So there is a java(c) binary, it might be part of a JDK.
9059        # Lets find the JDK/JRE directory by following symbolic links.
9060        # Linux/GNU systems often have links from /usr/bin/java to
9061        # /etc/alternatives/java to the real JDK binary.
9062
9063    # Translate long cygdrive or C:\sdfsf path
9064    # into a short mixed mode path that has no
9065    # spaces in it.
9066    tmp="$BINARY"
9067
9068    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9069        tmp=`$CYGPATH -u "$BINARY"`
9070        tmp=`which "$tmp"`
9071        # If file exists with .exe appended, that's the real filename
9072        # and cygpath needs that to convert to short style path.
9073        if test -f "${tmp}.exe"; then
9074           tmp="${tmp}.exe"
9075        elif test -f "${tmp}.cmd"; then
9076           tmp="${tmp}.cmd"
9077        fi
9078        # Convert to C:/ mixed style path without spaces.
9079         tmp=`$CYGPATH -s -m "$tmp"`
9080    fi
9081    BINARY="$tmp"
9082
9083
9084    if test "x$OPENJDK_BUILD_OS" != xwindows; then
9085        # Follow a chain of symbolic links. Use readlink
9086        # where it exists, else fall back to horribly
9087        # complicated shell code.
9088        # Extract the first word of "readlink", so it can be a program name with args.
9089set dummy readlink; ac_word=$2
9090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9091$as_echo_n "checking for $ac_word... " >&6; }
9092if test "${ac_cv_path_READLINK+set}" = set; then :
9093  $as_echo_n "(cached) " >&6
9094else
9095  case $READLINK in
9096  [\\/]* | ?:[\\/]*)
9097  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
9098  ;;
9099  *)
9100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9101for as_dir in $PATH
9102do
9103  IFS=$as_save_IFS
9104  test -z "$as_dir" && as_dir=.
9105    for ac_exec_ext in '' $ac_executable_extensions; do
9106  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9107    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
9108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9109    break 2
9110  fi
9111done
9112  done
9113IFS=$as_save_IFS
9114
9115  ;;
9116esac
9117fi
9118READLINK=$ac_cv_path_READLINK
9119if test -n "$READLINK"; then
9120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
9121$as_echo "$READLINK" >&6; }
9122else
9123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9124$as_echo "no" >&6; }
9125fi
9126
9127
9128        if test "x$READLINK_TESTED" != yes; then
9129            # On MacOSX there is a readlink tool with a different
9130            # purpose than the GNU readlink tool. Check the found readlink.
9131            ISGNU=`$READLINK --help 2>&1 | grep GNU`
9132            if test "x$ISGNU" = x; then
9133                 # A readlink that we do not know how to use.
9134                 # Are there other non-GNU readlinks out there?
9135                 READLINK_TESTED=yes
9136                 READLINK=
9137            fi
9138        fi
9139
9140        if test "x$READLINK" != x; then
9141            BINARY=`$READLINK -f $BINARY`
9142        else
9143            STARTDIR=$PWD
9144            COUNTER=0
9145            DIR=`dirname $BINARY`
9146            FIL=`basename $BINARY`
9147            while test $COUNTER -lt 20; do
9148                ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
9149                if test "x$ISLINK" == x; then
9150                    # This is not a symbolic link! We are done!
9151                    break
9152                fi
9153                # The link might be relative! We have to use cd to travel safely.
9154                cd $DIR
9155                cd `dirname $ISLINK`
9156                DIR=`pwd`
9157                FIL=`basename $ISLINK`
9158                let COUNTER=COUNTER+1
9159            done
9160            cd $STARTDIR
9161            BINARY=$DIR/$FIL
9162        fi
9163    fi
9164
9165        BOOT_JDK=`dirname "$BINARY"`
9166        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
9167        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
9168            # Looks like we found ourselves an JDK
9169            BOOT_JDK_FOUND=maybe
9170            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
9171$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
9172        fi
9173    fi
9174
9175
9176    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
9177    if test "x$BOOT_JDK_FOUND" = xmaybe; then
9178      # Do we have a bin/java?
9179      if test ! -x "$BOOT_JDK/bin/java"; then
9180        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
9181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
9182        BOOT_JDK_FOUND=no
9183      else
9184        # Do we have a bin/javac?
9185        if test ! -x "$BOOT_JDK/bin/javac"; then
9186          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
9187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
9188          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
9189$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
9190          BOOT_JDK_FOUND=no
9191        else
9192          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
9193          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
9194            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
9195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
9196            BOOT_JDK_FOUND=no
9197          else
9198            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
9199            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
9200
9201            # Extra M4 quote needed to protect [] in grep expression.
9202            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
9203            if test "x$FOUND_VERSION_78" = x; then
9204              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
9205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
9206              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
9207$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
9208              BOOT_JDK_FOUND=no
9209            else
9210              # We're done! :-)
9211              BOOT_JDK_FOUND=yes
9212
9213    # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
9214    # Unless on Windows, where we can rewrite the path.
9215    HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
9216    if test "x$HAS_SPACE" != x; then
9217        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9218            # First convert it to DOS-style, short mode (no spaces)
9219            BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
9220            # Now it's case insensitive; let's make it lowercase to improve readability
9221            BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
9222            # Now convert it back to Unix-stile (cygpath)
9223            BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
9224        else
9225            as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
9226        fi
9227    fi
9228
9229              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
9230$as_echo_n "checking for Boot JDK... " >&6; }
9231              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
9232$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
9233            fi # end check jdk version
9234          fi # end check rt.jar
9235        fi # end check javac
9236      fi # end check java
9237    fi # end check boot jdk found
9238  fi
9239
9240
9241# Test: Is there a JDK installed in default, well-known locations?
9242
9243  if test "x$BOOT_JDK_FOUND" = xno; then
9244    # Now execute the test
9245
9246  if test "x$OPENJDK_TARGET_OS" = xwindows; then
9247
9248  if test "x$BOOT_JDK_FOUND" = xno; then
9249    # Now execute the test
9250
9251  if test "x$ProgramW6432" != x; then
9252
9253  BOOT_JDK_PREFIX="`$CYGPATH -u "$ProgramW6432"`/Java"
9254  BOOT_JDK_SUFFIX=""
9255  BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
9256  if test "x$BEST_JDK_FOUND" != x; then
9257    BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
9258    if test -d "$BOOT_JDK"; then
9259      BOOT_JDK_FOUND=maybe
9260      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&5
9261$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&6;}
9262    fi
9263  fi
9264
9265  fi
9266
9267
9268    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
9269    if test "x$BOOT_JDK_FOUND" = xmaybe; then
9270      # Do we have a bin/java?
9271      if test ! -x "$BOOT_JDK/bin/java"; then
9272        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
9273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
9274        BOOT_JDK_FOUND=no
9275      else
9276        # Do we have a bin/javac?
9277        if test ! -x "$BOOT_JDK/bin/javac"; then
9278          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
9279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
9280          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
9281$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
9282          BOOT_JDK_FOUND=no
9283        else
9284          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
9285          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
9286            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
9287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
9288            BOOT_JDK_FOUND=no
9289          else
9290            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
9291            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
9292
9293            # Extra M4 quote needed to protect [] in grep expression.
9294            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
9295            if test "x$FOUND_VERSION_78" = x; then
9296              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
9297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
9298              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
9299$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
9300              BOOT_JDK_FOUND=no
9301            else
9302              # We're done! :-)
9303              BOOT_JDK_FOUND=yes
9304
9305    # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
9306    # Unless on Windows, where we can rewrite the path.
9307    HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
9308    if test "x$HAS_SPACE" != x; then
9309        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9310            # First convert it to DOS-style, short mode (no spaces)
9311            BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
9312            # Now it's case insensitive; let's make it lowercase to improve readability
9313            BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
9314            # Now convert it back to Unix-stile (cygpath)
9315            BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
9316        else
9317            as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
9318        fi
9319    fi
9320
9321              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
9322$as_echo_n "checking for Boot JDK... " >&6; }
9323              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
9324$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
9325            fi # end check jdk version
9326          fi # end check rt.jar
9327        fi # end check javac
9328      fi # end check java
9329    fi # end check boot jdk found
9330  fi
9331
9332
9333  if test "x$BOOT_JDK_FOUND" = xno; then
9334    # Now execute the test
9335
9336  if test "x$PROGRAMW6432" != x; then
9337
9338  BOOT_JDK_PREFIX="`$CYGPATH -u "$PROGRAMW6432"`/Java"
9339  BOOT_JDK_SUFFIX=""
9340  BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
9341  if test "x$BEST_JDK_FOUND" != x; then
9342    BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
9343    if test -d "$BOOT_JDK"; then
9344      BOOT_JDK_FOUND=maybe
9345      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&5
9346$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&6;}
9347    fi
9348  fi
9349
9350  fi
9351
9352
9353    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
9354    if test "x$BOOT_JDK_FOUND" = xmaybe; then
9355      # Do we have a bin/java?
9356      if test ! -x "$BOOT_JDK/bin/java"; then
9357        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
9358$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
9359        BOOT_JDK_FOUND=no
9360      else
9361        # Do we have a bin/javac?
9362        if test ! -x "$BOOT_JDK/bin/javac"; then
9363          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
9364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
9365          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
9366$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
9367          BOOT_JDK_FOUND=no
9368        else
9369          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
9370          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
9371            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
9372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
9373            BOOT_JDK_FOUND=no
9374          else
9375            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
9376            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
9377
9378            # Extra M4 quote needed to protect [] in grep expression.
9379            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
9380            if test "x$FOUND_VERSION_78" = x; then
9381              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
9382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
9383              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
9384$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
9385              BOOT_JDK_FOUND=no
9386            else
9387              # We're done! :-)
9388              BOOT_JDK_FOUND=yes
9389
9390    # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
9391    # Unless on Windows, where we can rewrite the path.
9392    HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
9393    if test "x$HAS_SPACE" != x; then
9394        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9395            # First convert it to DOS-style, short mode (no spaces)
9396            BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
9397            # Now it's case insensitive; let's make it lowercase to improve readability
9398            BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
9399            # Now convert it back to Unix-stile (cygpath)
9400            BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
9401        else
9402            as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
9403        fi
9404    fi
9405
9406              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
9407$as_echo_n "checking for Boot JDK... " >&6; }
9408              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
9409$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
9410            fi # end check jdk version
9411          fi # end check rt.jar
9412        fi # end check javac
9413      fi # end check java
9414    fi # end check boot jdk found
9415  fi
9416
9417
9418  if test "x$BOOT_JDK_FOUND" = xno; then
9419    # Now execute the test
9420
9421  if test "x$PROGRAMFILES" != x; then
9422
9423  BOOT_JDK_PREFIX="`$CYGPATH -u "$PROGRAMFILES"`/Java"
9424  BOOT_JDK_SUFFIX=""
9425  BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
9426  if test "x$BEST_JDK_FOUND" != x; then
9427    BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
9428    if test -d "$BOOT_JDK"; then
9429      BOOT_JDK_FOUND=maybe
9430      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&5
9431$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&6;}
9432    fi
9433  fi
9434
9435  fi
9436
9437
9438    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
9439    if test "x$BOOT_JDK_FOUND" = xmaybe; then
9440      # Do we have a bin/java?
9441      if test ! -x "$BOOT_JDK/bin/java"; then
9442        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
9443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
9444        BOOT_JDK_FOUND=no
9445      else
9446        # Do we have a bin/javac?
9447        if test ! -x "$BOOT_JDK/bin/javac"; then
9448          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
9449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
9450          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
9451$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
9452          BOOT_JDK_FOUND=no
9453        else
9454          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
9455          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
9456            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
9457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
9458            BOOT_JDK_FOUND=no
9459          else
9460            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
9461            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
9462
9463            # Extra M4 quote needed to protect [] in grep expression.
9464            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
9465            if test "x$FOUND_VERSION_78" = x; then
9466              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
9467$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
9468              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
9469$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
9470              BOOT_JDK_FOUND=no
9471            else
9472              # We're done! :-)
9473              BOOT_JDK_FOUND=yes
9474
9475    # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
9476    # Unless on Windows, where we can rewrite the path.
9477    HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
9478    if test "x$HAS_SPACE" != x; then
9479        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9480            # First convert it to DOS-style, short mode (no spaces)
9481            BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
9482            # Now it's case insensitive; let's make it lowercase to improve readability
9483            BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
9484            # Now convert it back to Unix-stile (cygpath)
9485            BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
9486        else
9487            as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
9488        fi
9489    fi
9490
9491              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
9492$as_echo_n "checking for Boot JDK... " >&6; }
9493              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
9494$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
9495            fi # end check jdk version
9496          fi # end check rt.jar
9497        fi # end check javac
9498      fi # end check java
9499    fi # end check boot jdk found
9500  fi
9501
9502
9503  if test "x$BOOT_JDK_FOUND" = xno; then
9504    # Now execute the test
9505
9506  if test "x$ProgramFiles" != x; then
9507
9508  BOOT_JDK_PREFIX="`$CYGPATH -u "$ProgramFiles"`/Java"
9509  BOOT_JDK_SUFFIX=""
9510  BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
9511  if test "x$BEST_JDK_FOUND" != x; then
9512    BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
9513    if test -d "$BOOT_JDK"; then
9514      BOOT_JDK_FOUND=maybe
9515      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&5
9516$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&6;}
9517    fi
9518  fi
9519
9520  fi
9521
9522
9523    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
9524    if test "x$BOOT_JDK_FOUND" = xmaybe; then
9525      # Do we have a bin/java?
9526      if test ! -x "$BOOT_JDK/bin/java"; then
9527        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
9528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
9529        BOOT_JDK_FOUND=no
9530      else
9531        # Do we have a bin/javac?
9532        if test ! -x "$BOOT_JDK/bin/javac"; then
9533          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
9534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
9535          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
9536$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
9537          BOOT_JDK_FOUND=no
9538        else
9539          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
9540          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
9541            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
9542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
9543            BOOT_JDK_FOUND=no
9544          else
9545            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
9546            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
9547
9548            # Extra M4 quote needed to protect [] in grep expression.
9549            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
9550            if test "x$FOUND_VERSION_78" = x; then
9551              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
9552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
9553              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
9554$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
9555              BOOT_JDK_FOUND=no
9556            else
9557              # We're done! :-)
9558              BOOT_JDK_FOUND=yes
9559
9560    # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
9561    # Unless on Windows, where we can rewrite the path.
9562    HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
9563    if test "x$HAS_SPACE" != x; then
9564        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9565            # First convert it to DOS-style, short mode (no spaces)
9566            BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
9567            # Now it's case insensitive; let's make it lowercase to improve readability
9568            BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
9569            # Now convert it back to Unix-stile (cygpath)
9570            BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
9571        else
9572            as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
9573        fi
9574    fi
9575
9576              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
9577$as_echo_n "checking for Boot JDK... " >&6; }
9578              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
9579$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
9580            fi # end check jdk version
9581          fi # end check rt.jar
9582        fi # end check javac
9583      fi # end check java
9584    fi # end check boot jdk found
9585  fi
9586
9587
9588  if test "x$BOOT_JDK_FOUND" = xno; then
9589    # Now execute the test
9590
9591  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
9592  BOOT_JDK_SUFFIX=""
9593  BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
9594  if test "x$BEST_JDK_FOUND" != x; then
9595    BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
9596    if test -d "$BOOT_JDK"; then
9597      BOOT_JDK_FOUND=maybe
9598      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&5
9599$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&6;}
9600    fi
9601  fi
9602
9603
9604    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
9605    if test "x$BOOT_JDK_FOUND" = xmaybe; then
9606      # Do we have a bin/java?
9607      if test ! -x "$BOOT_JDK/bin/java"; then
9608        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
9609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
9610        BOOT_JDK_FOUND=no
9611      else
9612        # Do we have a bin/javac?
9613        if test ! -x "$BOOT_JDK/bin/javac"; then
9614          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
9615$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
9616          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
9617$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
9618          BOOT_JDK_FOUND=no
9619        else
9620          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
9621          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
9622            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
9623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
9624            BOOT_JDK_FOUND=no
9625          else
9626            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
9627            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
9628
9629            # Extra M4 quote needed to protect [] in grep expression.
9630            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
9631            if test "x$FOUND_VERSION_78" = x; then
9632              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
9633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
9634              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
9635$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
9636              BOOT_JDK_FOUND=no
9637            else
9638              # We're done! :-)
9639              BOOT_JDK_FOUND=yes
9640
9641    # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
9642    # Unless on Windows, where we can rewrite the path.
9643    HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
9644    if test "x$HAS_SPACE" != x; then
9645        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9646            # First convert it to DOS-style, short mode (no spaces)
9647            BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
9648            # Now it's case insensitive; let's make it lowercase to improve readability
9649            BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
9650            # Now convert it back to Unix-stile (cygpath)
9651            BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
9652        else
9653            as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
9654        fi
9655    fi
9656
9657              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
9658$as_echo_n "checking for Boot JDK... " >&6; }
9659              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
9660$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
9661            fi # end check jdk version
9662          fi # end check rt.jar
9663        fi # end check javac
9664      fi # end check java
9665    fi # end check boot jdk found
9666  fi
9667
9668  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
9669
9670  if test "x$BOOT_JDK_FOUND" = xno; then
9671    # Now execute the test
9672
9673  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
9674  BOOT_JDK_SUFFIX="/Contents/Home"
9675  BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
9676  if test "x$BEST_JDK_FOUND" != x; then
9677    BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
9678    if test -d "$BOOT_JDK"; then
9679      BOOT_JDK_FOUND=maybe
9680      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&5
9681$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&6;}
9682    fi
9683  fi
9684
9685
9686    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
9687    if test "x$BOOT_JDK_FOUND" = xmaybe; then
9688      # Do we have a bin/java?
9689      if test ! -x "$BOOT_JDK/bin/java"; then
9690        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
9691$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
9692        BOOT_JDK_FOUND=no
9693      else
9694        # Do we have a bin/javac?
9695        if test ! -x "$BOOT_JDK/bin/javac"; then
9696          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
9697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
9698          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
9699$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
9700          BOOT_JDK_FOUND=no
9701        else
9702          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
9703          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
9704            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
9705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
9706            BOOT_JDK_FOUND=no
9707          else
9708            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
9709            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
9710
9711            # Extra M4 quote needed to protect [] in grep expression.
9712            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
9713            if test "x$FOUND_VERSION_78" = x; then
9714              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
9715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
9716              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
9717$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
9718              BOOT_JDK_FOUND=no
9719            else
9720              # We're done! :-)
9721              BOOT_JDK_FOUND=yes
9722
9723    # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
9724    # Unless on Windows, where we can rewrite the path.
9725    HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
9726    if test "x$HAS_SPACE" != x; then
9727        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9728            # First convert it to DOS-style, short mode (no spaces)
9729            BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
9730            # Now it's case insensitive; let's make it lowercase to improve readability
9731            BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
9732            # Now convert it back to Unix-stile (cygpath)
9733            BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
9734        else
9735            as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
9736        fi
9737    fi
9738
9739              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
9740$as_echo_n "checking for Boot JDK... " >&6; }
9741              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
9742$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
9743            fi # end check jdk version
9744          fi # end check rt.jar
9745        fi # end check javac
9746      fi # end check java
9747    fi # end check boot jdk found
9748  fi
9749
9750
9751  if test "x$BOOT_JDK_FOUND" = xno; then
9752    # Now execute the test
9753
9754  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
9755  BOOT_JDK_SUFFIX="/Contents/Home"
9756  BEST_JDK_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $GREP jdk | $SORT -r | $HEAD -n 1 `
9757  if test "x$BEST_JDK_FOUND" != x; then
9758    BOOT_JDK="${BOOT_JDK_PREFIX}/${BEST_JDK_FOUND}${BOOT_JDK_SUFFIX}"
9759    if test -d "$BOOT_JDK"; then
9760      BOOT_JDK_FOUND=maybe
9761      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&5
9762$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX)" >&6;}
9763    fi
9764  fi
9765
9766
9767    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
9768    if test "x$BOOT_JDK_FOUND" = xmaybe; then
9769      # Do we have a bin/java?
9770      if test ! -x "$BOOT_JDK/bin/java"; then
9771        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
9772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
9773        BOOT_JDK_FOUND=no
9774      else
9775        # Do we have a bin/javac?
9776        if test ! -x "$BOOT_JDK/bin/javac"; then
9777          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
9778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
9779          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
9780$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
9781          BOOT_JDK_FOUND=no
9782        else
9783          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
9784          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
9785            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
9786$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
9787            BOOT_JDK_FOUND=no
9788          else
9789            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
9790            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
9791
9792            # Extra M4 quote needed to protect [] in grep expression.
9793            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
9794            if test "x$FOUND_VERSION_78" = x; then
9795              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
9796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
9797              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
9798$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
9799              BOOT_JDK_FOUND=no
9800            else
9801              # We're done! :-)
9802              BOOT_JDK_FOUND=yes
9803
9804    # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
9805    # Unless on Windows, where we can rewrite the path.
9806    HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
9807    if test "x$HAS_SPACE" != x; then
9808        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9809            # First convert it to DOS-style, short mode (no spaces)
9810            BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
9811            # Now it's case insensitive; let's make it lowercase to improve readability
9812            BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
9813            # Now convert it back to Unix-stile (cygpath)
9814            BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
9815        else
9816            as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
9817        fi
9818    fi
9819
9820              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
9821$as_echo_n "checking for Boot JDK... " >&6; }
9822              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
9823$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
9824            fi # end check jdk version
9825          fi # end check rt.jar
9826        fi # end check javac
9827      fi # end check java
9828    fi # end check boot jdk found
9829  fi
9830
9831  fi
9832
9833
9834    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
9835    if test "x$BOOT_JDK_FOUND" = xmaybe; then
9836      # Do we have a bin/java?
9837      if test ! -x "$BOOT_JDK/bin/java"; then
9838        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
9839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
9840        BOOT_JDK_FOUND=no
9841      else
9842        # Do we have a bin/javac?
9843        if test ! -x "$BOOT_JDK/bin/javac"; then
9844          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
9845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
9846          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
9847$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
9848          BOOT_JDK_FOUND=no
9849        else
9850          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
9851          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
9852            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
9853$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
9854            BOOT_JDK_FOUND=no
9855          else
9856            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
9857            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
9858
9859            # Extra M4 quote needed to protect [] in grep expression.
9860            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
9861            if test "x$FOUND_VERSION_78" = x; then
9862              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
9863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
9864              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
9865$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
9866              BOOT_JDK_FOUND=no
9867            else
9868              # We're done! :-)
9869              BOOT_JDK_FOUND=yes
9870
9871    # Fail with message the path to the Boot JDK if var BOOT_JDK contains a path with no spaces in it.
9872    # Unless on Windows, where we can rewrite the path.
9873    HAS_SPACE=`echo "$BOOT_JDK" | grep " "`
9874    if test "x$HAS_SPACE" != x; then
9875        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9876            # First convert it to DOS-style, short mode (no spaces)
9877            BOOT_JDK=`$CYGPATH -s -m -a "$BOOT_JDK"`
9878            # Now it's case insensitive; let's make it lowercase to improve readability
9879            BOOT_JDK=`$ECHO "$BOOT_JDK" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
9880            # Now convert it back to Unix-stile (cygpath)
9881            BOOT_JDK=`$CYGPATH -u "$BOOT_JDK"`
9882        else
9883            as_fn_error $? "You cannot have spaces in the path to the Boot JDK! \"$BOOT_JDK\"" "$LINENO" 5
9884        fi
9885    fi
9886
9887              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
9888$as_echo_n "checking for Boot JDK... " >&6; }
9889              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK ($BOOT_JDK_VERSION)" >&5
9890$as_echo "$BOOT_JDK ($BOOT_JDK_VERSION)" >&6; }
9891            fi # end check jdk version
9892          fi # end check rt.jar
9893        fi # end check javac
9894      fi # end check java
9895    fi # end check boot jdk found
9896  fi
9897
9898
9899# If we haven't found anything yet, we've truly lost. Give up.
9900if test "x$BOOT_JDK_FOUND" = xno; then
9901
9902    # Print a helpful message on how to acquire the necessary build dependency.
9903    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
9904    MISSING_DEPENDENCY=openjdk
9905    PKGHANDLER_COMMAND=
9906
9907    case $PKGHANDLER in
9908	apt-get)
9909                apt_help     $MISSING_DEPENDENCY ;;
9910    yum)
9911                yum_help     $MISSING_DEPENDENCY ;;
9912	port)
9913                port_help    $MISSING_DEPENDENCY ;;
9914	pkgutil)
9915                pkgutil_help $MISSING_DEPENDENCY ;;
9916	pkgadd)
9917                pkgadd_help  $MISSING_DEPENDENCY ;;
9918    * )
9919      break ;;
9920    esac
9921
9922    if test "x$PKGHANDLER_COMMAND" != x; then
9923        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
9924    fi
9925
9926  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
9927$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
9928  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
9929$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
9930  as_fn_error $? "Cannot continue" "$LINENO" 5
9931fi
9932
9933# Setup proper paths for what we found
9934BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
9935if test ! -f "$BOOT_RTJAR"; then
9936    # On MacOSX it is called classes.jar
9937    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
9938    if test -f "$BOOT_RTJAR"; then
9939      # Remove the ..
9940      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
9941    fi
9942fi
9943BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
9944BOOT_JDK="$BOOT_JDK"
9945
9946
9947
9948
9949# Setup tools from the Boot JDK.
9950
9951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
9952$as_echo_n "checking for java in Boot JDK... " >&6; }
9953  JAVA=$BOOT_JDK/bin/java
9954  if test ! -x $JAVA; then
9955      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9956$as_echo "not found" >&6; }
9957      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
9958$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
9959      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
9960  fi
9961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9962$as_echo "ok" >&6; }
9963
9964
9965  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
9966$as_echo_n "checking for javac in Boot JDK... " >&6; }
9967  JAVAC=$BOOT_JDK/bin/javac
9968  if test ! -x $JAVAC; then
9969      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9970$as_echo "not found" >&6; }
9971      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
9972$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
9973      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
9974  fi
9975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9976$as_echo "ok" >&6; }
9977
9978
9979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
9980$as_echo_n "checking for javah in Boot JDK... " >&6; }
9981  JAVAH=$BOOT_JDK/bin/javah
9982  if test ! -x $JAVAH; then
9983      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9984$as_echo "not found" >&6; }
9985      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
9986$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
9987      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
9988  fi
9989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9990$as_echo "ok" >&6; }
9991
9992
9993  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
9994$as_echo_n "checking for javap in Boot JDK... " >&6; }
9995  JAVAP=$BOOT_JDK/bin/javap
9996  if test ! -x $JAVAP; then
9997      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9998$as_echo "not found" >&6; }
9999      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
10000$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
10001      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
10002  fi
10003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
10004$as_echo "ok" >&6; }
10005
10006
10007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
10008$as_echo_n "checking for jar in Boot JDK... " >&6; }
10009  JAR=$BOOT_JDK/bin/jar
10010  if test ! -x $JAR; then
10011      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10012$as_echo "not found" >&6; }
10013      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
10014$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
10015      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
10016  fi
10017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
10018$as_echo "ok" >&6; }
10019
10020
10021  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
10022$as_echo_n "checking for rmic in Boot JDK... " >&6; }
10023  RMIC=$BOOT_JDK/bin/rmic
10024  if test ! -x $RMIC; then
10025      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10026$as_echo "not found" >&6; }
10027      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
10028$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
10029      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
10030  fi
10031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
10032$as_echo "ok" >&6; }
10033
10034
10035  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
10036$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
10037  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
10038  if test ! -x $NATIVE2ASCII; then
10039      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10040$as_echo "not found" >&6; }
10041      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
10042$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
10043      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
10044  fi
10045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
10046$as_echo "ok" >&6; }
10047
10048
10049# Finally, set some other options...
10050
10051# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
10052BOOT_JDK_SOURCETARGET="-source 7 -target 7"
10053
10054
10055
10056
10057##############################################################################
10058#
10059# Specify options for anything that is run with the Boot JDK.
10060#
10061
10062# Check whether --with-boot-jdk-jvmargs was given.
10063if test "${with_boot_jdk_jvmargs+set}" = set; then :
10064  withval=$with_boot_jdk_jvmargs;
10065fi
10066
10067
10068if test "x$with_boot_jdk_jvmargs" = x; then
10069    # Not all JVM:s accept the same arguments on the command line.
10070    # OpenJDK specific increase in thread stack for JDK build,
10071    # well more specifically, when running javac.
10072    if test "x$BUILD_NUM_BITS" = x32; then
10073       STACK_SIZE=768
10074    else
10075       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
10076       # since 64-bit pointers are pushed on the stach. Apparently, we need
10077       # to increase the stack space when javacing the JDK....
10078       STACK_SIZE=1536
10079    fi
10080
10081    # Minimum amount of heap memory.
10082
10083    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
10084    # If so, then append -Xms64M to boot_jdk_jvmargs
10085    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
10086    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
10087    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
10088        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
10089    fi
10090
10091    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10092        # Why does macosx need more heap? Its the huge JDK batch.
10093
10094    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
10095    # If so, then append -Xmx1600M to boot_jdk_jvmargs
10096    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
10097    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
10098    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
10099        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
10100    fi
10101
10102    else
10103
10104    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
10105    # If so, then append -Xmx1100M to boot_jdk_jvmargs
10106    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
10107    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
10108    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
10109        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
10110    fi
10111
10112    fi
10113    # When is adding -client something that speeds up the JVM?
10114    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
10115
10116    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
10117    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
10118    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
10119    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
10120    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
10121        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
10122    fi
10123
10124
10125    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
10126    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
10127    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
10128    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
10129    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
10130        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
10131    fi
10132
10133
10134    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
10135    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
10136    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
10137    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
10138    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
10139        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
10140    fi
10141
10142    # Disable special log output when a debug build is used as Boot JDK...
10143
10144    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
10145    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
10146    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
10147    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
10148    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
10149        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
10150    fi
10151
10152fi
10153
10154BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
10155
10156
10157
10158###############################################################################
10159#
10160# Configure the sources to use. We can add or override individual directories.
10161#
10162###############################################################################
10163
10164
10165
10166# Where are the sources. Any of these can be overridden
10167# using --with-override-corba and the likes.
10168LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
10169CORBA_TOPDIR="$SRC_ROOT/corba"
10170JAXP_TOPDIR="$SRC_ROOT/jaxp"
10171JAXWS_TOPDIR="$SRC_ROOT/jaxws"
10172HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
10173JDK_TOPDIR="$SRC_ROOT/jdk"
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183###############################################################################
10184#
10185# Pickup additional source for a component from outside of the source root
10186# or override source for a component.
10187#
10188
10189# Check whether --with-add-source-root was given.
10190if test "${with_add_source_root+set}" = set; then :
10191  withval=$with_add_source_root;
10192fi
10193
10194
10195
10196# Check whether --with-override-source-root was given.
10197if test "${with_override_source_root+set}" = set; then :
10198  withval=$with_override_source_root;
10199fi
10200
10201
10202
10203# Check whether --with-adds-and-overrides was given.
10204if test "${with_adds_and_overrides+set}" = set; then :
10205  withval=$with_adds_and_overrides;
10206fi
10207
10208
10209if test "x$with_adds_and_overrides" != x; then
10210    with_add_source_root="$with_adds_and_overrides/adds"
10211    with_override_source_root="$with_adds_and_overrides/overrides"
10212fi
10213
10214if test "x$with_add_source_root" != x; then
10215    if ! test -d $with_add_source_root; then
10216       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
10217    fi
10218    CURDIR="$PWD"
10219    cd "$with_add_source_root"
10220    ADD_SRC_ROOT="`pwd`"
10221    cd "$CURDIR"
10222    # Verify that the addon source root does not have any root makefiles.
10223    # If it does, then it is usually an error, prevent this.
10224    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
10225       test -f $with_add_source_root/langtools/make/Makefile; then
10226        as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
10227    fi
10228    if test -f $with_add_source_root/corba/makefiles/Makefile || \
10229       test -f $with_add_source_root/corba/make/Makefile; then
10230        as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
10231    fi
10232    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
10233       test -f $with_add_source_root/jaxp/make/Makefile; then
10234        as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
10235    fi
10236    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
10237       test -f $with_add_source_root/jaxws/make/Makefile; then
10238        as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
10239    fi
10240    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
10241       test -f $with_add_source_root/hotspot/make/Makefile; then
10242        as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
10243    fi
10244    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
10245       test -f $with_add_source_root/jdk/make/Makefile; then
10246        as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
10247    fi
10248fi
10249
10250
10251if test "x$with_override_source_root" != x; then
10252    if ! test -d $with_override_source_root; then
10253       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
10254    fi
10255    CURDIR="$PWD"
10256    cd "$with_override_source_root"
10257    OVERRIDE_SRC_ROOT="`pwd`"
10258    cd "$CURDIR"
10259    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
10260       test -f $with_override_source_root/langtools/make/Makefile; then
10261        as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
10262    fi
10263    if test -f $with_override_source_root/corba/makefiles/Makefile || \
10264       test -f $with_override_source_root/corba/make/Makefile; then
10265        as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
10266    fi
10267    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
10268       test -f $with_override_source_root/jaxp/make/Makefile; then
10269        as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
10270    fi
10271    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
10272       test -f $with_override_source_root/jaxws/make/Makefile; then
10273        as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
10274    fi
10275    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
10276       test -f $with_override_source_root/hotspot/make/Makefile; then
10277        as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
10278    fi
10279    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
10280       test -f $with_override_source_root/jdk/make/Makefile; then
10281        as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
10282    fi
10283fi
10284
10285
10286###############################################################################
10287#
10288# Override a repo completely, this is used for example when you have 3 small
10289# development sandboxes of the langtools sources and want to avoid having 3 full
10290# OpenJDK sources checked out on disk.
10291#
10292# Assuming that the 3 langtools sandboxes are located here:
10293# /home/fredrik/sandbox1/langtools
10294# /home/fredrik/sandbox2/langtools
10295# /home/fredrik/sandbox3/langtools
10296#
10297# From the source root you create build subdirs manually:
10298#     mkdir -p build1 build2 build3
10299# in each build directory run:
10300#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
10301#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
10302#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
10303#
10304
10305
10306# Check whether --with-override-langtools was given.
10307if test "${with_override_langtools+set}" = set; then :
10308  withval=$with_override_langtools;
10309fi
10310
10311
10312
10313# Check whether --with-override-corba was given.
10314if test "${with_override_corba+set}" = set; then :
10315  withval=$with_override_corba;
10316fi
10317
10318
10319
10320# Check whether --with-override-jaxp was given.
10321if test "${with_override_jaxp+set}" = set; then :
10322  withval=$with_override_jaxp;
10323fi
10324
10325
10326
10327# Check whether --with-override-jaxws was given.
10328if test "${with_override_jaxws+set}" = set; then :
10329  withval=$with_override_jaxws;
10330fi
10331
10332
10333
10334# Check whether --with-override-hotspot was given.
10335if test "${with_override_hotspot+set}" = set; then :
10336  withval=$with_override_hotspot;
10337fi
10338
10339
10340
10341# Check whether --with-override-jdk was given.
10342if test "${with_override_jdk+set}" = set; then :
10343  withval=$with_override_jdk;
10344fi
10345
10346
10347if test "x$with_override_langtools" != x; then
10348    CURDIR="$PWD"
10349    cd "$with_override_langtools"
10350    LANGTOOLS_TOPDIR="`pwd`"
10351    cd "$CURDIR"
10352    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
10353        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
10354    fi
10355    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
10356$as_echo_n "checking if langtools should be overridden... " >&6; }
10357    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
10358$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
10359fi
10360if test "x$with_override_corba" != x; then
10361    CURDIR="$PWD"
10362    cd "$with_override_corba"
10363    CORBA_TOPDIR="`pwd`"
10364    cd "$CURDIR"
10365    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
10366        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
10367    fi
10368    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
10369$as_echo_n "checking if corba should be overridden... " >&6; }
10370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
10371$as_echo "yes with $CORBA_TOPDIR" >&6; }
10372fi
10373if test "x$with_override_jaxp" != x; then
10374    CURDIR="$PWD"
10375    cd "$with_override_jaxp"
10376    JAXP_TOPDIR="`pwd`"
10377    cd "$CURDIR"
10378    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
10379        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
10380    fi
10381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
10382$as_echo_n "checking if jaxp should be overridden... " >&6; }
10383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
10384$as_echo "yes with $JAXP_TOPDIR" >&6; }
10385fi
10386if test "x$with_override_jaxws" != x; then
10387    CURDIR="$PWD"
10388    cd "$with_override_jaxws"
10389    JAXWS_TOPDIR="`pwd`"
10390    cd "$CURDIR"
10391    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
10392        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
10393    fi
10394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
10395$as_echo_n "checking if jaxws should be overridden... " >&6; }
10396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
10397$as_echo "yes with $JAXWS_TOPDIR" >&6; }
10398fi
10399if test "x$with_override_hotspot" != x; then
10400    CURDIR="$PWD"
10401    cd "$with_override_hotspot"
10402    HOTSPOT_TOPDIR="`pwd`"
10403    cd "$CURDIR"
10404    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
10405       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
10406        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
10407    fi
10408    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
10409$as_echo_n "checking if hotspot should be overridden... " >&6; }
10410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
10411$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
10412fi
10413if test "x$with_override_jdk" != x; then
10414    CURDIR="$PWD"
10415    cd "$with_override_jdk"
10416    JDK_TOPDIR="`pwd`"
10417    cd "$CURDIR"
10418    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
10419        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
10420    fi
10421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
10422$as_echo_n "checking if JDK should be overridden... " >&6; }
10423    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
10424$as_echo "yes with $JDK_TOPDIR" >&6; }
10425fi
10426
10427
10428
10429BUILD_OUTPUT="$OUTPUT_ROOT"
10430
10431
10432JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
10433
10434
10435###############################################################################
10436#
10437# Setup the toolchain (compilers etc), i.e. the tools that need to be
10438# cross-compilation aware.
10439#
10440###############################################################################
10441
10442
10443###############################################################################
10444#
10445# Configure the development tool paths and potential sysroot.
10446#
10447ac_ext=cpp
10448ac_cpp='$CXXCPP $CPPFLAGS'
10449ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10450ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10451ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10452
10453
10454# The option used to specify the target .o,.a or .so file.
10455# When compiling, how to specify the to be created object file.
10456CC_OUT_OPTION='-o$(SPACE)'
10457# When linking, how to specify the to be created executable.
10458EXE_OUT_OPTION='-o$(SPACE)'
10459# When linking, how to specify the to be created dynamically linkable library.
10460LD_OUT_OPTION='-o$(SPACE)'
10461# When archiving, how to specify the to be create static archive for object files.
10462AR_OUT_OPTION='rcs$(SPACE)'
10463
10464
10465
10466
10467
10468
10469
10470# Check if the VS env variables were setup prior to running configure.
10471# If not, then find vcvarsall.bat and run it automatically, and integrate
10472# the set env variables into the spec file.
10473SETUPDEVENV="# No special vars"
10474if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
10475    # Store path to cygwin link.exe to help excluding it when searching for
10476    # VS linker.
10477    # Extract the first word of "link", so it can be a program name with args.
10478set dummy link; ac_word=$2
10479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10480$as_echo_n "checking for $ac_word... " >&6; }
10481if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
10482  $as_echo_n "(cached) " >&6
10483else
10484  case $CYGWIN_LINK in
10485  [\\/]* | ?:[\\/]*)
10486  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
10487  ;;
10488  *)
10489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10490for as_dir in $PATH
10491do
10492  IFS=$as_save_IFS
10493  test -z "$as_dir" && as_dir=.
10494    for ac_exec_ext in '' $ac_executable_extensions; do
10495  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10496    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
10497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10498    break 2
10499  fi
10500done
10501  done
10502IFS=$as_save_IFS
10503
10504  ;;
10505esac
10506fi
10507CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
10508if test -n "$CYGWIN_LINK"; then
10509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
10510$as_echo "$CYGWIN_LINK" >&6; }
10511else
10512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10513$as_echo "no" >&6; }
10514fi
10515
10516
10517    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
10518$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
10519    "$CYGWIN_LINK" --version > /dev/null
10520    if test $? -eq 0 ; then
10521      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10522$as_echo "yes" >&6; }
10523    else
10524      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525$as_echo "no" >&6; }
10526      # This might be the VS linker. Don't exclude it later on.
10527      CYGWIN_LINK=""
10528    fi
10529
10530    # If vcvarsall.bat has been run, then VCINSTALLDIR is set.
10531    if test "x$VCINSTALLDIR" != x; then
10532        # No further setup is needed. The build will happen from this kind
10533        # of shell.
10534        SETUPDEVENV="# This spec file expects that you are running bash from within a VS command prompt."
10535        # Make sure to remind you, if you forget to run make from a cygwin bash shell
10536        # that is spawned "bash -l" from a VS command prompt.
10537        CHECK_FOR_VCINSTALLDIR=yes
10538        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if you are running from within a VS command prompt" >&5
10539$as_echo_n "checking if you are running from within a VS command prompt... " >&6; }
10540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10541$as_echo "yes" >&6; }
10542    else
10543        # Ah, we have not yet run vcvarsall.bat/vsvars32.bat/vsvars64.bat. Lets do that. First find it.
10544        if test "x$VS100COMNTOOLS" != x; then
10545            VARSBAT=`find "$VS100COMNTOOLS/../.." -name vcvarsall.bat`
10546	    SEARCH_ROOT="$VS100COMNTOOLS"
10547        else
10548            VARSBAT=`find "$PROGRAMFILES" -name vcvarsall.bat`
10549	    SEARCH_ROOT="$PROGRAMFILES"
10550        fi
10551        VCPATH=`dirname "$VARSBAT"`
10552        VCPATH=`cygpath -w "$VCPATH"`
10553	if test "x$VARSBAT" = x || test ! -d "$VCPATH"; then
10554            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can find the VS installation" >&5
10555$as_echo_n "checking if we can find the VS installation... " >&6; }
10556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10557$as_echo "no" >&6; }
10558            as_fn_error $? "Tried to find a VS installation using both $SEARCH_ROOT but failed. Please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
10559        fi
10560        case "$OPENJDK_TARGET_CPU" in
10561          x86)
10562            VARSBAT_ARCH=x86
10563            ;;
10564          x86_64)
10565            VARSBAT_ARCH=amd64
10566            ;;
10567        esac
10568        # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
10569        cd $OUTPUT_ROOT
10570        bash $SRC_ROOT/common/bin/extractvcvars.sh "$VARSBAT" "$VARSBAT_ARCH"
10571	cd $CURDIR
10572	if test ! -s $OUTPUT_ROOT/localdevenv.sh || test ! -s $OUTPUT_ROOT/localdevenv.gmk; then
10573            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can extract the needed env variables" >&5
10574$as_echo_n "checking if we can extract the needed env variables... " >&6; }
10575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10576$as_echo "no" >&6; }
10577            as_fn_error $? "Could not succesfully extract the env variables needed for the VS setup. Please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
10578        fi
10579        # Now set all paths and other env variables. This will allow the rest of
10580        # the configure script to find and run the compiler in the proper way.
10581        . $OUTPUT_ROOT/localdevenv.sh
10582        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can find the VS installation" >&5
10583$as_echo_n "checking if we can find the VS installation... " >&6; }
10584	if test "x$VCINSTALLDIR" != x; then
10585            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VCINSTALLDIR" >&5
10586$as_echo "$VCINSTALLDIR" >&6; }
10587        else
10588            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10589$as_echo "no" >&6; }
10590            as_fn_error $? "Could not find VS installation. Please install. If you are sure you have installed VS, then please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
10591        fi
10592        CHECK_FOR_VCINSTALLDIR=no
10593	SETUPDEVENV="include $OUTPUT_ROOT/localdevenv.gmk"
10594
10595	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
10596$as_echo_n "checking for msvcr100.dll... " >&6; }
10597
10598# Check whether --with-msvcr100dll was given.
10599if test "${with_msvcr100dll+set}" = set; then :
10600  withval=$with_msvcr100dll;
10601fi
10602
10603        if test "x$with_msvcr100dll" != x; then
10604            MSVCR100DLL="$with_msvcr100dll"
10605        else
10606            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
10607                MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x64 | head --lines 1`
10608            else
10609                MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
10610                if test "x$MSVCR100DLL" = x; then
10611                    MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | head --lines 1`
10612                fi
10613            fi
10614        fi
10615	if test "x$MSVCR100DLL" = x; then
10616           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10617$as_echo "no" >&6; }
10618	   as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
10619        fi
10620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR100DLL" >&5
10621$as_echo "$MSVCR100DLL" >&6; }
10622
10623    # Fail with message the path to msvcr100.dll if var MSVCR100DLL contains a path with no spaces in it.
10624    # Unless on Windows, where we can rewrite the path.
10625    HAS_SPACE=`echo "$MSVCR100DLL" | grep " "`
10626    if test "x$HAS_SPACE" != x; then
10627        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
10628            # First convert it to DOS-style, short mode (no spaces)
10629            MSVCR100DLL=`$CYGPATH -s -m -a "$MSVCR100DLL"`
10630            # Now it's case insensitive; let's make it lowercase to improve readability
10631            MSVCR100DLL=`$ECHO "$MSVCR100DLL" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
10632            # Now convert it back to Unix-stile (cygpath)
10633            MSVCR100DLL=`$CYGPATH -u "$MSVCR100DLL"`
10634        else
10635            as_fn_error $? "You cannot have spaces in the path to msvcr100.dll! \"$MSVCR100DLL\"" "$LINENO" 5
10636        fi
10637    fi
10638
10639    fi
10640fi
10641
10642
10643
10644
10645# Locate the actual tools
10646
10647# If --build AND --host is set, then the configure script will find any
10648# cross compilation tools in the PATH. Cross compilation tools
10649# follows the cross compilation standard where they are prefixed with ${host}.
10650# For example the binary i686-sun-solaris2.10-gcc
10651# will cross compile for i686-sun-solaris2.10
10652# If neither of build and host is not set, then build=host and the
10653# default compiler found in the path will be used.
10654# Setting only --host, does not seem to be really supported.
10655# Please set both --build and --host if you want to cross compile.
10656
10657if test "x$COMPILE_TYPE" = "xcross"; then
10658    # Now we to find a C/C++ compiler that can build executables for the build
10659    # platform. We can't use the AC_PROG_CC macro, since it can only be used
10660    # once. Also, we need to do this before adding a tools dir to the path,
10661    # otherwise we might pick up cross-compilers which don't use standard naming.
10662    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
10663    # to wait until they are properly discovered.
10664    for ac_prog in cl cc gcc
10665do
10666  # Extract the first word of "$ac_prog", so it can be a program name with args.
10667set dummy $ac_prog; ac_word=$2
10668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10669$as_echo_n "checking for $ac_word... " >&6; }
10670if test "${ac_cv_path_BUILD_CC+set}" = set; then :
10671  $as_echo_n "(cached) " >&6
10672else
10673  case $BUILD_CC in
10674  [\\/]* | ?:[\\/]*)
10675  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
10676  ;;
10677  *)
10678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10679for as_dir in $PATH
10680do
10681  IFS=$as_save_IFS
10682  test -z "$as_dir" && as_dir=.
10683    for ac_exec_ext in '' $ac_executable_extensions; do
10684  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10685    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
10686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10687    break 2
10688  fi
10689done
10690  done
10691IFS=$as_save_IFS
10692
10693  ;;
10694esac
10695fi
10696BUILD_CC=$ac_cv_path_BUILD_CC
10697if test -n "$BUILD_CC"; then
10698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
10699$as_echo "$BUILD_CC" >&6; }
10700else
10701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10702$as_echo "no" >&6; }
10703fi
10704
10705
10706  test -n "$BUILD_CC" && break
10707done
10708
10709
10710    # Translate "gcc -E" into "`which gcc` -E" ie
10711    # extract the full path to the binary and at the
10712    # same time maintain any arguments passed to it.
10713    # The command MUST exist in the path, or else!
10714    tmp="$BUILD_CC"
10715    car="${tmp%% *}"
10716    tmp="$BUILD_CC EOL"
10717    cdr="${tmp#* }"
10718    # On windows we want paths without spaces.
10719    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
10720
10721    # Translate long cygdrive or C:\sdfsf path
10722    # into a short mixed mode path that has no
10723    # spaces in it.
10724    tmp="$car"
10725
10726    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
10727        tmp=`$CYGPATH -u "$car"`
10728        tmp=`which "$tmp"`
10729        # If file exists with .exe appended, that's the real filename
10730        # and cygpath needs that to convert to short style path.
10731        if test -f "${tmp}.exe"; then
10732           tmp="${tmp}.exe"
10733        elif test -f "${tmp}.cmd"; then
10734           tmp="${tmp}.cmd"
10735        fi
10736        # Convert to C:/ mixed style path without spaces.
10737         tmp=`$CYGPATH -s -m "$tmp"`
10738    fi
10739    car="$tmp"
10740
10741    else
10742        # "which" is not portable, but is used here
10743        # because we know that the command exists!
10744        car=`which $car`
10745    fi
10746    if test "x$cdr" != xEOL; then
10747        BUILD_CC="$car ${cdr% *}"
10748    else
10749        BUILD_CC="$car"
10750    fi
10751
10752    for ac_prog in cl CC g++
10753do
10754  # Extract the first word of "$ac_prog", so it can be a program name with args.
10755set dummy $ac_prog; ac_word=$2
10756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10757$as_echo_n "checking for $ac_word... " >&6; }
10758if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
10759  $as_echo_n "(cached) " >&6
10760else
10761  case $BUILD_CXX in
10762  [\\/]* | ?:[\\/]*)
10763  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
10764  ;;
10765  *)
10766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10767for as_dir in $PATH
10768do
10769  IFS=$as_save_IFS
10770  test -z "$as_dir" && as_dir=.
10771    for ac_exec_ext in '' $ac_executable_extensions; do
10772  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10773    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
10774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10775    break 2
10776  fi
10777done
10778  done
10779IFS=$as_save_IFS
10780
10781  ;;
10782esac
10783fi
10784BUILD_CXX=$ac_cv_path_BUILD_CXX
10785if test -n "$BUILD_CXX"; then
10786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
10787$as_echo "$BUILD_CXX" >&6; }
10788else
10789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10790$as_echo "no" >&6; }
10791fi
10792
10793
10794  test -n "$BUILD_CXX" && break
10795done
10796
10797
10798    # Translate "gcc -E" into "`which gcc` -E" ie
10799    # extract the full path to the binary and at the
10800    # same time maintain any arguments passed to it.
10801    # The command MUST exist in the path, or else!
10802    tmp="$BUILD_CXX"
10803    car="${tmp%% *}"
10804    tmp="$BUILD_CXX EOL"
10805    cdr="${tmp#* }"
10806    # On windows we want paths without spaces.
10807    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
10808
10809    # Translate long cygdrive or C:\sdfsf path
10810    # into a short mixed mode path that has no
10811    # spaces in it.
10812    tmp="$car"
10813
10814    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
10815        tmp=`$CYGPATH -u "$car"`
10816        tmp=`which "$tmp"`
10817        # If file exists with .exe appended, that's the real filename
10818        # and cygpath needs that to convert to short style path.
10819        if test -f "${tmp}.exe"; then
10820           tmp="${tmp}.exe"
10821        elif test -f "${tmp}.cmd"; then
10822           tmp="${tmp}.cmd"
10823        fi
10824        # Convert to C:/ mixed style path without spaces.
10825         tmp=`$CYGPATH -s -m "$tmp"`
10826    fi
10827    car="$tmp"
10828
10829    else
10830        # "which" is not portable, but is used here
10831        # because we know that the command exists!
10832        car=`which $car`
10833    fi
10834    if test "x$cdr" != xEOL; then
10835        BUILD_CXX="$car ${cdr% *}"
10836    else
10837        BUILD_CXX="$car"
10838    fi
10839
10840    # Extract the first word of "ld", so it can be a program name with args.
10841set dummy ld; ac_word=$2
10842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10843$as_echo_n "checking for $ac_word... " >&6; }
10844if test "${ac_cv_path_BUILD_LD+set}" = set; then :
10845  $as_echo_n "(cached) " >&6
10846else
10847  case $BUILD_LD in
10848  [\\/]* | ?:[\\/]*)
10849  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
10850  ;;
10851  *)
10852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10853for as_dir in $PATH
10854do
10855  IFS=$as_save_IFS
10856  test -z "$as_dir" && as_dir=.
10857    for ac_exec_ext in '' $ac_executable_extensions; do
10858  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10859    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
10860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10861    break 2
10862  fi
10863done
10864  done
10865IFS=$as_save_IFS
10866
10867  ;;
10868esac
10869fi
10870BUILD_LD=$ac_cv_path_BUILD_LD
10871if test -n "$BUILD_LD"; then
10872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
10873$as_echo "$BUILD_LD" >&6; }
10874else
10875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10876$as_echo "no" >&6; }
10877fi
10878
10879
10880
10881    # Translate "gcc -E" into "`which gcc` -E" ie
10882    # extract the full path to the binary and at the
10883    # same time maintain any arguments passed to it.
10884    # The command MUST exist in the path, or else!
10885    tmp="$BUILD_LD"
10886    car="${tmp%% *}"
10887    tmp="$BUILD_LD EOL"
10888    cdr="${tmp#* }"
10889    # On windows we want paths without spaces.
10890    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
10891
10892    # Translate long cygdrive or C:\sdfsf path
10893    # into a short mixed mode path that has no
10894    # spaces in it.
10895    tmp="$car"
10896
10897    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
10898        tmp=`$CYGPATH -u "$car"`
10899        tmp=`which "$tmp"`
10900        # If file exists with .exe appended, that's the real filename
10901        # and cygpath needs that to convert to short style path.
10902        if test -f "${tmp}.exe"; then
10903           tmp="${tmp}.exe"
10904        elif test -f "${tmp}.cmd"; then
10905           tmp="${tmp}.cmd"
10906        fi
10907        # Convert to C:/ mixed style path without spaces.
10908         tmp=`$CYGPATH -s -m "$tmp"`
10909    fi
10910    car="$tmp"
10911
10912    else
10913        # "which" is not portable, but is used here
10914        # because we know that the command exists!
10915        car=`which $car`
10916    fi
10917    if test "x$cdr" != xEOL; then
10918        BUILD_LD="$car ${cdr% *}"
10919    else
10920        BUILD_LD="$car"
10921    fi
10922
10923fi
10924
10925
10926
10927
10928# If a devkit is found on the builddeps server, then prepend its path to the
10929# PATH variable. If there are cross compilers available in the devkit, these
10930# will be found by AC_PROG_CC et al.
10931DEVKIT=
10932
10933
10934    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10935        # Source the builddeps file again, to make sure it uses the latest variables!
10936        . $builddepsfile
10937        # Look for a target and build machine specific resource!
10938        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10939        if test "x$resource" = x; then
10940            # Ok, lets instead look for a target specific resource
10941            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
10942        fi
10943        if test "x$resource" = x; then
10944            # Ok, lets instead look for a build specific resource
10945            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
10946        fi
10947        if test "x$resource" = x; then
10948            # Ok, lets instead look for a generic resource
10949            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
10950            resource=${builddep_devkit}
10951        fi
10952        if test "x$resource" != x; then
10953            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
10954$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
10955	    # If the resource in the builddeps.conf file is an existing directory,
10956	    # for example /java/linux/cups
10957	    if test -d ${resource}; then
10958	       depdir=${resource}
10959	    else
10960
10961# devkit is for example mymodule
10962# $resource is for example libs/general/libmymod_1_2_3.zip
10963# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10964# $with_builddeps_dir is for example /localhome/builddeps
10965# depdir is the name of the variable into which we store the depdir, eg MYMOD
10966# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10967# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10968    filename=`basename $resource`
10969    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10970    filebase=${filename%%.*}
10971    extension=${filename#*.}
10972    installdir=$with_builddeps_dir/$filebase
10973    if test ! -f $installdir/$filename.unpacked; then
10974        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
10975$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10976        if test ! -d $installdir; then
10977            mkdir -p $installdir
10978        fi
10979        if test ! -d $installdir; then
10980            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
10981        fi
10982        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
10983        touch $tmpfile
10984        if test ! -f $tmpfile; then
10985            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
10986        fi
10987
10988    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10989    # $tmpfile is the local file name for the downloaded file.
10990    VALID_TOOL=no
10991    if test "x$BDEPS_FTP" = xwget; then
10992       VALID_TOOL=yes
10993       wget -O $tmpfile $with_builddeps_server/$resource
10994    fi
10995    if test "x$BDEPS_FTP" = xlftp; then
10996       VALID_TOOL=yes
10997       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10998    fi
10999    if test "x$BDEPS_FTP" = xftp; then
11000        VALID_TOOL=yes
11001        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11002        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11003        FTPUSERPWD=${FTPSERVER%%@*}
11004        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11005            FTPUSER=${userpwd%%:*}
11006            FTPPWD=${userpwd#*@}
11007            FTPSERVER=${FTPSERVER#*@}
11008        else
11009            FTPUSER=ftp
11010            FTPPWD=ftp
11011        fi
11012        # the "pass" command does not work on some
11013        # ftp clients (read ftp.exe) but if it works,
11014        # passive mode is better!
11015        (\
11016            echo "user $FTPUSER $FTPPWD"        ;\
11017            echo "pass"                         ;\
11018            echo "bin"                          ;\
11019            echo "get $FTPPATH $tmpfile"              ;\
11020        ) | ftp -in $FTPSERVER
11021    fi
11022    if test "x$VALID_TOOL" != xyes; then
11023       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11024    fi
11025
11026        mv $tmpfile $installdir/$filename
11027        if test ! -s $installdir/$filename; then
11028            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11029        fi
11030        case "$extension" in
11031            zip)  echo "Unzipping $installdir/$filename..."
11032               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11033            ;;
11034            tar.gz) echo "Untaring $installdir/$filename..."
11035               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11036            ;;
11037            tgz) echo "Untaring $installdir/$filename..."
11038               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11039            ;;
11040            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11041            ;;
11042        esac
11043    fi
11044    if test -f $installdir/$filename.unpacked; then
11045        depdir=$installdir
11046    fi
11047
11048	    fi
11049            # Source the builddeps file again, because in the previous command, the depdir
11050            # was updated to point at the current build dependency install directory.
11051            . $builddepsfile
11052            # Now extract variables from the builddeps.conf files.
11053            theroot=${builddep_devkit_ROOT}
11054            thecflags=${builddep_devkit_CFLAGS}
11055            thelibs=${builddep_devkit_LIBS}
11056            if test "x$depdir" = x; then
11057                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
11058            fi
11059            DEVKIT=$depdir
11060            if test "x$theroot" != x; then
11061               DEVKIT="$theroot"
11062            fi
11063            if test "x$thecflags" != x; then
11064               DEVKIT_CFLAGS="$thecflags"
11065            fi
11066            if test "x$thelibs" != x; then
11067               DEVKIT_LIBS="$thelibs"
11068            fi
11069            # Found devkit
11070                     PATH="$DEVKIT/bin:$PATH"
11071                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
11072                     if test "x$x_includes" = "xNONE"; then
11073                         x_includes="$SYS_ROOT/usr/include/X11"
11074                     fi
11075                     if test "x$x_libraries" = "xNONE"; then
11076                         x_libraries="$SYS_ROOT/usr/lib"
11077                     fi
11078
11079
11080        fi
11081
11082    fi
11083
11084
11085if test "x$SYS_ROOT" != "x/" ; then
11086    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
11087    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
11088    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
11089    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
11090    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
11091    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
11092fi
11093
11094# Store the CFLAGS etal passed to the configure script.
11095ORG_CFLAGS="$CFLAGS"
11096ORG_CXXFLAGS="$CXXFLAGS"
11097ORG_OBJCFLAGS="$OBJCFLAGS"
11098
11099# autoconf magic only relies on PATH, so update it if tools dir is specified
11100OLD_PATH="$PATH"
11101if test "x$TOOLS_DIR" != x; then
11102  PATH=$TOOLS_DIR:$PATH
11103fi
11104
11105# gcc is almost always present, but on Windows we
11106# prefer cl.exe and on Solaris we prefer CC.
11107# Thus test for them in this order.
11108ac_ext=c
11109ac_cpp='$CPP $CPPFLAGS'
11110ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11111ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11112ac_compiler_gnu=$ac_cv_c_compiler_gnu
11113if test -n "$ac_tool_prefix"; then
11114  for ac_prog in cl cc gcc
11115  do
11116    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11117set dummy $ac_tool_prefix$ac_prog; ac_word=$2
11118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11119$as_echo_n "checking for $ac_word... " >&6; }
11120if test "${ac_cv_prog_CC+set}" = set; then :
11121  $as_echo_n "(cached) " >&6
11122else
11123  if test -n "$CC"; then
11124  ac_cv_prog_CC="$CC" # Let the user override the test.
11125else
11126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11127for as_dir in $PATH
11128do
11129  IFS=$as_save_IFS
11130  test -z "$as_dir" && as_dir=.
11131    for ac_exec_ext in '' $ac_executable_extensions; do
11132  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11133    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
11134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11135    break 2
11136  fi
11137done
11138  done
11139IFS=$as_save_IFS
11140
11141fi
11142fi
11143CC=$ac_cv_prog_CC
11144if test -n "$CC"; then
11145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
11146$as_echo "$CC" >&6; }
11147else
11148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11149$as_echo "no" >&6; }
11150fi
11151
11152
11153    test -n "$CC" && break
11154  done
11155fi
11156if test -z "$CC"; then
11157  ac_ct_CC=$CC
11158  for ac_prog in cl cc gcc
11159do
11160  # Extract the first word of "$ac_prog", so it can be a program name with args.
11161set dummy $ac_prog; ac_word=$2
11162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11163$as_echo_n "checking for $ac_word... " >&6; }
11164if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
11165  $as_echo_n "(cached) " >&6
11166else
11167  if test -n "$ac_ct_CC"; then
11168  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
11169else
11170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11171for as_dir in $PATH
11172do
11173  IFS=$as_save_IFS
11174  test -z "$as_dir" && as_dir=.
11175    for ac_exec_ext in '' $ac_executable_extensions; do
11176  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11177    ac_cv_prog_ac_ct_CC="$ac_prog"
11178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11179    break 2
11180  fi
11181done
11182  done
11183IFS=$as_save_IFS
11184
11185fi
11186fi
11187ac_ct_CC=$ac_cv_prog_ac_ct_CC
11188if test -n "$ac_ct_CC"; then
11189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
11190$as_echo "$ac_ct_CC" >&6; }
11191else
11192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11193$as_echo "no" >&6; }
11194fi
11195
11196
11197  test -n "$ac_ct_CC" && break
11198done
11199
11200  if test "x$ac_ct_CC" = x; then
11201    CC=""
11202  else
11203    case $cross_compiling:$ac_tool_warned in
11204yes:)
11205{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11206$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11207ac_tool_warned=yes ;;
11208esac
11209    CC=$ac_ct_CC
11210  fi
11211fi
11212
11213
11214test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11215$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11216as_fn_error $? "no acceptable C compiler found in \$PATH
11217See \`config.log' for more details" "$LINENO" 5 ; }
11218
11219# Provide some information about the compiler.
11220$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
11221set X $ac_compile
11222ac_compiler=$2
11223for ac_option in --version -v -V -qversion; do
11224  { { ac_try="$ac_compiler $ac_option >&5"
11225case "(($ac_try" in
11226  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11227  *) ac_try_echo=$ac_try;;
11228esac
11229eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
11230$as_echo "$ac_try_echo"; } >&5
11231  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
11232  ac_status=$?
11233  if test -s conftest.err; then
11234    sed '10a\
11235... rest of stderr output deleted ...
11236         10q' conftest.err >conftest.er1
11237    cat conftest.er1 >&5
11238  fi
11239  rm -f conftest.er1 conftest.err
11240  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11241  test $ac_status = 0; }
11242done
11243
11244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11245/* end confdefs.h.  */
11246
11247int
11248main ()
11249{
11250
11251  ;
11252  return 0;
11253}
11254_ACEOF
11255ac_clean_files_save=$ac_clean_files
11256ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
11257# Try to create an executable without -o first, disregard a.out.
11258# It will help us diagnose broken compilers, and finding out an intuition
11259# of exeext.
11260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
11261$as_echo_n "checking whether the C compiler works... " >&6; }
11262ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
11263
11264# The possible output files:
11265ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
11266
11267ac_rmfiles=
11268for ac_file in $ac_files
11269do
11270  case $ac_file in
11271    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
11272    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
11273  esac
11274done
11275rm -f $ac_rmfiles
11276
11277if { { ac_try="$ac_link_default"
11278case "(($ac_try" in
11279  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11280  *) ac_try_echo=$ac_try;;
11281esac
11282eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
11283$as_echo "$ac_try_echo"; } >&5
11284  (eval "$ac_link_default") 2>&5
11285  ac_status=$?
11286  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11287  test $ac_status = 0; }; then :
11288  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
11289# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
11290# in a Makefile.  We should not override ac_cv_exeext if it was cached,
11291# so that the user can short-circuit this test for compilers unknown to
11292# Autoconf.
11293for ac_file in $ac_files ''
11294do
11295  test -f "$ac_file" || continue
11296  case $ac_file in
11297    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
11298	;;
11299    [ab].out )
11300	# We found the default executable, but exeext='' is most
11301	# certainly right.
11302	break;;
11303    *.* )
11304	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
11305	then :; else
11306	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
11307	fi
11308	# We set ac_cv_exeext here because the later test for it is not
11309	# safe: cross compilers may not add the suffix if given an `-o'
11310	# argument, so we may need to know it at that point already.
11311	# Even if this section looks crufty: it has the advantage of
11312	# actually working.
11313	break;;
11314    * )
11315	break;;
11316  esac
11317done
11318test "$ac_cv_exeext" = no && ac_cv_exeext=
11319
11320else
11321  ac_file=''
11322fi
11323if test -z "$ac_file"; then :
11324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11325$as_echo "no" >&6; }
11326$as_echo "$as_me: failed program was:" >&5
11327sed 's/^/| /' conftest.$ac_ext >&5
11328
11329{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11330$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11331as_fn_error 77 "C compiler cannot create executables
11332See \`config.log' for more details" "$LINENO" 5 ; }
11333else
11334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11335$as_echo "yes" >&6; }
11336fi
11337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
11338$as_echo_n "checking for C compiler default output file name... " >&6; }
11339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
11340$as_echo "$ac_file" >&6; }
11341ac_exeext=$ac_cv_exeext
11342
11343rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
11344ac_clean_files=$ac_clean_files_save
11345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
11346$as_echo_n "checking for suffix of executables... " >&6; }
11347if { { ac_try="$ac_link"
11348case "(($ac_try" in
11349  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11350  *) ac_try_echo=$ac_try;;
11351esac
11352eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
11353$as_echo "$ac_try_echo"; } >&5
11354  (eval "$ac_link") 2>&5
11355  ac_status=$?
11356  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11357  test $ac_status = 0; }; then :
11358  # If both `conftest.exe' and `conftest' are `present' (well, observable)
11359# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
11360# work properly (i.e., refer to `conftest.exe'), while it won't with
11361# `rm'.
11362for ac_file in conftest.exe conftest conftest.*; do
11363  test -f "$ac_file" || continue
11364  case $ac_file in
11365    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
11366    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
11367	  break;;
11368    * ) break;;
11369  esac
11370done
11371else
11372  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11373$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11374as_fn_error $? "cannot compute suffix of executables: cannot compile and link
11375See \`config.log' for more details" "$LINENO" 5 ; }
11376fi
11377rm -f conftest conftest$ac_cv_exeext
11378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
11379$as_echo "$ac_cv_exeext" >&6; }
11380
11381rm -f conftest.$ac_ext
11382EXEEXT=$ac_cv_exeext
11383ac_exeext=$EXEEXT
11384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11385/* end confdefs.h.  */
11386#include <stdio.h>
11387int
11388main ()
11389{
11390FILE *f = fopen ("conftest.out", "w");
11391 return ferror (f) || fclose (f) != 0;
11392
11393  ;
11394  return 0;
11395}
11396_ACEOF
11397ac_clean_files="$ac_clean_files conftest.out"
11398# Check that the compiler produces executables we can run.  If not, either
11399# the compiler is broken, or we cross compile.
11400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
11401$as_echo_n "checking whether we are cross compiling... " >&6; }
11402if test "$cross_compiling" != yes; then
11403  { { ac_try="$ac_link"
11404case "(($ac_try" in
11405  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11406  *) ac_try_echo=$ac_try;;
11407esac
11408eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
11409$as_echo "$ac_try_echo"; } >&5
11410  (eval "$ac_link") 2>&5
11411  ac_status=$?
11412  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11413  test $ac_status = 0; }
11414  if { ac_try='./conftest$ac_cv_exeext'
11415  { { case "(($ac_try" in
11416  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11417  *) ac_try_echo=$ac_try;;
11418esac
11419eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
11420$as_echo "$ac_try_echo"; } >&5
11421  (eval "$ac_try") 2>&5
11422  ac_status=$?
11423  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11424  test $ac_status = 0; }; }; then
11425    cross_compiling=no
11426  else
11427    if test "$cross_compiling" = maybe; then
11428	cross_compiling=yes
11429    else
11430	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11432as_fn_error $? "cannot run C compiled programs.
11433If you meant to cross compile, use \`--host'.
11434See \`config.log' for more details" "$LINENO" 5 ; }
11435    fi
11436  fi
11437fi
11438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
11439$as_echo "$cross_compiling" >&6; }
11440
11441rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
11442ac_clean_files=$ac_clean_files_save
11443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
11444$as_echo_n "checking for suffix of object files... " >&6; }
11445if test "${ac_cv_objext+set}" = set; then :
11446  $as_echo_n "(cached) " >&6
11447else
11448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11449/* end confdefs.h.  */
11450
11451int
11452main ()
11453{
11454
11455  ;
11456  return 0;
11457}
11458_ACEOF
11459rm -f conftest.o conftest.obj
11460if { { ac_try="$ac_compile"
11461case "(($ac_try" in
11462  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11463  *) ac_try_echo=$ac_try;;
11464esac
11465eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
11466$as_echo "$ac_try_echo"; } >&5
11467  (eval "$ac_compile") 2>&5
11468  ac_status=$?
11469  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11470  test $ac_status = 0; }; then :
11471  for ac_file in conftest.o conftest.obj conftest.*; do
11472  test -f "$ac_file" || continue;
11473  case $ac_file in
11474    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
11475    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
11476       break;;
11477  esac
11478done
11479else
11480  $as_echo "$as_me: failed program was:" >&5
11481sed 's/^/| /' conftest.$ac_ext >&5
11482
11483{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11484$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11485as_fn_error $? "cannot compute suffix of object files: cannot compile
11486See \`config.log' for more details" "$LINENO" 5 ; }
11487fi
11488rm -f conftest.$ac_cv_objext conftest.$ac_ext
11489fi
11490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
11491$as_echo "$ac_cv_objext" >&6; }
11492OBJEXT=$ac_cv_objext
11493ac_objext=$OBJEXT
11494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
11495$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
11496if test "${ac_cv_c_compiler_gnu+set}" = set; then :
11497  $as_echo_n "(cached) " >&6
11498else
11499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11500/* end confdefs.h.  */
11501
11502int
11503main ()
11504{
11505#ifndef __GNUC__
11506       choke me
11507#endif
11508
11509  ;
11510  return 0;
11511}
11512_ACEOF
11513if ac_fn_c_try_compile "$LINENO"; then :
11514  ac_compiler_gnu=yes
11515else
11516  ac_compiler_gnu=no
11517fi
11518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11519ac_cv_c_compiler_gnu=$ac_compiler_gnu
11520
11521fi
11522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
11523$as_echo "$ac_cv_c_compiler_gnu" >&6; }
11524if test $ac_compiler_gnu = yes; then
11525  GCC=yes
11526else
11527  GCC=
11528fi
11529ac_test_CFLAGS=${CFLAGS+set}
11530ac_save_CFLAGS=$CFLAGS
11531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
11532$as_echo_n "checking whether $CC accepts -g... " >&6; }
11533if test "${ac_cv_prog_cc_g+set}" = set; then :
11534  $as_echo_n "(cached) " >&6
11535else
11536  ac_save_c_werror_flag=$ac_c_werror_flag
11537   ac_c_werror_flag=yes
11538   ac_cv_prog_cc_g=no
11539   CFLAGS="-g"
11540   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11541/* end confdefs.h.  */
11542
11543int
11544main ()
11545{
11546
11547  ;
11548  return 0;
11549}
11550_ACEOF
11551if ac_fn_c_try_compile "$LINENO"; then :
11552  ac_cv_prog_cc_g=yes
11553else
11554  CFLAGS=""
11555      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11556/* end confdefs.h.  */
11557
11558int
11559main ()
11560{
11561
11562  ;
11563  return 0;
11564}
11565_ACEOF
11566if ac_fn_c_try_compile "$LINENO"; then :
11567
11568else
11569  ac_c_werror_flag=$ac_save_c_werror_flag
11570	 CFLAGS="-g"
11571	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11572/* end confdefs.h.  */
11573
11574int
11575main ()
11576{
11577
11578  ;
11579  return 0;
11580}
11581_ACEOF
11582if ac_fn_c_try_compile "$LINENO"; then :
11583  ac_cv_prog_cc_g=yes
11584fi
11585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11586fi
11587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11588fi
11589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11590   ac_c_werror_flag=$ac_save_c_werror_flag
11591fi
11592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
11593$as_echo "$ac_cv_prog_cc_g" >&6; }
11594if test "$ac_test_CFLAGS" = set; then
11595  CFLAGS=$ac_save_CFLAGS
11596elif test $ac_cv_prog_cc_g = yes; then
11597  if test "$GCC" = yes; then
11598    CFLAGS="-g -O2"
11599  else
11600    CFLAGS="-g"
11601  fi
11602else
11603  if test "$GCC" = yes; then
11604    CFLAGS="-O2"
11605  else
11606    CFLAGS=
11607  fi
11608fi
11609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
11610$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
11611if test "${ac_cv_prog_cc_c89+set}" = set; then :
11612  $as_echo_n "(cached) " >&6
11613else
11614  ac_cv_prog_cc_c89=no
11615ac_save_CC=$CC
11616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11617/* end confdefs.h.  */
11618#include <stdarg.h>
11619#include <stdio.h>
11620#include <sys/types.h>
11621#include <sys/stat.h>
11622/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11623struct buf { int x; };
11624FILE * (*rcsopen) (struct buf *, struct stat *, int);
11625static char *e (p, i)
11626     char **p;
11627     int i;
11628{
11629  return p[i];
11630}
11631static char *f (char * (*g) (char **, int), char **p, ...)
11632{
11633  char *s;
11634  va_list v;
11635  va_start (v,p);
11636  s = g (p, va_arg (v,int));
11637  va_end (v);
11638  return s;
11639}
11640
11641/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
11642   function prototypes and stuff, but not '\xHH' hex character constants.
11643   These don't provoke an error unfortunately, instead are silently treated
11644   as 'x'.  The following induces an error, until -std is added to get
11645   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
11646   array size at least.  It's necessary to write '\x00'==0 to get something
11647   that's true only with -std.  */
11648int osf4_cc_array ['\x00' == 0 ? 1 : -1];
11649
11650/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
11651   inside strings and character constants.  */
11652#define FOO(x) 'x'
11653int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
11654
11655int test (int i, double x);
11656struct s1 {int (*f) (int a);};
11657struct s2 {int (*f) (double a);};
11658int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11659int argc;
11660char **argv;
11661int
11662main ()
11663{
11664return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11665  ;
11666  return 0;
11667}
11668_ACEOF
11669for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
11670	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11671do
11672  CC="$ac_save_CC $ac_arg"
11673  if ac_fn_c_try_compile "$LINENO"; then :
11674  ac_cv_prog_cc_c89=$ac_arg
11675fi
11676rm -f core conftest.err conftest.$ac_objext
11677  test "x$ac_cv_prog_cc_c89" != "xno" && break
11678done
11679rm -f conftest.$ac_ext
11680CC=$ac_save_CC
11681
11682fi
11683# AC_CACHE_VAL
11684case "x$ac_cv_prog_cc_c89" in
11685  x)
11686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
11687$as_echo "none needed" >&6; } ;;
11688  xno)
11689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
11690$as_echo "unsupported" >&6; } ;;
11691  *)
11692    CC="$CC $ac_cv_prog_cc_c89"
11693    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
11694$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
11695esac
11696if test "x$ac_cv_prog_cc_c89" != xno; then :
11697
11698fi
11699
11700ac_ext=cpp
11701ac_cpp='$CXXCPP $CPPFLAGS'
11702ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11703ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11704ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11705
11706if test "x$CC" = x; then
11707
11708    # Print a helpful message on how to acquire the necessary build dependency.
11709    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
11710    MISSING_DEPENDENCY=devkit
11711    PKGHANDLER_COMMAND=
11712
11713    case $PKGHANDLER in
11714	apt-get)
11715                apt_help     $MISSING_DEPENDENCY ;;
11716    yum)
11717                yum_help     $MISSING_DEPENDENCY ;;
11718	port)
11719                port_help    $MISSING_DEPENDENCY ;;
11720	pkgutil)
11721                pkgutil_help $MISSING_DEPENDENCY ;;
11722	pkgadd)
11723                pkgadd_help  $MISSING_DEPENDENCY ;;
11724    * )
11725      break ;;
11726    esac
11727
11728    if test "x$PKGHANDLER_COMMAND" != x; then
11729        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
11730    fi
11731
11732    as_fn_error $? "Could not find a compiler. $HELP_MSG" "$LINENO" 5
11733fi
11734if test "x$CC" = xcc && test "x$OPENJDK_BUILD_OS" = xmacosx; then
11735    # Do not use cc on MacOSX use gcc instead.
11736    CC="gcc"
11737fi
11738
11739    # Translate "gcc -E" into "`which gcc` -E" ie
11740    # extract the full path to the binary and at the
11741    # same time maintain any arguments passed to it.
11742    # The command MUST exist in the path, or else!
11743    tmp="$CC"
11744    car="${tmp%% *}"
11745    tmp="$CC EOL"
11746    cdr="${tmp#* }"
11747    # On windows we want paths without spaces.
11748    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
11749
11750    # Translate long cygdrive or C:\sdfsf path
11751    # into a short mixed mode path that has no
11752    # spaces in it.
11753    tmp="$car"
11754
11755    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
11756        tmp=`$CYGPATH -u "$car"`
11757        tmp=`which "$tmp"`
11758        # If file exists with .exe appended, that's the real filename
11759        # and cygpath needs that to convert to short style path.
11760        if test -f "${tmp}.exe"; then
11761           tmp="${tmp}.exe"
11762        elif test -f "${tmp}.cmd"; then
11763           tmp="${tmp}.cmd"
11764        fi
11765        # Convert to C:/ mixed style path without spaces.
11766         tmp=`$CYGPATH -s -m "$tmp"`
11767    fi
11768    car="$tmp"
11769
11770    else
11771        # "which" is not portable, but is used here
11772        # because we know that the command exists!
11773        car=`which $car`
11774    fi
11775    if test "x$cdr" != xEOL; then
11776        CC="$car ${cdr% *}"
11777    else
11778        CC="$car"
11779    fi
11780
11781
11782ac_ext=cpp
11783ac_cpp='$CXXCPP $CPPFLAGS'
11784ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11785ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11786ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11787if test -z "$CXX"; then
11788  if test -n "$CCC"; then
11789    CXX=$CCC
11790  else
11791    if test -n "$ac_tool_prefix"; then
11792  for ac_prog in cl CC g++
11793  do
11794    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11795set dummy $ac_tool_prefix$ac_prog; ac_word=$2
11796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11797$as_echo_n "checking for $ac_word... " >&6; }
11798if test "${ac_cv_prog_CXX+set}" = set; then :
11799  $as_echo_n "(cached) " >&6
11800else
11801  if test -n "$CXX"; then
11802  ac_cv_prog_CXX="$CXX" # Let the user override the test.
11803else
11804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11805for as_dir in $PATH
11806do
11807  IFS=$as_save_IFS
11808  test -z "$as_dir" && as_dir=.
11809    for ac_exec_ext in '' $ac_executable_extensions; do
11810  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11811    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
11812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11813    break 2
11814  fi
11815done
11816  done
11817IFS=$as_save_IFS
11818
11819fi
11820fi
11821CXX=$ac_cv_prog_CXX
11822if test -n "$CXX"; then
11823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
11824$as_echo "$CXX" >&6; }
11825else
11826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11827$as_echo "no" >&6; }
11828fi
11829
11830
11831    test -n "$CXX" && break
11832  done
11833fi
11834if test -z "$CXX"; then
11835  ac_ct_CXX=$CXX
11836  for ac_prog in cl CC g++
11837do
11838  # Extract the first word of "$ac_prog", so it can be a program name with args.
11839set dummy $ac_prog; ac_word=$2
11840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11841$as_echo_n "checking for $ac_word... " >&6; }
11842if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
11843  $as_echo_n "(cached) " >&6
11844else
11845  if test -n "$ac_ct_CXX"; then
11846  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
11847else
11848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11849for as_dir in $PATH
11850do
11851  IFS=$as_save_IFS
11852  test -z "$as_dir" && as_dir=.
11853    for ac_exec_ext in '' $ac_executable_extensions; do
11854  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11855    ac_cv_prog_ac_ct_CXX="$ac_prog"
11856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11857    break 2
11858  fi
11859done
11860  done
11861IFS=$as_save_IFS
11862
11863fi
11864fi
11865ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
11866if test -n "$ac_ct_CXX"; then
11867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
11868$as_echo "$ac_ct_CXX" >&6; }
11869else
11870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11871$as_echo "no" >&6; }
11872fi
11873
11874
11875  test -n "$ac_ct_CXX" && break
11876done
11877
11878  if test "x$ac_ct_CXX" = x; then
11879    CXX="g++"
11880  else
11881    case $cross_compiling:$ac_tool_warned in
11882yes:)
11883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11885ac_tool_warned=yes ;;
11886esac
11887    CXX=$ac_ct_CXX
11888  fi
11889fi
11890
11891  fi
11892fi
11893# Provide some information about the compiler.
11894$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
11895set X $ac_compile
11896ac_compiler=$2
11897for ac_option in --version -v -V -qversion; do
11898  { { ac_try="$ac_compiler $ac_option >&5"
11899case "(($ac_try" in
11900  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11901  *) ac_try_echo=$ac_try;;
11902esac
11903eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
11904$as_echo "$ac_try_echo"; } >&5
11905  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
11906  ac_status=$?
11907  if test -s conftest.err; then
11908    sed '10a\
11909... rest of stderr output deleted ...
11910         10q' conftest.err >conftest.er1
11911    cat conftest.er1 >&5
11912  fi
11913  rm -f conftest.er1 conftest.err
11914  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11915  test $ac_status = 0; }
11916done
11917
11918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
11919$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
11920if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
11921  $as_echo_n "(cached) " >&6
11922else
11923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11924/* end confdefs.h.  */
11925
11926int
11927main ()
11928{
11929#ifndef __GNUC__
11930       choke me
11931#endif
11932
11933  ;
11934  return 0;
11935}
11936_ACEOF
11937if ac_fn_cxx_try_compile "$LINENO"; then :
11938  ac_compiler_gnu=yes
11939else
11940  ac_compiler_gnu=no
11941fi
11942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11943ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
11944
11945fi
11946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
11947$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
11948if test $ac_compiler_gnu = yes; then
11949  GXX=yes
11950else
11951  GXX=
11952fi
11953ac_test_CXXFLAGS=${CXXFLAGS+set}
11954ac_save_CXXFLAGS=$CXXFLAGS
11955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
11956$as_echo_n "checking whether $CXX accepts -g... " >&6; }
11957if test "${ac_cv_prog_cxx_g+set}" = set; then :
11958  $as_echo_n "(cached) " >&6
11959else
11960  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
11961   ac_cxx_werror_flag=yes
11962   ac_cv_prog_cxx_g=no
11963   CXXFLAGS="-g"
11964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11965/* end confdefs.h.  */
11966
11967int
11968main ()
11969{
11970
11971  ;
11972  return 0;
11973}
11974_ACEOF
11975if ac_fn_cxx_try_compile "$LINENO"; then :
11976  ac_cv_prog_cxx_g=yes
11977else
11978  CXXFLAGS=""
11979      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11980/* end confdefs.h.  */
11981
11982int
11983main ()
11984{
11985
11986  ;
11987  return 0;
11988}
11989_ACEOF
11990if ac_fn_cxx_try_compile "$LINENO"; then :
11991
11992else
11993  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
11994	 CXXFLAGS="-g"
11995	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11996/* end confdefs.h.  */
11997
11998int
11999main ()
12000{
12001
12002  ;
12003  return 0;
12004}
12005_ACEOF
12006if ac_fn_cxx_try_compile "$LINENO"; then :
12007  ac_cv_prog_cxx_g=yes
12008fi
12009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12010fi
12011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12012fi
12013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12014   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
12015fi
12016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
12017$as_echo "$ac_cv_prog_cxx_g" >&6; }
12018if test "$ac_test_CXXFLAGS" = set; then
12019  CXXFLAGS=$ac_save_CXXFLAGS
12020elif test $ac_cv_prog_cxx_g = yes; then
12021  if test "$GXX" = yes; then
12022    CXXFLAGS="-g -O2"
12023  else
12024    CXXFLAGS="-g"
12025  fi
12026else
12027  if test "$GXX" = yes; then
12028    CXXFLAGS="-O2"
12029  else
12030    CXXFLAGS=
12031  fi
12032fi
12033ac_ext=cpp
12034ac_cpp='$CXXCPP $CPPFLAGS'
12035ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12036ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12037ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12038
12039if test "x$CXX" = xCC && test "x$OPENJDK_BUILD_OS" = xmacosx; then
12040    # The found CC, even though it seems to be a g++ derivate, cannot compile
12041    # c++ code. Override.
12042    CXX="g++"
12043fi
12044
12045    # Translate "gcc -E" into "`which gcc` -E" ie
12046    # extract the full path to the binary and at the
12047    # same time maintain any arguments passed to it.
12048    # The command MUST exist in the path, or else!
12049    tmp="$CXX"
12050    car="${tmp%% *}"
12051    tmp="$CXX EOL"
12052    cdr="${tmp#* }"
12053    # On windows we want paths without spaces.
12054    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
12055
12056    # Translate long cygdrive or C:\sdfsf path
12057    # into a short mixed mode path that has no
12058    # spaces in it.
12059    tmp="$car"
12060
12061    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
12062        tmp=`$CYGPATH -u "$car"`
12063        tmp=`which "$tmp"`
12064        # If file exists with .exe appended, that's the real filename
12065        # and cygpath needs that to convert to short style path.
12066        if test -f "${tmp}.exe"; then
12067           tmp="${tmp}.exe"
12068        elif test -f "${tmp}.cmd"; then
12069           tmp="${tmp}.cmd"
12070        fi
12071        # Convert to C:/ mixed style path without spaces.
12072         tmp=`$CYGPATH -s -m "$tmp"`
12073    fi
12074    car="$tmp"
12075
12076    else
12077        # "which" is not portable, but is used here
12078        # because we know that the command exists!
12079        car=`which $car`
12080    fi
12081    if test "x$cdr" != xEOL; then
12082        CXX="$car ${cdr% *}"
12083    else
12084        CXX="$car"
12085    fi
12086
12087
12088if test "x$CXX" = x || test "x$CC" = x; then
12089
12090    # Print a helpful message on how to acquire the necessary build dependency.
12091    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
12092    MISSING_DEPENDENCY=devkit
12093    PKGHANDLER_COMMAND=
12094
12095    case $PKGHANDLER in
12096	apt-get)
12097                apt_help     $MISSING_DEPENDENCY ;;
12098    yum)
12099                yum_help     $MISSING_DEPENDENCY ;;
12100	port)
12101                port_help    $MISSING_DEPENDENCY ;;
12102	pkgutil)
12103                pkgutil_help $MISSING_DEPENDENCY ;;
12104	pkgadd)
12105                pkgadd_help  $MISSING_DEPENDENCY ;;
12106    * )
12107      break ;;
12108    esac
12109
12110    if test "x$PKGHANDLER_COMMAND" != x; then
12111        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
12112    fi
12113
12114    as_fn_error $? "Could not find the needed compilers! $HELP_MSG " "$LINENO" 5
12115fi
12116
12117if test "x$OPENJDK_BUILD_OS" != xwindows; then
12118    ac_ext=m
12119ac_cpp='$OBJCPP $CPPFLAGS'
12120ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12121ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12122ac_compiler_gnu=$ac_cv_objc_compiler_gnu
12123if test -n "$ac_tool_prefix"; then
12124  for ac_prog in gcc objcc objc cc CC
12125  do
12126    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12127set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12129$as_echo_n "checking for $ac_word... " >&6; }
12130if test "${ac_cv_prog_OBJC+set}" = set; then :
12131  $as_echo_n "(cached) " >&6
12132else
12133  if test -n "$OBJC"; then
12134  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
12135else
12136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12137for as_dir in $PATH
12138do
12139  IFS=$as_save_IFS
12140  test -z "$as_dir" && as_dir=.
12141    for ac_exec_ext in '' $ac_executable_extensions; do
12142  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12143    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
12144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12145    break 2
12146  fi
12147done
12148  done
12149IFS=$as_save_IFS
12150
12151fi
12152fi
12153OBJC=$ac_cv_prog_OBJC
12154if test -n "$OBJC"; then
12155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
12156$as_echo "$OBJC" >&6; }
12157else
12158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12159$as_echo "no" >&6; }
12160fi
12161
12162
12163    test -n "$OBJC" && break
12164  done
12165fi
12166if test -z "$OBJC"; then
12167  ac_ct_OBJC=$OBJC
12168  for ac_prog in gcc objcc objc cc CC
12169do
12170  # Extract the first word of "$ac_prog", so it can be a program name with args.
12171set dummy $ac_prog; ac_word=$2
12172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12173$as_echo_n "checking for $ac_word... " >&6; }
12174if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
12175  $as_echo_n "(cached) " >&6
12176else
12177  if test -n "$ac_ct_OBJC"; then
12178  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
12179else
12180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12181for as_dir in $PATH
12182do
12183  IFS=$as_save_IFS
12184  test -z "$as_dir" && as_dir=.
12185    for ac_exec_ext in '' $ac_executable_extensions; do
12186  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12187    ac_cv_prog_ac_ct_OBJC="$ac_prog"
12188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12189    break 2
12190  fi
12191done
12192  done
12193IFS=$as_save_IFS
12194
12195fi
12196fi
12197ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
12198if test -n "$ac_ct_OBJC"; then
12199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
12200$as_echo "$ac_ct_OBJC" >&6; }
12201else
12202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12203$as_echo "no" >&6; }
12204fi
12205
12206
12207  test -n "$ac_ct_OBJC" && break
12208done
12209
12210  if test "x$ac_ct_OBJC" = x; then
12211    OBJC="gcc"
12212  else
12213    case $cross_compiling:$ac_tool_warned in
12214yes:)
12215{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12216$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12217ac_tool_warned=yes ;;
12218esac
12219    OBJC=$ac_ct_OBJC
12220  fi
12221fi
12222
12223# Provide some information about the compiler.
12224$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
12225set X $ac_compile
12226ac_compiler=$2
12227for ac_option in --version -v -V -qversion; do
12228  { { ac_try="$ac_compiler $ac_option >&5"
12229case "(($ac_try" in
12230  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12231  *) ac_try_echo=$ac_try;;
12232esac
12233eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
12234$as_echo "$ac_try_echo"; } >&5
12235  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
12236  ac_status=$?
12237  if test -s conftest.err; then
12238    sed '10a\
12239... rest of stderr output deleted ...
12240         10q' conftest.err >conftest.er1
12241    cat conftest.er1 >&5
12242  fi
12243  rm -f conftest.er1 conftest.err
12244  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12245  test $ac_status = 0; }
12246done
12247
12248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
12249$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
12250if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
12251  $as_echo_n "(cached) " >&6
12252else
12253  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12254/* end confdefs.h.  */
12255
12256int
12257main ()
12258{
12259#ifndef __GNUC__
12260       choke me
12261#endif
12262
12263  ;
12264  return 0;
12265}
12266_ACEOF
12267if ac_fn_objc_try_compile "$LINENO"; then :
12268  ac_compiler_gnu=yes
12269else
12270  ac_compiler_gnu=no
12271fi
12272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12273ac_cv_objc_compiler_gnu=$ac_compiler_gnu
12274
12275fi
12276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
12277$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
12278if test $ac_compiler_gnu = yes; then
12279  GOBJC=yes
12280else
12281  GOBJC=
12282fi
12283ac_test_OBJCFLAGS=${OBJCFLAGS+set}
12284ac_save_OBJCFLAGS=$OBJCFLAGS
12285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
12286$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
12287if test "${ac_cv_prog_objc_g+set}" = set; then :
12288  $as_echo_n "(cached) " >&6
12289else
12290  ac_save_objc_werror_flag=$ac_objc_werror_flag
12291   ac_objc_werror_flag=yes
12292   ac_cv_prog_objc_g=no
12293   OBJCFLAGS="-g"
12294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12295/* end confdefs.h.  */
12296
12297int
12298main ()
12299{
12300
12301  ;
12302  return 0;
12303}
12304_ACEOF
12305if ac_fn_objc_try_compile "$LINENO"; then :
12306  ac_cv_prog_objc_g=yes
12307else
12308  OBJCFLAGS=""
12309      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12310/* end confdefs.h.  */
12311
12312int
12313main ()
12314{
12315
12316  ;
12317  return 0;
12318}
12319_ACEOF
12320if ac_fn_objc_try_compile "$LINENO"; then :
12321
12322else
12323  ac_objc_werror_flag=$ac_save_objc_werror_flag
12324	 OBJCFLAGS="-g"
12325	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12326/* end confdefs.h.  */
12327
12328int
12329main ()
12330{
12331
12332  ;
12333  return 0;
12334}
12335_ACEOF
12336if ac_fn_objc_try_compile "$LINENO"; then :
12337  ac_cv_prog_objc_g=yes
12338fi
12339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12340fi
12341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12342fi
12343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12344   ac_objc_werror_flag=$ac_save_objc_werror_flag
12345fi
12346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
12347$as_echo "$ac_cv_prog_objc_g" >&6; }
12348if test "$ac_test_OBJCFLAGS" = set; then
12349  OBJCFLAGS=$ac_save_OBJCFLAGS
12350elif test $ac_cv_prog_objc_g = yes; then
12351  if test "$GOBJC" = yes; then
12352    OBJCFLAGS="-g -O2"
12353  else
12354    OBJCFLAGS="-g"
12355  fi
12356else
12357  if test "$GOBJC" = yes; then
12358    OBJCFLAGS="-O2"
12359  else
12360    OBJCFLAGS=
12361  fi
12362fi
12363ac_ext=cpp
12364ac_cpp='$CXXCPP $CPPFLAGS'
12365ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12366ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12367ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12368
12369
12370    # Translate "gcc -E" into "`which gcc` -E" ie
12371    # extract the full path to the binary and at the
12372    # same time maintain any arguments passed to it.
12373    # The command MUST exist in the path, or else!
12374    tmp="$OBJC"
12375    car="${tmp%% *}"
12376    tmp="$OBJC EOL"
12377    cdr="${tmp#* }"
12378    # On windows we want paths without spaces.
12379    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
12380
12381    # Translate long cygdrive or C:\sdfsf path
12382    # into a short mixed mode path that has no
12383    # spaces in it.
12384    tmp="$car"
12385
12386    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
12387        tmp=`$CYGPATH -u "$car"`
12388        tmp=`which "$tmp"`
12389        # If file exists with .exe appended, that's the real filename
12390        # and cygpath needs that to convert to short style path.
12391        if test -f "${tmp}.exe"; then
12392           tmp="${tmp}.exe"
12393        elif test -f "${tmp}.cmd"; then
12394           tmp="${tmp}.cmd"
12395        fi
12396        # Convert to C:/ mixed style path without spaces.
12397         tmp=`$CYGPATH -s -m "$tmp"`
12398    fi
12399    car="$tmp"
12400
12401    else
12402        # "which" is not portable, but is used here
12403        # because we know that the command exists!
12404        car=`which $car`
12405    fi
12406    if test "x$cdr" != xEOL; then
12407        OBJC="$car ${cdr% *}"
12408    else
12409        OBJC="$car"
12410    fi
12411
12412else
12413    OBJC=
12414fi
12415
12416# Restore the flags to the user specified values.
12417# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
12418CFLAGS="$ORG_CFLAGS"
12419CXXFLAGS="$ORG_CXXFLAGS"
12420OBJCFLAGS="$ORG_OBJCFLAGS"
12421
12422LD="$CC"
12423LDEXE="$CC"
12424LDCXX="$CXX"
12425LDEXECXX="$CXX"
12426
12427# LDEXE is the linker to use, when creating executables.
12428
12429# Linking C++ libraries.
12430
12431# Linking C++ executables.
12432
12433
12434if test "x$OPENJDK_BUILD_OS" != xwindows; then
12435    if test -n "$ac_tool_prefix"; then
12436  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
12437set dummy ${ac_tool_prefix}ar; ac_word=$2
12438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12439$as_echo_n "checking for $ac_word... " >&6; }
12440if test "${ac_cv_prog_AR+set}" = set; then :
12441  $as_echo_n "(cached) " >&6
12442else
12443  if test -n "$AR"; then
12444  ac_cv_prog_AR="$AR" # Let the user override the test.
12445else
12446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12447for as_dir in $PATH
12448do
12449  IFS=$as_save_IFS
12450  test -z "$as_dir" && as_dir=.
12451    for ac_exec_ext in '' $ac_executable_extensions; do
12452  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12453    ac_cv_prog_AR="${ac_tool_prefix}ar"
12454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12455    break 2
12456  fi
12457done
12458  done
12459IFS=$as_save_IFS
12460
12461fi
12462fi
12463AR=$ac_cv_prog_AR
12464if test -n "$AR"; then
12465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
12466$as_echo "$AR" >&6; }
12467else
12468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12469$as_echo "no" >&6; }
12470fi
12471
12472
12473fi
12474if test -z "$ac_cv_prog_AR"; then
12475  ac_ct_AR=$AR
12476  # Extract the first word of "ar", so it can be a program name with args.
12477set dummy ar; ac_word=$2
12478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12479$as_echo_n "checking for $ac_word... " >&6; }
12480if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
12481  $as_echo_n "(cached) " >&6
12482else
12483  if test -n "$ac_ct_AR"; then
12484  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
12485else
12486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12487for as_dir in $PATH
12488do
12489  IFS=$as_save_IFS
12490  test -z "$as_dir" && as_dir=.
12491    for ac_exec_ext in '' $ac_executable_extensions; do
12492  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12493    ac_cv_prog_ac_ct_AR="ar"
12494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12495    break 2
12496  fi
12497done
12498  done
12499IFS=$as_save_IFS
12500
12501fi
12502fi
12503ac_ct_AR=$ac_cv_prog_ac_ct_AR
12504if test -n "$ac_ct_AR"; then
12505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
12506$as_echo "$ac_ct_AR" >&6; }
12507else
12508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12509$as_echo "no" >&6; }
12510fi
12511
12512  if test "x$ac_ct_AR" = x; then
12513    AR=""
12514  else
12515    case $cross_compiling:$ac_tool_warned in
12516yes:)
12517{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12518$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12519ac_tool_warned=yes ;;
12520esac
12521    AR=$ac_ct_AR
12522  fi
12523else
12524  AR="$ac_cv_prog_AR"
12525fi
12526
12527
12528    # Translate "gcc -E" into "`which gcc` -E" ie
12529    # extract the full path to the binary and at the
12530    # same time maintain any arguments passed to it.
12531    # The command MUST exist in the path, or else!
12532    tmp="$AR"
12533    car="${tmp%% *}"
12534    tmp="$AR EOL"
12535    cdr="${tmp#* }"
12536    # On windows we want paths without spaces.
12537    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
12538
12539    # Translate long cygdrive or C:\sdfsf path
12540    # into a short mixed mode path that has no
12541    # spaces in it.
12542    tmp="$car"
12543
12544    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
12545        tmp=`$CYGPATH -u "$car"`
12546        tmp=`which "$tmp"`
12547        # If file exists with .exe appended, that's the real filename
12548        # and cygpath needs that to convert to short style path.
12549        if test -f "${tmp}.exe"; then
12550           tmp="${tmp}.exe"
12551        elif test -f "${tmp}.cmd"; then
12552           tmp="${tmp}.cmd"
12553        fi
12554        # Convert to C:/ mixed style path without spaces.
12555         tmp=`$CYGPATH -s -m "$tmp"`
12556    fi
12557    car="$tmp"
12558
12559    else
12560        # "which" is not portable, but is used here
12561        # because we know that the command exists!
12562        car=`which $car`
12563    fi
12564    if test "x$cdr" != xEOL; then
12565        AR="$car ${cdr% *}"
12566    else
12567        AR="$car"
12568    fi
12569
12570fi
12571if test "x$OPENJDK_BUILD_OS" = xmacosx; then
12572    ARFLAGS="-r"
12573else
12574    ARFLAGS=""
12575fi
12576
12577
12578COMPILER_NAME=gcc
12579COMPILER_TYPE=CC
12580if test "x$OPENJDK_BUILD_OS" = xwindows; then :
12581
12582    # For now, assume that we are always compiling using cl.exe.
12583    CC_OUT_OPTION=-Fo
12584    EXE_OUT_OPTION=-out:
12585    LD_OUT_OPTION=-out:
12586    AR_OUT_OPTION=-out:
12587    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
12588    # program for something completely different.
12589    # Extract the first word of "link", so it can be a program name with args.
12590set dummy link; ac_word=$2
12591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12592$as_echo_n "checking for $ac_word... " >&6; }
12593if test "${ac_cv_prog_WINLD+set}" = set; then :
12594  $as_echo_n "(cached) " >&6
12595else
12596  if test -n "$WINLD"; then
12597  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
12598else
12599  ac_prog_rejected=no
12600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12601for as_dir in $PATH
12602do
12603  IFS=$as_save_IFS
12604  test -z "$as_dir" && as_dir=.
12605    for ac_exec_ext in '' $ac_executable_extensions; do
12606  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12607    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
12608       ac_prog_rejected=yes
12609       continue
12610     fi
12611    ac_cv_prog_WINLD="link"
12612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12613    break 2
12614  fi
12615done
12616  done
12617IFS=$as_save_IFS
12618
12619if test $ac_prog_rejected = yes; then
12620  # We found a bogon in the path, so make sure we never use it.
12621  set dummy $ac_cv_prog_WINLD
12622  shift
12623  if test $# != 0; then
12624    # We chose a different compiler from the bogus one.
12625    # However, it has the same basename, so the bogon will be chosen
12626    # first if we set WINLD to just the basename; use the full file name.
12627    shift
12628    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
12629  fi
12630fi
12631fi
12632fi
12633WINLD=$ac_cv_prog_WINLD
12634if test -n "$WINLD"; then
12635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
12636$as_echo "$WINLD" >&6; }
12637else
12638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12639$as_echo "no" >&6; }
12640fi
12641
12642
12643    # Since we must ignore the first found link, WINLD will contain
12644    # the full path to the link.exe program.
12645
12646    # Translate long cygdrive or C:\sdfsf path
12647    # into a short mixed mode path that has no
12648    # spaces in it.
12649    tmp="$WINLD"
12650
12651    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
12652        tmp=`$CYGPATH -u "$WINLD"`
12653        tmp=`which "$tmp"`
12654        # If file exists with .exe appended, that's the real filename
12655        # and cygpath needs that to convert to short style path.
12656        if test -f "${tmp}.exe"; then
12657           tmp="${tmp}.exe"
12658        elif test -f "${tmp}.cmd"; then
12659           tmp="${tmp}.cmd"
12660        fi
12661        # Convert to C:/ mixed style path without spaces.
12662         tmp=`$CYGPATH -s -m "$tmp"`
12663    fi
12664    WINLD="$tmp"
12665
12666    printf "Windows linker was found at $WINLD\n"
12667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
12668$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
12669    "$WINLD" --version > /dev/null
12670    if test $? -eq 0 ; then
12671      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12672$as_echo "no" >&6; }
12673      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
12674    else
12675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12676$as_echo "yes" >&6; }
12677    fi
12678    LD="$WINLD"
12679    LDEXE="$WINLD"
12680    LDCXX="$WINLD"
12681    LDEXECXX="$WINLD"
12682
12683    # Extract the first word of "mt", so it can be a program name with args.
12684set dummy mt; ac_word=$2
12685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12686$as_echo_n "checking for $ac_word... " >&6; }
12687if test "${ac_cv_prog_MT+set}" = set; then :
12688  $as_echo_n "(cached) " >&6
12689else
12690  if test -n "$MT"; then
12691  ac_cv_prog_MT="$MT" # Let the user override the test.
12692else
12693  ac_prog_rejected=no
12694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12695for as_dir in $PATH
12696do
12697  IFS=$as_save_IFS
12698  test -z "$as_dir" && as_dir=.
12699    for ac_exec_ext in '' $ac_executable_extensions; do
12700  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12701    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
12702       ac_prog_rejected=yes
12703       continue
12704     fi
12705    ac_cv_prog_MT="mt"
12706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12707    break 2
12708  fi
12709done
12710  done
12711IFS=$as_save_IFS
12712
12713if test $ac_prog_rejected = yes; then
12714  # We found a bogon in the path, so make sure we never use it.
12715  set dummy $ac_cv_prog_MT
12716  shift
12717  if test $# != 0; then
12718    # We chose a different compiler from the bogus one.
12719    # However, it has the same basename, so the bogon will be chosen
12720    # first if we set MT to just the basename; use the full file name.
12721    shift
12722    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
12723  fi
12724fi
12725fi
12726fi
12727MT=$ac_cv_prog_MT
12728if test -n "$MT"; then
12729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
12730$as_echo "$MT" >&6; }
12731else
12732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12733$as_echo "no" >&6; }
12734fi
12735
12736
12737
12738    # Translate long cygdrive or C:\sdfsf path
12739    # into a short mixed mode path that has no
12740    # spaces in it.
12741    tmp="$MT"
12742
12743    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
12744        tmp=`$CYGPATH -u "$MT"`
12745        tmp=`which "$tmp"`
12746        # If file exists with .exe appended, that's the real filename
12747        # and cygpath needs that to convert to short style path.
12748        if test -f "${tmp}.exe"; then
12749           tmp="${tmp}.exe"
12750        elif test -f "${tmp}.cmd"; then
12751           tmp="${tmp}.cmd"
12752        fi
12753        # Convert to C:/ mixed style path without spaces.
12754         tmp=`$CYGPATH -s -m "$tmp"`
12755    fi
12756    MT="$tmp"
12757
12758    # The resource compiler
12759    # Extract the first word of "rc", so it can be a program name with args.
12760set dummy rc; ac_word=$2
12761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12762$as_echo_n "checking for $ac_word... " >&6; }
12763if test "${ac_cv_prog_RC+set}" = set; then :
12764  $as_echo_n "(cached) " >&6
12765else
12766  if test -n "$RC"; then
12767  ac_cv_prog_RC="$RC" # Let the user override the test.
12768else
12769  ac_prog_rejected=no
12770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12771for as_dir in $PATH
12772do
12773  IFS=$as_save_IFS
12774  test -z "$as_dir" && as_dir=.
12775    for ac_exec_ext in '' $ac_executable_extensions; do
12776  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12777    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
12778       ac_prog_rejected=yes
12779       continue
12780     fi
12781    ac_cv_prog_RC="rc"
12782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12783    break 2
12784  fi
12785done
12786  done
12787IFS=$as_save_IFS
12788
12789if test $ac_prog_rejected = yes; then
12790  # We found a bogon in the path, so make sure we never use it.
12791  set dummy $ac_cv_prog_RC
12792  shift
12793  if test $# != 0; then
12794    # We chose a different compiler from the bogus one.
12795    # However, it has the same basename, so the bogon will be chosen
12796    # first if we set RC to just the basename; use the full file name.
12797    shift
12798    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
12799  fi
12800fi
12801fi
12802fi
12803RC=$ac_cv_prog_RC
12804if test -n "$RC"; then
12805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
12806$as_echo "$RC" >&6; }
12807else
12808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12809$as_echo "no" >&6; }
12810fi
12811
12812
12813
12814    # Translate long cygdrive or C:\sdfsf path
12815    # into a short mixed mode path that has no
12816    # spaces in it.
12817    tmp="$RC"
12818
12819    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
12820        tmp=`$CYGPATH -u "$RC"`
12821        tmp=`which "$tmp"`
12822        # If file exists with .exe appended, that's the real filename
12823        # and cygpath needs that to convert to short style path.
12824        if test -f "${tmp}.exe"; then
12825           tmp="${tmp}.exe"
12826        elif test -f "${tmp}.cmd"; then
12827           tmp="${tmp}.cmd"
12828        fi
12829        # Convert to C:/ mixed style path without spaces.
12830         tmp=`$CYGPATH -s -m "$tmp"`
12831    fi
12832    RC="$tmp"
12833
12834
12835    RC_FLAGS="-nologo /l 0x409 /r"
12836    if test "x$VARIANT" = xOPT; then :
12837
12838        RC_FLAGS="$RC_FLAGS -d NDEBUG"
12839
12840fi
12841    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
12842    if test "x$JDK_UPDATE_VERSION" = x; then :
12843
12844        JDK_UPDATE_VERSION_NOTNULL=0
12845
12846fi
12847    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
12848    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
12849    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
12850    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
12851    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
12852    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
12853    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
12854
12855    # lib.exe is used to create static libraries.
12856    # Extract the first word of "lib", so it can be a program name with args.
12857set dummy lib; ac_word=$2
12858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12859$as_echo_n "checking for $ac_word... " >&6; }
12860if test "${ac_cv_prog_WINAR+set}" = set; then :
12861  $as_echo_n "(cached) " >&6
12862else
12863  if test -n "$WINAR"; then
12864  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
12865else
12866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12867for as_dir in $PATH
12868do
12869  IFS=$as_save_IFS
12870  test -z "$as_dir" && as_dir=.
12871    for ac_exec_ext in '' $ac_executable_extensions; do
12872  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12873    ac_cv_prog_WINAR="lib"
12874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12875    break 2
12876  fi
12877done
12878  done
12879IFS=$as_save_IFS
12880
12881fi
12882fi
12883WINAR=$ac_cv_prog_WINAR
12884if test -n "$WINAR"; then
12885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
12886$as_echo "$WINAR" >&6; }
12887else
12888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12889$as_echo "no" >&6; }
12890fi
12891
12892
12893
12894    # Translate long cygdrive or C:\sdfsf path
12895    # into a short mixed mode path that has no
12896    # spaces in it.
12897    tmp="$WINAR"
12898
12899    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
12900        tmp=`$CYGPATH -u "$WINAR"`
12901        tmp=`which "$tmp"`
12902        # If file exists with .exe appended, that's the real filename
12903        # and cygpath needs that to convert to short style path.
12904        if test -f "${tmp}.exe"; then
12905           tmp="${tmp}.exe"
12906        elif test -f "${tmp}.cmd"; then
12907           tmp="${tmp}.cmd"
12908        fi
12909        # Convert to C:/ mixed style path without spaces.
12910         tmp=`$CYGPATH -s -m "$tmp"`
12911    fi
12912    WINAR="$tmp"
12913
12914    AR="$WINAR"
12915    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
12916
12917    # Extract the first word of "dumpbin", so it can be a program name with args.
12918set dummy dumpbin; ac_word=$2
12919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12920$as_echo_n "checking for $ac_word... " >&6; }
12921if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
12922  $as_echo_n "(cached) " >&6
12923else
12924  if test -n "$DUMPBIN"; then
12925  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
12926else
12927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12928for as_dir in $PATH
12929do
12930  IFS=$as_save_IFS
12931  test -z "$as_dir" && as_dir=.
12932    for ac_exec_ext in '' $ac_executable_extensions; do
12933  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12934    ac_cv_prog_DUMPBIN="dumpbin"
12935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12936    break 2
12937  fi
12938done
12939  done
12940IFS=$as_save_IFS
12941
12942fi
12943fi
12944DUMPBIN=$ac_cv_prog_DUMPBIN
12945if test -n "$DUMPBIN"; then
12946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
12947$as_echo "$DUMPBIN" >&6; }
12948else
12949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12950$as_echo "no" >&6; }
12951fi
12952
12953
12954
12955    # Translate long cygdrive or C:\sdfsf path
12956    # into a short mixed mode path that has no
12957    # spaces in it.
12958    tmp="$DUMPBIN"
12959
12960    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
12961        tmp=`$CYGPATH -u "$DUMPBIN"`
12962        tmp=`which "$tmp"`
12963        # If file exists with .exe appended, that's the real filename
12964        # and cygpath needs that to convert to short style path.
12965        if test -f "${tmp}.exe"; then
12966           tmp="${tmp}.exe"
12967        elif test -f "${tmp}.cmd"; then
12968           tmp="${tmp}.cmd"
12969        fi
12970        # Convert to C:/ mixed style path without spaces.
12971         tmp=`$CYGPATH -s -m "$tmp"`
12972    fi
12973    DUMPBIN="$tmp"
12974
12975
12976    COMPILER_TYPE=CL
12977    CCXXFLAGS="$CCXXFLAGS -nologo"
12978
12979fi
12980
12981
12982
12983ac_ext=c
12984ac_cpp='$CPP $CPPFLAGS'
12985ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12986ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12987ac_compiler_gnu=$ac_cv_c_compiler_gnu
12988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
12989$as_echo_n "checking how to run the C preprocessor... " >&6; }
12990# On Suns, sometimes $CPP names a directory.
12991if test -n "$CPP" && test -d "$CPP"; then
12992  CPP=
12993fi
12994if test -z "$CPP"; then
12995  if test "${ac_cv_prog_CPP+set}" = set; then :
12996  $as_echo_n "(cached) " >&6
12997else
12998      # Double quotes because CPP needs to be expanded
12999    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
13000    do
13001      ac_preproc_ok=false
13002for ac_c_preproc_warn_flag in '' yes
13003do
13004  # Use a header file that comes with gcc, so configuring glibc
13005  # with a fresh cross-compiler works.
13006  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13007  # <limits.h> exists even on freestanding compilers.
13008  # On the NeXT, cc -E runs the code through the compiler's parser,
13009  # not just through cpp. "Syntax error" is here to catch this case.
13010  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13011/* end confdefs.h.  */
13012#ifdef __STDC__
13013# include <limits.h>
13014#else
13015# include <assert.h>
13016#endif
13017		     Syntax error
13018_ACEOF
13019if ac_fn_c_try_cpp "$LINENO"; then :
13020
13021else
13022  # Broken: fails on valid input.
13023continue
13024fi
13025rm -f conftest.err conftest.i conftest.$ac_ext
13026
13027  # OK, works on sane cases.  Now check whether nonexistent headers
13028  # can be detected and how.
13029  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13030/* end confdefs.h.  */
13031#include <ac_nonexistent.h>
13032_ACEOF
13033if ac_fn_c_try_cpp "$LINENO"; then :
13034  # Broken: success on invalid input.
13035continue
13036else
13037  # Passes both tests.
13038ac_preproc_ok=:
13039break
13040fi
13041rm -f conftest.err conftest.i conftest.$ac_ext
13042
13043done
13044# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13045rm -f conftest.i conftest.err conftest.$ac_ext
13046if $ac_preproc_ok; then :
13047  break
13048fi
13049
13050    done
13051    ac_cv_prog_CPP=$CPP
13052
13053fi
13054  CPP=$ac_cv_prog_CPP
13055else
13056  ac_cv_prog_CPP=$CPP
13057fi
13058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
13059$as_echo "$CPP" >&6; }
13060ac_preproc_ok=false
13061for ac_c_preproc_warn_flag in '' yes
13062do
13063  # Use a header file that comes with gcc, so configuring glibc
13064  # with a fresh cross-compiler works.
13065  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13066  # <limits.h> exists even on freestanding compilers.
13067  # On the NeXT, cc -E runs the code through the compiler's parser,
13068  # not just through cpp. "Syntax error" is here to catch this case.
13069  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13070/* end confdefs.h.  */
13071#ifdef __STDC__
13072# include <limits.h>
13073#else
13074# include <assert.h>
13075#endif
13076		     Syntax error
13077_ACEOF
13078if ac_fn_c_try_cpp "$LINENO"; then :
13079
13080else
13081  # Broken: fails on valid input.
13082continue
13083fi
13084rm -f conftest.err conftest.i conftest.$ac_ext
13085
13086  # OK, works on sane cases.  Now check whether nonexistent headers
13087  # can be detected and how.
13088  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13089/* end confdefs.h.  */
13090#include <ac_nonexistent.h>
13091_ACEOF
13092if ac_fn_c_try_cpp "$LINENO"; then :
13093  # Broken: success on invalid input.
13094continue
13095else
13096  # Passes both tests.
13097ac_preproc_ok=:
13098break
13099fi
13100rm -f conftest.err conftest.i conftest.$ac_ext
13101
13102done
13103# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13104rm -f conftest.i conftest.err conftest.$ac_ext
13105if $ac_preproc_ok; then :
13106
13107else
13108  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13109$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13110as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
13111See \`config.log' for more details" "$LINENO" 5 ; }
13112fi
13113
13114ac_ext=cpp
13115ac_cpp='$CXXCPP $CPPFLAGS'
13116ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13117ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13118ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13119
13120
13121    # Translate "gcc -E" into "`which gcc` -E" ie
13122    # extract the full path to the binary and at the
13123    # same time maintain any arguments passed to it.
13124    # The command MUST exist in the path, or else!
13125    tmp="$CPP"
13126    car="${tmp%% *}"
13127    tmp="$CPP EOL"
13128    cdr="${tmp#* }"
13129    # On windows we want paths without spaces.
13130    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13131
13132    # Translate long cygdrive or C:\sdfsf path
13133    # into a short mixed mode path that has no
13134    # spaces in it.
13135    tmp="$car"
13136
13137    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13138        tmp=`$CYGPATH -u "$car"`
13139        tmp=`which "$tmp"`
13140        # If file exists with .exe appended, that's the real filename
13141        # and cygpath needs that to convert to short style path.
13142        if test -f "${tmp}.exe"; then
13143           tmp="${tmp}.exe"
13144        elif test -f "${tmp}.cmd"; then
13145           tmp="${tmp}.cmd"
13146        fi
13147        # Convert to C:/ mixed style path without spaces.
13148         tmp=`$CYGPATH -s -m "$tmp"`
13149    fi
13150    car="$tmp"
13151
13152    else
13153        # "which" is not portable, but is used here
13154        # because we know that the command exists!
13155        car=`which $car`
13156    fi
13157    if test "x$cdr" != xEOL; then
13158        CPP="$car ${cdr% *}"
13159    else
13160        CPP="$car"
13161    fi
13162
13163
13164ac_ext=cpp
13165ac_cpp='$CXXCPP $CPPFLAGS'
13166ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13167ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13168ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
13170$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
13171if test -z "$CXXCPP"; then
13172  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
13173  $as_echo_n "(cached) " >&6
13174else
13175      # Double quotes because CXXCPP needs to be expanded
13176    for CXXCPP in "$CXX -E" "/lib/cpp"
13177    do
13178      ac_preproc_ok=false
13179for ac_cxx_preproc_warn_flag in '' yes
13180do
13181  # Use a header file that comes with gcc, so configuring glibc
13182  # with a fresh cross-compiler works.
13183  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13184  # <limits.h> exists even on freestanding compilers.
13185  # On the NeXT, cc -E runs the code through the compiler's parser,
13186  # not just through cpp. "Syntax error" is here to catch this case.
13187  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13188/* end confdefs.h.  */
13189#ifdef __STDC__
13190# include <limits.h>
13191#else
13192# include <assert.h>
13193#endif
13194		     Syntax error
13195_ACEOF
13196if ac_fn_cxx_try_cpp "$LINENO"; then :
13197
13198else
13199  # Broken: fails on valid input.
13200continue
13201fi
13202rm -f conftest.err conftest.i conftest.$ac_ext
13203
13204  # OK, works on sane cases.  Now check whether nonexistent headers
13205  # can be detected and how.
13206  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13207/* end confdefs.h.  */
13208#include <ac_nonexistent.h>
13209_ACEOF
13210if ac_fn_cxx_try_cpp "$LINENO"; then :
13211  # Broken: success on invalid input.
13212continue
13213else
13214  # Passes both tests.
13215ac_preproc_ok=:
13216break
13217fi
13218rm -f conftest.err conftest.i conftest.$ac_ext
13219
13220done
13221# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13222rm -f conftest.i conftest.err conftest.$ac_ext
13223if $ac_preproc_ok; then :
13224  break
13225fi
13226
13227    done
13228    ac_cv_prog_CXXCPP=$CXXCPP
13229
13230fi
13231  CXXCPP=$ac_cv_prog_CXXCPP
13232else
13233  ac_cv_prog_CXXCPP=$CXXCPP
13234fi
13235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
13236$as_echo "$CXXCPP" >&6; }
13237ac_preproc_ok=false
13238for ac_cxx_preproc_warn_flag in '' yes
13239do
13240  # Use a header file that comes with gcc, so configuring glibc
13241  # with a fresh cross-compiler works.
13242  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13243  # <limits.h> exists even on freestanding compilers.
13244  # On the NeXT, cc -E runs the code through the compiler's parser,
13245  # not just through cpp. "Syntax error" is here to catch this case.
13246  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13247/* end confdefs.h.  */
13248#ifdef __STDC__
13249# include <limits.h>
13250#else
13251# include <assert.h>
13252#endif
13253		     Syntax error
13254_ACEOF
13255if ac_fn_cxx_try_cpp "$LINENO"; then :
13256
13257else
13258  # Broken: fails on valid input.
13259continue
13260fi
13261rm -f conftest.err conftest.i conftest.$ac_ext
13262
13263  # OK, works on sane cases.  Now check whether nonexistent headers
13264  # can be detected and how.
13265  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13266/* end confdefs.h.  */
13267#include <ac_nonexistent.h>
13268_ACEOF
13269if ac_fn_cxx_try_cpp "$LINENO"; then :
13270  # Broken: success on invalid input.
13271continue
13272else
13273  # Passes both tests.
13274ac_preproc_ok=:
13275break
13276fi
13277rm -f conftest.err conftest.i conftest.$ac_ext
13278
13279done
13280# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13281rm -f conftest.i conftest.err conftest.$ac_ext
13282if $ac_preproc_ok; then :
13283
13284else
13285  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13286$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13287as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
13288See \`config.log' for more details" "$LINENO" 5 ; }
13289fi
13290
13291ac_ext=cpp
13292ac_cpp='$CXXCPP $CPPFLAGS'
13293ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13294ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13295ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13296
13297
13298    # Translate "gcc -E" into "`which gcc` -E" ie
13299    # extract the full path to the binary and at the
13300    # same time maintain any arguments passed to it.
13301    # The command MUST exist in the path, or else!
13302    tmp="$CXXCPP"
13303    car="${tmp%% *}"
13304    tmp="$CXXCPP EOL"
13305    cdr="${tmp#* }"
13306    # On windows we want paths without spaces.
13307    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13308
13309    # Translate long cygdrive or C:\sdfsf path
13310    # into a short mixed mode path that has no
13311    # spaces in it.
13312    tmp="$car"
13313
13314    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13315        tmp=`$CYGPATH -u "$car"`
13316        tmp=`which "$tmp"`
13317        # If file exists with .exe appended, that's the real filename
13318        # and cygpath needs that to convert to short style path.
13319        if test -f "${tmp}.exe"; then
13320           tmp="${tmp}.exe"
13321        elif test -f "${tmp}.cmd"; then
13322           tmp="${tmp}.cmd"
13323        fi
13324        # Convert to C:/ mixed style path without spaces.
13325         tmp=`$CYGPATH -s -m "$tmp"`
13326    fi
13327    car="$tmp"
13328
13329    else
13330        # "which" is not portable, but is used here
13331        # because we know that the command exists!
13332        car=`which $car`
13333    fi
13334    if test "x$cdr" != xEOL; then
13335        CXXCPP="$car ${cdr% *}"
13336    else
13337        CXXCPP="$car"
13338    fi
13339
13340
13341if test "x$COMPILE_TYPE" != "xcross"; then
13342    # If we are not cross compiling, use the same compilers for
13343    # building the build platform executables. The cross-compilation
13344    # case needed to be done earlier, but this can only be done after
13345    # the native tools have been localized.
13346    BUILD_CC="$CC"
13347    BUILD_CXX="$CXX"
13348    BUILD_LD="$LD"
13349fi
13350
13351# for solaris we really need solaris tools, and not gnu equivalent
13352#   these seems to normally reside in /usr/ccs/bin so add that to path before
13353#   starting to probe
13354#
13355#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
13356#         so that it can be overriden --with-tools-dir
13357if test "x$OPENJDK_BUILD_OS" = xsolaris; then
13358    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
13359fi
13360
13361# Find the right assembler.
13362if test "x$OPENJDK_BUILD_OS" = xsolaris; then
13363    # Extract the first word of "as", so it can be a program name with args.
13364set dummy as; ac_word=$2
13365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13366$as_echo_n "checking for $ac_word... " >&6; }
13367if test "${ac_cv_path_AS+set}" = set; then :
13368  $as_echo_n "(cached) " >&6
13369else
13370  case $AS in
13371  [\\/]* | ?:[\\/]*)
13372  ac_cv_path_AS="$AS" # Let the user override the test with a path.
13373  ;;
13374  *)
13375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13376for as_dir in $PATH
13377do
13378  IFS=$as_save_IFS
13379  test -z "$as_dir" && as_dir=.
13380    for ac_exec_ext in '' $ac_executable_extensions; do
13381  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13382    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
13383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13384    break 2
13385  fi
13386done
13387  done
13388IFS=$as_save_IFS
13389
13390  ;;
13391esac
13392fi
13393AS=$ac_cv_path_AS
13394if test -n "$AS"; then
13395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
13396$as_echo "$AS" >&6; }
13397else
13398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13399$as_echo "no" >&6; }
13400fi
13401
13402
13403
13404    # Translate "gcc -E" into "`which gcc` -E" ie
13405    # extract the full path to the binary and at the
13406    # same time maintain any arguments passed to it.
13407    # The command MUST exist in the path, or else!
13408    tmp="$AS"
13409    car="${tmp%% *}"
13410    tmp="$AS EOL"
13411    cdr="${tmp#* }"
13412    # On windows we want paths without spaces.
13413    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13414
13415    # Translate long cygdrive or C:\sdfsf path
13416    # into a short mixed mode path that has no
13417    # spaces in it.
13418    tmp="$car"
13419
13420    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13421        tmp=`$CYGPATH -u "$car"`
13422        tmp=`which "$tmp"`
13423        # If file exists with .exe appended, that's the real filename
13424        # and cygpath needs that to convert to short style path.
13425        if test -f "${tmp}.exe"; then
13426           tmp="${tmp}.exe"
13427        elif test -f "${tmp}.cmd"; then
13428           tmp="${tmp}.cmd"
13429        fi
13430        # Convert to C:/ mixed style path without spaces.
13431         tmp=`$CYGPATH -s -m "$tmp"`
13432    fi
13433    car="$tmp"
13434
13435    else
13436        # "which" is not portable, but is used here
13437        # because we know that the command exists!
13438        car=`which $car`
13439    fi
13440    if test "x$cdr" != xEOL; then
13441        AS="$car ${cdr% *}"
13442    else
13443        AS="$car"
13444    fi
13445
13446else
13447    AS="$CC -c"
13448fi
13449
13450
13451if test "x$OPENJDK_BUILD_OS" = xsolaris; then
13452    for ac_prog in gnm nm
13453do
13454  # Extract the first word of "$ac_prog", so it can be a program name with args.
13455set dummy $ac_prog; ac_word=$2
13456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13457$as_echo_n "checking for $ac_word... " >&6; }
13458if test "${ac_cv_path_NM+set}" = set; then :
13459  $as_echo_n "(cached) " >&6
13460else
13461  case $NM in
13462  [\\/]* | ?:[\\/]*)
13463  ac_cv_path_NM="$NM" # Let the user override the test with a path.
13464  ;;
13465  *)
13466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13467for as_dir in $PATH
13468do
13469  IFS=$as_save_IFS
13470  test -z "$as_dir" && as_dir=.
13471    for ac_exec_ext in '' $ac_executable_extensions; do
13472  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13473    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
13474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13475    break 2
13476  fi
13477done
13478  done
13479IFS=$as_save_IFS
13480
13481  ;;
13482esac
13483fi
13484NM=$ac_cv_path_NM
13485if test -n "$NM"; then
13486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
13487$as_echo "$NM" >&6; }
13488else
13489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13490$as_echo "no" >&6; }
13491fi
13492
13493
13494  test -n "$NM" && break
13495done
13496
13497
13498    # Translate "gcc -E" into "`which gcc` -E" ie
13499    # extract the full path to the binary and at the
13500    # same time maintain any arguments passed to it.
13501    # The command MUST exist in the path, or else!
13502    tmp="$NM"
13503    car="${tmp%% *}"
13504    tmp="$NM EOL"
13505    cdr="${tmp#* }"
13506    # On windows we want paths without spaces.
13507    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13508
13509    # Translate long cygdrive or C:\sdfsf path
13510    # into a short mixed mode path that has no
13511    # spaces in it.
13512    tmp="$car"
13513
13514    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13515        tmp=`$CYGPATH -u "$car"`
13516        tmp=`which "$tmp"`
13517        # If file exists with .exe appended, that's the real filename
13518        # and cygpath needs that to convert to short style path.
13519        if test -f "${tmp}.exe"; then
13520           tmp="${tmp}.exe"
13521        elif test -f "${tmp}.cmd"; then
13522           tmp="${tmp}.cmd"
13523        fi
13524        # Convert to C:/ mixed style path without spaces.
13525         tmp=`$CYGPATH -s -m "$tmp"`
13526    fi
13527    car="$tmp"
13528
13529    else
13530        # "which" is not portable, but is used here
13531        # because we know that the command exists!
13532        car=`which $car`
13533    fi
13534    if test "x$cdr" != xEOL; then
13535        NM="$car ${cdr% *}"
13536    else
13537        NM="$car"
13538    fi
13539
13540    # Extract the first word of "strip", so it can be a program name with args.
13541set dummy strip; ac_word=$2
13542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13543$as_echo_n "checking for $ac_word... " >&6; }
13544if test "${ac_cv_path_STRIP+set}" = set; then :
13545  $as_echo_n "(cached) " >&6
13546else
13547  case $STRIP in
13548  [\\/]* | ?:[\\/]*)
13549  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
13550  ;;
13551  *)
13552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13553for as_dir in $PATH
13554do
13555  IFS=$as_save_IFS
13556  test -z "$as_dir" && as_dir=.
13557    for ac_exec_ext in '' $ac_executable_extensions; do
13558  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13559    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
13560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13561    break 2
13562  fi
13563done
13564  done
13565IFS=$as_save_IFS
13566
13567  ;;
13568esac
13569fi
13570STRIP=$ac_cv_path_STRIP
13571if test -n "$STRIP"; then
13572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
13573$as_echo "$STRIP" >&6; }
13574else
13575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13576$as_echo "no" >&6; }
13577fi
13578
13579
13580
13581    # Translate "gcc -E" into "`which gcc` -E" ie
13582    # extract the full path to the binary and at the
13583    # same time maintain any arguments passed to it.
13584    # The command MUST exist in the path, or else!
13585    tmp="$STRIP"
13586    car="${tmp%% *}"
13587    tmp="$STRIP EOL"
13588    cdr="${tmp#* }"
13589    # On windows we want paths without spaces.
13590    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13591
13592    # Translate long cygdrive or C:\sdfsf path
13593    # into a short mixed mode path that has no
13594    # spaces in it.
13595    tmp="$car"
13596
13597    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13598        tmp=`$CYGPATH -u "$car"`
13599        tmp=`which "$tmp"`
13600        # If file exists with .exe appended, that's the real filename
13601        # and cygpath needs that to convert to short style path.
13602        if test -f "${tmp}.exe"; then
13603           tmp="${tmp}.exe"
13604        elif test -f "${tmp}.cmd"; then
13605           tmp="${tmp}.cmd"
13606        fi
13607        # Convert to C:/ mixed style path without spaces.
13608         tmp=`$CYGPATH -s -m "$tmp"`
13609    fi
13610    car="$tmp"
13611
13612    else
13613        # "which" is not portable, but is used here
13614        # because we know that the command exists!
13615        car=`which $car`
13616    fi
13617    if test "x$cdr" != xEOL; then
13618        STRIP="$car ${cdr% *}"
13619    else
13620        STRIP="$car"
13621    fi
13622
13623    # Extract the first word of "mcs", so it can be a program name with args.
13624set dummy mcs; ac_word=$2
13625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13626$as_echo_n "checking for $ac_word... " >&6; }
13627if test "${ac_cv_path_MCS+set}" = set; then :
13628  $as_echo_n "(cached) " >&6
13629else
13630  case $MCS in
13631  [\\/]* | ?:[\\/]*)
13632  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
13633  ;;
13634  *)
13635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13636for as_dir in $PATH
13637do
13638  IFS=$as_save_IFS
13639  test -z "$as_dir" && as_dir=.
13640    for ac_exec_ext in '' $ac_executable_extensions; do
13641  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13642    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
13643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13644    break 2
13645  fi
13646done
13647  done
13648IFS=$as_save_IFS
13649
13650  ;;
13651esac
13652fi
13653MCS=$ac_cv_path_MCS
13654if test -n "$MCS"; then
13655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
13656$as_echo "$MCS" >&6; }
13657else
13658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13659$as_echo "no" >&6; }
13660fi
13661
13662
13663
13664    # Translate "gcc -E" into "`which gcc` -E" ie
13665    # extract the full path to the binary and at the
13666    # same time maintain any arguments passed to it.
13667    # The command MUST exist in the path, or else!
13668    tmp="$MCS"
13669    car="${tmp%% *}"
13670    tmp="$MCS EOL"
13671    cdr="${tmp#* }"
13672    # On windows we want paths without spaces.
13673    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13674
13675    # Translate long cygdrive or C:\sdfsf path
13676    # into a short mixed mode path that has no
13677    # spaces in it.
13678    tmp="$car"
13679
13680    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13681        tmp=`$CYGPATH -u "$car"`
13682        tmp=`which "$tmp"`
13683        # If file exists with .exe appended, that's the real filename
13684        # and cygpath needs that to convert to short style path.
13685        if test -f "${tmp}.exe"; then
13686           tmp="${tmp}.exe"
13687        elif test -f "${tmp}.cmd"; then
13688           tmp="${tmp}.cmd"
13689        fi
13690        # Convert to C:/ mixed style path without spaces.
13691         tmp=`$CYGPATH -s -m "$tmp"`
13692    fi
13693    car="$tmp"
13694
13695    else
13696        # "which" is not portable, but is used here
13697        # because we know that the command exists!
13698        car=`which $car`
13699    fi
13700    if test "x$cdr" != xEOL; then
13701        MCS="$car ${cdr% *}"
13702    else
13703        MCS="$car"
13704    fi
13705
13706elif test "x$OPENJDK_BUILD_OS" != xwindows; then
13707    if test -n "$ac_tool_prefix"; then
13708  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
13709set dummy ${ac_tool_prefix}nm; ac_word=$2
13710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13711$as_echo_n "checking for $ac_word... " >&6; }
13712if test "${ac_cv_prog_NM+set}" = set; then :
13713  $as_echo_n "(cached) " >&6
13714else
13715  if test -n "$NM"; then
13716  ac_cv_prog_NM="$NM" # Let the user override the test.
13717else
13718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13719for as_dir in $PATH
13720do
13721  IFS=$as_save_IFS
13722  test -z "$as_dir" && as_dir=.
13723    for ac_exec_ext in '' $ac_executable_extensions; do
13724  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13725    ac_cv_prog_NM="${ac_tool_prefix}nm"
13726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13727    break 2
13728  fi
13729done
13730  done
13731IFS=$as_save_IFS
13732
13733fi
13734fi
13735NM=$ac_cv_prog_NM
13736if test -n "$NM"; then
13737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
13738$as_echo "$NM" >&6; }
13739else
13740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13741$as_echo "no" >&6; }
13742fi
13743
13744
13745fi
13746if test -z "$ac_cv_prog_NM"; then
13747  ac_ct_NM=$NM
13748  # Extract the first word of "nm", so it can be a program name with args.
13749set dummy nm; ac_word=$2
13750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13751$as_echo_n "checking for $ac_word... " >&6; }
13752if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
13753  $as_echo_n "(cached) " >&6
13754else
13755  if test -n "$ac_ct_NM"; then
13756  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
13757else
13758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13759for as_dir in $PATH
13760do
13761  IFS=$as_save_IFS
13762  test -z "$as_dir" && as_dir=.
13763    for ac_exec_ext in '' $ac_executable_extensions; do
13764  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13765    ac_cv_prog_ac_ct_NM="nm"
13766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13767    break 2
13768  fi
13769done
13770  done
13771IFS=$as_save_IFS
13772
13773fi
13774fi
13775ac_ct_NM=$ac_cv_prog_ac_ct_NM
13776if test -n "$ac_ct_NM"; then
13777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
13778$as_echo "$ac_ct_NM" >&6; }
13779else
13780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13781$as_echo "no" >&6; }
13782fi
13783
13784  if test "x$ac_ct_NM" = x; then
13785    NM=""
13786  else
13787    case $cross_compiling:$ac_tool_warned in
13788yes:)
13789{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13790$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13791ac_tool_warned=yes ;;
13792esac
13793    NM=$ac_ct_NM
13794  fi
13795else
13796  NM="$ac_cv_prog_NM"
13797fi
13798
13799
13800    # Translate "gcc -E" into "`which gcc` -E" ie
13801    # extract the full path to the binary and at the
13802    # same time maintain any arguments passed to it.
13803    # The command MUST exist in the path, or else!
13804    tmp="$NM"
13805    car="${tmp%% *}"
13806    tmp="$NM EOL"
13807    cdr="${tmp#* }"
13808    # On windows we want paths without spaces.
13809    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13810
13811    # Translate long cygdrive or C:\sdfsf path
13812    # into a short mixed mode path that has no
13813    # spaces in it.
13814    tmp="$car"
13815
13816    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13817        tmp=`$CYGPATH -u "$car"`
13818        tmp=`which "$tmp"`
13819        # If file exists with .exe appended, that's the real filename
13820        # and cygpath needs that to convert to short style path.
13821        if test -f "${tmp}.exe"; then
13822           tmp="${tmp}.exe"
13823        elif test -f "${tmp}.cmd"; then
13824           tmp="${tmp}.cmd"
13825        fi
13826        # Convert to C:/ mixed style path without spaces.
13827         tmp=`$CYGPATH -s -m "$tmp"`
13828    fi
13829    car="$tmp"
13830
13831    else
13832        # "which" is not portable, but is used here
13833        # because we know that the command exists!
13834        car=`which $car`
13835    fi
13836    if test "x$cdr" != xEOL; then
13837        NM="$car ${cdr% *}"
13838    else
13839        NM="$car"
13840    fi
13841
13842    if test -n "$ac_tool_prefix"; then
13843  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
13844set dummy ${ac_tool_prefix}strip; ac_word=$2
13845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13846$as_echo_n "checking for $ac_word... " >&6; }
13847if test "${ac_cv_prog_STRIP+set}" = set; then :
13848  $as_echo_n "(cached) " >&6
13849else
13850  if test -n "$STRIP"; then
13851  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
13852else
13853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13854for as_dir in $PATH
13855do
13856  IFS=$as_save_IFS
13857  test -z "$as_dir" && as_dir=.
13858    for ac_exec_ext in '' $ac_executable_extensions; do
13859  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13860    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
13861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13862    break 2
13863  fi
13864done
13865  done
13866IFS=$as_save_IFS
13867
13868fi
13869fi
13870STRIP=$ac_cv_prog_STRIP
13871if test -n "$STRIP"; then
13872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
13873$as_echo "$STRIP" >&6; }
13874else
13875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13876$as_echo "no" >&6; }
13877fi
13878
13879
13880fi
13881if test -z "$ac_cv_prog_STRIP"; then
13882  ac_ct_STRIP=$STRIP
13883  # Extract the first word of "strip", so it can be a program name with args.
13884set dummy strip; ac_word=$2
13885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13886$as_echo_n "checking for $ac_word... " >&6; }
13887if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
13888  $as_echo_n "(cached) " >&6
13889else
13890  if test -n "$ac_ct_STRIP"; then
13891  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
13892else
13893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13894for as_dir in $PATH
13895do
13896  IFS=$as_save_IFS
13897  test -z "$as_dir" && as_dir=.
13898    for ac_exec_ext in '' $ac_executable_extensions; do
13899  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13900    ac_cv_prog_ac_ct_STRIP="strip"
13901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13902    break 2
13903  fi
13904done
13905  done
13906IFS=$as_save_IFS
13907
13908fi
13909fi
13910ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
13911if test -n "$ac_ct_STRIP"; then
13912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
13913$as_echo "$ac_ct_STRIP" >&6; }
13914else
13915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13916$as_echo "no" >&6; }
13917fi
13918
13919  if test "x$ac_ct_STRIP" = x; then
13920    STRIP=""
13921  else
13922    case $cross_compiling:$ac_tool_warned in
13923yes:)
13924{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13925$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13926ac_tool_warned=yes ;;
13927esac
13928    STRIP=$ac_ct_STRIP
13929  fi
13930else
13931  STRIP="$ac_cv_prog_STRIP"
13932fi
13933
13934
13935    # Translate "gcc -E" into "`which gcc` -E" ie
13936    # extract the full path to the binary and at the
13937    # same time maintain any arguments passed to it.
13938    # The command MUST exist in the path, or else!
13939    tmp="$STRIP"
13940    car="${tmp%% *}"
13941    tmp="$STRIP EOL"
13942    cdr="${tmp#* }"
13943    # On windows we want paths without spaces.
13944    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13945
13946    # Translate long cygdrive or C:\sdfsf path
13947    # into a short mixed mode path that has no
13948    # spaces in it.
13949    tmp="$car"
13950
13951    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
13952        tmp=`$CYGPATH -u "$car"`
13953        tmp=`which "$tmp"`
13954        # If file exists with .exe appended, that's the real filename
13955        # and cygpath needs that to convert to short style path.
13956        if test -f "${tmp}.exe"; then
13957           tmp="${tmp}.exe"
13958        elif test -f "${tmp}.cmd"; then
13959           tmp="${tmp}.cmd"
13960        fi
13961        # Convert to C:/ mixed style path without spaces.
13962         tmp=`$CYGPATH -s -m "$tmp"`
13963    fi
13964    car="$tmp"
13965
13966    else
13967        # "which" is not portable, but is used here
13968        # because we know that the command exists!
13969        car=`which $car`
13970    fi
13971    if test "x$cdr" != xEOL; then
13972        STRIP="$car ${cdr% *}"
13973    else
13974        STRIP="$car"
13975    fi
13976
13977fi
13978
13979###
13980#
13981# Check for objcopy
13982#
13983#   but search for gobjcopy first...
13984#   since I on solaris found a broken objcopy...buhh
13985#
13986if test -n "$ac_tool_prefix"; then
13987  # Extract the first word of "${ac_tool_prefix}gobjcopy", so it can be a program name with args.
13988set dummy ${ac_tool_prefix}gobjcopy; ac_word=$2
13989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13990$as_echo_n "checking for $ac_word... " >&6; }
13991if test "${ac_cv_path_OBJCOPY+set}" = set; then :
13992  $as_echo_n "(cached) " >&6
13993else
13994  case $OBJCOPY in
13995  [\\/]* | ?:[\\/]*)
13996  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
13997  ;;
13998  *)
13999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14000for as_dir in $PATH
14001do
14002  IFS=$as_save_IFS
14003  test -z "$as_dir" && as_dir=.
14004    for ac_exec_ext in '' $ac_executable_extensions; do
14005  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14006    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
14007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14008    break 2
14009  fi
14010done
14011  done
14012IFS=$as_save_IFS
14013
14014  ;;
14015esac
14016fi
14017OBJCOPY=$ac_cv_path_OBJCOPY
14018if test -n "$OBJCOPY"; then
14019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
14020$as_echo "$OBJCOPY" >&6; }
14021else
14022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14023$as_echo "no" >&6; }
14024fi
14025
14026
14027fi
14028if test -z "$ac_cv_path_OBJCOPY"; then
14029  ac_pt_OBJCOPY=$OBJCOPY
14030  # Extract the first word of "gobjcopy", so it can be a program name with args.
14031set dummy gobjcopy; ac_word=$2
14032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14033$as_echo_n "checking for $ac_word... " >&6; }
14034if test "${ac_cv_path_ac_pt_OBJCOPY+set}" = set; then :
14035  $as_echo_n "(cached) " >&6
14036else
14037  case $ac_pt_OBJCOPY in
14038  [\\/]* | ?:[\\/]*)
14039  ac_cv_path_ac_pt_OBJCOPY="$ac_pt_OBJCOPY" # Let the user override the test with a path.
14040  ;;
14041  *)
14042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14043for as_dir in $PATH
14044do
14045  IFS=$as_save_IFS
14046  test -z "$as_dir" && as_dir=.
14047    for ac_exec_ext in '' $ac_executable_extensions; do
14048  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14049    ac_cv_path_ac_pt_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
14050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14051    break 2
14052  fi
14053done
14054  done
14055IFS=$as_save_IFS
14056
14057  ;;
14058esac
14059fi
14060ac_pt_OBJCOPY=$ac_cv_path_ac_pt_OBJCOPY
14061if test -n "$ac_pt_OBJCOPY"; then
14062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_OBJCOPY" >&5
14063$as_echo "$ac_pt_OBJCOPY" >&6; }
14064else
14065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14066$as_echo "no" >&6; }
14067fi
14068
14069  if test "x$ac_pt_OBJCOPY" = x; then
14070    OBJCOPY=""
14071  else
14072    case $cross_compiling:$ac_tool_warned in
14073yes:)
14074{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14075$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14076ac_tool_warned=yes ;;
14077esac
14078    OBJCOPY=$ac_pt_OBJCOPY
14079  fi
14080else
14081  OBJCOPY="$ac_cv_path_OBJCOPY"
14082fi
14083
14084if test "x$OBJCOPY" = x; then
14085   if test -n "$ac_tool_prefix"; then
14086  # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
14087set dummy ${ac_tool_prefix}objcopy; ac_word=$2
14088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14089$as_echo_n "checking for $ac_word... " >&6; }
14090if test "${ac_cv_path_OBJCOPY+set}" = set; then :
14091  $as_echo_n "(cached) " >&6
14092else
14093  case $OBJCOPY in
14094  [\\/]* | ?:[\\/]*)
14095  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
14096  ;;
14097  *)
14098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14099for as_dir in $PATH
14100do
14101  IFS=$as_save_IFS
14102  test -z "$as_dir" && as_dir=.
14103    for ac_exec_ext in '' $ac_executable_extensions; do
14104  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14105    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
14106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14107    break 2
14108  fi
14109done
14110  done
14111IFS=$as_save_IFS
14112
14113  ;;
14114esac
14115fi
14116OBJCOPY=$ac_cv_path_OBJCOPY
14117if test -n "$OBJCOPY"; then
14118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
14119$as_echo "$OBJCOPY" >&6; }
14120else
14121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14122$as_echo "no" >&6; }
14123fi
14124
14125
14126fi
14127if test -z "$ac_cv_path_OBJCOPY"; then
14128  ac_pt_OBJCOPY=$OBJCOPY
14129  # Extract the first word of "objcopy", so it can be a program name with args.
14130set dummy objcopy; ac_word=$2
14131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14132$as_echo_n "checking for $ac_word... " >&6; }
14133if test "${ac_cv_path_ac_pt_OBJCOPY+set}" = set; then :
14134  $as_echo_n "(cached) " >&6
14135else
14136  case $ac_pt_OBJCOPY in
14137  [\\/]* | ?:[\\/]*)
14138  ac_cv_path_ac_pt_OBJCOPY="$ac_pt_OBJCOPY" # Let the user override the test with a path.
14139  ;;
14140  *)
14141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14142for as_dir in $PATH
14143do
14144  IFS=$as_save_IFS
14145  test -z "$as_dir" && as_dir=.
14146    for ac_exec_ext in '' $ac_executable_extensions; do
14147  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14148    ac_cv_path_ac_pt_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
14149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14150    break 2
14151  fi
14152done
14153  done
14154IFS=$as_save_IFS
14155
14156  ;;
14157esac
14158fi
14159ac_pt_OBJCOPY=$ac_cv_path_ac_pt_OBJCOPY
14160if test -n "$ac_pt_OBJCOPY"; then
14161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_OBJCOPY" >&5
14162$as_echo "$ac_pt_OBJCOPY" >&6; }
14163else
14164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14165$as_echo "no" >&6; }
14166fi
14167
14168  if test "x$ac_pt_OBJCOPY" = x; then
14169    OBJCOPY=""
14170  else
14171    case $cross_compiling:$ac_tool_warned in
14172yes:)
14173{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14174$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14175ac_tool_warned=yes ;;
14176esac
14177    OBJCOPY=$ac_pt_OBJCOPY
14178  fi
14179else
14180  OBJCOPY="$ac_cv_path_OBJCOPY"
14181fi
14182
14183fi
14184
14185if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14186   # Extract the first word of "lipo", so it can be a program name with args.
14187set dummy lipo; ac_word=$2
14188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14189$as_echo_n "checking for $ac_word... " >&6; }
14190if test "${ac_cv_path_LIPO+set}" = set; then :
14191  $as_echo_n "(cached) " >&6
14192else
14193  case $LIPO in
14194  [\\/]* | ?:[\\/]*)
14195  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
14196  ;;
14197  *)
14198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14199for as_dir in $PATH
14200do
14201  IFS=$as_save_IFS
14202  test -z "$as_dir" && as_dir=.
14203    for ac_exec_ext in '' $ac_executable_extensions; do
14204  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14205    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
14206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14207    break 2
14208  fi
14209done
14210  done
14211IFS=$as_save_IFS
14212
14213  ;;
14214esac
14215fi
14216LIPO=$ac_cv_path_LIPO
14217if test -n "$LIPO"; then
14218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
14219$as_echo "$LIPO" >&6; }
14220else
14221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14222$as_echo "no" >&6; }
14223fi
14224
14225
14226
14227    # Translate "gcc -E" into "`which gcc` -E" ie
14228    # extract the full path to the binary and at the
14229    # same time maintain any arguments passed to it.
14230    # The command MUST exist in the path, or else!
14231    tmp="$LIPO"
14232    car="${tmp%% *}"
14233    tmp="$LIPO EOL"
14234    cdr="${tmp#* }"
14235    # On windows we want paths without spaces.
14236    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
14237
14238    # Translate long cygdrive or C:\sdfsf path
14239    # into a short mixed mode path that has no
14240    # spaces in it.
14241    tmp="$car"
14242
14243    if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
14244        tmp=`$CYGPATH -u "$car"`
14245        tmp=`which "$tmp"`
14246        # If file exists with .exe appended, that's the real filename
14247        # and cygpath needs that to convert to short style path.
14248        if test -f "${tmp}.exe"; then
14249           tmp="${tmp}.exe"
14250        elif test -f "${tmp}.cmd"; then
14251           tmp="${tmp}.cmd"
14252        fi
14253        # Convert to C:/ mixed style path without spaces.
14254         tmp=`$CYGPATH -s -m "$tmp"`
14255    fi
14256    car="$tmp"
14257
14258    else
14259        # "which" is not portable, but is used here
14260        # because we know that the command exists!
14261        car=`which $car`
14262    fi
14263    if test "x$cdr" != xEOL; then
14264        LIPO="$car ${cdr% *}"
14265    else
14266        LIPO="$car"
14267    fi
14268
14269fi
14270
14271# Restore old path without tools dir
14272PATH="$OLD_PATH"
14273
14274
14275# FIXME: Currently we must test this after paths but before flags. Fix!
14276
14277# And we can test some aspects on the target using configure macros.
14278
14279
14280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
14281$as_echo_n "checking for ANSI C header files... " >&6; }
14282if test "${ac_cv_header_stdc+set}" = set; then :
14283  $as_echo_n "(cached) " >&6
14284else
14285  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14286/* end confdefs.h.  */
14287#include <stdlib.h>
14288#include <stdarg.h>
14289#include <string.h>
14290#include <float.h>
14291
14292int
14293main ()
14294{
14295
14296  ;
14297  return 0;
14298}
14299_ACEOF
14300if ac_fn_cxx_try_compile "$LINENO"; then :
14301  ac_cv_header_stdc=yes
14302else
14303  ac_cv_header_stdc=no
14304fi
14305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14306
14307if test $ac_cv_header_stdc = yes; then
14308  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14309  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14310/* end confdefs.h.  */
14311#include <string.h>
14312
14313_ACEOF
14314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14315  $EGREP "memchr" >/dev/null 2>&1; then :
14316
14317else
14318  ac_cv_header_stdc=no
14319fi
14320rm -f conftest*
14321
14322fi
14323
14324if test $ac_cv_header_stdc = yes; then
14325  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14326  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14327/* end confdefs.h.  */
14328#include <stdlib.h>
14329
14330_ACEOF
14331if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14332  $EGREP "free" >/dev/null 2>&1; then :
14333
14334else
14335  ac_cv_header_stdc=no
14336fi
14337rm -f conftest*
14338
14339fi
14340
14341if test $ac_cv_header_stdc = yes; then
14342  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14343  if test "$cross_compiling" = yes; then :
14344  :
14345else
14346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14347/* end confdefs.h.  */
14348#include <ctype.h>
14349#include <stdlib.h>
14350#if ((' ' & 0x0FF) == 0x020)
14351# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14352# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14353#else
14354# define ISLOWER(c) \
14355		   (('a' <= (c) && (c) <= 'i') \
14356		     || ('j' <= (c) && (c) <= 'r') \
14357		     || ('s' <= (c) && (c) <= 'z'))
14358# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14359#endif
14360
14361#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14362int
14363main ()
14364{
14365  int i;
14366  for (i = 0; i < 256; i++)
14367    if (XOR (islower (i), ISLOWER (i))
14368	|| toupper (i) != TOUPPER (i))
14369      return 2;
14370  return 0;
14371}
14372_ACEOF
14373if ac_fn_cxx_try_run "$LINENO"; then :
14374
14375else
14376  ac_cv_header_stdc=no
14377fi
14378rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14379  conftest.$ac_objext conftest.beam conftest.$ac_ext
14380fi
14381
14382fi
14383fi
14384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
14385$as_echo "$ac_cv_header_stdc" >&6; }
14386if test $ac_cv_header_stdc = yes; then
14387
14388$as_echo "#define STDC_HEADERS 1" >>confdefs.h
14389
14390fi
14391
14392# On IRIX 5.3, sys/types and inttypes.h are conflicting.
14393for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14394		  inttypes.h stdint.h unistd.h
14395do :
14396  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14397ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
14398"
14399if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14400  cat >>confdefs.h <<_ACEOF
14401#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14402_ACEOF
14403
14404fi
14405
14406done
14407
14408
14409
14410###############################################################################
14411#
14412# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
14413# (The JVM can use 32 or 64 bit Java pointers but that decision
14414# is made at runtime.)
14415#
14416if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14417  # Always specify -m flags on Solaris
14418
14419  # keep track of c/cxx flags that we added outselves...
14420  #   to prevent emitting warning...
14421  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
14422  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
14423  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
14424
14425  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
14426  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
14427  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
14428
14429  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
14430  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
14431  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
14432
14433elif test "x$COMPILE_TYPE" = xreduced; then
14434  if test "x$OPENJDK_TARGET_OS" != xwindows; then
14435    # Specify -m if running reduced on other Posix platforms
14436
14437  # keep track of c/cxx flags that we added outselves...
14438  #   to prevent emitting warning...
14439  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
14440  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
14441  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
14442
14443  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
14444  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
14445  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
14446
14447  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
14448  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
14449  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
14450
14451  fi
14452fi
14453
14454# Make compilation sanity check
14455for ac_header in stdio.h
14456do :
14457  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
14458if test "x$ac_cv_header_stdio_h" = x""yes; then :
14459  cat >>confdefs.h <<_ACEOF
14460#define HAVE_STDIO_H 1
14461_ACEOF
14462
14463else
14464
14465  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
14466$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
14467  if test "x$COMPILE_TYPE" = xreduced; then
14468    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
14469$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
14470  elif test "x$COMPILE_TYPE" = xcross; then
14471    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
14472$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
14473  fi
14474  as_fn_error $? "Cannot continue." "$LINENO" 5
14475
14476fi
14477
14478done
14479
14480
14481# The cast to long int works around a bug in the HP C Compiler
14482# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14483# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14484# This bug is HP SR number 8606223364.
14485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
14486$as_echo_n "checking size of int *... " >&6; }
14487if test "${ac_cv_sizeof_int_p+set}" = set; then :
14488  $as_echo_n "(cached) " >&6
14489else
14490  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
14491
14492else
14493  if test "$ac_cv_type_int_p" = yes; then
14494     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14495$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14496as_fn_error 77 "cannot compute sizeof (int *)
14497See \`config.log' for more details" "$LINENO" 5 ; }
14498   else
14499     ac_cv_sizeof_int_p=0
14500   fi
14501fi
14502
14503fi
14504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
14505$as_echo "$ac_cv_sizeof_int_p" >&6; }
14506
14507
14508
14509cat >>confdefs.h <<_ACEOF
14510#define SIZEOF_INT_P $ac_cv_sizeof_int_p
14511_ACEOF
14512
14513
14514
14515if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
14516  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
14517  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
14518fi
14519
14520if test "x$SIZEOF_INT_P" = x; then
14521    # The test failed, lets stick to the assumed value.
14522    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&5
14523$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
14524else
14525    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
14526
14527    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
14528        as_fn_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)" "$LINENO" 5
14529    fi
14530fi
14531
14532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
14533$as_echo_n "checking for target address size... " >&6; }
14534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
14535$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
14536
14537
14538###############################################################################
14539#
14540# Is the target little of big endian?
14541#
14542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14543$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14544if test "${ac_cv_c_bigendian+set}" = set; then :
14545  $as_echo_n "(cached) " >&6
14546else
14547  ac_cv_c_bigendian=unknown
14548    # See if we're dealing with a universal compiler.
14549    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14550/* end confdefs.h.  */
14551#ifndef __APPLE_CC__
14552	       not a universal capable compiler
14553	     #endif
14554	     typedef int dummy;
14555
14556_ACEOF
14557if ac_fn_cxx_try_compile "$LINENO"; then :
14558
14559	# Check for potential -arch flags.  It is not universal unless
14560	# there are at least two -arch flags with different values.
14561	ac_arch=
14562	ac_prev=
14563	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14564	 if test -n "$ac_prev"; then
14565	   case $ac_word in
14566	     i?86 | x86_64 | ppc | ppc64)
14567	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14568		 ac_arch=$ac_word
14569	       else
14570		 ac_cv_c_bigendian=universal
14571		 break
14572	       fi
14573	       ;;
14574	   esac
14575	   ac_prev=
14576	 elif test "x$ac_word" = "x-arch"; then
14577	   ac_prev=arch
14578	 fi
14579       done
14580fi
14581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14582    if test $ac_cv_c_bigendian = unknown; then
14583      # See if sys/param.h defines the BYTE_ORDER macro.
14584      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14585/* end confdefs.h.  */
14586#include <sys/types.h>
14587	     #include <sys/param.h>
14588
14589int
14590main ()
14591{
14592#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14593		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14594		     && LITTLE_ENDIAN)
14595	      bogus endian macros
14596	     #endif
14597
14598  ;
14599  return 0;
14600}
14601_ACEOF
14602if ac_fn_cxx_try_compile "$LINENO"; then :
14603  # It does; now see whether it defined to BIG_ENDIAN or not.
14604	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14605/* end confdefs.h.  */
14606#include <sys/types.h>
14607		#include <sys/param.h>
14608
14609int
14610main ()
14611{
14612#if BYTE_ORDER != BIG_ENDIAN
14613		 not big endian
14614		#endif
14615
14616  ;
14617  return 0;
14618}
14619_ACEOF
14620if ac_fn_cxx_try_compile "$LINENO"; then :
14621  ac_cv_c_bigendian=yes
14622else
14623  ac_cv_c_bigendian=no
14624fi
14625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14626fi
14627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14628    fi
14629    if test $ac_cv_c_bigendian = unknown; then
14630      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14631      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14632/* end confdefs.h.  */
14633#include <limits.h>
14634
14635int
14636main ()
14637{
14638#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14639	      bogus endian macros
14640	     #endif
14641
14642  ;
14643  return 0;
14644}
14645_ACEOF
14646if ac_fn_cxx_try_compile "$LINENO"; then :
14647  # It does; now see whether it defined to _BIG_ENDIAN or not.
14648	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14649/* end confdefs.h.  */
14650#include <limits.h>
14651
14652int
14653main ()
14654{
14655#ifndef _BIG_ENDIAN
14656		 not big endian
14657		#endif
14658
14659  ;
14660  return 0;
14661}
14662_ACEOF
14663if ac_fn_cxx_try_compile "$LINENO"; then :
14664  ac_cv_c_bigendian=yes
14665else
14666  ac_cv_c_bigendian=no
14667fi
14668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14669fi
14670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14671    fi
14672    if test $ac_cv_c_bigendian = unknown; then
14673      # Compile a test program.
14674      if test "$cross_compiling" = yes; then :
14675  # Try to guess by grepping values from an object file.
14676	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14677/* end confdefs.h.  */
14678short int ascii_mm[] =
14679		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14680		short int ascii_ii[] =
14681		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14682		int use_ascii (int i) {
14683		  return ascii_mm[i] + ascii_ii[i];
14684		}
14685		short int ebcdic_ii[] =
14686		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14687		short int ebcdic_mm[] =
14688		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14689		int use_ebcdic (int i) {
14690		  return ebcdic_mm[i] + ebcdic_ii[i];
14691		}
14692		extern int foo;
14693
14694int
14695main ()
14696{
14697return use_ascii (foo) == use_ebcdic (foo);
14698  ;
14699  return 0;
14700}
14701_ACEOF
14702if ac_fn_cxx_try_compile "$LINENO"; then :
14703  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14704	      ac_cv_c_bigendian=yes
14705	    fi
14706	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14707	      if test "$ac_cv_c_bigendian" = unknown; then
14708		ac_cv_c_bigendian=no
14709	      else
14710		# finding both strings is unlikely to happen, but who knows?
14711		ac_cv_c_bigendian=unknown
14712	      fi
14713	    fi
14714fi
14715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14716else
14717  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14718/* end confdefs.h.  */
14719$ac_includes_default
14720int
14721main ()
14722{
14723
14724	     /* Are we little or big endian?  From Harbison&Steele.  */
14725	     union
14726	     {
14727	       long int l;
14728	       char c[sizeof (long int)];
14729	     } u;
14730	     u.l = 1;
14731	     return u.c[sizeof (long int) - 1] == 1;
14732
14733  ;
14734  return 0;
14735}
14736_ACEOF
14737if ac_fn_cxx_try_run "$LINENO"; then :
14738  ac_cv_c_bigendian=no
14739else
14740  ac_cv_c_bigendian=yes
14741fi
14742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14743  conftest.$ac_objext conftest.beam conftest.$ac_ext
14744fi
14745
14746    fi
14747fi
14748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14749$as_echo "$ac_cv_c_bigendian" >&6; }
14750 case $ac_cv_c_bigendian in #(
14751   yes)
14752     ENDIAN="big";; #(
14753   no)
14754     ENDIAN="little" ;; #(
14755   universal)
14756     ENDIAN="universal_endianness"
14757     ;; #(
14758   *)
14759     ENDIAN="unknown" ;;
14760 esac
14761
14762
14763if test "x$ENDIAN" = xuniversal_endianness; then
14764    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
14765fi
14766if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
14767    as_fn_error $? "The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)" "$LINENO" 5
14768fi
14769
14770
14771# Configure flags for the tools
14772
14773
14774###############################################################################
14775#
14776# How to compile shared libraries.
14777#
14778
14779if test "x$GCC" = xyes; then
14780    COMPILER_NAME=gcc
14781    PICFLAG="-fPIC"
14782    LIBRARY_PREFIX=lib
14783    SHARED_LIBRARY='lib$1.so'
14784    STATIC_LIBRARY='lib$1.a'
14785    SHARED_LIBRARY_FLAGS="-shared"
14786    SHARED_LIBRARY_SUFFIX='.so'
14787    STATIC_LIBRARY_SUFFIX='.a'
14788    OBJ_SUFFIX='.o'
14789    EXE_SUFFIX=''
14790    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
14791    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
14792    C_FLAG_REORDER=''
14793    CXX_FLAG_REORDER=''
14794    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
14795    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
14796    LD="$CC"
14797    LDEXE="$CC"
14798    LDCXX="$CXX"
14799    LDEXECXX="$CXX"
14800    POST_STRIP_CMD="$STRIP -g"
14801
14802    # Linking is different on MacOSX
14803    if test "x$OPENJDK_BUILD_OS" = xmacosx; then
14804        # Might change in the future to clang.
14805        COMPILER_NAME=gcc
14806        SHARED_LIBRARY='lib$1.dylib'
14807        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
14808        SHARED_LIBRARY_SUFFIX='.dylib'
14809        EXE_SUFFIX=''
14810        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
14811        SET_SHARED_LIBRARY_MAPFILE=''
14812        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
14813        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
14814        POST_STRIP_CMD="$STRIP -S"
14815    fi
14816else
14817    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
14818        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
14819        COMPILER_NAME=ossc
14820        PICFLAG="-KPIC"
14821        LIBRARY_PREFIX=lib
14822        SHARED_LIBRARY='lib$1.so'
14823        STATIC_LIBRARY='lib$1.a'
14824        SHARED_LIBRARY_FLAGS="-G"
14825        SHARED_LIBRARY_SUFFIX='.so'
14826        STATIC_LIBRARY_SUFFIX='.a'
14827        OBJ_SUFFIX='.o'
14828        EXE_SUFFIX=''
14829        SET_SHARED_LIBRARY_NAME=''
14830        SET_SHARED_LIBRARY_MAPFILE='-M$1'
14831	C_FLAG_REORDER='-xF'
14832	CXX_FLAG_REORDER='-xF'
14833        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
14834        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
14835        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
14836        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
14837        CFLAGS_JDKLIB_EXTRA='-xstrconst'
14838        POST_STRIP_CMD="$STRIP -x"
14839        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
14840    fi
14841    if test "x$OPENJDK_BUILD_OS" = xwindows; then
14842        # If it is not gcc, then assume it is the MS Visual Studio compiler
14843        COMPILER_NAME=cl
14844        PICFLAG=""
14845        LIBRARY_PREFIX=
14846        SHARED_LIBRARY='$1.dll'
14847        STATIC_LIBRARY='$1.lib'
14848        SHARED_LIBRARY_FLAGS="-LD"
14849        SHARED_LIBRARY_SUFFIX='.dll'
14850        STATIC_LIBRARY_SUFFIX='.lib'
14851        OBJ_SUFFIX='.obj'
14852        EXE_SUFFIX='.exe'
14853        SET_SHARED_LIBRARY_NAME=''
14854        SET_SHARED_LIBRARY_MAPFILE=''
14855        SET_SHARED_LIBRARY_ORIGIN=''
14856        SET_EXECUTABLE_ORIGIN=''
14857    fi
14858fi
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877# The (cross) compiler is now configured, we can now test capabilities
14878# of the target platform.
14879
14880
14881
14882###############################################################################
14883#
14884# Setup the opt flags for different compilers
14885# and different operating systems.
14886#
14887
14888#
14889# NOTE: check for -mstackrealign needs to be below potential addition of -m32
14890#
14891if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
14892    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
14893    # While waiting for a better solution, the current workaround is to use -mstackrealign.
14894    CFLAGS="$CFLAGS -mstackrealign"
14895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
14896$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
14897    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14898/* end confdefs.h.  */
14899int main() { return 0; }
14900_ACEOF
14901if ac_fn_cxx_try_link "$LINENO"; then :
14902
14903		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14904$as_echo "yes" >&6; }
14905
14906else
14907
14908		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14909$as_echo "no" >&6; }
14910	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
14911
14912fi
14913rm -f core conftest.err conftest.$ac_objext \
14914    conftest$ac_exeext conftest.$ac_ext
14915fi
14916
14917C_FLAG_DEPS="-MMD -MF"
14918CXX_FLAG_DEPS="-MMD -MF"
14919
14920case $COMPILER_TYPE in
14921  CC )
14922    D_FLAG="-g"
14923    case $COMPILER_NAME in
14924      gcc )
14925      	case $OPENJDK_TARGET_OS in
14926	  macosx )
14927	    # On MacOSX we optimize for size, something
14928	    # we should do for all platforms?
14929	    C_O_FLAG_HI="-Os"
14930	    C_O_FLAG_NORM="-Os"
14931	    C_O_FLAG_NONE=""
14932	    ;;
14933	  *)
14934	    C_O_FLAG_HI="-O3"
14935	    C_O_FLAG_NORM="-O2"
14936	    C_O_FLAG_NONE="-O0"
14937	    CFLAGS_DEBUG_SYMBOLS="-g"
14938	    CXXFLAGS_DEBUG_SYMBOLS="-g"
14939	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
14940	       CFLAGS_DEBUG_SYMBOLS="-g1"
14941	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
14942	    fi
14943	    ;;
14944	esac
14945        CXX_O_FLAG_HI="$C_O_FLAG_HI"
14946        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
14947        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
14948        ;;
14949      ossc )
14950        #
14951        # Forte has different names for this with their C++ compiler...
14952        #
14953        C_FLAG_DEPS="-xMMD -xMF"
14954        CXX_FLAG_DEPS="-xMMD -xMF"
14955
14956        # Extra options used with HIGHEST
14957        #
14958        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
14959        #          done with care, there are some assumptions below that need to
14960        #          be understood about the use of pointers, and IEEE behavior.
14961        #
14962        # Use non-standard floating point mode (not IEEE 754)
14963        CC_HIGHEST="$CC_HIGHEST -fns"
14964        # Do some simplification of floating point arithmetic (not IEEE 754)
14965        CC_HIGHEST="$CC_HIGHEST -fsimple"
14966        # Use single precision floating point with 'float'
14967        CC_HIGHEST="$CC_HIGHEST -fsingle"
14968        # Assume memory references via basic pointer types do not alias
14969        #   (Source with excessing pointer casting and data access with mixed
14970        #    pointer types are not recommended)
14971        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
14972        # Use intrinsic or inline versions for math/std functions
14973        #   (If you expect perfect errno behavior, do not use this)
14974        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
14975        # Loop data dependency optimizations (need -xO3 or higher)
14976        CC_HIGHEST="$CC_HIGHEST -xdepend"
14977        # Pointer parameters to functions do not overlap
14978        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
14979        #    If you pass in multiple pointers to the same data, do not use this)
14980        CC_HIGHEST="$CC_HIGHEST -xrestrict"
14981        # Inline some library routines
14982        #   (If you expect perfect errno behavior, do not use this)
14983        CC_HIGHEST="$CC_HIGHEST -xlibmil"
14984        # Use optimized math routines
14985        #   (If you expect perfect errno behavior, do not use this)
14986        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
14987        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
14988
14989        case $OPENJDK_TARGET_CPU_ARCH in
14990          x86)
14991            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
14992            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
14993            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
14994            C_O_FLAG_NONE="-xregs=no%frameptr"
14995            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
14996            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
14997            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
14998            CXX_O_FLAG_NONE="-xregs=no%frameptr"
14999            if test "x$OPENJDK_TARGET_CPU" = xx86; then
15000               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
15001               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
15002            fi
15003            ;;
15004          sparc)
15005            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
15006            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
15007            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
15008            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
15009            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
15010            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
15011            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
15012            C_O_FLAG_NONE=""
15013            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
15014            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
15015            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
15016            CXX_O_FLAG_NONE=""
15017            ;;
15018        esac
15019
15020    CFLAGS_DEBUG_SYMBOLS="-g -xs"
15021    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
15022    esac
15023    ;;
15024  CL )
15025    D_FLAG=
15026    C_O_FLAG_HIGHEST="-O2"
15027    C_O_FLAG_HI="-O1"
15028    C_O_FLAG_NORM="-O1"
15029    C_O_FLAG_NONE="-Od"
15030    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
15031    CXX_O_FLAG_HI="$C_O_FLAG_HI"
15032    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
15033    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
15034    ;;
15035esac
15036
15037if test -z "$C_O_FLAG_HIGHEST"; then
15038   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
15039fi
15040
15041if test -z "$CXX_O_FLAG_HIGHEST"; then
15042   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
15043fi
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
15059   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
15060$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
15061fi
15062
15063if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
15064   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
15065$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
15066fi
15067
15068if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
15069   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
15070$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
15071fi
15072
15073
15074# Check whether --with-extra-cflags was given.
15075if test "${with_extra_cflags+set}" = set; then :
15076  withval=$with_extra_cflags;
15077fi
15078
15079
15080
15081# Check whether --with-extra-cxxflags was given.
15082if test "${with_extra_cxxflags+set}" = set; then :
15083  withval=$with_extra_cxxflags;
15084fi
15085
15086
15087
15088# Check whether --with-extra-ldflags was given.
15089if test "${with_extra_ldflags+set}" = set; then :
15090  withval=$with_extra_ldflags;
15091fi
15092
15093
15094CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
15095CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
15096LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
15097
15098# Hotspot needs these set in their legacy form
15099LEGACY_EXTRA_CFLAGS=$with_extra_cflags
15100LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
15101LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
15102
15103
15104
15105
15106
15107###############################################################################
15108#
15109# Now setup the CFLAGS and LDFLAGS for the JDK build.
15110# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
15111#
15112case $COMPILER_NAME in
15113      gcc )
15114      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
15115                          -pipe \
15116                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
15117	  case $OPENJDK_TARGET_CPU_ARCH in
15118	  arm )
15119            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
15120	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
15121	  ;;
15122	  ppc )
15123            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
15124	  ;;
15125	  * )
15126	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
15127	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
15128          ;;
15129	  esac
15130          ;;
15131      ossc )
15132          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
15133          case $OPENJDK_TARGET_CPU_ARCH in
15134          x86 )
15135            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -Di386"
15136       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
15137          ;;
15138          esac
15139
15140      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
15141      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
15142
15143          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
15144          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
15145          ;;
15146      cl )
15147          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
15148               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
15149	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
15150	       -DWIN32 -DIAL"
15151          case $OPENJDK_TARGET_CPU in
15152              x86 )
15153                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
15154                  ;;
15155              x86_64 )
15156                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
15157                  ;;
15158          esac
15159          ;;
15160esac
15161
15162###############################################################################
15163
15164CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
15165
15166# The package path is used only on macosx?
15167PACKAGE_PATH=/opt/local
15168
15169
15170if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
15171    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
15172    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
15173    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
15174    #   Note: -Dmacro         is the same as    #define macro 1
15175    #         -Dmacro=	    is the same as    #define macro
15176    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15177        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
15178    else
15179        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
15180    fi
15181else
15182    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
15183fi
15184if test "x$OPENJDK_TARGET_OS" = xlinux; then
15185    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
15186fi
15187if test "x$OPENJDK_TARGET_OS" = xwindows; then
15188    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
15189fi
15190if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15191    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
15192fi
15193if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15194    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
15195fi
15196if test "x$OPENJDK_TARGET_OS" = xbsd; then
15197    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
15198fi
15199if test "x$DEBUG_LEVEL" = xrelease; then
15200    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
15201    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15202        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
15203    fi
15204else
15205    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
15206fi
15207
15208CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
15209CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
15210
15211CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
15212        -I${JDK_OUTPUTDIR}/include \
15213        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
15214        -I${JDK_TOPDIR}/src/share/javavm/export \
15215        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
15216        -I${JDK_TOPDIR}/src/share/native/common \
15217        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
15218
15219# The shared libraries are compiled using the picflag.
15220CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
15221CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
15222
15223# Executable flags
15224CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
15225CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
15226
15227# Now this is odd. The JDK native libraries have to link against libjvm.so
15228# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
15229# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
15230# is identical for client and server? Yes. Which is picked at runtime (client or server)?
15231# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
15232# libraries will link to whatever is in memory. Yuck.
15233#
15234# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
15235if test "x$COMPILER_TYPE" = xCL; then
15236    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
15237    if test "x$OPENJDK_TARGET_CPU" = xx86; then
15238        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
15239    fi
15240    # TODO: make -debug optional "--disable-full-debug-symbols"
15241    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
15242    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
15243    LDFLAGS_JDKLIB_SUFFIX=""
15244    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15245        LDFLAGS_STACK_SIZE=1048576
15246    else
15247        LDFLAGS_STACK_SIZE=327680
15248    fi
15249    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
15250else
15251    # If this is a --hash-style=gnu system, use --hash-style=both, why?
15252    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
15253    if test -n "$HAS_GNU_HASH"; then
15254        # And since we now know that the linker is gnu, then add -z defs, to forbid
15255        # undefined symbols in object files.
15256        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both -Xlinker -z -Xlinker defs"
15257        if test "x$DEBUG_LEVEL" == "xrelease"; then
15258            # When building release libraries, tell the linker optimize them.
15259            # Should this be supplied to the OSS linker as well?
15260            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
15261        fi
15262    fi
15263
15264    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
15265                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server \
15266                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client \
15267                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
15268
15269    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
15270    if test "x$COMPILER_NAME" = xossc; then
15271        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
15272    fi
15273
15274    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
15275    if test "x$OPENJDK_TARGET_OS" = xlinux; then
15276        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
15277    fi
15278fi
15279
15280# Adjust flags according to debug level.
15281case $DEBUG_LEVEL in
15282      fastdebug )
15283              CFLAGS="$CFLAGS $D_FLAG"
15284              JAVAC_FLAGS="$JAVAC_FLAGS -g"
15285              ;;
15286      slowdebug )
15287              CFLAGS="$CFLAGS $D_FLAG"
15288	      C_O_FLAG_HI="$C_O_FLAG_NONE"
15289	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
15290	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
15291	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
15292              JAVAC_FLAGS="$JAVAC_FLAGS -g"
15293              ;;
15294esac
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310# After we have toolchain, we can compile the uncygdrive helper
15311
15312# When using cygwin, we need a wrapper binary that renames
15313# /cygdrive/c/ arguments into c:/ arguments and peeks into
15314# @files and rewrites these too! This wrapper binary is
15315# called uncygdrive.exe.
15316UNCYGDRIVE=
15317if test "x$OPENJDK_BUILD_OS" = xwindows; then
15318    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if uncygdrive can be created" >&5
15319$as_echo_n "checking if uncygdrive can be created... " >&6; }
15320    UNCYGDRIVE_SRC=`$CYGPATH -m $SRC_ROOT/common/src/uncygdrive.c`
15321    rm -f $OUTPUT_ROOT/uncygdrive*
15322    UNCYGDRIVE=`$CYGPATH -m $OUTPUT_ROOT/uncygdrive.exe`
15323    cd $OUTPUT_ROOT
15324    $CC $UNCYGDRIVE_SRC /Fe$UNCYGDRIVE > $OUTPUT_ROOT/uncygdrive1.log 2>&1
15325    cd $CURDIR
15326
15327    if test ! -x $OUTPUT_ROOT/uncygdrive.exe; then
15328        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15329$as_echo "no" >&6; }
15330        cat $OUTPUT_ROOT/uncygdrive1.log
15331        as_fn_error $? "Could not create $OUTPUT_ROOT/uncygdrive.exe" "$LINENO" 5
15332    fi
15333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNCYGDRIVE" >&5
15334$as_echo "$UNCYGDRIVE" >&6; }
15335    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if uncygdrive.exe works" >&5
15336$as_echo_n "checking if uncygdrive.exe works... " >&6; }
15337    cd $OUTPUT_ROOT
15338    $UNCYGDRIVE $CC $SRC_ROOT/common/src/uncygdrive.c /Fe$OUTPUT_ROOT/uncygdrive2.exe > $OUTPUT_ROOT/uncygdrive2.log 2>&1
15339    cd $CURDIR
15340    if test ! -x $OUTPUT_ROOT/uncygdrive2.exe; then
15341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15342$as_echo "no" >&6; }
15343        cat $OUTPUT_ROOT/uncygdrive2.log
15344        as_fn_error $? "Uncygdrive did not work!" "$LINENO" 5
15345    fi
15346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15347$as_echo "yes" >&6; }
15348    rm -f $OUTPUT_ROOT/uncygdrive?.??? $OUTPUT_ROOT/uncygdrive.obj
15349    # The path to uncygdrive to use should be Unix-style
15350    UNCYGDRIVE="$OUTPUT_ROOT/uncygdrive.exe"
15351fi
15352
15353
15354
15355
15356
15357# Setup debug symbols (need objcopy from the toolchain for that)
15358
15359#
15360# ENABLE_DEBUG_SYMBOLS
15361# This must be done after the toolchain is setup, since we're looking at objcopy.
15362#
15363ENABLE_DEBUG_SYMBOLS=default
15364
15365# default on macosx is no...
15366if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15367   ENABLE_DEBUG_SYMBOLS=no
15368fi
15369
15370# Check whether --enable-debug-symbols was given.
15371if test "${enable_debug_symbols+set}" = set; then :
15372  enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
15373fi
15374
15375
15376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
15377$as_echo_n "checking if we should generate debug symbols... " >&6; }
15378
15379if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
15380   # explicit enabling of enable-debug-symbols and can't find objcopy
15381   #   this is an error
15382   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
15383fi
15384
15385if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
15386  # Default is on if objcopy is found, otherwise off
15387  if test "x$OBJCOPY" != x; then
15388     ENABLE_DEBUG_SYMBOLS=yes
15389  else
15390     ENABLE_DEBUG_SYMBOLS=no
15391  fi
15392fi
15393
15394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
15395$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
15396
15397#
15398# ZIP_DEBUGINFO_FILES
15399#
15400ZIP_DEBUGINFO_FILES=yes
15401
15402# Check whether --enable-zip-debug-info was given.
15403if test "${enable_zip_debug_info+set}" = set; then :
15404  enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
15405fi
15406
15407
15408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
15409$as_echo_n "checking if we should zip debug-info files... " >&6; }
15410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP_DEBUGINFO_FILES" >&5
15411$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
15412
15413# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
15414#   use that...
15415if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
15416   ZIP_DEBUGINFO_FILES=1
15417else
15418   ZIP_DEBUGINFO_FILES=0
15419fi
15420
15421
15422
15423
15424
15425
15426
15427###############################################################################
15428#
15429# Check dependencies for external and internal libraries.
15430#
15431###############################################################################
15432
15433
15434
15435###############################################################################
15436#
15437# OS specific settings that we never will need to probe.
15438#
15439if test "x$OPENJDK_TARGET_OS" = xlinux; then
15440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
15441$as_echo_n "checking what is not needed on Linux?... " >&6; }
15442    PULSE_NOT_NEEDED=yes
15443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
15444$as_echo "pulse" >&6; }
15445fi
15446
15447if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
15449$as_echo_n "checking what is not needed on Solaris?... " >&6; }
15450    ALSA_NOT_NEEDED=yes
15451    PULSE_NOT_NEEDED=yes
15452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
15453$as_echo "alsa pulse" >&6; }
15454fi
15455
15456if test "x$OPENJDK_TARGET_OS" = xwindows; then
15457    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
15458$as_echo_n "checking what is not needed on Windows?... " >&6; }
15459    CUPS_NOT_NEEDED=yes
15460    ALSA_NOT_NEEDED=yes
15461    PULSE_NOT_NEEDED=yes
15462    X11_NOT_NEEDED=yes
15463    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
15464$as_echo "alsa cups pulse x11" >&6; }
15465fi
15466
15467if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15468    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
15469$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
15470    ALSA_NOT_NEEDED=yes
15471    PULSE_NOT_NEEDED=yes
15472    X11_NOT_NEEDED=yes
15473    FREETYPE2_NOT_NEEDED=yes
15474    # If the java runtime framework is disabled, then we need X11.
15475    # This will be adjusted below.
15476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
15477$as_echo "alsa pulse x11" >&6; }
15478fi
15479
15480if test "x$OPENJDK_TARGET_OS" = xbsd; then
15481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
15482$as_echo_n "checking what is not needed on bsd?... " >&6; }
15483    ALSA_NOT_NEEDED=yes
15484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
15485$as_echo "alsa" >&6; }
15486fi
15487
15488if test "x$OPENJDK" = "xfalse"; then
15489    FREETYPE2_NOT_NEEDED=yes
15490fi
15491
15492if test "x$SUPPORT_HEADFUL" = xno; then
15493    X11_NOT_NEEDED=yes
15494fi
15495
15496###############################################################################
15497#
15498# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
15499# that uses this API.
15500#
15501# Check whether --enable-macosx-runtime-support was given.
15502if test "${enable_macosx_runtime_support+set}" = set; then :
15503  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
15504else
15505  MACOSX_RUNTIME_SUPPORT="no"
15506fi
15507
15508
15509USE_MACOSX_RUNTIME_SUPPORT=no
15510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
15511$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
15512if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
15513    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
15514        MACOSX_RUNTIME_SUPPORT=yes
15515        USE_MACOSX_RUNTIME_SUPPORT=yes
15516        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
15517$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
15518    else
15519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
15520$as_echo "yes, but explicitly disabled." >&6; }
15521    fi
15522else
15523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15524$as_echo "no" >&6; }
15525fi
15526
15527if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
15528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
15529$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
15530    X11_NOT_NEEDED=
15531    FREETYPE2_NOT_NEEDED=
15532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
15533$as_echo "alsa pulse" >&6; }
15534fi
15535
15536
15537
15538
15539
15540###############################################################################
15541#
15542# Check for X Windows
15543#
15544
15545# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
15546# Make a simple check for the libraries at the sysroot, and setup --x-includes and
15547# --x-libraries for the sysroot, if that seems to be correct.
15548if test "x$SYS_ROOT" != "x/"; then
15549  if test "x$x_includes" = xNONE; then
15550    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
15551      x_includes="$SYS_ROOT/usr/X11R6/include"
15552    fi
15553  fi
15554  if test "x$x_libraries" = xNONE; then
15555    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
15556      x_libraries="$SYS_ROOT/usr/X11R6/lib"
15557    fi
15558  fi
15559fi
15560
15561# Now let autoconf do it's magic
15562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
15563$as_echo_n "checking for X... " >&6; }
15564
15565
15566# Check whether --with-x was given.
15567if test "${with_x+set}" = set; then :
15568  withval=$with_x;
15569fi
15570
15571# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
15572if test "x$with_x" = xno; then
15573  # The user explicitly disabled X.
15574  have_x=disabled
15575else
15576  case $x_includes,$x_libraries in #(
15577    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
15578    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15579  $as_echo_n "(cached) " >&6
15580else
15581  # One or both of the vars are not set, and there is no cached value.
15582ac_x_includes=no ac_x_libraries=no
15583rm -f -r conftest.dir
15584if mkdir conftest.dir; then
15585  cd conftest.dir
15586  cat >Imakefile <<'_ACEOF'
15587incroot:
15588	@echo incroot='${INCROOT}'
15589usrlibdir:
15590	@echo usrlibdir='${USRLIBDIR}'
15591libdir:
15592	@echo libdir='${LIBDIR}'
15593_ACEOF
15594  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
15595    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
15596    for ac_var in incroot usrlibdir libdir; do
15597      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
15598    done
15599    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
15600    for ac_extension in a so sl dylib la dll; do
15601      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
15602	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
15603	ac_im_usrlibdir=$ac_im_libdir; break
15604      fi
15605    done
15606    # Screen out bogus values from the imake configuration.  They are
15607    # bogus both because they are the default anyway, and because
15608    # using them would break gcc on systems where it needs fixed includes.
15609    case $ac_im_incroot in
15610	/usr/include) ac_x_includes= ;;
15611	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
15612    esac
15613    case $ac_im_usrlibdir in
15614	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
15615	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
15616    esac
15617  fi
15618  cd ..
15619  rm -f -r conftest.dir
15620fi
15621
15622# Standard set of common directories for X headers.
15623# Check X11 before X11Rn because it is often a symlink to the current release.
15624ac_x_header_dirs='
15625/usr/X11/include
15626/usr/X11R7/include
15627/usr/X11R6/include
15628/usr/X11R5/include
15629/usr/X11R4/include
15630
15631/usr/include/X11
15632/usr/include/X11R7
15633/usr/include/X11R6
15634/usr/include/X11R5
15635/usr/include/X11R4
15636
15637/usr/local/X11/include
15638/usr/local/X11R7/include
15639/usr/local/X11R6/include
15640/usr/local/X11R5/include
15641/usr/local/X11R4/include
15642
15643/usr/local/include/X11
15644/usr/local/include/X11R7
15645/usr/local/include/X11R6
15646/usr/local/include/X11R5
15647/usr/local/include/X11R4
15648
15649/usr/X386/include
15650/usr/x386/include
15651/usr/XFree86/include/X11
15652
15653/usr/include
15654/usr/local/include
15655/usr/unsupported/include
15656/usr/athena/include
15657/usr/local/x11r5/include
15658/usr/lpp/Xamples/include
15659
15660/usr/openwin/include
15661/usr/openwin/share/include'
15662
15663if test "$ac_x_includes" = no; then
15664  # Guess where to find include files, by looking for Xlib.h.
15665  # First, try using that file with no special directory specified.
15666  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15667/* end confdefs.h.  */
15668#include <X11/Xlib.h>
15669_ACEOF
15670if ac_fn_cxx_try_cpp "$LINENO"; then :
15671  # We can compile using X headers with no special include directory.
15672ac_x_includes=
15673else
15674  for ac_dir in $ac_x_header_dirs; do
15675  if test -r "$ac_dir/X11/Xlib.h"; then
15676    ac_x_includes=$ac_dir
15677    break
15678  fi
15679done
15680fi
15681rm -f conftest.err conftest.i conftest.$ac_ext
15682fi # $ac_x_includes = no
15683
15684if test "$ac_x_libraries" = no; then
15685  # Check for the libraries.
15686  # See if we find them without any special options.
15687  # Don't add to $LIBS permanently.
15688  ac_save_LIBS=$LIBS
15689  LIBS="-lX11 $LIBS"
15690  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15691/* end confdefs.h.  */
15692#include <X11/Xlib.h>
15693int
15694main ()
15695{
15696XrmInitialize ()
15697  ;
15698  return 0;
15699}
15700_ACEOF
15701if ac_fn_cxx_try_link "$LINENO"; then :
15702  LIBS=$ac_save_LIBS
15703# We can link X programs with no special library path.
15704ac_x_libraries=
15705else
15706  LIBS=$ac_save_LIBS
15707for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
15708do
15709  # Don't even attempt the hair of trying to link an X program!
15710  for ac_extension in a so sl dylib la dll; do
15711    if test -r "$ac_dir/libX11.$ac_extension"; then
15712      ac_x_libraries=$ac_dir
15713      break 2
15714    fi
15715  done
15716done
15717fi
15718rm -f core conftest.err conftest.$ac_objext \
15719    conftest$ac_exeext conftest.$ac_ext
15720fi # $ac_x_libraries = no
15721
15722case $ac_x_includes,$ac_x_libraries in #(
15723  no,* | *,no | *\'*)
15724    # Didn't find X, or a directory has "'" in its name.
15725    ac_cv_have_x="have_x=no";; #(
15726  *)
15727    # Record where we found X for the cache.
15728    ac_cv_have_x="have_x=yes\
15729	ac_x_includes='$ac_x_includes'\
15730	ac_x_libraries='$ac_x_libraries'"
15731esac
15732fi
15733;; #(
15734    *) have_x=yes;;
15735  esac
15736  eval "$ac_cv_have_x"
15737fi # $with_x != no
15738
15739if test "$have_x" != yes; then
15740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
15741$as_echo "$have_x" >&6; }
15742  no_x=yes
15743else
15744  # If each of the values was on the command line, it overrides each guess.
15745  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
15746  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
15747  # Update the cache value to reflect the command line values.
15748  ac_cv_have_x="have_x=yes\
15749	ac_x_includes='$x_includes'\
15750	ac_x_libraries='$x_libraries'"
15751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
15752$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
15753fi
15754
15755if test "$no_x" = yes; then
15756  # Not all programs may use this symbol, but it does not hurt to define it.
15757
15758$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
15759
15760  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
15761else
15762  if test -n "$x_includes"; then
15763    X_CFLAGS="$X_CFLAGS -I$x_includes"
15764  fi
15765
15766  # It would also be nice to do this for all -L options, not just this one.
15767  if test -n "$x_libraries"; then
15768    X_LIBS="$X_LIBS -L$x_libraries"
15769    # For Solaris; some versions of Sun CC require a space after -R and
15770    # others require no space.  Words are not sufficient . . . .
15771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
15772$as_echo_n "checking whether -R must be followed by a space... " >&6; }
15773    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
15774    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
15775    ac_cxx_werror_flag=yes
15776    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15777/* end confdefs.h.  */
15778
15779int
15780main ()
15781{
15782
15783  ;
15784  return 0;
15785}
15786_ACEOF
15787if ac_fn_cxx_try_link "$LINENO"; then :
15788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15789$as_echo "no" >&6; }
15790       X_LIBS="$X_LIBS -R$x_libraries"
15791else
15792  LIBS="$ac_xsave_LIBS -R $x_libraries"
15793       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15794/* end confdefs.h.  */
15795
15796int
15797main ()
15798{
15799
15800  ;
15801  return 0;
15802}
15803_ACEOF
15804if ac_fn_cxx_try_link "$LINENO"; then :
15805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15806$as_echo "yes" >&6; }
15807	  X_LIBS="$X_LIBS -R $x_libraries"
15808else
15809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
15810$as_echo "neither works" >&6; }
15811fi
15812rm -f core conftest.err conftest.$ac_objext \
15813    conftest$ac_exeext conftest.$ac_ext
15814fi
15815rm -f core conftest.err conftest.$ac_objext \
15816    conftest$ac_exeext conftest.$ac_ext
15817    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
15818    LIBS=$ac_xsave_LIBS
15819  fi
15820
15821  # Check for system-dependent libraries X programs must link with.
15822  # Do this before checking for the system-independent R6 libraries
15823  # (-lICE), since we may need -lsocket or whatever for X linking.
15824
15825  if test "$ISC" = yes; then
15826    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
15827  else
15828    # Martyn Johnson says this is needed for Ultrix, if the X
15829    # libraries were built with DECnet support.  And Karl Berry says
15830    # the Alpha needs dnet_stub (dnet does not exist).
15831    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
15832    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15833/* end confdefs.h.  */
15834
15835/* Override any GCC internal prototype to avoid an error.
15836   Use char because int might match the return type of a GCC
15837   builtin and then its argument prototype would still apply.  */
15838#ifdef __cplusplus
15839extern "C"
15840#endif
15841char XOpenDisplay ();
15842int
15843main ()
15844{
15845return XOpenDisplay ();
15846  ;
15847  return 0;
15848}
15849_ACEOF
15850if ac_fn_cxx_try_link "$LINENO"; then :
15851
15852else
15853  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
15854$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
15855if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
15856  $as_echo_n "(cached) " >&6
15857else
15858  ac_check_lib_save_LIBS=$LIBS
15859LIBS="-ldnet  $LIBS"
15860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15861/* end confdefs.h.  */
15862
15863/* Override any GCC internal prototype to avoid an error.
15864   Use char because int might match the return type of a GCC
15865   builtin and then its argument prototype would still apply.  */
15866#ifdef __cplusplus
15867extern "C"
15868#endif
15869char dnet_ntoa ();
15870int
15871main ()
15872{
15873return dnet_ntoa ();
15874  ;
15875  return 0;
15876}
15877_ACEOF
15878if ac_fn_cxx_try_link "$LINENO"; then :
15879  ac_cv_lib_dnet_dnet_ntoa=yes
15880else
15881  ac_cv_lib_dnet_dnet_ntoa=no
15882fi
15883rm -f core conftest.err conftest.$ac_objext \
15884    conftest$ac_exeext conftest.$ac_ext
15885LIBS=$ac_check_lib_save_LIBS
15886fi
15887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
15888$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
15889if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
15890  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
15891fi
15892
15893    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
15894      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
15895$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
15896if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
15897  $as_echo_n "(cached) " >&6
15898else
15899  ac_check_lib_save_LIBS=$LIBS
15900LIBS="-ldnet_stub  $LIBS"
15901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15902/* end confdefs.h.  */
15903
15904/* Override any GCC internal prototype to avoid an error.
15905   Use char because int might match the return type of a GCC
15906   builtin and then its argument prototype would still apply.  */
15907#ifdef __cplusplus
15908extern "C"
15909#endif
15910char dnet_ntoa ();
15911int
15912main ()
15913{
15914return dnet_ntoa ();
15915  ;
15916  return 0;
15917}
15918_ACEOF
15919if ac_fn_cxx_try_link "$LINENO"; then :
15920  ac_cv_lib_dnet_stub_dnet_ntoa=yes
15921else
15922  ac_cv_lib_dnet_stub_dnet_ntoa=no
15923fi
15924rm -f core conftest.err conftest.$ac_objext \
15925    conftest$ac_exeext conftest.$ac_ext
15926LIBS=$ac_check_lib_save_LIBS
15927fi
15928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
15929$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
15930if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
15931  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
15932fi
15933
15934    fi
15935fi
15936rm -f core conftest.err conftest.$ac_objext \
15937    conftest$ac_exeext conftest.$ac_ext
15938    LIBS="$ac_xsave_LIBS"
15939
15940    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
15941    # to get the SysV transport functions.
15942    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
15943    # needs -lnsl.
15944    # The nsl library prevents programs from opening the X display
15945    # on Irix 5.2, according to T.E. Dickey.
15946    # The functions gethostbyname, getservbyname, and inet_addr are
15947    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
15948    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
15949if test "x$ac_cv_func_gethostbyname" = x""yes; then :
15950
15951fi
15952
15953    if test $ac_cv_func_gethostbyname = no; then
15954      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
15955$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
15956if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
15957  $as_echo_n "(cached) " >&6
15958else
15959  ac_check_lib_save_LIBS=$LIBS
15960LIBS="-lnsl  $LIBS"
15961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15962/* end confdefs.h.  */
15963
15964/* Override any GCC internal prototype to avoid an error.
15965   Use char because int might match the return type of a GCC
15966   builtin and then its argument prototype would still apply.  */
15967#ifdef __cplusplus
15968extern "C"
15969#endif
15970char gethostbyname ();
15971int
15972main ()
15973{
15974return gethostbyname ();
15975  ;
15976  return 0;
15977}
15978_ACEOF
15979if ac_fn_cxx_try_link "$LINENO"; then :
15980  ac_cv_lib_nsl_gethostbyname=yes
15981else
15982  ac_cv_lib_nsl_gethostbyname=no
15983fi
15984rm -f core conftest.err conftest.$ac_objext \
15985    conftest$ac_exeext conftest.$ac_ext
15986LIBS=$ac_check_lib_save_LIBS
15987fi
15988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
15989$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
15990if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
15991  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
15992fi
15993
15994      if test $ac_cv_lib_nsl_gethostbyname = no; then
15995	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
15996$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
15997if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
15998  $as_echo_n "(cached) " >&6
15999else
16000  ac_check_lib_save_LIBS=$LIBS
16001LIBS="-lbsd  $LIBS"
16002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16003/* end confdefs.h.  */
16004
16005/* Override any GCC internal prototype to avoid an error.
16006   Use char because int might match the return type of a GCC
16007   builtin and then its argument prototype would still apply.  */
16008#ifdef __cplusplus
16009extern "C"
16010#endif
16011char gethostbyname ();
16012int
16013main ()
16014{
16015return gethostbyname ();
16016  ;
16017  return 0;
16018}
16019_ACEOF
16020if ac_fn_cxx_try_link "$LINENO"; then :
16021  ac_cv_lib_bsd_gethostbyname=yes
16022else
16023  ac_cv_lib_bsd_gethostbyname=no
16024fi
16025rm -f core conftest.err conftest.$ac_objext \
16026    conftest$ac_exeext conftest.$ac_ext
16027LIBS=$ac_check_lib_save_LIBS
16028fi
16029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
16030$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
16031if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
16032  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
16033fi
16034
16035      fi
16036    fi
16037
16038    # lieder@skyler.mavd.honeywell.com says without -lsocket,
16039    # socket/setsockopt and other routines are undefined under SCO ODT
16040    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
16041    # on later versions), says Simon Leinen: it contains gethostby*
16042    # variants that don't use the name server (or something).  -lsocket
16043    # must be given before -lnsl if both are needed.  We assume that
16044    # if connect needs -lnsl, so does gethostbyname.
16045    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
16046if test "x$ac_cv_func_connect" = x""yes; then :
16047
16048fi
16049
16050    if test $ac_cv_func_connect = no; then
16051      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
16052$as_echo_n "checking for connect in -lsocket... " >&6; }
16053if test "${ac_cv_lib_socket_connect+set}" = set; then :
16054  $as_echo_n "(cached) " >&6
16055else
16056  ac_check_lib_save_LIBS=$LIBS
16057LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
16058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16059/* end confdefs.h.  */
16060
16061/* Override any GCC internal prototype to avoid an error.
16062   Use char because int might match the return type of a GCC
16063   builtin and then its argument prototype would still apply.  */
16064#ifdef __cplusplus
16065extern "C"
16066#endif
16067char connect ();
16068int
16069main ()
16070{
16071return connect ();
16072  ;
16073  return 0;
16074}
16075_ACEOF
16076if ac_fn_cxx_try_link "$LINENO"; then :
16077  ac_cv_lib_socket_connect=yes
16078else
16079  ac_cv_lib_socket_connect=no
16080fi
16081rm -f core conftest.err conftest.$ac_objext \
16082    conftest$ac_exeext conftest.$ac_ext
16083LIBS=$ac_check_lib_save_LIBS
16084fi
16085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
16086$as_echo "$ac_cv_lib_socket_connect" >&6; }
16087if test "x$ac_cv_lib_socket_connect" = x""yes; then :
16088  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
16089fi
16090
16091    fi
16092
16093    # Guillermo Gomez says -lposix is necessary on A/UX.
16094    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
16095if test "x$ac_cv_func_remove" = x""yes; then :
16096
16097fi
16098
16099    if test $ac_cv_func_remove = no; then
16100      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
16101$as_echo_n "checking for remove in -lposix... " >&6; }
16102if test "${ac_cv_lib_posix_remove+set}" = set; then :
16103  $as_echo_n "(cached) " >&6
16104else
16105  ac_check_lib_save_LIBS=$LIBS
16106LIBS="-lposix  $LIBS"
16107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16108/* end confdefs.h.  */
16109
16110/* Override any GCC internal prototype to avoid an error.
16111   Use char because int might match the return type of a GCC
16112   builtin and then its argument prototype would still apply.  */
16113#ifdef __cplusplus
16114extern "C"
16115#endif
16116char remove ();
16117int
16118main ()
16119{
16120return remove ();
16121  ;
16122  return 0;
16123}
16124_ACEOF
16125if ac_fn_cxx_try_link "$LINENO"; then :
16126  ac_cv_lib_posix_remove=yes
16127else
16128  ac_cv_lib_posix_remove=no
16129fi
16130rm -f core conftest.err conftest.$ac_objext \
16131    conftest$ac_exeext conftest.$ac_ext
16132LIBS=$ac_check_lib_save_LIBS
16133fi
16134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
16135$as_echo "$ac_cv_lib_posix_remove" >&6; }
16136if test "x$ac_cv_lib_posix_remove" = x""yes; then :
16137  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
16138fi
16139
16140    fi
16141
16142    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
16143    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
16144if test "x$ac_cv_func_shmat" = x""yes; then :
16145
16146fi
16147
16148    if test $ac_cv_func_shmat = no; then
16149      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
16150$as_echo_n "checking for shmat in -lipc... " >&6; }
16151if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
16152  $as_echo_n "(cached) " >&6
16153else
16154  ac_check_lib_save_LIBS=$LIBS
16155LIBS="-lipc  $LIBS"
16156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16157/* end confdefs.h.  */
16158
16159/* Override any GCC internal prototype to avoid an error.
16160   Use char because int might match the return type of a GCC
16161   builtin and then its argument prototype would still apply.  */
16162#ifdef __cplusplus
16163extern "C"
16164#endif
16165char shmat ();
16166int
16167main ()
16168{
16169return shmat ();
16170  ;
16171  return 0;
16172}
16173_ACEOF
16174if ac_fn_cxx_try_link "$LINENO"; then :
16175  ac_cv_lib_ipc_shmat=yes
16176else
16177  ac_cv_lib_ipc_shmat=no
16178fi
16179rm -f core conftest.err conftest.$ac_objext \
16180    conftest$ac_exeext conftest.$ac_ext
16181LIBS=$ac_check_lib_save_LIBS
16182fi
16183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
16184$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
16185if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
16186  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
16187fi
16188
16189    fi
16190  fi
16191
16192  # Check for libraries that X11R6 Xt/Xaw programs need.
16193  ac_save_LDFLAGS=$LDFLAGS
16194  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
16195  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
16196  # check for ICE first), but we must link in the order -lSM -lICE or
16197  # we get undefined symbols.  So assume we have SM if we have ICE.
16198  # These have to be linked with before -lX11, unlike the other
16199  # libraries we check for below, so use a different variable.
16200  # John Interrante, Karl Berry
16201  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
16202$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
16203if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
16204  $as_echo_n "(cached) " >&6
16205else
16206  ac_check_lib_save_LIBS=$LIBS
16207LIBS="-lICE $X_EXTRA_LIBS $LIBS"
16208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16209/* end confdefs.h.  */
16210
16211/* Override any GCC internal prototype to avoid an error.
16212   Use char because int might match the return type of a GCC
16213   builtin and then its argument prototype would still apply.  */
16214#ifdef __cplusplus
16215extern "C"
16216#endif
16217char IceConnectionNumber ();
16218int
16219main ()
16220{
16221return IceConnectionNumber ();
16222  ;
16223  return 0;
16224}
16225_ACEOF
16226if ac_fn_cxx_try_link "$LINENO"; then :
16227  ac_cv_lib_ICE_IceConnectionNumber=yes
16228else
16229  ac_cv_lib_ICE_IceConnectionNumber=no
16230fi
16231rm -f core conftest.err conftest.$ac_objext \
16232    conftest$ac_exeext conftest.$ac_ext
16233LIBS=$ac_check_lib_save_LIBS
16234fi
16235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
16236$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
16237if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
16238  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
16239fi
16240
16241  LDFLAGS=$ac_save_LDFLAGS
16242
16243fi
16244
16245
16246if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
16247
16248    # Print a helpful message on how to acquire the necessary build dependency.
16249    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
16250    MISSING_DEPENDENCY=x11
16251    PKGHANDLER_COMMAND=
16252
16253    case $PKGHANDLER in
16254	apt-get)
16255                apt_help     $MISSING_DEPENDENCY ;;
16256    yum)
16257                yum_help     $MISSING_DEPENDENCY ;;
16258	port)
16259                port_help    $MISSING_DEPENDENCY ;;
16260	pkgutil)
16261                pkgutil_help $MISSING_DEPENDENCY ;;
16262	pkgadd)
16263                pkgadd_help  $MISSING_DEPENDENCY ;;
16264    * )
16265      break ;;
16266    esac
16267
16268    if test "x$PKGHANDLER_COMMAND" != x; then
16269        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
16270    fi
16271
16272    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
16273fi
16274
16275# Some of the old makefiles require a setting of OPENWIN_HOME
16276# Since the X11R6 directory has disappeared on later Linuxes,
16277# we need to probe for it.
16278if test "x$OPENJDK_TARGET_OS" = xlinux; then
16279    if test -d "$SYS_ROOT/usr/X11R6"; then
16280        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
16281    fi
16282    if test -d "$SYS_ROOT/usr/include/X11"; then
16283        OPENWIN_HOME="$SYS_ROOT/usr"
16284    fi
16285fi
16286if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16287    OPENWIN_HOME="/usr/openwin"
16288fi
16289
16290
16291
16292#
16293# Weird Sol10 something check...TODO change to try compile
16294#
16295if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
16296  if test "`uname -r`" = "5.10"; then
16297     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
16298     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
16299     fi
16300  fi
16301fi
16302
16303ac_ext=c
16304ac_cpp='$CPP $CPPFLAGS'
16305ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16306ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16307ac_compiler_gnu=$ac_cv_c_compiler_gnu
16308
16309OLD_CFLAGS="$CFLAGS"
16310CFLAGS="$CFLAGS $X_CFLAGS"
16311for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
16312do :
16313  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16314ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16315if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16316  cat >>confdefs.h <<_ACEOF
16317#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16318_ACEOF
16319 X11_A_OK=yes
16320else
16321  X11_A_OK=no
16322fi
16323
16324done
16325
16326CFLAGS="$OLD_CFLAGS"
16327ac_ext=cpp
16328ac_cpp='$CXXCPP $CPPFLAGS'
16329ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16330ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16331ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16332
16333
16334if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
16335
16336    # Print a helpful message on how to acquire the necessary build dependency.
16337    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
16338    MISSING_DEPENDENCY=x11
16339    PKGHANDLER_COMMAND=
16340
16341    case $PKGHANDLER in
16342	apt-get)
16343                apt_help     $MISSING_DEPENDENCY ;;
16344    yum)
16345                yum_help     $MISSING_DEPENDENCY ;;
16346	port)
16347                port_help    $MISSING_DEPENDENCY ;;
16348	pkgutil)
16349                pkgutil_help $MISSING_DEPENDENCY ;;
16350	pkgadd)
16351                pkgadd_help  $MISSING_DEPENDENCY ;;
16352    * )
16353      break ;;
16354    esac
16355
16356    if test "x$PKGHANDLER_COMMAND" != x; then
16357        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
16358    fi
16359
16360    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
16361fi
16362
16363
16364
16365
16366
16367
16368###############################################################################
16369#
16370# The common unix printing system cups is used to print from java.
16371#
16372
16373# Check whether --with-cups was given.
16374if test "${with_cups+set}" = set; then :
16375  withval=$with_cups;
16376fi
16377
16378
16379# Check whether --with-cups-include was given.
16380if test "${with_cups_include+set}" = set; then :
16381  withval=$with_cups_include;
16382fi
16383
16384
16385# Check whether --with-cups-lib was given.
16386if test "${with_cups_lib+set}" = set; then :
16387  withval=$with_cups_lib;
16388fi
16389
16390
16391if test "x$CUPS_NOT_NEEDED" = xyes; then
16392	if test "x${with_cups}" != x || test "x${with_cups_include}" != x || test "x${with_cups_lib}" != x; then
16393		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
16394$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
16395	fi
16396	CUPS_CFLAGS=
16397	CUPS_LIBS=
16398else
16399	CUPS_FOUND=no
16400
16401	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno || test "x${with_cups_lib}" = xno; then
16402	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
16403	fi
16404
16405	if test "x${with_cups}" != x; then
16406	    CUPS_LIBS="-L${with_cups}/lib -lcups"
16407	    CUPS_CFLAGS="-I${with_cups}/include"
16408	    CUPS_FOUND=yes
16409	fi
16410	if test "x${with_cups_include}" != x; then
16411	    CUPS_CFLAGS="-I${with_cups_include}"
16412	    CUPS_FOUND=yes
16413	fi
16414	if test "x${with_cups_lib}" != x; then
16415	    CUPS_LIBS="-L${with_cups_lib} -lcups"
16416	    CUPS_FOUND=yes
16417	fi
16418	if test "x$CUPS_FOUND" = xno; then
16419
16420
16421    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
16422        # Source the builddeps file again, to make sure it uses the latest variables!
16423        . $builddepsfile
16424        # Look for a target and build machine specific resource!
16425        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
16426        if test "x$resource" = x; then
16427            # Ok, lets instead look for a target specific resource
16428            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
16429        fi
16430        if test "x$resource" = x; then
16431            # Ok, lets instead look for a build specific resource
16432            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
16433        fi
16434        if test "x$resource" = x; then
16435            # Ok, lets instead look for a generic resource
16436            # (The cups comes from M4 and not the shell, thus no need for eval here.)
16437            resource=${builddep_cups}
16438        fi
16439        if test "x$resource" != x; then
16440            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
16441$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
16442	    # If the resource in the builddeps.conf file is an existing directory,
16443	    # for example /java/linux/cups
16444	    if test -d ${resource}; then
16445	       depdir=${resource}
16446	    else
16447
16448# cups is for example mymodule
16449# $resource is for example libs/general/libmymod_1_2_3.zip
16450# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
16451# $with_builddeps_dir is for example /localhome/builddeps
16452# depdir is the name of the variable into which we store the depdir, eg MYMOD
16453# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
16454# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
16455    filename=`basename $resource`
16456    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
16457    filebase=${filename%%.*}
16458    extension=${filename#*.}
16459    installdir=$with_builddeps_dir/$filebase
16460    if test ! -f $installdir/$filename.unpacked; then
16461        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
16462$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
16463        if test ! -d $installdir; then
16464            mkdir -p $installdir
16465        fi
16466        if test ! -d $installdir; then
16467            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
16468        fi
16469        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
16470        touch $tmpfile
16471        if test ! -f $tmpfile; then
16472            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
16473        fi
16474
16475    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
16476    # $tmpfile is the local file name for the downloaded file.
16477    VALID_TOOL=no
16478    if test "x$BDEPS_FTP" = xwget; then
16479       VALID_TOOL=yes
16480       wget -O $tmpfile $with_builddeps_server/$resource
16481    fi
16482    if test "x$BDEPS_FTP" = xlftp; then
16483       VALID_TOOL=yes
16484       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
16485    fi
16486    if test "x$BDEPS_FTP" = xftp; then
16487        VALID_TOOL=yes
16488        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
16489        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
16490        FTPUSERPWD=${FTPSERVER%%@*}
16491        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
16492            FTPUSER=${userpwd%%:*}
16493            FTPPWD=${userpwd#*@}
16494            FTPSERVER=${FTPSERVER#*@}
16495        else
16496            FTPUSER=ftp
16497            FTPPWD=ftp
16498        fi
16499        # the "pass" command does not work on some
16500        # ftp clients (read ftp.exe) but if it works,
16501        # passive mode is better!
16502        (\
16503            echo "user $FTPUSER $FTPPWD"        ;\
16504            echo "pass"                         ;\
16505            echo "bin"                          ;\
16506            echo "get $FTPPATH $tmpfile"              ;\
16507        ) | ftp -in $FTPSERVER
16508    fi
16509    if test "x$VALID_TOOL" != xyes; then
16510       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
16511    fi
16512
16513        mv $tmpfile $installdir/$filename
16514        if test ! -s $installdir/$filename; then
16515            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
16516        fi
16517        case "$extension" in
16518            zip)  echo "Unzipping $installdir/$filename..."
16519               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
16520            ;;
16521            tar.gz) echo "Untaring $installdir/$filename..."
16522               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
16523            ;;
16524            tgz) echo "Untaring $installdir/$filename..."
16525               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
16526            ;;
16527            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
16528            ;;
16529        esac
16530    fi
16531    if test -f $installdir/$filename.unpacked; then
16532        depdir=$installdir
16533    fi
16534
16535	    fi
16536            # Source the builddeps file again, because in the previous command, the depdir
16537            # was updated to point at the current build dependency install directory.
16538            . $builddepsfile
16539            # Now extract variables from the builddeps.conf files.
16540            theroot=${builddep_cups_ROOT}
16541            thecflags=${builddep_cups_CFLAGS}
16542            thelibs=${builddep_cups_LIBS}
16543            if test "x$depdir" = x; then
16544                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
16545            fi
16546            CUPS=$depdir
16547            if test "x$theroot" != x; then
16548               CUPS="$theroot"
16549            fi
16550            if test "x$thecflags" != x; then
16551               CUPS_CFLAGS="$thecflags"
16552            fi
16553            if test "x$thelibs" != x; then
16554               CUPS_LIBS="$thelibs"
16555            fi
16556            CUPS_FOUND=yes
16557
16558        fi
16559
16560    fi
16561
16562	fi
16563	if test "x$CUPS_FOUND" = xno; then
16564	    # Are the cups headers installed in the default /usr/include location?
16565	    for ac_header in cups/cups.h cups/ppd.h
16566do :
16567  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16568ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16569if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16570  cat >>confdefs.h <<_ACEOF
16571#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16572_ACEOF
16573 CUPS_FOUND=yes
16574	                      CUPS_CFLAGS=
16575	                      CUPS_LIBS="-lcups"
16576	                      DEFAULT_CUPS=yes
16577fi
16578
16579done
16580
16581	fi
16582	if test "x$CUPS_FOUND" = xno; then
16583	    # Getting nervous now? Lets poke around for standard Solaris third-party
16584	    # package installation locations.
16585	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers and libs" >&5
16586$as_echo_n "checking for cups headers and libs... " >&6; }
16587	    if test -s /opt/sfw/cups/include/cups/cups.h; then
16588	       # An SFW package seems to be installed!
16589	       CUPS_FOUND=yes
16590	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
16591	       CUPS_LIBS="-L/opt/sfw/cups/lib -lcups"
16592	    elif test -s /opt/csw/include/cups/cups.h; then
16593	       # A CSW package seems to be installed!
16594	       CUPS_FOUND=yes
16595	       CUPS_CFLAGS="-I/opt/csw/include"
16596	       CUPS_LIBS="-L/opt/csw/lib -lcups"
16597	    fi
16598	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
16599$as_echo "$CUPS_FOUND" >&6; }
16600	fi
16601	if test "x$CUPS_FOUND" = xno; then
16602
16603    # Print a helpful message on how to acquire the necessary build dependency.
16604    # cups is the help tag: freetyp2, cups, pulse, alsa etc
16605    MISSING_DEPENDENCY=cups
16606    PKGHANDLER_COMMAND=
16607
16608    case $PKGHANDLER in
16609	apt-get)
16610                apt_help     $MISSING_DEPENDENCY ;;
16611    yum)
16612                yum_help     $MISSING_DEPENDENCY ;;
16613	port)
16614                port_help    $MISSING_DEPENDENCY ;;
16615	pkgutil)
16616                pkgutil_help $MISSING_DEPENDENCY ;;
16617	pkgadd)
16618                pkgadd_help  $MISSING_DEPENDENCY ;;
16619    * )
16620      break ;;
16621    esac
16622
16623    if test "x$PKGHANDLER_COMMAND" != x; then
16624        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
16625    fi
16626
16627	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
16628	fi
16629fi
16630
16631
16632
16633
16634
16635
16636
16637###############################################################################
16638#
16639# The ubiquitous freetype2 library is used to render fonts.
16640#
16641
16642# Check whether --with-freetype was given.
16643if test "${with_freetype+set}" = set; then :
16644  withval=$with_freetype;
16645fi
16646
16647
16648# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
16649USING_SYSTEM_FT_LIB=false
16650
16651if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
16652	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
16653		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
16654$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
16655	fi
16656	FREETYPE2_CFLAGS=
16657	FREETYPE2_LIBS=
16658        FREETYPE2_LIB_PATH=
16659else
16660	FREETYPE2_FOUND=no
16661
16662	if test "x$with_freetype" != x; then
16663
16664    # Fail with message the path to freetype if var with_freetype contains a path with no spaces in it.
16665    # Unless on Windows, where we can rewrite the path.
16666    HAS_SPACE=`echo "$with_freetype" | grep " "`
16667    if test "x$HAS_SPACE" != x; then
16668        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16669            # First convert it to DOS-style, short mode (no spaces)
16670            with_freetype=`$CYGPATH -s -m -a "$with_freetype"`
16671            # Now it's case insensitive; let's make it lowercase to improve readability
16672            with_freetype=`$ECHO "$with_freetype" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
16673            # Now convert it back to Unix-stile (cygpath)
16674            with_freetype=`$CYGPATH -u "$with_freetype"`
16675        else
16676            as_fn_error $? "You cannot have spaces in the path to freetype! \"$with_freetype\"" "$LINENO" 5
16677        fi
16678    fi
16679
16680	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
16681            if test "x$OPENJDK_TARGET_OS" = xwindows; then
16682                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
16683            fi
16684            FREETYPE2_LIB_PATH="$with_freetype/lib"
16685	    FREETYPE2_CFLAGS="-I$with_freetype/include"
16686            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
16687                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
16688            fi
16689	    FREETYPE2_FOUND=yes
16690   	    if test "x$FREETYPE2_FOUND" = xyes; then
16691	        # Verify that the directories exist
16692                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
16693		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
16694		fi
16695	        # List the contents of the lib.
16696		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
16697                if test "x$FREETYPELIB" = x; then
16698		   as_fn_error $? "Could not find libfreetype.se nor freetype.dll in $with_freetype/lib" "$LINENO" 5
16699		fi
16700	        # Check one h-file
16701                if ! test -s "$with_freetype/include/ft2build.h"; then
16702		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
16703		fi
16704            fi
16705        fi
16706	if test "x$FREETYPE2_FOUND" = xno; then
16707
16708
16709    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
16710        # Source the builddeps file again, to make sure it uses the latest variables!
16711        . $builddepsfile
16712        # Look for a target and build machine specific resource!
16713        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
16714        if test "x$resource" = x; then
16715            # Ok, lets instead look for a target specific resource
16716            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
16717        fi
16718        if test "x$resource" = x; then
16719            # Ok, lets instead look for a build specific resource
16720            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
16721        fi
16722        if test "x$resource" = x; then
16723            # Ok, lets instead look for a generic resource
16724            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
16725            resource=${builddep_freetype2}
16726        fi
16727        if test "x$resource" != x; then
16728            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
16729$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
16730	    # If the resource in the builddeps.conf file is an existing directory,
16731	    # for example /java/linux/cups
16732	    if test -d ${resource}; then
16733	       depdir=${resource}
16734	    else
16735
16736# freetype2 is for example mymodule
16737# $resource is for example libs/general/libmymod_1_2_3.zip
16738# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
16739# $with_builddeps_dir is for example /localhome/builddeps
16740# depdir is the name of the variable into which we store the depdir, eg MYMOD
16741# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
16742# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
16743    filename=`basename $resource`
16744    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
16745    filebase=${filename%%.*}
16746    extension=${filename#*.}
16747    installdir=$with_builddeps_dir/$filebase
16748    if test ! -f $installdir/$filename.unpacked; then
16749        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
16750$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
16751        if test ! -d $installdir; then
16752            mkdir -p $installdir
16753        fi
16754        if test ! -d $installdir; then
16755            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
16756        fi
16757        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
16758        touch $tmpfile
16759        if test ! -f $tmpfile; then
16760            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
16761        fi
16762
16763    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
16764    # $tmpfile is the local file name for the downloaded file.
16765    VALID_TOOL=no
16766    if test "x$BDEPS_FTP" = xwget; then
16767       VALID_TOOL=yes
16768       wget -O $tmpfile $with_builddeps_server/$resource
16769    fi
16770    if test "x$BDEPS_FTP" = xlftp; then
16771       VALID_TOOL=yes
16772       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
16773    fi
16774    if test "x$BDEPS_FTP" = xftp; then
16775        VALID_TOOL=yes
16776        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
16777        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
16778        FTPUSERPWD=${FTPSERVER%%@*}
16779        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
16780            FTPUSER=${userpwd%%:*}
16781            FTPPWD=${userpwd#*@}
16782            FTPSERVER=${FTPSERVER#*@}
16783        else
16784            FTPUSER=ftp
16785            FTPPWD=ftp
16786        fi
16787        # the "pass" command does not work on some
16788        # ftp clients (read ftp.exe) but if it works,
16789        # passive mode is better!
16790        (\
16791            echo "user $FTPUSER $FTPPWD"        ;\
16792            echo "pass"                         ;\
16793            echo "bin"                          ;\
16794            echo "get $FTPPATH $tmpfile"              ;\
16795        ) | ftp -in $FTPSERVER
16796    fi
16797    if test "x$VALID_TOOL" != xyes; then
16798       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
16799    fi
16800
16801        mv $tmpfile $installdir/$filename
16802        if test ! -s $installdir/$filename; then
16803            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
16804        fi
16805        case "$extension" in
16806            zip)  echo "Unzipping $installdir/$filename..."
16807               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
16808            ;;
16809            tar.gz) echo "Untaring $installdir/$filename..."
16810               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
16811            ;;
16812            tgz) echo "Untaring $installdir/$filename..."
16813               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
16814            ;;
16815            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
16816            ;;
16817        esac
16818    fi
16819    if test -f $installdir/$filename.unpacked; then
16820        depdir=$installdir
16821    fi
16822
16823	    fi
16824            # Source the builddeps file again, because in the previous command, the depdir
16825            # was updated to point at the current build dependency install directory.
16826            . $builddepsfile
16827            # Now extract variables from the builddeps.conf files.
16828            theroot=${builddep_freetype2_ROOT}
16829            thecflags=${builddep_freetype2_CFLAGS}
16830            thelibs=${builddep_freetype2_LIBS}
16831            if test "x$depdir" = x; then
16832                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
16833            fi
16834            FREETYPE2=$depdir
16835            if test "x$theroot" != x; then
16836               FREETYPE2="$theroot"
16837            fi
16838            if test "x$thecflags" != x; then
16839               FREETYPE2_CFLAGS="$thecflags"
16840            fi
16841            if test "x$thelibs" != x; then
16842               FREETYPE2_LIBS="$thelibs"
16843            fi
16844            FREETYPE2_FOUND=yes
16845            else FREETYPE2_FOUND=no
16846
16847        fi
16848        else FREETYPE2_FOUND=no
16849
16850    fi
16851
16852            USING_SYSTEM_FT_LIB=true
16853	fi
16854	if test "x$FREETYPE2_FOUND" = xno; then
16855
16856pkg_failed=no
16857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
16858$as_echo_n "checking for FREETYPE2... " >&6; }
16859
16860if test -n "$FREETYPE2_CFLAGS"; then
16861    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
16862 elif test -n "$PKG_CONFIG"; then
16863    if test -n "$PKG_CONFIG" && \
16864    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
16865  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
16866  ac_status=$?
16867  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16868  test $ac_status = 0; }; then
16869  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
16870else
16871  pkg_failed=yes
16872fi
16873 else
16874    pkg_failed=untried
16875fi
16876if test -n "$FREETYPE2_LIBS"; then
16877    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
16878 elif test -n "$PKG_CONFIG"; then
16879    if test -n "$PKG_CONFIG" && \
16880    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
16881  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
16882  ac_status=$?
16883  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16884  test $ac_status = 0; }; then
16885  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
16886else
16887  pkg_failed=yes
16888fi
16889 else
16890    pkg_failed=untried
16891fi
16892
16893
16894
16895if test $pkg_failed = yes; then
16896
16897if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
16898        _pkg_short_errors_supported=yes
16899else
16900        _pkg_short_errors_supported=no
16901fi
16902        if test $_pkg_short_errors_supported = yes; then
16903	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
16904        else
16905	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
16906        fi
16907	# Put the nasty error message in config.log where it belongs
16908	echo "$FREETYPE2_PKG_ERRORS" >&5
16909
16910	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16911$as_echo "no" >&6; }
16912                FREETYPE2_FOUND=no
16913elif test $pkg_failed = untried; then
16914	FREETYPE2_FOUND=no
16915else
16916	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
16917	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
16918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16919$as_echo "yes" >&6; }
16920	FREETYPE2_FOUND=yes
16921fi
16922            USING_SYSTEM_FT_LIB=true
16923	fi
16924	if test "x$FREETYPE2_FOUND" = xno; then
16925	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
16926$as_echo_n "checking for freetype in some standard locations... " >&6; }
16927
16928	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
16929	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
16930	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
16931	    fi
16932	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
16933	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
16934	        DEFAULT_FREETYPE_LIBS="-lfreetype"
16935	    fi
16936
16937	    PREV_CXXCFLAGS="$CXXFLAGS"
16938	    PREV_LDFLAGS="$LDFLAGS"
16939	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
16940	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
16941	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16942/* end confdefs.h.  */
16943#include<ft2build.h>
16944	                    #include FT_FREETYPE_H
16945	                   int main() { return 0; }
16946
16947_ACEOF
16948if ac_fn_cxx_try_link "$LINENO"; then :
16949
16950	                      # Yes, the default cflags and libs did the trick.
16951	                      FREETYPE2_FOUND=yes
16952	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
16953	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
16954
16955else
16956
16957	                      FREETYPE2_FOUND=no
16958
16959fi
16960rm -f core conftest.err conftest.$ac_objext \
16961    conftest$ac_exeext conftest.$ac_ext
16962            CXXCFLAGS="$PREV_CXXFLAGS"
16963	    LDFLAGS="$PREV_LDFLAGS"
16964	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
16965$as_echo "$FREETYPE2_FOUND" >&6; }
16966            USING_SYSTEM_FT_LIB=true
16967	fi
16968	if test "x$FREETYPE2_FOUND" = xno; then
16969
16970    # Print a helpful message on how to acquire the necessary build dependency.
16971    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
16972    MISSING_DEPENDENCY=freetype2
16973    PKGHANDLER_COMMAND=
16974
16975    case $PKGHANDLER in
16976	apt-get)
16977                apt_help     $MISSING_DEPENDENCY ;;
16978    yum)
16979                yum_help     $MISSING_DEPENDENCY ;;
16980	port)
16981                port_help    $MISSING_DEPENDENCY ;;
16982	pkgutil)
16983                pkgutil_help $MISSING_DEPENDENCY ;;
16984	pkgadd)
16985                pkgadd_help  $MISSING_DEPENDENCY ;;
16986    * )
16987      break ;;
16988    esac
16989
16990    if test "x$PKGHANDLER_COMMAND" != x; then
16991        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
16992    fi
16993
16994		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
16995	fi
16996fi
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006###############################################################################
17007#
17008# Check for alsa headers and libraries. Used on Linux/GNU systems.
17009#
17010
17011# Check whether --with-alsa was given.
17012if test "${with_alsa+set}" = set; then :
17013  withval=$with_alsa;
17014fi
17015
17016
17017# Check whether --with-alsa-include was given.
17018if test "${with_alsa_include+set}" = set; then :
17019  withval=$with_alsa_include;
17020fi
17021
17022
17023# Check whether --with-alsa-lib was given.
17024if test "${with_alsa_lib+set}" = set; then :
17025  withval=$with_alsa_lib;
17026fi
17027
17028
17029if test "x$ALSA_NOT_NEEDED" = xyes; then
17030	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
17031		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
17032$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
17033	fi
17034	ALSA_CFLAGS=
17035	ALSA_LIBS=
17036else
17037	ALSA_FOUND=no
17038
17039	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
17040	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
17041	fi
17042
17043	if test "x${with_alsa}" != x; then
17044	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
17045	    ALSA_CFLAGS="-I${with_alsa}/include"
17046	    ALSA_FOUND=yes
17047	fi
17048	if test "x${with_alsa_include}" != x; then
17049	    ALSA_CFLAGS="-I${with_alsa_include}"
17050	    ALSA_FOUND=yes
17051	fi
17052	if test "x${with_alsa_lib}" != x; then
17053	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
17054	    ALSA_FOUND=yes
17055	fi
17056	if test "x$ALSA_FOUND" = xno; then
17057
17058
17059    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17060        # Source the builddeps file again, to make sure it uses the latest variables!
17061        . $builddepsfile
17062        # Look for a target and build machine specific resource!
17063        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17064        if test "x$resource" = x; then
17065            # Ok, lets instead look for a target specific resource
17066            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
17067        fi
17068        if test "x$resource" = x; then
17069            # Ok, lets instead look for a build specific resource
17070            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
17071        fi
17072        if test "x$resource" = x; then
17073            # Ok, lets instead look for a generic resource
17074            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
17075            resource=${builddep_alsa}
17076        fi
17077        if test "x$resource" != x; then
17078            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
17079$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
17080	    # If the resource in the builddeps.conf file is an existing directory,
17081	    # for example /java/linux/cups
17082	    if test -d ${resource}; then
17083	       depdir=${resource}
17084	    else
17085
17086# alsa is for example mymodule
17087# $resource is for example libs/general/libmymod_1_2_3.zip
17088# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17089# $with_builddeps_dir is for example /localhome/builddeps
17090# depdir is the name of the variable into which we store the depdir, eg MYMOD
17091# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17092# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17093    filename=`basename $resource`
17094    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17095    filebase=${filename%%.*}
17096    extension=${filename#*.}
17097    installdir=$with_builddeps_dir/$filebase
17098    if test ! -f $installdir/$filename.unpacked; then
17099        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
17100$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17101        if test ! -d $installdir; then
17102            mkdir -p $installdir
17103        fi
17104        if test ! -d $installdir; then
17105            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17106        fi
17107        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
17108        touch $tmpfile
17109        if test ! -f $tmpfile; then
17110            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17111        fi
17112
17113    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17114    # $tmpfile is the local file name for the downloaded file.
17115    VALID_TOOL=no
17116    if test "x$BDEPS_FTP" = xwget; then
17117       VALID_TOOL=yes
17118       wget -O $tmpfile $with_builddeps_server/$resource
17119    fi
17120    if test "x$BDEPS_FTP" = xlftp; then
17121       VALID_TOOL=yes
17122       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17123    fi
17124    if test "x$BDEPS_FTP" = xftp; then
17125        VALID_TOOL=yes
17126        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17127        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17128        FTPUSERPWD=${FTPSERVER%%@*}
17129        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17130            FTPUSER=${userpwd%%:*}
17131            FTPPWD=${userpwd#*@}
17132            FTPSERVER=${FTPSERVER#*@}
17133        else
17134            FTPUSER=ftp
17135            FTPPWD=ftp
17136        fi
17137        # the "pass" command does not work on some
17138        # ftp clients (read ftp.exe) but if it works,
17139        # passive mode is better!
17140        (\
17141            echo "user $FTPUSER $FTPPWD"        ;\
17142            echo "pass"                         ;\
17143            echo "bin"                          ;\
17144            echo "get $FTPPATH $tmpfile"              ;\
17145        ) | ftp -in $FTPSERVER
17146    fi
17147    if test "x$VALID_TOOL" != xyes; then
17148       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17149    fi
17150
17151        mv $tmpfile $installdir/$filename
17152        if test ! -s $installdir/$filename; then
17153            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17154        fi
17155        case "$extension" in
17156            zip)  echo "Unzipping $installdir/$filename..."
17157               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17158            ;;
17159            tar.gz) echo "Untaring $installdir/$filename..."
17160               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17161            ;;
17162            tgz) echo "Untaring $installdir/$filename..."
17163               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17164            ;;
17165            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17166            ;;
17167        esac
17168    fi
17169    if test -f $installdir/$filename.unpacked; then
17170        depdir=$installdir
17171    fi
17172
17173	    fi
17174            # Source the builddeps file again, because in the previous command, the depdir
17175            # was updated to point at the current build dependency install directory.
17176            . $builddepsfile
17177            # Now extract variables from the builddeps.conf files.
17178            theroot=${builddep_alsa_ROOT}
17179            thecflags=${builddep_alsa_CFLAGS}
17180            thelibs=${builddep_alsa_LIBS}
17181            if test "x$depdir" = x; then
17182                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
17183            fi
17184            ALSA=$depdir
17185            if test "x$theroot" != x; then
17186               ALSA="$theroot"
17187            fi
17188            if test "x$thecflags" != x; then
17189               ALSA_CFLAGS="$thecflags"
17190            fi
17191            if test "x$thelibs" != x; then
17192               ALSA_LIBS="$thelibs"
17193            fi
17194            ALSA_FOUND=yes
17195            else ALSA_FOUND=no
17196
17197        fi
17198        else ALSA_FOUND=no
17199
17200    fi
17201
17202	fi
17203	if test "x$ALSA_FOUND" = xno; then
17204
17205pkg_failed=no
17206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
17207$as_echo_n "checking for ALSA... " >&6; }
17208
17209if test -n "$ALSA_CFLAGS"; then
17210    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
17211 elif test -n "$PKG_CONFIG"; then
17212    if test -n "$PKG_CONFIG" && \
17213    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
17214  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
17215  ac_status=$?
17216  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17217  test $ac_status = 0; }; then
17218  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
17219else
17220  pkg_failed=yes
17221fi
17222 else
17223    pkg_failed=untried
17224fi
17225if test -n "$ALSA_LIBS"; then
17226    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
17227 elif test -n "$PKG_CONFIG"; then
17228    if test -n "$PKG_CONFIG" && \
17229    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
17230  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
17231  ac_status=$?
17232  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17233  test $ac_status = 0; }; then
17234  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
17235else
17236  pkg_failed=yes
17237fi
17238 else
17239    pkg_failed=untried
17240fi
17241
17242
17243
17244if test $pkg_failed = yes; then
17245
17246if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
17247        _pkg_short_errors_supported=yes
17248else
17249        _pkg_short_errors_supported=no
17250fi
17251        if test $_pkg_short_errors_supported = yes; then
17252	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
17253        else
17254	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
17255        fi
17256	# Put the nasty error message in config.log where it belongs
17257	echo "$ALSA_PKG_ERRORS" >&5
17258
17259	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17260$as_echo "no" >&6; }
17261                ALSA_FOUND=no
17262elif test $pkg_failed = untried; then
17263	ALSA_FOUND=no
17264else
17265	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
17266	ALSA_LIBS=$pkg_cv_ALSA_LIBS
17267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17268$as_echo "yes" >&6; }
17269	ALSA_FOUND=yes
17270fi
17271	fi
17272	if test "x$ALSA_FOUND" = xno; then
17273	    for ac_header in alsa/asoundlib.h
17274do :
17275  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
17276if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
17277  cat >>confdefs.h <<_ACEOF
17278#define HAVE_ALSA_ASOUNDLIB_H 1
17279_ACEOF
17280 ALSA_FOUND=yes
17281	                      ALSA_CFLAGS=-Iignoreme
17282	                      ALSA_LIBS=-lasound
17283	                      DEFAULT_ALSA=yes
17284else
17285  ALSA_FOUND=no
17286fi
17287
17288done
17289
17290	fi
17291	if test "x$ALSA_FOUND" = xno; then
17292
17293    # Print a helpful message on how to acquire the necessary build dependency.
17294    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
17295    MISSING_DEPENDENCY=alsa
17296    PKGHANDLER_COMMAND=
17297
17298    case $PKGHANDLER in
17299	apt-get)
17300                apt_help     $MISSING_DEPENDENCY ;;
17301    yum)
17302                yum_help     $MISSING_DEPENDENCY ;;
17303	port)
17304                port_help    $MISSING_DEPENDENCY ;;
17305	pkgutil)
17306                pkgutil_help $MISSING_DEPENDENCY ;;
17307	pkgadd)
17308                pkgadd_help  $MISSING_DEPENDENCY ;;
17309    * )
17310      break ;;
17311    esac
17312
17313    if test "x$PKGHANDLER_COMMAND" != x; then
17314        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
17315    fi
17316
17317	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
17318	fi
17319fi
17320
17321
17322
17323
17324
17325
17326
17327###############################################################################
17328#
17329# Check for the jpeg library
17330#
17331
17332USE_EXTERNAL_LIBJPEG=true
17333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
17334$as_echo_n "checking for main in -ljpeg... " >&6; }
17335if test "${ac_cv_lib_jpeg_main+set}" = set; then :
17336  $as_echo_n "(cached) " >&6
17337else
17338  ac_check_lib_save_LIBS=$LIBS
17339LIBS="-ljpeg  $LIBS"
17340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17341/* end confdefs.h.  */
17342
17343
17344int
17345main ()
17346{
17347return main ();
17348  ;
17349  return 0;
17350}
17351_ACEOF
17352if ac_fn_cxx_try_link "$LINENO"; then :
17353  ac_cv_lib_jpeg_main=yes
17354else
17355  ac_cv_lib_jpeg_main=no
17356fi
17357rm -f core conftest.err conftest.$ac_objext \
17358    conftest$ac_exeext conftest.$ac_ext
17359LIBS=$ac_check_lib_save_LIBS
17360fi
17361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
17362$as_echo "$ac_cv_lib_jpeg_main" >&6; }
17363if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
17364  cat >>confdefs.h <<_ACEOF
17365#define HAVE_LIBJPEG 1
17366_ACEOF
17367
17368  LIBS="-ljpeg $LIBS"
17369
17370else
17371   USE_EXTERNAL_LIBJPEG=false
17372               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
17373$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
17374
17375fi
17376
17377
17378
17379###############################################################################
17380#
17381# Check for the gif library
17382#
17383
17384USE_EXTERNAL_LIBJPEG=true
17385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
17386$as_echo_n "checking for main in -lgif... " >&6; }
17387if test "${ac_cv_lib_gif_main+set}" = set; then :
17388  $as_echo_n "(cached) " >&6
17389else
17390  ac_check_lib_save_LIBS=$LIBS
17391LIBS="-lgif  $LIBS"
17392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17393/* end confdefs.h.  */
17394
17395
17396int
17397main ()
17398{
17399return main ();
17400  ;
17401  return 0;
17402}
17403_ACEOF
17404if ac_fn_cxx_try_link "$LINENO"; then :
17405  ac_cv_lib_gif_main=yes
17406else
17407  ac_cv_lib_gif_main=no
17408fi
17409rm -f core conftest.err conftest.$ac_objext \
17410    conftest$ac_exeext conftest.$ac_ext
17411LIBS=$ac_check_lib_save_LIBS
17412fi
17413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
17414$as_echo "$ac_cv_lib_gif_main" >&6; }
17415if test "x$ac_cv_lib_gif_main" = x""yes; then :
17416  cat >>confdefs.h <<_ACEOF
17417#define HAVE_LIBGIF 1
17418_ACEOF
17419
17420  LIBS="-lgif $LIBS"
17421
17422else
17423   USE_EXTERNAL_LIBGIF=false
17424               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
17425$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
17426
17427fi
17428
17429
17430
17431###############################################################################
17432#
17433# Check for the zlib library
17434#
17435
17436
17437# Check whether --with-zlib was given.
17438if test "${with_zlib+set}" = set; then :
17439  withval=$with_zlib;
17440fi
17441
17442
17443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
17444$as_echo_n "checking for compress in -lz... " >&6; }
17445if test "${ac_cv_lib_z_compress+set}" = set; then :
17446  $as_echo_n "(cached) " >&6
17447else
17448  ac_check_lib_save_LIBS=$LIBS
17449LIBS="-lz  $LIBS"
17450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17451/* end confdefs.h.  */
17452
17453/* Override any GCC internal prototype to avoid an error.
17454   Use char because int might match the return type of a GCC
17455   builtin and then its argument prototype would still apply.  */
17456#ifdef __cplusplus
17457extern "C"
17458#endif
17459char compress ();
17460int
17461main ()
17462{
17463return compress ();
17464  ;
17465  return 0;
17466}
17467_ACEOF
17468if ac_fn_cxx_try_link "$LINENO"; then :
17469  ac_cv_lib_z_compress=yes
17470else
17471  ac_cv_lib_z_compress=no
17472fi
17473rm -f core conftest.err conftest.$ac_objext \
17474    conftest$ac_exeext conftest.$ac_ext
17475LIBS=$ac_check_lib_save_LIBS
17476fi
17477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
17478$as_echo "$ac_cv_lib_z_compress" >&6; }
17479if test "x$ac_cv_lib_z_compress" = x""yes; then :
17480   ZLIB_FOUND=yes
17481else
17482   ZLIB_FOUND=no
17483fi
17484
17485
17486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
17487$as_echo_n "checking for which zlib to use... " >&6; }
17488
17489DEFAULT_ZLIB=bundled
17490if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17491#
17492# On macosx default is system...on others default is
17493#
17494    DEFAULT_ZLIB=system
17495fi
17496
17497if test "x${ZLIB_FOUND}" != "xyes"; then
17498#
17499# If we don't find any system...set default to bundled
17500#
17501    DEFAULT_ZLIB=bundled
17502fi
17503
17504#
17505# If user didn't specify, use DEFAULT_ZLIB
17506#
17507if test "x${with_zlib}" = "x"; then
17508    with_zlib=${DEFAULT_ZLIB}
17509fi
17510
17511if test "x${with_zlib}" = "xbundled"; then
17512    USE_EXTERNAL_LIBZ=false
17513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
17514$as_echo "bundled" >&6; }
17515elif test "x${with_zlib}" = "xsystem"; then
17516    if test "x${ZLIB_FOUND}" = "xyes"; then
17517        USE_EXTERNAL_LIBZ=true
17518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
17519$as_echo "system" >&6; }
17520    else
17521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
17522$as_echo "system not found" >&6; }
17523        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
17524    fi
17525else
17526    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
17527fi
17528
17529
17530
17531###############################################################################
17532LIBZIP_CAN_USE_MMAP=true
17533
17534
17535
17536###############################################################################
17537#
17538# Check if altzone exists in time.h
17539#
17540
17541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17542/* end confdefs.h.  */
17543#include <time.h>
17544int
17545main ()
17546{
17547return (int)altzone;
17548  ;
17549  return 0;
17550}
17551_ACEOF
17552if ac_fn_cxx_try_link "$LINENO"; then :
17553  has_altzone=yes
17554else
17555  has_altzone=no
17556fi
17557rm -f core conftest.err conftest.$ac_objext \
17558    conftest$ac_exeext conftest.$ac_ext
17559if test "x$has_altzone" = xyes; then
17560
17561$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
17562
17563fi
17564
17565###############################################################################
17566#
17567# Check the maths library
17568#
17569
17570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
17571$as_echo_n "checking for cos in -lm... " >&6; }
17572if test "${ac_cv_lib_m_cos+set}" = set; then :
17573  $as_echo_n "(cached) " >&6
17574else
17575  ac_check_lib_save_LIBS=$LIBS
17576LIBS="-lm  $LIBS"
17577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17578/* end confdefs.h.  */
17579
17580/* Override any GCC internal prototype to avoid an error.
17581   Use char because int might match the return type of a GCC
17582   builtin and then its argument prototype would still apply.  */
17583#ifdef __cplusplus
17584extern "C"
17585#endif
17586char cos ();
17587int
17588main ()
17589{
17590return cos ();
17591  ;
17592  return 0;
17593}
17594_ACEOF
17595if ac_fn_cxx_try_link "$LINENO"; then :
17596  ac_cv_lib_m_cos=yes
17597else
17598  ac_cv_lib_m_cos=no
17599fi
17600rm -f core conftest.err conftest.$ac_objext \
17601    conftest$ac_exeext conftest.$ac_ext
17602LIBS=$ac_check_lib_save_LIBS
17603fi
17604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
17605$as_echo "$ac_cv_lib_m_cos" >&6; }
17606if test "x$ac_cv_lib_m_cos" = x""yes; then :
17607  cat >>confdefs.h <<_ACEOF
17608#define HAVE_LIBM 1
17609_ACEOF
17610
17611  LIBS="-lm $LIBS"
17612
17613else
17614
17615                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
17616$as_echo "$as_me: Maths library was not found" >&6;}
17617
17618fi
17619
17620
17621
17622###############################################################################
17623#
17624# Check for libdl.so
17625
17626save_LIBS="$LIBS"
17627LIBS=""
17628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
17629$as_echo_n "checking for dlopen in -ldl... " >&6; }
17630if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
17631  $as_echo_n "(cached) " >&6
17632else
17633  ac_check_lib_save_LIBS=$LIBS
17634LIBS="-ldl  $LIBS"
17635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17636/* end confdefs.h.  */
17637
17638/* Override any GCC internal prototype to avoid an error.
17639   Use char because int might match the return type of a GCC
17640   builtin and then its argument prototype would still apply.  */
17641#ifdef __cplusplus
17642extern "C"
17643#endif
17644char dlopen ();
17645int
17646main ()
17647{
17648return dlopen ();
17649  ;
17650  return 0;
17651}
17652_ACEOF
17653if ac_fn_cxx_try_link "$LINENO"; then :
17654  ac_cv_lib_dl_dlopen=yes
17655else
17656  ac_cv_lib_dl_dlopen=no
17657fi
17658rm -f core conftest.err conftest.$ac_objext \
17659    conftest$ac_exeext conftest.$ac_ext
17660LIBS=$ac_check_lib_save_LIBS
17661fi
17662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
17663$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
17664if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
17665  cat >>confdefs.h <<_ACEOF
17666#define HAVE_LIBDL 1
17667_ACEOF
17668
17669  LIBS="-ldl $LIBS"
17670
17671fi
17672
17673LIBDL="$LIBS"
17674
17675LIBS="$save_LIBS"
17676
17677
17678
17679###############################################################################
17680#
17681# statically link libstdc++ before C++ ABI is stablized on Linux unless
17682# dynamic build is configured on command line.
17683#
17684# Check whether --enable-static-link-stdc++ was given.
17685if test "${enable_static_link_stdc__+set}" = set; then :
17686  enableval=$enable_static_link_stdc__;
17687else
17688
17689		enable_static_link_stdc__=yes
17690
17691fi
17692
17693
17694if test "x$OPENJDK_TARGET_OS" = xlinux; then
17695    # Test if -lstdc++ works.
17696    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
17697$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
17698    ac_ext=cpp
17699ac_cpp='$CXXCPP $CPPFLAGS'
17700ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17701ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17702ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17703
17704    OLD_CXXFLAGS="$CXXFLAGS"
17705    CXXFLAGS="$CXXFLAGS -lstdc++"
17706    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17707/* end confdefs.h.  */
17708
17709int
17710main ()
17711{
17712return 0;
17713  ;
17714  return 0;
17715}
17716_ACEOF
17717if ac_fn_cxx_try_link "$LINENO"; then :
17718  has_dynamic_libstdcxx=yes
17719else
17720  has_dynamic_libstdcxx=no
17721fi
17722rm -f core conftest.err conftest.$ac_objext \
17723    conftest$ac_exeext conftest.$ac_ext
17724    CXXFLAGS="$OLD_CXXFLAGS"
17725    ac_ext=cpp
17726ac_cpp='$CXXCPP $CPPFLAGS'
17727ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17728ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17729ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17730
17731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
17732$as_echo "$has_dynamic_libstdcxx" >&6; }
17733
17734    # Test if stdc++ can be linked statically.
17735    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
17736$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
17737    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
17738    ac_ext=cpp
17739ac_cpp='$CXXCPP $CPPFLAGS'
17740ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17741ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17742ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17743
17744    OLD_LIBS="$LIBS"
17745    OLD_CXX="$CXX"
17746    LIBS="$STATIC_STDCXX_FLAGS"
17747    CXX="$CC"
17748    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17749/* end confdefs.h.  */
17750
17751int
17752main ()
17753{
17754return 0;
17755  ;
17756  return 0;
17757}
17758_ACEOF
17759if ac_fn_cxx_try_link "$LINENO"; then :
17760  has_static_libstdcxx=yes
17761else
17762  has_static_libstdcxx=no
17763fi
17764rm -f core conftest.err conftest.$ac_objext \
17765    conftest$ac_exeext conftest.$ac_ext
17766    LIBS="$OLD_LIBS"
17767    CXX="$OLD_CXX"
17768    ac_ext=cpp
17769ac_cpp='$CXXCPP $CPPFLAGS'
17770ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17771ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17772ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17773
17774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
17775$as_echo "$has_static_libstdcxx" >&6; }
17776
17777    if test "x$has_static_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
17778        as_fn_error $? "I cannot link to stdc++! Neither dynamically nor statically." "$LINENO" 5
17779    fi
17780
17781    if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
17782        { $as_echo "$as_me:${as_lineno-$LINENO}: Static linking of libstdc++ was not possible reverting to dynamic linking." >&5
17783$as_echo "$as_me: Static linking of libstdc++ was not possible reverting to dynamic linking." >&6;}
17784        enable_static_link_stdc__=no
17785    fi
17786
17787    if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
17788        { $as_echo "$as_me:${as_lineno-$LINENO}: Dynamic linking of libstdc++ was not possible reverting to static linking." >&5
17789$as_echo "$as_me: Dynamic linking of libstdc++ was not possible reverting to static linking." >&6;}
17790        enable_static_link_stdc__=yes
17791    fi
17792
17793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
17794$as_echo_n "checking how to link with libstdc++... " >&6; }
17795    if test "x$enable_static_link_stdc__" = xyes; then
17796        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
17797        LDCXX="$CC"
17798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
17799$as_echo "static" >&6; }
17800    else
17801        LIBCXX="$LIBCXX -lstdc++"
17802        LDCXX="$CXX"
17803        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
17804$as_echo "dynamic" >&6; }
17805    fi
17806fi
17807
17808# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
17809if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
17810    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
17811fi
17812
17813# TODO better (platform agnostic) test
17814if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
17815    LIBCXX="-lstdc++"
17816fi
17817
17818
17819
17820
17821
17822###############################################################################
17823#
17824# We need to do some final tweaking, when everything else is done.
17825#
17826###############################################################################
17827
17828
17829HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
17830
17831
17832# The name of the Service Agent jar.
17833SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
17834if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
17835    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
17836fi
17837
17838
17839
17840
17841###############################################################################
17842#
17843# Configure parts of the build that only affect the build performance,
17844# not the result.
17845#
17846###############################################################################
17847
17848
17849# How many cores do we have on this build system?
17850
17851# Check whether --with-num-cores was given.
17852if test "${with_num_cores+set}" = set; then :
17853  withval=$with_num_cores;
17854fi
17855
17856if test "x$with_num_cores" = x; then
17857    # The number of cores were not specified, try to probe them.
17858
17859    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
17860$as_echo_n "checking for number of cores... " >&6; }
17861    NUM_CORES=1
17862    FOUND_CORES=no
17863
17864    if test -f /proc/cpuinfo; then
17865        # Looks like a Linux (or cygwin) system
17866        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
17867        FOUND_CORES=yes
17868    elif test -x /usr/sbin/psrinfo; then
17869        # Looks like a Solaris system
17870        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
17871        FOUND_CORES=yes
17872    elif test -x /usr/sbin/system_profiler; then
17873        # Looks like a MacOSX system
17874        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
17875        FOUND_CORES=yes
17876    fi
17877
17878    # For c/c++ code we run twice as many concurrent build
17879    # jobs than we have cores, otherwise we will stall on io.
17880    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
17881
17882    if test "x$FOUND_CORES" = xyes; then
17883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
17884$as_echo "$NUM_CORES" >&6; }
17885    else
17886        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1!" >&5
17887$as_echo "could not detect number of cores, defaulting to 1!" >&6; }
17888    fi
17889
17890
17891else
17892    NUM_CORES=$with_num_cores
17893    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
17894fi
17895
17896
17897
17898
17899# How much memory do we have on this build system?
17900
17901# Check whether --with-memory-size was given.
17902if test "${with_memory_size+set}" = set; then :
17903  withval=$with_memory_size;
17904fi
17905
17906if test "x$with_memory_size" = x; then
17907    # The memory size was not specified, try to probe it.
17908
17909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
17910$as_echo_n "checking for memory size... " >&6; }
17911    # Default to 1024 MB
17912    MEMORY_SIZE=1024
17913    FOUND_MEM=no
17914
17915    if test -f /proc/meminfo; then
17916        # Looks like a Linux (or cygwin) system
17917        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
17918        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
17919        FOUND_MEM=yes
17920    elif test -x /usr/sbin/prtconf; then
17921        # Looks like a Solaris system
17922        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
17923        FOUND_MEM=yes
17924    elif test -x /usr/sbin/system_profiler; then
17925        # Looks like a MacOSX system
17926        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
17927        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
17928        FOUND_MEM=yes
17929    elif test "x$build_os" = xwindows; then
17930        # Windows, but without cygwin
17931        MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print $4 }' | sed 's/,//'`
17932        FOUND_MEM=yes
17933    fi
17934
17935    if test "x$FOUND_MEM" = xyes; then
17936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
17937$as_echo "$MEMORY_SIZE MB" >&6; }
17938    else
17939        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size defaulting to 1024 MB!" >&5
17940$as_echo "could not detect memory size defaulting to 1024 MB!" >&6; }
17941    fi
17942
17943else
17944    MEMORY_SIZE=$with_memory_size
17945fi
17946
17947
17948
17949# Setup smart javac (after cores and memory have been setup)
17950
17951
17952# Check whether --with-sjavac-server-java was given.
17953if test "${with_sjavac_server_java+set}" = set; then :
17954  withval=$with_sjavac_server_java;
17955fi
17956
17957
17958if test "x$with_sjavac_server_java" != x; then
17959    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
17960    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
17961    if test "x$FOUND_VERSION" = x; then
17962        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
17963    fi
17964else
17965    SJAVAC_SERVER_JAVA=""
17966    # Hotspot specific options.
17967
17968    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
17969    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
17970    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
17971    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
17972    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
17973        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
17974    fi
17975
17976    # JRockit specific options.
17977
17978    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
17979    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
17980    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
17981    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
17982    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
17983        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
17984    fi
17985
17986    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
17987fi
17988
17989
17990
17991# Check whether --with-sjavac-server-cores was given.
17992if test "${with_sjavac_server_cores+set}" = set; then :
17993  withval=$with_sjavac_server_cores;
17994fi
17995
17996if test "x$with_sjavac_server_cores" != x; then
17997    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
17998else
17999    if test "$NUM_CORES" -gt 16; then
18000        # We set this arbitrary limit because we want to limit the heap
18001        # size of the javac server.
18002        # In the future we will make the javac compilers in the server
18003        # share more and more state, thus enabling us to use more and
18004        # more concurrent threads in the server.
18005        SJAVAC_SERVER_CORES="16"
18006    else
18007        SJAVAC_SERVER_CORES="$NUM_CORES"
18008    fi
18009
18010    if test "$MEMORY_SIZE" -gt "17000"; then
18011        MAX_HEAP_MEM=10000
18012
18013    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
18014    # If so, then append -d64 to SJAVAC_SERVER_JAVA
18015    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
18016    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
18017    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
18018        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
18019    fi
18020
18021
18022    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
18023    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
18024    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
18025    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
18026    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
18027        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
18028    fi
18029
18030    elif test "$MEMORY_SIZE" -gt "10000"; then
18031        MAX_HEAP_MEM=6000
18032
18033    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
18034    # If so, then append -d64 to SJAVAC_SERVER_JAVA
18035    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
18036    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
18037    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
18038        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
18039    fi
18040
18041
18042    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
18043    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
18044    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
18045    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
18046    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
18047        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
18048    fi
18049
18050    elif test "$MEMORY_SIZE" -gt "5000"; then
18051        MAX_HEAP_MEM=3000
18052
18053    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
18054    # If so, then append -d64 to SJAVAC_SERVER_JAVA
18055    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
18056    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
18057    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
18058        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
18059    fi
18060
18061
18062    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
18063    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
18064    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
18065    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
18066    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
18067        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
18068    fi
18069
18070    elif test "$MEMORY_SIZE" -gt "3800"; then
18071        MAX_HEAP_MEM=2500
18072
18073    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
18074    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
18075    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
18076    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
18077    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
18078        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
18079    fi
18080
18081    elif test "$MEMORY_SIZE" -gt "1900"; then
18082        MAX_HEAP_MEM=1200
18083
18084    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
18085    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
18086    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
18087    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
18088    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
18089        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
18090    fi
18091
18092    elif test "$MEMORY_SIZE" -gt "1000"; then
18093        MAX_HEAP_MEM=900
18094
18095    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
18096    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
18097    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
18098    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
18099    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
18100        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
18101    fi
18102
18103    else
18104        MAX_HEAP_MEM=512
18105
18106    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
18107    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
18108    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
18109    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
18110    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
18111        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
18112    fi
18113
18114    fi
18115
18116
18117    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
18118    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
18119    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
18120    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
18121    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
18122        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
18123    fi
18124
18125
18126    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
18127    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
18128    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
18129    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
18130    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
18131        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
18132    fi
18133
18134
18135    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
18136    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
18137    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
18138    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
18139    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
18140        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
18141    fi
18142
18143
18144    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
18145    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
18146        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
18147$as_echo_n "checking if number of server cores must be reduced... " >&6; }
18148        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
18149        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
18150$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
18151    fi
18152fi
18153
18154
18155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
18156$as_echo_n "checking whether to use sjavac... " >&6; }
18157# Check whether --enable-sjavac was given.
18158if test "${enable_sjavac+set}" = set; then :
18159  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
18160else
18161  ENABLE_SJAVAC='no'
18162fi
18163
18164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
18165$as_echo "$ENABLE_SJAVAC" >&6; }
18166
18167
18168if test "x$ENABLE_SJAVAC" = xyes; then
18169    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
18170else
18171    SJAVAC_SERVER_DIR=
18172fi
18173
18174
18175
18176
18177# Can the C/C++ compiler use precompiled headers?
18178
18179
18180###############################################################################
18181#
18182# Can the C/C++ compiler use precompiled headers?
18183#
18184# Check whether --enable-precompiled-headers was given.
18185if test "${enable_precompiled_headers+set}" = set; then :
18186  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled-headers}
18187else
18188  ENABLE_PRECOMPH=yes
18189fi
18190
18191
18192USE_PRECOMPILED_HEADER=1
18193if test "x$ENABLE_PRECOMPH" = xno; then
18194    USE_PRECOMPILED_HEADER=0
18195fi
18196
18197if test "x$ENABLE_PRECOMPH" = xyes; then
18198    # Check that the compiler actually supports precomp headers.
18199    if test "x$GCC" = xyes; then
18200         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
18201$as_echo_n "checking that precompiled headers work... " >&6; }
18202         echo "int alfa();" > conftest.h
18203         $CXX -x c++-header conftest.h -o conftest.hpp.gch
18204         if test ! -f conftest.hpp.gch; then
18205             echo Precompiled header is not working!
18206             USE_PRECOMPILED_HEADER=0
18207             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18208$as_echo "no" >&6; }
18209         else
18210             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18211$as_echo "yes" >&6; }
18212         fi
18213         rm -f conftest.h
18214    fi
18215fi
18216
18217
18218
18219
18220# Setup use of ccache, if available
18221
18222    # Check whether --enable-ccache was given.
18223if test "${enable_ccache+set}" = set; then :
18224  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
18225else
18226  ENABLE_CCACHE=yes
18227fi
18228
18229    if test "x$ENABLE_CCACHE" = xyes; then
18230        # Extract the first word of "ccache", so it can be a program name with args.
18231set dummy ccache; ac_word=$2
18232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18233$as_echo_n "checking for $ac_word... " >&6; }
18234if test "${ac_cv_path_CCACHE+set}" = set; then :
18235  $as_echo_n "(cached) " >&6
18236else
18237  case $CCACHE in
18238  [\\/]* | ?:[\\/]*)
18239  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
18240  ;;
18241  *)
18242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18243for as_dir in $PATH
18244do
18245  IFS=$as_save_IFS
18246  test -z "$as_dir" && as_dir=.
18247    for ac_exec_ext in '' $ac_executable_extensions; do
18248  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18249    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
18250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18251    break 2
18252  fi
18253done
18254  done
18255IFS=$as_save_IFS
18256
18257  ;;
18258esac
18259fi
18260CCACHE=$ac_cv_path_CCACHE
18261if test -n "$CCACHE"; then
18262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
18263$as_echo "$CCACHE" >&6; }
18264else
18265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18266$as_echo "no" >&6; }
18267fi
18268
18269
18270    else
18271        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
18272$as_echo_n "checking for ccache... " >&6; }
18273        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
18274$as_echo "explicitly disabled" >&6; }
18275        CCACHE=
18276    fi
18277
18278
18279
18280# Check whether --with-ccache-dir was given.
18281if test "${with_ccache_dir+set}" = set; then :
18282  withval=$with_ccache_dir;
18283fi
18284
18285
18286    if test "x$with_ccache_dir" != x; then
18287        # When using a non home ccache directory, assume the use is to share ccache files
18288        # with other users. Thus change the umask.
18289        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
18290    fi
18291    CCACHE_FOUND=""
18292    if test "x$CCACHE" != x; then
18293
18294    if test "x$CCACHE" != x; then
18295        CCACHE_FOUND="true"
18296        # Only use ccache if it is 3.1.4 or later, which supports
18297        # precompiled headers.
18298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
18299$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
18300        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
18301        if test "x$HAS_GOOD_CCACHE" = x; then
18302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
18303$as_echo "no, disabling ccache" >&6; }
18304            CCACHE=
18305        else
18306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18307$as_echo "yes" >&6; }
18308            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
18309$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
18310            PUSHED_FLAGS="$CXXFLAGS"
18311            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
18312            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18313/* end confdefs.h.  */
18314
18315int
18316main ()
18317{
18318
18319  ;
18320  return 0;
18321}
18322_ACEOF
18323if ac_fn_cxx_try_compile "$LINENO"; then :
18324  CC_KNOWS_CCACHE_TRICK=yes
18325else
18326  CC_KNOWS_CCACHE_TRICK=no
18327fi
18328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18329            CXXFLAGS="$PUSHED_FLAGS"
18330            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
18331                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18332$as_echo "yes" >&6; }
18333            else
18334                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
18335$as_echo "no, disabling ccaching of precompiled headers" >&6; }
18336                CCACHE=
18337            fi
18338        fi
18339    fi
18340
18341    if test "x$CCACHE" != x; then
18342        CCACHE_SLOPPINESS=time_macros
18343        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
18344        CCACHE_FLAGS=-fpch-preprocess
18345
18346        if test "x$SET_CCACHE_DIR" != x; then
18347            mkdir -p $CCACHE_DIR > /dev/null 2>&1
18348	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
18349        fi
18350    fi
18351
18352    fi
18353
18354
18355###############################################################################
18356#
18357# And now the finish...
18358#
18359###############################################################################
18360
18361# Check for some common pitfalls
18362
18363
18364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
18365$as_echo_n "checking if build directory is on local disk... " >&6; }
18366
18367	# df -l lists only local disks; if the given directory is not found then
18368	# a non-zero exit code is given
18369	if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
18370          OUTPUT_DIR_IS_LOCAL="yes"
18371        else
18372          OUTPUT_DIR_IS_LOCAL="no"
18373        fi
18374
18375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
18376$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
18377
18378# Check if the user has any old-style ALT_ variables set.
18379FOUND_ALT_VARIABLES=`env | grep ^ALT_`
18380
18381# Before generating output files, test if they exist. If they do, this is a reconfigure.
18382# Since we can't properly handle the dependencies for this, warn the user about the situation
18383if test -e $OUTPUT_ROOT/spec.gmk; then
18384  IS_RECONFIGURE=yes
18385else
18386  IS_RECONFIGURE=no
18387fi
18388
18389if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
18390  HIDE_PERFORMANCE_HINTS=yes
18391else
18392  HIDE_PERFORMANCE_HINTS=no
18393  # Hide it the next time around...
18394  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
18395fi
18396
18397
18398
18399# At the end, call the custom hook. (Dummy macro if no custom sources available)
18400
18401
18402# We're messing a bit with internal autoconf variables to put the config.status
18403# in the output directory instead of the current directory.
18404CONFIG_STATUS="$OUTPUT_ROOT/config.status"
18405# Create the actual output files. Now the main work of configure is done.
18406cat >confcache <<\_ACEOF
18407# This file is a shell script that caches the results of configure
18408# tests run on this system so they can be shared between configure
18409# scripts and configure runs, see configure's option --config-cache.
18410# It is not useful on other systems.  If it contains results you don't
18411# want to keep, you may remove or edit it.
18412#
18413# config.status only pays attention to the cache file if you give it
18414# the --recheck option to rerun configure.
18415#
18416# `ac_cv_env_foo' variables (set or unset) will be overridden when
18417# loading this file, other *unset* `ac_cv_foo' will be assigned the
18418# following values.
18419
18420_ACEOF
18421
18422# The following way of writing the cache mishandles newlines in values,
18423# but we know of no workaround that is simple, portable, and efficient.
18424# So, we kill variables containing newlines.
18425# Ultrix sh set writes to stderr and can't be redirected directly,
18426# and sets the high bit in the cache file unless we assign to the vars.
18427(
18428  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18429    eval ac_val=\$$ac_var
18430    case $ac_val in #(
18431    *${as_nl}*)
18432      case $ac_var in #(
18433      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18434$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18435      esac
18436      case $ac_var in #(
18437      _ | IFS | as_nl) ;; #(
18438      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18439      *) { eval $ac_var=; unset $ac_var;} ;;
18440      esac ;;
18441    esac
18442  done
18443
18444  (set) 2>&1 |
18445    case $as_nl`(ac_space=' '; set) 2>&1` in #(
18446    *${as_nl}ac_space=\ *)
18447      # `set' does not quote correctly, so add quotes: double-quote
18448      # substitution turns \\\\ into \\, and sed turns \\ into \.
18449      sed -n \
18450	"s/'/'\\\\''/g;
18451	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18452      ;; #(
18453    *)
18454      # `set' quotes correctly as required by POSIX, so do not add quotes.
18455      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18456      ;;
18457    esac |
18458    sort
18459) |
18460  sed '
18461     /^ac_cv_env_/b end
18462     t clear
18463     :clear
18464     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18465     t end
18466     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18467     :end' >>confcache
18468if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18469  if test -w "$cache_file"; then
18470    test "x$cache_file" != "x/dev/null" &&
18471      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18472$as_echo "$as_me: updating cache $cache_file" >&6;}
18473    cat confcache >$cache_file
18474  else
18475    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18476$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
18477  fi
18478fi
18479rm -f confcache
18480
18481test "x$prefix" = xNONE && prefix=$ac_default_prefix
18482# Let make expand exec_prefix.
18483test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18484
18485DEFS=-DHAVE_CONFIG_H
18486
18487ac_libobjs=
18488ac_ltlibobjs=
18489U=
18490for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18491  # 1. Remove the extension, and $U if already installed.
18492  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18493  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18494  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
18495  #    will be set to the directory where LIBOBJS objects are built.
18496  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18497  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
18498done
18499LIBOBJS=$ac_libobjs
18500
18501LTLIBOBJS=$ac_ltlibobjs
18502
18503
18504
18505: ${CONFIG_STATUS=./config.status}
18506ac_write_fail=0
18507ac_clean_files_save=$ac_clean_files
18508ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18509{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18510$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18511as_write_fail=0
18512cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
18513#! $SHELL
18514# Generated by $as_me.
18515# Run this file to recreate the current configuration.
18516# Compiler output produced by configure, useful for debugging
18517# configure, is in config.log if it exists.
18518
18519debug=false
18520ac_cs_recheck=false
18521ac_cs_silent=false
18522
18523SHELL=\${CONFIG_SHELL-$SHELL}
18524export SHELL
18525_ASEOF
18526cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18527## -------------------- ##
18528## M4sh Initialization. ##
18529## -------------------- ##
18530
18531# Be more Bourne compatible
18532DUALCASE=1; export DUALCASE # for MKS sh
18533if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18534  emulate sh
18535  NULLCMD=:
18536  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18537  # is contrary to our usage.  Disable this feature.
18538  alias -g '${1+"$@"}'='"$@"'
18539  setopt NO_GLOB_SUBST
18540else
18541  case `(set -o) 2>/dev/null` in #(
18542  *posix*) :
18543    set -o posix ;; #(
18544  *) :
18545     ;;
18546esac
18547fi
18548
18549
18550as_nl='
18551'
18552export as_nl
18553# Printing a long string crashes Solaris 7 /usr/bin/printf.
18554as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18555as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18556as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18557# Prefer a ksh shell builtin over an external printf program on Solaris,
18558# but without wasting forks for bash or zsh.
18559if test -z "$BASH_VERSION$ZSH_VERSION" \
18560    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18561  as_echo='print -r --'
18562  as_echo_n='print -rn --'
18563elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18564  as_echo='printf %s\n'
18565  as_echo_n='printf %s'
18566else
18567  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18568    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18569    as_echo_n='/usr/ucb/echo -n'
18570  else
18571    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18572    as_echo_n_body='eval
18573      arg=$1;
18574      case $arg in #(
18575      *"$as_nl"*)
18576	expr "X$arg" : "X\\(.*\\)$as_nl";
18577	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18578      esac;
18579      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18580    '
18581    export as_echo_n_body
18582    as_echo_n='sh -c $as_echo_n_body as_echo'
18583  fi
18584  export as_echo_body
18585  as_echo='sh -c $as_echo_body as_echo'
18586fi
18587
18588# The user is always right.
18589if test "${PATH_SEPARATOR+set}" != set; then
18590  PATH_SEPARATOR=:
18591  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18592    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18593      PATH_SEPARATOR=';'
18594  }
18595fi
18596
18597
18598# IFS
18599# We need space, tab and new line, in precisely that order.  Quoting is
18600# there to prevent editors from complaining about space-tab.
18601# (If _AS_PATH_WALK were called with IFS unset, it would disable word
18602# splitting by setting IFS to empty value.)
18603IFS=" ""	$as_nl"
18604
18605# Find who we are.  Look in the path if we contain no directory separator.
18606case $0 in #((
18607  *[\\/]* ) as_myself=$0 ;;
18608  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18609for as_dir in $PATH
18610do
18611  IFS=$as_save_IFS
18612  test -z "$as_dir" && as_dir=.
18613    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18614  done
18615IFS=$as_save_IFS
18616
18617     ;;
18618esac
18619# We did not find ourselves, most probably we were run as `sh COMMAND'
18620# in which case we are not to be found in the path.
18621if test "x$as_myself" = x; then
18622  as_myself=$0
18623fi
18624if test ! -f "$as_myself"; then
18625  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18626  exit 1
18627fi
18628
18629# Unset variables that we do not need and which cause bugs (e.g. in
18630# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
18631# suppresses any "Segmentation fault" message there.  '((' could
18632# trigger a bug in pdksh 5.2.14.
18633for as_var in BASH_ENV ENV MAIL MAILPATH
18634do eval test x\${$as_var+set} = xset \
18635  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18636done
18637PS1='$ '
18638PS2='> '
18639PS4='+ '
18640
18641# NLS nuisances.
18642LC_ALL=C
18643export LC_ALL
18644LANGUAGE=C
18645export LANGUAGE
18646
18647# CDPATH.
18648(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18649
18650
18651# as_fn_error STATUS ERROR [LINENO LOG_FD]
18652# ----------------------------------------
18653# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18654# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
18655# script with STATUS, using 1 if that was 0.
18656as_fn_error ()
18657{
18658  as_status=$1; test $as_status -eq 0 && as_status=1
18659  if test "$4"; then
18660    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18661    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
18662  fi
18663  $as_echo "$as_me: error: $2" >&2
18664  as_fn_exit $as_status
18665} # as_fn_error
18666
18667
18668# as_fn_set_status STATUS
18669# -----------------------
18670# Set $? to STATUS, without forking.
18671as_fn_set_status ()
18672{
18673  return $1
18674} # as_fn_set_status
18675
18676# as_fn_exit STATUS
18677# -----------------
18678# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18679as_fn_exit ()
18680{
18681  set +e
18682  as_fn_set_status $1
18683  exit $1
18684} # as_fn_exit
18685
18686# as_fn_unset VAR
18687# ---------------
18688# Portably unset VAR.
18689as_fn_unset ()
18690{
18691  { eval $1=; unset $1;}
18692}
18693as_unset=as_fn_unset
18694# as_fn_append VAR VALUE
18695# ----------------------
18696# Append the text in VALUE to the end of the definition contained in VAR. Take
18697# advantage of any shell optimizations that allow amortized linear growth over
18698# repeated appends, instead of the typical quadratic growth present in naive
18699# implementations.
18700if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18701  eval 'as_fn_append ()
18702  {
18703    eval $1+=\$2
18704  }'
18705else
18706  as_fn_append ()
18707  {
18708    eval $1=\$$1\$2
18709  }
18710fi # as_fn_append
18711
18712# as_fn_arith ARG...
18713# ------------------
18714# Perform arithmetic evaluation on the ARGs, and store the result in the
18715# global $as_val. Take advantage of shells that can avoid forks. The arguments
18716# must be portable across $(()) and expr.
18717if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18718  eval 'as_fn_arith ()
18719  {
18720    as_val=$(( $* ))
18721  }'
18722else
18723  as_fn_arith ()
18724  {
18725    as_val=`expr "$@" || test $? -eq 1`
18726  }
18727fi # as_fn_arith
18728
18729
18730if expr a : '\(a\)' >/dev/null 2>&1 &&
18731   test "X`expr 00001 : '.*\(...\)'`" = X001; then
18732  as_expr=expr
18733else
18734  as_expr=false
18735fi
18736
18737if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18738  as_basename=basename
18739else
18740  as_basename=false
18741fi
18742
18743if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18744  as_dirname=dirname
18745else
18746  as_dirname=false
18747fi
18748
18749as_me=`$as_basename -- "$0" ||
18750$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18751	 X"$0" : 'X\(//\)$' \| \
18752	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18753$as_echo X/"$0" |
18754    sed '/^.*\/\([^/][^/]*\)\/*$/{
18755	    s//\1/
18756	    q
18757	  }
18758	  /^X\/\(\/\/\)$/{
18759	    s//\1/
18760	    q
18761	  }
18762	  /^X\/\(\/\).*/{
18763	    s//\1/
18764	    q
18765	  }
18766	  s/.*/./; q'`
18767
18768# Avoid depending upon Character Ranges.
18769as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18770as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18771as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18772as_cr_digits='0123456789'
18773as_cr_alnum=$as_cr_Letters$as_cr_digits
18774
18775ECHO_C= ECHO_N= ECHO_T=
18776case `echo -n x` in #(((((
18777-n*)
18778  case `echo 'xy\c'` in
18779  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
18780  xy)  ECHO_C='\c';;
18781  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
18782       ECHO_T='	';;
18783  esac;;
18784*)
18785  ECHO_N='-n';;
18786esac
18787
18788rm -f conf$$ conf$$.exe conf$$.file
18789if test -d conf$$.dir; then
18790  rm -f conf$$.dir/conf$$.file
18791else
18792  rm -f conf$$.dir
18793  mkdir conf$$.dir 2>/dev/null
18794fi
18795if (echo >conf$$.file) 2>/dev/null; then
18796  if ln -s conf$$.file conf$$ 2>/dev/null; then
18797    as_ln_s='ln -s'
18798    # ... but there are two gotchas:
18799    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18800    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
18801    # In both cases, we have to default to `cp -p'.
18802    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
18803      as_ln_s='cp -p'
18804  elif ln conf$$.file conf$$ 2>/dev/null; then
18805    as_ln_s=ln
18806  else
18807    as_ln_s='cp -p'
18808  fi
18809else
18810  as_ln_s='cp -p'
18811fi
18812rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18813rmdir conf$$.dir 2>/dev/null
18814
18815
18816# as_fn_mkdir_p
18817# -------------
18818# Create "$as_dir" as a directory, including parents if necessary.
18819as_fn_mkdir_p ()
18820{
18821
18822  case $as_dir in #(
18823  -*) as_dir=./$as_dir;;
18824  esac
18825  test -d "$as_dir" || eval $as_mkdir_p || {
18826    as_dirs=
18827    while :; do
18828      case $as_dir in #(
18829      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18830      *) as_qdir=$as_dir;;
18831      esac
18832      as_dirs="'$as_qdir' $as_dirs"
18833      as_dir=`$as_dirname -- "$as_dir" ||
18834$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18835	 X"$as_dir" : 'X\(//\)[^/]' \| \
18836	 X"$as_dir" : 'X\(//\)$' \| \
18837	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18838$as_echo X"$as_dir" |
18839    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18840	    s//\1/
18841	    q
18842	  }
18843	  /^X\(\/\/\)[^/].*/{
18844	    s//\1/
18845	    q
18846	  }
18847	  /^X\(\/\/\)$/{
18848	    s//\1/
18849	    q
18850	  }
18851	  /^X\(\/\).*/{
18852	    s//\1/
18853	    q
18854	  }
18855	  s/.*/./; q'`
18856      test -d "$as_dir" && break
18857    done
18858    test -z "$as_dirs" || eval "mkdir $as_dirs"
18859  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
18860
18861
18862} # as_fn_mkdir_p
18863if mkdir -p . 2>/dev/null; then
18864  as_mkdir_p='mkdir -p "$as_dir"'
18865else
18866  test -d ./-p && rmdir ./-p
18867  as_mkdir_p=false
18868fi
18869
18870if test -x / >/dev/null 2>&1; then
18871  as_test_x='test -x'
18872else
18873  if ls -dL / >/dev/null 2>&1; then
18874    as_ls_L_option=L
18875  else
18876    as_ls_L_option=
18877  fi
18878  as_test_x='
18879    eval sh -c '\''
18880      if test -d "$1"; then
18881	test -d "$1/.";
18882      else
18883	case $1 in #(
18884	-*)set "./$1";;
18885	esac;
18886	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
18887	???[sx]*):;;*)false;;esac;fi
18888    '\'' sh
18889  '
18890fi
18891as_executable_p=$as_test_x
18892
18893# Sed expression to map a string onto a valid CPP name.
18894as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18895
18896# Sed expression to map a string onto a valid variable name.
18897as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18898
18899
18900exec 6>&1
18901## ----------------------------------- ##
18902## Main body of $CONFIG_STATUS script. ##
18903## ----------------------------------- ##
18904_ASEOF
18905test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18906
18907cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18908# Save the log message, to keep $0 and so on meaningful, and to
18909# report actual input values of CONFIG_FILES etc. instead of their
18910# values after options handling.
18911ac_log="
18912This file was extended by openjdk $as_me jdk8, which was
18913generated by GNU Autoconf 2.67.  Invocation command line was
18914
18915  CONFIG_FILES    = $CONFIG_FILES
18916  CONFIG_HEADERS  = $CONFIG_HEADERS
18917  CONFIG_LINKS    = $CONFIG_LINKS
18918  CONFIG_COMMANDS = $CONFIG_COMMANDS
18919  $ $0 $@
18920
18921on `(hostname || uname -n) 2>/dev/null | sed 1q`
18922"
18923
18924_ACEOF
18925
18926case $ac_config_files in *"
18927"*) set x $ac_config_files; shift; ac_config_files=$*;;
18928esac
18929
18930case $ac_config_headers in *"
18931"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18932esac
18933
18934
18935cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18936# Files that config.status was made for.
18937config_files="$ac_config_files"
18938config_headers="$ac_config_headers"
18939
18940_ACEOF
18941
18942cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18943ac_cs_usage="\
18944\`$as_me' instantiates files and other configuration actions
18945from templates according to the current configuration.  Unless the files
18946and actions are specified as TAGs, all are instantiated by default.
18947
18948Usage: $0 [OPTION]... [TAG]...
18949
18950  -h, --help       print this help, then exit
18951  -V, --version    print version number and configuration settings, then exit
18952      --config     print configuration, then exit
18953  -q, --quiet, --silent
18954                   do not print progress messages
18955  -d, --debug      don't remove temporary files
18956      --recheck    update $as_me by reconfiguring in the same conditions
18957      --file=FILE[:TEMPLATE]
18958                   instantiate the configuration file FILE
18959      --header=FILE[:TEMPLATE]
18960                   instantiate the configuration header FILE
18961
18962Configuration files:
18963$config_files
18964
18965Configuration headers:
18966$config_headers
18967
18968Report bugs to <build-dev@openjdk.java.net>."
18969
18970_ACEOF
18971cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18972ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
18973ac_cs_version="\\
18974openjdk config.status jdk8
18975configured by $0, generated by GNU Autoconf 2.67,
18976  with options \\"\$ac_cs_config\\"
18977
18978Copyright (C) 2010 Free Software Foundation, Inc.
18979This config.status script is free software; the Free Software Foundation
18980gives unlimited permission to copy, distribute and modify it."
18981
18982ac_pwd='$ac_pwd'
18983srcdir='$srcdir'
18984AWK='$AWK'
18985test -n "\$AWK" || AWK=awk
18986_ACEOF
18987
18988cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18989# The default lists apply if the user does not specify any file.
18990ac_need_defaults=:
18991while test $# != 0
18992do
18993  case $1 in
18994  --*=?*)
18995    ac_option=`expr "X$1" : 'X\([^=]*\)='`
18996    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
18997    ac_shift=:
18998    ;;
18999  --*=)
19000    ac_option=`expr "X$1" : 'X\([^=]*\)='`
19001    ac_optarg=
19002    ac_shift=:
19003    ;;
19004  *)
19005    ac_option=$1
19006    ac_optarg=$2
19007    ac_shift=shift
19008    ;;
19009  esac
19010
19011  case $ac_option in
19012  # Handling of the options.
19013  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19014    ac_cs_recheck=: ;;
19015  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19016    $as_echo "$ac_cs_version"; exit ;;
19017  --config | --confi | --conf | --con | --co | --c )
19018    $as_echo "$ac_cs_config"; exit ;;
19019  --debug | --debu | --deb | --de | --d | -d )
19020    debug=: ;;
19021  --file | --fil | --fi | --f )
19022    $ac_shift
19023    case $ac_optarg in
19024    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19025    '') as_fn_error $? "missing file argument" ;;
19026    esac
19027    as_fn_append CONFIG_FILES " '$ac_optarg'"
19028    ac_need_defaults=false;;
19029  --header | --heade | --head | --hea )
19030    $ac_shift
19031    case $ac_optarg in
19032    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19033    esac
19034    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19035    ac_need_defaults=false;;
19036  --he | --h)
19037    # Conflict between --help and --header
19038    as_fn_error $? "ambiguous option: \`$1'
19039Try \`$0 --help' for more information.";;
19040  --help | --hel | -h )
19041    $as_echo "$ac_cs_usage"; exit ;;
19042  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19043  | -silent | --silent | --silen | --sile | --sil | --si | --s)
19044    ac_cs_silent=: ;;
19045
19046  # This is an error.
19047  -*) as_fn_error $? "unrecognized option: \`$1'
19048Try \`$0 --help' for more information." ;;
19049
19050  *) as_fn_append ac_config_targets " $1"
19051     ac_need_defaults=false ;;
19052
19053  esac
19054  shift
19055done
19056
19057ac_configure_extra_args=
19058
19059if $ac_cs_silent; then
19060  exec 6>/dev/null
19061  ac_configure_extra_args="$ac_configure_extra_args --silent"
19062fi
19063
19064_ACEOF
19065cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19066if \$ac_cs_recheck; then
19067  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19068  shift
19069  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19070  CONFIG_SHELL='$SHELL'
19071  export CONFIG_SHELL
19072  exec "\$@"
19073fi
19074
19075_ACEOF
19076cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19077exec 5>>config.log
19078{
19079  echo
19080  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19081## Running $as_me. ##
19082_ASBOX
19083  $as_echo "$ac_log"
19084} >&5
19085
19086_ACEOF
19087cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19088_ACEOF
19089
19090cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19091
19092# Handling of arguments.
19093for ac_config_target in $ac_config_targets
19094do
19095  case $ac_config_target in
19096    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
19097    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
19098    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
19099    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
19100    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
19101    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
19102    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
19103
19104  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
19105  esac
19106done
19107
19108
19109# If the user did not use the arguments to specify the items to instantiate,
19110# then the envvar interface is used.  Set only those that are not.
19111# We use the long form for the default assignment because of an extremely
19112# bizarre bug on SunOS 4.1.3.
19113if $ac_need_defaults; then
19114  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19115  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19116fi
19117
19118# Have a temporary directory for convenience.  Make it in the build tree
19119# simply because there is no reason against having it here, and in addition,
19120# creating and moving files from /tmp can sometimes cause problems.
19121# Hook for its removal unless debugging.
19122# Note that there is a small window in which the directory will not be cleaned:
19123# after its creation but before its name has been assigned to `$tmp'.
19124$debug ||
19125{
19126  tmp=
19127  trap 'exit_status=$?
19128  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
19129' 0
19130  trap 'as_fn_exit 1' 1 2 13 15
19131}
19132# Create a (secure) tmp directory for tmp files.
19133
19134{
19135  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19136  test -n "$tmp" && test -d "$tmp"
19137}  ||
19138{
19139  tmp=./conf$$-$RANDOM
19140  (umask 077 && mkdir "$tmp")
19141} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19142
19143# Set up the scripts for CONFIG_FILES section.
19144# No need to generate them if there are no CONFIG_FILES.
19145# This happens for instance with `./config.status config.h'.
19146if test -n "$CONFIG_FILES"; then
19147
19148
19149ac_cr=`echo X | tr X '\015'`
19150# On cygwin, bash can eat \r inside `` if the user requested igncr.
19151# But we know of no other shell where ac_cr would be empty at this
19152# point, so we can use a bashism as a fallback.
19153if test "x$ac_cr" = x; then
19154  eval ac_cr=\$\'\\r\'
19155fi
19156ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19157if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19158  ac_cs_awk_cr='\\r'
19159else
19160  ac_cs_awk_cr=$ac_cr
19161fi
19162
19163echo 'BEGIN {' >"$tmp/subs1.awk" &&
19164_ACEOF
19165
19166
19167{
19168  echo "cat >conf$$subs.awk <<_ACEOF" &&
19169  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19170  echo "_ACEOF"
19171} >conf$$subs.sh ||
19172  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19173ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19174ac_delim='%!_!# '
19175for ac_last_try in false false false false false :; do
19176  . ./conf$$subs.sh ||
19177    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19178
19179  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19180  if test $ac_delim_n = $ac_delim_num; then
19181    break
19182  elif $ac_last_try; then
19183    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19184  else
19185    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19186  fi
19187done
19188rm -f conf$$subs.sh
19189
19190cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19191cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
19192_ACEOF
19193sed -n '
19194h
19195s/^/S["/; s/!.*/"]=/
19196p
19197g
19198s/^[^!]*!//
19199:repl
19200t repl
19201s/'"$ac_delim"'$//
19202t delim
19203:nl
19204h
19205s/\(.\{148\}\)..*/\1/
19206t more1
19207s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19208p
19209n
19210b repl
19211:more1
19212s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19213p
19214g
19215s/.\{148\}//
19216t nl
19217:delim
19218h
19219s/\(.\{148\}\)..*/\1/
19220t more2
19221s/["\\]/\\&/g; s/^/"/; s/$/"/
19222p
19223b
19224:more2
19225s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19226p
19227g
19228s/.\{148\}//
19229t delim
19230' <conf$$subs.awk | sed '
19231/^[^""]/{
19232  N
19233  s/\n//
19234}
19235' >>$CONFIG_STATUS || ac_write_fail=1
19236rm -f conf$$subs.awk
19237cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19238_ACAWK
19239cat >>"\$tmp/subs1.awk" <<_ACAWK &&
19240  for (key in S) S_is_set[key] = 1
19241  FS = ""
19242
19243}
19244{
19245  line = $ 0
19246  nfields = split(line, field, "@")
19247  substed = 0
19248  len = length(field[1])
19249  for (i = 2; i < nfields; i++) {
19250    key = field[i]
19251    keylen = length(key)
19252    if (S_is_set[key]) {
19253      value = S[key]
19254      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19255      len += length(value) + length(field[++i])
19256      substed = 1
19257    } else
19258      len += 1 + keylen
19259  }
19260
19261  print line
19262}
19263
19264_ACAWK
19265_ACEOF
19266cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19267if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19268  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19269else
19270  cat
19271fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
19272  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19273_ACEOF
19274
19275# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19276# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19277# trailing colons and then remove the whole line if VPATH becomes empty
19278# (actually we leave an empty line to preserve line numbers).
19279if test "x$srcdir" = x.; then
19280  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
19281h
19282s///
19283s/^/:/
19284s/[	 ]*$/:/
19285s/:\$(srcdir):/:/g
19286s/:\${srcdir}:/:/g
19287s/:@srcdir@:/:/g
19288s/^:*//
19289s/:*$//
19290x
19291s/\(=[	 ]*\).*/\1/
19292G
19293s/\n//
19294s/^[^=]*=[	 ]*$//
19295}'
19296fi
19297
19298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19299fi # test -n "$CONFIG_FILES"
19300
19301# Set up the scripts for CONFIG_HEADERS section.
19302# No need to generate them if there are no CONFIG_HEADERS.
19303# This happens for instance with `./config.status Makefile'.
19304if test -n "$CONFIG_HEADERS"; then
19305cat >"$tmp/defines.awk" <<\_ACAWK ||
19306BEGIN {
19307_ACEOF
19308
19309# Transform confdefs.h into an awk script `defines.awk', embedded as
19310# here-document in config.status, that substitutes the proper values into
19311# config.h.in to produce config.h.
19312
19313# Create a delimiter string that does not exist in confdefs.h, to ease
19314# handling of long lines.
19315ac_delim='%!_!# '
19316for ac_last_try in false false :; do
19317  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
19318  if test -z "$ac_t"; then
19319    break
19320  elif $ac_last_try; then
19321    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19322  else
19323    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19324  fi
19325done
19326
19327# For the awk script, D is an array of macro values keyed by name,
19328# likewise P contains macro parameters if any.  Preserve backslash
19329# newline sequences.
19330
19331ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19332sed -n '
19333s/.\{148\}/&'"$ac_delim"'/g
19334t rset
19335:rset
19336s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
19337t def
19338d
19339:def
19340s/\\$//
19341t bsnl
19342s/["\\]/\\&/g
19343s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
19344D["\1"]=" \3"/p
19345s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
19346d
19347:bsnl
19348s/["\\]/\\&/g
19349s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
19350D["\1"]=" \3\\\\\\n"\\/p
19351t cont
19352s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19353t cont
19354d
19355:cont
19356n
19357s/.\{148\}/&'"$ac_delim"'/g
19358t clear
19359:clear
19360s/\\$//
19361t bsnlc
19362s/["\\]/\\&/g; s/^/"/; s/$/"/p
19363d
19364:bsnlc
19365s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19366b cont
19367' <confdefs.h | sed '
19368s/'"$ac_delim"'/"\\\
19369"/g' >>$CONFIG_STATUS || ac_write_fail=1
19370
19371cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19372  for (key in D) D_is_set[key] = 1
19373  FS = ""
19374}
19375/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19376  line = \$ 0
19377  split(line, arg, " ")
19378  if (arg[1] == "#") {
19379    defundef = arg[2]
19380    mac1 = arg[3]
19381  } else {
19382    defundef = substr(arg[1], 2)
19383    mac1 = arg[2]
19384  }
19385  split(mac1, mac2, "(") #)
19386  macro = mac2[1]
19387  prefix = substr(line, 1, index(line, defundef) - 1)
19388  if (D_is_set[macro]) {
19389    # Preserve the white space surrounding the "#".
19390    print prefix "define", macro P[macro] D[macro]
19391    next
19392  } else {
19393    # Replace #undef with comments.  This is necessary, for example,
19394    # in the case of _POSIX_SOURCE, which is predefined and required
19395    # on some systems where configure will not decide to define it.
19396    if (defundef == "undef") {
19397      print "/*", prefix defundef, macro, "*/"
19398      next
19399    }
19400  }
19401}
19402{ print }
19403_ACAWK
19404_ACEOF
19405cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19406  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
19407fi # test -n "$CONFIG_HEADERS"
19408
19409
19410eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
19411shift
19412for ac_tag
19413do
19414  case $ac_tag in
19415  :[FHLC]) ac_mode=$ac_tag; continue;;
19416  esac
19417  case $ac_mode$ac_tag in
19418  :[FHL]*:*);;
19419  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
19420  :[FH]-) ac_tag=-:-;;
19421  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19422  esac
19423  ac_save_IFS=$IFS
19424  IFS=:
19425  set x $ac_tag
19426  IFS=$ac_save_IFS
19427  shift
19428  ac_file=$1
19429  shift
19430
19431  case $ac_mode in
19432  :L) ac_source=$1;;
19433  :[FH])
19434    ac_file_inputs=
19435    for ac_f
19436    do
19437      case $ac_f in
19438      -) ac_f="$tmp/stdin";;
19439      *) # Look for the file first in the build tree, then in the source tree
19440	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
19441	 # because $ac_f cannot contain `:'.
19442	 test -f "$ac_f" ||
19443	   case $ac_f in
19444	   [\\/$]*) false;;
19445	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19446	   esac ||
19447	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
19448      esac
19449      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19450      as_fn_append ac_file_inputs " '$ac_f'"
19451    done
19452
19453    # Let's still pretend it is `configure' which instantiates (i.e., don't
19454    # use $as_me), people would be surprised to read:
19455    #    /* config.h.  Generated by config.status.  */
19456    configure_input='Generated from '`
19457	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19458	`' by configure.'
19459    if test x"$ac_file" != x-; then
19460      configure_input="$ac_file.  $configure_input"
19461      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19462$as_echo "$as_me: creating $ac_file" >&6;}
19463    fi
19464    # Neutralize special characters interpreted by sed in replacement strings.
19465    case $configure_input in #(
19466    *\&* | *\|* | *\\* )
19467       ac_sed_conf_input=`$as_echo "$configure_input" |
19468       sed 's/[\\\\&|]/\\\\&/g'`;; #(
19469    *) ac_sed_conf_input=$configure_input;;
19470    esac
19471
19472    case $ac_tag in
19473    *:-:* | *:-) cat >"$tmp/stdin" \
19474      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
19475    esac
19476    ;;
19477  esac
19478
19479  ac_dir=`$as_dirname -- "$ac_file" ||
19480$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19481	 X"$ac_file" : 'X\(//\)[^/]' \| \
19482	 X"$ac_file" : 'X\(//\)$' \| \
19483	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19484$as_echo X"$ac_file" |
19485    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19486	    s//\1/
19487	    q
19488	  }
19489	  /^X\(\/\/\)[^/].*/{
19490	    s//\1/
19491	    q
19492	  }
19493	  /^X\(\/\/\)$/{
19494	    s//\1/
19495	    q
19496	  }
19497	  /^X\(\/\).*/{
19498	    s//\1/
19499	    q
19500	  }
19501	  s/.*/./; q'`
19502  as_dir="$ac_dir"; as_fn_mkdir_p
19503  ac_builddir=.
19504
19505case "$ac_dir" in
19506.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19507*)
19508  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19509  # A ".." for each directory in $ac_dir_suffix.
19510  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19511  case $ac_top_builddir_sub in
19512  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19513  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19514  esac ;;
19515esac
19516ac_abs_top_builddir=$ac_pwd
19517ac_abs_builddir=$ac_pwd$ac_dir_suffix
19518# for backward compatibility:
19519ac_top_builddir=$ac_top_build_prefix
19520
19521case $srcdir in
19522  .)  # We are building in place.
19523    ac_srcdir=.
19524    ac_top_srcdir=$ac_top_builddir_sub
19525    ac_abs_top_srcdir=$ac_pwd ;;
19526  [\\/]* | ?:[\\/]* )  # Absolute name.
19527    ac_srcdir=$srcdir$ac_dir_suffix;
19528    ac_top_srcdir=$srcdir
19529    ac_abs_top_srcdir=$srcdir ;;
19530  *) # Relative name.
19531    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19532    ac_top_srcdir=$ac_top_build_prefix$srcdir
19533    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19534esac
19535ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19536
19537
19538  case $ac_mode in
19539  :F)
19540  #
19541  # CONFIG_FILE
19542  #
19543
19544_ACEOF
19545
19546cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19547# If the template does not know about datarootdir, expand it.
19548# FIXME: This hack should be removed a few years after 2.60.
19549ac_datarootdir_hack=; ac_datarootdir_seen=
19550ac_sed_dataroot='
19551/datarootdir/ {
19552  p
19553  q
19554}
19555/@datadir@/p
19556/@docdir@/p
19557/@infodir@/p
19558/@localedir@/p
19559/@mandir@/p'
19560case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19561*datarootdir*) ac_datarootdir_seen=yes;;
19562*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19563  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19564$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19565_ACEOF
19566cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19567  ac_datarootdir_hack='
19568  s&@datadir@&$datadir&g
19569  s&@docdir@&$docdir&g
19570  s&@infodir@&$infodir&g
19571  s&@localedir@&$localedir&g
19572  s&@mandir@&$mandir&g
19573  s&\\\${datarootdir}&$datarootdir&g' ;;
19574esac
19575_ACEOF
19576
19577# Neutralize VPATH when `$srcdir' = `.'.
19578# Shell code in configure.ac might set extrasub.
19579# FIXME: do we really want to maintain this feature?
19580cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19581ac_sed_extra="$ac_vpsub
19582$extrasub
19583_ACEOF
19584cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19585:t
19586/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19587s|@configure_input@|$ac_sed_conf_input|;t t
19588s&@top_builddir@&$ac_top_builddir_sub&;t t
19589s&@top_build_prefix@&$ac_top_build_prefix&;t t
19590s&@srcdir@&$ac_srcdir&;t t
19591s&@abs_srcdir@&$ac_abs_srcdir&;t t
19592s&@top_srcdir@&$ac_top_srcdir&;t t
19593s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19594s&@builddir@&$ac_builddir&;t t
19595s&@abs_builddir@&$ac_abs_builddir&;t t
19596s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19597$ac_datarootdir_hack
19598"
19599eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
19600  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19601
19602test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
19603  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
19604  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
19605  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19606which seems to be undefined.  Please make sure it is defined" >&5
19607$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19608which seems to be undefined.  Please make sure it is defined" >&2;}
19609
19610  rm -f "$tmp/stdin"
19611  case $ac_file in
19612  -) cat "$tmp/out" && rm -f "$tmp/out";;
19613  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
19614  esac \
19615  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19616 ;;
19617  :H)
19618  #
19619  # CONFIG_HEADER
19620  #
19621  if test x"$ac_file" != x-; then
19622    {
19623      $as_echo "/* $configure_input  */" \
19624      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
19625    } >"$tmp/config.h" \
19626      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19627    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
19628      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19629$as_echo "$as_me: $ac_file is unchanged" >&6;}
19630    else
19631      rm -f "$ac_file"
19632      mv "$tmp/config.h" "$ac_file" \
19633	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
19634    fi
19635  else
19636    $as_echo "/* $configure_input  */" \
19637      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
19638      || as_fn_error $? "could not create -" "$LINENO" 5
19639  fi
19640 ;;
19641
19642
19643  esac
19644
19645done # for ac_tag
19646
19647
19648as_fn_exit 0
19649_ACEOF
19650ac_clean_files=$ac_clean_files_save
19651
19652test $ac_write_fail = 0 ||
19653  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
19654
19655
19656# configure is writing to config.log, and then calls config.status.
19657# config.status does its own redirection, appending to config.log.
19658# Unfortunately, on DOS this fails, as config.log is still kept open
19659# by configure, so config.status won't be able to write to it; its
19660# output is simply discarded.  So we exec the FD to /dev/null,
19661# effectively closing config.log, so it can be properly (re)opened and
19662# appended to by config.status.  When coming back to configure, we
19663# need to make the FD available again.
19664if test "$no_create" != yes; then
19665  ac_cs_success=:
19666  ac_config_status_args=
19667  test "$silent" = yes &&
19668    ac_config_status_args="$ac_config_status_args --quiet"
19669  exec 5>/dev/null
19670  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19671  exec 5>>config.log
19672  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19673  # would make configure fail if this is the last instruction.
19674  $ac_cs_success || as_fn_exit 1
19675fi
19676if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19677  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19678$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19679fi
19680
19681
19682# Make the compare script executable
19683$CHMOD +x $OUTPUT_ROOT/compare.sh
19684
19685# Finally output some useful information to the user
19686
19687# Finally output some useful information to the user
19688
19689if test "x$CCACHE_FOUND" != x; then
19690	if  test "x$HAS_GOOD_CCACHE" = x; then
19691		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
19692		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
19693	else
19694		CCACHE_STATUS="installed and in use"
19695	fi
19696else
19697	if test "x$GCC" = xyes; then
19698		CCACHE_STATUS="not installed (consider installing)"
19699		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
19700	else
19701		CCACHE_STATUS="not available for your system"
19702	fi
19703fi
19704
19705printf "\n"
19706printf "====================================================\n"
19707printf "A new configuration has been successfully created in\n"
19708printf "$OUTPUT_ROOT\n"
19709if test "x$CONFIGURE_COMMAND_LINE" != x; then
19710	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
19711else
19712	printf "using default settings.\n"
19713fi
19714
19715printf "\n"
19716printf "Configuration summary:\n"
19717printf "* Debug level:    $DEBUG_LEVEL\n"
19718printf "* JDK variant:    $JDK_VARIANT\n"
19719printf "* JVM variants:   $with_jvm_variants\n"
19720printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
19721printf "* Boot JDK:       $BOOT_JDK\n"
19722
19723printf "\n"
19724printf "Build performance summary:\n"
19725printf "* Cores to use:   $NUM_CORES\n"
19726printf "* Memory limit:   $MEMORY_SIZE MB\n"
19727printf "* ccache status:  $CCACHE_STATUS\n"
19728printf "\n"
19729
19730if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
19731	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
19732	printf "$CCACHE_HELP_MSG\n"
19733
19734    # Print a helpful message on how to acquire the necessary build dependency.
19735    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
19736    MISSING_DEPENDENCY=ccache
19737    PKGHANDLER_COMMAND=
19738
19739    case $PKGHANDLER in
19740	apt-get)
19741                apt_help     $MISSING_DEPENDENCY ;;
19742    yum)
19743                yum_help     $MISSING_DEPENDENCY ;;
19744	port)
19745                port_help    $MISSING_DEPENDENCY ;;
19746	pkgutil)
19747                pkgutil_help $MISSING_DEPENDENCY ;;
19748	pkgadd)
19749                pkgadd_help  $MISSING_DEPENDENCY ;;
19750    * )
19751      break ;;
19752    esac
19753
19754    if test "x$PKGHANDLER_COMMAND" != x; then
19755        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19756    fi
19757
19758	printf "$HELP_MSG\n"
19759	printf "\n"
19760fi
19761
19762if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
19763	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
19764	printf "will result in longer build times.\n"
19765	printf "\n"
19766fi
19767
19768if test "x$FOUND_ALT_VARIABLES" != "x"; then
19769	printf "WARNING: You have old-style ALT_ environment variables set.\n"
19770	printf "These are not respected, and will be ignored. It is recommended\n"
19771	printf "that you clean your environment. The following variables are set:\n"
19772	printf "$FOUND_ALT_VARIABLES\n"
19773	printf "\n"
19774fi
19775
19776if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
19777	printf "WARNING: Your build output directory is not on a local disk.\n"
19778	printf "This will severely degrade build performance!\n"
19779	printf "It is recommended that you create an output directory on a local disk,\n"
19780	printf "and run the configure script again from that directory.\n"
19781	printf "\n"
19782fi
19783
19784if test "x$IS_RECONFIGURE" = "xyes"; then
19785	printf "WARNING: The result of this configuration has overridden an older\n"
19786	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
19787	printf "proper build. Failure to do so might result in strange build problems.\n"
19788	printf "\n"
19789fi
19790
19791